4.6.29 · D5Theory of Computation
Question bank — Approximation algorithms — approximation ratio, examples
True or false — justify
A 2-approximation returns the optimal answer on half the inputs.
False — the "2" is a worst-case cost multiplier, not a probability; the algorithm is deterministic and may be within 2× on every input, often much closer.
For a minimization problem, a -approximation is better than a -approximation.
True — smaller means the returned cost is bound closer to , so the guarantee is tighter.
For a maximization problem, is a stronger guarantee than .
False — for maximization we want with , so closer to 1 is stronger; beats .
An approximation ratio means the algorithm solves the problem exactly.
True — combined with (min) forces on every input.
Every FPTAS is also a PTAS.
True — an FPTAS is poly in both and , which is a stronger requirement than poly in alone, so it satisfies the PTAS definition too; hence .
To prove a 2-approximation you must first compute and then compare.
False — you compare against a computable lower bound (matching size, MST cost); sits in the middle and is never computed.
The Vertex Cover 2-approximation could be improved to a -approximation just by picking one endpoint per matched edge instead of two.
False — picking only one endpoint of a matched edge can leave the other edges (touching the unpicked vertex) uncovered, so it need not produce a valid cover at all.
If but can be much smaller than , the ratio guarantee weakens.
False — a smaller only makes smaller, i.e. a tighter bound on ; the guarantee still holds since .
The double-tree TSP algorithm gives a 2-approximation on any weighted graph.
False — it needs the Triangle Inequality so that shortcutting cannot increase cost; on non-metric instances the guarantee collapses.
Some problems admit no constant-factor approximation unless P=NP.
True — e.g. general (non-metric) TSP and Max-Clique; this is shown via inapproximability results.
Spot the error
"Since the matching we found is maximal, for vertex cover."
Wrong — is a lower bound on , not equal to it; the cover uses vertices and can be anywhere between and .
"The MST is a lower bound because deleting an edge from the optimal TSP tour gives the MST."
Wrong — deleting an edge gives a spanning tree, whose cost is the minimum spanning tree; so , using MST as the cheapest tree.
"Christofides is a -approximation, so double-tree's factor of 2 is simply incorrect."
Wrong — 2 is a valid (just weaker) guarantee; is a tighter guarantee. A larger valid is not "incorrect," only less impressive.
In load balancing: "OPT because the average machine load equals OPT."
Wrong reasoning, right bound — OPT average because someone must carry at least the average; OPT could be strictly larger if one job is huge.
"For maximization I proved , so it's a -approximation."
Wrong direction — a max-guarantee bounds from below: you need . Bounding from above says nothing about how good it is.
"A greedy load balancer that puts each job on the least-loaded machine is optimal."
Wrong — it is only a 2-approximation; greedy can build an uneven schedule that a smarter reassignment would beat, so it is not exact.
Why questions
Why do we compare to a lower bound instead of directly to ?
Because computing is the NP-hard problem itself; a lower bound like or MST cost is poly-time computable, and the "LB-LADDER" lets stay unknown.
Why does shortcutting in Metric TSP never increase the tour cost?
Because the Triangle Inequality says a direct edge is no longer than the detour , so skipping an already-visited can only shorten (or tie) the walk.
Why is a valid lower bound in load balancing?
Because the single largest job must be placed somewhere, and that one machine alone already has load , so the makespan can't be smaller.
Why does the vertex-cover proof need the matched edges to be disjoint?
Because disjointness forces any cover to spend a distinct vertex on each matched edge, giving ; if edges shared vertices, one cover-vertex could handle several and the bound would fail.
Why is a constant-factor approximation considered weaker than a PTAS?
A constant factor (say 2) is fixed, whereas a PTAS lets you demand any accuracy ; the PTAS can get arbitrarily close to optimal, the constant-factor cannot.
Why do we add two lower bounds in the load-balancing proof?
Because we split the finishing load as ; the first piece is bounded by the average () and the second by the single-job max (), so their sum is .
Edge cases
What is the approximation ratio on a graph with no edges for the vertex-cover algorithm?
The matching is empty, ; the ratio is defined as (or trivially satisfied), since there are no edges to cover.
Metric TSP on a single city (or two cities) — does the 2-bound still hold?
Yes trivially: with one city the tour cost is ; with two cities the MST is the tour up to doubling, and every bound still holds degenerate-ly.
Load balancing with a single machine () — what is the makespan and the ratio?
All jobs pile onto the one machine, so ; the greedy is exact and the ratio is .
Load balancing where one job is larger than the sum of all others — is greedy still within 2×?
Yes — that giant job forces , and greedy places everything else around it; the makespan is at most as proven.
What happens to the double-tree bound if the graph is metric but has zero-length edges (coincident cities)?
Still fine — the triangle inequality holds with equality/zero terms, shortcutting cannot increase cost, and remains valid; ratios never require strictly positive weights.
A graph where the optimal vertex cover equals exactly — does the algorithm still return ?
Yes — the algorithm always returns vertices regardless; on such an instance it is a worst case, achieving the full ratio rather than beating it.
If the maximal matching is also a maximum matching, is the vertex-cover ratio better than 2?
Not necessarily — the ratio depends on versus , and even a maximum matching can force up to ; maximality is enough, maximum-ness gives no extra guarantee here.
Connections
- Hinglish version
- Vertex Cover · Maximum Matching · Minimum Spanning Tree · Triangle Inequality
- Greedy Algorithms · PTAS and FPTAS · Inapproximability / PCP theorem · NP-completeness