2 Assignment 5. Due Date: 02/28/111. Consider axioms from Assignment 4. Prove that John likes peanuts using resolution.2. Consider the following facts: • The members of the Elm St. Bridge Club are Joe, Sally, Bill, and Ellen. • Joe is married to Sally. • Bill is Ellen’s brother. • The spouse of every married person in the club is also in the club. • The last meeting of the club was at Joe’s house. (a) Represent these facts in the predicate logic. (b) From the facts given above, most people would be able to decide on the truth of the following additional statements: • The last meeting of the club was at Sally’s house. • Ellen is not married. Can you construct resolution proofs to demonstrate the truth of each of these statements given the five listed above? Do so if possible. Otherwise, add the facts you need and then construct the proofs.3. Assume the following facts: • Steve only likes easy courses. • Science courses are hard. • All the courses in the basketweaving department are easy. • BK 301 is a basketweaving course. Use resolution to answer the question, “What course would Steve like?” (read pp. 160-164 of the handout)
3 Conversion to Clause Form:All Romans who know Marcus either hate Caesar orthink that anyone who hates anyone is crazy.Problem:∀x: [Roman(x) ∧ know(x, Marcus)] →[hate(x, Caesar) ∨ (∀y: ∃z: hate(y, z) → thinkcrazy(x, y))]Solution: • Flatten • Separate out quantifiersConjunctive Normal Form: ¬Roman(x) ∨ ¬know(x, Marcus) ∨ hate(x, Caesar) ∨ ¬hate(y, z) ∨ thinkcrazy(x,z)Clause Form: • Conjunctive normal form • No instances of ∧
4 Algorithm: Convert to Clause Form1. Eliminate →, using: a → b = ¬a ∨ b.2. Reduce the scope of each ¬ to a single term, using: • ¬(¬p) = p • de Morgan’s laws: ¬(a ∧ b) = ¬a ∨ ¬b ¬(a ∨ b) = ¬a ∧ ¬b • ¬∀x: P(x) = ∃x: ¬P(x) • ¬∃x: P(x) = ∀x: ¬P(x)3. Standardize variables: ∀x: P(x) ∨ ∀x: Q(x) should be replaced with ∀x: P(x) ∨ ∀y: Q(y) (y is a unique variable)4. Move all quantifiers to the left of the formula without changing their relative order.5. Eliminate existential quantifiers by inserting Skolem functions.6. Drop the prefix.7. Convert the matrix into a conjunction of disjuncts, using associativity and distributivity.8. Create a separate clause for each conjunct. Standardize apart the variables in the set of clauses generated in step 8, using the fact that (∀x: P(x) ∧ Q(x)) = ∀x: P(x) ∧ ∀x: Q(x), thus we have two clauses P(x) Q(y)
6 Examples of Conversion to Clause Form5. Eliminate existential quantifiers. ∃y: President(y) will be converted toPresident(S1) while ∀x: ∃y: father-of(y, x) will be converted to ∀x: father-of(S2(x), x))6. Drop the prefix [¬Roman(x) ∨ ¬know(x, Marcus)] ∨ [hate(x, Caesar) ∨ (¬hate(y, z) ∨ thinkcrazy(x, y))]7. Convert to a conjunction of disjuncts. ¬Roman(x) ∨ ¬know(x, Marcus) ∨ hate(x, Caesar) ∨ ¬hate(y, z) ∨ thinkcrazy(x, y)
7 Examples of Conversion to Clause FormDistribution Law(a ∧ b) ∨ c = (a ∨ c) ∧ (b ∨ c)The formula (winter ∧ wearingboots) ∨ (summer ∧ wearingsandals)becomes [winter ∨ (summer ∧ wearingsandals)] ∧ [wearingboots ∨ (summer ∧ wearingsandals)]and then becomes (winter ∨ summer) ∧ (winter ∨ wearingsandals) ∧ (wearingboots ∨ summer) ∧ (wearingboots ∨ wearingsandals)and finally (winter ∨ summer) (winter ∨ wearingsandals) (wearingboots ∨ summer) (wearingboots ∨ wearingsandals)
10 The Basis of ResolutionGiven: winter ∨ summer ¬winter ∨ coldWe can conclude: summer ∨ coldTwo clauses winter and ¬winter produce the empty clause.
11 Algorithm: Propositional Resolution1. Convert all the propositions of F to clause form.2. Negate P and convert the result to clause form. Add it to the set of clauses obtained in step 1.3. Repeat until either a contradiction is found or no progress can be made: (a) Select two clauses. Call these the parent clauses. (b) Resolve them together. The resolvent will be the disjunction of all the literals of both of the parent clauses with the following exception: If there are any pairs of literals L and ¬L such that one of the parent clauses contains L and the other contains ¬L. then select one such pair and eliminate both L and ¬L from the resolvent.(c) If the resolvent is the empty clause, then a contradiction has been found. If it is not, then add it to the set of clauses available to the procedure.
12 Propositional ResolutionWe want to prove R.Given Axioms Clause FormP P (1)(P ∧ Q) → R ¬P ∨ ¬Q ∨ R (2)(S ∨ T) → Q ¬S ∨ Q (3) ¬T ∨ Q (4)T T (5)¬P ∨ ¬Q ∨ R ¬R ¬P∨ ¬Q P ¬T ∨ Q ¬Q ¬T T
13 Herbrand’s Theorem• To show that a set of clauses S is unsatisfiable, it is necessary to consider only interpretations over a particular set, called the Herbrand universe of S.• A set of clauses S is unsatisfiable if and only if a finite subset of ground instances (in which all bound variables have had a value substituted for them) of S is unsatisfiable.