Docsity

Propositional Logic: Assignments and Wumpus World, Study notes of Computer Science

Partial preview of the text

Download Propositional Logic: Assignments and Wumpus World and more Study notes Computer Science in PDF only on Docsity!

Propositional Logic

CSCI 5582, Fall 2007

Assignments

  • To read this weekend: Chapter 7, sections 1-
  • For next week:Chapters 8 and 9
  • Hard copy ONLY for in-class students handing in PS1 on Tuesday (and YES, include the program code as well!!)
  • Scheme tutorial this afternoon at 3:30, DLC 170

The Wumpus World

  • A four-by-four grid
  • We start in (1, 1) -- the bottom left
  • A (horrible) pit causes a breeze in nearby cells
  • A (horrible) wumpus causes a stench in nearby cells
  • A (wonderful) pile of gold causes a glitter in its own cell
  • We can move one cell at a time, turn, shoot one arrow (the arrow will continue in a straight line from the cell until it hits either the wumpus or a border). We can sense a breeze or stench in a given cell.
  • Our goal: get the gold. Don’t die.

Propositional Logic: the Basic

Lingo

  • Atomic propositions (P, Q, etc.) with binary truth values
  • Connectives AND, OR, NOT, IMPLIES, XOR, IFF
  • Values of compound sentences are determined as functions of the truth values of individual propositions (truth tables)
  • Rules of inference: Modus Ponens, And- Elimination, various equivalence forms (like De Morgan’s rules)

Recurring Themes in Logic (not just

propositional logic, by the way)

  • Satisfiability
  • Contradiction
  • Tautology
  • Entailment (implication)
  • Equivalence

K E 4 7 If a card has a vowel on one side, then it has an even number on the other side.

A Brief Aside: Illogical Humans?

  • Problems with Modus Ponens and Modus Tollens
  • Problems with syllogisms
  • When are we logical?

A First (Basic) Algorithmic Idea for

Working with Propositional Logic

  • Represent all of our knowledge in one particular standard syntax: conjunctive normal form
  • To show that our knowledge entails a given statement A, show that adding NOT(A) to our knowledge would result in a contradiction: that is, KNOWLEDGE AND NOT(A) is unsatisfiable.
  • Use the resolution rule repeatedly, producing new clauses, until either we arrive at the “empty clause” (FALSE) or until we can produce no more new clauses. In the former case, A is entailed by our knowledge.

Resolution

Just one rule, really: (A OR B) AND (NOT B OR C) --> (A OR C)

Modus Ponens is just resolution

(A --> B) AND A

B

is just an instance of resolution: (NOT A OR B) AND A B