100% found this document useful (1 vote)
371 views

Assignment 2

This document contains an assignment on artificial intelligence concepts. It includes 5 questions related to graph search algorithms, state space search, the missionaries and cannibals problem, and properties of search algorithms. Question 1 involves uniform search, greedy search, and A* search on a graph. Question 2 involves breadth-first search, depth-limited search, and iterative deepening search on a binary tree state space. Question 3 asks about the properties of the 8-puzzle state space. Question 4 formulates the missionaries and cannibals problem as a state space search and asks how to solve it optimally. Question 5 asks whether several statements about search algorithms are true or false.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
371 views

Assignment 2

This document contains an assignment on artificial intelligence concepts. It includes 5 questions related to graph search algorithms, state space search, the missionaries and cannibals problem, and properties of search algorithms. Question 1 involves uniform search, greedy search, and A* search on a graph. Question 2 involves breadth-first search, depth-limited search, and iterative deepening search on a binary tree state space. Question 3 asks about the properties of the 8-puzzle state space. Question 4 formulates the missionaries and cannibals problem as a state space search and asks how to solve it optimally. Question 5 asks whether several statements about search algorithms are true or false.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Artificial Intelligence (B, C), UOL

Assignment 2
Instructor: Noman Saleem
Due: 25th March 2017

Q 1: Consider the following graph that represents road connections between different cities.
The weights on links represent driving distances between connected cities. Let S be the initial
city and G the destination.

Part a. Show how the uniform search tree works by giving the order in which nodes are
expanded. Is the path found by the algorithm optimal?
Part b. Assume the following set of the straight line distances between G and other cities.

Show how the greedy search algorithm with the straight-line distance heuristic works. Is the
path the algorithm finds optimal?
Part c. Show how the A* with the straight-line distance heuristic works. Is the path found
optimal?

Q 2: Consider a state space where the start state is number 1 and each state k has two
successors: numbers 2k and 2k + 1.
a. Draw the portion of the state space for states 1 to 15.
b. Suppose the goal state is 11. List the order in which nodes will be visited for breadthfirst
search, depth-limited search with limit 3, and iterative deepening search.
c. Call the action going from k to 2k Left, and the action going to 2k + 1 Right. Can you
find an algorithm that outputs the solution to this problem without any search at all?

Q 3: Show that the 8-puzzle states are divided into two disjoint sets, such that any state is
reachable from any other state in the same set, while no state is reachable from any state in
the other set. (Hint: See Berlekamp et al. (1982).) Devise a procedure to decide which set a
given state is in, and explain why this is useful for generating random states.

Q 4: The missionaries and cannibals problem is usually stated as follows. Three missionaries
and three cannibals are on one side of a river, along with a boat that can hold one or
two people. Find a way to get everyone to the other side without ever leaving a group of
missionaries in one place outnumbered by the cannibals in that place. This problem is famous in
AI because it was the subject of the first paper that approached problem formulation from an
analytical viewpoint (Amarel, 1968).
a. Formulate the problem precisely, making only those distinctions necessary to ensure a
valid solution. Draw a diagram of the complete state space.
b. Implement and solve the problem optimally using an appropriate search algorithm. Is it
a good idea to check for repeated states?
c. Why do you

Q 5 : Which of the following are true and which are false? Explain your answers.
a. Depth-first search always expands at least as many nodes as A∗ search with an admissible
heuristic.
b. h(n) = 0 is an admissible heuristic for the 8-puzzle.
c. A∗ is of no use in robotics because percepts, states, and actions are continuous.
d. Breadth-first search is complete even if zero step costs are allowed.
e. Assume that a rook can move on a chessboard any number of squares in a straight line,
vertically or horizontally, but cannot jump over other pieces. Manhattan distance is an
admissible heuristic for the problem of moving the rook from square A to square B in
the smallest number of moves.

You might also like