Professional Documents
Culture Documents
01
SEMESTER Fall - 2022
CS702 –Advance Algorithm Analysis and Design
The purpose of assignments is to provide you with hands on practice on Advance Algorithm Analysis
and Design course. It is expected that students will solve the assignments themselves. Following rules
will apply during the evaluation of assignment.
Cheating from any source will result in zero marks in the assignment.
Any student found cheating in any two of the assignments submitted will be awarded "F" grade in
the course.
In case of question No. 03 direct copy and paste from the research paper will be awarded zero
marks.
(q → ¬ p) ↔ (p ↔ q)
T T F F T F
T F F F F T
F T T T F F
F F T T T T
(p ↔ q) ⊕ (¬p ↔ ¬ r)
p q r (p ↔ q) ¬p ¬r (¬p ↔ ¬ r) (p ↔ q)⊕(¬p ↔ ¬ r)
T T T T F F T F
T T F T F T F T
T F T F F F T T
T F F F F T F F
F T T F T F F F
F T F F T T T T
F F T T T F F T
F F F T T T T F
(p ⊕ q) → (p ⊕ ¬q)
p q (p ⊕ q) ¬q (p ⊕ ¬q) (p ⊕ q) → (p ⊕ ¬q)
T T F F T T
T F T T F F
F T T F F F
F F F T T T
i. State the value of x after the statement if P (x)then x := 1 is executed, where P (x) is the
statement “x > 1,” if the value of x when this statement is reached is
a) x = 0.
by putting the value in equation “”x > 1””
0 >1 which is not fulfilling. So this condition is False
b) x = 1.
by putting the value in equation “”x > 1””
1 >1 which is not fulfilling. So this condition is False
c) x = 2.
by putting the value in equation “”x > 1””
2 >1 which is right. So this condition is True
ii. Suppose P (x, y) denotes the equation y=x +2, what will the truth values of the Propositions
P (2,5), P (0,1).
P (2,5). False
so we have x = 2 and y =5
By putting the value in equation we have
5=2+2
5=4
Both side of the equation are not equal therefore it is a false value
P (0,1). False