When a problem is NP-hard, the conventional wisdom is that solving it exactly requires time that grows exponentially with the input size — something like . With 100 cities in a travelling salesman tour, that's more operations than atoms in the universe. Case closed?
Not quite. NP-hardness is a worst-case verdict: it tells you about the hardest possible inputs, not every input. Some inputs carry hidden structure that makes the problem dramatically easier. The most striking example involves planar graphs — graphs that can be drawn on a flat plane with no edges crossing.
For planar graphs, a beautiful result called the Planar Separator Theorem (Lipton & Tarjan, 1979) shows that every such graph can be cut in half by removing only vertices. That small cut unlocks a divide-and-conquer recursion where each level works on a graph roughly half the size. The result: running times like for problems such as planar Vertex Cover and planar Travelling Salesman — not polynomial, but astronomically better than .
A related tool is treewidth: a measure of how "tree-like" a graph is. Graphs with small treewidth admit dynamic programming over their tree structure, again achieving subexponential or even polynomial time on problems that are hard in general.
These techniques live in a rich landscape called Fixed-Parameter Tractability (FPT), where the exponential explosion is confined to a structural parameter rather than the raw input size.
Comments
Loading comments...