← writing

September 12, 2026 · note

Parameterized Algorithms Ch. 1: exploiting a small k

My analysis of Chapter 1 of Cygan et al. with a clean solution to Vertex Cover Problem!

  • Parameterized complexity
  • Vertex cover
  • Kernelization

Book: Cygan, Fomin, Kowalik, Lokshtanov, Marx, Pilipczuk, Pilipczuk, Saurabh, Parameterized Algorithms (Springer, 2016), Chapter 1 On the writing: the content and the reasoning here are mine. I used an AI to reorder it and format the tables.


So to start with the author picks up the Bar Fight Prevention Problem which is basically a problem which states:

"You have a list of all of the n people who will come to the bar, and for each pair of people a prediction of whether or not they will fight if they both are admitted. You need to figure out whether it is possible to admit everyone except for at most k troublemakers, such that no fight breaks out among the admitted guests."

The diagram of the graph the author gives:

Conflict graph on seven guests. Bob, Daniel and Fedor are shaded as the rejected set.


My analysis for the solution

This is clearly the vertex cover problem which is a NP complete problem as everyone knows.

The standard non optimal solution is a exponential solution in nn which for bounds like n=104n = 10^4 takes the time 21042^{10^4}, which is a extremely large number, much larger than even the Avogadro’s constant.

2104≈103010(3,011 digits, Avogadro’s constant has 24)2^{10^4} \approx 10^{3010} \qquad \text{(3,011 digits, Avogadro's constant has 24)}

Now suppose we have the fact that kk (≤15\le 15) is very small, thus we can exploit its advantage to solve the problem. We now do a chain of thoughts of different observations for the optimal solution:

Idea one

We can chose any pair of kk elements which is (nk)\binom{n}{k} which is still large for the bounds:

(10415)≈7.6×1047≈1024×Avogadro’s constant\binom{10^4}{15} \approx 7.6 \times 10^{47} \approx 10^{24} \times \text{Avogadro's constant}

Idea two

We know that any node that has more than kk edges surely must be removed since for keeping that node we must remove the other k+1k+1 nodes and hence that invalidates the answer, similarly for the nodes that are not connected to other nodes can surely be taken (isolated islands).

Peeling the highest degree node out of the conflict graph. Conflicts fall 16, 11, 6, 2, 0 while k counts down 4, 3, 2, 1, 0.

One precheck

We know that total edges count must be less than k2+1k^2 + 1.

(Why?) Reason is that at worst case even if each node is connected to kk other nodes, even after removal of kk nodes there will surely exist at least one edge which shows answer does not exist.

k nodes×k edges each=k2  ⟹  m>k2 has no solutionk \text{ nodes} \times k \text{ edges each} = k^2 \implies m > k^2 \text{ has no solution}

This is a very similar idea to what we do after removal of edges as in reverse process of the Kruskal Algorithm, reverse the idea and then it builds the answer. Please be clear this isn’t the actual answer and it just a heuristic unlike the correct idea of removing nodes with degree k+1k+1 or higher.

Idea three

Now suppose we have a list of people who are admitted and some who aren’t, can have at max kk conflicts and minimum 1, thus there can be a total of 2k22k^2 nodes in worst case for k2k^2 edges not used, as this is a dense graph overall it can be fast overall.

∑vdeg⁡(v)=2m≤2k2\sum_v \deg(v) = 2m \le 2k^2

Hence this takes the following number of operations:

(2k2k)\binom{2k^2}{k}

Idea four (Kernelization)

Say for some person with one edge we can surely take that.

(Why?) Reason is suppose we don’t take it and instead take someone else then we surely know that the other guy will have the node degree ≥1\ge 1. Hence it is always optimal to take those nodes with degree 11.

Now we can reduce the bound of 2k22k^2 to k2k^2, the reason is pretty simple, all the nodes with degree one aren’t present hence min degree is 2 and hence total edges at worst case k2k^2 has 2 end points thus nodes used 2k22k^2 and there we know that each has atleast 2 edges hence worst case unique nodes is k2k^2.

2⋅(nodes)≤∑vdeg⁡(v)=2m≤2k2  ⟹  nodes≤k22 \cdot (\text{nodes}) \le \sum_v \deg(v) = 2m \le 2k^2 \implies \text{nodes} \le k^2

Idea five

We can also bound the time complexity by another logic of bounding the search space, for each conflict try removing one of the two and keep going deep into the tree with remaining options decreased by 1, this way the worst case of recursive calls is 2k2^k as we know that at each height nodes double by 2 as the recurrence:

T(k)=2⋅T(k−1)+O(n+m)T(k) = 2 \cdot T(k-1) + O(n + m)

to check and verify if the solution exists as we know we can easily check any NP complete problem in polynomial time. Here mm is the possible conflicts which is bounded again by nk/2nk/2 reason being very similar to what it was above:

2m=∑vdeg⁡(v)≤nk  ⟹  m≤nk/22m = \sum_v \deg(v) \le nk \implies m \le nk/2

hence the solution of recurrence becomes:

O(2k⋅k⋅n)O(2^k \cdot k \cdot n)

Worst case bound is 2k⋅k⋅n2^k \cdot k \cdot n which is computable with smart implementation. If we kernelize first then n≤k2n \le k^2, so each call costs O(k2)O(k^2) and the total is O(2k⋅k2)O(2^k \cdot k^2).


The numbers

For n=104n = 10^4 and k=15k = 15:

ApproachCostRoughlyRunnable
Every subset2n2^n10301010^{3010}no
Every kk-subset (1)(10415)\binom{10^4}{15}7.6×10477.6 \times 10^{47}no
After forced removals (3)(2k2k)=(45015)\binom{2k^2}{k} = \binom{450}{15}3.8×10273.8 \times 10^{27}no
After kernelization (4)(k2k)=(22515)\binom{k^2}{k} = \binom{225}{15}9.1×10229.1 \times 10^{22}no
Search tree (5)2k⋅k⋅n2^k \cdot k \cdot n4.9×1094.9 \times 10^{9}seconds
Kernelize, then search (4 + 5)2k⋅k22^k \cdot k^27.4×1067.4 \times 10^{6}instant

The idea of exploiting small kk to find a much efficient solution is what motivates this topic.


FPT

A problem parameterized by kk is fixed-parameter tractable (FPT) if it can be solved in time f(k)⋅∣I∣O(1)f(k) \cdot |I|^{O(1)}, where ff is a computable function depending only on kk.

A similar idea for finding cliques with the constraint of max degree bounded by some value delta say (Δ=50\Delta = 50), this can be done by FPT as well. Any clique then has at most Δ+1\Delta + 1 vertices, so for each vertex we only search its own neighbourhood:

O(n⋅2Δ+1⋅poly)O(n \cdot 2^{\Delta+1} \cdot \mathrm{poly})


I won’t state the standard definitions because those aren’t the point of discussion here unlike my understanding for the topic and that’s it for the first note. Do mail me for any suggestions as that would help me learn more about writing and expressing my thoughts!