Noname manuscript No. (will be inserted by the editor)

Distributed Algorithms for Covering, Packing and Maximum Weighted

Christos Koufogiannakis · Neal E. Young

Received: date / Accepted: date

Abstract This paper gives poly-logarithmic-round, dis- 1 Background and results tributed δ-approximation algorithms for covering prob- lems with submodular cost and monotone covering con- Many distributed systems are composed of components straints (Submodular-cost Covering). The approx- that can only communicate locally, yet need to achieve a imation ratio δ is the maximum number of variables in global (system-wide) goal involving many components. any constraint. Special cases include Covering Mixed The general possibilities and limitations of such sys- Integer Linear Programs (CMIP), and Weighted tems are widely studied [42,49,54,38,39,12]. It is of (with δ = 2). specific interest to see which fundamental combinato- Via duality, the paper also gives poly-logarithmic- rial optimization problems admit efficient distributed round, distributed δ-approximation algorithms for Frac- algorithms that achieve approximation guarantees that tional Packing linear programs (where δ is the max- are as good as those of the best centralized algorithms. imum number of constraints in which any variable oc- Research in this spirit includes works on Set Cover curs), and for Max Weighted c-Matching in hy- (Dominating Set) [26,40,41], capacitated domi- pergraphs (where δ is the maximum size of any of the nating set [37], Capacitated Vertex Cover [16, hyperedges; for graphs δ = 2). 17], and many other problems. This paper presents dis- The paper also gives parallel (RNC) 2-approximation tributed approximation algorithms for some fundamen- algorithms for CMIP with two variables per constraint tal covering and packing problems. and Weighted Vertex Cover. The algorithms use the standard synchronous com- The algorithms are randomized. All of the approx- munication model: in each round, nodes can exchange imation ratios exactly match those of comparable cen- a constant number of messages with neighbors and per- tralized algorithms.1 form local computation [54]. There is no restriction on message size or local computation. The algorithms are Keywords Approximation algorithms · Integer linear efficient — they finish in a number of rounds that is programming · Packing and covering · Vertex cover · poly-logarithmic in the network size [42]. Matching

C. Koufogiannakis 1.1 Covering Problems Department of Computer Science and Engineering University of California, Riverside Consider optimization problems of the following form: given a non-decreasing, continuous, and submodular2 N. E. Young cost function c : IRn → IR , and a set of constraints C Department of Computer Science and Engineering + + 3 University of California, Riverside where each constraint S ∈ C is closed upwards ,

1 n Preliminary versions appeared in [34,35]. Work by the find x ∈ IR+ minimizing c(x) s.t. (∀S ∈ C) x ∈ S. first author was partially supported by the Greek State Scholarship Foundation (IKY). Work by the second author 2 Formally, c(x) + c(y) ≥ c(x ∧ y) + c(x ∨ y) where ∧ and ∨ was partially supported by NSF awards CNS-0626912, CCF- are component-wise minimum and maximum, respectively. 0729071. 3 If x ∈ S and y ≥ x, then y ∈ S. 2 Christos Koufogiannakis, Neal E. Young

Submodular-cost Covering includes all problems vertex cover) can be computed in an expected O(log n) of this form [36]. The (approximation) parameter δ is rounds via the algorithm of Israeli and Itai [25]. the maximum number of elements of x on which any Maximal Matching is also in NC [9,47,30] and in constraint x ∈ S depends. RNC — parallel poly-log time with polynomially many n In the above formulation, x ranges over IR+, but, be- randomized processors [25] — hence so is 2-approximat- cause the constraints can be non-convex, one can handle ing Unweighted Vertex Cover. arbitrarily restricted variable domains by incorporating For Weighted Vertex Cover, previous to this them into the constraints [36]. For example, Weighted work, no efficient distributed 2-approximation algorithm P Vertex Cover is equivalent to minimize v cvxv sub- was known. Similarly, no parallel NC or RNC 2-ap- n ject to x ∈ IR+ and proximation algorithm was known. in 1994, Khuller, Vishkin and Young gave 2(1 + ε)-approximation algo- xu ≥ 1 or xw ≥ 1 (∀(u, w) ∈ E). rithms: a distributed algorithm taking O(log n log 1/ε) (Given any 2-approximate solution x to this formula- rounds and a parallel algorithm, in NC for any fixed tion — which allows x ∈ IR — rounding each x down u + u ε [31].4 Given integer vertex weights, their result gives to its floor gives a 2-approximate integer solution.) distributed 2-approximation in O(log n log nCˆ)) rounds, Submodular-cost Covering includes the follow- where Cˆ is the average vertex weight. The required ing problems as special cases: number of rounds is reduced to (expected) O(log nCˆ) CIP, covering integer programs with variable upper by Grandoni, K¨onemannand Panconesi [18,15]. m×n m n bounds: given A ∈ IR+ , w ∈ IR+ , u ∈ IR+, As noted in [38], neither of these algorithms is effi- n cient (taking a number of rounds that is polylogarith- minimize c · x subject to x ∈ ZZ+, Ax ≥ w, and x ≤ u. mic in the number of vertices). CMIP, covering mixed integer linear programs: CIP Kuhn, Moscibroda and Wattenhofer describe dis- with both integer and fractional variables. tributed approximation algorithms for fractional cov- Facility Location, Weighted Set Cover (that is, ering and packing linear programs [39]. They show an CIP with Aij ∈ {0, 1}, wi = 1), Weighted Ver- O(1)-approximation with high probability (w.h.p.) in tex Cover (that is, Weighted Set Cover with O(log m) rounds (m is the number of covering con- δ = 2), and probabilistic (two-stage stochastic) vari- straints). The approximation ratio is greater than 2 for ants of these problems. Fractional Weighted Vertex Cover. For (inte- In the centralized (non-distributed) setting there are ger) Weighted Vertex Cover and Weighted Set two well-studied classes of polynomial-time approxima- Cover (where each Aij ∈ {0, 1}) combining their al- tion algorithms for covering problems: gorithms with randomized rounding gives O(log ∆)-ap- proximate integer solutions in O(log n) rounds, where (i) O(log ∆)-approximation algorithms where ∆ is the ∆ is the maximum number of constraints in which any maximum number of constraints in which any vari- variable occurs. able occurs (e.g. [27,46,10,56,57,32]), and Distributed lower bounds. The best lower bounds (ii) O(δ)-approximation algorithms where δ is the max- known for Weighted Vertex Cover are by Kuhn, imum number of variables in any constraint (e.g. [4, Moscibroda and Wattenhofer: to achieve even a poly- 22,21,5,19,7,8,55,2,36]), including most famously logarithmic approximation ratio requires in the worst 2-approximation algorithms for Weighted Ver- case Ω(plog n/ log log n) rounds. In graphs of constant tex Cover. degree ∆, Ω(log ∆/ log log ∆) rounds are required [38]. The algorithms here match those in class (ii). New results for covering problems. This paper Related work. For Unweighted Vertex Cover, gives the following results for covering problems. it is well known that a 2-approximate solution can be – Section 2 describes the first efficient distributed 2- found by computing any maximal matching, then tak- approximation algorithm for Weighted Vertex ing the cover to contain the endpoints of the edges in the Cover. The algorithm runs in O(log n) rounds in matching. A maximal matching (and hence a 2-approx- expectation and with high probability. imate vertex cover) can be computed deterministically in O(log4 n) rounds using the algorithm of Ha´n´ckowiak, – Section 3, generalizing the above result, describes Karonski and Panconesi [20] or in O(∆+log∗ n) rounds the first efficient distributed 2-approximation algo- using the algorithm of Panconesi and Rizzi [51], where 4 Their result extends to δ(1 + ε)-approximating Weighted ∆ is the maximum vertex degree. Or, using randomiza- Set Cover: a distributed algorithm taking O(δ log n log 1/ε) tion, a maximal matching (and hence a 2-approximate rounds, and a parallel algorithm (in NC for fixed ε and δ). Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 3

problem approx. ratio # rounds where when 2 O(log n) (random) [25] 1986 Unweighted Vertex Cover 2 O(log4 n) [20] 2001 2 + ε O(log ε−1 log n) [31] 1994 Weighted Vertex Cover 2 O(log n log nCˆ) [31] 1994 2 O(log nCˆ) (random) [18,15] 2005 2 O(log n) (random) here Weighted Set Cover O(log ∆) O(log m) (random) [39] 2006 δ O(log m) (random) here CMIP (with δ = 2) 2 O(log m) (random) here CMIP δ O(log2 m) (random) here Table 1 Comparison of distributed algorithms for covering problems. δ is the maximum number of variables in any constraint. ∆ is the maximum number of constraints in which any variable occurs.

rithm for CMIP (covering mixed integer linear pro- of generality each vertex capacity cj is also an integer.) grams with variable upper bounds) restricted to in- An instance is defined by a given H(V,E) |V | stances where each constraint has at most two vari- and cost vector c ∈ ZZ+ ; a solution is given by a vector ables (δ = 2). The algorithm runs in O(log m) rounds |E| P y ∈ ZZ+ maximizing e∈E weye and meeting all the in expectation and with high probability, where m P vertex capacity constraints e∈E(u) ye ≤ cu (∀u ∈ V ), is the number of constraints. where E(u) is the set of edges incident to vertex u. For – Section 4 gives the first efficient distributed δ-ap- this problem, n = |V |, m = |E| and δ is the maximum proximation algorithm for Submodular-Cost Cov- (hyper)edge degree (for graphs δ = 2). ering (generalizing both problems above). The al- Max Weighted c-Matching is a cornerstone op- gorithm runs in O(log2 m) rounds in expectation timization problem in and Computer Sci- and with high probability, where m is the number ence. As a special case it includes the ordinary Max of constraints. Weighted Matching problem (MWM) (where cu = 1 for all u ∈ V ). Restricted to graphs, the problem Previously, even for the simple special case of 2-ap- belongs to the “well-solved class of integer linear pro- proximating Weighted Vertex Cover, no efficient grams” in the sense that it can be solved optimally in distributed δ-approximation algorithm was known. polynomial time in the centralized setting [13,14,48]; Each of the algorithms presented here is a distributed moreover the obvious greedy algorithm (repeatedly se- implementation of a (centralized) δ-approximation al- lect the heaviest edge that not conflicting with already gorithm for Submodular-cost Covering by Koufo- selected edges) gives a 2-approximation5 in nearly lin- giannakis and Young [36]. Each section describes how ear time. For the problem is NP-hard — it that centralized algorithm specializes for the problem generalizes set packing, one of Karp’s 21 NP-complete in question, then describes an efficient distributed im- problems [28]. plementation. Related work for distributed MWM and Frac- tional Packing. Several previous works consider dis- 1.2 Fractional Packing, Maximum Weighted Matching tributed Max Weighted Matching in graphs. Ue- hara and Chen present an O(∆)-approximation algo- Fractional Packing is the following problem: given rithm running in a constant number of rounds [58], matrix A ∈ IRn×m and vectors w ∈ IRm and c ∈ IRn, + + + where ∆ is the maximum vertex degree. Wattenhofer m and Wattenhofer improve this result, giving a random- maximize w · y subject to y ∈ IR+ and Ay ≤ c. ized 5-approximation algorithm taking O(log2 n) rounds This is the linear-program dual of Fractional Cov- [59]. Hoepman gives a deterministic 2-approximation ering problem minimize c·x s.t. x ∈ IRn and AT x ≥ w. + algorithm taking O(m) rounds [23]. Lotker, Patt-Shamir For packing, δ is the maximum number of pack- and Ros´engive a randomized (4 + ε)-approximation ing constraints in which any variable appears, that is, algorithm running in O(ε−1 log ε−1 log n) rounds [45]. max |{i : A 6= 0}|. In the centralized setting, Frac- j ij Lotker, Patt-Shamir and Pettie improve this result to tional Packing can be solved optimally in polyno- a randomized (2 + ε)-approximation algorithm taking mial time using linear programming. Alternatively, one O(log ε−1 log n) rounds [44]. Their algorithm uses as a can use a faster approximation algorithm (e.g., [33]). black box any distributed constant-factor approxima- Max Weighted c-Matching on a graph (or hy- pergraph) is the variant where each Aij ∈ {0, 1} and 5 Since it is a maximization problem it is also referred to the solution y must take integer values. (Without loss as a 1/2-approximation. 4 Christos Koufogiannakis, Neal E. Young

problem approx. ratio # rounds where when O(∆) O(1) [58] 2000 5 O(log2 n) (random) [59] 2004 O(1)(> 2) O(log n) (random) [39,40] 2006 4 + ε O(ε−1 log ε−1 log n) (random) [45] 2007 2 + ε O(log ε−1 log n) (random) [44] 2008 Max Weighted Matching in graphs 1 + ε O(ε−4 log2 n) (random) [44] 2008 1 + ε O(ε−2 + ε−1 log(ε−1n) log n) (random) [50] 2008 2 O(log2 n) (random) [44,50] (ε = 1) 2008 −1 4 6 + ε O(ε log n log(Cmax/Cmin)) [53] 2010 2 O(log n) (random) here 6 + ε O(ε−3 log3 n log2(C /C )) (random) [53] 2010 Max Weighted c-Matching in graphs max min 2 O(log n) (random) here O(δ) > δ O(log m) (random) [39,40] 2006 Max Weighted c-Matching in hypergraphs δ O(log2 m) (random) here O(1)(> 2) O(log m) (random) [39] 2006 Fractional Packing (δ = 2) 2 O(log m) (random) here O(1) > 12 O(log m) (random) [39] 2006 Fractional Packing (general δ) δ O(log2 m) (random) here Table 2 Comparison of distributed algorithms for Max Weighted Matching and Fractional Packing. p tion algorithm for MWM that takes O(log n) rounds Maximum Matching takes at least Ω( log n/ log log n) (e.g., [45]). Moreover, they mention (without details) rounds. At least Ω(log ∆/ log log ∆) rounds are required that there is a distributed (1 + ε)-approximation algo- in graphs of constant degree ∆ [39]. rithm taking O(ε−4 log2 n) rounds, based on the parallel Other related work. For Unweighted Maximum algorithm by Hougardy and Vinkemeier [24]. Nieberg Matching in graphs, Israeli and Itai give a random- gives a (1 + ε)-approximation algorithm that runs in ized distributed 2-approximation algorithm running in O(ε−2 +ε−1 log(ε−1n) log n) rounds [50]. The latter two O(log n) rounds [25]. Lotker, Patt-Shamir and Pettie results give randomized 2-approximation algorithms for improve this result giving a randomized (1+ε)-approx- in O(log2 n) rounds. Max Weighted Matching imation algorithm taking O(ε−3 log n) rounds [44]. Czy- Independently of this work, Panconesi and Sozio [53] grinow, Ha´n´ckowiak, and Szyma´nska show a determin- give a randomized distributed (6 + ε)-approximation istic 3/2-approximation algorithm that takes O(log4 n) algorithm for Max Weighted c-Matching in graphs, 3 rounds [11]. A (1+ε)-approximation for Max Weighted log n 2 Cmax requiring O( 3 log ) rounds, provided all edges ε Cmin Matching in graphs is in NC [24]. weights lie in [Cmin,Cmax]. They also give a similar (but deterministic) result for Max Weighted Matching. New results for Fractional Packing and MWM. Kuhn, Moscibroda and Wattenhofer show efficient This work presents efficient distributed δ-approxima- distributed approximation algorithms for Fractional tion algorithms for Fractional Packing and Max Packing [39]. They first give a deterministic (1+ε)-ap- Weighted c-Matching. The algorithms are primal- proximation algorithm for Fractional Packing with dual extensions of the δ-approximation algorithms for logarithmic message size, but the number of rounds de- covering. . pends on the input coefficients. For unbounded message – Section 6 describes a distributed 2-approximation size they give an algorithm for Fractional Pack- algorithm for Fractional Packing where each ing that finds a constant-factor approximation ratio variable appears in at most two constraints (δ = 2), (w.h.p.) in O(log m) rounds. If an integer solution is de- running in O(log m) rounds in expectation and with sired, then distributed randomized rounding ([40]) can high probability. Here m is the number of pack- be used. This gives an O(δ)-approximation for Max ing variables. This improves the approximation ratio Weighted c-Matching on (hyper)graphs (w.h.p.) in over the previously best known algorithm [39]. O(log m) rounds, where δ is the maximum hyperedge – Section 7 describes a distributed δ-approximation degree (for graphs δ = 2). (The hidden constant factor algorithm for where each in the big-O notation of the approximation ratio can be Fractional Packing variable appears in at most δ constraints, running relative large compared to a small δ, say δ = 2.) in O(log2 m) rounds in expectation and with high Distributed lower bounds. The best lower bounds probability, where m is the number of variables. known for distributed packing and matching are given For small δ, this improves over the best previously by Kuhn, Moscibroda and Wattenhofer: to achieve even known constant factor approximation [39], but the a poly-logarithmic approximation ratio for Fractional number of rounds is bigger by a logarithmic-factor. Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 5

– Section 6 gives a distributed 2-approximation algo- Each root w then flips a coin. If heads comes up rithm for Max Weighted c-Matching in graphs, (with probability 1/2), w calls heads(w), which does running in O(log n) rounds in expectation and with Step(x, (v, w)) for its edges (v, w) in any order, un- high probability. Max Weighted c-Matching gen- til w enters the cover or all of w’s star edges have steps eralizes the well studied Max Weighted Match- done. Or, if tails comes up, w calls tails(w), which sim- ing problem. For 2-approximation, this algorithm is ulates heads(w), without actually doing any steps, to faster by at least a logarithmic factor than any pre- determine the last edge (v, w) that heads(w) would do vious algorithm. Specifically, in O(log n) rounds, the a step for, and performs step Step(x, (v, w)) for just that algorithm gives the best known approximation ra- edge. For details see Alg. 1. tio. The best previously known algorithms compute −4 2 a (1+ε)-approximation in O(ε log n) rounds [44] Theorem 1 For 2-approximating Weighted Vertex −2 −1 −1 or in O(ε + ε log(ε n) log n) rounds [50]. For Cover: a 2-approximation each of these algorithms needs (a) There is a distributed algorithm running in O(log n) O(log2 n) rounds. rounds in expectation and with high probability. – Section 7 also gives a distributed δ-approximation (b) There is a parallel algorithm in “Las Vegas” RNC. algorithm for Max Weighted c-Matching in hy- pergraphs with maximum hyperedge degree δ, run- Proof (a) The proof starts by showing that, in each 2 ning in O(log m) rounds in expectation and with round of Alg. 1, at least a constant fraction (1/224) of high probability, where m is the number of hyper- the not-yet-covered edges are covered in expectation. edges. This result improves over the best previously Any not-yet-covered edge (v, w) is active for the known O(δ)-approximation ratio by [39], but it is round with probability at least 1/4, because Step(x, (v, w)) slower by a logarithmic factor. would bring at least one of v or w into the cover, and with probability 1/4 that node is a leaf and the other is a root. Thus, by a lower-tail bound, with constant prob- 2 Weighted Vertex Cover ability (1/7) at least a constant fraction (one eighth) of the remaining edges are active.7 Assume at least an 2.1 Sequential Implementation eighth of the remaining edges are active. Next, condi- First, consider the following sequential 2-approximation tion on all the choices of leaves and roots (assume these are fixed). algorithm for Weighted Vertex Cover.6 The algorithm starts with x = 0. To cover edge It is enough to show that, for an arbitrary leaf v, in (v, w), it calls Step(x, (v, w)), which raises x and x expectation at least a quarter of v’s active edges will be v w 8 at rates inversely proportional to their respective costs, covered. To do so, condition on the star edges chosen by the other leaves. (Now the only random choices not until xv or xw reaches 1 (increase xv by β/cv and xw by conditioned on are v’s star-edge choice and the coin flips β/cw, where β = min{(1 − xv)cv, (1 − xw)cw}). When of the roots.) a variable xv reaches 1, v is added to the cover. The algorithm does Step(x, e) for not-yet-covered edges e, At least one of the following two cases must hold. until all edges are covered. Case 1: At least half of v’s active edges (v, w) have the following property: if v were to choose (v, w) as its star edge, and w were to do heads(w), then heads(w) would 2.2 Distributed and Parallel Implementations not perform Step(x, (v, w)). That is, w would enter the cover before heads(w) would consider (v, w) (in Fig. 1, In each round, the distributed algorithm simultaneously see the cost-10 node). performs Step(x, e) on a large subset of the not-yet- For such an edge (v, w), on consideration, heads(w) covered edges, as follows. Each vertex randomly chooses will bring w into the cover whether or not v chooses to be a leaf or a root. A not-yet-satisfied edge (v, w) is 7 called active if v is a leaf, w is a root, and, if Step(x, (v, w)) In expectation, at most 3/4 of the edges are inactive. By Markov’s inequality, the probability that more than 7/8 of were to be performed, v would enter the cover. Each leaf the edges are inactive is at most (3/4)/(7/8) = 6/7. Thus, v chooses a random active edge (v, w). The edges cho- with probability at least 1/7, at least 1/8 of the edges are sen by the leaves are called star edges; they form stars active. 8 with roots at their centers. If so, then by linearity of expectation (summing over the leaves), at least 1/4 of all active edges will be covered. Since a 6 For Weighted Vertex Cover, this sequential algorithm 1/8 of the remaining edges are active (with probability 1/7), by Koufogiannakis and Young [36] is equivalent to the classic this implies that at least a 1/7 ∗ 8 ∗ 4 = 1/224 fraction of the 2-approximation algorithm by Bar-Yehuda et al. [4]. remaining edges are covered in expectation. 6 Christos Koufogiannakis, Neal E. Young

Distributed 2-approximation algorithm for Weighted Vertex Cover (G = (V,E), c : V → IR+) Alg. 1 1. At each node v: initialize xv ← 0. 2. Until all vertices are finished, perform rounds as follows: 3. At each node v: if all of v’s edges are covered, finish; else, choose to be a leaf or root, each with probability 1/2. 4. At each leaf node v: Label each not-yet covered edge (v, w) active if w is a root and Step(x, (v, w)) (with the current x) would add v to the cover. Choose, among these active edges, a random star edge (v, w). 5. At each root node w, flip a coin, then run the corresponding subroutine below: heads(w): For each star edge (v, w) (in some fixed order) do: if w is not yet in the cover, then do Step(x, (v, w)). tails(w): Do Step(x, (v, w)) just for the last edge for which heads(w) would do Step(x, (v, w)).

Step(x, (v, w)):  6. Let scalar β ← min (1 − xv)cv, (1 − xw)cw . ... just enough to ensure v or w is added to the cover below 7. Set xv ← xv + β/cv. If xv = 1, add v to the cover, covering all of v’s edges. 8. Set xw ← xw + β/cw. If xw = 1, add w to the cover, covering all of w’s edges.

4 Thus, if v chooses such an edge, v enters the cover with 8 4 at least probability 1/2. 2 1 10 1 4 In the case under consideration, v has probability at least 1/2 of choosing such an edge. Thus, with prob- 50% 6 0% ability at least 1/4, v will enter the cover and all of v’s 100 9 100% 50% edges will be deleted. Thus, in this case also, a quar- 1 4 6 5 ter of v’s edges are covered in expectation during the round. Fig. 1 Analysis of Alg. 1. Each node is labeled with its cost. Roots are circles; leaves are squares; star edges from leaves Thus, in each round, in expectation at least 1/224 other than v (the cost-5 leaf) are determined as shown. Each of the remaining edges are covered. By standard argu- edge (v, w) is labeled with the chance that v would enter the ments, this implies that the expected number of rounds cover if v were to choose (v, w) for its star edge (assuming is at most about 224 ln(n2) = 448 ln n, and that the each xw = xv = 0 and each root w considers its star edges 9 counter-clockwise). number of rounds is O(log n) with high probability. This completes the proof of Thm. 1, Part (a). (v, w) for its star edge. So, edge (v, w) will be covered in this round, regardless of v’s choice of star edge, as Next is the proof of Part (b). To obtain the parallel long as w does heads(w). Since w does heads(w) with algorithm, implement heads(w) as follows. For w’s kth probability 1/2, edge (v, w) will be covered with prob- star edge ek, let βk be the β that Step(x, ek) would use ability 1/2. if given x at the start of the round. If heads(w) eventu- Since this is true for at least half of v’s active edges, ally does Step(x, ek) for edge ek, the step will increase in expectation, at least a quarter of v’s active edges will xw by βk/cw, unless ek is the last edge heads(w) does be covered during the round. a step for. Thus, the edges for which heads(w) will do Pk−1 Step(x, ek) are those for which xw + j=1 βj/cw < 1. Case 2: At least half of v’s active edges (v, w) have the These steps can be identified by a prefix-sum com- following property: if v were to choose (v, w) as its star putation, then all but the last can be done in paral- edge, and w were to do heads(w), then heads(w) would lel. This gives an NC implementation of heads(w). The perform Step(x, (v, w)). RNC algorithm simulates the distributed algorithm for For such an edge (v, w), heads(w) would bring v into O(log n) rounds; if the simulated algorithm halts, the the cover as long as Step(x, (v, w)) would not be the last RNC algorithm returns x, and otherwise it returns “fail”. step performed by heads(w) (in Fig. 1, the cost-8 and This completes the proof of Thm. 1. ut cost-100 nodes). Or, if Step(x, (v, w)) would be the last step performed by heads(w), then tails(w) would do only 9 Step(x, (v, w)), which would bring v into the cover (by For the high-probability bound, see e.g. [29, Thm. 1.1] (the example following that theorem). Alternatively, note the assumption that, at the start of the round (v, w) that, in each round, by a lower-tail bound, with some constant is active so that Step(x, (v, w)) would bring v into the probability at least some constant fraction of the remaining cover) (in Fig. 1, the cost-9 node). Thus, for such an edges are covered. Say that a round is good if this happens. edge (v, w), one of heads(w) or tails(w) would bring v By Azuma’s inequality, with high probability, for some suit- ably large constants a < b, at least a log m of the first b log m into the cover. Recall that w has probability 1/2 of rounds are good, in which case all edges are covered in b log m doing heads(w) and probability 1/2 of doing tails(w). rounds. Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 7

3 Mixed Integer Programs with Two Variables Define the potential Φ(x, Si) of constraint Si to be per Constraint the number of these relaxed constraints not satisfied by the current x. Compute stepsize(x, Si) as the mini- This section generalizes the results of Section 2 to CMIP2 mum cost to increase just one variable enough to reduce (CMIP with at most two non-zero coefficients Aij in Φ(x, Si). each constraint). Observation 3 With this stepsize(), Step(x, Si) is done δ at most 4 times before constraint Si is satisfied. 3.1 Sequential Implementation for CMIP (any δ) (More efficient stepsize functions are described in [36].) This step size satisfies the necessary condition for First, consider the following sequential δ-approxima- the algorithm to produce a δ-approximate solution: tion algorithm for CMIP [36]. Model the CMIP con- straints (including the upper bounds and integrality Lemma 1 stepsize(x, Si) ≤ distancec(x, Si) constraints) by allowing each xj to range freely in IR+ 0 Proof Consider a particular relaxed constraint Si ob- but replacing each constraint Aix ≥ b by the following tained by relaxing the upper-bound constraints for all equivalent constraint Si: xj with xj < uj and enforcing only a minimal subset X X J of the floor constraints (while keeping the constraint Aijbmin(xj, uj)c + Aij min(xj, uj) ≥ bi unsatisfied). This gives S0, which is of the form j∈I j∈I i X X X where set I contains the indexes of the integer variables. Aijbxjc + Aijxj ≥ bi − uj The algorithm starts with x = 0, then repeatedly j∈J j∈J 0 j∈J 00 does Step(x, S), defined below, for any unsatisfied con- for some J, J 0, and J 00. straint S: What is the cheapest way to increase x to satisfy 0 subroutine Step(x, S): Si? Increasing any one term bxjc for j ∈ J is enough to 0 1. Let β ← stepsize(x, S). satisfy Si (increasing the left-hand side by Aij, which 2. For each j with Aij > 0, increase xj by β/cj. by the minimality of J must be enough to satisfy the constraint). Here stepsize(x, S) (to be defined shortly) can be smaller Or, if no such term increases, then P A x must than the β in Alg. 1. (Each step might not satisfy its j∈J 0 ij j be increased by enough so that increase alone is enough constraint.) to satisfy the constraint. The cheapest way to do that is After satisfying all constraints, the algorithm rounds to increase just one variable (x for j ∈ J 0 maximizing each x down to bmin(x , u )c and returns the rounded j j j j A /c ). x. For this to produce a δ-approximate solution, it suf- ij j In sum, for this S0, distance(x, S0) is the minimum fices for stepsize(x, S) to return a lower bound on the i i cost to increase just one variable so as to satisfy S0. minimum cost of augmenting x to satisfy S, that is, on i Thus, by its definition, stepsize(x, S ) ≤ distance(x, S0). distance (x, S) = min{c(ˆx) − c(x)|xˆ ∈ S, xˆ ≥ x}: i i c It follows that 0 Observation 2 ([36]) If stepsize(x, S) ≤ distancec(x, S) stepsize(x, Si) ≤ distance(x, Si) ≤ distance(x, Si). in each step, and the algorithm above terminates, then ut it returns a δ-approximate solution. Example. Minimize x1 +x2 subject to 0.5x1 +3x2 ≥ 5, ∗ Proof (sketch) Let x be any optimal solution. A step x2 ≤ 1, and x1, x2 ∈ ZZ+. Each variable has cost 1, so increases the cost c·x by δβ, but decreases the potential each step will increase each variable equally. There are P ∗ v∈V cv max(0, xv − xv) by at least β. Details in [36]. eight relaxed constraints: ut 0.5x1 + 3x2 ≥ 5 (1) Compute stepsize(x, S ) as follows. Consider the re- i 0.5x1 + 3bx2c ≥ 5 (2) laxations of S that can be obtained from S by re- i i 0.5x + 3 min{x , 1} ≥ 5 (3) laxing any subset of the integrality constraints or vari- 1 2 0.5x + 3bmin{x , 1}c ≥ 5 (4) able upper bounds. (That is, replace bmin(xj, uj)c by 1 2 min(xj, uj) for any subset of the j’s in I, and then re- 0.5bx1c + 3x2 ≥ 5 (5) place min(x , u ) by x for any subset of the j’s.) Since j j j 0.5bx1c + 3bx2c ≥ 5 (6) there are at most δ variables per constraint and each 0.5bx c + min{x , 1} ≥ 5 (7) can be relaxed (or not) in 4 ways, there are at most 4δ 1 2 such relaxed constraints. 0.5bx1c + 3bmin{x2, 1}c ≥ 5 (8) 8 Christos Koufogiannakis, Neal E. Young

At the beginning, x1 = x2 = 0. No relaxed constraint doing a single step for a random such constraint will is satisfied, so Φ(x, S) = 8. Then stepsize(x, S) = 5/3 hit in expectation at least half of them (those with 0 (Constraint (1) or (5) would be satisfied by raising x2 stepsize(x, S ) ≤ stepsize(x, S)). by 5/3). The first step raises x1 and x2 to 5/3, reducing In each round of the algorithm, each node randomly Φ(x, S) to 6. chooses to be a leaf or a root. Each (two-variable) con- For the second step, stepsize(x, S) = 1/3 (Constraint straint is active if one of its variables xv is a leaf and (2) or (6) would be satisfied by raising x by 1/3). The 2 the other, say xw, is a root, and the leaf xv can hit step raises both variables by 1/3 to 2, lowering Φ(x, S) the constraint at the start of the round. (Each unmet to 4. constraint is active with probability at least 1/4.) Each For the third step, stepsize(x, S) = 2, (Constraint leaf v chooses one of its active constraints at random to (3), (4), (7), or (8) would be satisfied by raising x1 by be a star constraint. Then each root w does (randomly) 2). The step raises both variables by 2, to 4, decreasing either heads(w) or tails(w), where heads(w) does steps Φ(x, S) to 0. for the star constraints rooted at w in a particular or- All constraints are now satisfied, and the algorithm der; and tails(w) does just one step for the last star returns x1 = bx1c = 4 and x2 = bmin{x2, 1}c = 1. constraint that heads(w) would have done a step for (called w’s “runt”). As heads(w) does steps for the star constraints rooted 3.2 Distributed and Parallel Implementations for δ = 2 at w, xw increases. As xw increases, the status of a star constraint S rooted at w can change: it can be hit by This section describes a distributed implementation of the increase in xw or it can cease to be hittable by x (and instead become hittable by x ). For each con- the above sequential algorithm for CMIP2 — the spe- v w cial case of CMIP with δ = 2. The algorithm (Alg. 2) straint S, define threshold tS to be the minimum value generalizes Alg. 1. of xw at which S’s would have such a status change. We assume the network in which the distributed Then heads(w) does steps in order of decreasing tS un- computation takes place has a node v for every vari- til it reaches a constraint S with xw ≥ tS. At that point, each of w’s not-yet-hit star constraints S has t ≤ x , able xv, with an edge (v, w) for each constraint S that S w and can still be hit by x . (As x increases, once S depends on variables xv and xw. (The computation can w w easily be simulated on, say, a network with vertices for changes status, S will be hittable by xw at least until S constraints and edges for variables, or a bipartite net- is hit.) Then heads(w) does Step(x, Sr) for the “runt” work with vertices for constraints and variables.) constraint Sr — the one, among w’s not-yet-hit star In Alg. 1, a constant fraction of the edges are likely constraints, maximizing stepsize(x, Sr). This step hits to be covered each round because a step done for one all of w’s not-yet-hit star constraints. See Alg. 2 for edge can cover not just that edge, but many others details. also. The approach here is similar. Recall the defini- Theorem 4 For 2-approximating covering mixed in- tion of Φ(x, S) in the definition of stepsize(). The goal teger linear programs with at most two variables is that the total potential of all constraints, Φ(x) = P per constraint (CMIP2): S Φ(x, S), should decrease by a constant fraction in each round. (a) there is a distributed algorithm running in O(log |C|) rounds in expectation and with high probability, where Definition 1 Say that a constraint S is hit during the |C| is the number of constraints. round when its potential Φ(x, S) decreases as the result (b) there is a parallel algorithm in “Las Vegas” RNC. of some step. By the definition of stepsize(), for any x and any The next lemma is useful in the proof of the theorem constraint S there is at least one variable xv such that to follow. raising just xv to xv +stepsize(x, S)/cv would be enough Lemma 2 The total potential P Φ(x, S ) decreases to hit S. Say such a variable xv can hit S (given the Si i current x). by a constant factor in expectation with each round. The goal is that a constant fraction of the unmet con- Proof Any unmet constraint is active with probability straints should be hit in each round. at least 1/4, so with constant probability the poten- Note that the definition implies, for example, that, tial of the active edges is a constant fraction of the among constraints that can be hit by a given variable total potential. Assume this happens. Consider an ar- xv, doing a single step for the constraint S maximiz- bitrary leaf v. It is enough to show that in expectation a ing stepsize(x, S) will hit all such constraints. Likewise, constant fraction of v’s active constraints are hit (have Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 9

Distributed 2-approximation algorithm for CMIP2 (c, A, b, u, I) Alg. 2 1. At each node v ∈ V : initialize xv ← 0; if there are unmet constraints S that depend only on xv, do Step(x, S) for the one maximizing stepsize(x, S). 2. Until all vertices are finished, perform rounds as follows: 3. At each node v: if v’s constraints are all met, finish (round xv down to min(xv, uv), or bmin(xv, uv)c if v ∈ I); otherwise, choose to be a leaf or a root, each with probability 1/2.

4. Each leaf v does: for each unmet constraint S that can be hit by xv (Defn. 1), label S active if S’s other variable is xw for a root w; choose, among these active constraints, a random one to be xv’s star constraint (rooted at w). 5. Each root w does either heads(w) or tails(w) below, each with probability 1/2.

heads(w): 6. For each star constraint S rooted at w, let tS be the minimum threshold such that increasing xw to tS would either hit S (i.e., decrease Φ(x, S)) or make it so S’s leaf variable xv could no longer hit S (and xw could). If there is no such value, then take tS = ∞. 7. For each star constraint S rooted at w, in order of decreasing tS , do the following: If xw < tS then do Step(x, S) (hitting S); otherwise, stop the loop and do the following: Among the star constraints rooted at w that have not yet been hit this round, let Sr (the “runt”) be one maximizing stepsize(x, Sr). Do Step(x, Sr) (hitting Sr and all not-yet-hit star constraints rooted at w). tails(w): 8. Determine which constraint Sr would be the runt in heads(w). Do Step(x, Sr). their potentials decrease) during the round. To do so, Case 2. A constant fraction of v’s active constraints S condition on any set of choices of star constraints by have the following property: if v were to choose S as its the other leaves, so the only random choices left to be star constraint, and the root w of S were to do heads(w), made are v’s star-constraint choice and the coin flips then heads(w) would do Step(x, S) when xw < tS (S of the roots. Then (at least) one of the following three would not be the runt). cases must hold: Let H denote the set of such constraints. For S ∈ H let h(S) be the value to which heads(w) (where w is the Case 1. A constant fraction of v’s active constraints root of S) would increase x . Whether or not v chooses S have the following property: if v were to choose S v S as its star constraint, if x increases to h(S) in the as its star constraint, and the root w of S were to do v round and w does heads(w), then S will be hit. heads(w), then heads(w) would not do Step(x, S). 0 Although heads(w) would not do Step(x, S) for such Let S and S be any two constraints in H where 0 0 an S, it nonetheless would hit S: just before heads(w) h(S) ≥ h(S ). Let w and w , respectively, be the root vertices of S and S0. (Note that w = w0 is possible.) If does Step(x, Sr), then xw ≥ tS, so either S has already v chooses S0 as its star constraint and w and w0 both been hit (by the increases in xw) or will be hit by Step(x, S ) (because x can hit S and, by the choice do heads(), then S will be hit (because xv increases to r w 0 at least h(S ) ≥ h(S) and heads(w) still increases xw at of Sr, Step(x, Sr) increases xw by stepsize(x, Sr)/cw ≥ least to the value it would have had just before heads(w) stepsize(x, S)/cw). would have done Step(x, S), if v had chosen S as its star On consideration, for a constraint S with the as- constraint). sumed property, the steps done by heads(w) will be the same even if v chooses some constraint S0 with a root Since (in the case under consideration) a constant other than w as its star constraint. (Or, if v chooses fraction of v’s active constraints are in H, with constant 0 a constraint S0 6= S that shares root w with S, the probability v chooses some constraint S ∈ H as its star 0 0 0 steps done by heads(w) will still raise xw by as much as constraint and the root w of S does heads(w ). Con- they would have had v chosen S for its star constraint.) dition on this happening. Then the chosen constraint 0 Thus, for such a constraint S, heads(w) (which w does S is uniformly random in H, so, in expectation, a con- with probability at least 1/2) will hit S whether or not stant fraction of the constraints S in H are hit (because 0 v chooses S as its star constraint. h(S) ≤ h(S ) and the root w of S also does heads(w)). If a constant fraction of v’s active constraints have the assumed property, then a constant fraction of v’s Case 3. A constant fraction of v’s active constraints S active constraints will be hit with probability at least have the following property: if v were to choose S as its 1/2, so in expectation a constant fraction of v’s active star constraint, and the root w of S were to do tails(w), constraints will be hit. then tails(w) would do Step(x, S) (S would be the runt). 10 Christos Koufogiannakis, Neal E. Young

Let T denote the set of such constraints. For S ∈ RNC algorithm will return the computed x. Otherwise T let t(S) be the value to which tails(w) (where w is the RNC algorithm will return “fail”. the root of S) would increase xv. Whether or not v This concludes the proof of Thm. 4. ut chooses S as its star constraint, if xv increases to t(S) in the round then S will be hit (whether or not w does 4 Submodular-cost Covering tails(w)). Let S and S0 be any two constraints in T where This section describes an efficient distributed algorithm t(S0) ≥ t(S). Let w and w0, respectively, be the root for Submodular-cost Covering. Given a cost func- vertices of S and S0. (Again w = w0 is possible.) If v tion c and a collection of constraints C, the problem is chooses S0 as its star constraint and w0 does tails(w0), to find x ∈ IRn to then (because x increases to at least t(S0) ≥ t(S)) S + v minimize c(x), subject to (∀S ∈ C) x ∈ S. will be hit. n Since (in the case under consideration) a constant The cost function c : IR+ → IR+ is non-decreasing, con- fraction of v’s active constraints are in T , with constant tinuous, and submodular. Each constraint S ∈ C is probability v chooses some constraint S0 ∈ T as its star closed upwards. constraint and the root w0 of S0 does tails(w0). Condi- 0 tion on this happening. Then the chosen constraint S 4.1 Sequential Implementation is uniformly random in T , so, in expectation, a con- stant fraction of the constraints S in T are hit (because Here is a brief description of the centralized δ-approx- t(S) ≤ t(S0)). This proves the lemma. ut imation algorithm for this problem (for a complete de- scription see [36]). Proof (Thm. 4, part (a)) The lemma implies that the The algorithm starts with x = 0, then repeatedly potential decreases in expectation by a constant factor does the following Step(x, S) for any not-yet-satisfied each round. As the potential is initially O(|C|) and non- constraint S (below vars(S) denotes the variables in x increasing, standard arguments (see Footnote 9) imply that constraint S depends on): that the number of rounds before the potential is less than 1 (and so x must be feasible) is O(log |C|) in ex- subroutine Step(x, S): pectation and with high probability. 1. Let β ← stepsize(x, S). 0 This completes the proof of Thm. 4, part (a). ut 2. For j ∈ vars(S), let xj ∈ IR+ ∪ {∞} be maximal s.t. 0 raising xj to xj would raise c(x) by at most β. 0 3. For j ∈ vars(S), let xj ← xj. Parallel (RNC) implementation Let distancec(x, S) denote the minimum cost of aug- menting x to satisfy S, min{c(ˆx) − c(x) :x ˆ ∈ S, xˆ ≥ x}. Proof (Thm. 4, part (b)) To adapt the proof of (a) to prove part (b), the only difficulty is implementing Observation 5 ([36]) If stepsize(x, S) ≤ distancec(x, S) step (2) of heads(w) in NC. This can be done using the in each step, and the algorithm terminates, then it re- following observation. When heads(w) does Step(x, Sk) turns a δ-approximate solution. for its kth star constraint (except the runt), the ef- Proof (sketch, for linear c) Each step starts with x 6∈ S. fect on xw is the same as setting xw ← fk(xw) for Since the optimal solution x∗ is in S and S is closed a linear function fk that can be determined at the upwards, there must be at least one k ∈ vars(S) such start of the round. By a prefix-sum-like computation, ∗ that xk < x . Thus, while the algorithm increases the compute, in NC, for all i’s, the functional composition k 0 cost of x by at most δβ, it decreases the potential Fk = fk ◦fk−1 ◦· · ·◦f1. Let xw be xw at the start of the P ∗ j cj max(0, xj − xj) by at least β. Full proof in [36]. round. Simulate the steps for all constraints Sk in par- k 0 ut allel by computing xw = Fk(xw), then, for each k with k−1 xw < tSk , set the variable xv of Sk’s leaf v by simu- The function stepsize(x, S). One generic way to de- k−1 k lating Step(x, Sk) with xw = xw . Set xw to xw for the fine stepsize(x, S) is as the minimum β such that Step(x, S) k−1 largest k with xw < tSk . Finally, determine the runt will satisfy S in one step. This choice satisfies the re- S and do Step(x, S). This completes the description of quirement stepsize(x, S) ≤ distancec(x, S) in Observa- the NC simulation of heads(w). tion 5 [36]. But the sequential algorithm above, and The RNC algorithm will simulate some c log |C| rounds the distributed algorithm described next, will work cor- of the distributed algorithm, where c is chosen so the rectly with any stepsize() satisfying the condition in probability of termination is at least 1/2. If the dis- Observation 5. For an easy-to-compute and efficient tributed algorithm terminates in that many rounds, the stepsize() function for CMIP, see [36]. Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 11

4.2 Distributed Implementation Distributed algorithm for problems with arbitrary covering constraints and submodular cost Alg. 3 Say that the cost function c(x) is locally computable if, 1. Initialize x ← 0. given any assignment to x and any constraint S, the 2. Compute the Linial/Saks decomposition of the con- increase in c(x) due to Step(x, S) raising the variables straint graph G. Denote it B1,B2,...,BO(log |C|). in S can be determined knowing only the values of those 3. For b = 1, 2,...,O(log |C|), do: 4. Within each connected component K of block B : variables ({x | j ∈ vars(S)}). Any linear or separable b j 5. Gather all constraints in K at the leader vK. cost function is locally computable. 6. At vK, do Step(x, S) until x ∈ S for all S ∈ K. We assume the distributed network has a node for 7. Broadcast variables’ values to all constraints in K. each constraint S ∈ C, with edges from S to each node whose constraint S0 shares variables with S (vars(S) ∩ vars(S0) 6= ∅). (The computation can easily be simu- (By the assumption that the cost is locally com- lated on a network with nodes for variables or nodes putable, the function stepsize(x, S) and the subroutine for variables and constraints.) We assume unbounded Step(x, S) can be implemented knowing only the con- message size. straint S and the values of the variables on which S depends. Thus, the leader can perform Step(x, S) for Theorem 6 For δ-approximating any Submodular- each constraint that contacted it in this phase. More- cost Covering problem with a locally computable cost over, distinct leaders’ subproblems do not share vari- function, there is a randomized distributed algorithm ables, so they can proceed simultaneously.) taking O(log2 |C|) communication rounds in expectation To end the phase, each leader ` returns the updated and with high probability, where |C| is the number of variable information to the constraints that contacted `. constraints. Each constraint in R is satisfied in the phase and drops out of the computation (it can be removed from the Proof To start each phase, the algorithm finds large in- network and from C; its variables’ values will stabilize dependent subsets of constraints by running one phase once the constraint and all its neighbors are finished). of Linial and Saks’ (LS) decomposition algorithm [43], 10 below, with any k such that k ∈ Θ(log |C|) (in case the Analysis of the number of rounds. In each phase nodes do not know such a value see the comment at the (since each constraint is in R, and thus satisfied, with end of this subsection). A phase of the LS algorithm, probability 1/c|C|1/k), the number of remaining con- for a given k, takes O(k) rounds and produces a ran- straints decreases by at least a constant factor 1 − dom subset R ⊆ C of the constraints (nodes), and for 1/c|C|1/k ≤ 1 − 1/Θ(c) in expectation. Thus, the algo- each constraint S ∈ R a “leader” node `(S) ∈ S, with rithm finishes in O(c log |C|) phases in expectation and the following properties: with high probability 1 − 1/|C|O(1). Since each phase takes O(k) rounds, this proves the theorem. – Each constraint in R is within distance k of its leader: Comment. If the nodes do not know a value k ∈ (∀S ∈ R) d(S, `(S)) ≤ k. Θ(log |C|), use a standard doubling trick. Fix any con- – Edges do not cross components: stant d > 0. Start with x = 0, then run the algorithm 0 0 0 (∀S, S ∈ R) `(S) 6= `(S ) → vars(S) ∩ vars(S ) = ∅. as described above, except doubling values of k as fol- – Each constraint has a chance to be in R: lows. For each k = 1, 2, 4, 8,..., run O (k) phases as de- 1/k d (∀S ∈ C) Pr[S ∈ R] ≥ 1/c|C| for some c > 1. scribed above with that k. (Make the number of phases Next, each constraint S ∈ R sends its information enough so that, if k ≥ ln |C|, the probability of satisfying (the constraint and its variables’ values) to its leader all constraints is at least 1 − 1/|C|d.) The total number `(S). This takes O(k) rounds because `(S) is at distance of rounds is proportional to the number of rounds in O(k) from S. Each leader then constructs (locally) the the last group of Od(k) phases. subproblem induced by the constraints that contacted To analyze this modification, consider the first k ≥ it and the variables of those constraints, with their cur- log |C|. By construction, with probability at least 1 − d rent values. Using this local copy, the leader repeatedly 1/|C| , all constraints are satisfied after the Od(k) phases does Step(x, S) for any not-yet-met constraint S that with this k. So the algorithm finishes in Od(log |C|) contacted it, until all constraints that contacted it are phases with probability at least 1 − 1/|C|d. satisfied. To analyze the expected number of rounds, note that the probability of not finishing in each subsequent 10 The LS decomposition was also used in approximation d algorithms for fractional packing and covering by Kuhn et group of phases is at most 1/|C| , while the number of al. [39]. rounds increases by a factor of four for each increase in 12 Christos Koufogiannakis, Neal E. Young k, so the expected number of subsequent rounds is at of being active. The stage-one and stage-two costs are P∞ i di most Od(log |C|) i=0 4 /|C| = Od(log |C|). ut specified by a matrix w and a vector c, respectively. In stage one, the problem instance is revealed. The algo- We remark without proof that the above algorithm rithm computes, for each constraint S ∈ C, a “commit- can be derandomized at the expense of increasing the ment” vector yS ∈ S for that constraint. The cost for number of rounds to super-polylogarithmic (but still P S S stage one is w · y = S,j∈vars(S) wj yj . In stage two, sub-linear), using Panconesi and Srinivasan’s determin- each constraint S is (independently) active with proba- istic variant of the Linial-Saks decomposition [52]. bility pS. Let A denote the active constraints. The final Also, note that although there are parallel (NC) solution x is the minimal vector covering the active- variants of the Linial-Saks decomposition [1, Thm. 5], S constraint commitments, i.e. with xj = max{yj : S ∈ this does not yield a parallel algorithm. For example, if A, j ∈ vars(S)}. The cost for stage two is the random a single variable occurs in all constraints, the underlying P variable c · x = j cjxj. The problem is to choose y to network is complete, so has diameter 1, and thus can be minimize the total expected cost C(y) = w·y+EA[c·x]. “decomposed” into a single cluster. In the distributed Probabilistic Facility Location is a special setting, this case can be handled in O(1) rounds (by case of probabilistic CMIP, where each customer i is doing all the computation at a single node). But it is also given a probability pi. In stage one, the algorithm not clear how to handle it in the parallel setting. computes x and is charged the assignment cost for x. In stage two, each customer i is active (i ∈ A) with probability p , independently. The algorithm is charged 4.3 Applications i opening costs fj only for facilities with active customers (cost P f max x ). The (submodular) cost c(x) is As mentioned in the introduction, the covering prob- j j i∈A ij the total expected charge. lem considered in this section generalizes many covering problems. For all of these, Thm. 6 gives a distributed δ-approximation algorithm running in O(log2 |C|) com- munication rounds in expectation and with high prob- 5 Sequential Primal-Dual Algorithm for ability. Fractional Packing and MWM

Corollary 1 There is a distributed δ-approximation al- This section gives a sequential δ-approximation algo- gorithm for Set Cover, CMIP and (non-metric) Fa- rithm for Fractional Packing which is the basis cility Location that runs in O(log2 |C|) communica- of subsequent distributed algorithms for Fractional tion rounds in expectation and with high probability. Packing and Max Weighted c-Matching. The al- gorithm is a primal-dual extension of the previous cov- If the complexity of the computation (as opposed ering algorithms. to just the number of communication rounds) is impor- tant, these problems have appropriate stepsize() func- Notation. Fix any Fractional Packing instance tions that can be computed efficiently (generally so that and its Fractional Covering dual: each constraint can be satisfied with overall work nearly m T maximize w · y subject to y ∈ IR+ and A y ≤ c, linear in the problem size) [36]. n minimize c · x subject to x ∈ IR+ and Ax ≥ w. Here is a brief description of the problems men- tioned above but not previously defined. Let Ci denote the i-th covering constraint (Aix ≥ wi) and P denote the j-th packing constraint (AT y ≤ (Non-metric) Facility Location, for a bipartite j j graph G = (C,F,E) of customers C and facilities F , cj). Let vars(S) contain the indices of variables in con- with assignment costs d and opening costs f, asks to straint S. Let cons(z) contain the indices of constraints P in which variable z appears. Let N(ys) denote the set of find x ≥ 0 such that j∈N(i)bxijc ≥ 1 for each cus- tomer i, while minimizing the cost to open facilities packing variables that share constraints with ys: N(ys) = P vars(cons(ys)). j∈F fj maxi∈N(j) xij plus the cost to assign customers P to them ij∈E dijxij. The total cost is submodular. Fractional Covering. Alg. 4 shows a sequential al- 11 Each customer has at most δ accessible facilities. gorithm for Fractional Covering. Each iteration of In probabilistic CMIP, the constraints are CMIP the algorithm does one step for an unsatisfied constraint constraints and each constraint has a probability pS Cs: taking the step size βs to be the minimum such that raising just one variable x ∈ vars(C ) by β /c is 11 The standard linear-cost formulation is not a covering j s s j one. The standard reduction to set cover increases δ expo- enough to make x satisfy Cs, then raising each variable nentially. xj for j ∈ vars(Cs) by βs/cj. Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 13

t packing variable ys maximally, subject to the packing Sequential algorithm for Fractional Covering Alg. 4 T 0 1. Initialize x0 ← 0, w0 ← w, t ← 0. constraints A y ≤ c. Finally, define y to be y . 2. While ∃ an unsatisfied covering constraint Cs: The next lemma and weak duality prove that this y 3. Set t ← t + 1. ... do a step for Cs is a δ-approximation for Fractional Packing. t−1 4. Let βs ← ws · minj∈vars(Cs) cj /Asj . 5. For each j ∈ vars(Cs): Lemma 3 The cost of the covering solution x returned 6. Set xt ← xt−1 + β /c . j j s j by Alg. 4 is at most δ times the cost of the packing t−1 7. For each i ∈ cons(x ) set wt ← w − A β /c . 1 j i i ij s j solution y defined above: w · y ≥ c · x. 8. Let x ← xt. Return x. δ Proof When Alg. 4 does a step to satisfy the covering constraint C (increasing x by β /c for the at most δ Fractional Covering is CMIP restricted to in- s j s j variables in vars(Cs)), the covering cost c·x increases by stances with no integer variables and no upper bounds P on variables. For this special case, in the sequential al- at most δβs, so at termination c·x is at most s∈D δβs. 0 0 T T PT t−1 t−1 t t gorithm for CMIP in Section 3.1, each constraint has Since w·y = w y −w y = t=1(w y −w y ), it t−1 t−1 t t no proper relaxation. Hence, that sequential algorithm is enough to show that w y −w y ≥ βs, where Cs reduces to Alg. 4. In turn, the sequential algorithm for is the covering constraint used in the tth step of Alg. 4. CMIP in Section 3.1 is a special case of the sequential Show this as follows: algorithm for Submodular-cost Covering in Sec- tion 4.1: t−1 t−1 t t X t−1 t−1 t t w y − w y = (wi yi − wi yi ) Observation 7 Alg. 4 is a special case of both of the i following two sequential algorithms: t−1 t−1 X t−1 t t−1 = ws ys + (wi − wi )yi (9) – the algorithm for CMIP in Section 3.1, and i6=s – the algorithm for Submodular-cost Covering in t−1 Asj X βs t−1 = ys βs max + Aij yi (10) Section 4.1. j∈cons(ys) cj cj i6=s;j∈cons(ys) m The explicit presentation of Alg. 4 eases the analysis. 1 X ≥ β A yt−1 s c ij i Fractional packing. Fix a particular execution of j i=1 Alg. 4 on the Fractional Covering instance. In ad- (for j s.t. constraint Pj is tight after raising ys) (11) dition to computing a Fractional Covering solution = β x, the algorithm also (implicitly) defines a Fractional s 12 Packing solution y, as follows: t t−1 t Eq. (9) follows from ys = 0 and yi = yi (∀i 6= s). Let T be the number of steps performed by Alg. 4. t−1 Asj For (10), the definition of βs gives w = βs max , t s cj For 0 ≤ t ≤ T , after the tth step of Alg. 4, let x be j∈cons(ys) t t t−1 t the covering solution so far, and let w = w − Ax be and, by inspecting Alg. 4, wi − wi is P βs P βs the current slack vector. Define the residual covering Aij = Aij . j∈vars(Cs):i∈cons(xj ) cj j∈cons(ys) cj problem to be Then (11) follows by dropping all but the terms for minimize c · x subject to x ∈ IRn and Ax ≥ wt; the index j ∈ cons(ys) s.t. constraint Pj gets tight + T t−1 (Ajy = cj). The last equality holds because Pj is define the residual packing problem to be its dual: tight. ut maximize wt · y subject to y ∈ IRm and ATy ≤ c. + By the next lemma, the packing solution y has in- The residual packing constraints are independent of t. teger entries as long as the coefficients Aij are 0/1 and T T −1 1 0 t Now define a sequence y , y , . . . , y , y , where y is the cj’s are integers: a solution to the residual packing problem after step Lemma 4 If A ∈ {0, 1}m×n and c ∈ ZZn then the pack- t, inductively, as follows: Take yT = 0. Then, for each + ing solution y lies in ZZm. t = T − 1,T − 2,..., 0, define yt from yt+1 as follows: + let C be the constraint for which Alg. 4 did a step in s Proof Since all non-zero coefficients are 1, the packing iteration t; start with yt = yt+1, then raise the single constraints are of the form P y ≤ c (∀i). By i∈vars(Pj ) i j 12 t m This tail-recursive definition follows local-ratio analyses (reverse) induction on t, each y is in ZZ+ . This is true [6]. The more standard primal-dual approach — setting the initially, because yT = 0. Assume it is true for yt−1. packing variable for a covering constraint when a step for that Then it is true for yt because, to obtain yt from yt−1, constraint is done — doesn’t work. See the appendix for an t T example. one entry yi is raised maximally subject to A y ≤ c. ut 14 Christos Koufogiannakis, Neal E. Young

Proof Observe first that, if indices s0 and s are inde- Sequential algorithm for Fractional Packing Alg. 5 1. Run Alg. 4; record poset D of covering constraint indices. pendent in the poset D, then in line 6 of Alg. 5, the 2. Let Π be a total order of D respecting the partial order. value computed for ys does not depend on ys0 (and vice 3. Initialize yT ← 0 (where Alg. 4 does T steps). versa). This is because, if it did, there would be a j 4. For t = T − 1,T − 2,..., 0 do: with Asj 6= 0 and As0j 6= 0, so the covering variable xj 5. Set yt ← yt+1. 6. For s = Π , raise yt maximally subject to ATyt ≤ c: would occur in both covering constraints Cs and Cs0 . t s 0 t T t In this case, since Cs and Cs0 share a variable, s and s ys ← minj∈cons(ys)(cj − Aj y )/Asj . 7. Set y ← y0. Return y. would be ordered in D. Consider running Alg. 5 using any total order Π of D. Suppose that, in some iteration t, the algorithm Corollary 2 For both Fractional Packing and Max raises a variable ys (s = Πt), and then, in the next it- 0 Weighted c-Matching, the packing solution y de- eration, raises a variable ys0 (s = Πt−1) where ys0 is fined above is a δ-approximation. independent of ys in the poset D. By the previous ob- servation, the value computed for ys does not depend The covering solution x computed by Alg. 4 is some- on ys0 , and vice versa. Thus, transposing the order in what independent of the order in which Alg. 4 consid- which Alg. 5 considers just these two variables (so that ers constraints. For example, if Alg. 4 does a step for a Alg. 5 raises ys0 in iteration t and ys in the next it- constraint Cs, and then (immediately) a step for a dif- eration, instead of the other way around) would not ferent constraint Cs0 that shares no variables with Cs, change the returned vector y. The corresponding total then doing those steps in the opposite order would not order Π0 (Π, but with s and s0 transposed) is also a change the final covering solution x. Not surprisingly, it total ordering of D. Thus, for any order Π0 that can be also would not change the packing solution y as defined obtained from Π by such a transposition, Alg. 5 gives above. This flexibility is important for the distributed the same solution y. algorithm. The partial order defined next captures this To complete the proof, observe that any total order- flexibility precisely: ing Π0 of D can be obtained from Π by finitely many such transpositions. Consider running Bubblesort on in- Definition 2 Let ti denote the time at which Alg. 4 put Π, ordering elements (for the sort) according to Π0. 13 T does a step to cover Ci. Let ti = 0 if no step was This produces Π0 in at most  transpositions of adja- 0 2 performed for Ci. Let i ≺ i denote the predicate cent elements. Bubblesort only transposes two adjacent elements s0, s, if s0 occurs before s in Π but after s in vars(C 0 ) ∩ vars(C ) 6= ∅ and 0 < t 0 < t . i i i i Π0, so s and s0 must be independent in D. Thus, each (That is, the two constraints share a variable and Alg. 4 intermediate order produced along the way during the did steps for both constraints — the first constraint sort is a valid total ordering of D. ut sometime before the second constraint.) Corollary 3 For both Fractional Packing and Max Let D be the poset of indices of covering constraints Weighted c-Matching, Alg. 5 is δ-approximation al- for which Alg. 4 performed a step, (partially) ordered gorithm. by the transitive closure of “≺”.

Sequential Alg. 5 computes the Fractional Pack- ing solution y as defined previously, but considering the 6 Fractional Packing with δ = 2 variables in an order obtained by reversing any total or- dering Π of D.14 The next lemma shows that this still This section gives a 2-approximation for Fractional leads to the same packing solution y. Packing with δ = 2 (each variable occurs in at most two constraints). Lemma 5 Alg. 5 returns the same solution y regard- Distributed model. We assume the network in which less of the total order Π of D that it uses in line 2. the distributed computation takes place has vertices for 13 For now, the time at which a step was performed can be covering variables (packing constraints) and edges for thought as the step number t (line 3 at Alg. 4). It will be covering constraints (packing variables). So, the net- slightly different in the distributed setting. work has a node uj for every covering variable xj. An 14 The partial order D is still defined with respect to a par- edge ei connects vertices uj and uj0 if xj and xj0 belong ticular fixed execution of Alg. 4. The goal is to allow Alg. 4 to the same covering constraint C , that is, there exists to do steps for the constraints in any order, thus defining the i partial order D, and then to allow Alg. 5 to use any total a constraint Aijxj + Aij0 xj0 ≥ wi (δ = 2 so there can ordering Π of D. be at most 2 variables in each covering constraint). Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 15

Distributed 2-approximation algorithm for Fractional Packing with δ = 2 Alg. 6 input: Graph G = (V,E) representing a fractional packing problem instance with δ = 2 . output: Feasible y, 2-approximately minimizing w · y.

1. Each edge ei ∈ E initializes yi ← 0. 2. Each edge ei ∈ E initializes donei ← false. ... this indicates if yi has been set to its final value

3. Until each edge ei has set its variable yi (donei = true), perform a round: R S 4. Perform a round of Alg. 2. ... covering with δ = 2 augmented to compute (ti ,ti ) t 5. For each node ur that was a root (in Alg. 2) at any previous round, consider locally at ur all stars Sr that were t t rooted by ur at any previous round t. For each star Sr perform IncreaseStar(Sr). t IncreaseStar(star Sr): t S 6. For each edge ei ∈ Sr in decreasing order of ti : 7. If IncreasePackingVar(ei) = NOT DONE then BREAK (stop the for loop).

IncreasePackingVar(edge ei = (uj , ur)): 8. If ei or any of its adjacent edges has a non-yet-satisfied covering constraint return NOT DONE. R 9. If ti = 0 then: 10. Set yi ← 0 and donei ← true. 11. Return DONE. 0 12. If donei0 = false for any edge ei0 such that i ≺ i then return NOT DONE.  P P 13. Set yi ← min (cj − i0 Ai0j yi0 )/Aij , (cr − i0 Ai0ryi0 )/Air and donei ← true. 14. Return DONE.

Algorithm. Recall Alg. 2, which 2-approximates CMIP2 The extended algorithm, Alg. 6, runs Alg. 2 to com- in O(log m) rounds. Fractional Covering with δ = pute a cover x, recording the poset D. Meanwhile, it 2 is the special case of CMIP2 with no integer variables computes a packing y as follows: as it discovers D, it and no upper bounds. Thus, Alg. 2 also 2-approximates starts raising packing variable as soon as it can (while Fractional Covering with δ = 2 in O(log m) rounds. emulating Alg. 5). Specifically it sets a given yi ∈ D Using the results in the previous section, this sec- as soon as (a) Alg. 2 has done a step for the covering tion extends Alg. 2 (as it specializes for Fractional constraint Ci, (b) the current cover x satisfies each ad- Covering with δ = 2) to compute a solution for the jacent covering constraint Ci0 , and (c) for each adjacent dual problem, Fractional Packing with δ = 2, in Ci0 for which Alg. 2 did a step after Ci, the variable yi0 O(log m) rounds. has already been set. When it sets the packing variable Alg. 2 proceeds in rounds, and within each round yi, it does so following Alg. 5: it raises yi maximally it covers a number of edges. Define the time at which subject to the packing constraint ATy ≤ c. a step to cover constraint Ci (edge ei) is done as a Some nodes will be executing the second phase of R S R pair (ti , ti ), where ti denotes the round in which the the algorithm (computing the yi’s) while some other S step was performed and ti denotes that within the star nodes are still executing the first phase (computing the S R this step is the ti -th one. Let ti = 0 if no step was xj’s). This is necessary because a given node cannot performed for Ci. Overloading Definition 2, define “≺” know when distant nodes are done computing x. as follows. Theorem 8 For Fractional Packing where each vari- 0 Definition 3 Let i ≺ i denote that vars(Ci0 )∩vars(Ci) 6= able appears in at most two constraints (δ = 2) there ∅ (i0 and i are adjacent edges in the network) and the is a distributed 2-approximation algorithm running in R S R S pair (ti0 , ti0 ) is lexicographically less than (ti , ti ) (but O(log m) rounds in expectation and with high probabil- R ti0 > 0). ity, where m is the number of packing variables. 0 R S For any two adjacent edges i and i , the pairs (ti , ti ) Proof By Thm. 4, Alg. 2 computes a covering solution R S and (ti0 , ti0 ) are adequate to distinguish which edge had x in T = O(log m) rounds in expectation and with high a step to satisfy its covering constraint performed first. probability. Then by a straightforward induction on t, Adjacent edges can have their covering constraints done within T + t rounds, for every constraint Ci for which in the same round only if they belong to the same star Alg. 2 did a step in round T −t, Alg. 6 will have set the S (they have a common root), thus they differ in ti . Oth- variable yi. Thus, Alg. 6 computes the entire packing y erwise they are done in different rounds, so they differ in 2T = O(log m) rounds with in expectation and with R R S in ti . Thus the pair (ti , ti ) and relation “≺” define a high probability. partially ordered set D of all edges for which Alg. 2 did As Alg. 2 performs steps for covering constraints, a step. order the indices of those constraints by the time in 16 Christos Koufogiannakis, Neal E. Young which the constraints’ steps were done, breaking ties Following the approach in the previous two sections, arbitrarily. Let Π be the resulting order. this section extends this specialization of Alg. 3 for As Alg. 6 performs steps for packing variables, order Fractional Covering to compute a solution for Frac- the indices of those variables by the time in which the tional Packing, the dual problem, in O(log2 m) rounds. variables were raised, breaking ties arbitrarily. Let Π0 Similar to the δ = 2 case in the previous section, be the reverse of this order. Alg. 3 defines a poset D of the indices of covering con- Then the poset D is the same as it would be if de- straints; the extended algorithm sets raises packing vari- fined by executing the sequential algorithm Alg. 4 for ables maximally, in a distributed way consistent with the Fractional Covering problem and considering some total ordering of D. Here, the role of stars is sub- the constraints in the order in which their indices occur stituted by components and the role of roots by leaders. in Π. Also, the covering solution x is the same as would With each step done to satisfy the covering constraints R S R be computed by Alg. 4. Ci, the algorithm records (ti , ti ), where ti is the round 0 S Likewise, Π is a total ordering of D, and the pack- and ti is the within-the-component iteration in which ing solution y is the same as would be computed by the step was performed. This defines a poset D on the Alg. 5 using the order Π0. indices of covering constraints for Alg. 3 performs steps. By Lemmas 3 and 5, and weak duality, the Frac- The extended algorithm, Alg. 7, runs the specialized tional Packing solution y is 2-approximate. ut version of Alg. 3 on the Fractional Covering in- stance, recording the poset D (that is, recording (tR, tS) The following corollary is a direct result of Lemma 4 i i for each covering constraint Ci for which it performs a and Thm. 8 and the fact that for this problem |E| = step). Meanwhile, as it discovers the partial order D, 2 O(|V | ). it begins computing the packing solution, raising each Corollary 4 There is a distributed 2-approximation al- packing variable as soon as it can. Specifically sets a gorithm for Max Weighted c-Matching on graphs given yi ∈ D once (a) a step has been done for the running in O(log |V |) rounds in expectation and with covering constraint Ci, (b) each adjacent covering con- high probability. straint Ci0 is satisfied and (c) for each adjacent Ci0 for which a step was done after Ci, the variable yi0 has been set. 7 Fractional Packing with general δ To implement this, the algorithm considers all com- ponents that have been done by leaders in previous Distributed model. Here we assume that the dis- rounds. For each component, the leader considers the tributed network has a node vi for each covering con- component’s packing variables yi in order of decreasing S 0 straint Ci (packing variable yi), with edges from vi to ti . When considering yi it checks if each yi0 with i ≺ i each node vi0 if Ci and Ci0 share a covering variable is set, and, if so, the algorithm sets yi and continues 15 xj. . The total number of nodes in the network is m. with the next component’s packing variable (in order S Note that in this model the role of nodes and edges is of decreasing ti ). reversed as compared to the model used in Section 6. Theorem 9 For Fractional Packing where each vari- Algorithm. Fix any Fractional Packing instance able appears in at most δ constraints there is a dis- and its Fractional Covering dual: tributed δ-approximation algorithm running in O(log2 m)

m T rounds in expectation and with high probability, where maximize w · y subject to y ∈ IR+ and A y ≤ c, n m is the number of packing variables. minimize c · x subject to x ∈ IR+ and Ax ≥ w. Recall Alg. 3, which δ-approximates Submodular- Proof The proofs of correctness and running time are cost Covering in O(log2 m) rounds. Fractional essentially the same as in the proofs of Thm. 8, except Covering (with general δ) is a special case. Thus, that in this case T = O(log2 m) in expectation and Alg. 3 also δ-approximates Fractional Covering in w.h.p. (by Thm. 6), so the running time is O(log2 m) O(log2 m) rounds. . ut For this special case, make Alg. 3 use the particular stepsize() function defined in Alg. 4 so that the spe- The following corollary is a direct result of Lemma 4 cialization of Alg. 3 defined thusly is also a distributed and Thm. 9. implementation of Alg. 4. Corollary 5 For c- on 15 The computation can easily be simulated on a network Max Weighted Matching with nodes for covering variables or nodes for covering vari- hypergraphs, there is a distributed δ-approximation al- ables and covering constraints. gorithm running in O(log2 |E|) rounds in expectation Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 17

Distributed δ-approximation algorithm for Fractional Packing with general δ Alg. 7 input: Graph G = (V,E) representing a fractional packing problem instance. output: Feasible y, δ-approximately minimizing w · y. 1. Initialize y ← 0. 2. For each i = 1 . . . m initialize donei ← false. ... this indicates if yi has been set to its final value 3. Until each yi has been set (donei = true) do: R S 4. Perform a phase of the δ-approximation algorithm for covering (Alg. 3), recording (ti , ti ). 5. For each node vK that was a leader at any previous phase, consider locally at vK all components that chose vK as a leader at any previous phase. For each such component Kr perform IncreaseComponent(Kr).

IncreaseComponent(component Kr): S 6. For each i ∈ Kr in decreasing order of ti : 7. If IncreasePackingVar(i) = NOT DONE then BREAK (stop the for loop).

IncreasePackingVar(i): 8. If Ci or any Ci0 that shares covering variables with Ci is not yet satisfied return NOT DONE. R 9. If ti = 0 then: 10. Set yi = 0 and donei = true. 11. Return DONE. 0 12. If donei0 = false for any yi0 such that i ≺ i then return NOT DONE.  P 0 0 13. Set yi ← minj∈cons(yi) (cj − i0 Ai j yi )/Aij ) and donei ← true. 14. Return DONE. and with high probability, where δ is the maximum hy- Consider running Alg. 4 on each problem, and giv- peredge degree and |E| is the number of hyperedges. ing it the shared constraint x1 + x2 ≥ 1 first. This con- straint (and the cost) are the same in both problems, and the algorithm sets x to satisfy the constraint in the Acknowledgements same way for both problems. A standard primal-dual approach would set the dual variable y12 at this point, Thanks to two anonymous referees for their helpful com- as a function of the treatment of x1 and x2 (essentially ments. in an online fashion, constraint by constraint). That can’t work here: in order to get a 2-approximate dual solution, the dual variable y12 has to be set differently in the two instances: to 0 for the first instance, and to Appendix 1 for the second instance.

Generate a δ-approximate primal-dual pair for the greedy algorithm for Fractional Covering (Alg. 4 in Sec- References tion 5) in some sense requires a tail-recursive approach. 1. B. Awerbuch, B. Berger, L. Cowen, and D. Peleg. Low- The following example demonstrates this. Consider (i) diameter graph decomposition is in NC. Random Struc- min{x1 + x2 + x3 : x1 + x2 ≥ 1, x1 + x3 ≥ 5, x ≥ 0}. tures and Algorithms, 5(3):441–452, 1994. 2. N. Bansal, N. Korula, V. Nagarajan, and A. Srinivasan. If the greedy algorithm (Alg. 4) does the constraints of On k-column sparse packing programs. In Proceedings of (i) in either order (choosing β maximally), it gives a MPS Conference on Integer Programming and Combinato- solution of cost 10. rial Optimization (IPCO), pages 369–382, 2010. 3. R. Bar-Yehuda, K. Bendel, A. Freund, and D. Rawitz. The dual is max{y12 + 5y13 : y12 + y13 ≤ 1, y ≥ 0}. Local ratio: a unified framework for approximation algo- The only way to generate a dual solution of cost 5 is to rithms. ACM Computing Surveys, 36(4):422–463, 2004. set y12 = 0 and y13 = 1. 4. R. Bar-Yehuda and S. Even. A linear-time approximation Now consider the covering problem (ii) algorithm for the weighted vertex cover problem. Journal of Algorithms, 2(2):198–203, 1981. min{x1 + x2 + x3 : x1 + x2 ≥ 1, x1 + x3 ≥ 0, x ≥ 0} 5. R. Bar-Yehuda and S. Even. A local-ratio theorem for (the right-hand-side of the second constraint is 0). approximating the weighted vertex cover problem. Annals of Discrete Mathematics, 25(27-46):50, 1985. If the greedy algorithm does the constraints of (ii) in 6. R. Bar-Yehuda and D. Rawitz. On the equivalence be- either order (choosing β maximally), it gives a solution tween the primal-dual schema and the local-ratio tech- of cost 2. nique. SIAM Journal on Discrete Mathematics, 19(3):762– The dual is max{y : y + y ≤ 1, y ≥ 0}. The 797, 2005. 12 12 13 7. D. Bertsimas and R. Vohra. Rounding algorithms for only way to generate a dual solution of cost 1 is to set covering problems. Mathematical Programming: Series A y12 = 1 and y12 = 0 (the opposite of the y for (i)). and B, 80(1):63–89, 1998. 18 Christos Koufogiannakis, Neal E. Young

8. R. D. Carr, L. K. Fleischer, V. J. Leung, and C. A. 28. R. M. Karp. Reducibility among combinatorial problems. Phillips. Strengthening integrality gaps for capacitated Complexity of Computer Computations, R. E. Miller and J. network design and covering problems. In the eleventh W. Thatcher, Eds., The IBM Research Symposia Series, ACM-SIAM Symposium On Discrete Algorithms, pages New York, NY: Plenum Press:85–103, 1972. 106–115, Philadelphia, PA, USA, 2000. Society for In- 29. R.M. Karp. Probabilistic recurrence relations. Journal of dustrial and Applied Mathematics. the ACM (JACM), 41(6):1136–1150, 1994. 9. Z.-Z. Chen. A fast and efficient nc algorithm for maxi- 30. P. Kelsen. An optimal parallel algorithm for maximal mal matching. Information Processing Letters, 55:303–307, matching. Information Processing Letters, 52:223–228, 1995. 1994. 10. V. Chv´atal. A greedy heuristic for the set-covering prob- 31. S. Khuller, U. Vishkin, and N.E. Young. A primal-dual lem. Mathematics of Operations Research, 4:233–235, 1979. parallel approximation technique applied to weighted set 11. A. Czygrinow, M. Ha´n´ckowiak, and E. Szyma´nska. A and vertex covers. Journal of Algorithms, 17:280–289, fast distributed algorithm for approximating the maxi- 1994. mum matching. In the twelfth European Symosium on Al- 32. S.G. Kolliopoulos and N.E. Young. Approximation algo- gorithms, pages 252–263, 2004. rithms for covering/packing integer programs. Journal of 12. A. Czygrinow, M. Ha´n´ckowiak, and W. Wawrzyniak. Dis- Computer and System Sciences, 71(4):495–505, 2005. tributed packing in planar graphs. In the twentieth ACM 33. C. Koufogiannakis and N.E. Young. Beating simplex for Symposium on Parallel Algorithms and Architectures, pages fractional packing and covering linear programs. In the 55–61, 2008. forty-eighth IEEE symposium on Foundations of Computer 13. J. Edmonds. Paths, trees, and flowers. Canadian Journal Science, pages 494–504, 2007. of Mathematics, 17:449–467, 1965. 34. C. Koufogiannakis and N.E. Young. Distributed and par- 14. J. Edmonds and E. L. Johnson. Matching: A well-solved allel algorithms for weighted vertex cover and other cov- class of integer linear programs. Combinatorial Structures ering problems. the twenty-eighth ACM symposium Prin- and Their Applications, pages 89–92, 1970. ciples of Distributed Computing, pages 171–179, 2009. 15. F. Grandoni, J. K¨onemann, and A. Panconesi. Dis- 35. C. Koufogiannakis and N.E. Young. Distributed frac- tributed weighted vertex cover via maximal match- tional packing and maximum weighted b-matching via ings. ACM Transactions on Algorithms (TALG), 5(1):1–12, tail-recursive duality. the twenty-third International Sym- 2008. posium on Distributed Computing. Lecture Notes in Com- 16. F. Grandoni, J. K¨onemann,A. Panconesi, and M. Sozio. puter Science, LNCS 5805:221–238, 2009. Primal-dual based distributed algorithms for vertex cover 36. C. Koufogiannakis and N.E. Young. Greedy ∆- with semi-hard capacities. In the twenty-fourth ACM sym- approximation algorithm for covering with arbitrary posium on Principles Of Distributed Computing, pages 118– constraints and submodular cost. In the thirty-sixth 125, 2005. International Colloquium on Automata, Languages and 17. F. Grandoni, J. K¨onemann,A. Panconesi, and M. Sozio. Programming, LNCS 5555:634–652, 2009. See also A primal-dual bicriteria distributed algorithm for ca- http://arxiv.org/abs/0807.0644. pacitated vertex cover. SIAM Journal on Computing, 37. F. Kuhn and T. Moscibroda. Distributed approximation 38(3):825–840, 2008. of capacitated dominating sets. In the nineteenth ACM 18. F. Grandoni, J. K¨onemann,J., and A. Panconesi. Dis- Symposium on Parallelism in Algorithms and Architectures, tributed weighted vertex cover via maximal matchings. pages 161–170, 2007. Lecture Notes in Computer Science, 3595:839–848, 2005. 19. N.G. Hall and D.S. Hochbaum. A fast approximation 38. F. Kuhn, T. Moscibroda, and R. Wattenhofer. What cannot be computed locally! In the twenty-third ACM algorithm for the multicovering problem. Discrete Applied symposium on Principles Of Distributed Computing, pages Mathematics, 15(1):35–40, 1986. 20. M. Ha´n´ckowiak, M. Karonski, and A. Panconesi. On the 300–309, 2004. distributed complexity of computing maximal matchings. 39. F. Kuhn, T. Moscibroda, and R. Wattenhofer. The price SIAM Journal of Discrete Mathematics, 15(1):41–57, 2001. of being near-sighted. In the seventeenth ACM-SIAM Sym- 21. D. S. Hochbaum. Efficient bounds for the stable set, posium On Discrete Algorithm, pages 980–989, 2006. vertex cover, and set packing problems. Discrete Applied 40. F. Kuhn and R. Wattenhofer. Constant-time distributed Mathematics, 6:243–254, 1983. dominating set approximation. In the twenty-second ACM 22. D.S. Hochbaum. Approximation algorithms for the set symposium on the Principles Of Distributed Computing, covering and vertex cover problems. SIAM Journal on pages 25–32, 2003. Computing, 11:555–556, 1982. 41. C. Lenzen, Y.A. Oswald, and R. Wattenhofer. What can 23. J.H. Hoepman. Simple distributed weighted matchings. be approximated locally?: case study: dominating sets Arxiv preprint cs.DC/0410047, 2004. in planar graphs. In the twentieth ACM Symposium on 24. S. Hougardy and D.E. Vinkemeier. Approximating Parallel Algorithms and Architectures, pages 46–54, 2008. weighted matchings in parallel. Information Processing 42. N. Linial. Locality in distributed graph algorithms. SIAM Letters, 99(3):119–123, 2006. Journal on Computing, 21:193–201, 1992. 25. A. Israeli and A. Itai. A fast and simple randomized par- 43. N. Linial and M. Saks. Low diameter graph decomposi- allel algorithm for maximal matching. Information Pro- tions. Combinatorica, 13(4):441–454, 1993. cessing Letters, 22:77–80, 1986. 44. Z. Lotker, B. Patt-Shamir, and S. Pettie. Improved 26. L. Jia, R. Rajaraman, and T. Suel. An efficient dis- distributed approximate matching. In the twelfth ACM tributed algorithm for constructing small dominating Symposium on Parallelism in Algorithms and Architectures, sets. In the twentieth ACM symposium on the Principles pages 129 –136, 2008. Of Distributed Computing, pages 33–42, 2001. 45. Z. Lotker, B. Patt-Shamir, and A. Ros´en.Distributed ap- 27. D. S. Johnson. Approximation algorithms for combina- proximate matching. In the twenty-sixth ACM symposium torial problems. In the fifth ACM Symposium On Theory on Principles Of Distributed Computing, pages 167–174, Of Computing, 25:38–49, 1973. 2007. Distributed Algorithms for Covering, Packing and Maximum Weighted Matching 19

46. L. Lov´asz.On the ratio of optimal integral and fractional covers. Discrete Math, 13:383–390, 1975. 47. N. Luby. A simple parallel algorithm for the maximal independent set problem. In the seventh ACM Symposium on Theory Of Computing, pages 1–10, 1985. 48. M. M¨uller-Hannemannand A. Schwartz. Implementing weighted b-matching algorithms: Towards a flexible soft- ware design. In the Workshop on Algorithm Engineering and Experimentation (ALENEX), pages 18–36, 1999. 49. M. Naor and L. Stockmeyer. What can be computed locally? SIAM Journal on Computing, 24:1259–1277, 1995. STOC’ 93. 50. T. Nieberg. Local, distributed weighted matching on gen- eral and wireless topologies. In the fifth ACM Joint Work- shop on the Foundations of Mobile Computing, DIALM- POMC, pages 87–92, 2008. 51. A. Panconesi and R. Rizzi. Some simple distributed algo- rithms for sparse networks. Distributed Computing, 14:97– 100, 2001. 52. A. Panconesi and A. Srinivasan. On the complexity of dis- tributed network decomposition. Journal of Algorithms, 20(2):356–374, 1996. 53. Alessandro Panconesi and Mauro Sozio. Fast primal-dual distributed algorithms for scheduling and matching prob- lems. Distributed Computing, 22:269–283, 2010. 54. D. Peleg. Distributed computing: a locality-sensitive ap- proach. Society for Industrial and Applied Mathematics, 2000. 55. David Pritchard. Approximability of sparse integer pro- grams. In the seventeenth European Symposium on Algo- rithms, Lecture Notes in Computer Science 5757:83–94, 2009. 56. A. Srinivasan. Improved approximation guarantees for packing and covering integer programs. SIAM Journal on Computing, 29:648–670, 1999. 57. A. Srinivasan. New approaches to covering and pack- ing problems. In the twelveth ACM-SIAM Symposium On Discrete Algorithms, pages 567–576, 2001. 58. R. Uehara and Z. Chen. Parallel approximation al- gorithms for maximum weighted matching in general graphs. Information Processing Letters, 76(1-2):13–17, 2000. 59. M. Wattenhofer and R. Wattenhofer. Distributed weighted matching. In the eighteenth international sym- posium on Distributed Computing, pages 335–348, 2004.