0% found this document useful (0 votes)
16 views13 pages

Lecture 5

ai

Uploaded by

mdhasemaliic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views13 pages

Lecture 5

ai

Uploaded by

mdhasemaliic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

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

Rule Number True Statement False Statement


1 t f
2 ~f ~t
3 t  t’ fa
4 ta af
5 at f  f’
6 at tf
7 fa t f
8 t  t’ f t
9 ff
PL
• Properties of Statements
– Satisfiable: A statement is satisfiable if there is some
interpretation for which it is true.
– Contradiction: A sentence is contradictory (unsatisfiable)
if there is no interpretation for which it is true.
– Valid: A sentence is valid if it is true for every
interpretation. Valid sentences are also called tautologies.
– Equivalence: Two sentences are equivalent if they have
the same truth value under every interpretation
– Logical consequences: A sentence is a logical
consequence of another if it is satisfied by all
interpretations which satisfy the first.
Advantages and Limitations of PL
• Advantages
– Simple KR language sufficient for some problems
– It is foundation for higher logics (e.g., FOPL)
– Reasoning is decidable, though NP complete, and efficient
techniques exist for many problems
• Disadvantages
– Not expressive enough for most problems
– Can’t directly talk about properties of individuals or relations between
individuals
– Generalizations, patterns, regularities can’t easily be represented
• First-Order Logic (FOL) is expressive enough to represent this kind of
information using relations, variables and quantifiers, e.g.,
• Every elephant is gray:  x (elephant(x) → gray(x))
• There is a white alligator:  x (alligator(X) ^ white(X))
Limitations of PL: Example
• Consider the problem of representing the following information:
– Every person is mortal.
– Joy is a person.
– Joy is mortal.
• How can these sentences be represented so that we can infer the
third sentence from the first two?
• In PL we have to create propositional symbols like following:
p = “person”; q = “mortal”; r = “Joy”
• The above 3 sentences are represented as:
p  q; r  p; r  q
• The 3rd sentence is entailed by the first two, but we need an explicit
symbol, r, to represent an individual, Joy
• Representing other individuals requires introducing separate symbols for
each
• To represent the fact that all individuals who are “people” are also “mortal”
First-Order Predicate Logic (FOPL)
• Predicate is a symbol which represents a property or a
relation
• "Man is mortal" can be transformed into the
propositional form ∀x: P(x) where P(x) is the predicate
which denotes x is mortal
• First-OrderPredicate Logic (FOPI) or Predicate Calculus has
assumed one of the most important roles in Al for the
representation of knowledge.
• FOPL is flexible enough to permit the accurate
representation of natural language reasonably well.
• FOPL is widely accepted by workers in the Al field as one of
the most useful representation methods
Next Class
• Logical Representation of Knowledge
– Propositional Logic
– First-Order Predicate Logic

You might also like