CS 730/830: Intro AI Propositional Logic First-Order Logic 1 handout: slides Wheeler Ruml (UNH) Lecture 11, CS 730 – 1 / 15
Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic Propositional Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 2 / 15
Logic A logic is a formal system: Propositional Logic ■ Logic syntax: defines sentences ■ ■ Reasoning ■ Methods semantics: relation to world ■ ■ Example inference rules: reaching new conclusions ■ ■ Refutation ■ CNF three layers: proof, models, reality ■ Break First-Order Logic soundness, completeness flexible, general, principled (Advice Taker, 1958) Wheeler Ruml (UNH) Lecture 11, CS 730 – 3 / 15
Propositional Reasoning computing entailment Propositional Logic soundness, completeness ■ Logic ■ Reasoning ■ Methods ■ Example α | = β iff α ∧ ¬ β is unsatisfiable ■ Refutation determining satisfiability is NP-complete ■ CNF ■ Break [ NP-hard = polytime to verify certificate of ‘yes’ ] First-Order Logic therefore, verification that β is not entailed is polytime said another way: α | = β iff α → β is valid determining validity/tautology is co-NP-complete [ co-NP-hard = polytime to verify certificate of ‘no’ ] therefore, verification that β is not entailed is polytime Wheeler Ruml (UNH) Lecture 11, CS 730 – 4 / 15
Reasoning Methods variable elimination: Davis-Logemann-Loveland ■ Propositional Logic exhaustively branch on variable assignments ■ Logic ■ Reasoning ■ Methods ■ Example model finding: WalkSAT ■ ■ Refutation fix assignment until satisfying ■ CNF ■ Break First-Order Logic modus ponens, resolution: resolution refutation theorem ■ proving derive new clauses until query is proved Wheeler Ruml (UNH) Lecture 11, CS 730 – 5 / 15
An Example of Propositional Reasoning If the unicorn is mythical, then it is immortal, but if it is not Propositional Logic mythical, then it is a mortal mammal. If the unicorn is either ■ Logic ■ Reasoning immortal or a mammal, then it is horned. The unicorn is magical ■ Methods ■ Example if it is horned. ■ Refutation ■ CNF Prove: the unicorn is magical. ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 6 / 15
Resolution Refutation Proofs Given KB, is α entailed? Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15
Resolution Refutation Proofs Given KB, is α entailed? Propositional Logic (Is it true in all models of the KB?) ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15
Resolution Refutation Proofs Given KB, is α entailed? Propositional Logic (Is it true in all models of the KB?) ■ Logic ■ Reasoning Is KB ∧¬ α unsatisfiable? ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15
Resolution Refutation Proofs Given KB, is α entailed? Propositional Logic (Is it true in all models of the KB?) ■ Logic ■ Reasoning Is KB ∧¬ α unsatisfiable? ■ Methods ■ Example ■ Refutation Resolution is refutation complete. ■ CNF ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15
Conversion to Conjunctive Normal Form Syntax: ∧ , ∨ , ¬ , → ( ⊃ , ⇒ ) , ↔ Propositional Logic ■ Logic 1. eliminate ↔ ■ Reasoning ■ Methods 2. eliminate → ■ Example ■ Refutation 3. move ¬ inward: ¬¬ x , ¬ ( x ∧ y ) , , ¬ ( x ∨ y ) ■ CNF 4. distribute ∨ : x ∨ ( y ∧ z ) ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 8 / 15
Break asst 5 ■ Propositional Logic projects: go around on Thursday ■ Logic ■ ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 9 / 15
Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs First-Order Logic Wheeler Ruml (UNH) Lecture 11, CS 730 – 10 / 15
First-Order Logic Gottlob Frege (1848-1925) Propositional Logic PhD at 25 First-Order Logic ■ First-Order Logic Begriffsschrift, 1879 (concept script) ■ EOLQs ”a formula language, modelled on that of arithmetic, of pure thought.” Wheeler Ruml (UNH) Lecture 11, CS 730 – 11 / 15
First-Order Logic ∀ person ItIsRaining () → IsWet ( person ) Propositional Logic First-Order Logic ■ First-Order Logic 1. Things: ■ EOLQs constants: John , Chair23 ■ functions (thing → thing): MotherOf(John) , SumOf(1,2) ■ 2. Relations: predicates (objects → T/F): IsWet(John) , ■ IsSittingOn(MotherOf(John),Chair23) 3. Complex sentences: connectives: IsWet(John) ∨ ■ IsSittingOn(MotherOf(John),Chair23) quantifiers and variables: ∀ personIsWet ( person ) ... , ■ ∃ person ... Wheeler Ruml (UNH) Lecture 11, CS 730 – 12 / 15
First-Order Logic 1. constants: objects Propositional Logic 2. predicates: relations between objects First-Order Logic ■ First-Order Logic 3. variables ■ EOLQs 4. quantifiers 5. functions 6. connectives Wheeler Ruml (UNH) Lecture 11, CS 730 – 13 / 15
More First-Order Logic Propositional Logic ∀ person ∀ time ( ItIsRaining ( time ) ∧ First-Order Logic ■ First-Order Logic ¬∃ umbrella Holding ( person , umbrella , time )) → ■ EOLQs IsWet ( person , time ) John loves Mary. All crows are black. Dolphin are mammals that live in the water. Everyone loves someone. Mary likes the color of one of John’s ties. I can’t hold more than one thing at a time. Wheeler Ruml (UNH) Lecture 11, CS 730 – 14 / 15
EOLQs Please write down the most pressing question you have about Propositional Logic the course material covered so far and put it in the box on your First-Order Logic ■ First-Order Logic way out. ■ EOLQs Thanks! Wheeler Ruml (UNH) Lecture 11, CS 730 – 15 / 15
Recommend
More recommend