Professional Documents
Culture Documents
ANSWER
Inform search is known as the knowledge about the path or distance coverage for the guidance to reach the destination
and Heuristic search is the knowledge about the experts for reaching the goal effectively, on the contrary you can say it
the estimation about the cost of any specific goal.
ANSWER
ANSWER
UCS is a special case of A* which corresponds to having h(n)=0, h(n)=0, A heuristic function h which
has h(n)=0h(n)=0, is clearly admissible, because it always "underestimates" the distance to the goal,
which cannot be smaller than 00, unless you have negative edges (but I assume that all edges are non-
negative). So, indeed, UCS is a special case of A*, and its heuristic function is even admissible!
4. Prove that if a heuristic is consistent, it must be admissible. Construct an admissible heuristic that is not consistent.
ANSWER
Ans. Let k(n) be the cost of the cheapest path from n to the goal node. We will prove by induction on the number of
steps to the goal that h(n) ≤ k(n). Base case: If there are 0 steps to the goal from node n, then n is a goal and therefore
h(n) = 0 ≤ k(n).
If n is i steps away from the goal, there must exist some successor n 0 of n generated by some action a is on the
optimal path from n to the goal (via action a) and n 0 is i − 1 steps away from the goal.
ANSWER
In general, the greedy BST algorithm is not complete, that is, there is always the risk to take a path that
does not bring to the goal.
A* uses an admissible heuristic function, which essentially means that A* is optimal, that is, it always
finds the optimal path between the starting node and the goal node. A* is also complete (unless there are
infinitely many nodes to explore in the search space).
6. What is the time and space complexity of Greedy best first and A* algorithms?
ANSWER
GREEDY BFS
The time complexity is O (b m), where bb is the (maximum) branching factor and mm is the
maximum depth of the search tree. The space complexity is proportional to the number of nodes in the
fringe and to the length of the found path.
A STAR
The time complexity is O (b SQ m). However, A* needs to keep all nodes in memory while searching, not
just the ones in the fringe,
Ø {A: 56}
PATH A, K, L, M
PATH COST = 30+15+0=45
DISTANCE COST = 20+15+15 = 60
WORKING