AI Assignment 3
AI Assignment 3
AI Assignment 3
BIMS 1
Artificial Intelligence Assignment No. 3
c. solution space
d. Goal state.
b) Draw a graph of all the distinct state-space nodes that are within three moves of the stat
node, label each node by its state description, and show at least one path to each node in
the graph- labeling each arc by the name of the appropriate operators. In addition these
nodes, show also all of the nodes and arc(properly labeled) on a path to the solution.
Question No. 3 Marks = 10
There are four people who want to cross a bridge; they all begin on the same side. You have 17
minutes to get them all across to the other side. It is night, and they have one flashlight. A
maximum of two people can cross the bridge at one time. Any party that crosses, either one or
two people, must have the flashlight with them. The flashlight must be walked back and forth; it
cannot be thrown, for example. Person 1 takes 1 minute to cross the bridge, person 2 takes 2
minutes, person 3 takes 5 minutes, and person 4 takes 10 minutes. A pair must walk together at
the rate of the slower person’s pace. For example, if person 1 and person 4 walk across first, 10
minutes have elapsed when they get to the other side of the bridge. If person 4 returns the
flashlight, a total of 20 minutes have passed and you have failed the mission.
a) Set up a state-space search formulation of the farmer-fox-goose-grain puzzle:
ii. Clearly identify the four components of problem solving in the above puzzle
a. problem statement
b. Name the operators on states and give precise description of what each operator
does to a state description
c. solution space
d. Goal state.
b) Draw a state space search tree for this puzzle using 0 and 1 to left and right river bank
respectively.
c) How many journeys will be taken to cross the river
Question No. 4 Marks = 10
The Königsberg bridge puzzle is universally accepted as the problem that gave birth to graph
theory. It was solved by the great Swiss-born mathematician Leonhard Euler (1707—1783). The
problem asked whether one could, in a single stroll, cross all seven bridges of the city of
Königsberg exactly once and return to a starting point. Following is a sketch of the river with its
two islands and seven bridges:
BIMS 2
Artificial Intelligence Assignment No. 3
A century after Euler’s discovery (see Problem 4), another famous puzzle–this one invented by
the renown Irish Mathematician Sir William Hamilton (1805-1865)–was presented to the world
under the name of the Icosian Game. The game was played on a circular wooden board on which
the following graph was carved:
Find a Hamiltonian circuit–a path that visits all the graph’s vertices exactly once before returning
to the starting vertex–for this graph.
Question No. 6 Marks = 5
Consider the following map:
a) Explain how we can use the graph-coloring problem to color the map so that no two
neighboring regions are colored the same.
b) Use your answer to part (a) to color the map with the smallest number of colors.
Question No. 7 Marks = 5
Give the initial state, goal state, successor function (transition function)/ operators for each of the
following. Choose a formulation (problem representation) that is precise enough to be
implemented.
a) A 3-foot-tall monkey is in a room where some bananas are suspended from the 8-foot
ceiling. He would like to get the bananas. The room contains two stackable, moveable,
climbable 3-foot-high crates.
b) You have a program that outputs the message “illegal input record” when fed a certain
file of input records. You know that processing of each record is independent of other
records. You want to discover what record is illegal.
BIMS 3
Artificial Intelligence Assignment No. 3
BIMS 4