inferenceandresolutionforproblemsolving定理的自动证明决策支援.ppt

inferenceandresolutionforproblemsolving定理的自动证明决策支援.ppt

inferenceandresolutionforproblemsolving定理的自动证明决策支援

* Contents What is Logic? Normal Forms Converting to CNF Clauses The Resolution Rule Proof by Refutation Resolution Refutation Predicate Calculus Unification Skolemization Normal Forms in Predicate Calculus The Resolution Algorithm Examples * Predicate Calculus (述語推算) Predicate Calculus extends the syntax of propositional calculus with predicates and quantifiers: P(X) – P is a predicate. First Order Predicate Calculus (FOPC) allows predicates to apply to objects or terms, but not functions or predicates. * Quantifiers ? and ? ? - For all: ?xP(x) is read “For all x’es, P (x) is true”. ? - There Exists: ?x P(x) is read “there exists an x such that P(x) is true”. Relationship between the quantifiers: ?x P(x) ? ?(?x)?P(x) “If There exists an x for which P holds, then it is not true that for all x P does not hold”. ?x Like(x, War) ? ?(?x) ?Like(x, War) * Unification To resolve clauses we often need to make substitutions. For example: {(P(w,x)), (?P(a,b))} To resolve, we need to substitute a for w, and b for x, giving: {(P(a,b)), (?P(a,b))} We write the unifier we used above as: {a/w, b/x} Now these resolve to give falsum. (可完全消去) 對於 (?x) … 我們略去,因為規則庫都是通則 其中變數 x 須在 Resolution 過程之中進行代換。 e.g. 全城居民都相親相愛 * Skolemization Before resolution can be applied, ? must be removed, using skolemization. Variables that are existentially quantified are replaced by a constant: ?(x) P(x) e.g. ?(y) GoodMan(y) is converted to: P(c) e.g. GoodMan(c) c must not already exist in the expression. 那對於 (?x) … 我們要如何處理? 存在某人去刺殺暴君,被刺殺則死亡 { ?(x) kill(x, Caesar), ?(y,z) kill(y,z) ? die(z) } Qu: 暴君死亡了嗎? Ans: 死了(依代換過程,是那個 “刺殺暴君的人”殺的){ kill(killer(Caesar), Caesar), …} * Skolem functions If the existentially quantified variable is within the scope of a universally quantified variable, it must be replaced by a skolem function, which is a function of the universally quantified variable. Sounds complicated, but is actually simple: (?x)(?y)(P(x,y)) Is Skolemized to give:

文档评论(0)

1亿VIP精品文档

相关文档