DOC PREVIEW
U of I CS 498 - Knowledge Repn. & Reasoning

This preview shows page 1-2-17-18-19-36-37 out of 37 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 37 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Knowledge Repn. & Reasoning Lec. #6: First-Order InferenceTodayResolution Theorem ProvingSlide 4Slide 5First-Order ResolutionSlide 7Resolution in ActionSlide 9Slide 10First-Order Resolution RuleUnificationSlide 13Slide 14Slide 15Finding the MGUSlide 17Slide 18Slide 19Slide 20Slide 21Finding the MGU: another exampleSlide 23Slide 24Slide 25Slide 26Slide 27Correctness of FOL ResolutionSimple Efficiency ImprovementsSlide 30Properties of ResolutionRelated to FOL ResolutionSummary So FarSituation CalculusSlide 35NotationsNext TimeKnowledge Repn. & ReasoningLec. #6: First-Order InferenceUIUC CS 498: Section EAProfessor: Eyal AmirFall Semester 2004Today•Until now: –First-order logic basics–Clausal form for FOL•Resolution refutation for FOL•Application du jour: Temporal Reasoning•Applications we will not touch–Spatial reasoning, formal verification, mathematics, planning, NLP, …Resolution Theorem Proving•Given:–KB – a set of first-order sentences–Query Q – a logical sentence•Calling procedure:1. Add Q to KB2. Convert KB into clausal form3. Run theorem prover. If we prove contradiction, return T.Resolution Theorem Proving1. Add Q to KB2. Convert KB into clausal form3. Run theorem prover. If we prove contradiction, return T. Deduction theorem:KB Q iff KB  Q FALSE╨╨Resolution Theorem Proving1. Add Q to KB2. Convert KB into clausal form3. Run theorem prover. If we prove contradiction, return T. Deduction theorem:KB Q iff KB  Q FALSE╨╨First-Order Resolution•Resolution inference rule:C1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}First-Order Resolution•Resolution algorithm (saturation):1. While there are unresolved C1,C2:(1) Select C1, C2 in KB(2) If C1, C2 are resolvable, resolve them into a new clause C3(3) Add C3 to KB(4) If C3={ }return T.2. STOPC1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}Resolution in Action)()()()()()()()()()()()()()()()(AaBfAcBfCercwfCezaBfycAatfsaxcxaOn boardNegated QueryKBC1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}Resolution in Action)()()()()()()()()()()()()()()()(AaBfAcBfCercwfCezaBfycAasfsaxcxaOn boardNegated QueryKBC1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}First-Order Resolution•Resolution algorithm (saturation):1. While there are unresolved C1,C2:(1) Select C1, C2 in KB(2) If C1, C2 are resolvable, resolve them into a new clause C3(3) Add C3 to KB(4) If C3={ }return T.2. STOPC1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}First-Order Resolution Rule(2) If C1, C2 are resolvable, resolve them into a new clause C3If C1,C2 have two literals l1,l2 with same predicates (P) and opposite polarity, andIf l1= P(t1,…,tk), l2= P(s1,…,sk), unifiablewith mgu (most general unifier) {r1,…,rn},then…C1: P(t1,…,tk)  C1’(t1,…,tk)C2: P(s1,…,sk)  C2’(s1,…,sk)mgu(<t1,…,tk>,<s1,…,sk>) = {r1,…,rn}--------------------------------------------C3: (C1’  C2’) {r1,…,rn}Unification…P(t1,…,tk),P(s1,…,sk), unifiable with mgu (most general unifier) σ={r1,…rk}•Substitution: replace vars. by terms–Term: constant, variable, or a function of terms•Composition of substitutions{x/g(w,v)} {w/A,v/f(B,z)} ={x/g(A,f(B,z),w/A,v/f(B,z)}(P(x) v Q(f(x)) v P(g(B,x)) v P(f(y))) {x/B,y/z}(P(B) v Q(f(B)) v P(g(B,B)) v P(f(z))){x/B,y/z} {x/B,y/z,x/w} {x/B,y/z,z/w}Unification•Unification: find a substitution σ for•C1: P(t1,…,tk)  C1’(t1,…,tk)•C2: P(s1,…,sk)  C2’(s1,…,sk)such that P(t1,…,tk)σ = P(s1,…,sk)σP(A,y,g(x,y)){y/f(A)} = P(z,f(z),g(x,f(w))){z/A,w/A}σ={y/f(A),z/A,w/A}P(A,y,g(x,y)){y/f(w)} = P(z,f(w),g(x,f(w))){z/A}σ={y/f(w),z/A}Most general unifierUnification•Substitution σ1 more general than σ2 if there is substitution γ such thatσ1 γ = σ2P(A,y,g(x,y)){y/f(A)} = P(z,f(z),g(x,f(w))){z/A,w/A}σ={y/f(A),z/A,w/A}P(A,y,g(x,y)){y/f(w)} = P(z,f(w),g(x,f(w))){z/A}σ={y/f(w),z/A}Most general unifierUnification•Substitution σ1 more general than σ2 if there is substitution γ such thatσ1 γ = σ2σ2={y/f(A),z/A,w/A}σ1={y/f(w),z/A}Most general unifierγ={w/A}Finding the MGUProcedure MGU(x,y)1. If x=y, return { }2. If x or y are vars., return MGUvar(x,y)3. If x or y are const.,or Len(x)=/=Len(y), return F.4. σ ← { }; For i ← 1 to Len(x)1. s ← MGU(part(i,x),part(i,y)); if s=F, return F.2. σ ← compose(σ,s); x ← subst(x,σ); y ← subst(y,σ); 5. Return σx = P(A,y,g(x,y)) y = P(z,f(w),g(v,w))Finding the MGUProcedure MGU(x,y)1. If x=y, return { }2. If x or y are vars., return MGUvar(x,y)3. If x or y are const.,or Len(x)=/=Len(y), return F.4. σ ← { }; For i ← 1 to Len(x)1. s ← MGU(part(i,x),part(i,y)); if s=F, return F.2. σ ← compose(σ,s); x ← subst(x,σ); y ← subst(y,σ); 5. Return σx = P(A,y,g(x,y)) y = P(z,f(w),g(v,w))Finding the MGUProcedure MGU(x,y)1. If x=y, return { }2. If x or y are vars., return MGUvar(x,y)3. If x or y are const.,or Len(x)=/=Len(y), return F.4. σ ← { }; For i ← 1 to Len(x)1. s ← MGU(part(i,x),part(i,y)); if s=F, return F.2. σ ← compose(σ,s); x ← subst(x,σ); y ← subst(y,σ); 5. Return σx = P(A,y,g(x,y)) y = P(z,f(w),g(v,w))Finding the MGUProcedure MGU(x,y)1. If x=y, return { }2. If x or y are vars., return MGUvar(x,y)3. If x or y are const.,or Len(x)=/=Len(y), return F.4. σ ← { }; For i ← 1 to Len(x)1. s ← MGU(part(i,x),part(i,y)); if s=F, return F.2. σ ← compose(σ,s); x ← subst(x,σ); y ← subst(y,σ); 5. Return σx = P(A,y,g(x,y)) y = P(z,f(w),g(v,w))Finding the MGUProcedure MGU(x,y)1. If x=y, return { }2. If x or y are vars.,


View Full Document

U of I CS 498 - Knowledge Repn. & Reasoning

Documents in this Course
Lecture 5

Lecture 5

13 pages

LECTURE

LECTURE

39 pages

Assurance

Assurance

44 pages

LECTURE

LECTURE

36 pages

Pthreads

Pthreads

29 pages

Load more
Download Knowledge Repn. & Reasoning
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Knowledge Repn. & Reasoning and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Knowledge Repn. & Reasoning 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?