Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.

Similar presentations


Presentation on theme: "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."— Presentation transcript:

1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.

2 Propositional Logic CSE2303 Formal Methods I Lecture 18

3 Overview Outline of the rest of the lectures Propositions Connectives Tautologies Arguments Representing Knowledge

4 Outline Knowledge Representation –Propositional Logic –Predicate Calculus Prolog Resolution

5 Definition A proposition is A statement which is Either true or false.

6 Examples 2 + 2 = 4 –Is a proposition which true. The moon is made of cheese –Is a proposition which is false. It will rain tomorrow –Is a proposition. This statement is false –Is not a proposition. Vote for Mickey Mouse –Is not a proposition.

7 Negation P : I have three children. ¬P : I do not have three children. Other Notation: ~P

8 Connectives And  (&) Or  Implies  (  ) Equivalence  (  )

9 Conjunction P : This subject is boring. Q : I am tired. P  Q : –This subject is boring and I am tired. –This subject is boring although I am tired. –This subject is boring but I am tired.

10 Disjunction P : Sue is a football player. Q: Bob is lazy. P  Q: Sue is a football player or Bob is lazy. Note: Disjunction is inclusive.

11 Conditional P: It is Tuesday. Q: We are in Belgium. P  Q: –If it is Tuesday then we are in Belgium. –It’s being Tuesday implies we are in Belgium. –It’s Tuesday only if we are in Belgium. –It’s being Tuesday is sufficient for us to be in Belgium.

12 Conditional Table P: It will rain tomorrow. Q: I will wear a raincoat tomorrow. P  Q: If it rains tomorrow then I will wear a raincoat.

13 Biconditional P : The world will blow up. Q : CHAOS rules the world. P  Q : –The world will blow up if and only if CHAOS rules the world. –CHAOS ruling the world is a necessary and sufficient condition that the world will blow up.

14 Biconditional Table P: It will rain tomorrow. Q: I will wear a raincoat tomorrow. P  Q: I will wear a raincoat tomorrow if and only if it rains.

15 Interpretation The truth table for a statement provides a record for all possible interpretations of that statement. Example: S: If the price is less than $30 and I have at least $50, then I will buy that CD.

16 P: The price of the CD is less than $30. L: I have at least $50. B: I will buy that CD. S: (P  L)  B

17 Definitions A tautology is a statement whose interpretation is always true. We say two statements are logically equivalent if they always have same the interpretation. –Their truth tables are the same.

18 Fitness Example S: If I exercise then I will get fit, and I do exercise, so I will get fit. E: I do exercise. F: I will get fit. S: (E  F)  E  F

19 Definition An argument consists of: A set of propostions, P 1, …, P n, called the premises. Another proposition, C, called the conclusion. An argument is called valid if the statement P 1  …  P n  C is a tautology.

20 Mary’s Exam Example Today Mary has a Law exam or a Computer Science exam or both. She doesn’t have a Law exam. Therefore she must have a Computer Science exam. L: Mary has a Law exam today. C: Mary has a Computer Science exam today. Premises: L  C, ¬L Conclusion: C

21 Wumpus World The idea of the game is to find the gold. The cave has rooms that lie in a grid. Dangers –The Wumpus (You can smell a Wumpus in the next room) –Pits (You can feel a breeze in the next room) –Bats (You can hear the bats in the next room) You have one arrow you can use to kill a Wumpus.

22 Example W represents the Wumpus P represents a Pit B represents Bats S is the Starting Position G represents where the gold is. 1 2 3 4 43214321

23 A Game No stench or breeze in square 1,1 –Therefore Wumpus is not in 1,2 or 2,1 Suppose you move to square 2,1 and detect a breeze there. –Therefore there is a Pit in either 2,2 or 3,1 So you go back and up to square 1,2 and detect a stench. –Therefore the Wumpus is in square 1,3.

24 Notation W 1,1 –The Wumpus is in square 1,1. S 1,2 –A stench was detected in square 1,2. B 2,1 –A breeze was detected in square 2,1. Etc.

25 Knowledge P 1 : ¬ S 1,1  ¬ B 1,1 P 2 : ¬ S 2,1  B 2,1 P 3 : S 1,2  ¬ B 1,2 P 4 : ¬ S 1,1  ¬ W 1,1  ¬ W 1,2  ¬ W 2,1 P 5 : ¬ S 2,1  ¬ W 1,1  ¬ W 2,1  ¬ W 2,2  ¬ W 3,1 P 6 : ¬ S 1,2  ¬ W 1,1  ¬ W 1,2  ¬ W 2,2  ¬ W 1,3 P 7 : S 1,2  W 1,3  W 1,2  W 2,2  W 1,1

26 Wumpus Argument Want to obtain the conclusion: W 1,3 Need to show: P 1  P 2  P 3  P 4  P 5  P 6  P 7  W 1,3 is a tautology. Truth Table has 2 12 = 4096 rows.

27 Problems Need to introduce a lot of propositions to represent any useful knowledge. Using truth tables to show validity requires: –Exponential Space –Exponential Time

28 Revision Know what are Propositions Know what are connectives and their corresponding truth tables. Know the definition of a tautology and logical equivalence. Know the definition of a valid argument, and how to show an argument in Propositional Logic is valid using truth tables.


Download ppt "COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University."

Similar presentations


Ads by Google