This page is the module index for limits and approximation.
limits/approximation.py— 2-approximation vertex cover.
Focused lesson
Industry
A working engineer distinguishes a proven lower bound from an unresolved complexity assumption. General minimum vertex cover is NP-hard; no exact polynomial-time algorithm is known. For a simple approximation, repeatedly choose an uncovered edge and add its endpoints. The chosen edges are pairwise vertex-disjoint, giving a 2-approximation.