Part A: 3 masts, and greedy builds 4
Masts 2, 3 and 6 cover all ten villages, and no two masts do: only mast 4 covers 5 villages,
every other mast covers at most 4, and two masts would need 10 between them. Masts 2, 3 and 6 are
also the only three that work. Greedy starts with mast 4, the only mast
covering 5 villages. Mast 6 then adds 3 more (1, 7 and 10), and villages 2 and 4 need one mast
each: 4 masts. The first choice looked best and was a mistake. Mast 4's villages are each
covered by other masts that are needed anyway.
Part B: two rows and a staircase of columns
Put villages in two rows of . Two masts, one per row, cover everything.
Then add "column" masts with villages: column takes
villages from each row, and the columns tile both rows.
With that is 30 villages, rows of 15, and columns of 2, 4, 8 and 16. Greedy compares the
16-village column with the 15-village rows and takes the column. What is left is the same
picture with , so greedy takes every column: 4 masts against 2, with no ties at any
step. For the ratio is on 62 villages. In general greedy pays , about
, against 2. A county with these masts, in any order:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
1 16
2 3 17 18
4 5 6 7 19 20 21 22
8 9 10 11 12 13 14 15 23 24 25 26 27 28 29 30
Part C: greedy with dual fitting
Weighted greedy builds the mast with the least cost per newly covered village. When it
builds mast and covers new villages, charge each of them the price . The
prices add up to exactly what greedy pays.
Now take any mast and list its villages in the order greedy covered them. When the
-th from the end was covered, at least of 's villages were still uncovered, so
itself offered a price of at most , and greedy chose something at least as cheap. So
Dividing every price by therefore gives a feasible , and
This is dual fitting. is a feasible solution of the dual of the set-cover LP, and it is
built by shrinking the prices until they fit. See LP Duality.
Four near-misses fail the grader:
- The prices themselves as . On the two-rows test, the top row costs 1, but its villages
are charged
.
That is the part B instance, seen as prices.
- Most villages first, ignoring cost, builds the mast that costs a million because it covers
everything. Its prices then cannot fit under the cheap single-village masts.
- Dividing by instead of gives a feasible but weaker proof. With 62 villages in
masts of at most 32, , and the proof falls short.
- The cheapest mast first pays for many masts that cover little.
Going further
- Tight on both sides. The cheap-singles test is the weighted bad case: villages
with single-village masts costing , and one mast for
everything costing slightly more than 1. Greedy pays , about times the best.
Feige proved that cannot be beaten in polynomial time unless
; Dinur and Steurer later showed it is
NP-hard.
- Rounding the LP randomly, by building each mast with probability scaled from its LP
value over about rounds, reaches the same .
- When each village is in at most masts, a primal-dual method gives a factor of .
That is 2 for vertex cover.
References
- D. S. Johnson. Approximation algorithms for combinatorial problems. Journal of Computer and
System Sciences 9, 1974.
- V. Chvátal. A greedy heuristic for the set-covering problem. Mathematics of Operations
Research 4(3), 1979.
- U. Feige. A threshold of ln n for approximating set cover. Journal of the ACM 45(4), 1998.
- I. Dinur, D. Steurer. Analytical approach to parallel repetition. STOC, 2014.