Lecture 5
Lecture 5
Knowledge Representation
Professor Dr.
Dipankar Das
Department of ICE, RU
Knowledge Representation
• Propositional Logic (PL)
• First-Order Predicate Logic (FOPL)
Logic
• Logic is a knowledge representation language
for many AI problems
• Propositional logic is the simple foundation
and fine for some AI problems
• First-Order Predicate Logic (FOPL) is much
more expressive as a KR language and more
commonly used in AI
Propositional Logic
• Proposition
– Propositions are elementary atomic sentences.
– A declarative statement that may be either true or false.
– Dhaka is the Capital of Bangladesh True
– 2+4 = 9 False
– It is raining. ?
– My car is painted silver?
– John and Sue have live children?
– Snow is white?
– People live on the moon?
Syntax of PL
• Syntax:
• This syntax governs the combination of basic building
blocks such as propositions and logical connectives.
• Compound propositions are formed from atomic
formulas using the logical connective
– Propositional symbols: p, q,... (atomic sentences)
• Wrapping parentheses: ( … )
• Sentences are combined by connectives:
and [conjunction]
or [disjunction]
implies [implication / conditional]
is equivalent [biconditional]
not [negation]
• Literal: atomic sentence or negated atomic sentence
Syntax of PL
• Formulas and Well Formed Formulas are sentences
• T and F are formulas.
• It P and Q are formulas, the following are formulas:
(P)
(P Q)
(P V Q)
(P Q)
(P Q)
• An example of a compound formula is:
– ((P ( Q V R) (Q S))
Semantics of PL
• The semantics or meaning of a sentence is just the value
true or false: that is. it is an assignment of a truth value
to the sentence
• An interpretation for a sentence or group of sentences is an
assignment of a truth value to each propositional symbol.
• As an example, consider the statements P and Q.
– One interpretation I1 assign true to P and false to Q.
– A different interpretation I2 assigns true to P and true to Q.
– Clearly. there are four distinct interpretations for this sentence.
• Once an interpretation has been given, its truth value can he
determined.
• This is done by repeated application of semantic rule
Semantics of PL
• Semantic Rules