Propositional logic

rushdishams 8,781 views 26 slides Sep 30, 2013
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

No description available for this slideshow.


Slide Content

Rushdi Shams, Dept of CSE, KUET, Bangladesh 1 Knowledge Representation Propositional Logic Artificial Intelligence Version 2.0 There are 10 types of people in this world- who understand binary and who do not understand binary

Rushdi Shams, Dept of CSE, KUET, Bangladesh 2 Propositional Logic

Rushdi Shams, Dept of CSE, KUET, Bangladesh 3 Introduction Need formal notation to represent knowledge, allowing automated inference and problem solving. One popular choice is use of logic. Propositional logic is the simplest. Symbols represent facts: P, Q, etc.. These are joined by logical connectives (and, or, implication) e.g., P Λ Q; Q  R Given some statements in the logic we can deduce new facts (e.g., from above deduce R)

Rushdi Shams, Dept of CSE, KUET, Bangladesh 4 Syntactic Properties of Propositional Logic If S is a sentence,  S is a sentence ( negation ) If S 1 and S 2 are sentences, S 1  S 2 is a sentence ( conjunction ) If S 1 and S 2 are sentences, S 1  S 2 is a sentence ( disjunction ) If S 1 and S 2 are sentences, S 1  S 2 is a sentence ( implication ) If S 1 and S 2 are sentences, S 1  S 2 is a sentence ( bi-conditional )

Rushdi Shams, Dept of CSE, KUET, Bangladesh 5 Semantic Properties of Propositional Logic  S is true iff S is false S 1  S 2 is true iff S 1 is true and S 2 is true S 1  S 2 is true iff S 1 is true or S 2 is true S 1  S 2 is true iff S 1 is false or S 2 is true i.e., is false iff S 1 is true and S 2 is false S 1  S 2 is true iff S 1  S 2 is true and S 2  S 1 is true

Rushdi Shams, Dept of CSE, KUET, Bangladesh 6 Truth Table for Connectives

Rushdi Shams, Dept of CSE, KUET, Bangladesh 7 Model of a Formula If the value of the formula X holds 1 for the assignment A, then the assignment A is called model for formula X. That means, all assignments for which the formula X is true are models of it.

Rushdi Shams, Dept of CSE, KUET, Bangladesh 8 Model of a Formula

Rushdi Shams, Dept of CSE, KUET, Bangladesh 9 Model of a Formula: Can you do it?

Rushdi Shams, Dept of CSE, KUET, Bangladesh 10 Satisfiable Formulas If there exist at least one model of a formula then the formula is called satisfiable. The value of the formula is true for at least one assignment. It plays no rule how many models the formula has.

Rushdi Shams, Dept of CSE, KUET, Bangladesh 11 Satisfiable Formulas

Rushdi Shams, Dept of CSE, KUET, Bangladesh 12 Valid Formulas A formula is called valid (or tautology) if all assignments are models of this formula. The value of the formula is true for all assignments. If a tautology is part of a more complex formula then you could replace it by the value 1.

Rushdi Shams, Dept of CSE, KUET, Bangladesh 13 Valid Formulas

Rushdi Shams, Dept of CSE, KUET, Bangladesh 14 Unsatisfiable Formulas A formula is unsatisfiable if none of its assignment is true in no models

Rushdi Shams, Dept of CSE, KUET, Bangladesh 15 Logical equivalence Two sentences are logically equivalent iff true in same models: α ≡ ß iff α╞ β and β ╞ α

Rushdi Shams, Dept of CSE, KUET, Bangladesh 16 Deduction: Rule of Inference 1. Either cat fur was found at the scene of the crime, or dog fur was found at the scene of the crime.  (Premise) C   v   D

Rushdi Shams, Dept of CSE, KUET, Bangladesh 17 Deduction: Rule of Inference 2. If dog fur was found at the scene of the crime, then officer Thompson had an allergy attack.  (Premise) D → A

Rushdi Shams, Dept of CSE, KUET, Bangladesh 18 Deduction: Rule of Inference 3. If cat fur was found at the scene of the crime, then Macavity is responsible for the crime.  (Premise) C → M

Rushdi Shams, Dept of CSE, KUET, Bangladesh 19 Deduction: Rule of Inference 4. Officer Thompson did not have an allergy attack.  (Premise) ¬ A

Rushdi Shams, Dept of CSE, KUET, Bangladesh 20 Deduction: Rule of Inference 5. Dog fur was not found at the scene of the crime.  (Follows from 2 D → A and 4. ¬ A ). When is ¬ A true? When A is false- right? Now, take a look at the implication truth table. Find what is the value of D when A is false and D → A is true ¬ D

Rushdi Shams, Dept of CSE, KUET, Bangladesh 21 Rules for Inference: Modus Tollens If given α → β and we know ¬β        Then ¬α

Rushdi Shams, Dept of CSE, KUET, Bangladesh 22 Deduction: Rule of Inference 6. Cat fur was found at the scene of the crime.  (Follows from 1 C   v   D and 5 ¬ D ). When is ¬ D true? When D is false- right? Now, take a look at the OR truth table. Find what is the value of C when D is false and C V D is true C

Rushdi Shams, Dept of CSE, KUET, Bangladesh 23 Rules for Inference: Disjunctive Syllogism If given α v β and we know ¬α        then β If given α v β and we know ¬β        then α

Rushdi Shams, Dept of CSE, KUET, Bangladesh 24 Deduction: Rule of Inference 7. Macavity is responsible for the crime.  (Conclusion. Follows from 3 C → M and 6 C ). When is C → M true given that C is true? Take a look at the Implication truth table. M

Rushdi Shams, Dept of CSE, KUET, Bangladesh 25 Rules for Inference: Modus Ponens If given α → β and we know α          Then β

Rushdi Shams, Dept of CSE, KUET, Bangladesh 26 References Artificial Intelligence: A Modern Approach (2 nd Edition) by Russell and Norvig Chapter 7 http://www.iep.utm.edu/p/prop-log.htm#H5