Lesson 12 PDF
Lesson 12 PDF
Lesson 12 PDF
5
Knowledge
Representation and
Logic –
(Propositional Logic)
Derived
Name Premise(s)
Sentence
Modus Ponens A, A => B B
And Introduction A, B A^B
And Elimination A^B A
Double Negation ~~A A
Unit Resolution A v B, ~B A
Resolution A v B, ~B v C AvC
In addition to the above rules of inference one also requires a set of equivalences of
propositional logic like “A /\ B” is equivalent to “B /\ A”. A number of such equivalences
were presented in the discussion on propositional logic.
1. Q Premise
2. Q => P Premise
3. P Modus Ponens(1,2)
4. (P ^ Q) => R Premise
5. P^Q And Introduction(1,3)
6. R Modus Ponens(4,5)
iff
but this equivalence may fail in two ways:
• but
• but
q is a sentence which holds in all models in which p holds, but we cannot find
rules of inference that will infer q from p. In this case the rules of inference are
insufficient to infer the things we want to be able to infer.
These notions are so important that there are 2 properties of logics associated with them.
``A sound inference procedure infers things that are valid consequences''
The ``best'' inference procedures are both sound and complete, but gaining completeness
is often computationally expensive. Notice that even if inference is not complete it is
desirable that it is sound.
Propositional Logic and Predicate Logic each with Modus Ponens as their inference
produce are sound but not complete. We shall see that we need further (sound) rules of
inference to achieve completeness. In fact we shall see that we shall even restrict the
language in order to achieve an effective inference procedure that is sound and complete
for a subset of First Order Predicate Logic.
The notion of soundness and completeness is more generally applied than in logic.
Whenever we create a knowledge based program we use the syntax of the knowledge
representation language, we assign a semantics in some way and the reasoning
mechanism defines the inference procedures. The semantics will define what entailment
means in this representation and we will be interested in how well the reasoning
mechanism achieves entailment.
5.7.1 Decidability
complete then we know that and we can apply the rules of inference exhaustively
knowing that we will eventually find the sequence of rules of inference. It may take a
long time but it is finite.
Questions
1. Consider a knowledge base KB that contains the following propositional logic
sentences:
a) Construct a truth table that shows the truth value of each sentence in KB and
indicate the models in which the KB is true.
b) Does KB entail R? Use the definition of entailment to justify your answer.
c) Does KB entail ? Extend the truth table and use the definition of entailment to
justify your answer.
d) Does KB entail ? Extend the truth table and use the definition of entailment to
justify your answer.
1.b. In every model in which the KB is true (indicated in the table), R is also
true; thus the KB entails R.
Transforming A,B,C and the negation of D to CNF gives the following clauses: