Docsity

Bayesian Nets - Artificial Intelligence - Solved Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
Final Exam: Solution
Artificial Intelligence (Spring 2007)
Question 1 English x First Order Logic(FOL) (36 points)
Check the answer with True or False. For sentences in English make your judgment of
the meaning of the sentence, i.e., you may want to translate it in FOL to conclude.
1. (4 points) "Bert and Ernie are brothers" is equivalent to "Bert is a brother and Ernie is
a brother"
True[ ] False[X ]
The second sentence does not assert that they are brothers to each other.
2. (4 points) “ p and q are not both true” is equivalent to “ p and q are both not true”
True[ ] False[X ]
The first one says "
)
(
q
p
∧
¬
" equivalent to "
q
p
¬
∨
¬
”. The second says "
q
p
¬
∧
¬
"
equivalent to "
)
(
q
p
∨
¬
".
3. (4 points) “Neither p nor q” is equivalent to “both p and q are false”
True[ X] False[ ]
English Neither, nor means "
q
p
¬
∧
¬
"
4. (4 points) “Not all A’s are B’s” is equivalent to “
))
(
)
(
(
x
B
x
A
x
¬
∧
∃
”
True[ X ] False[ ]
It means, some A's are not B's.
5. (4 points) "Men and women are welcome to apply." is equivalent to
“
)]
(
))
(
)
(
[(
x
Apply
x
W
x
M
x
⇒
∧
∀
”
True[ ] False[ X ]
The FOL sentence says that everything that is both a man and a woman is welcome to
apply, obviously not what is meant. The disjunction would give a correct interpretation.
pf3
pf4
pf5

Partial preview of the text

Download Bayesian Nets - Artificial Intelligence - Solved Exam and more Exams Artificial Intelligence in PDF only on Docsity!

Final Exam: Solution

Artificial Intelligence (Spring 2007)

Question 1 English x First Order Logic(FOL) (36 points)

Check the answer with True or False. For sentences in English make your judgment of the meaning of the sentence, i.e., you may want to translate it in FOL to conclude.

  1. (4 points) "Bert and Ernie are brothers" is equivalent to "Bert is a brother and Ernie is a brother" True[ ] False[X ]

The second sentence does not assert that they are brothers to each other.

  1. (4 points) “ p and q are not both true” is equivalent to “ p and q are both not true” True[ ] False[X ]

The first one says "¬ ( p ∧ q )" equivalent to "¬ p ∨¬ q ”. The second says " ¬ p ∧¬ q "

equivalent to " ¬( p ∨ q )".

  1. (4 points) “Neither p nor q” is equivalent to “both p and q are false” True[ X] False[ ]

English Neither, nor means " ¬ p ∧¬ q "

  1. (4 points) “Not all A’s are B’s” is equivalent to “ ∃ x ( A ( x )∧¬ B ( x ))”

True[ X ] False[ ]

It means, some A's are not B's.

  1. (4 points) "Men and women are welcome to apply." is equivalent to “ ∀ x [( M ( x )∧ W ( x ))⇒ Apply ( x )]”

True[ ] False[ X ]

The FOL sentence says that everything that is both a man and a woman is welcome to apply, obviously not what is meant. The disjunction would give a correct interpretation.

Questions 6 to 9: Say Attract is a relation from x to y, i.e., A(x,y) says that x attracts y.

  1. (4 points) “Everything attracts something”, where “something” means “something or other”, is equivalent to “ ∀ x ∃ y A ( x , y )”

True[X] False[ ]

  1. (4 points) “Something is attracted by everything”, where “something” means “something in particular”, is equivalent to “ ∃ y ∃ x A ( x , y )”

True[ ] False[ X ]

The second quantifier should have been ∀ x to represent everything.

  1. (4 points) “Everything is attracted by something” ”, where “something” means “something or other”, is equivalent to “ ∃ x ∀ y A ( x , y )”

True[ X ] False[ ]

  1. (4 points) “Something attract everything”, where “something” means “something in particular”, is equivalent to “ ∃ x ∃ yA ( x , y )”

True[ ] False[ X ]

The second quantifier should have been ∀ y to represent everything

  1. From the statement:

Tony, Shi-Kuo and Ellen belong to the Hoofers Club. Every member of the Hoofers Club is either a skier or a mountain climber or both. No mountain climber likes rain, and all skiers like snow. Ellen dislikes whatever Tony likes and likes whatever Tony dislikes. Tony likes rain and snow.

Prove via the resolution method and unification (where needed) that “Ellen is a mountain climber but not a skier”. More precisely

a. (7 points) First translate the sentences above into FOL Sentences

Let S(x) mean x is a skier, M(x) mean x is a mountain climber, and L(x,y) mean x likes y, where the domain of the first variable is Hoofers Club members, and the domain of the second variable is snow and rain. Translate the above English sentences into FOL using quantifiers, ∃, ∀where appropriate.

R (not the only way to write it):

  1. ( ∀ x) S(x) ∨ M(x) - “Every member of the Hoofers Club is either a skier or a mountain climber or both.”
  2. ¬ ( ∃ x) M(x) ∧ L(x, Rain) - “No mountain climber likes rain”
  3. ( ∀ x) S(x) => L(x, Snow) - “all skiers like snow”
  4. ( ∀ y) L(Ellen, y) => ¬ L(Tony, y) - ”Ellen likes whatever Tony disklikes”
  5. ( ∀ y) ¬ L(Ellen, y) => L(Tony, y) - ”Ellen dislikes whatever Tony likes”
  6. L(Tony, Rain) - “Tony likes rain”
  7. L(Tony, Snow) - “Tony likes snow”
  8. Query: M(Ellen) ∧ ¬ S(Ellen)

Negation of the Query: ¬ (M(Ellen) ∧ ¬ S(Ellen))

b. (7 points) Convert to Clause Forms (in these cases disjunctions)

Conversion to Clause Form

  1. S(x1) ∨ M(x1)
  2. ¬ M(x2) ∨ ¬ L(x2, Rain)
  3. ¬ S(x3) ∨ L(x3, Snow)
  4. ¬ L(Ellen, y1) ∨ ¬ L(Tony, y1)
  5. L(Ellen, y2) ∨ L(Tony, y2)
  6. L(Tony, Rain)
  7. L(Tony, Snow)
  1. Negation of the Query: ¬ M(Ellen) ∨ S(Ellen)

c. (7 points) Apply the resolution method with the unification (where needed) to prove the goal sentence: “Ellen is a mountain climber but not a skier.” You need to also convert the goal sentence to a Clause Form.

KB Query Negation

S(x1) ∨ M(x1) ¬ M(Ellen) ∨ S(Ellen)

¬ M(x2) ∨ ¬ L(x2, Rain)

¬ S(x3) ∨ L(x3, Snow)

¬ L(Ellen, y1) ∨ ¬ L(Tony, y1)

L(Ellen, y2) ∨ L(Tony, y2)

L(Tony, Rain)

L(Tony, Snow)

S(Ellen)

{x1\Ellen}

¬ L(Ellen, Snow)

{y1\Snow} {x3\Ellen}

¬ S(Ellen)

b. (10 points) Calculate P(B|J,M), i.e., calculate P(Burglary=true | JohnCalls=true, MaryCalls=true) with at least two decimal orders.

=

= =

= =

= =

α α

α

α

α

α

α

α

PA T BE F PA F B TE F

P A T B E T PA F B TE T

PB

PB PE PA T BE P A F B T E

PB PE P A B E P J T A PM T A

P J T A PM T A P A B E PB P E

PB J T M T PB EAJ T M T

T

eF

T

eF

T

AF

T

EF

T

AF

T

E F

T

AF

Thus P ( B = T | J = T , M = T )≈ 0. 284