Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reasoning with Propositional Logic automated processing of a simple knowledge base CD.

Similar presentations


Presentation on theme: "Reasoning with Propositional Logic automated processing of a simple knowledge base CD."— Presentation transcript:

1 Reasoning with Propositional Logic automated processing of a simple knowledge base CD

2 D Goforth - COSC 4117, fall 20062 Knowledge representation  propositions: set of atomic statements that may be true or false  general knowledge: set of complex sentences describing conditions (constraints) on environment  facts: data (from perceptions) about specific state of environment

3 D Goforth - COSC 4117, fall 20063 Knowledge representation  KB - knowledge base: conjunction of general knowledge and facts  model: assignment of true/false values to the propositions so KB can be determined to be true or false NOTE: term “model” is not clearly defined – sometimes, it means any assignment to propositions; usually it means an assignments so KB is true

4 D Goforth - COSC 4117, fall 20064 model  propositions: set of atomic statements that may be true or false  general knowledge: complex sentences describing conditions on environment  facts: data (from perceptions) about specific state of environment  KB - knowledge base: conjunction of general knowledge and facts  model: assignment of true/false values to the propositions facts general knowledge Agent propositionspropositionspropositions general knowledge environment Agent sets true/false values of propositions to make model(s) where KB is consistent (true) - these models represent “understanding”

5 D Goforth - COSC 4117, fall 20065 Knowledge representation truth table P 1 P 2 P 3...P n R 1 R 2 R 3...R m R m+1 R m+2 R m+3...R k KB= Λ R i t t t...tt f f...t f f f...f f t t t...tt f f...t f f f...f f t t t...ff f t...t f t t...f f f t t...ft t t...t t t t...t t f f f...ft f f...f f t f...f f... propositions general knowledgefacts a model making KB true

6 D Goforth - COSC 4117, fall 20066  propositions: set of atomic statements that may be true or false  general knowledge: complex sentences describing conditions on environment  facts: data (from perceptions) about specific state of environment  KB - knowledge base: conjunction of general knowledge and facts  model: assignment of true/false values to the propositions model facts general knowledge Agent propositionspropositionspropositions general knowledge Is GREEN in front of RED? NO

7 D Goforth - COSC 4117, fall 20067 Facts (from perception): 1.RED occludes ORANGE 2.ORANGE occludes GREEN Propositions: 1.ORANGE inFrontOf RED 2.ORANGE inFrontOf GREEN 3.RED inFrontOf GREEN 4.RED inFrontOf ORANGE 5.GREEN inFrontOf RED 6.GREEN inFrontOf ORANGE General knowledge (incomplete): if (ORANGE occludes RED) then (ORANGE inFrontOf RED) if (RED inFrontOf ORANGE) then not(ORANGE inFrontOf RED) if (RED inFrontOf ORANGE) and (ORANGE inFrontOf GREEN) then (RED inFrontOf GREEN) etc… general knowledge Agent propositions general knowledge facts modelpropositionspropositions

8 D Goforth - COSC 4117, fall 20068 Knowledge representation truth table P 1 P 2 P 3...P 6 R 1 R 2 R3...R m R m+1 R m+2 KB= Λ R i t t t...tt f f...t t t f f t t...ft t t...t t t t f f f...ft f f...f t t f... propositions general knowledgefacts Combination of true/false that describes the order of RED, GREEN, ORANGE

9 Logical equivalences Review the truth tables for each of these connectives: 

10 Practice applying these logical equivalence axioms

11 D Goforth - COSC 4117, fall 200611 Uses of logical equivalence axioms  Rewriting sentences Show equivalence or difference Format for reasoning Reduce number of connectives (people like variety; computers like simplicity) e.g.,A  B  ( A  B )  ( B  A )  (  A  B )  (  B  A )   (A   B )   (B   A )

12 D Goforth - COSC 4117, fall 200612 Properties of sentences  validity: sentence is true in all models  satisfiability: sentence is true in some model general knowledge is valid; facts are (should be) satisfiable

13 D Goforth - COSC 4117, fall 200613 Proof strategies A.finding models that satisfy KB – truth table enumeration O(2 n ) for n propositions B.applying inference rules

14 D Goforth - COSC 4117, fall 200614 B. Inference rules  human-like reasoning from classic logic 1.and elimination 2.modus ponens 3.logical equivalences

15 D Goforth - COSC 4117, fall 200615 1. And elimination  Spot is big and friendly  Spot is friendly  A Λ B B

16 D Goforth - COSC 4117, fall 200616 2. Modus ponens  Spot is a dog A dog is a mammal (if Spot is a dog then Spot is a mammal)  Spot is a mammal  A, A=>B B

17 D Goforth - COSC 4117, fall 200617 3. Logical equivalence (eg)  logical equivalence: ~ ( A \/ B ) = ~A Λ ~B  The car is not (red or green)  The car is not red and it’s not green  ~ ( A \/ B ) ~A Λ ~B  Question – can we claim “car is not red”?

18 D Goforth - COSC 4117, fall 200618 Short inference sequence Propositions: A car is red B car is green Knowledge: ~ ( A \/ B ) Inference:~ ( A \/ B ) ~A Λ ~B (logical equivalence) ~A (and elimination) Claim: car is not red

19 D Goforth - COSC 4117, fall 200619 Automated reasoning  reduced variety of representation for sentences harder to ‘read’ for humans simpler data structure to process  reduced set of inference rules less efficient for humans equally powerful simpler algorithm for implication

20 D Goforth - COSC 4117, fall 200620 Simplified representation - CNF  C onjunctive N ormal F orm conjunction of disjunctions (AND of OR’s) of literals (atomic propositions or negations) (P \/ Q \/ ~R) Λ (~W \/ ~Q \/ T) Λ (W \/ P)  A Knowledge base is in CNF if the statements are disjunctions

21 less readable? Example sentence Example sentence in CNF

22 D Goforth - COSC 4117, fall 200622 Restricted CNF – Horn clause  CNF disjunction At most one literal is positive (P \/ Q \/ ~R) is not Horn clause (~W \/ ~Q \/ T) is Horn clause  Basis of PROLOG – logic programming language  (~W \/ ~Q \/ T) is (W Λ Q)  T

23 D Goforth - COSC 4117, fall 200623 Summary 1  Representation – facts, propositions, general knowledge  Models, validity and satisfiability  Propositional logic  Reasoning– by searching models – by inference  CNF, Horn clauses

24 D Goforth - COSC 4117, fall 200624 Summary 2  Logical equivalence axioms  Sound and complete inference  Inference strategies And elimination Modus ponens Resolution  Inference algorithms (coming next) Resolution proof by contradiction Forward chaining – data-driven Backward chaining –goal-directed


Download ppt "Reasoning with Propositional Logic automated processing of a simple knowledge base CD."

Similar presentations


Ads by Google