Beruflich Dokumente
Kultur Dokumente
Representation
What is Logic?
Logic: the set of patterns used to carry out
reasoning.
It is a language used to represent facts.
Pattern: a template or a set of rules found as a
result of observing commonalities.
Methodologies
Representation in Propositional logic.
Representation in Predicate logic.
Representation through Semantic net.
Representation using Conceptual
Dependency structures.
Representation using Frames.
Types of Logic
Theories of Logic What Exists Belief of Agents
Propositional Logic Facts T/F
First Order
Predicate Logic Facts, objects, T/F
or simply relations
Predicate Logic
Temporal Logic Facts, object, T/F
Relations, Times
Probability theory Facts Degree of belief
[0…..1]
Fuzzy Logic Degree of truth Degree of belief
[0…..1]
Propositional Logic
Propositional Logic also
called Sentential Logic
The study of statements and their
connectivity structure.
includes sentence letters (A,B,C) and
logical connectives, but not quantifiers.
Propositional logic is declarative.
E.g.. It is raining.
Propositional logic has very limited
expressive power.
Proposition Logic: Syntax
Atomic Sentence: true, false, variable
Complex Sentence: connective applied to atomic or complex
sentence.
Connectives: NOT, AND, OR, IMPLIES, EQUIVALENCE, etc.
Sentences are combined by connectives:
and [conjunction]
or [disjunction]
implies [implication / conditional]
is equivalent [bi-conditional]
not [negation]
Well formed formulae (WFF) consists of atomic symbols joined
with connectives.
P : It is NOT cloudy.
Q : It is NOT raining.
PQ : It is cloudy OR it is raining.
PQ : It is cloudy AND it is raining.
PQ : It is cloudy indicates, it is raining.
PQ : It is cloudy indicates that it is
raining and it is raining indicates
that it is cloudy.
NORMAL FORMS
Normal Forms
To transform formulas into standard forms so
that they become more convenient for symbolic
manipulations and make identification and
comparison of two formulas easier, normal
forms are used.
There are two types of normal forms in
propositional calculus:
The Conjunctive Normal Form.
The Disjunctive Normal Form.
Types of Normal Forms
1. Eliminate , using: a b= a v b.
2. Reduce the scope of each to a single term, using:
( p) = p
deMorgan's laws: (a b) = a V b
(a V b) = a b
x P(x) = x P(x)
x P(x) = x P(x)
3. Standardize variables.
4. Move all quantifiers to the left of the formula without changing their
relative order.
5. Eliminate existential quantifiers by inserting Skolem functions.
6. Drop the prefix.
7. Convert the expression into a conjunction of disjuncts, using
associativity and distributivity.
8. Create a separate clause for each conjunct.
9. Standardize apart the variables in the set of clauses generated in
step 8, using the fact that: (x : P(x) Q(x)) = x : P(x) x : Q(x)
Algorithm: Conversion to Clause Form
Skolem Functions in FOPL
Objective (removing existential quantifiers from logic statements)
Want all variables universally quantified
Notational variant of FOL wff existentials
Retain implicitly full FOL expressiveness
Skolem’s Theorem
Every existentially quantified variable can be replaced by a unique
Skolem function whose arguments are all the universally quantified
variables on which the existential depends, without changing FOL.
Examples
“Everybody likes something”
(x) (y) [Person(x) & Likes(x,y)]
(x) [Person(x) & Likes(x, S1(x))]
Where S1(x) = “that which x likes”
“Every philosopher writes at least one book”
(x) (y)[Philosopher(x) & Book(y)) => Write(x,y)]
(x)[(Philosopher(x) & Book(S2(x))) => Write(x,S2(x))]
Example of Conversion to
Clause Form
Example:
x: [Roman(x) know(x, Marcus)] [hate(x,Caesar) V (y:
z: hate(y,z) thinkcrazy(x,y))]
Eliminate
x: [Roman(x) know(x, Marcus)] V [hate(x,Caesar) V
(y:z: hate(y,z) V thinkcrazy(x,y))]
Reduce the scope of each to a single term.
x: [ Roman(x) V know(x, Marcus)] V [hate(x,Caesar) V
(y: z: hate(y,z) V thinkcrazy(x,y))]
Given:
winter V summer
winter V cold
We can conclude:
summer v cold
Resolution Principle
Resolution procedure is a simple iterative process; at
each step, two clauses called the parent clauses, are
resolved into a new clause that has been inferred
from them.
E.g
winter summer
winter cold
Summer cold
A Resolution Proof
Axioms in clause form:
1. man(Marcus)
2. Pompeian(Marcus)
3. Pompeian(x1) v Roman(x1)
4. Ruler(Caesar)
5. Roman(x2) v loyalto(x2, Caesar) v hate(x2,Caesar)
6. loyalto(x3, f1(x3))
7. man(x4) v ruler(y1) v tryassassinate(x4, y1) v
loyalto (x4, y1)
8. tryassassinate(Marcus, Caesar)
Resolution Proof cont.
To Prove: hate(Marcus, Caesar) hate(Marcus, Caesar) 5
Marcus/x2
3 Roman(Marcus) V loyalto(Marcus,Caesar)
Marcus/x1
Pompeian(Marcus) V loyalto(Marcus,Caesar) 2
7 loyalto(Marcus,Caesar)
Marcus/x4, Caesar/y1
tryassassinate(Marcus, Caesar) 8
Issues with Resolution
Requires full formal representation in FOL (for
conversion to clause form)