Exam 2 CS 451/551 Thursday, April 15, 1999 This is an open-book, open-notes examination. There are five problems. Do not spend too much time on any problem. Read them all through first and solve them in the order that allows you to make the most progress. ------------------------------------------------------------------------------ Problem 1: A. Give the clauses for the following theorem: There was a party. Ann and Bill and Carl and Dave were invited. Either Ann or Bill (or both) came. If Ann came then Bill came. If Bill came then Ann came. If Ann and Bill came then Carl came. If Bill and Carl came then Dave came. Therfore, all four of them came to the party. B. Give a proof of the theorem using the resolution inference system, with the set of support strategy. ------------------------------------------------------------------------------ Problem 2: A. Give the following theorem in first order logic: For every number, there is a larger number. The less-than predicate is antisymmetric (i.e., if a number is smaller than another number, then the second number is not smaller than the first number). Therefore, there is no largest number. Use the following predicate: Less(x,y) - x is less than y B. Give the clauses for the theorem. C. Give a proof of the theorem using the resolution inference system. ------------------------------------------------------------------------------ Problem 3: A. Give the following theorem in first order logic: Every pair of numbers has a product. x and y divide the product of x and y. Therefore, every number divides something. Use the following predicates: Prod(x,y,z) - z is the product of x and y Div(x,y) - x divides y B. Give the clauses for the theorem. C. Give a proof of the theorem using the resolution inference system. ------------------------------------------------------------------------------ Problem 4: A. Give the step by step results of the unification algorithm for P(x,g(z),z) and P(f(y),y,a). B. Give the step by step results of the unification algorithm for P(x,x) and P(y,f(y)). If you don't know how the algorithm works, you can get partial credit for giving the result of the algorithm. ------------------------------------------------------------------------------ Problem 5: Resolution without factoring is not complete. Show why, using the following set of clauses: P(x) | Q(y). -P(x) | Q(y). P(x) | -Q(y). -P(x) | -Q(y). ------------------------------------------------------------------------------