Assign 1
Assign 1
Assign 1
Assignment 1
Due Date: January 17, 2005
Attempt all questions.
Question 1
Consider the graph (of driving times in Vancouver; not drawn to scale) with arc lengths shown
on the arcs:
DT: KT
KT: SG, PG, DT
PG: SL, UBC, KT, SG
SG: KD, PG, KT
UBC: PG, SL
SL: PG, KD, MP, UBC
KD: SG, MP, SL
MP: KD, AP, SL
AP: MP
We want to find a path from UBC to DT. For each of the following search methods specify
whether it
halts for this particular graph. If it does halt, specify which solution path is found first and give
the path
length. If it doesnt halt, briefly explain why.
a) Depth-first search.
b) Depth-first search with loop detection.
c) Breadth-first search.
d) Best-first search.
e) A* search.
Question 2
Using the predicates Bx (x is a barber in Podunk) and Sxy (x shaves y), translate the
following argument into a sentence of the predicate calculus.
Any barber in Podunk shaves exactly those individuals who do not shave themselves.
Therefore, there is no barber in Podunk.
Question 3
Describe a search space (and/or a search tree) in which iterative deepening performs (increase
depth by 1 in each iteration) much worse than depth first search.
Question 4
List the order in which nodes are visited in the tree below for each of the following tree
searching strategies (choosing leftmost branches first in all cases):
Depth-first search
Breadth-first search
Question 5
Consider the problem of missionaries and cannibals: 3 missionaries and 3 cannibals are on one
side of a river, along with a row boat that is capable of transporting either 1 or 2 occupants.
The objective is to find a way in which to move both the missionaries and the cannibals to the
opposite side of the river, without ever allowing the number of annibals on a river bank to
exceed the number of missionaries (including the occupants of the boat), because then the
cannibals would eat the missionaries. We would like to do this as quickly as passible.
Formulate this as a search problem. Specify the representation of the states, operators, goal,
start state and cost function. Can you find an admissible heuristic?
Question 6
Sesshomaru, Naraku (pronounced naa-rak) and Inuyasha belong to the Warring Era ^_^. Every
member of the Warring Era is either a demon or a human or both. No human likes rain and all
demons like snow. Naraku dislikes whatever Sesshomaru likes and likes whatever Sesshomaru
dislikes. Sesshomaru likes rain and snow.
Question 7
Are the following statements true or false?
a) All search algorithms are complete.
b) A* is complete.
c) A* terminates immediately when a goal state is found.
Question 8
Translate the following sentences into first order logic, using a consistent vocabulary (which
you must define):
Question 9
Consider the following assertions:
Question 10
Translate the following sentences to first-order logic.
a) All students who take AI like to play games.
b) No students who take AI like to play games.
c) On Saturday, all students either go to a party or work, but not both.
d) All students go to a party on Saturday, except those taking AI.
e) Exactly two students go to a party.
Question 11
Given the following, can you prove that the unicorn is mythical? How about magical? Horned?
Begin by providing a propositional description of the given text.
The unicorn is mythical, then its is immortal, but if it is not mythical, then it is a mortal
mammal. If the unicorn is either immortal or a mammal, then it is horned. The unicorn is
magical if it is horned.
The following questions are for practice for the mid-term These are not to be submitted.