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)
20 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)
20 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
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6125)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brene Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (932)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8214)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2922)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Tóibín
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2530)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
Kohlberg Theory of Moral Development: Meghana Tribhuwan
PDF
No ratings yet
Kohlberg Theory of Moral Development: Meghana Tribhuwan
19 pages
K-Means Clustering Using Python
PDF
No ratings yet
K-Means Clustering Using Python
30 pages
Meghana Tribhuwan
PDF
No ratings yet
Meghana Tribhuwan
11 pages
Chapter 5 Software Effort Estimation
PDF
50% (2)
Chapter 5 Software Effort Estimation
11 pages
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
Kohlberg Theory of Moral Development: Meghana Tribhuwan
PDF
Kohlberg Theory of Moral Development: Meghana Tribhuwan
K-Means Clustering Using Python
PDF
K-Means Clustering Using Python
Meghana Tribhuwan
PDF
Meghana Tribhuwan
Chapter 5 Software Effort Estimation
PDF
Chapter 5 Software Effort Estimation
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel