2
SIAM J. COMPUT. Vol. 11, No. 3, August 1982 1982 Society for Industrial and Applied Mathematics 0097-5397/82/1103-0014 $01.00/0 APPROXIMATION ALGORITHMS FOR THE SET COVERING AND VERTEX COVER PROBLEMS* DORIT S. HOCHBAUM] Abstract. We propose a heuristic that delivers in O(n 3) steps a solution for the set covering problem the value of which does not exceed the maximum number of sets covering an element times the optimal value. Key words, heuristics, complexity, set covering, vertex cover, linear programming, Russian method The set covering problem seeks a collection of sets that cover all elements of another given set at minimum cost. The problem is formulated as SC*= min c r.x subject to Ax >-e for x a 0-1 n-vector, e (1,..., 1) and A a 0-1 matrix each column of which is the incidence vector of one of the sets. This problem is NP-hard even when c e and each row of the matrix has only two ones (see Karp [5]). In this case the problem is known as the vertex cover problem. One heuristic with guaranteed worst case behavior for the set covering problem is the greedy. The heuristic solution value does not exceed Ya j-- 1/] times the optimum where d is the maximum column sum of A (Chv,’ital [1]). This bound is tight even for the vertex cover problem. Johnson [4] describes unweighted graphs of maximum vertex degree d in which the greedy vertex cover solution is exactly _-1 1/ times the optimum. The heuristic proposed yields a bound of 2 on the ratio between the heuristic solution and the optimal vertex cover solution. Let X(S) be the characteristic n-vector of a set S c {1, 2,..., n}. Let f be the maximum row sum of A, and fs the maximum row sum in the submatrix of A defined by the columns with subscripts in S. Denote b Aj the ]th row of the matrix. THZORZM. It takes a polynomial number of steps to find a cover the value of which is at most f times the optimum. Proof. Let x* be the optimal solution of the linear program min c T x subject to Ax >-e, x >=0. Let y* be the optimal dual solution, i.e., that solves the problem max e T y subject to y TA --< c, y => 0. It is easy to verify that for the set J, {/lY rAi ci} the vector x(J,) is a cover. Also, T T c "x(J,)=(y "A)" -<max (A. x(J,)). (yr. e) (c sc*. In order to obtain the set J, one needs to solve a linear program and that can be done in polynomial time. Q.E.D. The set J, is a cover but not necessarily a prime cover, that is, it may be possible to find a proper subset of we have as a corollary of the theorem that c r. x(S)-<fs. SC*. Such subset can be derived by applying a greedy procedure or any other procedure for eliminating redundant sets from * Received by the editors July 1, 1980, and in revised form September 21, 1981. This research was supported in part by the National Science Foundation under grant ECS-8204695. 5" School of Business Administration, University of California, Berkeley, California 94720. 555 Downloaded 10/28/12 to 138.87.11.21. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php

Hoch Baum 1982

Embed Size (px)

DESCRIPTION

paper

Citation preview

  • SIAM J. COMPUT.Vol. 11, No. 3, August 1982

    1982 Society for Industrial and Applied Mathematics0097-5397/82/1103-0014 $01.00/0

    APPROXIMATION ALGORITHMS FOR THE SET COVERING ANDVERTEX COVER PROBLEMS*

    DORIT S. HOCHBAUM]

    Abstract. We propose a heuristic that delivers in O(n 3) steps a solution for the set covering problemthe value of which does not exceed the maximum number of sets covering an element times the optimal value.

    Key words, heuristics, complexity, set covering, vertex cover, linear programming, Russian method

    The set covering problem seeks a collection of sets that cover all elements ofanother given set at minimum cost. The problem is formulated as SC*= min c r.xsubject to Ax >-e for x a 0-1 n-vector, e (1,..., 1) and A a 0-1 matrix each columnof which is the incidence vector of one of the sets. This problem is NP-hard evenwhen c e and each row of the matrix has only two ones (see Karp [5]). In this casethe problem is known as the vertex cover problem.

    One heuristic with guaranteed worst case behavior for the set covering problemis the greedy. The heuristic solution value does not exceed Yaj-- 1/] times the optimumwhere d is the maximum column sum of A (Chv,ital [1]). This bound is tight evenfor the vertex cover problem. Johnson [4] describes unweighted graphs of maximumvertex degree d in which the greedy vertex cover solution is exactly _-1 1/ timesthe optimum. The heuristic proposed yields a bound of 2 on the ratio between theheuristic solution and the optimal vertex cover solution.

    Let X(S) be the characteristic n-vector of a set S c {1, 2,..., n}. Let f be themaximum row sum of A, and fs the maximum row sum in the submatrix of A definedby the columns with subscripts in S. Denote b Aj the ]th row of the matrix.

    THZORZM. It takes a polynomial number of steps to find a cover the value of whichis at most f times the optimum.

    Proof. Let x* be the optimal solution of the linear program min c T x subject toAx >-e, x >=0. Let y* be the optimal dual solution, i.e., that solves the problemmax e

    T y subject to y TA --< c, y => 0. It is easy to verify that for the set J, {/lY rAi ci}the vector x(J,) is a cover. Also,

    T Tc "x(J,)=(y "A)"

    -

  • 556 DORIT S. HOCHBAUM

    One special case of a subset of Js that is a feasible cover is Jp {j[x > 0}. Itfollows from complementary slackness that Jp

    _

    Js. Jp is obviously a cover thoughnot necessarily a prime cover, so a further elimination of members of this set maystill be possible.

    Another special case is the set J {[x >_- 1 If}. Jr-

    J, and is a feasible cover. Theadvantage of this particular cover is that we do not need to evaluate the exact fractionalsolution x*. Instead, the only information necessary is whether xf [0, l/f) or x[1/f, 1]. Employing the Russian method as proposed by Padberg and Rao [7] requiresO(n 3. H) steps where H is a parameter used to determine the radius of the initialsphere and the perturbation vector 2-He to the right-hand side of the constraints.Hence the algorithm requires only O(n 3. max [2, log2 2f]) steps to derive the set Jr.Therefore, the LP-heuristic needs only O(n 3) steps to deliver a solution the value ofwhich is at most f times the optimum. This algorithm is comparable with efficientnetwork flow algorithms that deliver the fractional solution for the vertex coverproblem in dense graphs (Galils [3] algorithm for instance requires O(nS/3m 2/3) stepsfor graphs with n vertices and m edges). The above discussion leads to the followingcorollary of the theorem.

    COROLLARY. It takes O(n 3) steps to obtain a cover the value of which is at mostf times the set covering optimal solution value.

    For the case of the vertex cover problem the heuristic value does not exceedtwice the optimum. We now propose a heuristic that improves this bound for un-weighted graphs. The dual problem in this case is also known as the maximumcardinality matching problem when the condition "y a 0-1 vector" is added. Considerthe following procedure derived from the matching solution obtained by Edmondsalgorithm [2]" Select all vertices in each blossom, then select all T-labelled verticesand any 2k- 1 of the 2k out-of-tree vertices. Any subgraph spanned by an odd cycleof length can always be covered by any r-1 vertices or at least (r + 1)/2 vertices, andany blossom is constructed of pseudonodes spanned by odd cycles. The number ofvertices selected by the above procedure is at most (r 1)/[1/2(r + 1)] times the cardinalityof the optimal vertex cover, where r is the length of the longest odd cycle in thegraph. Since 2(r- 1)/(r + 1)= 2-[4/(r + 1)] we obtained a bound strictly less than 2.(Note that for graphs with no odd cycles, i.e. for bipartite graphs, this procedure isoptimal.)

    REFERENCES

    [1] V. CHVATAL, A greedy-heuristic for the set-covering problem, Math. Oper. Res., 4 (1979) pp. 233-235.[2] J. EDMONDS, Paths, trees and flowers, Canad. J. Math., 17 (1975), pp. 449-467.[3] Z. GALIL, A new algorithm ]or the maximalflow problem, Proc. 19th Annual Symposium on Foundations

    of Computer Science, 1978, pp. 231-248.[4] D. S. JOHNSON, Approximation algorithms ]or combinatorial problems, J. Comput. System Sci. 9 (1974),

    pp. 256-278.[5] R. KARP, Reducibility among combinatorial problems, Complexity of Computer Computations, R.

    E. Miller and J. W. Thatcher, eds. Plenum Press, New York, 1972, pp. 85-103.[6] G. L. NEMHAUSER AND L. E. TROTTER, Vertex packings: structural properties and algorithms,

    Mathematical Programming 8 (1975), pp. 232-248.[7] M. W. PADBERG AND M. R. RAO, The Russian method]or linear inequalities H: approximate arithmetic,

    W.P. # 202, New York University, Graduate School of Business Administration, New York, 1980.Dow

    nloa

    ded

    10/2

    8/12

    to 1

    38.8

    7.11

    .21.

    Red

    istrib

    utio

    n su

    bject

    to SIA

    M lic

    ense

    or co

    pyrig

    ht; se

    e http

    ://www

    .siam

    .org/j

    ourna

    ls/ojs

    a.php