TExcelTAD
Home › Parameterized & Fine-Grained Complexity › Parameterized & Fine-Grained Complexity: What This Course Covers

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.

  1. Inside NP-hard, measure more than the input size. A vertex cover instance has a size nn and a target kk. An algorithm running in time 2k⋅n2^k \cdot n is exponential, but only in kk: on a graph with a million vertices and k=20k = 20 it does about 101210^{12} steps, while nkn^k would be beyond any computer. Parameterized complexity (Downey and Fellows, from the early 1990s) studies which problems admit running times f(k)⋅nO(1)f(k) \cdot n^{O(1)}, and proves that some, such as kk-clique, almost certainly do not.
  2. Inside P, measure the exponent. Edit distance has an O(n2)O(n^2) algorithm known since the 1970s, and nobody has found an O(n2−ε)O(n^{2-\varepsilon}) 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 2(1−δ)n2^{(1-\delta)n} 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 kk? Trying every set of kk vertices costs about (nk)\binom{n}{k} checks, which for fixed kk is polynomial, O(nk)O(n^k), but with kk in the exponent of nn. The bounded search tree of the next section instead picks any uncovered edge uvuv and branches: one of uu and vv must be in the cover. The tree has depth at most kk, so at most 2k+1−12^{k+1} - 1 nodes, whatever nn is. The program counts the work of both on random graphs that have a planted cover of size 6.

python · try it yourself
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 (n6)\binom{n}{6} (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 27−1=1272^7 - 1 = 127 nodes, however large nn becomes. Each node costs time linear in the graph, so the whole search runs in O(2k(n+m))O(2^k (n + m)) time. That is the shape of a fixed-parameter tractable algorithm.

A second example: where the exponent of nn lives

3SUM asks whether three numbers of a list sum to zero. Trying all triples costs about n36\frac{n^3}{6} steps; sorting and sweeping two pointers costs O(n2)O(n^2). Both are polynomial, and the question fine-grained complexity asks is whether n2−εn^{2-\varepsilon} is possible for some ε>0\varepsilon > 0. It is conjectured not (up to subpolynomial factors), and dozens of geometry problems inherit that bound.

python · try it yourself
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 nn multiplies the first column by about 8 and the second by about 4. The difference between n3n^3 and n2n^2 is the kind of gap that algorithm design closes; the difference between n2n^2 and n1.99n^{1.99} 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 O(2kn)O(2^k n) and O(1.47kn)O(1.47^k n); cluster editing in O(3kn3)O(3^k n^3); iterative compression; kk-path in 2O(k)nO(1)2^{O(k)} n^{O(1)} (Alon, Yuster and Zwick, 1995) branching, compression, randomized coloring
Kernelization kernels; Buss's O(k2)O(k^2) kernel; crowns and a 3k3k kernel; the 2k2k LP kernel (Nemhauser and Trotter, 1975); dd-hitting set via sunflowers; no polynomial kernel for kk-path unless NP ⊆\subseteq coNP/poly reduction rules, LP, combinatorics
Treewidth tree decompositions, nice decompositions; independent set in O(2t⋅tO(1)⋅n)O(2^{t} \cdot t^{O(1)} \cdot n); 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 f(k)no(k)f(k) n^{o(k)} 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

  • nn is the input size or the number of vertices, mm the number of edges, kk the parameter. O∗(f(k))O^*(f(k)) means f(k)⋅nO(1)f(k) \cdot n^{O(1)}: the polynomial factor is suppressed.
  • Decision problems are written with their parameter: kk-VERTEX COVER asks for a cover of size at most kk, parameterized by kk.
  • Every hardness result names its assumption: P ≠\ne NP, FPT ≠\ne 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 kk?

  1. O(nk)O(n^k)
  2. O(2k⋅n3)O(2^k \cdot n^3)
  3. O(nk)O(n^{\sqrt{k}})
  4. O(kn)O(k^n)

Why does fine-grained complexity use reductions instead of NP-hardness to explain why edit distance has no known O(n2−ε)O(n^{2-\varepsilon}) algorithm?

  1. Edit distance is NP-hard
  2. Edit distance is in P, so NP-hardness says nothing about the exponent; exponent-preserving reductions from a hard problem do
  3. Because lower bounds for edit distance are proven unconditionally
  4. Because edit distance is undecidable

How many nodes can the vertex cover search tree with parameter kk have at most?

  1. kk
  2. 2k+1−12^{k+1} - 1
  3. nkn^k
  4. k!k!