280wk12_x4

280wk12_x4 - Logic Logic is a tool for formalizing...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Logic Logic is a tool for formalizing reasoning. There are lots of diFerent logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and pro- grams) epistemic logic: for reasoning about knowledge The simplest logic (on which all the rest are based) is propositional logic . It is intended to capture features of arguments such as the following: Borogroves are mimsy whenever it is brillig. It is now brillig and this thing is a borogrove. Hence this thing is mimsy. Propositional logic is good for reasoning about conjunction, negation, implication (“if . . . then . . . ”) Amazingly enough, it is also useful for circuit design program veri±cation 1 Propositional Logic: Syntax To formalize the reasoning process, we need to restrict the kinds of things we can say. Propositional logic is particularly restrictive. The syntax of propositional logic tells us what are legit- imate formulas. We start with primitive propositions . Think of these as statements like It is now brillig This thing is mimsy It’s raining in San ²rancisco n is even We can then form more complicated compound proposi- tions using connectives like: • ¬ : not • ∧ : and • ∨ : or • ⇒ : implies • ⇔ : equivalent (if and only if) 2 Examples: • ¬ P : it is not the case that P P Q : P and Q P Q : P or Q P Q : P implies Q (if P then Q ) Typical formula: P ( ¬ P ( Q ( R P ))) 3 Wfs ²ormally, we de±ne well-formed formulas ( wFs or just formulas ) inductively (remember Chapter 2!): The wFs consist of the least set of strings such that: 1. Every primitive proposition P, Q, R, . . . is a wF 2. If A is a wF, so is ¬ A 3. If A and B are wFs, so are A B , A B , A B , and A B 4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Disambiguating Wfs We use parentheses to disambiguate wfs: P Q R can be either ( P Q ) R or P ( Q R ) Mathematicians are lazy, so there are standard rules to avoid putting in parentheses. In arithmetic expressions, × binds more tightly than +, so 3 + 2 × 5 means 3 + (2 × 5) In wfs, here is the precedence order: ◦ ¬ ◦ ∧ ◦ ∨ ◦ ⇒ ◦ ⇔ Thus, P Q R is P ( Q R ); P ∨ ¬ Q R is P (( ¬ Q ) R ) P ∨ ¬ Q R is ( P ( ¬ Q )) R With two or more instances oF the same binary con- nective, evaluate leFt to right: P Q R is ( P Q ) R 5 Translating English to Wfs To analyze reasoning, we have to be able to translate English to wfs. Consider the Following sentences: 1. Bob doesn’t love Alice 2. Bob loves Alice and loves Ann 3. Bob loves Alice or Ann 4. Bob loves Alice but doesn’t love Ann 5. IF Bob loves Alice then he doesn’t love Ann ±irst ²nd appropriate primitive propositions: P : Bob loves Alice Q : Bob loves Ann Then translate: 1. ¬ P 2. P Q 3. P Q 4. P ∧ ¬ Q (note: “but” becomes “and”) 5. P ⇒ ¬ Q 6 Evaluating Formulas Given a Formula, we want to decide iF it is true or False.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/21/2009 for the course CS 2800 taught by Professor Selman during the Spring '07 term at Cornell.

Page1 / 8

280wk12_x4 - Logic Logic is a tool for formalizing...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online