Propositional Logic In this lecture we solve a

  • Slides: 17
Download presentation
Propositional Logic In this lecture we solve a standard propositional problem of circuit equivalence

Propositional Logic In this lecture we solve a standard propositional problem of circuit equivalence and a puzzle about common knowledge. Problems and puzzles crystallize larger issues, eg. , consistency and co-ordination Informatics 1 School of Informatics, University of Edinburgh 1

Problem: Logic Circuits i 1 not or i 2 o 1 Are these two

Problem: Logic Circuits i 1 not or i 2 o 1 Are these two circuits equivalent ? and i 1 i 2 not o 1 not Informatics 1 School of Informatics, University of Edinburgh 2

Problem: Common Knowledge A husband unfaithful to his wife will be shot by her

Problem: Common Knowledge A husband unfaithful to his wife will be shot by her on the day she finds out. Day 1: Three wives are told that at least one of their husbands is unfaithful. None knows whether husband is unfaithful but each knows about the others. Day 2: The three wives meet again and learn that no husband has been shot. Day 3: The three wives meet again and learn that no husband has been shot. That night there is shooting. How many husbands were unfaithful ? Informatics 1 School of Informatics, University of Edinburgh 3

Truth Tables P Q not(P) P and Q P or Q P Q t

Truth Tables P Q not(P) P and Q P or Q P Q t t f t t t f f f t t Informatics 1 School of Informatics, University of Edinburgh 4

Inconsistencies P and not(P) t t P and not(P) f f t f f

Inconsistencies P and not(P) t t P and not(P) f f t f f f Informatics 1 School of Informatics, University of Edinburgh 5

Contingencies (P or Q) P t t t (P or Q) P f t

Contingencies (P or Q) P t t t (P or Q) P f t t t (P or Q) P t f f f t f t Informatics 1 School of Informatics, University of Edinburgh 6

Tautologies P and (P Q) Q t t P and (P Q) Q t

Tautologies P and (P Q) Q t t P and (P Q) Q t f t t f f t t P and (P Q) Q f t f t f t t Informatics 1 School of Informatics, University of Edinburgh 7

Clicker Question 1 Which of the following is a contingency? (a) P P (b)

Clicker Question 1 Which of the following is a contingency? (a) P P (b) Q or (not(Q) (c) P Q (d) (P and Q) and (not(Q)) Informatics 1 School of Informatics, University of Edinburgh 8

Solution: Logic Circuits (1) i 1 not or i 2 not(i 1) or i

Solution: Logic Circuits (1) i 1 not or i 2 not(i 1) or i 2 o 1 equivalent ? and i 1 i 2 equivalent ? not o 1 not(i 1 and not(i 2)) Informatics 1 School of Informatics, University of Edinburgh 9

Solution: Logic Circuits (2) i 1 i 2 not(i 1) not(i 2) not(i 1)

Solution: Logic Circuits (2) i 1 i 2 not(i 1) not(i 2) not(i 1) or i 2 i 1 and not(i 2) not(i 1 and not(i 2)) t t f f t f t f f t t t f t Informatics 1 School of Informatics, University of Edinburgh 10

Solution: Logic Circuits (2) not(i 1) or i 2 equivalent not(i 1 and not(i

Solution: Logic Circuits (2) not(i 1) or i 2 equivalent not(i 1 and not(i 2)) i 2 equivalent not(i 2)) not(i 1) or not(i 2)) equivalent not(i 1 and not(i 2)) not(i 2) in both sides (call it B) not(i 1) or not(B) equivalent not(i 1 and B) Here we are performing a proof using equivalences Informatics 1 School of Informatics, University of Edinburgh 11

Problem: Common Knowledge A husband unfaithful to his wife will be shot by her

Problem: Common Knowledge A husband unfaithful to his wife will be shot by her on the day she finds out. Day 1: Three wives are told that at least one of their husbands is unfaithful. None knows whether husband is unfaithful but each knows about the others. Day 2: The three wives meet again and learn that no husband has been shot. Day 3: The three wives meet again and learn that no husband has been shot. That night there is shooting. How many husbands were unfaithful ? Informatics 1 School of Informatics, University of Edinburgh 12

Solution: Common Knowledge cheat 1 cheat 2 cheat 3 t t f f t

Solution: Common Knowledge cheat 1 cheat 2 cheat 3 t t f f t f t f BANG! X – day 3 X – day 2 X – day 1 (See notes for full truth table) Informatics 1 School of Informatics, University of Edinburgh 13

Clicker Question 2 Same setting as before, but now 5 wives are told about

Clicker Question 2 Same setting as before, but now 5 wives are told about infidelity on Day 1. And there is shooting at the end of Day 1! How many straying husbands? (a) 1 (b) 2 (c) 4 (d) 5 Informatics 1 School of Informatics, University of Edinburgh 14

Real Common Knowledge Process Process Process Informatics 1 School of Informatics, University of Edinburgh

Real Common Knowledge Process Process Process Informatics 1 School of Informatics, University of Edinburgh 15

Things to Practice Writing English statements in propositional logic (exercises in tutorials). Being able

Things to Practice Writing English statements in propositional logic (exercises in tutorials). Being able to work out the truth of any propositional expression using truth tables (exercises in tutorials). Understanding why some expressions are equivalent (see equivalences in notes). Informatics 1 School of Informatics, University of Edinburgh 16

Recreational Reading Raymond Smullyan, “What is the Name of This Book? The Riddle of

Recreational Reading Raymond Smullyan, “What is the Name of This Book? The Riddle of Dracula and Other Logical Puzzles” & “Alice in Puzzle-Land” Informatics 1 School of Informatics, University of Edinburgh 17