Download MT exam 2 CSC 361 spring 1428 Sample Solution

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Computer vision wikipedia , lookup

Artificial intelligence in video games wikipedia , lookup

Embodied cognitive science wikipedia , lookup

Existential risk from artificial general intelligence wikipedia , lookup

Human–computer interaction wikipedia , lookup

Knowledge representation and reasoning wikipedia , lookup

Computer Go wikipedia , lookup

History of artificial intelligence wikipedia , lookup

Philosophy of artificial intelligence wikipedia , lookup

Complexity of constraint satisfaction wikipedia , lookup

Transcript
KING SAUD UNIVERSITY
COLLEGE OF COMPUTER AND INFORMATION SCIENCES
COMPUTER SCIENCE DEPARTMENT
CSC 361: Artificial Intelligence
Dr. Mohamed El Bachir Menaï
Mid Term 1 Exam
Spring 2008
Date: May 31, 2008
Time: 170:00 – 19:00
Student name: ………………………………………………………………….. ID#: …………………….
Note: Please answer each question in the space provided below it.
Use also the back of this sheet for answers.
I Constraint Satisfaction Problems
1. [5 pts.]
You are going on a backpacking trip and you are deciding on what food to bring. You bought n
pieces of food. Each piece of food xi has a certain volume vi, a certain weight wi, and a certain
number of calories ci. You can only carry a weight of at most W and your backpack holds at most a
volume V. To not go hungry, you need at least C calories. You want to find out whether there is a
selection of food that you can carry, that fits your backpack, and that has enough calories.
Write this as a constraint satisfaction problem. The constraint language contains ,,, , , , 
Be sure to explain the variables and their domains.
x1 ,..., x n  0,1n
n
C1 :
x v
C2 :
x w
i 1
V
i i
n
i 1
i
n
C3 :
x c
i 1
i i
i
W
C
1/4
KING SAUD UNIVERSITY
COLLEGE OF COMPUTER AND INFORMATION SCIENCES
COMPUTER SCIENCE DEPARTMENT
CSC 361: Artificial Intelligence
Dr. Mohamed El Bachir Menaï
Mid Term 1 Exam
Spring 2008
Date: May 31, 2008
Time: 170:00 – 19:00
Student name: ………………………………………………………………….. ID#: …………………….
Note: Please answer each question in the space provided below it.
Use also the back of this sheet for answers.
2. [5 pts.]
Consider a constraint satisfaction problem in which you have to find a value assignment for a set of
variables restricted by a set of constraints. There are six boolean variables corresponding to the
place and time that a class will take place namely: in W Hall, in-wh, in H Hall, in-hh, and in the
College of Computer and Information Sciences, in-ccis, and at 10am or 8am in different days,
at-10amMWF, at-10amTTh, and at-8am. There are seven constraints listed below given to the
problem solver. (M: Monday, T: Tuesday, Th: Thursday, W: Wednesday, F: Friday)
1. at-10amMWF  at-10amTTh  at-8am
2. ¬at-10amMWF  in-ccis  in-hh
3. ¬at-10amTTh  in-hh
4. ¬in-ccis  ¬in-wh
5. ¬in-ccis  ¬in-hh
6. ¬in-hh  ¬in-wh
7. in-wh
a. State in English the meaning of the constraint number 2 in the form of an if-then statement.
If the class is at 10am on Mondays, Wednesdays, and Fridays, then the class is in the College of
Computer and Information Sciences or in H Hall.
b. Apply the Backtracking Search with the Forward Checking to solve the Constraint Satisfaction
Problem (find a truth assignment for all the six variables).
The satisfying assignment has in-wh and at-8am set to true and all other variables set to false.
2/4
KING SAUD UNIVERSITY
COLLEGE OF COMPUTER AND INFORMATION SCIENCES
COMPUTER SCIENCE DEPARTMENT
CSC 361: Artificial Intelligence
Dr. Mohamed El Bachir Menaï
Mid Term 1 Exam
Spring 2008
Date: May 31, 2008
Time: 170:00 – 19:00
Student name: ………………………………………………………………….. ID#: …………………….
Note: Please answer each question in the space provided below it.
Use also the back of this sheet for answers.
II KNOWLEDGE REPRESENTATION
1. [4 pts.]
Let G(x), F(x), Z(x), and M(x) be the statements: “x is a giraffe”, “x is 15 feet or higher”, “x is
animal in this zoo”, and “x belongs to me”, respectively.
Express each of the following statements in First-Order Logic using G(x), F(x), Z(x), and M(x).
(a) Nothing, except giraffes, can be 15 feet or higher;
(b) There is no animal in this zoo that does not belong to me;
(c) I have no animals less than 15 feet high.
(d) All animals in this zoo are giraffes.
Possible translations are:
xG  x   F  x  OR xF  x   G  x 
xZ  x   M  x  OR xZ  x   M  x 
xM  x   F  x 
xZ  x   G  x 
2. [3 pts.]
Use resolution to show that D can be inferred from the following knowledge base:
¬A  ¬B  C
A D
B
¬C
(a) resolve(A  D,¬D) = A
(b) resolve(A,¬A  ¬B  C) = ¬B  C
(c) resolve(¬B  C,B) = C
(d) resolve(C,¬C) = ; which shows that the knowledge base is unsatisfiable, so we can infer D.
3/4
KING SAUD UNIVERSITY
COLLEGE OF COMPUTER AND INFORMATION SCIENCES
COMPUTER SCIENCE DEPARTMENT
CSC 361: Artificial Intelligence
Dr. Mohamed El Bachir Menaï
Mid Term 1 Exam
Spring 2008
Date: May 31, 2008
Time: 170:00 – 19:00
Student name: ………………………………………………………………….. ID#: …………………….
Note: Please answer each question in the space provided below it.
Use also the back of this sheet for answers.
3. [3 pts.]
a) Represent the following knowledge in a semantic network:
Dogs are Mammals;
Birds have Wings
Mammals are Animals;
Bats have Wings
Birds are Animals;
Bats are Mammals
Fish are Animals;
Dogs chase Cats
Worms are Animals;
Cats eat Fish
Cats are Mammals;
Birds eat Worms
Cats have Fur
Fish eat Worms
Dogs have Fur
(b) Suppose you learn that Tom is a cat. What additional knowledge about Tom can be derived from
your representation? Explain how.
4/4