0% found this document useful (0 votes)
3 views

Assignment 03 Solution

The document contains solutions to various problems related to discrete structures, including negation, converse, contrapositive, and logical equivalences of statements. It also includes a puzzle involving knights and knaves, as well as expressions using quantifiers and truth values of statements. Additionally, it presents logical equivalences and Boolean expressions for logic networks.

Uploaded by

sherry.05850
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Assignment 03 Solution

The document contains solutions to various problems related to discrete structures, including negation, converse, contrapositive, and logical equivalences of statements. It also includes a puzzle involving knights and knaves, as well as expressions using quantifiers and truth values of statements. Additionally, it presents logical equivalences and Boolean expressions for logic networks.

Uploaded by

sherry.05850
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Discrete Structures: Assignment # 03 Solution

Problem 1
Write NEGATION of the following statements (Careful, NEGATION is not the same as INVERSE)
a) If P is a square, then P is a rectangle.
b) If n is prime, then n is odd or n is 2.
c) If Aangloo is Meena's father, then Baangloo is her uncle and Bingli is her Aunt.
d) A positive integer is prime only if it has no divisors other than 1 and itself.
e) Being divisible by 3 is a necessary condition for this number to be divisible by 9.
Negation:
a) 𝑃 is a square and it is not a rectangle.
b) 𝑛 is prime and 𝑛 is not odd and 𝑛 is not 2.
c) Angloo is Meena’s father and Bangloo is not her uncle OR Bingli is
not her aunt.
d) A positive integer is prime and it has divisor other 1 or itself.
e) A number is divisible by 9 and it is not divisible by 3.
Problem 2
Write CONVERSE of the following statements.
a) If P is a square, then P is a rectangle.
b) If n is prime, then n is odd or n is 2.
c) If Aangloo is Meena's father, then Baangloo is her uncle and Bingli is her Aunt.
d) A positive integer is prime only if it has no divisors other than 1 and itself.
e) Being divisible by 3 is a necessary condition for this number to be divisible by 9.
Converse:
a) If 𝑃 is a rectangle, then 𝑃 is a square.
b) If 𝑛 is odd or 𝑛 is 2, then 𝑛 is prime.
c) If Baangloo is her uncle and Bingli is her Aunt, then Aangloo is
Meena's father.
d) If a number has no divisor other than 1 and itself, then it is a
prime number.
e) Being divisible by 9 is a necessary condition for the number to be
divisible by 3
(or we may write… If a number is divisible by 3, then it is divisible
by 9)
Problem 3
Write CONTRPOSITIVE of the following statements.
a) If P is a square, then P is a rectangle.
b) If n is prime, then n is odd or n is 2.
c) If Aangloo is Meena's father, then Baangloo is her uncle and Bingli is her Aunt.
d) A positive integer is prime only if it has no divisors other than 1 and itself.
e) Being divisible by 3 is a necessary condition for this number to be divisible by 9.
Contrapositive:
a) If 𝑃 is not a rectangle, then 𝑃 is not a square.
b) If 𝑛 is not odd and 𝑛 is not 2, then 𝑛 is not prime.
c) If Baangloo is nor her uncle OR Bingli is not her Aunt, then Aangloo
is not Meena's father.
d) If a number has divisor other than 1 or itself, then it is a not
prime number.
e) Being not divisible by 9 is a necessary condition for the number to
be not divisible by 3.
(or we may write… If a number is not divisible by 3, then it is not
divisible by 9)
Problem 4
Discrete Structures: Assignment # 03 Solution

a) If you have flu then you you miss the final exam.
b) You do not miss the final exam if and only if you pass the course.
c) If you miss the final exam then you do not pass the course.
d) You have the flu or you miss the final exam or you pass the course.
e) If you have the flu then you do not pass the course or if you miss the
final exam then you do not pass the course.

Problem 5

a)
𝒑 ¬𝒑 𝒑 → ¬𝒑
0 1 1
1 0 0
b)
𝒑 ¬𝒑 𝒑 ↔ ¬𝒑
0 1 0
1 0 0
c)
𝒑 𝒒 𝒑∨𝒒 𝒑 ⊕ (𝒑 ∨ 𝒒)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 1 0
d)
𝒑 𝒒 𝒑∧𝒒 𝒑∨𝒒 (𝒑 ∧ 𝒒) → (𝒑 ∨ 𝒒)
0 0 0 0 1
0 1 0 1 1
1 0 0 1 1
1 1 1 1 1
e)
𝒑 𝒒 ¬𝒑 𝒒 → ¬𝒑 𝒑↔𝒒 (𝒒 → ¬𝒑) ↔
(𝒑 ↔ 𝒒)
0 0 1 1 1 1
0 1 1 1 0 0
Discrete Structures: Assignment # 03 Solution

1 0 0 1 0 0
1 1 0 0 1 0
Problem 6

a) Jan is not rich or not happy. (Jan is poor or sad)


b) Carloss will not bicycle and not run tomorrow.
c) Mei does walk and does not take bus to class.
d) Ibrahim is not smart or not hardworking. (Ibrahim is dull or lazy)

Problem 7 - (Puzzle of Knights and Knaves)


In an island, there live two types of people: KNIGHTS, who always tell the truth, and KNAVES, who always
lie.
You visit the island and meet a group of six natives, who speak to you as follows:
U says: None of us is a knight.
V says: At least three of us are knights.
W says: At most three of us are knights.
X says: Exactly five of us are knights.
Y says: Exactly two of us are knights.
Z says: Exactly one of us is a knight.
Which are knights and which are knave?
Examining statement of U: U cannot a knight. If he is knight it will contradict his statement. So U is knave, and
there are some knights
Examining statement of V: Suppose V is knight, then there could be 3 or 4 or 5 knights (one, U, has already
been found as knave).
Now if W is also knight, then there must be exactly 3 knights. But none of X, Y, Z can be knights then (as per
their statements). So if W is knave, then there could be 4 knights (6 – U and W). But statements of X, Y, and Z
say knights cannot be 4. So, we have to conclude V is also knave.
Examining statement of W: Suppose W is knight, so there could be 1, 2 or 3 knights.
X cannot be knight as per his statement. Y can be knight. If Z is knight (exactly one knight), then W cannot be
knight. If Z is knave, then things are fine (W and Y are knights).
Examining statement of X: X is knave, as we have already found two, U and V, as knaves. We cannot have 5
knights. So X is knave.
Now there are 3 knaves.
If W is to be knave, then there mut be more than 3 knights, which is not possible now. So that means W is
knight and there are at most 3 knights.
If W is knight, then as per above discussion, Y is also knight.
Examining statement of Y: We have found Y is knight, then Z cannot be knight, and W should be knight.
Examining statement of Z: Since Y is knight, so Z has to be knave, as his statement contradicts Y’s statement.

Problem 8 –
Express the following statements using quantifiers, variables, and the predicates, with following
information:
𝐷 is set of all students
Discrete Structures: Assignment # 03 Solution

𝑀(𝑠): 𝑠 is a math major student


𝐶(𝑠): 𝑠 is a computer science major student
𝐸(𝑠): 𝑠 is an engineering major student
a) There is an engineering student who is a math major.
∃𝑠 ∈ 𝐷 such that 𝐸(𝑠) ∧ 𝑀(𝑠).
b) Every computer science student is an engineering student.
∀𝑠 ∈ 𝐷, 𝐶(𝑠) → 𝐸(𝑠).
c) No computer science students are engineering student.
∀𝑠 ∈ 𝐷 such that 𝐶(𝑠) ∧ ¬𝐸(𝑠)
OR ∀𝑠 ∈ 𝐷 such that ¬( 𝐶(𝑠) → 𝐸(𝑠) )
d) Some computer science students are also math majors.
∃𝑠 ∈ 𝐷 such that 𝐶(𝑠) ∧ 𝑀(𝑠)
e) Some computer science students are engineering students and some are not.
∃𝑠 ∈ 𝐷 such that C(𝑠) ∧ ¬𝐸(𝑠).
OR ∃𝑠 ∈ 𝐷 such that C(𝑠) ∧ 𝐸(𝑠).

Problem 09 –
1. Let 𝐷 = {1,2,3, . . ,9}. Determine the truth value of each of the following statements.
a. (∀𝑥 ∈ 𝐷) 𝑥 + 4 < 15
b. (∃𝑥 ∈ 𝐷) 𝑥 + 4 = 10
c. (∀𝑥 ∈ 𝐷) 𝑥 + 4 ≤ 10
d. (∃𝑥 ∈ 𝐷) 𝑥 + 5 > 15

2. Let 𝐾(𝑥): 𝑥 is a student, 𝑀(𝑥): 𝑥 is clever, 𝑁(𝑥): 𝑥 is successful. Express the followings
using quantifiers.
a. There exists a student
b. Some students are clever
c. Some students are not successful

3. Negate the statements.


a. All integers are greater than 8.
b. For all real numbers 𝑥, if 𝑥 > 3 then 𝑥 2 > 9.
Discrete Structures: Assignment # 03 Solution

Problem 10 -
1. Show that ¬(𝑝⋁(¬𝑝⋀𝑞)) and ¬𝑝⋀¬𝑞 are logically equivalent by developing a series of logical
equivalencies.
Discrete Structures: Assignment # 03 Solution

2. Show that (𝑝 → 𝑞) → 𝑞 and 𝑝⋁𝑞 are logically equivalent by developing a series of logical
equivalencies.
Discrete Structures: Assignment # 03 Solution

3. Show that (¬𝑝⋁𝑞)⋀(𝑝⋀(𝑝⋀𝑞)) and 𝑝⋀𝑞 are logically equivalent by developing a series of
logical equivalencies.

4. Find the logic networks corresponding to Boolean expressions


a. 𝐴𝐵 + 𝐶𝐷
b. 𝑋 ′ 𝑌 ′ 𝑍 + 𝑋 ′ 𝑌𝑍 + 𝑋𝑌′
Discrete Structures: Assignment # 03 Solution

You might also like