0% found this document useful (0 votes)
98 views5 pages

CS210 Homework1 Fall2023

The document provides instructions and questions for a homework assignment on discrete mathematics. It includes 14 questions on topics like propositional logic, truth tables, logical equivalences, quantifiers, and translating statements to predicate logic. Students are asked to submit solutions for questions 1, 2, 5, 7-14.

Uploaded by

Usman Sajid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views5 pages

CS210 Homework1 Fall2023

The document provides instructions and questions for a homework assignment on discrete mathematics. It includes 14 questions on topics like propositional logic, truth tables, logical equivalences, quantifiers, and translating statements to predicate logic. Students are asked to submit solutions for questions 1, 2, 5, 7-14.

Uploaded by

Usman Sajid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CS-210 Discrete Mathematics Fall 2023

Problem Set 1

1 Instructions
• The deadline for submitting this homework set is Thursday September 21, 2023 11:55pm

• Adhere to the deadline. Late submissions are not allowed. You have more than enough time for the
homework so it is advised to start early.

• You have to submit the .tex and .pdf files only.

• The names of both the files should be ”yourrollnumber hw1.tex/pdf” e.g. 24100077 hw1.tex. If you
will not follow the naming convention your homework will NOT BE GRADED.

• Plagiarism of any sort will not be tolerated. All the cases will be forwarded to disciplinary committee.

• You have been given a basic template for the assignment.

• You are required to submit solutions for questions 1, 2, 5, 7, 8, 9, 10, 11, 12, 13, 14. The rest are
for practice.

2 Homework Questions
1. Let p and q be the propositions.

• p : The election is decided


• q : The votes have been counted.

Express each of these compound propositions as English sentences.

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

1
2. Determine whether each of these conditional statements is true or false.

(a) If 1+1=3, then unicorns exist.


(b) If 1+1=3, then cats can fly.
(c) If 1+1=2, then cats can fly.
(d) If 2+2=4, then 1+2 = 3.

3. Show that (p → q) ∨ (p → r) and p → (q ∨ r) are logically equivalent.

4. Using a truth table, show that (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r) is a tautology.

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

2
5. Construct a truth table for ((p → q) → r) → s

p q p→q r (p → q) → r s ((p → q) → r) → s

6. Show the following equivalences using using logical equivalence laws.

(a) Show that (P → R) ∨ (Q → R) ≡ (P ∧ Q) → R

(b) Show that P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R).

(c) Show that ¬[¬[(P ∨ Q) ∧ R] ∨ ¬Q] ≡ Q ∧ R

(d) Show that (P ∨ Q ∨ R) ∧ (P ∨ T ∨ ¬Q) ∧ (P ∨ ¬T ∨ R) ≡ P ∨ [R ∧ (T ∨ ¬Q)]

7. Show that ¬∃x(P (x) → ¬Q(x)) is logically equivalent to ∀x(P (x) ∧ Q(x)).

8. Let G(x, y) be the predicate “x is a good friend of y”. Let the UoD be all students in LUMS. Using
quantifier negation prove that ¬∃ x ∀ y G(x, y) ≡ ∀ x ∃ y ¬G(x, y)

9. Suppose a software system has 9 components {A, B, C, D, E, F, G, H, I}. Each component has either
exactly one of the two types of bugs (Bug 1 and Bug 2) or has no bug (is clean). We want to identify
which components have Bug 1 or Bug 2 or is clean. The software testing team has summarized its
findings as follows.

• (9.1) Let P (x) be the predicate that component x has Bug 1, let Q(x) be the predicate that component
x has Bug 2 and let R(x) be the predicate that component x is clean. Translate each of the
below findings in terms of the predicates P (x), Q(x) and R(x).
(a) E and H do not have the same bug.

(b) If G has Bug 1 then all components have Bug 1.

(c) If E has Bug 1 then H has Bug 1 too.

(d) If C has Bug 1 then D and F do not have Bug 1.

3
(e) If either E or H has Bug 1 then I does not have Bug 2.

(f) At least 4 components have Bug 1.

(g) If A has either bug then all components have Bug 2.

(h) A and F are not in the same category.

(i) B has Bug 2.

(j) At least one of C and G have the same bug as B.

(k) Exactly 2 components have Bug 2.

(l) If I has bug 2 then at least one of D, F and A have Bug 2 too.

(m) If E or G have bug 2 then all components have either Bug 1 or Bug 2.
• (9.2) Determine which components have Bug 1, which ones have Bug 2 and which are clean.

Hint: First determine which components have Bug 1 then determine which ones have Bug 2
and then list the clean ones.

10. What are the contrapositive, the converse, and the inverse of the conditional statement The home
team wins whenever it is raining?

4
11. Express each of these statements using predicates, quantifiers, logical connectives, and mathematical
operators where the domain consists of all integers.

(a) The product of two negative integers is positive.


(b) The average of two positive integers is positive.
(c) The difference of two negative integers is not necessarily negative.
(d) The absolute value of the sum of two integers does not exceed the sum of the absolute values
of these integers.

12. Translate each of these nested quantifications into an English statement that expresses a mathemat-
ical fact. The domain in each case consists of all real numbers.

(a) ∃x∀y(xy = y)
(b) ∀x∀y((x < 0) ∧ (y < 0)) → (xy > 0)
(c) ∃x∃y((x2 > y) ∧ (x < y))
(d) ∀x∀y∃z(x + y = z)

13. Rewrite each of these statements so that negations appear only within predicates (that is, so that no
negation is outside a quantifier or an expression involving logical connectives).

(a) ¬∃y∃xP (x, y)


(b) ¬∀x∃yP (x, y)
(c) ¬∃y(Q(y) ∧ ∀x¬R(x, y))
(d) ¬∃y(∃xR(x, y) ∨ ∀xS(x, y))
(e) ¬∃y(∀x∃zT (x, y, z) ∨ ∃x∀zU (x, y, z))

14. Express each of these system specifications using predicates, quantifiers, and logical connectives, if
necessary.

(a) Every user has access to exactly one mailbox.


(b) There is a process that continues to run during all error conditions only if the kernel is working
correctly.
(c) All users on the campus network can access all websites whose url has a .edu extension.

You might also like