4 Chapter Representation of Knowledge and Reasoning v1 (1) | Syntax (Logic) | Deductive Reasoning

Trường Đại học Công nghiệp Tp.

HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology)

Chapter 4: Representation of

knowledge and reasoning
 Teacher: Lê Ngọc Tấn Email: letan.dhcn@gmail.com http://lengoctan.wordpress.com

 

Blog:

Artificial Intelligence - Chapter 4 - Page 1

information and/or skills acquired through experience or education (Source: WIKIPEDIA) Artificial Intelligence . the inference must be guided by knowledge Inference <> Reasoning Inference with / without knowledge representation Knowledge => ability to mobilize information to act The transition from INFORMATION to KNOWLEDGE is associated to the experience of the action => no clearly defined boundary Definition: Knowledge = information (data) that influences a process. No universal classification of different types of knowledge (see the attempt of Porphyry) Knowledge is a familiarity with someone or something that can include facts.Chapter 4 .Trường Đại học Công nghiệp Tp.Page 2 . HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Knowledge and reasoning? The inference is the basic element of any description of cognition To be effective. descriptions.

Y) 7) ∀X. caesar) 6) ∀X. ∃ Y loyalto (X.Chapter 4 .Page 3 . caesar) Artificial Intelligence .Y) 8) trytoassasinate (marcus.Trường Đại học Công nghiệp Tp. caesar) ∨hate(X. caesar) Demonstrate ¬loyalto(marcus. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Example 1: Consider an example with a set of sentences in predicate logic calculus: 1) man (marcus) 2) pompeian (marcus) 3) ∀X pompeian (X) → roman(X) 4) ruler (caesar) 5) ∀X roman(X) → loyalto(X.∀Y person(X) ∧ruler(Y) ∧trytoassasinate(X) → ¬loyalto (X.

caesar) ↑ (point 8) person (marcus) Marcus is a man ? => Marcus is a person. caesar) ↑ (point 4) person(marcus) ∧trytoassasinate(marcus.Chapter 4 .Trường Đại học Công nghiệp Tp. caesar) ↑ (point 7. So.Page 4 . {marcus/X. ceasar/Y}) person(marcus) ∧ruler(caesar) ∧ trytoassasinate (marcus. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) The schema below illustrates a solution: ¬loyalto (marcus. we have to add 9) ∀X man(X) ∨woman(X) → person(X) Artificial Intelligence .

Chapter 4 . HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Resolution Transform to the Clause form The basis of resolution Propositional logic Resolution Principle Predicate logic Resolution Principle Some issues related to the resolution algorithm: The resolution can detect the non-conflict cases .Review about the resolution - Artificial Intelligence .Answer the questions .Trường Đại học Công nghiệp Tp.Page 5 . predicate calculus and the equal relationship .Use the calculation functions.

Z) ∨ thinkcrazy(X.Chapter 4 . we have to transform the WFF to a set of the clauses.Marcus) ∨hate(X.Page 6 . Artificial Intelligence . HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Transform to the clause form * Requirements : Consider: ∀X [roman (X) ∧know (X.Caesar) ∨(∀Y.∃ ) are separated from the rest.Y))] The formula will be easier to execute if : − Less elements in the formula.Y) In order to use the Robinson algorithm.Caesar) ∨ ¬hate(Y.marcus) → [hate(X. − The quantum variables (∀. Conjunctive Normal Form (CNF) of the above formula: ¬roman (X) ∨¬know (X. Clause: is a WFF in CNF form without the presence of the connector And (∧ or in the other word.Trường Đại học Công nghiệp Tp.Z) → thinkcrazy(X. ) variables (literal). ∃ Z hate(Y. each clause is the union (∨ of the clause ).

¬∀X p(X) = ∃ X ¬p(X) or ¬∃X p(X) = ∀X ¬p(X) Normalize variables so that each quantum is only connected to a single variable.Page 7 . 2. E.Chapter 4 .Trường Đại học Công nghiệp Tp. 4. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Algorithm to transform proposition to the clause 1.g. Suppress the symbol → a → b = ¬a ∨b Eliminate the operator ¬ a.g. 5. Remove all quantum ∃ . Artificial Intelligence . 3. De Morgan rules ¬(a ∧b) = ¬a ∨¬b or ¬(a ∨b) = ¬a ∧¬b c.: ∃ Y president(Y) transformed to president(S1) With S1 is a function returns values suitable to president predicate.: ∀X p(X) ∨∀X q(X)  ∀X p(X) ∨∀Y q(Y) Move all quantums to the left. ¬(¬p) = p b. E.

S1 is called Skolem constancy.Page 8 .X)  ∀X father_of (S2(X). HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) E.Chapter 4 . we can split into 4 clauses.Trường Đại học Công nghiệp Tp.g.g.g.X) S1.: (winter ∧wearingboots) ∨(summer ∧wearingsandals)  [ (winter ∨(summer ∧wearingsandals) ] ∧[ wearingboots ∨(summer ∧wearingsandals)]  (winter ∨summer) ∧(winter ∨wearingsandals) ∧ (wearingboots ∨summer) ∧(wearingboots ∨wearingsandals) 8. 6.: ∀X ∃ Y father_of (Y. Create the separated clauses E. Eliminate the general quantum 7.Transform the formula in form of association of union (a ∧b) ∨c = (a ∨c) ∧(b ∨c) or (a ∨b) ∧c = (a ∧c) ∨(b ∧c) E. Artificial Intelligence . S2 are called Skolem functions.: from the result in the step 7.

e.Trường Đại học Công nghiệp Tp. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) 9.Chapter 4 . Normalize the variables in the set of clauses created in the step 8. Artificial Intelligence . rename variables such that two clauses don’t have the same name.Page 9 . i.

∃ Z hate(Y.Y))] 3.Y))] Artificial Intelligence .Y))] 2. ∀Z [¬roman (X) ∨¬know (X. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Example to transform proposition to the clause ∀X [roman (X) ∧ know (X.marcus)] ∨ [hate(X. Suppress the symbol → ∀X ¬ [roman (X) ∧know (X.marcus) → [hate(X. Normalize the variables 4.Z) ∨thinkcrazy(X. Place ¬ inside ∀X [¬roman (X) ∨¬know (X.caesar) ∨(¬hate(Y.caesar) ∨(¬hate(Y. ¬( ∃ Z hate(Y.Chapter 4 .Z) ∨thinkcrazy(X.Z) ∨thinkcrazy(X. Eliminate the general quantum [¬roman (X) ∨¬know (X.caesar) ∨(∀Y.Y))] 5.caesar) ∨(∀Y. ∀Y.marcus)] ∨ [hate(X. Remove the existantial quantums 6. Move all quantums to the left ∀X. ∀Z ¬hate(Y.Page 10 .Trường Đại học Công nghiệp Tp.Y))] 1.caesar) ∨ (∀Y.Z)) ∨thinkcrazy(X.marcus)] ∨ [hate(X.Z) → thinkcrazy(X.marcus)] ∨ [hate(X.

Trường Đại học Công nghiệp Tp.Page 11 .caesar) ∨¬hate(Y. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Transform to the association of union: because the formula above has no longer the operator AND.Z) ∨thinkcrazy(X. so we eliminate the brackets.Y) 7.marcus) ∨ hate(X. Artificial Intelligence . We have: ¬roman (X) ∨¬know (X.Chapter 4 .

Page 12 . two clauses. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) The basis of Resolution The resolution procedure is a simple iterative process: at each iteration. called father clauses. Artificial Intelligence . that means the target has been demonstrated.Trường Đại học Công nghiệp Tp. are compared (resolved).Chapter 4 . Suppose the system has two clauses: winter ∨summer and ¬winter ∨cold can be derived to: summer ∨cold If the result is empty. to generate new clauses. then we consider to have found the contradiction.

The clause result is the union of all clause variables in the father clauses except: if there are any pairs of clause variables L and ¬L.Chapter 4 . Requirement: demonstrate P. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Resolution in Propositional Logic Given: A set of F axioms is sentences in propositional calculus. then select a pair and remove both L and ¬L from the clause result. Add it to the set of clauses created in step 1. add this clause result to the set of clauses. Repeat until we found the contradiction or cannot continue: a. b. Resolve them. then we consider to have found the contradiction. If the result is empty. They are called father clauses.Page 13 . Artificial Intelligence .Trường Đại học Công nghiệp Tp. Choose two clauses. * Algorithm (Propositional Logic): 1) 2) 3) Transform all sentences of F in clause form Get the negation of P and transform in clause form. c. If not.

Page 14 (1) (2) (3) (4) (5) Demonstrate ¬R: ¬P ∨¬Q ∨R ¬P ∨¬Q ¬T ∨Q T .Trường Đại học Công nghiệp Tp. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Example of resolution in propositional logic Propositions P (P ∧Q) → R (S ∨T) → Q T Transform to clause form P ¬P ∨¬Q ∨R ¬S ∨Q ¬T ∨Q T ¬R P ¬Q ¬T  Artificial Intelligence .Chapter 4 .

Resolve them. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Resolution in Predicate Logic Given: A set of F axioms is sentences in predicate calculus. Add it to the set of clauses created in step 1. and if they can be unifiable.Chapter 4 . Choose two clauses. T1 and T2 are the clause complementary literals variables. Artificial Intelligence . If the result is empty. * Algorithm (Predicate Logic): Transform all sentences of F in clause form 2) Get the negation of P and transform in clause form. If not. c. The clause result is the union of all clause variables in the father clauses with substitution and minus rules: if there are any pairs of clause variables T1 and ¬T2. Requirement: demonstrate P. then we consider to have found the contradiction. b. Use the set of substitutions by the unification algorithm to generate the clause result. add this clause result to the set of clauses. 3) Repeat until we found the contradiction or cannot continue: 1) a. They are called father clauses. then select a pair and remove both T1 and ¬T2 from the clause result.Page 15 .Trường Đại học Công nghiệp Tp.

caesar) ¬ ruler (caesar) ∨¬ tryassasinate (marcus. caesar / Y1 ¬ man(marcus) ∨¬ruler(caesar) ∨ ¬ tryassasinate (marcus. caesar) Demonstrate: hate (marcus.Trường Đại học Công nghiệp Tp. caesar) ¬ hate (marcus. fl(X3)) 7. tryassasinate (marcus. ¬man (X4) ∨¬ ruler (Y1) ∨¬ tryassasinate (X4. ¬roman (X2) ∨loyalto (X2. man (marcus) 2.Page 16 4 8 . pompeian (marcus) 3. caesar) 3 2 7 1 5 marcus / X2 ¬ roman (marcus) ∨loyalto (marcus. loyato (X3. caesar) marcus /X4. caesar) ¬ tryassasinate (marcus. caesar) 6. HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Example of resolution in predicate logic 1.Chapter 4 . Y1) ∨loyalto (X4. ruler (caesar) 5. caesar) ∨hate (X2. Y1) 8. caesar)  (ce qu’il faut démontrer) Artificial Intelligence . caesar) loyalto (marcus. ¬pompeian (X1) ∨Roman (X1) 4. caesar) marcus / X1 ¬ pompeian (marcus) ∨loyalto (marcus.

HCM Khoa Công Nghệ Thông Tin (Faculty of Information Technology) Artificial Intelligence .Trường Đại học Công nghiệp Tp.Chapter 4 .Page 17 .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.