CS 730/830: Intro AI Propositional Logic First-Order Logic 1 - - PowerPoint PPT Presentation

cs 730 830 intro ai
SMART_READER_LITE
LIVE PREVIEW

CS 730/830: Intro AI Propositional Logic First-Order Logic 1 - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

CS 730/830: Intro AI

Propositional Logic First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 1 / 15

1 handout: slides

slide-2
SLIDE 2

Propositional Logic

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 2 / 15

slide-3
SLIDE 3

Logic

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 3 / 15

A logic is a formal system:

syntax: defines sentences

semantics: relation to world

inference rules: reaching new conclusions three layers: proof, models, reality soundness, completeness flexible, general, principled (Advice Taker, 1958)

slide-4
SLIDE 4

Propositional Reasoning

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 4 / 15

computing entailment soundness, completeness α | = β iff α ∧ ¬β is unsatisfiable determining satisfiability is NP-complete [ NP-hard = polytime to verify certificate of ‘yes’ ] 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

slide-5
SLIDE 5

Reasoning Methods

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 5 / 15

variable elimination: Davis-Logemann-Loveland exhaustively branch on variable assignments

model finding: WalkSAT fix assignment until satisfying

modus ponens, resolution: resolution refutation theorem proving derive new clauses until query is proved

slide-6
SLIDE 6

An Example of Propositional Reasoning

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 6 / 15

If the unicorn is mythical, then it is immortal, but if it is not mythical, then it is a mortal mammal. If the unicorn is either immortal or a mammal, then it is horned. The unicorn is magical if it is horned. Prove: the unicorn is magical.

slide-7
SLIDE 7

Resolution Refutation Proofs

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15

Given KB, is α entailed?

slide-8
SLIDE 8

Resolution Refutation Proofs

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15

Given KB, is α entailed? (Is it true in all models of the KB?)

slide-9
SLIDE 9

Resolution Refutation Proofs

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15

Given KB, is α entailed? (Is it true in all models of the KB?) Is KB ∧¬α unsatisfiable?

slide-10
SLIDE 10

Resolution Refutation Proofs

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 7 / 15

Given KB, is α entailed? (Is it true in all models of the KB?) Is KB ∧¬α unsatisfiable? Resolution is refutation complete.

slide-11
SLIDE 11

Conversion to Conjunctive Normal Form

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 8 / 15

Syntax: ∧, ∨, ¬, → (⊃, ⇒), ↔ 1. eliminate ↔ 2. eliminate → 3. move ¬ inward: ¬¬x, ¬(x ∧ y), , ¬(x ∨ y) 4. distribute ∨: x ∨ (y ∧ z)

slide-12
SLIDE 12

Break

Propositional Logic ■ Logic ■ Reasoning ■ Methods ■ Example ■ Refutation ■ CNF ■ Break First-Order Logic

Wheeler Ruml (UNH) Lecture 11, CS 730 – 9 / 15

asst 5

projects: go around on Thursday

slide-13
SLIDE 13

First-Order Logic

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 10 / 15

slide-14
SLIDE 14

First-Order Logic

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 11 / 15

Gottlob Frege (1848-1925) PhD at 25 Begriffsschrift, 1879 (concept script) ”a formula language, modelled on that of arithmetic, of pure thought.”

slide-15
SLIDE 15

First-Order Logic

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 12 / 15

∀person ItIsRaining() → IsWet(person) 1. Things:

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...

slide-16
SLIDE 16

First-Order Logic

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 13 / 15

1. constants: objects 2. predicates: relations between objects 3. variables 4. quantifiers 5. functions 6. connectives

slide-17
SLIDE 17

More First-Order Logic

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 14 / 15

∀person ∀time (ItIsRaining(time)∧ ¬∃umbrella Holding(person, umbrella, time)) → 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.

slide-18
SLIDE 18

EOLQs

Propositional Logic First-Order Logic ■ First-Order Logic ■ EOLQs

Wheeler Ruml (UNH) Lecture 11, CS 730 – 15 / 15

Please write down the most pressing question you have about the course material covered so far and put it in the box on your way out. Thanks!