Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

ITEC – 322: Discrete Structures Class Assignment 1

BS (IT) – I, Semester 1 of 2023 Due on: 2 May, 2023


Course Instructor: Dr. Abdul Waheed Mahesar Maximum Marks: 05
Department of Information Technology
Faculty of Engineering and Technology
University of Sindh, Jamshoro

Instructions:

Attempt All Questions. Please submit the assignment on due date with hand written
format.

Q#01. 10. Let p and q be the propositions “The election is decided” and “The votes have
been counted,” respectively. Express each of these compound propositions as an English
sentence.

a) ¬p
b) p ∨ q
c) ¬p ∧ q
d) q → p
e) ¬q → ¬p
f ) ¬p → ¬q
g) p ↔ q
h) ¬q ∨ (¬p ∧ q)

a) ¬ p : The election is not (yet) decided.


b) p ∨ q : The election is decided or the votes have been counted.
c) ¬ p∧q : The votes have been counted but the election is not (yet)
decided.
d) q → p : If the votes are counted then the election is decided.
e) ¬ q → ¬ p : The election is not decided unless the votes have
been counted.
f) ¬ p → ¬ q : The votes have not been counted unless the election
has been decided. This is equivalent to proposition d).
g) p ↔ q : The election is decided if and only if the votes have been
counted.
h) ¬ q ∨ (¬ p ∧ q) : The votes have not been counted, or they have
been counted but the election is not (yet) decided.

Q#02. Let p and q be the propositions p : It is below freezing. q : It is snowing. Write these
propositions using p and q and logical connectives (including negations).

a) It is below freezing and snowing.


b) It is below freezing but not snowing.
c) It is not below freezing and it is not snowing.
d) It is either snowing or below freezing (or both).
e) If it is below freezing, it is also snowing.
f ) Either it is below freezing or it is snowing, but it is not snowing if it is below freezing.
g) That it is below freezing is necessary and sufficient for it to be snowing.

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


a) It is below freezing and snowing. (p ∧ q)
b) It is below freezing but not snowing. (p ∧ ¬q)
c) It is not below freezing and it is not snowing. (¬p ∧ ¬q)
d) It is either snowing or below freezing (or both). (p ∨ q)
e) If it is below freezing, it is also snowing. (p → q)
f) Either it is below freezing or it is snowing, but it is not snowing if it is below freezing.
(p ∨ q) ∧ ¬(p ∧ q)
g) That it is below freezing is necessary and sufficient for it to be snowing. (p ↔ q)

Q#03. Let p, q, and r be the propositions p: You have the flu. q: You miss the final
examination. r : You pass the course. Express each of these propositions as an English
sentence.
a) p → q
b) ¬q ↔ r
c) q → ¬r
d) p ∨ q ∨ r
e) (p → ¬r) ∨ (q → ¬r)
f ) (p ∧ q) ∨ (¬q ∧ r)

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

Q#04. Let p and q be the propositions p : You drive over 65 miles per hour. q : You get a
speeding ticket. Write these propositions using p and q and logical connectives (including
negations).

a) You do not drive over 65 miles per hour.


b) You drive over 65 miles per hour, but you do not get a speeding ticket.
c) You will get a speeding ticket if you drive over 65 miles per hour.
d) If you do not drive over 65 miles per hour, then you will not get a speeding ticket.
e) Driving over 65 miles per hour is sufficient for getting a speeding ticket.

a) ¬p
b) p ∧ ¬q
c) p → q
d) ¬p → ¬q
e) p → q

Q#05. Construct a truth table for each of these compound propositions.

a) p → ¬q

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


b) ¬p ↔ q
c) (p → q) ∨ (¬p → q)
d) (p → q) ∧ (¬p → q)
e) (p ↔ q) ∨ (¬p ↔ q)
f ) (¬p ↔ ¬q) ↔ (p ↔ q)

a) p → ¬q

p q ¬q p → ¬q
T T F F
T F T T
F T F T
F F T T

b) ¬p ↔ q

p q ¬p ¬p ↔ q
T T F T
T F F F
F T T F
F F T T
c) (p → q) ∨ (¬p → q)

p q (p → q) (¬p → q) (p → q) ∨ (¬p → q)
T T T T T
T F F F F
F T T T T
F F T T T
d) (p → q) ∧ (¬p → q)

p q (p → q) (¬p → q) (p → q) ∧ (¬p → q)
T T T T T
T F F T F
F T T T T
F F T T T
e) (p ↔ q) ∨ (¬p ↔ q)

p q ¬p (p ↔ q) (¬p ↔ q) (p ↔ q) ∨ (¬p ↔ q)
T T F T F T
T F F F T T
F T T F T T
F F T T F T
f) (¬p ↔ ¬q) ↔ (p ↔ q)

p q ¬p ¬q ¬p ↔ ¬q p↔q (¬p ↔ ¬q) ↔ (p ↔ q)


T T F F T T T
T F F T F F T
F T T F F F T
F F T T T T T
Q#06. Construct a truth table for each of these compound propositions.

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


a) (p ∨ q) ∨ r
b) (p ∨ q) ∧ r
c) (p ∧ q) ∨ r
d) (p ∧ q) ∧ r
e) (p ∨ q) ∧ ¬r
f ) (p ∧ q) ∨ ¬r

a) (p ∨ q) ∨ r

p q r p∨q (p ∨ q) ∨ r
T T T T T
T T F T T
T F T T T
T F F T T
F T T T T
F T F T T
F F T F T
F F F F F
b) (p ∨ q) ∧ r

p q r p∨q (p ∨ q) ∧ r
T T T T T
T T F T F
T F T T T
T F F T F
F T T T T
F T F T F
F F T F F
F F F F F
c) (p ∧ q) ∨ r

p q r p∧q (p ∧ q) ∨ r
T T T T T
T T F T T
T F T F T
T F F F F
F T T F T
F T F F F
F F T F T
F F F F F
d) (p ∧ q) ∧ r

p q r p∧q (p ∧ q) ∧ r
T T T T T
T T F T F
T F T F F
T F F F F
F T T F F
F T F F F

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


F F T F F
F F F F F
e) (p ∨ q) ∧ ¬r

p q r ¬r p∨q (p ∨ q) ∧ ¬r
T T T F T F
T T F T T T
T F T F T F
T F F T T T
F T T F T F
F T F T T T
F F T F F F
F F F T T T
f) (p ∧ q) ∨ ¬r

p q r ¬r p∧q (p ∧ q) ∨ ¬r
T T T F T T
T T F T T T
T F T F F F
T F F T F T
F T T F F F
F T F T F T
F F T F F

Q#07. Show that each of these conditional statements is a tautology by using truth tables.

a) (p ∧ q) → p
b) p → (p ∨ q)
c) ¬p → (p → q)
d) (p ∧ q) → (p → q)
e) ¬(p → q) → p
f ) ¬(p → q) → ¬q

a) (p ∧ q) → p

p q p∧q (p ∧ q) → p
T T T T
T F F T
F T F T
F F F T
b) p → (p ∨ q)

p q p ∨ q p → (p ∨ q)
T T T T
T F T T

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


F T T T
F F F T
c) ¬p → (p → q)

p q ¬p p → q ¬p → (p → q)
T T F T T
T F F F T
F T T T T
F F T T T
d) (p ∧ q) → (p → q)

p q p ∧ q p → q (p ∧ q) → (p → q)
T T T T T
T F F F T
F T F T T
F F F T T
e) ¬(p → q) → p

p q p→q ¬(p → q) ¬(p → q) → p


T T T F T
T F F T T
F T T F T
F F T T F
f) ¬(p → q) → ¬q

p q p→q ¬q ¬(p → q) ¬(p → q) → ¬q


T T T F F T
T F F T T T
F T T F F T
F F T T T T

Q#08. Show that each of these conditional statements is a tautology by using truth tables.

a) [¬p ∧ (p ∨ q)] → q
b) [(p → q) ∧ (q → r)] → (p → r)
c) [p ∧ (p → q)] → q
d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r

a) [¬p ∧ (p ∨ q)] → q

p q ¬p p∨q ¬p ∧ (p ∨ q) [¬p ∧ (p ∨ q)] → q


T T F T F T
T F F T T F
F T T T T T
F F T F F T
b) [(p → q) ∧ (q → r)] → (p → r)

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


p q r p→q q→r (p → q) ∧ (q → r) [(p → q) ∧ (q → r)] → (p → r)
T T T T T T T
T T F T F F T
T F T F T T T
T F F F T T T
F T T T T T T
F T F T F F T
F F T T T T T
F F F T T T T
c) [p ∧ (p → q)] → q

p q p → q p ∧ (p → q) [p ∧ (p → q)] → q
T T T T T
T F F F T
F T T F T
F F T F T
d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r

p q r p∨q p→r q→r (p ∨ q) ∧ (p → r) ∧ (q → r) [(p ∨ q) ∧ (p → r)


∧ ∧ (q → r)] → r
T T T T T T T T
T T F T F F F T
T F T T T T T T
T F F T F T F T
F T T T T T T T
F T F T T F F T
F F T F T T F T
F F F F T T F T

Q#09. Let P (x) be the statement “x spends more than five hours every weekday in class,”
where the domain for x consists of all students. Express each of these quantifications in
English.

a) ∃xP (x)
b) ∀xP (x)
c) ∃x ¬P (x)
d) ∀x ¬P (x)

a) ∃xP (x) There exists a student who spends more than five hours every weekday in class.

b) ∀xP (x) Every student spends more than five hours every weekday in class.

c) ∃x ¬P (x) There exists a student who does not spend more than five hours every weekday in
class.

d) ∀x ¬P (x) No student spends more than five hours every weekday in class

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment


Q#10. Let N (x) be the statement “x has visited North Dakota,” where the domain consists of
the students in your school. Express each of these quantifications in English.

a) ∃xN (x)
b) ∀xN (x)
c) ¬∃xN (x)
d) ∃x¬N (x)
e) ¬∀xN (x)
f ) ∀x¬N (x)

a) ∃xN (x) There exists a student in your school who has visited North Dakota.

b) ∀xN (x) Every student in your school has visited North Dakota.

c) ¬∃xN (x) No student in your school has visited North Dakota.

d) ∃x¬N (x) There exists a student in your school who has not visited North Dakota.

e) ¬∀xN (x) Not every student in your school has visited North Dakota.

f ) ∀x¬N (x) No student in your school has visited North Dakota.

THE END

ITEC –322 : Discrete Structures | BSIT – I, Semester 1 of 2023 | Class Assignment

You might also like