Parameterized & Fine-Grained Complexity: What This Course Covers
Part I of the track ended with NP-completeness (NP-Completeness and NP-Hardness) and a list of ways to live with it (Coping with NP-Hardness). The approximation course took one of those ways: give up optimality, keep polynomial time. This course takes two others, and they share one idea. The classical picture sorts problems into "polynomial" and "NP-hard", and that picture is too coarse in both directions.
- Inside NP-hard, measure more than the input size. A vertex cover instance has a size and a target . An algorithm running in time is exponential, but only in : on a graph with a million vertices and it does about steps, while would be beyond any computer. Parameterized complexity (Downey and Fellows, from the early 1990s) studies which problems admit running times , and proves that some, such as -clique, almost certainly do not.
- Inside P, measure the exponent. Edit distance has an algorithm known since the 1970s, and nobody has found an one. NP-hardness cannot explain this, since the problem is in P. Fine-grained complexity explains it by reductions that preserve exact exponents: a truly subquadratic edit distance algorithm would give a algorithm for CNF-SAT, refuting a widely believed hypothesis about satisfiability.
Both halves end in conditional lower bounds. Unconditional lower bounds for these problems are far beyond current techniques, so we prove statements of the form "if problem A could be solved faster, then so could problem B, which people have tried hard to speed up for decades". Every such statement in this course names its hypothesis.
A first example: where the exponent lives
Is there a vertex cover of size at most ? Trying every set of vertices costs about checks, which for fixed is polynomial, , but with in the exponent of . The bounded search tree of the next section instead picks any uncovered edge and branches: one of and must be in the cover. The tree has depth at most , so at most nodes, whatever is. The program counts the work of both on random graphs that have a planted cover of size 6.
import random
from itertools import combinations
def planted(n, k, p, seed):
rng = random.Random(seed)
cover = set(rng.sample(range(n), k))
edges = [(u, v) for u in range(n) for v in range(u + 1, n)
if (u in cover or v in cover) and rng.random() < p]
return edges
def brute(n, edges, k):
checked = 0
for size in range(k + 1):
for S in combinations(range(n), size):
checked += 1
s = set(S)
if all(u in s or v in s for u, v in edges):
return size, checked
return None, checked
def branch(edges, k, counter):
counter[0] += 1
if not edges:
return True
if k == 0:
return False
u, v = edges[0]
return (branch([e for e in edges if u not in e], k - 1, counter) or
branch([e for e in edges if v not in e], k - 1, counter))
print(" n |E| brute-force sets search-tree nodes")
for n in [12, 16, 20, 24]:
E = planted(n, 6, 0.5, seed=n)
size, checked = brute(n, E, 6)
nodes = [0]
found = branch(E, 6, nodes)
print(f"{n:3} {len(E):4} {checked:17} {nodes[0]:18} cover of size <= 6: {found}") n |E| brute-force sets search-tree nodes
12 28 2306 126 cover of size <= 6: True
16 42 13318 127 cover of size <= 6: True
20 59 27167 63 cover of size <= 6: True
24 61 164955 127 cover of size <= 6: True
The brute-force count grows roughly like (it stops at the first cover it meets, so it also depends on where the planted cover sits in the enumeration order); the search tree never exceeds nodes, however large becomes. Each node costs time linear in the graph, so the whole search runs in time. That is the shape of a fixed-parameter tractable algorithm.
A second example: where the exponent of lives
3SUM asks whether three numbers of a list sum to zero. Trying all triples costs about steps; sorting and sweeping two pointers costs . Both are polynomial, and the question fine-grained complexity asks is whether is possible for some . It is conjectured not (up to subpolynomial factors), and dozens of geometry problems inherit that bound.
import random
def triples(a):
steps, n = 0, len(a)
for i in range(n):
for j in range(i + 1, n):
for l in range(j + 1, n):
steps += 1
return steps
def two_pointer_steps(a):
a, steps = sorted(a), 0
for i in range(len(a) - 2):
lo, hi = i + 1, len(a) - 1
while lo < hi:
steps += 1
s = a[i] + a[lo] + a[hi]
if s < 0:
lo += 1
else:
hi -= 1
return steps
rng = random.Random(3)
print(" n all triples two-pointer steps")
for n in [25, 50, 100, 200]:
a = rng.sample(range(-10**6, 10**6), n)
print(f"{n:4} {triples(a):13} {two_pointer_steps(a):19}") n all triples two-pointer steps
25 2300 276
50 19600 1176
100 161700 4851
200 1313400 19701
Doubling multiplies the first column by about 8 and the second by about 4. The difference between and is the kind of gap that algorithm design closes; the difference between and is the kind that, for 3SUM, nobody has closed, and the course explains why that matters.
The map of the course
| Section | Main results | Technique |
|---|---|---|
| Fixed-parameter tractability | FPT and XP; vertex cover in and ; cluster editing in ; iterative compression; -path in (Alon, Yuster and Zwick, 1995) | branching, compression, randomized coloring |
| Kernelization | kernels; Buss's kernel; crowns and a kernel; the LP kernel (Nemhauser and Trotter, 1975); -hitting set via sunflowers; no polynomial kernel for -path unless NP coNP/poly | reduction rules, LP, combinatorics |
| Treewidth | tree decompositions, nice decompositions; independent set in ; Courcelle's theorem (1990); elimination orderings | dynamic programming over separators |
| Parameterized lower bounds | W[1]-hardness of clique and independent set; ETH and SETH (Impagliazzo, Paturi and Zane, 2001); no clique under ETH | parameterized and sparsifying reductions |
| Fine-grained complexity | OV conjecture from SETH (Williams, 2005); edit distance and LCS (Backurs and Indyk, 2015; Abboud, Backurs and Vassilevska Williams, 2015); 3SUM (Gajentaan and Overmars, 1995); APSP and negative triangle (Vassilevska Williams and Williams, 2010) | fine-grained reductions |
Conventions
- is the input size or the number of vertices, the number of edges, the parameter. means : the polynomial factor is suppressed.
- Decision problems are written with their parameter: -VERTEX COVER asks for a cover of size at most , parameterized by .
- Every hardness result names its assumption: P NP, FPT W[1], ETH, SETH, or one of the fine-grained conjectures. A conjecture is a conjecture; the course never states one as a theorem.
- Proofs given in full are marked Proof; results quoted without proof say "stated", and sketches say so.
- Programs are seeded and deterministic and count their work (search-tree nodes, table entries, comparisons) next to a brute-force check on small instances. C++ versions of the core algorithms use C++20 and the standard library only.
Test yourself
Which running time is fixed-parameter tractable in the parameter ?
Why does fine-grained complexity use reductions instead of NP-hardness to explain why edit distance has no known algorithm?
- Edit distance is NP-hard
- Edit distance is in P, so NP-hardness says nothing about the exponent; exponent-preserving reductions from a hard problem do
- Because lower bounds for edit distance are proven unconditionally
- Because edit distance is undecidable
How many nodes can the vertex cover search tree with parameter have at most?