ECE 4524 Artificial Intelligence and Engineering Applications Lecture 10: Theorem Proving in Propositional Logic Reading: AIAMA 7.5 Today’s Schedule: ◮ Inference and Proofs ◮ Conjunctive Normal Form ◮ Resolution ◮ Forward and Backward Chaining
Review of Propositional Logic ◮ Atomic Sentences ◮ Propositional Symbol ◮ Complex Sentences ◮ Literals and Logical Connectives ◮ Negation ◮ Conjunction ◮ Disjunction ◮ Implication, has two parts, the Premise and Conclusion ◮ Rules (if-then) and Biconditionals (iff) ◮ Truth Tables
Warmup #1 Express the English Sentence ”There are dark clouds and the predicted weather is for rain so I will take my umbrella.” as a Sentence in Propositional Logic
Theorem Proving ◮ Theorem Proving ◮ Tautologies and Contradictions ◮ Satisfiability and SAT Problem ◮ Inference Rules and Proofs ◮ Modus Ponens and Modus Tolens ◮ Resolution ◮ Montonicity
Warmup #2 What aspect of proposition logic allows us to do proofs without resorting to truth tables? ◮ Completeness of inference rule ◮ Entailment between sentences ◮ Soundness of inference rule ◮ Sentence validity
Resolution ◮ Resolution allows ”cancellation” of terms when there is a contradiction. For example, suppose we have the KB A ∧ ( ¬ A ∨ B ) ⇔ ( A ∧ ¬ A ) ∨ ( A ∧ B ) (1) Since A cannot be both true and false there is a contradiction so we remove those terms to give just the KB B . ◮ To prove a sentence, say B , we add its negation to the KB, then apply resolution until there are no more terms in the KB (B is true) or no more resolutions are possible (B cannot be proven). ◮ Resolution requires putting all sentence in a particular form, called Conjunctive Normal form (CNF) ◮ A KB in CNF is a conjunction of disjunction of positive or negated literals
CNF Conversion The procedure: ◮ eliminate ⇐ ⇒ ◮ eliminate = ⇒ ◮ use De Morgan’s to move ¬ into literals ◮ distribute conjunction over disjunction Example: Convert the following propositional expressions to CNF: ( A ∨ B ) → ( C → D )
Exercise: CNF Conversion Convert the following propositional expressions to CNF: ( ¬ A ∧ ¬ B ) → ( ¬ ( C ∧ ( ¬ D → E )))
Warmup #3 Using the following knowledge base, prove using resolution that B is true KB = ( A → B ) ∧ ( A )
Exercise Given the following knowledge base, prove T or show T cannot be proven using resolution as the inference rule. ( P ∧ Q → R ) ∧ ( R ∧ S → T ) ∧ ( T ∧ U ∧ V → W ) ∧ ( X ∧ Y → Z ) ∧ ( P ) ∧ ( X ) ∧ ( Y ) ∧ ( Z )
Algorithm: PL-RESOLUTION
Some comments on Resolution ◮ Resolution is complete. ◮ Unfortunately it has exponential complexity as a function of the knowledge base size (NP-Hard). ◮ Fortunately though, in some (still useful) cases full resolution is not needed ...
Horn Clauses If we can restrict the form of sentences to Horn Clauses we can get complexity linear in the size of the KB. ◮ A Horn Clause is a disjunction of literals of which at most one is positive. ◮ These sentences generally look like ( S 1 ∧ S 2 ∧ · · · ∧ S l ) = ⇒ S ◮ After CNF conversion ¬ S 1 ∨ ¬ S 2 ∨ · · · ∨ ¬ S l ∨ S
Possible usage of Resolution with Horn Clauses Recall inference can be used in two ways: ◮ During tell, where the goal is to infer new sentences based on the new information until the fixed point is reached ◮ During ask, where the goal is to infer a particular sentence With the restriction to Horn Clauses, these leads to two different algorithms that fit these tasks ◮ During tell, Forward Chaining (Data-Driven Reasoning) ◮ During ask, Backward Chaining (Goal-Driven Reasoning)
Algorithm: Forward Chaining
Next Actions ◮ Reading on First-Order Logic (Predicate Calculus), AIAMA 8.1-8.3 ◮ Take warmup before noon on Thursday 2/22. Reminders: ◮ Quiz 1 is Tuesday!
Recommend
More recommend