Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
24 views
Resolution Extra Examples
REpresentations in AI
Uploaded by
meghanaghogare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Resolution Extra Examples For Later
Download
Save
Save Resolution Extra Examples For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
24 views
Resolution Extra Examples
REpresentations in AI
Uploaded by
meghanaghogare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Resolution Extra Examples For Later
Carousel Previous
Carousel Next
Save
Save Resolution Extra Examples For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 7
Search
Fullscreen
Knowledge Representation Using Predicates Logic 1.Logical Representation Scheme We are only going to look at one logical representation scheme, namely, first-order predicate logic. Predicate lagic is more powerful than propositional logic as it allows for quantification. Facts are represented as logical propositions and additional information is deduced from these facts using backward chaining or resolution. Converting facts to logical propositions ‘The first step is to convert facts in English to logical propositions called well-formed formulas (wis). The wits include the following symbols: Implies: > And: A, Orv Not: ~ For all: ¥ The exists: 3 Example: Consider the following facts on Italian history: eenNogsepe Marcus was a man. Marcus was a Pompeian. All Pompeians were Roman. ‘Caesar was a ruler. All Romans were either loyal to Caesar or hated him ‘Everyone is loyal to someone. People only try to assassinate rulers that they are not loyal to. Marcus tried to assassinate Caesar. All men are people. These facts can be represented in predicate logic as the following wits: SPeNonaene man(Marcus) Pompeian(Marcus) ‘vx: Pompeian(x) > Roman(x) ruler(Caesar) ‘yx: Roman(x) — loyalto(x,Caesar) V hate(x,Caesar) ‘vx 3y: loyalto(x,y) ‘vx vy: person(x) / ruler(y) / tryassassinate(x,y) — ~loyalto(xy) tryassassinate(Marcus,Caesar) ‘vx: man(x) — person(x)3.2. Backward Chaining ‘Suppose that given the facts 1 to 9 in the previous section, we want to answer the question “Was Marcus loyal to Caesar"? We can prove this using backward chaining. Backward chaining matches a clause to the right-hand side of a rule (wif with an implies) and then attempts to prove the clauses on the left-hand of the rule. Alternatively, a clause can be matched against a ‘Single clause. Since wf 7 has a ~loyalto on the right-hand side we will attempt to prove ~loyalto(Marcus, Caesar): ~loyalto(Marcus, Gaesar) 17 person(Marcus) /\ ruler(Caesar) /\ tryassasinate(Marcus, Caesar) 18 person(Marcus) | ruler(Caesar) Using backward chaining we have proved that Marcus is not loyal to Caesar. Exercise 3 1. Consider the following facts: 4. John likes all kinds of food. 2. Apples are food. 3. Chicken is food 4. Anything anyone eats and is not killed by is food. 5. Bill eats peanuts and is still alive. 6. Sue eats everything Bill eats. a) Convert these facts to wffs in predicate logic. b) Using backward chaining prove the “John likes peanuts’. 2. Consider the following facts: Steve only likes easy courses. Science courses are hard. All the courses in the basketweaving department are easy. BK301 is a basketweaving course. Pope a) Convert these facts to wffs in predicate logic. b) Use backward chaining to answer the question “What course would Steve like?”‘Computable Functions and Predicates It may be neceseary to compute functions as part of a fac. In these cases a computable predicate 's used. A computable predicate may include computable funciions such as +, ~ * ‘etc. For example, gt(x-y.10) —bigger(x) contains the computable predicate gf which performs the greater than function. Note that this computable predicate uses the computable function ‘subtraction. Example: Consider the following statements: Marcus was a man. Marcus was Pompeian. Marcus was born in 40 A.D. All men are mortal. All Pompeians died when the voleane erupted in 79 A.D. No mertal lives longer than 150 years. Itis now 1991 Alive means not dead. If someone dies, he is dead at all later times. ‘The wifs for these facts are: man (Marcus) Pompeian(Marcus) born(Marous,40) vx: man(x) —» mortal(x) eruptedivoleano,79) /\ vx: Pompeian(x) —> died(x.79) x Vts Yte: mortal(x) A born(x.ts) A gtit2-t1,150) > dead(x.te) now= 1991 vx Wt: [alive(x,t) + ~dead(xt)] A [-dead(x) —alive(x,t)] vx Wt; Vtaidied(x,ts) \ gt.) —-dead(x.ta) ‘Suppose we want to answer the question "Is Marcus alive now?”. We can do this by either proving alive(Marcus,now) or ~alive(Marcus,now). Let us try the latter: ‘dead(Marcus,now)} | nagation operation dead(Narcus.now) 19 died\Marcus.t) A gt(now.s) 5 erupiedielesno-79)/ Pempeian(Marcts) gn0¥,79) taste annow.75) 1 ‘9t(1991,79) J compute ot nilResolution In the previous sections facts were proved or queries were answered using backward chaining. In this section we will examine the use of resolution for this purpose. Resolution proves facts ‘and answers queries by refutation. This involves assuming the facvquery is untrue and reaching a contradiction which indicates that the opposite must be true. The wis must firstly be firstly converted to clause form before using resolution. The algorithm for converting wfis to clause form and the resolution algorithm are listed below. Algorithm: Converting wits to Clause Form 1 2. 10. Remove all implies, i.e. — by applying the following: a — bis equivalent to ~a Vb. Use the following rules to reduce the scope of each negation operator to a singleterm: © -(a)=a Each quantifier must be linked to a unique variable. For example, consider Wx: p(x) V ‘vx: q(x). In this both quantifiers are using the same variable and one must changed to another variable: Vx: p(x) V vy: aty). Move all quantifiers, in order, to the left of each wif. Remove existential quantifiers by using Skolem constants or functions. For example, 3x: P(x) becomes (51) and vx 3y: g(x,y) is replaced with Vx: q(s2(x), x). Drop the quantifier prefix. Apply the associative property of disjunctions: aV (b Vc) = (a/b) Vc andremove brackets giving a/b Vc. Remove all disjunctions of conjunctions from predicates, i.e. create conjunctions of disjunctions instead, by applying the following rule iteratively: (a/\b) c= (ac) A (DV ). Create a separate clause for each conjunction. Rename variables in the clauses resulting from step 9. to ensure that no two clauses refer to the same variable.Algorithm: Resolution 1. Convert the wis to clause form. 2. Add the fact (or query) P to be proved to the set of clauses: Negate P. ii, Convert negated P to clause form. Add the result of ii to the set of clauses. 3. Repeat Select two clauses. Resolve the clauses using unification. If the resolvent clause is the empty clause, then a contradiction hasbeen reached. If not add the resolvent to the set of clauses. Until (a contradiction is found OR no progress can be made) Consider the following wits: man(Marcus) Pompeian(Marcus) vx: Pompeian(x) > Romani(x) ruler(Caesar) x: Roman{x) — loyalto(x,Caesar) V hate(x,Caesar) vx ay: loyalto(xy) vx vy: person(x) /\ ruler(y) /\ tryassassinate(x,y) — ~loyalto(x,y) tryassassinate(Marcus, Gaesar) x: man(x) — person(x) SOENeNsena Converting these to clause form gives: man(Marcus) Pompeian(Marcus) ~Pompeian(x) V Roman(x) ruler(Caesar) ~Roman(x1) V loyalto(x1 Caesar) V hate(x1,Caesar) loyalto(x2,s1(x2)) ~person(x3) V ~ruler(y) V ~tryassassinate(x3.y) V ~loyalto(x3.y) tryassassinate(Marcus, Caesar) ~man(x4) V person(x4) Senonseons11. ~died(x5,14) V ~gt(t5.t4) V dead(x5,t5) We want to prove ~alive(Marcus,now). We negate this and convert it clause form: alive(Marcus, now) and find a contradication: alive(Marcus,now) 110 dead(Marcus,now) ww ~died(Marcus.t4) V~gt(now,t4) 16 ~Pompeian(Marcus) V~gt(now,79) 12 ~at(now,t4) 18 ~gt (191,79) 1 Exercise 4 1. Consider the following facts: 1. John likes all kinds of food. 2. Apples are food. 3. Chicken is food 4. Anything anyone eats and is not killed by is food. eats peanuts and is stil alive. 6. Sue eats everything Bill eats. a) Convert the wits for these facts (which you created in Exercise 3) to clause form. b) Using resolution prove that “John likes peanuts". 2. Consider the following facts: Steve only likes easy courses. Science courses are hard. All the courses in the basketweaving department are easy. BK301 is a basketweaving course. Beppe a) Convert the wits for these facts (which you created in Exercise 3) to clause form. b) Use resolution to answer the question “What course would Steve like?”
You might also like
Answer:: Convert The Following To Clausal Form
PDF
No ratings yet
Answer:: Convert The Following To Clausal Form
10 pages
AI-U4
PDF
No ratings yet
AI-U4
7 pages
17-KR-Representing Simple Facts-Predicate Logic
PDF
75% (4)
17-KR-Representing Simple Facts-Predicate Logic
64 pages
Chapter 4 Using Predicate Logic
PDF
No ratings yet
Chapter 4 Using Predicate Logic
22 pages
3 and 4 Predicate - Logic - SAV
PDF
No ratings yet
3 and 4 Predicate - Logic - SAV
68 pages
Predicate Logic
PDF
No ratings yet
Predicate Logic
48 pages
n5474411399520 2 PDF
PDF
No ratings yet
n5474411399520 2 PDF
42 pages
Chapter 7 Logic
PDF
0% (1)
Chapter 7 Logic
43 pages
Logical Representations and Resolution
PDF
No ratings yet
Logical Representations and Resolution
47 pages
Artificial Intelligence Slides
PDF
No ratings yet
Artificial Intelligence Slides
291 pages
Chapter 5
PDF
No ratings yet
Chapter 5
43 pages
Unit 3 Knowledge Representation
PDF
No ratings yet
Unit 3 Knowledge Representation
26 pages
4 Predicate Logic
PDF
No ratings yet
4 Predicate Logic
37 pages
Logic PDF
PDF
No ratings yet
Logic PDF
66 pages
Ai Mod2@Azdocuments - in
PDF
No ratings yet
Ai Mod2@Azdocuments - in
52 pages
using-predicate-logic
PDF
No ratings yet
using-predicate-logic
22 pages
Predicate Logic
PDF
No ratings yet
Predicate Logic
64 pages
Propositional Calculus: Logical Agents
PDF
No ratings yet
Propositional Calculus: Logical Agents
11 pages
Ch8 LogicalRepresentationAndReasoning
PDF
No ratings yet
Ch8 LogicalRepresentationAndReasoning
67 pages
Predicate Logic
PDF
No ratings yet
Predicate Logic
60 pages
Using Predicate Logic: Representation of Simple Facts in Logic
PDF
No ratings yet
Using Predicate Logic: Representation of Simple Facts in Logic
10 pages
Lecture Notes 3-8 To 18-8 Predicate Logic
PDF
No ratings yet
Lecture Notes 3-8 To 18-8 Predicate Logic
11 pages
Clausal Form, Resolution
PDF
No ratings yet
Clausal Form, Resolution
16 pages
UNIT 3 AI_IMSC
PDF
No ratings yet
UNIT 3 AI_IMSC
13 pages
Unit 2:: Knowledge Representation
PDF
No ratings yet
Unit 2:: Knowledge Representation
19 pages
Predicate Logic: World and Can Be Constants, Variables or
PDF
No ratings yet
Predicate Logic: World and Can Be Constants, Variables or
34 pages
Using Predicate Logic
PDF
No ratings yet
Using Predicate Logic
29 pages
Predicate Resolution RichKnight
PDF
No ratings yet
Predicate Resolution RichKnight
20 pages
BCS Lecture3 2015
PDF
No ratings yet
BCS Lecture3 2015
56 pages
18-20-Resolution in Predicate Logic
PDF
100% (1)
18-20-Resolution in Predicate Logic
39 pages
B-8-Fopl and Resolution
PDF
No ratings yet
B-8-Fopl and Resolution
39 pages
B-8-Fopl and Resolution
PDF
No ratings yet
B-8-Fopl and Resolution
39 pages
Chapter 5
PDF
No ratings yet
Chapter 5
57 pages
15 KB Systems Part3 6up
PDF
No ratings yet
15 KB Systems Part3 6up
7 pages
Ai Chapter-4
PDF
No ratings yet
Ai Chapter-4
13 pages
AI-unit-3
PDF
No ratings yet
AI-unit-3
154 pages
Artificial Intelligence: Using Predicate Logic
PDF
No ratings yet
Artificial Intelligence: Using Predicate Logic
64 pages
Ai Mod2@Azdocuments - in
PDF
No ratings yet
Ai Mod2@Azdocuments - in
52 pages
Ainotes Module2 Updated
PDF
No ratings yet
Ainotes Module2 Updated
36 pages
UNIT - III
PDF
No ratings yet
UNIT - III
23 pages
notes
PDF
No ratings yet
notes
3 pages
Artificial Intelligence (Predicate Logic)
PDF
No ratings yet
Artificial Intelligence (Predicate Logic)
29 pages
UNIT 3 KR Predicate Logic
PDF
No ratings yet
UNIT 3 KR Predicate Logic
53 pages
16 FirstOrderLogic
PDF
No ratings yet
16 FirstOrderLogic
79 pages
Ch5: Using Predicate Logic
PDF
No ratings yet
Ch5: Using Predicate Logic
55 pages
Lec13 Fol
PDF
No ratings yet
Lec13 Fol
38 pages
Knowledge based agents -1
PDF
No ratings yet
Knowledge based agents -1
11 pages
Predicate Logic
PDF
No ratings yet
Predicate Logic
60 pages
Predicate Logic
PDF
No ratings yet
Predicate Logic
14 pages
Unit III
PDF
No ratings yet
Unit III
10 pages
Homework 4: Dana Asbury November 12, 2015
PDF
No ratings yet
Homework 4: Dana Asbury November 12, 2015
3 pages
The Facts:: Limitation of Propositional Logic
PDF
No ratings yet
The Facts:: Limitation of Propositional Logic
16 pages
Ai-Module Iii
PDF
No ratings yet
Ai-Module Iii
22 pages
FAI_Unit-2
PDF
No ratings yet
FAI_Unit-2
31 pages
Resolution in FOL
PDF
No ratings yet
Resolution in FOL
22 pages
Kohlberg Theory of Moral Development: Meghana Tribhuwan
PDF
No ratings yet
Kohlberg Theory of Moral Development: Meghana Tribhuwan
19 pages
Meghana Tribhuwan
PDF
No ratings yet
Meghana Tribhuwan
11 pages
K-Means Clustering Using Python
PDF
No ratings yet
K-Means Clustering Using Python
30 pages
Chapter 5 Software Effort Estimation
PDF
50% (2)
Chapter 5 Software Effort Estimation
11 pages