Parameterized Reductions and W[1]-Hardness
Vertex cover parameterized by is FPT. Its close relative CLIQUE, "does have pairwise adjacent vertices?", has resisted every attempt: the best algorithms run in time , with the exponent improved only by a constant factor through fast matrix multiplication (, Nešetřil and Poljak, 1985). NP-hardness cannot explain the difference, since both problems are NP-complete. Parameterized complexity needs its own notion of reduction and its own hardness classes. This lesson defines them; the next one connects them to the Exponential Time Hypothesis.
Parameterized reductions
A parameterized reduction from a parameterized problem to maps an instance of to an instance of such that
- ;
- for some computable ;
- the map runs in time .
Condition 2 is the new one: the parameter of the target may depend only on the old parameter. Under these conditions, if is FPT then so is : run the reduction, then the FPT algorithm for , which costs .
Not every polynomial reduction is parameterized. The classical reduction from INDEPENDENT SET to VERTEX COVER maps to : a set is independent exactly when its complement is a cover. The new parameter depends on , so the reduction says nothing parameterized, and indeed vertex cover is FPT while independent set is not believed to be. On the other hand, CLIQUE and INDEPENDENT SET are parameterized-equivalent through the complement graph, with .
import random
from itertools import combinations
def gnp(n, p, seed):
rng = random.Random(seed)
return {frozenset(e) for e in combinations(range(n), 2) if rng.random() < p}
def complement(n, E):
return {frozenset(e) for e in combinations(range(n), 2)} - E
def has_clique(n, E, k):
return any(all(frozenset(p) in E for p in combinations(S, 2)) for S in combinations(range(n), k))
def has_independent(n, E, k):
return any(all(frozenset(p) not in E for p in combinations(S, 2)) for S in combinations(range(n), k))
def has_cover(n, E, k):
return any(all(e & set(S) for e in E) for S in combinations(range(n), k))
n = 11
print("seed k clique(G,k) indep(co-G,k) indep(G,k) cover(G,n-k)")
for seed in range(3):
E = gnp(n, 0.4, seed)
for k in [4, 5]:
print(f"{seed:4} {k:2} {has_clique(n, E, k)!s:12} {has_independent(n, complement(n, E), k)!s:14}"
f" {has_independent(n, E, k)!s:11} {has_cover(n, E, n - k)}")seed k clique(G,k) indep(co-G,k) indep(G,k) cover(G,n-k)
0 4 False False True True
0 5 False False True True
1 4 False False True True
1 5 False False False False
2 4 True True True True
2 5 False False True True
Both pairs of columns agree on every row. The first pair is a parameterized reduction ( stays ); the second pair is a correct reduction, but the parameter of the vertex cover instance is , here 7 or 6, growing with the graph.
The class W[1]
The W hierarchy was defined by Downey and Fellows (1992–1995) via weighted satisfiability of circuits of bounded "weft" (the number of large gates on any input-output path). An equivalent definition that suffices here:
W[1] is the class of parameterized problems that have a parameterized reduction to -CLIQUE. A problem is W[1]-hard if -CLIQUE reduces to it, and W[1]-complete if both hold.
The working hypothesis FPT W[1] says that -CLIQUE is not FPT. Evidence: decades of failed attempts, the fact that W[1] also contains SHORT NONDETERMINISTIC TURING MACHINE ACCEPTANCE (does a given nondeterministic machine accept within steps?), which looks as hard as anything parameterized by can be, and the fact that FPT W[1] would refute the Exponential Time Hypothesis (next lesson). A W[1]-hardness proof is therefore strong evidence that no algorithm exists.
A typical reduction: multicolored clique
Many W[1]-hardness proofs start from a variant with extra structure. MULTICOLORED CLIQUE: the vertices are partitioned into color classes ; is there a clique with exactly one vertex of each color? It is W[1]-hard by the following reduction from CLIQUE: make copies of the vertex set, copy forming class , and join to when , and . A multicolored -clique picks distinct, pairwise adjacent original vertices, and every -clique gives a multicolored one by assigning its vertices to the classes in any order. The new parameter is and the size is : a parameterized reduction.
The color classes make later gadgets simpler: a gadget can "select one vertex from " and "check one edge between and " separately. The program builds the reduction and checks it.
import random
from itertools import combinations, product
def gnp(n, p, seed):
rng = random.Random(seed)
return {frozenset(e) for e in combinations(range(n), 2) if rng.random() < p}
def has_clique(n, E, k):
return any(all(frozenset(p) in E for p in combinations(S, 2)) for S in combinations(range(n), k))
def to_multicolored(n, E, k):
"""vertices (v, i): copy i of v; edges only between different colors."""
F = set()
for (u, i), (v, j) in combinations(list(product(range(n), range(k))), 2):
if i != j and u != v and frozenset((u, v)) in E:
F.add(frozenset(((u, i), (v, j))))
return F
def has_multicolored_clique(n, F, k):
for choice in product(range(n), repeat=k): # one vertex per color class
verts = [(choice[i], i) for i in range(k)]
if all(frozenset(p) in F for p in combinations(verts, 2)):
return True
return False
n = 9
print("seed k clique multicolored |V'| |E'|")
for seed in range(4):
E = gnp(n, 0.45, seed)
for k in [3, 4]:
F = to_multicolored(n, E, k)
print(f"{seed:4} {k:2} {has_clique(n, E, k)!s:7} {has_multicolored_clique(n, F, k)!s:13} {n * k:5} {len(F):5}")seed k clique multicolored |V'| |E'|
0 3 True True 27 66
0 4 False False 36 132
1 3 True True 27 132
1 4 True True 36 264
2 3 True True 27 102
2 4 False False 36 204
3 3 True True 27 72
3 4 False False 36 144
The W hierarchy
Allowing larger weft gives a hierarchy (stated):
| Problem (parameter = solution size) | Complexity |
|---|---|
| CLIQUE, INDEPENDENT SET, MULTICOLORED CLIQUE | W[1]-complete |
| SHORT NONDETERMINISTIC TM ACCEPTANCE | W[1]-complete |
| DOMINATING SET, SET COVER, HITTING SET (unbounded set size) | W[2]-complete |
| WEIGHTED CIRCUIT SATISFIABILITY | W[P]-complete |
All inclusions are believed to be strict, and FPT XP is known unconditionally (by a diagonalization, Downey and Fellows). In practice, W[1]-hardness is the result one proves; membership in a particular level matters less than knowing that FPT is out of reach.
Further W[1]-hard problems include -clique in regular graphs, independent set in unit disk graphs, partitioned subgraph isomorphism, and many problems with structural parameters, such as list coloring parameterized by treewidth. For problems parameterized by treewidth this shows that Courcelle's theorem has limits: list coloring is not MSO-expressible with a bounded formula, because the list sizes are unbounded.
Test yourself
Which condition distinguishes a parameterized reduction from a polynomial-time many-one reduction?
- It must run in linear time
- The new parameter must be bounded by a function of the old parameter alone
- It must preserve the instance size
- It must be randomized
Why is the map from INDEPENDENT SET to VERTEX COVER not a parameterized reduction?
- Because it is incorrect
- Because the new parameter depends on the input size
- Because it takes exponential time
- Because vertex cover is W[1]-hard
What does a W[1]-hardness proof for a problem suggest?
- The problem is NP-hard
- The problem has no algorithm unless FPT W[1]
- The problem is undecidable
- The problem has a polynomial kernel
In which class is DOMINATING SET parameterized by solution size complete?
- FPT
- W[1]
- W[2]
- XP but no W class