Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.

Similar presentations


Presentation on theme: "Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive."— Presentation transcript:

1 Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive normal form if it consists in the conjunction of clauses. A 1  A 2  …  A n where A i is a clause. Def. A formula is said to be a clause if it consists in a disjunction of literals. A clause has the following form: L 1 v L 2 v … v L m where L i is a literal. Def. A literal is an atomic formula or the negation of an atomic formula. Def. A formula is said to be in clausal form if it can be expressed as a set of clauses: {C 1, …, C n,} where C i is a clause Clausal Form

2 1. Eliminate implication symbols (  ), using the identity:     ~  v  2. Introduce negation: reduce scopes of negation symbols by repeatedly applying the De Morgan rules and the quantifier identities: (i) ~(  v  )  ~   ~  (ii) ~(    )  ~  v ~  (iii) ~  x.  (x)   x. ~  (x) (iv) ~  x.  (x)   x. ~  (x) Transforming to Clausal Form

3 3. Transform into prenex normal form: Def. A formula is in prenex normal form if it consists in a list of quantifiers called prefix, followed by a quantifier-free formula called the matrix. Procedure (i) Standardize variables: re-name variables. (ii) Eliminate existential quantifiers: replace all existential quantifier’s variables by skolem functions of all the universal quantified variables which are over the scope of the existential quantifier. (iii) Move all quantifiers to the left: there remain only universal quantifiers. Transforming to Clausal Form

4 4. Put matrix in conjunctive normal form by repeatedly using the distributive laws: (i)  v (    )  (  v  )  (  v  ) (ii)   (  v  )  (    ) v (    ) 5. Eliminate universal quantifiers. 6. Eliminate conjunction (  ) symbols separating in clauses. 7. Rename variables. Transforming to Clausal Form

5 Example:  x. (p(x)  {  y. [p(y)  p(f(x,y))]  ~  y. [q(x,y)  p(y)]}) ===> gets transformed into the following clauses: c1:~p(x1) v ~p(y) v p(f(x1,y)) c2: ~p(x2) v q(x2, g(x2)) c3: ~p(x3) v ~p(g(x3)) Predicate logic resolution

6 We can use production systems to show that a given formula, called the goal, is a theorem derivable from a set of formulas (they provide the state description). These production systems are called theorem proving systems or deduction systems. Resolution Refutation Systems are based in the following principle:   =  if and only if,   {~  }  = Resolution Refutation Systems

7 Resolution refutation procedure In general a resolution refutation proving that an arbitrary wff  fallows from a set of wffs ,  |= , proceeds as follows: 1. Convert the wffs in  to clausal form. 2. Negate the formula  to be proved and convert the resulting formula, ~ , into to clausal form. 3. Combine the clauses resulting form steps 1 and 2 into a single set, . 4. Iteratively apply resolution to the clauses in  and add the results to  either until there are no more resolvents that can be added or until the empty clause is produced. Resolution Refutation Systems

8 Def. Resolution Rule: p v q 1 v q 2 v … v q n ~p v r 1 v r 2 v … v r m ------------------------------------------------- q 1 v … v q n v r 1 v … v r m e.g. 1. Whoever can read is a literate. Dolphins are not literate.Some dolphins are intelligent. Hence, some who are intelligent can not read. 2.(c1) p(x,f(a)) v p(x,f(y)) v q(y) (c2) ~p(z,f(a)) v ~q(z) Resolution Refutation Systems

9 Example: 1. Tiger and savages animals are fierce or destructives. 2. If there is something destructive in the room, then something in the room will get damaged. 3. Tim is a tiger. 4. Tim is a savage animal. 5. Tim is in the room but it is not fierce. Prove using resolution that something in the room will get damaged. Resolution Refutation Systems

10 Important results Completeness of resolution refutation: the empty clause will be produced by the resolution refutation procedure if  |= , thus we say that predicate calculus resolution is refutation complete. Decidability of predicate calculus resolution refutation: We say that resolution refutation in predicate calculus is semi-decidable as it terminates by generating the empty clause if  |= , but it may never terminate if  |  . Predicate logic resolution

11 Simplification strategies Sometimes a set of clauses can be simplified by elimination of certain clauses or elimination of certain literals in the clauses. Elimination of tautologies Any clause containing a literal and its negation may be eliminated. E.g. p(x) v q(y) v ~ q(y) ==> T Procedural attachment Sometimes it is possible to evaluate the truth values of literals:  v F ==>  e.g. p(x) V q(y) V ( 3 >7) ==> p(x) V q(y) since we already know that 3>7 is false. Predicate logic resolution

12 Elimination by subsumption Def. A clause {Li} subsumes a clause {Mi} if there exists a substitution s such that {Li}s is a subset of {Mi}. e.g. p(x) subsumes p(y) v q(z) p(x) subsumes p(a) p(x) subsumes p(a) v q(z) p(x) v q(a) subsumes p(f(a)) v q(a) v r(y) A clause in an unsatisfiable set that is subsumed by another clause in the set can be eliminated without affecting the unsatisfiability of the rest of the set. Predicate logic resolution

13 Extracting answers from Resolution Refutations Many applications of theorem-proving systems involve proving formulas containing existentially quantified variables and finding values or instances for these variables. To get an answer the proof method has to be constructive. E.g. “If Fido goes wherever John goes and if John is at school, where is Fido?” To answer this question first we must have to proof of the goal:  z. at(fido,z) Next: we must extract the answer to the question from this refutation tree. In order to do that we proceed as follows: (a) append to each clause arising from the negation of the goal wff its own negation. (b) Following the structure of the refutation tree, perform the same resolutions as before until some clause is obtained at the root. (c) Use the clause at the root as an answer statement. Predicate logic resolution

14 Extracting the answer involves converting a refutation tree (with NIL at the root) to a proof tree with some statement at the root that can be used as an answer. The conversion involves converting every clause arising from the negation of the goal into a tautology. Another example: - For all x, y, there exists a z, such that if - parent(x,y) & parent(y,z)  grandfather(x,z) - And, everyone has a parent:  x.  y.parent(x,y) - Question: “Do there exists individuals x and y such that x is the grandparent of y.” it can be expressed as:  x.  y.g(x, y) Predicate logic resolution

15 Universally quantified variables in goals A problem when a universal quantified variable appears on the goal is that after the goal is negated we have an existencially quantified variable which is Skolemized and a function is introduced. What is the meaning of this Skolem function and how it has to be interpreted when extracting the answer? Steps: 1. A resolution-refutation tree is found by some search process. The unification subsets of the clauses of the tree are marked. 2. New variables are substituted for any Skolem functions occurring in the clauses that result from the negation of the goal wff. 3. The clauses resulting from the negation of the goal wff are converted into tautologies by appending to them their own negations. Predicate logic resolution

16 4. A modified proof tree is produced modeling the structure of the original refutation tree. Each resolution in the modified tree uses a unification set determined by the unification set used by the corresponding resolution in the refutation tree. 5. The clause at the root of the modified tree is the answer statement extracted by these process. It can be shown [Luckham and Nilsson, 1971] that in the answer-extracting process it is correct to replace any Skolem functions in the clauses coming from the negation of the goal wff with new variables. _____________________ Luckham, D.C., and Nilsson, N. J. 1971. Extracting information from resolution proof trees. Artificial Intelligence, 2(1), 27-54. Predicate logic resolution


Download ppt "Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive."

Similar presentations


Ads by Google