Artificial Intelligence - PowerPoint PPT Presentation

About This Presentation
Title:

Artificial Intelligence

Description:

Horses are faster than dogs and there is a greyhound that is faster than every ... Faster(y,z)) y Greyhound(y) Dog(y) x y z Faster(x,y) Faster(y,z) Faster(x,z) ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 21
Provided by: turing
Category:

less

Transcript and Presenter's Notes

Title: Artificial Intelligence


1
Artificial Intelligence
  • Universitatea Politehnica Bucuresti
  • Adina Magda Florea

2
Lecture No. 5
  • Theorem proving through resolution refutation
  • Standard form
  • Expression unification
  • Resolution in propositional logic
  • Resolution in predicate logic
  • Resolution strategies
  • Answers through resolution

3
1. Standard form (clausal)
  • Clause
  • Horn Clause
  • Definite Horn Clause
  • Empty clause
  • Transformation into clausal form

4
2. Expression unification
  • Substitution ?
  • Unifier
  • Most general unifier ?
  • Expression
  • Unification algorithm

5
  • Algorithm Unify(E1,E2) Expression unification
  • 1. if E1 and E2 are constants
  • then
  • 1.1. if E1E2
  • then return
  • 1.2. return FAIL
  • 2. if E1 is a variable or E2 is a variable
  • then
  • 2.1. Exchange E1 with E2 such as E1 to be a
    variable
  • 2.2. if E1E2
  • then return
  • 2.3. if E1 occurs in E2
  • then return FAIL
  • 2.4. return E1/E2

6
  • 3. if E1simb(t11,,t1n) and E2simb(t21,t2n)
  • then
  • 3.1 x ? t11, y ? t21
  • 3.2 Rest1 ? t12,,t1n , Rest2 ? t22,t2n
  • 3.3 ?1 ? Unify(x,y)
  • 3.4 if ?1 FAIL
  • then return FAIL
  • 3.5 G1 ? Rest1 / ?1, G2 ? Rest2 / ?1
  • 3.6 ?2 ? Unify(Rest1, Rest2)
  • 3.7 if ?2 FAIL
  • then return FAIL
  • else return (?1, ?2 )
  • 4. return FAIL
  • end.

7
3. Resolution in propositional logic
  • Resolvent
  • Clauses that resolve
  • Proof principle
  • Proof tree

8
  • Algorithm Resolution refutation in propositional
    logic.
  • 1. Transform the set of axioms A in clausal form
    and get S0
  • 2. Negate the theorem, transform the negated
    theorem in clausal form and add it to S0
  • 3. repeat
  • 3.1. Select two clauses C1 and C2 from S
  • 3.2. Compute R Res(C1,C2)
  • 3.3. if R ? ?
  • then add R to S
  • until R ? or there are no two other clauses
    that resolve
  • 4. if R ?
  • then the theoren is proven
  • 5. else it is not a theorem
  • end.

9
Example
  • Mihai has money
  • The car is white
  • The car is beautiful
  • If the car is white or the car is beautiful and
    Mihai has money then Mihai goes to the mountain
  • B
  • A
  • F
  • (A ? F) ? B ? C

10
4. Resolution in predicate logic
  • Resolvent
  • Clauses that resolve
  • Factor of a clause

11
  • Algorithm Resolution refutation in predicate
    logic.
  • 1. Transform the set of axioms A in clausal form
    and get S0
  • 2. Negate the theorem, transform the negated
    theorem in clausal form and add it to S0
  • 3. repeat
  • 3.1. Select two clauses C1 and C2 from S
  • 3.2. Compute R Res(C1,C2)
  • 3.3. if ??R
  • then add R to S
  • until ??R or there are no two other clauses that
    resolve or a predefined amount of effort has been
    exhausted
  • 4. if ??R
  • then the theoren is proven
  • 5. else
  • if there are no two other clauses that resolve
  • then it is not a theorem
  • else there is not a definite conclusion
  • end.

12
Example
  • Horses are faster than dogs and there is a
    greyhound that is faster than every rabbit. We
    know that Harry is a horse and that Ralph is a
    rabbit. Derive that Harry is faster than Ralph.
  • Horse(x) Greyhound(y)
  • Dog(y) Rabbit(z)
  • Faster(y,z))

?x ?y Horse(x) ? Dog(y) ? Faster(x,y)
?y Greyhound(y) ? (?z Rabbit(z) ? Faster(y,z))
Horse(Harry)
Rabbit(Ralph)
?y Greyhound(y) ? Dog(y)
?x ?y ?z Faster(x,y) ? Faster(y,z) ? Faster(x,z)
13
  • A1. ?x ?y Horse(x) ? Dog(y) ? Faster(x,y)
  • A2. ?y Greyhound(y) ? (?z Rabbit(z) ?
    Faster(y,z))
  • A3. Horse(Harry)
  • A4. Rabbit(Ralph)
  • A5. ?y Greyhound(y) ? Dog(y)
  • A6. ?x ?y ?z Faster(x,y) ? Faster(y,z) ?
    Faster(x,z)
  • T Faster(Harry,Ralph)
  • C1. Horse(x) ? Dog(y) ? Faster(x,y)
  • C2. Greyhound(Greg)
  • C2 Rabbit(z) ? Faster(Greg,z)
  • C3. Horse(Harry)
  • C4. Rabbit(Ralph)
  • C5. Greyhound(y) ? Dog(y)
  • C6. Faster(x,y) ? Faster(y,z) ? Faster(x,z)
  • C7. Faster(Harry,Ralph)

14
5. Resolution strategies
  • Breadth first (level order) strategy
  • Set of support strategy
  • Linear resolution
  • Input linear resolution
  • Unit resolution
  • Elimination strategy

15
Level order strategy
16
Level order strategy
  • S0, L0
  • Lk1 ? Res(Ci, Cj) Ci?Lk, Cj?Sk
  • Sk1 ? Sk? Lk1
  • k 0,1,2,

17
  • Linear resolution
  • S, C0 ?S
  • C1 ? Res(C0, Ci) C0, Ci ? S
  • Ck1 ? Res(Ck, Ci) Ci ? Ck-1, Ck-2, ..?S
  • k1, 2, 3,
  • Input linear resolution
  • S, C0 ?S
  • C1 ? Res(C0, Ci) C0, Ci ? S
  • Ck1 ? Res(Ck, Ci) Ci ? S
  • k1, 2, 3,

18
Subsumed clauses
  • A clause C subsumes a clause D iff there is a
    substitution ? such that C? ? D.
  • D is called subsumed clause.
  • CP(x) DP(a) ? Q(a)

19
6. Obtaining answers
C1
C2
C3
20
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com