Course Title: Discrete Structures Class: BS (SE) 2020 Course Code: CSS 1032 Course Incharge: Ms. Sana Iqbal

You might also like

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

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

c) 1 + 1 = 3 if and only if monkeys can fly.

TRUE

d) 0 >1 if and only if 2 >1.

FALSE

2. For each of these sentences, determine whether an inclusive or, or an exclusive or, is
intended. Explain your answer

a) Coffee or tea comes with dinner.


Exclusive or
(we can either have coffee or tea with dinner at a time)

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)

d) You can pay using U.S. dollars or Euros.


Exclusive or
(you can pay in any single currency)

3. Write each of these statements in the form “if p, then q” in English. [2]

a) It is necessary to wash the boss’s car to get promoted.

if you get promoted, then you have washed the boss’s car

2|Page
b) Winds from the south imply a spring thaw

if the wind is from the south, then it is a spring thaw

c) Willy gets caught whenever he cheats.

if Willy cheats ,then he gets caught

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

4. Write each of these propositions in the form “p if and only if q” in English.[1]

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.

b) It rains if it is a weekend day, and it is a weekend day if it rains.

It rains if and only if it is a weekend day.

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++.

∃x( P(x) ∧Q(x))

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?

a) Alice is a mathematics major. Therefore, Alice is either a mathematics major or a computer


science major.
Addition

b) If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed.
Modus ponens.

7. Proof the given question by induction method.[2]

a) 1 2 + 2 2 + 3 2 + ... + n 2= n (n + 1) (2n + 1)/6

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

Let “n” be an arbitrary random integer.

Suppose that n is not even and thus odd.

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

So, we have 3n+2=2p+1, where p=3k+2.

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

Let p be “3n + 2 is even” and q be “n is even.” To construct a proof by contradiction, assume


that both p and ¬q are true. That is, assume that 3n + 2 is even and that n is not even. Because
n is not even, we know that it is odd. Because n is even, there is an integer k such that n = 2k+1.
This implies that:

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

You might also like