Fixed-parameter tractability 2026-10-24
A parameterized decision problem is fixed-parameter tractable if an algorithm decides every instance of encoded length and parameter in running time at most , for a computable function and a constant independent of . The distinction is in the exponent: has this form, whereas an bound alone does not establish fixed-parameter tractability. Branching on an uncovered edge gives a fixed-parameter tractable vertex cover decision problem.
Past exam of the computer science course of the University of Oxford 2019 Algorithms 3 b Solution 2026-10-25
The vertex cover decision problem takes a finite simple graph and a nonnegative integer , and asks whether there is a vertex cover of cardinality at most . The optimization problem asks for a minimum vertex cover, with cost equal to its cardinality.
For the decision problem, if there are no edges, accept; if there is an edge but , reject. Otherwise choose an edge and branch: either include and recurse on with budget , or include and recurse on with budget . Accept if either branch accepts. Every vertex cover contains at least one endpoint of , so every possible solution is retained by at least one branch. Conversely, adding the selected endpoint to a vertex cover returned by the smaller instance covers all original edges. This proves correctness by induction on the remaining budget.
The search tree has depth at most and at most leaves. Processing each node in time gives running time, establishing fixed-parameter tractability.
For optimization, greedily build a maximal matching : repeatedly select an edge and discard every edge touching either endpoint. Return the set of all endpoints of . Any edge with neither endpoint in could be added to , contradicting maximality; thus is a vertex cover. Since the edges of a matching in a graph have pairwise disjoint endpoint sets, every vertex cover must contain at least one different vertex for each of them. ThereforeThe greedy construction takes polynomial time, and can be implemented in with adjacency lists. It needs only a maximal matching, not a maximum matching.
Vertex cover decision problem 2026-10-25
The vertex cover decision problem asks whether a finite simple graph has a vertex cover containing at most vertices. For an uncovered edge , any valid vertex cover contains or . Branch on these two possibilities, delete the chosen vertex and its incident edges, and decrease by one. An edgeless graph accepts and a nonempty graph with rejects. The search tree has at most leaves, giving running time with straightforward copying. Thus this parameterization is fixed-parameter tractable.