final-s00

# final-s00 - CS 70 Spring 2000 Discrete Mathematics for CS...

This preview shows pages 1–3. Sign up to view the full content.

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

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

View Full Document
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 mod 2 ) ) Your task is to prove, using (strong) induction on the first input a
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern