Automated Reasoning Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Automated Reasoning Systems

Description:

Given is a knowledge base in predicate logic: T. is a set of formulae in first order logic ... Although strong(Kelly) ~strong(Kelly) is always true, we have: ... – PowerPoint PPT presentation

Number of Views:124
Avg rating:3.0/5.0
Slides: 50
Provided by: DannyDe8
Category:

less

Transcript and Presenter's Notes

Title: Automated Reasoning Systems


1
Automated Reasoning Systems
  • For first order Predicate Logic

2
AR general context.
  • Given is a knowledge base in predicate logic T
  • is a set of formulae in first order logic
  • formally also called a Theory
  • Given is also an additional first order formula F
  • Notation T F (T implies F)
  • Find reasoning techniques that allow to decide on
    this for EACH F and T.
  • Requirements
  • correctness -- completeness --
    efficiency

3
AR decidability.
  • Theorem Church 36
  • BUT semi-decidable !
  • Completeness Theorem of Goedel 31
  • SO if F follows from T, then we find a proof,
    else it is possible that the procedure doesnt
    terminate.

4
Wait a second ...
  • Wrong !
  • Let T smart(Kelly) en F strong(Kelly)
  • Although strong(Kelly) ? strong(Kelly) is always
    true, we have
  • neither smart(Kelly) strong(Kelly)
  • nor smart(Kelly) strong(Kelly)

5
AR general outline (1).
  • First we sketch the most generally used approach
    for automated reasoning in first-order logic
  • The different technical components will only be
    explained in full detail in a second pass
    (outline (2)).

6
AR general outline (2) .
  • We study different subsets of predicate logic
  • Horn clause logic
  • Clausal logic
  • full predicate logic
  • In each case we study semi-deciding procedures.
  • Each extension requires the introduction of new
    techniques.

7
Backward Reasoning Resolution
  • in a nutshell

8
Backward resolution
9
0) The TASK (example)
  • Are axioms describe knowledge about some world.
  • How to prove such theorems in general?

10
1) Proof by inconsistency
  • But add the negation of F to the axioms and prove
    that this extension is inconsistent.
  • the 4 axioms are never true in 1 same
    interpretation.

11
2) Clausal form
  • Normalize the formulae to a (more simple)
    standard form.
  • ? only left ? only right
  • no no ?

which is inconsistent if and only if the
original set was inconsistent.
Notice ?x ?y ?z can be dropped.
12
Example
  • ?u r(f(u))
  • ?z q(z)
  • ?y p(f(y))

is already in clausal form ( P ? P ? true)
  • ?x p(x) ? q(x) ? r(x)

Ps usually requires much more work!
13
3) Unification
  • Given 2 atomic formulae
  • find their most general common instance.
  • Most general unifier (mgu) x -gt f(A)

  • y -gt g(f(A))

14
4) The resolution step
  • Proposition logic

15
De resolutie step (2)
  • Predicate logic
  • Example

mgu applied to r(z) ? q(g(x))
Clauses on which resolution is performed must
not have any variables in common.
16
5) Resolution proofs
  • In order to prove a set of clauses inconsistent
  • apply resolution and add the result to the set
  • if you obtain the clause false ? STOP !

This means inconsistency of the last set
17
Example
So inconsistent !
18
A deeper study
19
Horn clause logic
  • where A, B1, B2,,Bn are atoms.
  • An atom is a formula of the form p(t1,,tm), with
    p a predicate symbol and t1,,tm terms.
  • Horn clause formulae are universally quantified
    over all variables that occur in them.
  • B1,,Bn are called body-atoms of the Horn clause
    A is the head of the Horn clause.
  • n may be 0 in this case we say that the Horn
    clause is a fact.

20
Alternative notation
  • This is a special case of the conjunctive normal
    form (only disjunctions and negations), with
    only 1 positive disjunct.

21
Wich kind of formulaecan we prove?
  • All variables are existentially quantified !

22
A very simple example
  • Bosmans is a showmaster
    (1)
  • Showmasters are rich
    (2)
  • Rich people have big houses
    (3)
  • Big houses need a lot of maintenance (4)
  • Goal automatically deduce that Bosmans house
    needs a lot of maintenance.

23
Representatie in Horn logica
  • Bosmans is a showmaster
    (1)
  • Showmasters are rich
    (2)
  • Rich people have big houses
    (3)
  • Big houses need a lot of maintenance
    (4)
  • To prove

showmaster(Bosmans)
?p rich(p) ? showmaster(p)
?p big(house(p)) ? rich(p)
?p lot_maint(house(p)) ? big(house(p))
Lot_maint(house(Bosmans))
24
AR for ground Horn clause logic
  • Backward (and forward) reasoning
  • proof procedures based on generalized Modus Ponens

25
Restricting to groundHorn clauses
26
Easy with modus ponens !
27
Modus ponens in AR
A is also true in this interpretation (see truth
tables)
  • Problem how to organize this into a procedure
    which is also complete (for ground Horn clauses)?

28
Generalized Modus ponens
  • Is obviously still correct (truth tables).

29
A glimpse at a Forward Reasoning Modus Ponens
strategy
30
A forward proof procedure
  • Given theory T and formula F
  • If all atoms from F are in Derived at
    termination, then T implies F, otherwise it
    doesnt.

31
Extended example
  • One possible derivation

Step 0 Derived Step 1 Derived
showm(Bos) Step 2 Derived Derived ?
belg(Bos) Step 3 Derived Derived ?
european(Bos) Step 4 Derived Derived ?
rich(Bos) Step 5 Derived Derived ?
big(house(Bos)) End Derived Derived ?
lot_maint(house(Bos))
32
Remarks
  • Correctness generalized modus ponens is correct
  • Completeness intuition
  • for a finite ground Horn clause theory, only a
    finite number of ground atoms are implied
  • these are all derived after finite time
  • Efficiency
  • can be extremely slow !
  • If T contains many Horn clauses unrelated to F,
    then the procedure derives many irrelevant (for F
    ) atoms.

33
Backward reasoning
  • For ground Horn Clause logic

34
Inconsistency
  • A theory T is inconsistent if it has NO model.
  • Proof

T implies F iff Each model of T makes F
true iff Each model of T makes
F false iff T ? F has no
model iff T ? F is
inconsistent
35
The example again
showm(Bos) belg(Bos) european(Bos) ?
belg(Bos) rich(Bos) ? showm(Bos) ?
european(Bos) big(house(Bos)) ?
rich(Bos) lot_maint(house(Bos)) ?
big(house(Bos)) lot_maint(house(Bos))
  • is inconsistent.
  • Problem this is NOT a Horn clause theory !?

36
Refutation proofsthe false predicate
  • We agree that false has the truth value false
    under every interpretation.
  • Imagine that we defined false as false ?
    p ? p for some predicate p

37
definite goals
  • So what is the form of F?

(?x1 ?xm B1 ? B2 ? ? Bn) ? ?x1 ?xm
(B1 ? B2 ? ? Bn) ? ?x1 ?xm false ?
(B1 ? B2 ? ? Bn) ? ?x1 ?xm false ?
B1 ? B2 ? ? Bn
A ? B ? A ? B
  • Observe F is again a Horn clause !!

38
In conjunctive normal form
0 positive disjuncts !
  • Implicative en disjunctive form remain consistent
  • (an empty disjunction is always false)

39
Back to the example
  • a ground Horn clause theory !

40
Modus ponensgeneralized some more
  • Ordinary Modus ponens is the special case with
  • n i 1 and m 0
  • Correctness via truth tables

41
Some backward reasoning steps in the example
false ? big(house(Bos))
false ? rich(Bos)
  • and so on ...

42
The backward procedurethe idea
  • Apply generalized modus ponens to the body-atoms
    Bi of the goal, using the Horn clauses of T
  • Then a false formula ia a consequence of T ? F

43
Backwards procedure
  • On top of this you need to apply backtracking
    over the selected clauses and the selected body
    atoms.
  • If the algorithm stops because it has tried all
    these alternatives F was not implied!

44
Back to the example
Step 0 Goal false ? lot_maint(house(Bos))
select lot_maint(house(Bos)) ?
big(house(Bos)) Step 1 Goal false ?
big(house(Bos)) select
big(house(Bos)) ? rich(Bos) Step 2 Goal false
? rich(Bos) select rich(Bos) ?
showm(Bos) ? european(Bos) Step 3 Goal false
? showm(Bos) ? european(Bos)
select showm(Bos) Step 4 Goal false ?
european(Bos) select
european(Bos) ? belg(Bos) Step 5 Goal false ?
belg(Bos) select
belg(Bos) Step 6 Goal false ?
45
Another example (propositional)
  • Prove p
  • Observe non-determinism on both atom selection
    and on clause selection !
  • we only illustrate the clause selection here

46
Search tree traversed bythe backward procedure
false ? p
p ? q ? r q ? t q ? s r ? n r ? o s o n
47
Backward procedure is more efficient
  • The proof is now goal directed towards the
    theorem.
  • no more exploration of irrelevant rules
  • Different search methodes can be used to traverse
    this search tree.
  • Atom-selection may influence efficiency too
  • ex. by detecting a failing branch sooner
  • but has no impact on whether or not we find a
    solution
  • (in case there are only finitely many ground
    Horn clauses)

48
Completeness
  • Example

false ? p p ? p
(1) p (2)
  • Possible derivations

false ? p
  • Is only complete if the search tree is traversed
    using a complete search method.

49
Representation-power of ground Horn clauses
  • Is ? a subset of propositional logic.
  • In general, more expressive logics are needed.
  • Essence with variables, one formula may be
    equivalent to a very large number of
    propositional formulae.
Write a Comment
User Comments (0)
About PowerShow.com