Docsity

CS 440 Homework 2: Translating FOPC Sentences and Unification, Assignments of Computer Science

Toggle sidebar
bg1
CS 440: Introduction to AI
Homework 2
Due: Tuesday, September 30th, 2008
Your answers must be concise and clear. Explain sufficiently that we can
easily determine what you understand. We will give more points for a brief
interesting discussion with no answer than for a bluffing answer.
1 Sentence Translation
This problem has two parts. In the first part, you are asked to translate some
first order predicate calculus (FOPC) sentences into English sentences. The
meanings of the predicates and functions in the FOPC sentences are given.
You should give as natural the English translations as possible. Few points
will be given for an English sentence like “For all xthere exists a ysuch that
either Pof xand yor Qof y.” In the second part, you are asked to translate
English sentences into FOPC sentences. If the meaning of the English sentence
is ambiguous, give all possible readings. Note that sometimes and,or, and if
should not be directly translated into ∧,∨, and ⇒in FOPC. Please define every
predicate and function you use in your FOPC sentences whenever they are not
clearly self-explanatory.
If there is a sentence that cannot be translated, please state so and clearly
explain why not.
If you do nat have access to the symbols used in FOPC, make the following
six substitutions in part 2:
∧/\ (slash, backslash)
∨\/ (backslash, slash)
∀forall
∃exists
¬ −
⇒=>(equals, greater than)
Predicate symbol definitions for part 1:
Thief(x)xis a thief
1
pf3
pf4
pf5

Partial preview of the text

Download CS 440 Homework 2: Translating FOPC Sentences and Unification and more Assignments Computer Science in PDF only on Docsity!

CS 440: Introduction to AI

Homework 2

Due: Tuesday, September 30th, 2008

Your answers must be concise and clear. Explain sufficiently that we can easily determine what you understand. We will give more points for a brief interesting discussion with no answer than for a bluffing answer.

1 Sentence Translation

This problem has two parts. In the first part, you are asked to translate some first order predicate calculus (FOPC) sentences into English sentences. The meanings of the predicates and functions in the FOPC sentences are given. You should give as natural the English translations as possible. Few points will be given for an English sentence like “For all x there exists a y such that either P of x and y or Q of y.” In the second part, you are asked to translate English sentences into FOPC sentences. If the meaning of the English sentence is ambiguous, give all possible readings. Note that sometimes and, or, and if should not be directly translated into ∧, ∨, and ⇒ in FOPC. Please define every predicate and function you use in your FOPC sentences whenever they are not clearly self-explanatory. If there is a sentence that cannot be translated, please state so and clearly explain why not. If you do nat have access to the symbols used in FOPC, make the following six substitutions in part 2:

∧ /\ (slash, backslash)

∨ / (backslash, slash)

∀ forall

∃ exists

¬ −

⇒ => (equals, greater than)

Predicate symbol definitions for part 1:

Thief(x) x is a thief

Cop(x) x is a cop

Student(x) x is a student

Bike(x) x is a bike

Owns(x, y) x is the owner of y

Stolen by(x, y) x is stolen by y

Caught by(x, y) x is caught by y

Accomplice(x, y) x and y are accomplices

  1. FOPC to English (a) ∀x(¬Student(x) ∨ ¬Cop(x)) Nobody is both a student and a cop. (b) ∀x∀y((∃z(Bike(z) ∧ Stolen by(z, x) ∧ Accomplice(x, y))) ⇒ Thief(x ∧ y)) Cannot be translated. ∧ can only be applied to things that are truth- valuable, not to variables that denote objects in the world. (c) ∀x(Student(x) ⇒ ∃y∃z(Bike(y)∧Thief(z)∧Owns(x, y)∧Stolen by(y, z))) Every student has a bike that is stolen by some thief. (d) ¬∀x∀y(Bike(x)∧Thief(y)∧Stolen by(x, y) ⇒ ∃z(Cop(z)∧Caught by(y, z))) Not all bike thieves are caught by a cop.
  2. English to FOPC (a) Without the wind (blowing over the grass), the grass does not move. ∀x(Grass(x) ⇒ ((¬∃y(Wind(y) ∧ Blows over(y, x))) ⇒ ¬Moves(x))) (b) Some American people do not speak English. ∃xAmerican(x) ∧ ¬Speaks(x, English) (c) Every CS440 student has an overdue project. ∀x(Student(x) ∧ Takes(x, CS440 )) ⇒ ∃y(Project(y) ∧ Overdue(y) ∧ Has(x, y)) ∃x∀y(Project(x) ∧ Overdue(x) ∧ ((Student(y) ∧ Takes(y, CS440 )) ⇒ Has(y, x))) (d) The Fighting Illini is the team that won the most of games in the Big Ten conference. ∃x(Number of games won(FightingIllini, x)∧∀y∀z((Big Ten team(y)∧ Different(y, x)∧Number of games won(y, z)) ⇒ Greater then(x, z))) (e) Some politicians can fool some of the people all of the time, and some politicians can fool all of the people some of the time, but no politician can fool all of the people all of the time. (∃x∃y∀z((politian(x)∧person(y))∧(time(z) ⇒ can fool when(x, y, z))))∧ (∃x∃z∀y((politian(x)∧time(z))∧(person(y) ⇒ can fool when(x, y, z))))∧ ¬(∃x∀y∀z(politian(x)∧((person(y)∧time(z)) ⇒ can fool when(x, y, z))))

3 Clause Form and Resolution Refutation

Consider the following English sentences. They are already translated into FOPC sentences.

(1) Every UIUC student has been to the ARC (Activities and Recreation Center). ∀x(UIUC student(x) ⇒ Been to(x, ARC ))

(2) Leland is a UIUC student. UIUC student(Leland )

(3) There is a swimming pool in ARC. ∃x(Is swimming pool(x) ∧ Locate in(x, ARC ))

(4) If a person has swum somewhere, then the person has a swimming suit. ∀x((∃y, Swum in(x, y)) ⇒ (∃y(Is swimming suit(y) ∧ Owns(x, y))))

(5) Leland does not have any swimming suit. ¬∃x(Is swimming suit(x) ∧ Owns(Leland , x))

(6) If a person who can swim has been to somewhere with a swimming pool then the person has swum in that place. ∀x∀y((Can swim(x)∧Been to(x, y)∧(∃z(Is swimming pool(z)∧Locate in(z, y)))) ⇒ Swum in(x, y))

  1. Convert FOPC sentences (1) to (6) into clause form. Number each clause using the original labels (1) through (6). If sentence (i) is converted into several clauses, number them in the style (i.1), (i.2), etc. Remember to standardize the variables apart and Skolemize properly.

(1) {¬UIUC student(x 1 ), Been to(x 1 , ARC )} (2) {UIUC student(Leland )} (3.1) {Is swimming pool(Sk 1 )} (3.2) {Located in(Sk 1 , ARC )} (4.1) {¬Swum in(x 2 , y 1 ), Is swimming suit(Sk 2 (x 2 ))} (4.2) {¬Swum in(x 3 , y 2 ), Owns(x 3 , Sk 2 (x 3 ))} (5) {¬Is swimming suit(x 4 ), ¬Owns(Leland , x 4 )} (6) {¬Can swim(x 5 ), ¬Been to(x 5 , y 3 ), ¬Is swimming pool(z 1 ), ¬Located in(z 1 , y 3 ), Swum in(x 5 , y 3 )}

  1. We want to use resolution refutation to prove that Leland can not swim. Give the FOPC representation of the negated goal, and convert it into clause form. Number this clause as (7). Negated goal: Can swim(Leland )

(7) {Can swim(Leland )}

  1. Use resolution refutation to prove that Leland can not swim. That is, give a derivation of the empty clause {} from clauses (1) through (7). In each step please clearly indicate the clauses and unifiers used, and write down and label the derived clauses. Remember to standardize the variables apart.

(8) {Been to(Leland , ARC )} {x 1 = Leland } (1) and (2) (9) {¬Swum in(x 6 , y 4 ), ¬Owns(Leland , Sk 2 (x 6 ))} {x 4 = Sk 2 (x 2 )} (4.1) and (5) (10) {¬Swum in(Leland , y 5 ), ¬Swum in(Leland , y 6 )} {x 3 = Leland , x 6 = x 3 } (4.2) and (9) (11) {¬Been to(Leland , y 7 ), ¬Is swimming pool(z 2 ), ¬Located in(z 2 , y 7 ), Swum in(Leland , y 7 )} {x 5 = Leland } (6) and (7) (12) {¬Is swimming pool(z 3 ), ¬Located in(z 3 , ARC ), Swum in(Leland , ARC )} {y 7 = ARC } (8) and (11) (13) {¬Located in(Sk 1 , ARC ), Swum in(Leland , ARC )} {z 3 = Sk 1 } (3.1) and (12) (14) {Swum in(Leland , ARC )} {} (3.2) and (13) (15) {¬Swum in(Leland , y 8 )} {y 5 = ARC } (10) and (14) (16) {} {y 8 = ARC } (14) and (15)

  1. Give the proof tree of your derivation. The lowest node is the empty clause. You are allowed to draw this part by hand and attach the scanned drawing with your submission or hand in the hard copy of the tree. Make sure your submission is clearly legible.