Homework3
ComS 572 Princinples of Aritifical Intelligence
Dimitris Margaritis
Department of Computer Science
Iowa
State University
Out: Oct 28, 2002
Due: Nov 11, 2002
TA ,Jie Bao
Dept of Computer Science
Iowa State University
baojie@cs.iastate.edu
http://www.cs.iastate.edu/~baojie
Nov
4, 2002
1. AIMA 6.2
"Valid" means it holds for all possible combination of truth table. Test it with truth table and see if it is always true
2. AIMA 6.3
Same to 6.2
3. AIMA 6.8
To define a binary connective, you should provide a turth table. For example, the "V" and "^"connective:
|
P |
Q |
P V Q |
P^ Q |
|
0 |
0 |
0 |
0 |
|
0 |
1 |
1 |
0 |
|
1 |
0 |
1 |
0 |
|
1 |
1 |
1 |
1 |
Try to find all possible turth tables and study their meaning.
4. AMIA 7.2
a) you should define your vocabulary, such as:
Takes(x,c): student x takes course c
Shaves(x,y):
Person x shaves for person y
b) Prepresent the sentences in FOPL using your vocabulary. Note that you can use "∀"(all)and "∃"(exist)
5. Big and Small
Draw Truth table and pick up models with which the sentences hold.
Note: Big <> ~Small
6. Unifier
Note that UNIFY(p,q) = t where SUBST(t,p) = SUBST (t, P) (AIMA p270). Follow the examples on AIMA p271
7. FOPL -> CNF
See the rule on AIMA page 281
8. Animals
a) Remember to define your vocabulary!
b) same to problem
7
c) Green's Trick: append "OR Ans(x)" to your negated goal so that you discover the binding for
x.
For details, see http://www.cs.ust.hk/faculty/tcpong/comp221/spring98/notes/l13.ps
and Lecture
Notes Chapter 5
9. AIMA 9.6
1) define your vocabulary such as:
Father(x,y) ...
Sibling(x,y) ...
Son(x,y) ...
Male(x)
...
Me ...
ThatMan ...
2) define some basic rules such as:
Father(x1,y) ^ Father(x2,y) => x1=x2
Father(x,Me)
^ Father(x,y) ^ Me<>y => Flase ( I have no brothers or sisters)
Father(x,y)
^ Male(y) => Son(y,x)
3) Try to resolve the reliationship between ThatMan and Me
You can also follow the example on Page 282
10. AIMA14.2
Choose 5 cards our of 52 cards
a) How many possible combinations?
b) N.A.
c) "Royal
straight flush" means the 5 cards is A,K,Q,J and 10 that of the same
suit. How many possible cases?
d) Four is the same kind and the fifth
can be any other cards. How many possible cases?
11. AIMA 14.3
Find P (Disease | Test) while knowing P (T|D), P(~T|~D) , P(D)...
12. AIMA 14.4
a) The range of A^B for a rational agent
note that P(A)
+ P(B) - P(A^B) = P(A V B)
b) the table (on AIMA page 424)
substitute P(A V B)
with 0.5 and recalculate the whole table.
c) why the agent is still rational when P(A V B) = 0.7
?
What's the agent's expected loss?
13. AIMA 14.5
Using P(A|B) = P(AB) / P(B)
14. AIMA 14.6
Same to 14.5
15. AIMA 14.8
Note that P(A|B,C) = P(A) * (P(B|A)/P(B)) * P(C|A,B)/P(C|B)
Simliarly,
we can define P(A|C,B)
try to find if they are equivalent.
16. AIMA 14.11
define B : the Taxi is blue ; b: the Taxi is LOOKED blue.
You know P(b|B) and P(~b|~B), and are asked for P(B|b) and P(~B|b)
a) Can you do that without P(B) ?
b) P(B)=0.1 is
given.
[Return to Jie Bao's Homepage]