Professional Documents
Culture Documents
Curs 10 BMC 30.11.2010-2
Curs 10 BMC 30.11.2010-2
Lupea \lihaiela
where:
t .
tR:, FilJ,
-{-),<),n}:
alPhabet
u {l}:the
ffJ,
n
ti:"
' ,aii, =a the set of axioms . Rii, =1resP' ,fact)the set of inference rules containing
factoring rule (fact).
:nd
cl : f
v /1 and
c2:
g v .-12 ,
c\,cz
)"(9
'
C'=
i-(l)v
We can combine these two inference tules and obtain thre definition of a resolvei: resolvent of tvvo clauses C1 and C2 can be:
--e
C2;
2) the binary resolvent of C1 and a factor of C2; 3) the binary resolvent of a factor of C1 and C2; 4) the binary resolvent cf a factor of C1 and a factor
of C2.
RESOLUTION
I\
Example 9.
a)
C1
=p(f(x),qiil)v q(x,y);
C2=
- p(f(f(a)),q(z))
v q(f(a), g(z))
v q(a,a) is a factorof C
Output: message: "U1,U2,..,Un l- V" or "not U1,U2,..,Un l- V" or "we cannot decide if U1,U2, ,Un l- V or not U1,U2,..,Un lBegin
t1"
,(-,V)'i
select
lr1,12,
C1, and
l2eC2:
C=Res(0(C1), e(C2))',
{C};
if
1 <
If
" .
if the formula A is not valid, then P ends with the conesponding answer or P may never
stop.
Example 10.
Check if
Al:8,
where
(Vx)q(.x)
-.8
prenex normal forms: Ae: (Yx,\(--'p(x) v q(x)) = -((Y z) p(z) -+ (vy)q(v)) = (v = (Vz)(3y)( p(x) n -q(y))
z)
(-B)'
p(z)
'x
()v)-q(v) =
Skolem normal forms: " : ,as 1vx;1--p(x) v q(x)), (-3)t : (Y z)(p(z) n -q(f
.
A'
(z))
-q(f
(z))
Al:8.
RESOLUTION
Example 11. Check the inconsistency of the set S using lock resolertion. S={--p(x) v q(x) v r(x),--q(.y) v r(y'), p(a),_-r(a)} a) We index the literals as follows: C1= (3) --p(x).v e1a@)v lLy r(x)
C2= (s) C3=
1o)
--q(y)v
gr(il
(7)--r(a)
p@)
C4=
riote)--p(a)v @q(a)
C6=
ResP'1cZ,C4;
=
(s\--q(a)
lv+-ol
C7= ResP'(C5,C6)
p.--p(.a)
cg= ResP'1C6,C7) = o
Si-if=, o
D-
and S is inconsistent.
b) another indexing:
C1= C2=
e)--p(x)v
$)--Q(y)v
1t7A@)v
67r(x)
er(y)
pla)
e)-,r(a)
C5= ResP'1C1,C2;
Example 12. Using resolution check the validity of the formula: U = (Y y)(1x)---,(p(x, y) e -,p(x, x))
--(J =
=
-'.((Vy)(f{--(p(*,/)
+>
'-p(x,x))) = (Iy)(Vx)(p(*,y)
e--p(x,x)'):
(ly)(VxX(--p(",
=
y)v
$flfa
CI=
From the above clausal normal form we consider the clauses: ---,p(x,a)v
It is important to apply the factoriing rule for C1 and C2 and try to resolve their
factors.
ul-t;;a)
C3 =
-p(a,a),
C3 is a factor of
Cl.
r-.t lx<-al a,, -- p(a,a), C4.is a factor af C2. u.t- faci \-T C3,C4l
C2l
-r|;'t
a factor
of C2
central clause
f-'#,
n:
-:)
RESOLUTION IN FIRST-oRDER
LocIC,
MFCS
C4
is:
lt
C5
top clause: C4
side clauses: C5, C3,Cl
C6 C7
C8:
C3
lt lt lt
CI
I
l
Example 14. Using general resolution prove that the followins S:{C 1,C2,C3,C4,C5,C6,C7 }
set
of clauses is
inconsistent.
Constants: a, function symbols:l predicate symbols: p,q,r,s,t Durin-e the resolution process we obtain the followingieiolvents:
p(a))
s
,,;,
q(a)v
s(_f
(a))
(_f
(a))
2:Res(C 8: -q (a),C I 1 :
(a) v r (a,
f (a)) ):,
(a,
"f
C I 3:Res(C
5:
-r
(a,
y) v t (y),C I 2:
r (a,
f (a)) )
r_u_
rr,,
(-f (a))
15:Res(C 1A:
We havethat S
l-R."n,
completness of resolution.
/rt
Example 15 - formalization of common-sense reasoning. From H1 , H2 and H3 can be derived the conclusion C? H1. All hummingbirds are richly colored. H2: No large birds live on honeY. H3: Birds that do not live on honey are dull in color. C: All hummingbirds are small.
Predicate formulas:
H1
-colored(x)) -+--lives H2: (Vx)(--,small -on -honey(x)) -bird(x) + --richly -colored(x)) H3: (Vx)(--lives -on _honey(x) C: (Vx)(ftummrngbird(x) --> small
:(Yx)(hummingbird(") -+ richly
We transform the formulas H1, H2, H3 and -.C into clausal normal forms: H1 "= --hummin gbird(") t richly _colored(x)) . C1
-bird(x))
-on -honey(x)): H3'= lives _on _honey(x)v '-richley _colored(x)): C3 -- C= --((Yx)(hummin gbird(x) -+ small =
H2"= small
-bird(x)v
--lives
C2
: (1x)(hummin
(
gbird(x)
---tsmall
-- C) " = hum mrn gbird (o) n --small _bird (a) =C4 nCS, a=S kolem con sta nt
-bird(x))) -bird(x))
The set of clauses corresponding to the formula H1 nH2nH3A--C is: 5={Cl,C2,C3,C4,Csi, having as a support-s"1 1={C4,C5}. We will not resolve
two clauses belonging both to the consistent set S-T={C1,C2,C3} corresponding to the hypothesis. C6=Res(C 1,C4) = yr*o1 richly-colored(a) C7=Res(C6,C3)= ft+_allives-on-honey(a) small-bi rd(a) CB=Res(C7,C2)=
[x+_a)
Cg=Res(C8,C5;= o
Sl-l:"r,
holds.
A,L