Docsity

Bayesian Networks - Artificial Intelligence - Quiz, Exercises of Artificial Intelligence

Toggle sidebar
bg1
CS-271, Intro to A.I. — Quiz#4 — Spring Quarter, 2013 — 20 minutes
YOUR NAME & EMAIL ADDRESS:
YOUR ID: ID TO RIGHT: ROW: NO. FROM RIGHT:
1. (5 pts) Definition of conditional probability. Write the definition of P(H | D) in terms of
P(H), P(D), P(H ∧ D), and P(H ˅ D).
P(H | D) =
2. (5 pts) Bayes' Rule. Write the result of applying Bayes' Rule to P(H | D).
P(H | D) =
3. (5 pts) Conjunction. Write the definition of P(H ∧ D) in terms of P(D), P(H), and P(H ˅ D).
P(H ∧ D) =
4. (5 points) Logic and possible worlds. Write down an FOPC sentence such that every world in which
it is true contains exactly one object.
5. (20 pts total, 4 pts each) Unifiers and Unification. Write the most general unifier (or MGU) of the
two terms given, or “None” if no unification is possible. Write your answer in the form of a substitution
as given in your book, e.g., {x / John, y / Mary, z / Bill}. The first one is done for you as an example.
5a. UNIFY( Knows( John, x ), Knows( John, Jane ) ) { x / Jane }
5b. UNIFY( Knows( y, x ), Knows( John, Jane ) )
5c. UNIFY( Knows( John, x ), Knows( y, Father (y) ) )
5d. UNIFY( Knows( John, F(x) ), Knows( y, F(F(z)) ) )
5e. UNIFY( Knows( John, F(x) ), Knows( y, G(z) ) )
5f. UNIFY( Knows( John, F(x) ), Knows( y, F(G(y)) ) )
6. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Write down the factored
conditional probability expression corresponding to this Bayesian Network.
**** TURN QUIZ OVER. QUIZ CONTINUES ON THE REVERSE. ****
B
A
F
D
C
E
pf2

Partial preview of the text

Download Bayesian Networks - Artificial Intelligence - Quiz and more Exercises Artificial Intelligence in PDF only on Docsity!

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

YOUR NAME & EMAIL ADDRESS:

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

1. (5 pts) Definition of conditional probability. Write the definition of P(H | D) in terms of

P(H), P(D), P(H ∧ D), and P(H ˅ D).

P(H | D) =

2. (5 pts) Bayes' Rule. Write the result of applying Bayes' Rule to P(H | D).

P(H | D) =

3. (5 pts) Conjunction. Write the definition of P(H ∧ D) in terms of P(D), P(H), and P(H ˅ D).

P(H ∧ D) =

4. (5 points) Logic and possible worlds. Write down an FOPC sentence such that every world in which it is true contains exactly one object. 5. (20 pts total, 4 pts each) Unifiers and Unification. Write the most general unifier (or MGU) of the two terms given, or “None” if no unification is possible. Write your answer in the form of a substitution as given in your book, e.g., {x / John, y / Mary, z / Bill}. The first one is done for you as an example.

5a. UNIFY( Knows( John, x ), Knows( John, Jane ) ) { x / Jane }

5b. UNIFY( Knows( y, x ), Knows( John, Jane ) )

5c. UNIFY( Knows( John, x ), Knows( y, Father (y) ) )

5d. UNIFY( Knows( John, F(x) ), Knows( y, F(F(z)) ) )

5e. UNIFY( Knows( John, F(x) ), Knows( y, G(z) ) )

5f. UNIFY( Knows( John, F(x) ), Knows( y, F(G(y)) ) )

6. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Write down the factored conditional probability expression corresponding to this Bayesian Network.

**** TURN QUIZ OVER. QUIZ CONTINUES ON THE REVERSE. ****

B

A

F

D

C

E

6. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Draw the Bayesian Network corresponding to this factored conditional probability expression. Draw left-to-right, as in Problem 5.

P(A | C) P(B | C, E) P(C | D) P(D | F) P(E | D, F) P(F)

7. (15 pts total, -5 for each error, but not negative) Bayesian Networks. Shown below is the Bayesian network corresponding to the Burglar Alarm problem, P(J | A) P(M | A) P(A | B, E) P(B) P(E).

P(B) .

B E P(A) t t. t f. f t. f f.

A P(J) t. f.

Write down an expression that will evaluate to P( j=T ∧ m=F ∧ a=F ∧ b = F ∧ e = T). Express your answer as a series of numbers (numerical probabilities) separated by multiplication symbols. You do not need to carry out the multiplication to produce a single number (probability). SHOW YOUR WORK.

8. (15 pts total, 5 pts each) FOPC translation. Write on the left the letter for the best corresponding wff on the right. Use Child(x) for “x is a child,” JB (x) for “x is a JellyBean,” and Likes(x, y) for “x likes y.” The first one is done for you as an example. Note: There are more FOPC than English sentences. 8.a. A Every child likes every jellybean.

8.b. (5 pts) For every child, there is a jellybean that the child likes.

8.c. (5 pts) For every jellybean, there is a child that likes that jellybean.

8.d. (5 pts) There is a child that likes every jellybean

P(E)

A P(M)

t. f.

A ∀x ∀y [ Child(x) ∧ JB(y) ] ⇒ Likes(x, y) B ∃x ∃y [ Child(x) ∧ JB(y) ] ⇒ Likes(x, y) C ∀x ∃y Child(x) ∧ JB(y) ∧ Likes(x, y) D (^) ∃x ∀y Child(x) ∧ [ JB(y) ⇒ Likes(x, y) ] E ∀x ∃y [ Child(x) ⇒ JB(y) ] ⇒ Likes(x, y) F ∀y ∃x JB(y) ⇒ [ Child(x) ∧ Likes(x, y) ] G (^) ∃y ∀x JB(y) ⇒ [ Child(x) ∧ Likes(x, y) ] H ∀x ∃y Child(x) ⇒ [ JB(y) ∧ Likes(x, y) ] I ∃y ∀x [ Child(x) ∧ JB(y) ] ⇒ Likes(x, y) J ∀x ∀y Child(x) ∧ JB(y) ∧ Likes(x, y)

B E

A

J M

(Alarm)

(Burglary) (Earthquake)

(John calls) (Mary calls)