

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Logic Programming and Artificial Intelligence 22 January 2010 LPA Problem Sheet 2 Due: 11:15, 3 February
(a) [6 marks] Specify a problem representation for the water-jug problem. Recall that a problem representation consists of a set of states (which are data structures), a set of operators (which transform states to states), an initial state, and a goal condition. As this is a decision problem, costs can be ignored. Remember to specify the preconditions for your operators. (b) [6 marks] Draw the search tree that is implicit in your problem representation. Do not include any cycles in your search tree; that is, do not display any node that has the same state as one of its ancestor nodes. Indicate which node is the initial node and indicate which nodes satisfy the goal condition. (c) [1 marks] In layperson’s English describe every solution to the waterjug problem that is present in your search tree.
Show how each of the following search methods finds a solution in this search space by writing down, in order, the names of the nodes removed from the list of states. Assume that the search runs until it returns a goal. (^1) Recall that an instance of the TSP is a complete, undirected, weighted graph. A solution to the instance is a cycle through every vertex of the graph that has minimum cost (the sum of the weights on the arcs comprising the cycle).
1
(1) Breadth first search (2) Uniform cost search (3) Depth first search (4) Iterative deepening search
(a) [2 marks] Which of these search methods is guaranteed to find a goal? (b) [2 marks] Assuming the search tree is finite, which of these search methods is guaranteed to find a goal? (c) [2 marks] Assuming the search tree is finite, which of these search methods is guaranteed to find one of the shallowest goals (that is, it is guaranteed to find a goal and the first goal it finds is guaranteed to be among the shallowest)? (d) [2 marks] Assuming the search tree is finite, which of these search methods is guaranteed to find one of the goals with least cost (that is, it is guaranteed to find a goal and the first goal it finds is guaranteed to have a path cost not more than that of any other goal)?
(a) Specify the backtracking procedure. (b) How does backtracking get away without using L? That is, without L, how does back- tracking remember all the unexpanded nodes?