210 likes | 593 Views
Represent the following sentences in predicate logic. Schafer is a Hoosier Hoosiers like basketball. Children of basketball fans are basketball fans. Basketball fans like the month of March. Margaret is Schafer's daughter. Consider the following.
E N D
Represent the following sentences in predicate logic • Schafer is a Hoosier • Hoosiers like basketball. • Children of basketball fans are basketball fans. • Basketball fans like the month of March. • Margaret is Schafer's daughter
Consider the following Using rules of inference, what can you add to this knowledge base?
Rules of Inference • Modus Ponens p ^ (p -> q) -> q • In other words, if you have an implication rule in the knowledge base AND the left hand side of the implication rule (the antecedent) then you can infer the right hand side of the rule (the consequent)
Rules of Inference • Modus Ponens p ^ (p -> q) -> q p = Today is my birthday q = I get presents p -> q (“if today is my birthday than I will get presents”) Suppose that a knowledge base contains that statement PLUS the knowledge that today is my birthday. We can infer that I will get presents.
Rules of Inference • Modus Tolens q’ ^ (p -> q) -> p’ • In other words, if you have an implication rule in the knowledge base AND the negation of the consequent than you can imply the negation of the antecedent
Rules of Inference • Modus Tolens q’ ^ (p -> q) -> p’ p = Today is my birthday q = I get presents p -> q (“if today is my birthday than I will get presents”) Suppose that a knowledge base contains that statement PLUS the knowledge that I will not get presents today. We can infer that today must not be my birthday.
CAUTION • Do not try to use either p’ ^ (p -> q) -> q’ (If today is not my birthday than I can infer that I won’t get presents??? Not true!) q ^ (p -> q) -> p (If I get presents today it must be my birthday)
5.3.1 Unification in the Predicate Logic • Unification – matching procedure used to find contradictions in predicate logic • Compares two literals to detect whether there exists a set of substitutions that makes them identical • In order to unify, the predicate symbols must match • Kite_is_flying(X) and • Trying_to_fly_Kite(Y) cannot be unified
Unification / cont. • Example 5.4 • Coffees (x,x) Coffees (y,z) • After substituting y for x for each occurrence of x (written as y | x) and z for y we get • Coffees(y,z) Coffees(y,z) • Note: arguments are checked one pair at a time and each substitution must be applied to the rest of the literals before continuing with unification
5.3.2 Resolution in Predicate Logic • Resolution refutation proofs involve the following steps: • Put premises into clause form • Add the negation of what is to be proved, in clause form, to the set of premises • Resolve these clauses together, producing new clauses that logically follow from them • Produce a contradiction by generating what is referred to as the empty clause • The substitutions used to produce the empty clause are precisely those under which the opposite of the negated goal is true
Example of Resolution in Predicate Logic • Example 5.6 1) All great chefs are Italian. 2) All Italians enjoy good food. 3) Either Michael or Louis is a great chef. 4) Michael is not a great chef. 5) Therefore, Louis enjoys good food.
Example of Resolution in Predicate Logic / cont. • We use the following predicates: • GC(x) : x is a great chef • I(x) : x is Italian • EF(x) : x enjoys good food 1) (∀x)(GC(x) ⇒ I(x)) 2) (∀x)(I(x) ⇒ EF(x)) 3) GC(Michael) \/ GC(Louis) 4) ~GC(Michael) Therefore: 5) EF(Louis)
Example of Resolution in Predicate Logic / cont. • Convert the premises into clause form where no quantifiers can be present: 1) ~GC(x) \/ I(x) 2) ~I(y) \/ EF(y) 3) GC(Michael) \/ GC(Louis) 4) ~GC(Michael) Negate the conclusion: 5) ~EF(Louis) //already in clause form
Example of Resolution in Predicate Logic /cont. • The search for a contradiction can be shown in graphical form (substitutions made are shown on the branches):
Prove the following using Resolution (8h) • The price of oil will continue to rise. • If the price of oil continues to rise then the value of the dollar will fall. • If the value of the dollar falls then Americans will travel less. • If Americans travel less than airlines will lose money. • Therefore: Airlines will lose money.
Prove the following using Resolution (13) • All Italian Mothers can Cook • All cooks are healthy. • Either Connie or Jing Jing is an Italian Mother • Jing Jing is not an Italian Mother • Therefore: Connie is Healthy.