Homework 2020 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Faculty of Computers and Artificial Intelligence

Cairo University
AI 2019-2020

AI Homework (Total 7 Marks)

Part1: Predicate Logic & Proof (4 Marks)


1. Express the following in predicate logic:
i) Susan bought everything that Maryam bought.
ii) If Maryam bought everything, so did Susan.
iii) There is a computer which is not used by any student
iv) There is exactly one thing with Ahmad.

2. Consider the following sentences:


- The members of Giza Club are Mohamed, Mona, and Iman.
- Mohamed is married to Mona.
- Amir is Iman’s brother.
- The partner (husband/wife) of every married person in the Club is also a member
in the Club.
- The last meeting was at Mohamed’s house.

a) Translate these sentences into Predicate Logic.


b) Prove, by using resolution, the following statement:
The last meeting of the Club was at Mona’s house.
Note that this statement should be proved to be true. If you can not reach this conclusion,
then add the necessary statement(s) to your knowledge base and then construct the proof.

3. Let p, q, and r be the propositions:


p: You get an A on the final exam.
q: You do every exercise in the book.
r: You get an A in this course.

Write the following propositions using p, q, and r and logical connectives.


a) You get an A in this course but you do not do every exercise in the book.
b) To get an A in this course, it is necessary for you to get an A on the final exam.
c) You will get an A in this course if an only if you either do every exercise in the book
or you get an A on the final.

4. Determine whether (¬ q ∧ (p → q)) → ¬ p is a tautology.


5. Using the predicates:
Enemies(x,y): x and y are enemies.
Like(x,y): x likes y.
Happy(x): x is happy.

Write the following predicate logic statements using the above predicates and logic
connectives. (1 mark)
a) Enemies are exactly those who dislike one another
b) Nour is happy if somebody likes him

Part2: Search and Games (3 Marks)


6. Consider the following graph representing the state space and operators of a navigation
problem

The path cost is shown by the number on the links; the heuristic evaluation is shown by the number
in the box.

(a) What is the order that Greedy search will expand the nodes?
(b) What is the order that uniform cost search will expand the nodes?
(c) What is the order that A* search will expand the nodes?
(d) What is the order that hill-climbing search will expand the nodes?
7. Consider the following search problem:

(a) Which of the heuristics shown are admissible? Circle all that apply: h0, h1, h2.
(b) Give the path A* search will return using each of the three heuristics? (Hint: you should
not actually have to execute A* to know the answer in some cases.)
(c) What path will greedy best-first search return using h1?

8. Consider the following game tree in which the root corresponds to a MAX node and the
values of a static evaluation function, if applied, are given at the leaves.

(1) What move should MAX choose?

(2) Which nodes are not examined when Alpha-Beta Pruning is performed? Assume children
are visited left to right.
9. Perform an alpha-beta prune to the following state space. Show all the alpha (for MAX) and
beta (for MIN) values you use. Mark the nodes that are pruned and write the names of the
nodes that will not be expanded.

You might also like