Chapter 20: The Formal Contract of Heuristics — A Precise Mathematical Definition of "Good Enough"
Admissibility is not an engineering compromise. It is a mathematical promise.
Chapter 19's conclusion was a downer: many reasoning problems are fundamentally hard, in a computational sense. Not because the algorithms aren't good enough, but because the geometry of the problem itself says there's no shortcut.
Yet humans and machines keep solving these "hard" problems. Not exactly, not always optimally, but usually well enough, and fast enough.
There's a question hiding here: what does "good enough" mean? If the answer is arbitrary, then any algorithm that doesn't crash can call itself a "heuristic." But if "good enough" has a precise mathematical meaning, then a heuristic isn't an engineering compromise — it's a promise with a contract: what it promises, at what cost, and under what conditions it delivers.
That's what this chapter does: writes that contract out clearly.
20.0 The Optimistic Cartographer Game: Heuristics Must Sign a Contract
Chapter 19 told us that many mazes are far too big to count on brute force. So we hire a cartographer. The cartographer can't tell you the complete route; at every intersection it only gives you an estimate: roughly how much farther to the goal.
This is the heuristic function
But this cartographer has to sign a contract. The first contract is called admissibility: you may be optimistic, but you may not exaggerate the difficulty. In other words, the estimated distance must not exceed the true shortest distance:
If the cartographer underestimates the distance, the search just takes a few extra steps. If the cartographer overestimates it, the search may abandon the truly optimal path entirely. The second contract is called consistency: the estimates at neighboring intersections must obey a triangle inequality — the cartographer can't say "we're almost there" today, then suddenly say "it's awfully far" after a single step.
The Formal Skeleton of This Game
- State space: the nodes of the search graph, known costs
, heuristic estimates , and a priority queue. - Legal moves: expand the node with the smallest
, then update its successors. - Transition rules: take a node
off the open list, and add or update each successor with cost . - Winning condition: find the optimal path under a provable guarantee, or get an approximation ratio / PAC-style quality bound.
- Failure modes: the heuristic has no contract — it just "looks fine", and ends up delivering the fastest wrong answer.
This game makes "good enough" precise. A heuristic without a contract is just luck; a heuristic with a contract is a mathematical object. Admissibility, consistency, approximation ratio, PAC guarantees — these are all different clauses of different contracts.
The dignity of a heuristic isn't in always producing the optimal answer. It's in honestly stating: what I promise, what I don't; under which conditions I'm reliable, and under which conditions I'll fail.
Optimism can be a virtue, or it can be fraud. A* allows the heuristic function to be optimistic, because optimism keeps you exploring; it doesn't allow the heuristic to be arrogant, because arrogance makes you give up on a real path too early. The whole ethics of heuristics hides inside this one inequality.
20.0.5 Playing the Game in Code
Section 20.2.5 traced one A* search by hand on a six-node graph. The program below runs the same graph through the same algorithm twice — once with the book's admissible heuristic, once with a single overestimate at node A. Same maze, same algorithm: one returns the optimal route, the other the fastest wrong answer.
#!/usr/bin/env python3
"""
optimistic_cartographer.py -- the Optimistic Cartographer Game of Ch. 20.
Book reference: The Reasoning Kingdom, Volume 2, Chapter 20, Section 20.0
"The Optimistic Cartographer Game: Heuristics Must Sign a Contract."
The maze is too big for brute force, so we hire a cartographer who, at
every intersection, estimates how far the goal still is: the heuristic
h(n). This program runs A* on the exact six-node graph the book traces
by hand in Section 20.2.5, with two cartographers:
* the honest one, whose estimates never exceed the true distance
(admissible: h <= h*) -- the contract of Section 20.0;
* the arrogant one, who overestimates at node A -- no contract.
Same maze, same algorithm: one returns the optimal route, the other
delivers the fastest wrong answer. That is the whole ethics of
heuristics, hiding inside one inequality.
Run: python3 optimistic_cartographer.py
"""
import heapq
# The book's graph, Section 20.2.5: S (start), A, B, C, D, G (goal).
EDGES = {
"S": (("A", 1), ("B", 4)),
"A": (("C", 3), ("D", 2)),
"B": (("D", 2),),
"C": (("G", 2),),
"D": (("G", 4),),
"G": (),
}
HONEST_H = {"S": 5, "A": 4, "B": 4, "C": 2, "D": 2, "G": 0}
ARROGANT_H = {"S": 5, "A": 10, "B": 1, "C": 2, "D": 2, "G": 0}
START, GOAL = "S", "G"
def astar(edges, h, start, goal):
"""A* on a graph; returns (path, cost, expanded_in_order)."""
heap = [(h[start], 0, start, [start])]
best_g = {start: 0}
expanded = []
while heap:
_, g, node, path = heapq.heappop(heap)
if g > best_g.get(node, float("inf")):
continue
expanded.append(node)
if node == goal:
return path, g, expanded
for nxt, cost in edges.get(node, ()):
ng = g + cost
if ng < best_g.get(nxt, float("inf")):
best_g[nxt] = ng
heapq.heappush(heap, (ng + h[nxt], ng, nxt, path + [nxt]))
return None, None, expanded
def trace(name, h, expected):
path, cost, expanded = astar(EDGES, h, START, GOAL)
print(f"\n{name}:")
print(f" route found: {' -> '.join(path)}")
print(f" total cost: {cost}")
print(f" nodes expanded in order: {' -> '.join(expanded)}")
assert path == expected["path"] and cost == expected["cost"]
def demo():
print("=" * 70)
print(" THE OPTIMISTIC CARTOGRAPHER GAME -- two cartographers, one maze")
print(" The Reasoning Kingdom, Volume 2, Chapter 20 (Sec. 20.0, 20.2.5)")
print("=" * 70)
print("\nThe maze (the same six nodes the book traces by hand):")
print(" S->A:1 S->B:4 A->C:3 A->D:2 B->D:2 C->G:2 D->G:4")
print("\nThe honest cartographer -- h never exceeds the true distance:")
print(" h: S=5, A=4, B=4, C=2, D=2, G=0 (h(n) <= h*(n) everywhere)")
trace("honest cartographer (admissible)", HONEST_H,
{"path": ["S", "A", "C", "G"], "cost": 6})
print(" optimal route S->A->C->G, cost 6 -- exactly what the hand")
print(" trace in the book found.")
print("\nThe arrogant cartographer -- one lie, at node A:")
print(" h: S=5, A=10, B=1, C=2, D=2, G=0 (h(A)=10 > h*(A)=5: contract broken)")
trace("arrogant cartographer (inadmissible)", ARROGANT_H,
{"path": ["S", "B", "D", "G"], "cost": 10})
print(" route S->B->D->G, cost 10. The overestimate at A made the")
print(" search abandon the truly optimal path. Optimism keeps you")
print(" exploring; arrogance makes you give up on a real path early.")
print(" Same maze, same algorithm -- one inequality of difference.")
print("=" * 70)
if __name__ == "__main__":
demo()20.1 How the Two Kinds of Approximation Fail
Let's look at two approximation schemes first. Both sound intuitively reasonable. Both go wrong in some situations.
Scheme one: greedy algorithms. At each step, make the choice that looks best locally, and never look back. In the traveling salesman problem, always walk to the nearest unvisited city; in the graph coloring problem, always give the current vertex the smallest-numbered color that doesn't clash with its neighbors.
Greedy algorithms are usually fast (polynomial time), but the results can be awful — sometimes an exponential factor worse than the optimum. Greedy makes no promise; it just "looks fine".
Scheme two: random search. Sample the solution space at random, and report the best result found. Random enough, and run enough times, and maybe you'll find a good solution.
Random search makes no promise either — "maybe" is not a contract. In the worst case, good solutions are so sparse that random search may never find one.
A large chunk of real-world systems run on "maybe" — random restarts, repeated sampling, keep the best result. These methods sometimes work in practice, but you don't know when they stop working, and you don't know the probability of failure. Without a contract there are no failure conditions — you can't even tell whether the algorithm is working. "Sometimes it works" is not a guarantee; it's luck.
The common problem with both schemes: they give no provable bound on "how far off". And that bound is exactly what a heuristic contract requires.
A Concrete Failure Scene
Take an extremely simple traveling salesman problem — 4 cities, edge weights below — and you can see the difference between greedy and random with your own eyes:
Cities: A, B, C, D
Edge weights (distances):
A-B: 10, A-C: 15, A-D: 20
B-C: 35, B-D: 25
C-D: 30
Optimal Hamiltonian cycle: A->B->D->C->A, total cost = 10+25+30+15 = 80Greedy (nearest neighbor) starting from A: A to B (10, shortest) -> B to D (25, shortest from B aside from A, since B to C is 35) -> D to C (30) -> forced back to A (15). Route: A->B->D->C->A, cost = 10+25+30+15 = 80. This time it happened to be right, because the graph is tiny.
But change the starting point: starting from B -> B to A (10) -> A to C (15) -> C to D (30) -> forced back to B (35). Route: B->A->C->D->B, cost = 10+15+30+35 = 90. Suboptimal. And these are just 4 cities; as the cities grow, greedy's error can balloon exponentially.
Random search: sample 100 tours at random; the best might be 85, or it might be 110 — no promise. Run it again and you get a different answer each time.
Neither has a contract. Greedy is right on some graphs, random is never certain. What's missing is exactly that inequality:
See? Greedy is right on this tiny graph from A, and wrong from B. You can't use "it was right on A" to prove an algorithm works — an algorithm without a contract isn't "roughly effective", it's "you don't know when it fails". That can be fatal.
20.2 Admissibility: Never Overestimate
The most classic heuristic framework in search is the A* algorithm. Its core is a heuristic function
A* maintains a priority queue and, at each step, expands the node with the smallest estimated total cost
The condition under which this algorithm finds the optimal solution lands precisely on one property of
Definition (admissibility): A heuristic function
where
What admissibility means:
Theorem (A completeness)*: if the heuristic
This is the first form of the heuristic contract: give me an estimate that never overestimates, and I'll guarantee you the optimal solution. The cost is that you must spend time constructing that estimate, and the algorithm may need to explore a larger search space.
A common mistake is using a crude upper bound on the true cost as the heuristic — that naturally overestimates, breaking admissibility. For example, in map search, if you use straight-line distance as
20.2.5 Hands-On: Tracing One Complete A* Search
Reading the definition isn't enough. Below is a 6-node directed graph; let's trace every single step of A*. Get a sheet of paper and draw along.
Nodes: S (start), A, B, C, D, G (goal)
Edges (S->node, cost):
S->A: 1, S->B: 4
A->C: 3, A->D: 2
B->D: 2
C->G: 2
D->G: 4
Heuristic function h (estimated cost to G):
h(S)=5, h(A)=4, h(B)=4, h(C)=2, h(D)=2, h(G)=0
True optimal cost h* (verifiable via reverse Dijkstra):
Actual: S->A->D->G: 1+2+4=7; S->B->D->G: 4+2+4=10; S->A->C->G: 1+3+2=6
Shortest: S->A->C->G = 6, so h*(S)=6, h(S)=5 ≤ 6 ✓ admissible
h*(A)=5 (A->C->G=3+2=5), h(A)=4 ≤ 5 ✓
h*(B)=6 (B->D->G=2+4=6), h(B)=4 ≤ 6 ✓
h*(C)=2, h(C)=2 ✓ (exactly precise)
h*(D)=4, h(D)=2 ≤ 4 ✓
h*(G)=0, h(G)=0 ✓
For every node, h(n) ≤ h*(n) holds, so h is admissible.Tracing A*:
Initial: priority queue = [(S, f=0+5=5)]. g(S)=0.
Step 1: expand S (smallest f=5). Successors:
- A: g=1, f=1+4=5 -> add to queue
- B: g=4, f=4+4=8 -> add to queue Queue: [(A,5), (B,8)]
Step 2: expand A (smallest f=5). Successors:
- C: g=1+3=4, f=4+2=6 -> add
- D: g=1+2=3, f=3+2=5 -> add Queue: [(D,5), (C,6), (B,8)]
Step 3: expand D (smallest f=5). Successors:
- G: g=3+4=7, f=7+0=7 -> add Queue: [(C,6), (G,7), (B,8)]
Step 4: expand C (smallest f=6). Successors:
- G: g=4+2=6, f=6+0=6 -> update G (a version with f=7 already exists; the new f=6 is better, so replace it) Queue: [(G,6), (B,8)]
Step 5: expand G (smallest f=6). G is the goal; found the path S->A->C->G, total cost 6.
Note: at Step 3, A* did not go down S->A->D->G (total cost = 7), because after D was expanded, G's f was 7, while C's f=6 in the queue had higher priority. A* correctly skipped the suboptimal path.
Now, what if we change
- After expanding S, A's f=1+6=7, B's f=4+4=8
- Queue: [(A,7), (B,8)]
- Expand A (f=7), D's f=5, C's f=6
- Queue: [(C,6), (D,5), (B,8)]
- Expand C, G's f=6… it still finds the optimum in the end, but only because the graph is tiny.
On more complex graphs, overestimation can make A* decide early on that some path "isn't worth exploring" — and that path happens to be optimal. Admissibility doesn't guarantee efficiency; admissibility guarantees you won't miss the optimum. Drop it, and the optimum may slip away from you, and you'll never even know.
Look closely at step 3: when D was expanded, the queue had C(f=6) and D(f=5). A* chose D, because D was more optimistic. Optimism makes A* willing to take risks, but it also lets A* turn around promptly when it sees a better path — because optimism is revised downward, never upward. If
20.3 Consistency: The Triangle Inequality Constraint
Admissibility guarantees the quality of the final result, but A*'s efficiency depends on another property of
Definition (consistency): A heuristic function
where
This is a triangle inequality: the estimated cost from
Consistency implies admissibility (you can verify this), but the reverse doesn't hold. Consistency is the stronger condition.
Under consistency,
These two properties — admissibility and consistency — are the precise mathematical content of the heuristic contract. With them, a "heuristic" isn't a random guess; it's an estimation mechanism that operates within a provable bound.
Back to the optimistic cartographer game: admissibility requires that the cartographer can't call a short road a long road, and consistency requires that the cartographer can't flip-flop between neighboring intersections. A*'s cleverness isn't "trusting intuition"; it's trusting only the intuition that has signed a contract. Without the contract, a heuristic is just a smooth-talking guide; with it, the heuristic becomes a legal move inside a formal system.
20.3.5 When Consistency Is Violated: A*'s Perplexity
Using the same graph as 20.2.5, let's build an admissible-but-inconsistent
Set
Check admissibility: is
✓, ✓. Yes, admissible.
Check consistency: for every edge
- Edge B->D:
, . Is ? No.
What just happened? From B, the estimate to G is 5; but from D (one step after B), the estimate is suddenly 1. The cartographer said "still far" at B, then after one step to D said "almost there". This flip-flop perplexes A*:
Starting from S: A(f=5), B(f=4+5=9). Pick A. Then D's f=1+2+1=4. Pick D. Then G's f=3+4+0=7. Pick C(f=6). C->G(f=6). Found the optimal path S->A->C->G, cost 6.
Looks fine? But the problem hides in this detail: after D is expanded, the queue holds C(f=6) and G(f=7, f via D). If we later discover another shorter route to D (say S->B->D with a smaller cost? No — S->B->D is 4+2=6, worse than S->A->D's 3), and
In larger searches, the cost of inconsistency is enormous: A* may need to re-expand nodes, and the algorithm degrades to nearly Dijkstra's efficiency. Consistency isn't decoration — it's the contract that underwrites A*'s efficiency.
An inconsistent heuristic is like a fickle tour guide. He tells you 5 km are left at B; you walk to D and he says it's actually 1 km. Added up, he only counted 2 km for the B->D stretch (5 -> 1), and the actual distance is 2 km too — "just happen to match". But if, at D, he suddenly says 4 km are left (to the next intersection), you'd start to wonder: does he even know what he's talking about? A*'s suspicion is mathematical: with inconsistency,
20.4 Approximation Ratio: The Worst-Case Guarantee
A* works well when optimality makes sense as a goal. But for many NP-complete problems, the optimal solution itself is hard to find, even when approximation is allowed. That's where another contract comes in: the approximation ratio.
Definition (approximation algorithm): For a minimization problem, if an algorithm
The approximation ratio is the worst-case version of the heuristic contract: no matter the input, the quality of the output stays within
Some famous results:
- Vertex cover: there is a 2-approximation algorithm (find a maximal matching, take both endpoints).
- Traveling salesman problem (metric version): there is a 1.5-approximation algorithm (Christofides' algorithm, 1976). This result stood for nearly half a century, until it was slightly improved in 2020.
- Traveling salesman problem (general version, no triangle inequality): if P ≠ NP, then for any constant
, there is no polynomial-time -approximation algorithm.
That last result is the crux: for some problems, approximating is itself NP-hard. Allowing error doesn't always make a problem easier. The approximation ratio has its own information-theoretic lower bound, and this bound comes from the problem's intrinsic structure, independent of any specific algorithm.
The impossibility proof for the general TSP uses a reduction: if a polynomial-time
20.4.5 Hands-On: The 2-Approximation for Vertex Cover — The Power of a Maximal Matching
The vertex cover problem: given a graph
Algorithm (maximal matching method):
- Find a maximal matching
of the graph (a matching to which no more edges can be added) - Output both endpoints of every edge in
Why is this a 2-approximation?
Let
- Lower bound: the optimal vertex cover needs at least
vertices. Since the edges in share no endpoints (that's what a matching is), covering these edges takes at least vertices — each edge needs at least one endpoint picked, and the edges picked can't share vertices. So . - Upper bound: we output
vertices, and . ✓
Why is maximal (not maximum) enough? A simple greedy construction of a maximal matching: walk through all the edges; if both endpoints of the current edge aren't yet covered by the matching, add this edge to it. The result isn't necessarily a maximum matching (the one with the most edges), but it's definitely maximal (no more edges can be added). For 2-approximation, maximal is enough.
A concrete example:
Graph: vertices {1,2,3,4,5}
Edges: (1,2), (2,3), (3,4), (4,5), (1,5)Greedy maximal matching (walking edges in order):
- Encounter (1,2): 1 and 2 are both unmatched -> add to M. M=
- Encounter (2,3): 2 is matched -> skip
- Encounter (3,4): 3 and 4 are both unmatched -> add to M. M=
- Encounter (4,5): 4 is matched -> skip
- Encounter (1,5): 1 is matched -> skip
Output C = {1,2,3,4}, size 4.
What's the optimum? This graph is a 5-cycle. Covering all 5 edges takes at least 3 vertices (take every other vertex; {2,4,5} covers every edge). So OPT=3. Our solution is 4, approximation ratio 4/3 ≈ 1.33 ≤ 2. ✓
What if you change the traversal order? If you encounter (2,3) first and then (1,2) and (3,4),
Notice the beauty of this algorithm: it doesn't try to choose vertices "cleverly". It relies on an extremely simple fact — the size of a matching is naturally a lower bound on OPT. That bound isn't computed; it's provided by the graph's structure itself. Good approximation algorithms often aren't "cleverly approaching the optimum", but rather "founded a simple structure that is necessarily close to the optimum". This resonates with Lyapunov functions — both find a quantity that naturally decreases (or is naturally bounded).
20.5 PAC Learning: The Probabilistic Version of "Good Enough"
The approximation ratio is about the quality of a solution; the PAC framework applies the same spirit to learning problems.
Definition (PAC learning): A concept class
In plain words: with high probability (at least
Many people read "approximately correct with high probability" as lowering the bar. It's the opposite —
The core conclusion of the PAC framework: the sample size
In the PAC framework, the required sample size also depends on another quantity: the VC dimension (Vapnik-Chervonenkis dimension) of the hypothesis space
20.5.5 Hands-On: Three Exercises on VC Dimension
Exercise 1: intervals on the real line. Let the hypothesis space
2 points: put them at
- (+,+): the interval
✓ - (-,-): the interval
(covers neither point) ✓ - (+,-): the interval
✓ - (-,+): impossible. Because if an interval covers the right-hand point (
), it must also cover any point in between. To cover without covering ? If , any interval containing and all points between it and must… wait — an interval is continuous, but and are discrete points. The interval contains but not . So (-,+) IS possible! The interval labels as -1 and as +1. ✓
All 4 labelings are producible. So VC dimension ≥ 2.
3 points: with
Exercise 2: linear classifiers in the plane (lines through the origin).
Exercise 3: the tension between neural networks and VC dimension. A neural network with
Put the three exercises side by side, and what do you see? The VC dimension isn't some fuzzy "complexity"; it's a concrete number you can compute by hand. 2, 2 (or 3), billions — these numbers tell you why some hypothesis classes are easy to learn, some need more data, and some leave theorists puzzled. Computability is the best sobriety check.
20.6 Unifying the Three Contracts
Put this chapter's contents together:
| Contract | Promise | Condition | Cost |
|---|---|---|---|
| Admissibility + A* | Find the optimal solution | May explore a larger space | |
| Approximation ratio | Solution no more than | Worst-case guarantee | Give up optimality |
| PAC learning | Approximately correct with high probability | Enough samples | Allows failure probability |
Three contracts, three different brands of "good enough" — each with its own cost structure and guarantee type. What they share: each turns "approximately" from an intuition into a mathematical quantity. A contract can be violated, but violations are detectable. This is fully in the spirit of Chapter 14's formal systems: precise definitions allow precise criticism.
A heuristic isn't a second-rate compromise forced on us because exact reasoning is too hard. It is a rational commitment to inference quality under computational constraints — knowing what you promise, and where the promise's boundary lies.
20.7 After the Contract Is Signed: Who Writes the Contract?
This chapter built a reassuring framework: once a contract is signed, a heuristic's behavior is mathematically guaranteed. But there's a question we've been avoiding: who writes the contract?
An admissible heuristic
Back to the language of Chapter 15: in a formal system, axioms must be fed in from outside; the system can't choose its own axioms. In a heuristic contract, the terms of the contract (the form of
Which means: all of today's "guaranteed reasoning" rests on an external promise — you trust that the designer's chosen heuristic is reasonable, and that the chosen hypothesis space is appropriate. But what if that external promise is itself wrong? What if, in some scenario, your heuristic systematically overestimates, and you don't know it?
This question leads to a deeper one: can the contract be written automatically, from data? Can we let the system observe its own behavior and infer a suitable heuristic from its successes and failures? If designing a heuristic is itself an inference problem — inferring, from a history of problem instances, which estimation strategy works on future instances — then heuristic design is meta-learning.
And meta-learning is precisely the door Chapter 21 opens: can learning be understood as inferring the shortest description from data? If learning is inverse inference, then "learning a good heuristic" — can that itself be understood as a kind of inverse inference?
These three questions — who writes the contract, whether the contract can be written automatically, and whether writing the contract counts as learning — push us from "formalizing heuristics" toward "the inverse-inference structure of learning". Formalizing the contract was this chapter's job; where the contract comes from is the next chapter's job. The final answer is in Chapter 21.
Open Questions
Can the boundary of approximation be broken? For some problems, the approximation ratio has an insurmountable lower bound (assuming P ≠ NP). But the theory of approximation algorithms still has plenty of open problems: what is the optimal approximation ratio for the traveling salesman problem? Does the Unique Games Conjecture hold — it pins down approximation lower bounds for a huge number of problems. Questions in this direction are often easier to state than P ≠ NP itself, and just as deep.
The computational version of PAC learning: the PAC framework guarantees sample complexity, not computational complexity. Some concept classes are learnable in the sample sense, but the learning algorithm itself may need exponential time. Distinguishing "information-theoretically learnable" from "computationally learnable" is the central tension of learning theory — the former asks how much data you need, the latter asks how much time.
Can heuristics be discovered automatically? A* needs a hand-designed
Exercises
★ Warm-up
In A* pathfinding on a map, straight-line distance is commonly used as the heuristic
(the zero heuristic; A* degenerates into Dijkstra's algorithm) straight-line (Euclidean) distance from to the goal straight-line distance from to the goal the actual shortest path length from to the goal (assuming you already know it) Manhattan distance from to the goal (when only up/down/left/right moves are allowed)
★★ Derivation
The cost of admissibility: design a simple search problem (draw a 5-node graph with edge weights) such that an admissible heuristic
must expand more nodes to find the optimal solution, while an inadmissible finds the same solution with fewer nodes. Give concrete values for both 's, and trace A*'s expansion order in both cases. What does admissibility guarantee, and what doesn't it guarantee? PAC vs. Bayes: Chapter 17's Bayesian inference and this chapter's PAC learning both deal with "generalizing from finite data". PAC's guarantee holds for the worst-case distribution; Bayes's guarantee depends on the prior. Which guarantee assumes less? In a scenario where the prior is completely wrong, which framework breaks down first?
★★★ Challenge
The general traveling salesman problem (TSP) (when the triangle inequality isn't satisfied) has been proven: if P ≠ NP, then for any constant
The proof of this "inapproximability" uses a reduction: if a
The goal of this exercise isn't a complete proof; it's to understand why allowing error doesn't always make the problem easier — in some cases, approximating is exactly as hard as solving exactly.
