The graph is the five-cycle. The maximal matching takes two edges, the cover takes their four endpoints, the optimum is three, and the realised ratio is 4/3 against a promise of 2. Everything about that sentence is measured except the promise.
The three claims, written out
on this graph cover 4, optimum 3 ratio 4/3
on every graph on 4 vertices 63 graphs, each solved exactly worst 2
on every graph, every size proved from the matching at most 2
The middle row is the one this library can rarely produce, and it is worth being clear about how strong it is. It is not a sample. Every non-empty graph on four vertices is examined — there are 2^6 - 1 = 63 of them, one per non-empty subset of the six possible edges — and each is solved exactly by enumerating subsets of its vertices. So it is a universal statement over a finite domain, and 49 of the 63 attain the worst ratio of 2.
It still is not the theorem. Five vertices gives 1023 graphs and the worst ratio is again 2; three vertices gives 7 and the answer is again 2. Three sizes, three exhaustive answers, all equal to the proved bound — and the bound holds for sizes no enumeration will ever reach, for a reason that has nothing to do with any of the three counts: the matched edges are disjoint, so any cover needs a vertex from each, and the algorithm takes exactly two per edge.
Definition · TightA bound is tight when some instance attains it, so the constant cannot be lowered without changing the algorithm. The sweep is how this page establishes tightness: it produces the attaining instances rather than asserting that they exist, and it reports both the first in edge order — a single edge — and the densest, which on four vertices has five edges.
Reporting both witnesses is not fussiness. A reader shown only the single edge concludes that the factor of 2 is an artefact of a degenerate case and that real graphs are fine. The five-edge witness on four vertices, and the seven-edge witness at five vertices, say otherwise: the worst case lives among dense graphs too.
What this course did with the numbers
Every page here has put a measured quantity beside a claim the measurement cannot establish, and said which is which. The reductions measured the map on solutions and proved the equivalence of answers. Branch and bound measured node counts and proved only that the bound cannot cut the optimum. The parameterised search measured nodes and printed 2^k · n beside 2^n as expressions. The four guarantees each measured a realised ratio and printed the promise beside it, and never a ratio without the optimum it was a ratio to.
- Prune an exact search. Built in “A Bound the Search Can See”: 14 nodes against 44, one answer, and a bound that is proved never to cut the optimum.
- Parameterise the exponential. Built in “Parameterising the Budget”: 9 nodes against a tree bound of 16, and 2^k · n against 2^n with both computed — one of the panel's instances has the first larger.
- Approximate with a guarantee. Built in “Twice a Matching” and “Charging Every Element”: a constant factor proved against a matching, and a harmonic factor proved by pricing every element.
- Approximate under a hypothesis. Built in “The Hypothesis Doing the Work”: within 2 when the triangle inequality holds, and a tour of 53 against an optimum of 4 when it does not.
- Buy accuracy by the epsilon. Built in “Accuracy by the Epsilon”: 238 cells against 3604, a promise of 193.5, a realised loss of nothing — and an instance where the scheme costs five times what it saves.
- Restrict to a tractable special case. Named in “Twice a Matching” for bipartite graphs, where König's theorem gives the exact cover in polynomial time, and in “Numbers as Gadgets” for subset sum with bounded values.
The path ends here, and the position is worth stating plainly. Data structures paid for the operations everything else spends; sorting made the analysis probabilistic; graphs supplied the algorithms that certify their own answers; greedy methods and dynamic programming are two answers to one question about optimal substructure; strings, geometry and randomisation applied all of it to one world each. This course needed every one of them — the probabilistic method, subset sum's table, König's theorem and both proof templates — because an approximation ratio is a stays-ahead argument against a lower bound, and a reduction is a construction you have to be able to build.
And the discipline that ran through all of it is the sentence in the footer of every page: a count is measured by running the algorithm on the input shown, and a count on one input is not a bound. This page adds the only refinement it ever needed. A count on every input of one size is not a bound either. It is a great deal better than one count, it is the strongest thing a computer can hand you, and it is still not a quantifier over all sizes. That last step is the one you take with a proof, and it is why every lab on this path has a theorem printed next to it.