Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,

Similar presentations


Presentation on theme: "Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,"— Presentation transcript:

1 Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton, then stop:  k is an mgu for Σ; else find the disagreement set D k of Σ  k. 3.If there exists X (a variable) and t (a term) in D k such that X does not occur in t (occur check), then set  k+ 1 =  k {x / t}, increment k by 1 and go to step 2; else report that Σ is not unifiable, and stop.

2 FOL Resolution System §Language: Clauses §Logical Axioms: AX = { } §Inference Rules: R = {Resolution} IMPORTANT Before two clauses are resolved we must standardize the variables apart: rename the variables in one clause such that the two clauses have no variables in common.

3 FOL Resolution System Let C1 and C2 be two clauses; if there is an atom A in C1and a literal  B in C2 such that A and B have a mgu , then these two clauses have the following resolvent: P1 v...v A v... v Pn, Q1 v... v  B v... v Qm --------------------------------------------------------- (P1v..v Pi-1v Pi+1v..Pn v Q1 v...v Qj-1 v Qj+1v..v Qm) 

4 Factoring To guarantee refutation completeness, sometimes resolution needs a stronger version that uses factoring. To avoid confusion, we will not cover it in this course (if you want see the books).

5 Answer Extraction To use resolution to answer questions, for example a query of the form  X C(X), we must keep track of the substitutions made during the refutation process by using an answer literal: § we add a literal Ans(X,...., Z) to each clause coming from the negation of the query, and perform resolution until only an answer literal is left; the variables X,...,Z are all of those variables that occur in the clause form of the negation of the query. The terms substituted during the proof for the variables in the Ans literal will then be instances of the existentially quantified variables in the query.

6 Resolution System To answer if KB |= Q: §Convert S = KB U {  Q} into S’ = CNF(S) (or INF(S)) convert each formula of S into clauses §Iteratively apply resolution to the clauses in S’ and add the results to S’ either until there are no more resolvents that can be added or until the empty clause is produced.

7 Refinement Strategies §The procedure described above is inefficient because some resolutions need not be performed at all (are irrelevant). §Refinement strategies disallows certain kinds of resolutions to take place. §Linear resolution with initial set of support

8 Important Theorems §Let S be a set of wffs and S’ the set of clauses obtained by converting S to CNF (to INF). §In Propositional Logic S and S’ are equivalent; but in FOL they are not equivalent in general §But in both logics we have: S is unsatisfiable iff S’ is unsatisfiable. §Therefore, KB |= Q iff S = KB U {  Q}is unsat iff S’ is unsat

9 Important Theorems Then we can use resolution to check if S’ |- False(empty clause) and if it is use soundness to infer that S’ is unsat, then S is unsat then KB does not entail Q; else use completeness to infer that S’ is satisfiable, then S is sat then KB entail Q.


Download ppt "Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,"

Similar presentations


Ads by Google