How does the admissible heuristic in A* guarantee an optimal shortest path while pruning Dijkstra's search space?
Problem Statement & Theoretical Background
I am implementing pathfinding for our high school robotics maze challenge. Why must an A* heuristic be admissible (h(n) ≤ h*(n)) and consistent (triangle inequality), and what happens if h(n) overestimates?
💬 Solutions & Step-by-Step Derivations
Rigorous mathematical proofs, physical intuitions, and peer breakdowns.
VERIFIED ARNAV & MENTOR EXPLANATION
Peer-Checked & Rigorous
In A*, the priority function is f(n) = g(n) + h(n), where g(n) is the exact cost from start to node n, and h(n) is the estimated cost from n to the goal.
1. Admissibility (Never Overestimate):
A heuristic is admissible if h(n) ≤ h*(n) for all nodes, where h*(n) is the true optimal cost. If h(n) were to overestimate (say, predict cost 100 for a path that actually costs 20), A* might explore a suboptimal alternate path of cost 50 first, reach the goal, and terminate prematurely before ever exploring the truly optimal route!
2. Consistency (Triangle Inequality):
A heuristic is consistent (monotonic) if for every node n and neighbor n' generated by action with cost c(n, n'):
h(n) ≤ c(n, n') + h(n')
Consistency guarantees that f(n) values along any path never decrease. As a result, when A* expands a node n, the shortest path to n is already found — meaning nodes never need to be reopened in the closed set, maximizing algorithmic efficiency.
For your robotics grid maze, Euclidean distance √(Δx² + Δy²) or Manhattan distance (|Δx| + |Δy|) are guaranteed to be both admissible and consistent!
Verified for mathematical and physical accuracy
Post Your Derivation or Intuitive Solution
Share your breakdown from first principles to help fellow students and Olympiad participants worldwide.
Formulation Guidance: State your starting physical laws or axioms, show clear step-by-step intermediate algebra, and conclude with the intuitive significance of the result.