This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS 70 Discrete Mathematics for CS Spring 2000 Wagner Final You have three hours. The exam is open-book, open-notes. There are seven questions in all, for a total of 100 points. The point score for each question part is indicated in the margin. Avoid spending too long on any one question. Length and degree of difficulty of questions may vary. Write your answers in blue books. Check you haven’t skipped any by accident. Hand them all in. Panic not. 1. [16 pts] The resolution rule The resolution inference rule for propositional logic applies to two clauses , A = ( a 1 ∨···∨ a m ) and B = ( b 1 ∨···∨ b n ) , where the a i s and b j s are literals, and generates a third clause which is called a resolvent of A and B . The general pattern is as follows: a 1 ∨···∨ a m b 1 ∨···∨ b n a 1 ∨···∨ a i- 1 ∨ a i + 1 ∨···∨ a m ∨ b 1 ∨···∨ b j- 1 ∨ b j + 1 ∨···∨ b n where the literals a i and b j must be complementary , i.e., one is the negation of the other. The resolvent contains all the literals of the two input clauses except for the complementary literals a i and b j . Here is a concrete example: a ∨ b ∨¬ c b ∨ c ∨¬ d a ∨ b ∨ b ∨¬ d (a) Show that modus ponens is a special case of resolution. 2pts (b) Let A = ( x ∨ y ) and B = ( ¬ y ∨ z ) , where x , y , and z are proposition symbols. Calculate C , the 4pts resolvent of A and B , and prove that A ∧ B | = C . (c) Prove that, for any two clauses, one of the following must hold: 4pts i. there are no possible resolvents; or ii. there is exactly one resolvent; or iii. all possible resolvents are logically equivalent to T . (d) Prove that the resolution rule is sound , i.e., that for any clauses A and B , if C is a resolvent of A 6pts and B then A ∧ B | = C . [continued overleaf] 1 2. [10 pts] Russian Multiplication The so-called Russian algorithm for multiplying two positive integers a , b is defined recursively as follows: algorithm mult( a , b ) if a = 1 then return( b ) else return( mult ( b a / 2 c , 2 * b ) + b * ( a...
View Full Document
This note was uploaded on 09/03/2011 for the course CS 70 taught by Professor Papadimitrou during the Fall '08 term at Berkeley.
- Fall '08