Professional Documents
Culture Documents
Course Title: Discrete Structures Class: BS (SE) 2020 Course Code: CSS 1032 Course Incharge: Ms. Sana Iqbal
Course Title: Discrete Structures Class: BS (SE) 2020 Course Code: CSS 1032 Course Incharge: Ms. Sana Iqbal
Course Title: Discrete Structures Class: BS (SE) 2020 Course Code: CSS 1032 Course Incharge: Ms. Sana Iqbal
1|Page
1. Determine whether these bi conditionals are true or false.
a) 2 + 2 = 4 if and only if 1 + 1 = 2.
TRUE
b) 1 + 1 = 2 if and only if 2 + 3 = 4.
FALSE
TRUE
FALSE
2. For each of these sentences, determine whether an inclusive or, or an exclusive or, is
intended. Explain your answer
b) A password must have at least three digits or be at least eight characters long.
Inclusive or
(a password can be a combination of both characters and digits)
c) The prerequisite for the course is a course in number theory or a course in cryptography.
Inclusive or
(students have to take any one of them before getting enrolled but they can have both too)
3. Write each of these statements in the form “if p, then q” in English. [2]
if you get promoted, then you have washed the boss’s car
2|Page
b) Winds from the south imply a spring thaw
d) You can access the website only if you pay a subscription fee.
If you pay a subscription fee, then you can access the website
a) For you to get an A in this course, it is necessary and sufficient that you learn how to solve
discrete mathematics problems.
You will get an A in this course if and only if you leanr how to solve discrete mathematics
problem.
5. Let P(x) be the statement “x can speak Russian” and let Q(x) be the statement “x knows the
computer language
C++.” Express each of these sentences in terms of P(x), Q(x), quantifiers, and logical
connectives. The domain for quantifiers consists of all students at your school. .
a) There is a student at your school who can speak Russian and who knows C++.
c) Every student at your school either can speak Russian or knows C++.
∀x(P(x)∨Q(x))
3|Page
6.What rule of inference is used in each of these arguments?
b) If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed.
Modus ponens.
4|Page
8. Direct and Indirect Proofs:
a)Prove that if n is an even integer and 3n + 2 is even, then n is even using proof by
contraposition and contradiction
Proof by Contraposition
Then n=2k+1
Now substituting,
3n+2=3(2k+1)+2
=6k+3+2
5|Page
=6k+5
=6k+4+1
=2(3k+2)+1
This tells us that 3n + 2 is odd and therefore not even. This is the negation of the premise of the
theorem. Because the negation of the conclusion of the conditional statement implies that the
hypothesis is false, the original conditional statement is true. Our proof by contraposition
succeeded; we have proved the theorem “If 3n + 2 is even, then n is even.”
Proof by Contradiction
3n+2=3(2k+1)+2
=6k+3+2
=6k+5
=6k+4+1
=2(3k+2)+1
Because 3n + 2 = 2p+1, where p = 3k + 2, 3n + 2 is odd. Note that the statement “3n + 2 is odd”
is equivalent to the statement ¬p, because an integer is odd if and only if it is not even. Because
both p and ¬p are true, we have a contradiction. This completes the proof by contradiction,
proving that if 3n + 2 is even, then n is even.
6|Page