s09_a2 - UNIVERSITY OF WATERLOO School of Computer Science...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
UNIVERSITY OF WATERLOO School of Computer Science CS245 Logic and Computation Spring 2009 ASSIGNMENT 2 (Due: Thursday, June 4, 2009 at 5:00pm) Use makeCover to produce a cover page for your assignment and hand in your assignment in the CS245 assignment box. Assignments are to be done individually. 1. (4 marks) Use transformational proof to show the following: (a) p ( q r ) WV p q r (b) false false false WV false 2. (2 marks) Convert the following formula to disjunctive normal form using transformational proof. Then convert the formula in disjunctive normal form to conjunctive normal form. ( a b ) ( b c )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. Code Analysis IF a AND b THEN IF NOT c OR d THEN IF e AND f THEN P1 ELSE IF NOT e and NOT b THEN P2 ELSE P3 ELSE P4 where P1, P2, P3, and P4 are blocks of code. (a) (4 marks) Under what input conditions, expressed in propositional logic, are each of the blocks of code P1, P2, P3, and P4 executed? Do not simplify. (b) (5 marks) Is there any dead code (unreachable code) in the code fragment?
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

s09_a2 - UNIVERSITY OF WATERLOO School of Computer Science...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online