Cs210: Foundations of Computer Science Dept of Computer SC and Engg, IIT Madras Answer All Questions Time: 2 Hours Full Marks 40
Cs210: Foundations of Computer Science Dept of Computer SC and Engg, IIT Madras Answer All Questions Time: 2 Hours Full Marks 40
Cs210: Foundations of Computer Science Dept of Computer SC and Engg, IIT Madras Answer All Questions Time: 2 Hours Full Marks 40
What conclusion can you draw from the above statements. Explain your
answer briefly.
(4 marks)
3. (a) Write the following statement so that the negation appears only within the
predicates, i,e. no negation is outside a quantifier: ¬∀x∀yP( x, y )
(b) Prove or disprove the following equivalence:
∀xP( x) ∧ ∀xQ( x) ⇔ ∀x∃y ( P( x) ∨ Q( y ))
(2 x 2 = 4 marks)
5. Suppose that five ones and four zeros are arranged around a circle. Between
any two equal bits you insert a 0 and between any two unequal bits you insert 1
and form nine new bits. Then erase the nine original bits. Show that when you
iterate in this fashion, you can never reach nine zeros.
(4 marks)
7. (a) Suppose that R1 and R2 are equivalence relations on set S. State with
brief reasons which of the following are also equivalence relations:
(a) R1 ∩ R2
(b) R1 ∪ R2
(2 marks)
(b) Prove or disprove that the relation R on the set of integers defined as:
R={(a,b)|a>b} is an equivalence relation.
(1 mark)
(c) Comment on: “The Data Acyclic Graph of an equivalence relation is
complete”.
(1 mark)
LOOP INVARIANT: (Y × W) + Z =X + Y2
OUTPUT : Z = X + Y2
(4 marks)
10. The Halting problem discussed in the class states: “Given a description of a
program and a finite input, decide whether the program finishes running or will
run forever, given that input”. The problem was shown to be unsolvable. However
we have also seen in the class that we can prove that a specific instance of a
program with specific inputs terminate. Is there is an apparent contradiction
between the two? Explain in not more than two statements.
(4 marks)