Heuristics in Search: Meaning, Completeness/Optimality Conditions, and Admissibility Proofs
In the context of search strategies, Heuristic refers to an informative estimate used to guide exploration. Rather than expanding nodes purely by path cost so far, informed search uses a Evaluation function that combines:
- the cost already incurred (), and
- an estimated remaining cost (, from the heuristic).
A classic example is *[A search]{def="Best-first search using f(n)=g(n)+h(n)"}**, which expands nodes in order of
Intuitively, the heuristic makes the search “look ahead” by preferring nodes that seem closer (in cost) to a goal.
To reason about guarantees, we distinguish three concepts:
- Admissible heuristic
- Completeness
- Optimality
A* is commonly analyzed under the assumptions of nonnegative step costs and suitable properties of . Below, we state conditions for completeness and optimality and then prove admissibility of an A* strategy based on the heuristic’s property.
Key technical terms introduced here: Heuristic, A* search, Admissible heuristic, Completeness, Optimality.
A* Search and Admissible Heuristics (Admissibility & Optimality intuition)
Meaning of “heuristics” in search strategies
The word “heuristics” is used because the estimate is typically derived from rules of thumb or domain knowledge that is fast but may not be perfectly accurate. Formally, in search we treat it as a function:
- : an estimate of the true remaining optimal cost from node/state to any goal.
- Let the true remaining optimal cost be .
Then a heuristic is admissible if:
This definition directly connects to optimality of A* because A* uses as a lower bound on the cost of any complete solution that goes through .
How heuristic quality affects guarantees
Define h(n)
Step 1Pick an estimate of remaining cost."
Check admissibility
Step 2Ensure ."
Run A* with f(n)=g(n)+h(n)
Step 3Expand nodes with smallest f."
Guarantees
Step 4Admissible h enables optimality (under standard conditions)."
Conditions on a search for completeness and optimality
There are two common “modes” of analysis:
- Tree search (no repeated-state handling)
- Graph search (uses a closed set / explored set; repeated states may be skipped or handled carefully)
Because the prompt asks for guarantees, we state widely used sufficient conditions for standard implementations of informed search (especially A* and Uniform Cost Search).
Completeness (guaranteed to find a goal if one exists)
A standard sufficient condition for completeness is:
- Finite branching: from any node, the number of successors is finite.
- Nonnegative step costs (especially for cost-based best-first rules).
- Systematic expansion in increasing-cost layers (or an equivalent strategy), so that if a goal exists, it is not “skipped forever.”
Common textbook results (for graph search with nonnegative costs) typically guarantee:
- Uniform Cost Search (UCS) is complete if step costs are nonnegative and branching is finite.
- A* with a suitable priority queue ordering inherits completeness under the same broad conditions (and admissible heuristic does not “prevent” goal discovery).
Core idea: when costs are nonnegative, expanding the lowest-cost frontier prevents infinite deferral of any reachable finite-cost goal.
Important constraint: if there are negative step costs, “infinite descent” can defeat both completeness and optimality.
Optimality (least-cost solution)
Optimality depends on how relates to the true solution costs.
For UCS:
- Optimality holds because it expands nodes in order of increasing ; the first goal popped is guaranteed minimal.
For A*:
- Optimality holds if is admissible, i.e. it never overestimates remaining optimal cost.
Lower-bound interpretation
If , then is a lower bound on the cost of any goal reachable via n. A* then expands nodes in increasing lower-bound order, enabling optimality.
Prove admissibility of an A search strategy
There is a subtle wording issue in the prompt:
- Admissibility is a property of the heuristic (and sometimes of derived bounds), not of the mere search strategy alone.
- A search algorithm (like A*) is optimal when it uses an admissible heuristic (plus standard nonnegative-cost conditions).
So the correct formal target is usually:
Prove that the heuristic used in A* is admissible, i.e. for all .
Below is a standard proof template. It is complete, formal, and exactly what you need to “prove admissibility” in the A* setting.
Admissibility proof for an A* heuristic
- 1Step 1
Let be the minimal cost of any path from state to a goal, assuming nonnegative step costs.
- 2Step 2
Choose a heuristic form (e.g., straight-line distance in path-planning, or any heuristic constructed as a lower bound on real remaining cost).
- 3Step 3
Use problem-specific reasoning: show that the heuristic’s estimate is never larger than the cost of an optimal path from n to a goal. Typically this is done by proving is a lower bound on every feasible remaining path cost, then taking the minimum.
- 4Step 4
Since holds for all , the heuristic is admissible by definition.
Formal proof (general form)
Let be any state in the search space. Let:
- be the optimal remaining cost from to a goal:
- be the heuristic used by A*.
To prove admissibility, we must show:
A common way to complete the proof is:
- Show that for every path from to a goal,
- Then, because is the minimum over all such path costs,
Therefore for all , so is admissible.
From admissibility to optimality of A* (why this matters)
Even though you asked specifically to “prove admissibility,” it’s typically used to establish optimality.
Let A* expand nodes in increasing and assume:
- Nonnegative step costs (standard condition for cost-based best-first search).
- is admissible.
Because , for any node we get:
But is exactly the cost of an optimal completion via , so is a lower bound on the cost of any solution through . Consequently, when A* selects the next node with the smallest , it cannot “miss” a cheaper goal solution; when a goal is selected for expansion (or popped, depending on the implementation details), its path cost is minimal among all solutions.
Common edge cases and implementation details
Guarantees vs heuristic property (A* context)
Assuming standard implementation details and nonnegative step costs.
Knowledge Check
In A* search, what does an admissible heuristic guarantee?
Explore Related Topics
Algorithm Property for Clear, Unambiguous Steps: Definiteness
The course clarifies that definiteness is the algorithm property requiring every step to be precise and have exactly one interpretation, distinguishing it from finiteness, effectiveness, and generality.
- Definiteness: each instruction is specified so precisely that only one meaning is possible.
- Finiteness concerns termination, effectiveness concerns executability, and generality concerns applicability to all valid inputs.
- Example: “repeat 3 times” is definite, while “repeat several times” is not.
- Exam tip: associate words like “clear,” “precise,” or “unambiguous” with definiteness.
- Algorithm quality can be expressed as .
Algorithms: Foundations, Analysis, Design Paradigms, and Core Applications
Minimax in Game Playing: Correctness, Worst-Case Thinking, and Why Each Option Is (or Isn’t) True