RESOLUTION (continued)

advertisement
ARTIFICIAL INTELLIGENCE
[INTELLIGENT AGENTS PARADIGM]
RESOLUTION
AND ITS ALGORITHMS
Professor Janis Grundspenkis
Riga Technical University
Faculty of Computer Science and Information Technology
Institute of Applied Computer Systems
Department of Systems Theory and Design
E-mail: Janis.Grundspenkis@rtu.lv
Resolution and Its Algorithms
RESOLUTION
The resolution principle describes a way of
finding contradictions in a knowledge
base of clauses with minimum use of
substitutions.
Resolution refutation proves a theorem (a
goal) by negating the statement to be
proved and adding this negated goal to the
set of axioms that are known to be true.
Resolution and Its Algorithms
RESOLUTION (continued)
The resolution rule of inference is used
to show that it leads to a
contradiction.
As it is shown that the negated goal is
inconsistent with the given set of
axioms, it follows that the original
goal must be consistent.
Resolution and Its Algorithms
RESOLUTION (continued)
Resolution refutation algorithm
1. Put the premises or axioms into clause form.
2. Add the negation of the goal (what is to be
proved) in clause form to the set of axioms. In
other words, assume that the negation of the
goal is true.
3. Resolve these clauses together, producing new
clauses that logically follow from them.
Resolution and Its Algorithms
RESOLUTION (continued)
Resolution refutation algorithm
4. Produce a contradiction by generating the empty
clause.
5. The substitutions used to produce the empty
clause are those under which the opposite of the
negated goal is true.
6. Conclude that the negated goal is false because it
causes contradiction.
7. Conclude that the goal is true.
Resolution and Its Algorithms
RESOLUTION (continued)
Resolution is a sound inference rule.
Resolution is not complete but it is
refutation complete, i.e., the empty
clauses can always be generated whenever
a contradiction in the set of clauses exists.
The most common form of resolution is
binary resolution applied to two clauses.
Resolution is more general than Modus
Ponens.
Resolution and Its Algorithms
RESOLUTION (continued)
The resolution proof procedure requires all
statements in the knowledge base to be
converted to a standard form called
clause form.
Clause form represents the logical knowledge
base as a set of disjunctions of literals.
A literal is an atomic expression or the
negation of an atomic expression.
Resolution and Its Algorithms
RESOLUTION (continued)
The form the knowledge base takes is referred
to as a conjunction of disjuncts.
• It is a conjunction because all the
clauses in the knowledge base are
assumed to be true at the same time.
• It is a disjunction in that each of the
individual clauses is expressed with
disjunction as the connective.
Resolution and Its Algorithms
RESOLUTION (continued)
Algorithm for reducing any set of
predicate calculus statements to
clause form must be used.
Algorithm consists of a sequence of
transformations.
A set of clauses is inconsistent if and
only if the original set of expressions
is inconsistent.
Resolution and Its Algorithms
RESOLUTION (continued)
The clause form may not be strictly
equivalent to the original set of
predicate calculus expressions in that
certain interpretations may be lost.
This occurs because skolemization
restricts the possible substitutions for
existentially quantified variables.
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
1. Eliminate the implication  using the
equivalence
A  B  AB
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
2. Reduce the scope of negation using
the following equivalences
(A)  A
(X)p(X)  (X)p(X)
(X)p(X)  (X)p(X)
(AB)  AB
(AB)  AB
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
3. Standardize by renaming all
variables so that variables bound by
different quantifiers have unique
names using the equivalence
((X)p(X)(X)q(X)) 
((X)p(X)(Y)q(Y))
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
4. Move all quantifiers to the left
without changing their order.
After this state the clause is in prenex
normal form, because all the
quantifiers are in front as in a prefix
and the expression or matrix follows
after.
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
5. Eliminate all existential
quantifiers by skolemization.
6. Drop all universal quantifiers.
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
7. Convert the expression to the
conjunct of disjuncts form using
associative and distributive laws
A(BC)  (AB)C
A(BC)  (AB)C
A(BC)  (AB)(AC)
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
8. Call each conjunct a separate clause.
9. Standardize the variables apart by
giving the variable in each clause
generated by step 8 different names,
and using the equivalence
(X)(p(X)q(X) 
(X)p(X)(Y)q(Y)
Resolution and Its Algorithms
RESOLUTION (continued)
Reduction algorithm
The importance of this final step becomes apparent
only when unification steps of resolution are
presented. The most general unification may be
found to make two predicates within two clauses
equivalent, and then this substitution is made
across all the variables of the same name within
each clause. Thus, if some variables share names
with others, these may be renamed by the
unification process (needlessly) with a subsequent
(possible) loss of generality in the solution.
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
(X)([p(X)  t(X)]  [q(X,V) 
(Y)((Z)[q(Y,Z)]  r(X,Y))]) 
(X)(s(X))
1. Eliminate the 
(X)([p(X)  t(X)]  [q(X,V) 
(Y)((Z)[q(Y,Z)]  r(X,Y))]) 
(X)(s(X))
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
2. Reduce the scope of negation
(X)([p(X)  t(X)]  [q(X,V) 
(Y)((Z)[q(Y,Z)]  r(X,Y))]) 
(X)(s(X))
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
3. Standardize by renaming all variables
(X)([p(X)  t(X)]  [q(X,V) 
(Y)((Z)[q(Y,Z)]  r(X,Y))]) 
(W)(s(W))
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
4. Move all quantifiers to the left without
changing their order
(X)(Y)(Z)(W)([p(X)  t(X)]
 [q(X,V)  (q(Y,Z)  r(X,Y))]) 
s(W)
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
5. Skolemization
(X)(Z)(W)([p(X)  t(X)] 
[q(X,V)  (q(f(X),Z)  r(X,f(X)))])
 s(W)
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
6. Drop all universal quantifiers
[p(X)  t(X)]  [q(X,V) 
(q(f(X),Z)  r(X,f(X)))]  s(W)
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
7. Convert the expression to the conjunct
of disjuncts form
[p(X)  t(X)  q(X,V)  s(W)] 
[p(X)  t(X)  q(f(X),Z) 
r(X,f(X))  s(W)]
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
8. Call each conjunct a separate clause
p(X)  t(X)  q(X,V)  s(W)
p(X)  t(X)  q(f(X),Z) 
r(X,f(X))  s(W)
Resolution and Its Algorithms
RESOLUTION (continued)
Application of reduction algorithm
9. Standardize the variables apart
p(X)  t(X)  q(X,V)  s(W)
p(T)  t(T)  q(f(T),Z) 
r(T,f(T))  s(U)
Resolution and Its Algorithms
RESOLUTION (continued)
Strategies and simplification
strategies for resolution
• In resolution proof procedure no
order of clause combination is
defined.
• When there are N clauses there are N2
ways of combining them at just the
first level (exponential growth).
Resolution and Its Algorithms
RESOLUTION (continued)
Strategies and simplification
strategies for resolution
• Search heuristics are used, for
instance,
 The unit preference strategy requires
that one of the resolvents always be a
unit clause. Thus, units are used for
resolving whenever they are available.
Resolution and Its Algorithms
RESOLUTION (continued)
Strategies and simplification strategies
for resolution
 The linear input form strategy is a direct
use of the negated goal and the original
axioms. Thus, the negated goal is resolved
with one of the axioms to get a new clause.
This result is then resolved with one of the
axioms to get another new clause, and so on.
This process continues until the empty clause
is produced.
Download