King Saud University
College of Computer and Information Sciences
Information Technology Department
IT422
Artificial Intelligence
HOMEWORK 1
Q1: Problem formulation
Three fathers with 3 children (A and his child CA, B and his child CB, and C and his child CC) are standing on side North of a river. The three fathers want to cross the river (go to side South) with their children, but there is only one boat, which can hold a maximum of two persons (a child is considered a person).
Furthermore, no child can stay with other fathers without the presence of his father.
a. Give a suitable representation of a state.
b. According to the previous representation, what is the initial state?
What is the goal state?
c. What are the possible actions on a state?
d. Draw the state space using a tree structure up to depth 2.
SEARCH STRATEGIES
Q1.
A. Show that DFS generates about O(bm) nodes in the search tree.
B. Explain why DFS requires less memory than BFS.
Q2.
A. Starting from “a”, find the goal “e” using DFS with tree-search algorithm, and then with graph-search algorithm.
d
a
c
b
e
Page 2 of 2
You have to show:
1.
2.
3.
4.
5.
6.
The search tree.
The order in which nodes will be visited.
The frontier at each step.
The explored list
The solution path.
The frontier after the search is terminated.
Note: expand nodes in alphabetical order when you have more than one candidate for expansion. B. Compare the two solutions. What can you conclude?
Q3. Please refer to chapter 3 slide 7.
Starting from Pitesti, find a path to Oradea. Show the search tree, the frontier, the explored list, the solution path and the solution cost for the following search strategies:
a) UCS
b) Greedy
c) A*
Consider the following estimative of distance to the goal: o o o o o o o h(Oradea) = 0 h(Arad) =120 h(Bucharest) = 430 h(Sibiu) = 160 h(Fagaras) = 130 h(Craiova)=350 h(Rimnicu)=230
Is this heuristic admissible? Why?