Docsity

Fol Sentence - Artificial Intelligence - Quiz, Exercises of Artificial Intelligence

Toggle sidebar
bg1
CS-271, Intro to A.I. — Quiz #3 — Winter Quarter, 2013 — 20 minutes
YOUR NAME AND EMAIL ADDRESS:
YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:
1. (30 pts total, 15 pts correct resolution, 15 pts correct proof) RESOLUTION THEOREM PROVING. You are
engaged in Knowledge Engineering for the Wumpus Cave. An expert on the Wumpus Cave tells you, among other things,
“A breeze in square (2,1) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (3,1).”
“A breeze in square (1,2) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (1,3).”
You translate this into propositional logic, “(B21 ⇔ P11 ∨ P22 ∨ P31),” and “(B12 ⇔ P11 ∨ P22 ∨ P13),” then CNF:
“(¬B21 ∨ P11 ∨ P22 ∨ P31) ∧ (¬P11 ∨ B21) ∧ (¬P22 ∨ B21) ∧ (¬P31 ∨ B21)”
“(¬B12 ∨ P11 ∨ P22 ∨ P13) ∧ (¬P11 ∨ B12) ∧ (¬P22 ∨ B12) ∧ (¬P13 ∨ B12)”
Now it is time for the first “live” test of your system. An agent has been lowered down into the Wumpus cave,
and reports back by radio, “I am alive, so Square (1,1) does not have a pit. Square (2,1) has a breeze. Square (1,2) does not
have a breeze” You translate this knowledge into propositional logic as “(¬P11) ∧ (B21) ∧ (¬B12)” .
Next the agent asks by radio, “Is it true that square (3,1) has a pit?” You translate this query into propositional
logic as the goal sentence “(P31)” and form the negated goal as “(¬P31).” Now your knowledge base plus negated goal is:
(¬B21 ∨ P11 ∨ P22 ∨ P31) (¬P11 ∨ B21) (¬P22 ∨ B21) (¬P31 ∨ B21)
(¬B12 ∨ P11 ∨ P22 ∨ P13) (¬P11 ∨ B12) (¬P22 ∨ B12) (¬P13 ∨ B12)
(¬P11) (B21) (¬B12) (¬P31)
Run resolution on this knowledge base until you produce the null clause, “( )”, thereby proving that the
goal sentence is true. The shortest proof I know of is only five lines, including the first example line. It is OK to
use more lines, if your proof is correct. SHOW YOUR WORK.
Repeatedly choose two clauses, write one clause in the first blank space on a line, and the other clause in
the second. Apply resolution to them. Write the resulting clause in the third blank space, and insert it into the
knowledge base. The first one is done for you as an example.
Resolve (¬B21 ∨ P11 ∨ P22 ∨ P31) and (B21) to give (P11 ∨ P22 ∨ P31).
Resolve and to give .
Resolve and to give .
Resolve and to give .
Resolve and to give .
Resolve and to give .
Resolve and to give .
Resolve and to give .
Resolve and to give .
**** TURN PAGE OVER AND CONTINUE ON THE OTHER SIDE ****
pf2

Partial preview of the text

Download Fol Sentence - Artificial Intelligence - Quiz and more Exercises Artificial Intelligence in PDF only on Docsity!

CS-271, Intro to A.I. — Quiz #3 — Winter Quarter, 2013 — 20 minutes

YOUR NAME AND EMAIL ADDRESS:

YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:

1. (30 pts total, 15 pts correct resolution, 15 pts correct proof) RESOLUTION THEOREM PROVING. You are

engaged in Knowledge Engineering for the Wumpus Cave. An expert on the Wumpus Cave tells you, among other things, “A breeze in square (2,1) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (3,1).” “A breeze in square (1,2) is equivalent to a pit in square (1,1) or a pit in square (2,2) or a pit in square (1,3).” You translate this into propositional logic, “(B21 ⇔ P11 ∨ P22 ∨ P31),” and “(B12 ⇔ P11 ∨ P22 ∨ P13),” then CNF: “(¬B21 ∨ P11 ∨ P22 ∨ P31) ∧ (¬P11 ∨ B21) ∧ (¬P22 ∨ B21) ∧ (¬P31 ∨ B21)” “(¬B12 ∨ P11 ∨ P22 ∨ P13) ∧ (¬P11 ∨ B12) ∧ (¬P22 ∨ B12) ∧ (¬P13 ∨ B12)” Now it is time for the first “live” test of your system. An agent has been lowered down into the Wumpus cave, and reports back by radio, “I am alive, so Square (1,1) does not have a pit. Square (2,1) has a breeze. Square (1,2) does not have a breeze” You translate this knowledge into propositional logic as “(¬P11) ∧ (B21) ∧ (¬B12)”. Next the agent asks by radio, “Is it true that square (3,1) has a pit?” You translate this query into propositional logic as the goal sentence “(P31)” and form the negated goal as “(¬P31).” Now your knowledge base plus negated goal is: (¬B21 ∨ P11 ∨ P22 ∨ P31) (¬P11 ∨ B21) (¬P22 ∨ B21) (¬P31 ∨ B21) (¬B12 ∨ P11 ∨ P22 ∨ P13) (¬P11 ∨ B12) (¬P22 ∨ B12) (¬P13 ∨ B12) (¬P11) (B21) (¬B12) (¬P31) Run resolution on this knowledge base until you produce the null clause, “( )”, thereby proving that the goal sentence is true. The shortest proof I know of is only five lines, including the first example line. It is OK to use more lines, if your proof is correct. SHOW YOUR WORK. Repeatedly choose two clauses, write one clause in the first blank space on a line, and the other clause in the second. Apply resolution to them. Write the resulting clause in the third blank space, and insert it into the knowledge base. The first one is done for you as an example.

Resolve (¬B21 ∨ P11 ∨ P22 ∨ P31) and (B21) to give (P11 ∨ P22 ∨ P31).

Resolve and to give.

Resolve and to give.

Resolve and to give.

Resolve and to give.

Resolve and to give.

Resolve and to give.

Resolve and to give.

Resolve and to give.

**** TURN PAGE OVER AND CONTINUE ON THE OTHER SIDE ****

2. (40 pts total, 8 pts each) ENGLISH TO FOPC CONVERSION. For each English sentence below, write the FOL sentence that best expresses its intended meaning. Use Dog(x) for “x is a dog,” Bone(x) for “x is a bone,” and Likes(x, y) for “x likes y.” The first one is done for you as an example.

2.a. “Every dog likes every bone.”

∀x ∀y [ Dog(x) ∧ Bone(y) ] ⇒ Likes(x, y)

2.b. (8 pts) “Some dog likes some bone.”

2.c. (8 pts) “For every dog, there is a bone that the dog likes.”

2.d. (8 pts) “For every bone, there is a dog that likes that bone.”

2.e. (8 pts) “There is a bone that every dog likes.”

2.f. (8 pts) “There is a dog that likes every bone.”

3. (30 pts total, 5 pts each) In each of the following, KB is a set of sentences, {} is the empty set of sentences, and S is a single sentence. Recall that |= is read “entails” and that |- is read “derives.” S = Sound. U = Unsound. C = Complete. I = Incomplete. Sat = Satisfiable. Unsat = Unsatisfiable. V = Valid. N = None of the above. For each blank below, write in the key above that corresponds to the best term (it is also OK to write the whole word).

3.a. (5 pts) Let S be given in advance. Suppose that {} |= S.

Then S is.

3.b. (5 pts) Let S be given in advance. Suppose that for some KB1, KB1 |= S; but that for some other KB2, KB2 |= ¬S.

Then S is.

3.c. (5 pts) Suppose that for any KB and any S, whenever KB |= S then KB |- S.

Then the inference procedure is.

3.d. (5 pts) Suppose that for some KB and some S, KB |- S but not KB |= S.

Then the inference procedure is.

3.e. (5 pts) Suppose that for some KB and some S, KB |= S but not KB |- S.

Then the inference procedure is.

3.f. (5 pts) Suppose that for any KB and any S, whenever KB |- S then KB |= S.

Then the inference procedure is.