Consistent Heuristic Function - Graph Search
Recall the notions of consistency and admissibility for an A* search heuristic.
a. Consider a graph with four nodes S, A, B, C, and G, and with four edges SA, SB, BA, AC, and CG. Write down positive edge lengths and values of an admissible heuristic function h such that using A* with Graph-Search (as given in the lectures) to find a route from S to G gives a suboptimal solution. In other words, construct an admissible heuristic that is not consistent.
b. Prove that any consistent heuristic function that is also admissible.
[Hint: use induction on the number of nodes in the shortest path between a node and a goal.]