Ranking on Arbitrary Graphs: Rematch via Continuous LP with Monotone and Boundary Condition Constraints
RRanking on Arbitrary Graphs: Rematch via Continuous LP withMonotone and Boundary Condition Constraints
T-H. Hubert Chan ∗ Fei Chen ∗ Xiaowei Wu ∗ Zhichao Zhao ∗ Abstract
Motivated by online advertisement and exchange settings, greedy randomized algorithms forthe maximum matching problem have been studied, in which the algorithm makes (random)decisions that are essentially oblivious to the input graph. Any greedy algorithm can achieveperformance ratio 0.5, which is the expected number of matched nodes to the number of nodesin a maximum matching.Since Aronson, Dyer, Frieze and Suen proved that the Modified Randomized Greedy (MRG)algorithm achieves performance ratio 0 . (cid:15) (where (cid:15) = ) on arbitrary graphs in the mid-nineties, no further attempts in the literature have been made to improve this theoretical ratiofor arbitrary graphs until two papers were published in FOCS 2012. Poloczek and Szegedy alsoanalyzed the MRG algorithm to give ratio 0.5039, while Goel and Tripathi used experimentaltechniques to analyze the Ranking algorithm to give ratio 0.56. However, we could not reproducethe experimental results of Goel and Tripathi.In this paper, we revisit the Ranking algorithm using the LP framework. Special care isgiven to analyze the structural properties of the Ranking algorithm in order to derive the LPconstraints, of which one known as the boundary constraint requires totally new analysis and iscrucial to the success of our LP.We use continuous LP relaxation to analyze the limiting behavior as the finite LP grows.Of particular interest are new duality and complementary slackness characterizations that canhandle the monotone and the boundary constraints in continuous LP. We believe our workachieves the currently best theoretical performance ratio of −√ ≈ .
523 on arbitrary graphs.Moreover, experiments suggest that Ranking cannot perform better than 0 .
724 in general. ∗ Department of Computer Science, the University of Hong Kong. { hubert,fchen,xwwu,zczhao } @cs.hku.hk a r X i v : . [ c s . D S ] J u l Introduction
Maximum matching [11] in undirected graphs is a classical problem in computer science. However,as motivated by online advertising [5, 1] and exchange settings [13], information about the graphscan be incomplete or unknown. Different online or greedy versions of the problem [3, 12, 6] canbe formulated by the following game, in which the algorithm is essentially oblivious to the inputgraph.
Greedy Matching Game . An adversary commits to a graph G ( V, E ) and reveals the nodes V (where n = | V | ) to the (possibly randomized) algorithm , while keeping the edges E secret. The algorithmreturns a list L that gives a permutation of the set (cid:0) V (cid:1) of unordered pairs of nodes. Each pair ofnodes in G is probed according to the order specified by L to form a matching greedily. In theround when a pair e = { u, v } is probed, if both nodes are currently unmatched and the edge e isin E , then the two nodes will be matched to each other; otherwise, we skip to the next pair in L until all pairs in L are probed. The goal is to maximize the performance ratio of the (expected)number of nodes matched by the algorithm to the number of nodes in a maximum matching in G .Observe that any ordering of the pairs (cid:0) V (cid:1) will result in a maximal matching in G ( V, E ), giving atrivial performance ratio at least 0 .
5. However, for any deterministic algorithm, the adversary canchoose a graph such that ratio 0 . Ranking algorithm (an early version appears in [8]) is simple to describe: a permutation σ on V is selected uniformly at random, and naturally induces a lexicographical order on theunordered pairs in (cid:0) V (cid:1) used for probing. Although by experiments, the Ranking algorithm andother randomized algorithms seem to achieve performance ratios much larger than 0 .
5, until veryrecently, the best theoretical performance ratio 0 . (cid:15) (where (cid:15) = ) on arbitrary graphs wasproved in the mid-nineties by Aronson et al. [3], who analyzed the Modified Randomized Greedy algorithm (
MRG ), which can be viewed as a modified version of the
Ranking algorithm.After more than a decade of research, two papers were published in FOCS 2012 that attempted togive theoretical ratios significantly better than the 0 . (cid:15) bound. Poloczek and Szegedy [12] alsoanalyzed the MRG algorithm to give ratio 0 . ≈ . Ranking algorithm to give ratio 0 .
56; however, we could not reproduce the experimental resultsin [6]. Both papers used a common framework which has been successful for analyzing bipartitegraphs: (i) utilize the structural properties of the matching problem to form a minimization linearprogram that gives a lower bound on the performance ratio; (ii) analyze the LP theoretically and/orexperimentally to give a lower bound.In this paper, we revisit the
Ranking algorithm using the same framework: (i) we use novel tech-niques to carefully analyze the structural properties of
Ranking for producing new LP constraints;(ii) moreover, we develop new primal-dual techniques for continuous LP to analyze the limitingbehavior as the finite LP grows. Of particular interest are new duality and complementary slack-ness results that can handle monotone constraints and boundary conditions in continuous LP. Webelieve that this paper achieves the currently best theoretical performance ratio of −√ ≈ . Ranking cannot perform betterthan 0 .
724 in general. 1 .1 Our Contribution and Techniques
Theorem 1.1
For the
Greedy Matching Game on arbitrary graphs, the
Ranking algorithm achievesperformance ratio at least −√ ≈ . . Following previous work on the analysis of
Ranking [8], we consider a set U of instances, each ofwhich has the form ( σ, u ), where σ is a permutation on V and u is a node in V . An instance ( σ, u )is good if the node u is matched when Ranking is run with σ , and bad otherwise; an event is asubset of instances. As argued in [12, 6], one can assume that G contains a perfect matching whenanalyzing the ratio of Ranking . Hence, the performance ratio of
Ranking is the fraction of goodinstances. (1) Relating Bad and Good Events to Form LP Constraints.
A simple combinatorialargument [8] is often used to relate bad and good instances. For example, if each bad instancerelates to to at least two good instances, and each good instance is related to at most one badinstance, then the fraction of good instances would be at least . By considering the structuralproperties of Ranking , one can define various relations between different bad and good events, andhence can generate various constraints in an LP, whose optimal value gives a lower bound on theperformance ratio.Despite the simplicity of this combinatorial argument, the analysis of these relations can be elusivefor arbitrary graphs. Hence, we define and analyze our relations carefully to derive three typeof constraints: monotone constraints, evolving constraints, and a boundary constraint, the last ofwhich involves a novel construction of a sophisticated relation, and is crucial to the success of our LP n . (2) Developing New Primal-Dual Techniques for Continuous LP. As in previous works,the optimal value of LP n decreases as n increases. Hence, to obtain a theoretical proof, one needs toanalyze the asymptotic behavior of LP n . It could be tedious to find the optimal solution of LP n andinvestigate its limiting behavior. One could also use experiments (for example using strongly factor-revealing LP [10]) to give a proof. We instead observe that the LP n has a continuous LP ∞ relaxation(in which normal variables becomes a function variable). However, the monotone constraints in LP n require that the function in LP ∞ be monotonically decreasing. Moreover, the boundary constrainthas its counterpart in LP ∞ . To the best of our knowledge, such continuous LPs have not beenanalyzed in the literature.We describe our formal notation in Section 2. In Section 3, we relate bad and good events in order toform LP n . In Section 4, we prove a lower bound on the performance ratio; in particular, we developnew primal-dual and complementary slackness characterization of a general class of continuous LP,and solve the continuous LP ∞ relaxation (and its dual). In Appendix B, we describe a hard instanceand our experiments show that Ranking performs no better than 0 . We describe and compare the most relevant related work. Please refer to the references in [12, 6]for a more comprehensive background of the problem. We describe
Greedy Matching Game generalenough so that we can compare different works that are studied under different names and settings.Dyer and Frieze [4] showed that picking a permutation of unordered pairs uniformly at randomcannot produce a constant ratio that is strictly greater than 0 .
5. On the other hand, this frameworkalso includes the
MRG algorithm, which was analyzed by by Aronson et al. [3] to prove the firstnon-trivial constant performance ratio crossing the 0.5 barrier. One can also consider adaptive
On Bipartite Graphs.
Running
Ranking on bipartite graphs for the
Greedy Matching Game isequivalent to running ranking [8] for the
Online Bipartite Matching problem with random arrivalorder [7]. From Karande, Mehta and Tripathi [7], one can conclude that
Ranking achieves ratio0 .
653 on bipartite graphs. Moreover, they constructed a hard instance in which
Ranking performsno better than 0 . . n is large. For Online Bipartite Matching , Karp et al. [8] showed that ranking achieves performanceratio 1 − e ; similarly, Aggarwal et al. [1] also showed that a modified version of ranking achievesthe same ratio for the node-weighted version of the problem.Sometimes very sophisticated mappings are used to relate different events, and produce LPs whoseasymptotic behavior is difficult to analyze. Mahdian and Yan [10] developed the technique ofstrongly factor-revealing LP. The idea is to consider another family of LPs whose optimal valuesare all below the asymptotic value of the original LP. Hence, the optimal value of any LP (usuallya large enough instance) in the new family can be a lower bound on the performance ratio. Theresults of [10] implies that for the Greedy Matching Game on bipartite graphs,
Ranking achievesperformance ratio 0 . Recent Attempts.
No attempts have been made in the literature to theoretically improve the0 . (cid:15) ratio for arbitrary graphs until two recent papers appeared in FOCS 2012. Poloczek andSzegedy [12] used a technique known as contrast analysis to analyze the MRG algorithm and gaveratio + ≈ . . .
75 for adaptivevertex-iterative algorithms. They also analyzed the
Ranking algorithm for a better performanceratio. Moreover, they used strongly factor-revealing LP to analyze the asymptotic behavior oftheir LP; we ran experiment on the LP described in their paper and could not reproduce the ratio0 .
56. On the contrary, we discovered that the optimal value of their original LP drops to 0 . n = 400. Hence, we do not believe strongly factor-revealing LPs can be used to analyzetheir original LP to give a ratio larger than 0 . Continuous LP.
Duality and complementary slackness properties of continuous LP were investi-gated by Tyndall [14] and Levinson [9]. Anand et al. [2] used continuous LP relaxation to analyzeonline scheduling.
Let [ n ] := { , , . . . , n } , [ a..b ] := { a, a + 1 , . . . , b } for 1 ≤ a ≤ b , and Ω be the set of all permutationsof the nodes in V , where each permutation is a bijection σ : V → [ n ]. The rank of node u in σ is σ ( u ), where smaller rank means higher priority. The
Ranking algorithm.
For the
Greedy Matching Game , the algorithm selects a permutation σ ∈ Ω uniformly at random, and returns a list L of unordered pairs according to the lexicographicalorder induced by σ . Specifically, given two pairs e and e (where for each i , e i = { u i , v i } and3 ( u i ) < σ ( v i )), the pair e has higher priority than e if (i) σ ( u ) < σ ( u ), or (ii) u = u and σ ( v ) < σ ( v ). Each pair of nodes in G ( V, E ) is probed according to the order given by L ; initially,all nodes are unmatched . In the round when the pair e = { u, v } is probed, if both nodes arecurrently unmatched and the edge e is in E , then each of u and v is matched , and they are eachother’s partner in σ ; moreover, if σ ( u ) < σ ( v ) in this case, we say that u chooses v . Otherwise, ifat least one of u and v is already matched or there is no edge between them in G , we skip to thenext pair in L until all pairs in L are probed.After running Ranking with σ (or in general probing with list L ), we denote the resulting matchingby M ( σ ) (or M ( L )), and we say that a node is matched in σ (or L ) if it is matched in M ( σ )(or M ( L )). Given a probing list L , suppose L u denotes the probing list obtained by removing alloccurrences of u in L such that u always remains unmatched. The following lemma is useful. Lemma 2.1 (Removing One Node.)
The symmetric difference M ( L ) ⊕ M ( L u ) is an alternatingpath, which contains at least one edge iff u is matched in L . Proof:
Observe that probing G with L u is equivalent to probing G u with L , where G u is exactlythe same as G except that the node u is labeled unavailable and will not be matched in any case.Hence, we will use the same L to probe G and G u , and compare what happens in each round to thecorresponding matchings M = M ( L ) and M u = M ( L u ). For the sake of this proof, “unavailable”and “matched” are the same availability status , while “unmatched” is a different availability status.We apply induction on the number of rounds of probing. Observe that the following invariants holdinitially. (i) There is exactly one node known as the crucial node (which is initially u ) that hasdifferent availability in G and G u . (ii) The symmetric difference M ( L ) ⊕ M ( L u ) is an alternatingpath connecting u to the crucial node; initially, this path is degenerate.Consider the inductive step. Observe that the crucial node and M ( L ) ⊕ M ( L u ) do not change ina round except for the case when the pair being probed is an edge in G (and G u ), involving thecrucial node w with another currently unmatched node v in G , and hence v is also unmatched in G u , as the induction hypothesis states that every other node apart from the crucial node has thesame availability in both graphs. In this case, this edge is added to exactly one of M and M u .Therefore, w is matched in both graphs (so no longer crucial), and v becomes the new crucial node;moreover, the edge { w, v } is added to M ( L ) ⊕ M ( L u ), which now is a path connecting u to v . Thiscompletes the inductive step.Observe that u is matched in M in the end, iff in some round an edge involving u must be addedto M but not to M u , which is equivalent to the case when M ⊕ M u contains at least one edge.The performance ratio r of Ranking on G is the expected number of nodes matched by the algorithmto the number of nodes in a maximum matching in G , where the randomness comes from the randompermutation in Ω. We consider the set U := Ω × V of instances ; an event is a subset of instances.An instance ( σ, u ) ∈ U is good if u is matched in σ , and bad otherwise. Perfect Matching Assumption.
According to Corollary 2 of [12] (and also implied by ourLemma 2.1), without loss of generality, we can assume that the graph G ( V, E ) has a perfect match-ing M ∗ ⊆ E that matches all nodes in V . For a node u , we denote by u ∗ the partner of u in M ∗ andwe call u ∗ the perfect partner of u . From now on, we consider Ranking on such a graph G withoutmentioning it explicitly again. Observe that for all σ ∈ Ω, ( σ, σ − (1)) is always good; moreover,the performance ratio is the fraction of good instances. Definition 2.1 ( σ u , σ iu ) For a permutation σ , let σ u be the permutation obtained by removing u from σ while keeping the relative order of other nodes unchanged; running Ranking with σ u means unning σ while keeping u always unavailable (or simply deleting u in G ). Let σ iu be the permutationobtained by inserting u into σ u at rank i and keeping the relative order of other nodes unchanged. Fact 2.1 (
Ranking is Greedy)
Suppose
Ranking is run with permutation σ . If u is unmatched in σ , then each neighbor w of u (in G ) is matched to some node v in σ with σ ( v ) < σ ( u ) . Similar to [12, Lemma 3], the following Fact is an easy corollary of Lemma 2.1, by observing thatif ( σ, u ) is bad, then M ( σ ) = M ( σ u ). Fact 2.2 (Symmetric Difference)
Suppose ( σ, u ) is bad, and ( σ iu , u ) is good for some i . Then,the symmetric difference M ( σ ) ⊕ M ( σ iu ) is an alternating path P with at least one edge, whereexcept for the endpoints of P (of which u is one), every other node in G is either matched in both σ and σ iu , or unmatched in both. Definition 2.2 ( Q t , R t and S t ) For each t ∈ [ n ] , let Q t be the good event that the node at rank t ismatched, where Q t := { ( σ, u ) : σ ∈ Ω , u = σ − ( t ) is matched in σ } ; similarly, let R t be the bad eventthat the node at rank t is unmatched, where R t := { ( σ, u ) : σ ∈ Ω , u = σ − ( t ) is unmatched in σ } .Moreover, we define the marginally bad event S t at rank t ∈ [2 ..n ] by S t := { ( σ, u ) ∈ R t : ( σ t − u , u ) / ∈ R t − } ; observe that S = R = ∅ .Given any ( σ, u ) ∈ U , the marginal position of u with respect to σ is the (unique) rank t such that ( σ tu , u ) ∈ S t , and is null if no such t exists. Note that for each t ∈ [ n ], Q t and R t are disjoint and | Q t ∪ R t | = n !. Definition 2.3 ( x t , α t ) For each t ∈ [ n ] , let x t = | Q t | n ! be the probability that a node at rank t is matched, over the random choice of permutation σ . Similarly, we let α t = | S t | n ! ; observe that − x t = | R t | n ! . Note that the performance ratio is n (cid:80) nt =1 x t , which will be the objective function of our minimiza-tion LP. Observe that all x t ’s and α t ’s are between 0 and 1, and x = 1 and α = 0. We deriveconstraints for the variables in the next section. In this section we define some relations between bad and good events to form LP constraints. Thehigh level idea is as follows. Suppose f is a relation between A and B , where f ( a ) is the set ofelements in B related to a ∈ A , and f − ( b ) is the set of elements in A related to b ∈ B . The injectivity of f is the minimum integer q such that for all b ∈ B , | f − ( b ) | ≤ q . If f has injectivity q , we have the inequality (cid:80) a ∈ A | f ( a ) | ≤ q | B | , which follows from counting the number of edges inthe bipartite graph induced by f on A and B . In our constructions, usually calculating | f ( a ) | isstraightforward, but sometimes special attention is required to bound the injectivity. x t − ≥ x t , t ∈ [2 ..n ] These constraints follow from Lemma 3.1 as the α t ’s are non-negative. Lemma 3.1 (Bad-to-Marginally Bad)
For all t ∈ [ n ] , we have − x t = (cid:80) ti =1 α i ; this impliesthat for t ∈ [2 ..n ] , x t − − x t = α t . roof: Fix t ∈ [ n ]. From the definitions of x t and α t , it suffices to provide a bijection f from R t to ∪ ti =1 S i . Suppose ( σ, u ) ∈ R t . This means ( σ, u ) is bad, and hence u has a marginal position t u ≤ t with respect to σ . We define f ( σ, u ) := ( σ t u u , u ) ∈ ∪ ti =1 S i . Surjective: for each ( ρ, v ) ∈ ∪ ti =1 S i , the marginal position of v with respect to ρ is some i ≤ t ;hence, it follows that ( ρ tv , v ) ∈ R t is bad, and we have f ( ρ tv , v ) = ( ρ, v ). Injective: if we have f ( σ, u ) = ( ρ, v ), it must be the case that u = v , σ ( u ) = t , and ρ = σ iu for some i ; this implies that σ must be ρ tv .Hence, | R t | = | ∪ ti =1 S i | = (cid:80) ti =1 | S i | , which is equivalent to 1 − x t = (cid:80) ti =1 α i , if we divide theequality by n ! on both sides. (cid:0) − t − n (cid:1) x t + n (cid:80) t − i =1 x i ≥ , t ∈ [2 ..n ] The monotone constraints require that the x t ’s do not increase. We next derive the evolving constraints that prevent the x t ’s from dropping too fast. Fix t ∈ [2 ..n ]. We shall define a relation f between ∪ ti =1 S i and ∪ t − i =1 Q i such that f has injectivity 1, and for ( σ, u ) ∈ S i , | f ( σ, u ) | = n − i + 1.This implies Lemma 3.2; from Lemma 3.1, we can express α i = x i − − x i (recall α = 0), andrearrange the terms to obtain the required constraint. Lemma 3.2 ( -to-( n − i + 1 ) Mapping) For all t ∈ [2 ..n ] , we have (cid:80) ti =1 ( n − i +1) α i ≤ (cid:80) t − i =1 x i . Proof:
We define a relation f between A := ∪ ti =1 S i and B := ∪ t − i =1 Q i . Let ( σ, u ) ∈ A be amarginally bad instance. Then, there exists a unique i ∈ [2 ..t ] such that ( σ, u ) ∈ S i . If we move u to any position j ∈ [ i..n ], ( σ ju , u ) is still bad, because i is the marginal position of u with respectto σ . Moreover, observe that M ( σ u ) = M ( σ ) = M ( σ ju ) for all j ∈ [ i..n ]. Hence, it follows thatfor all j ∈ [ i..n ], node u ’s perfect partner u ∗ is matched in σ ju to the same node v such that σ ( v ) = σ ju ( v ) ≤ i − ≤ t −
1, where the first inequality follows from Fact 2.1. In this case, we define f ( σ, u ) := { ( σ ju , v ) : j ∈ [ i..n ] } ⊂ B , and it is immediate that | f ( σ, u ) | = n − i + 1. Injectivity.
Suppose ( ρ, v ) ∈ B is related to some ( σ, u ) ∈ A . It follows that v must be matched to u ∗ in ρ ; hence, u is uniquely determined by ( ρ, v ). Moreover, ( ρ, u ) must be bad, and suppose themarginal position of u with respect to ρ is i , which is also uniquely determined. Then, it followsthat σ must be ρ iu . Hence, ( ρ, v ) can be related to at most one element in A .Observing that S = ∅ , the result follows from (cid:80) ti =1 ( n − i +1) | S i | = (cid:80) a ∈ A | f ( a ) | ≤ | B | = (cid:80) t − i =1 | Q i | ,since | S i | = n ! α i and | Q i | = n ! x i . x n + n (cid:80) ni =1 x i ≥ According to experiments, the monotone and the evolving constraints alone cannot give ratiobetter than 0.5. The boundary constraint is crucial to the success of our LP, and hence we analyzeour construction carefully. The high level idea is that we define a relation f between R n and Q := ∪ ni =1 Q i . As we shall see, it will be straightforward to show that | f ( a ) | = 2 n for each a ∈ R n ,but it will require some work to show that the injectivity is at most 3. Once we have establishedthese results, the boundary constraint follows immediately from (cid:80) a ∈ R n | f ( a ) | ≤ | Q | , because | R n | n ! = 1 − x n and | Q i | n ! = x i . Defining relation f between R n and Q . Consider a bad instance ( σ, u ) ∈ R n . We define f ( σ, u )such that for each i ∈ [ n ], ( σ, u ) produces exactly two good instances of the form ( σ iu , ∗ ).6or each i ∈ [ n ], we consider σ iu :1. if u is unmatched in σ iu : ( u and u ∗ cannot be both unmatched) R(1) : produce ( σ iu , u ∗ ) and include it in f ( σ, u ); R(2) : let v be the partner of u ∗ in σ iu ; produce ( σ iu , v ) and include it in f ( σ, u ).2. if u is matched in σ iu : R(3) : produce ( σ iu , u ) and include it in f ( σ, u );(a) if u ∗ is matched to u in σ iu : R(4) : produce ( σ iu , u ∗ ) and include it in f ( σ, u );(b) if u ∗ is matched to v (cid:54) = u in σ iu : R(5) : produce ( σ iu , v ) and include it in f ( σ, u );(c) if u ∗ is unmatched in σ iu : (all neighbors of u ∗ in G must be matched) R(6) : let v o be the partner of u ∗ in σ , produce ( σ iu , v o ) and include it in f ( σ, u ).Observe that for i ∈ [6], applying each rule R(i) produces exactly one good instance. Moreover, foreach i ∈ [ n ], when we consider σ iu , exactly 2 rules will be applied: if u is unmatched in σ iu , then R(1) and
R(2) will be applied; if u is matched in σ iu , then R(3) and one of { R(4) , R(5) , R(6) } willbe applied. Observation 3.1
For each ( σ, u ) ∈ R n , we have | f ( σ, u ) | = 2 n . Observation 3.2 If ( ρ, x ) ∈ f ( σ, u ) , then σ = ρ nu and exactly one rule can be applied to ( σ, u ) toproduce ( ρ, x ) . Bounding Injectivity.
We first show that different bad instances in R n cannot produce the samegood instance using the same rule. Lemma 3.3 (Rule Disjunction)
For each i ∈ [6] , any ( ρ, x ) ∈ Q can be produced by at most one ( σ, u ) ∈ R n using R(i) . Proof:
Suppose ( ρ, x ) ∈ Q is produced using a particular rule R(i) by some ( σ, u ) ∈ R n . We wishto show that in each case i ∈ [6], we can recover u uniquely, in which case σ must be ρ nu .The first 5 cases are simple. Let y be the partner of x in ρ . If i = 1 or i = 4, we know that x = u ∗ and hence we can recover u = x ∗ ; if i = 2 or i = 5, we know that y = u ∗ and hence we can recover u = y ∗ ; if i = 3, we know that u = x .For the case when i = 6, we need to do a more careful analysis. Suppose R(6) is applied to( σ, u ) ∈ R n to produce ( ρ, x ). Then, we can conclude the following: (i) in σ = ρ nu , u is unmatched,and u ∗ is matched to x ; (ii) in ρ , u is matched, u ∗ is unmatched, and x is matched.For contradiction’s sake, assume that u is not unique and there are two u (cid:54) = u that satisfy theabove properties. It follows that u ∗ (cid:54) = u ∗ and according to property (ii), in ρ , both u and u are matched, and both u ∗ and u ∗ are unmatched; hence, all 4 nodes are distinct. Without loss ofgenerality, we assume that ρ ( u ∗ ) < ρ ( u ∗ ). Let σ := ρ nu , and observe that σ ( u ∗ ) < σ ( u ∗ ).Now, suppose we start with σ , and consider what happens when u is promoted in σ resulting in ρ . Observe that u changes from unmatched in σ to matched in ρ , and by property (i), u ∗ changes7rom matched in σ to unmatched in ρ . From Fact 2.2, every other node must remain matched orunmatched in both σ and ρ ; in particular, u ∗ is unmatched in σ . However, x is a neighbor of both u ∗ and u ∗ (in G ), and σ ( u ∗ ) < σ ( u ∗ ), but x is matched to u ∗ in σ ; this contradicts Fact 2.1.Lemma 3.3 immediately implies that the injectivity of f is at most 6. However, to show a betterbound of 3, we need to show that some of the rules cannot be simultaneously applied to producethe same good instance ( ρ, x ). We consider two cases for the remaining analysis. Case (1): x is matched to x ∗ in ρ Lemma 3.4
For ( ρ, x ) ∈ Q , if x is matched to x ∗ in ρ , then we have | f − ( ρ, x ) | ≤ . Proof:
If ( ρ, x ) is produced using
R(1) , then x ∗ must be unmatched in ρ ; if ( ρ, x ) is producedby ( σ, u ) using R(2) , then x must be matched to u ∗ ( (cid:54) = x ∗ ) in ρ since x (cid:54) = u ; similarly, if ( ρ, x ) isproduced by ( σ, u ) using R(5) , then x ( (cid:54) = u ) must be matched to u ∗ ( (cid:54) = x ∗ ) in ρ .Hence, ( ρ, x ) cannot be produced by R(1) , R(2) or R(5) , and at most three remaining rules canproduce it. It follows from Lemma 3.3 that | f − ( ρ, x ) | ≤ Case (2): x is not matched to x ∗ in ρ Observation 3.3 (Unused Rule)
For ( ρ, x ) ∈ Q , if x is not matched to x ∗ in ρ , then ( ρ, x ) cannot be produced by applying R(4) . Out of the remaining 5 rules, we show that ( ρ, x ) can be produced from at most one of { R(2) , R(5) } ,and at most two of { R(1) , R(3) , R(6) } . After we show these two lemmas, we can immediatelyconclude from Lemma 3.3 that | f − ( ρ, x ) | ≤ Lemma 3.5 (One in { R(2) , R(5) } ) Each ( ρ, x ) ∈ Q cannot be produced from both R(2) and
R(5) . Proof:
Suppose the opposite is true: ( σ , u ) produces ( ρ, x ) according to R(2) , and ( σ , u )produces ( ρ, x ) according to R(5) . This implies that in ρ , x is matched to both u ∗ and u ∗ , whichmeans u = u . By Observation 3.2, this means σ = σ , which contradicts the fact that the same( σ, u ) ∈ R n cannot use two different rules to produce the same ( ρ, x ) ∈ Q . Lemma 3.6 (Two in { R(1) , R(3) , R(6) } ) Each ( ρ, x ) ∈ Q cannot be produced from all three of R(1) , R(3) and
R(6) . Proof:
Assume the opposite is true. Suppose ( σ , u ) produces ( ρ, x ) using R(1) ; then, x = u ∗ (hence, x is a neighbor of u in G ) and u is unmatched in ρ . Suppose ( σ , u ) produces ( ρ, x )using R(3) ; then, x = u is unmatched in σ , and matched in ρ . Suppose ( σ , u ) produces ( ρ, x )using R(6) ; then, u is matched in ρ , u ∗ is unmatched in ρ and x is a neighbor (in G ) of u ∗ .By Observation 3.2, all of u , u and u are distinct. In particular, observe that u = x ∗ = u ∗ (cid:54) = u ∗ ;hence, all of u , u and u ∗ are distinct (since u is matched in ρ , but the other two are not).Now, suppose we start from σ = ρ nx and promote x = u resulting in ρ . Observe that u changesfrom unmatched in σ to matched in ρ , and both u and u ∗ are unmatched in ρ . By Fact 2.2, atleast one of u and u ∗ is unmatched in σ ; however, both u and u ∗ are neighbors of x = u (in G ), which is unmatched in σ . This contradicts that fact that in any permutation, two unmatchednodes cannot be neighbors in G .We have finally finished the case analysis, and can conclude the f has injectivity at most 3, therebyachieving the boundary constraint. 8 .4 Lower Bound the Performance Ratio by LP Formulation Combining all the proved constraints, the following LP n gives a lower bound on the performanceratio when Ranking is run on a graph with n nodes. It is not surprising that the optimal value of LP n decreases as n increases (although our proof does not rely on this). In Section 4, we analyzethe continuous relaxation LP ∞ in order to give a lower bound for all finite LP n , thereby proving alower bound on the performance ratio of Ranking . LP n min n (cid:80) nt =1 x t s.t. x = 1 ,x t − − x t ≥ , t ∈ [2 ..n ] (cid:0) − t − n (cid:1) x t + n (cid:80) t − i =1 x i ≥ , t ∈ [2 ..n ] x n + n (cid:80) nt =1 x t ≥ ,x t ≥ , t ∈ [ n ] . LP n via Continuous LP ∞ Relaxation
In this section, we analyze the limiting behavior of LP n by solving its continuous LP ∞ relaxation,which contains both monotone and boundary condition constraints. We develop new duality andcomplementary slackness characterizations to solve for the optimal value of LP ∞ , thereby giving alower bound on the performance ratio of Ranking . To form a continuous linear program LP ∞ from LP n , we replace the variables x t ’s with a functionvariable z that is differentiable almost everywhere in [0 , LD ∞ contains a real variable γ , and function variables w and y , where y is differentiable almost everywhere in [0 , ∀ θ ” to denote “for almost all θ ”, which means for all but a measure zero set.It is not hard to see that x i corresponds to z ( in ), but perhaps it is less obvious how LD ∞ is formed.We remark that one could consider the limiting behavior of the dual of LP n to conclude that LD ∞ is the resulting program. We show in Section 4.2 that the pair ( LP ∞ , LD ∞ ) is actually a specialcase of a more general class of primal-dual continuous LP. However, we first show in Lemma 4.1that LP ∞ is a relaxation of LP n . LP ∞ min (cid:82) z ( θ ) dθ s.t. z (0) = 1 z (cid:48) ( θ ) ≤ , ∀ θ ∈ [0 , − θ ) z ( θ ) + 2 (cid:82) θ z ( λ ) dλ ≥ , ∀ θ ∈ [0 , z (1) + (cid:82) z ( θ ) dθ ≥ z ( θ ) ≥ , ∀ θ ∈ [0 , . LD ∞ max (cid:82) w ( θ ) dθ + γ − y (0)s.t. (1 − θ ) w ( θ ) + 2 (cid:82) θ w ( λ ) dλ + γ + y (cid:48) ( θ ) ≤ , ∀ θ ∈ [0 , γ − y (1) ≤ γ, y ( θ ) , w ( θ ) ≥ , ∀ θ ∈ [0 , . Lemma 4.1 (Continuous LP Relaxation)
For every feasible solution x in LP n , there exists afeasible solution z in LP ∞ such that (cid:82) z ( θ ) dθ = n (cid:80) nt =1 x t . In particular, the optimal value of LP n is at least the optimal value of LP ∞ . roof: Suppose x is a feasible solution to LP n . Define a step function z in interval [0 ,
1] as follows: z (0) := 1 and z ( θ ) := x t for θ ∈ (cid:0) t − n , tn (cid:3) and t ∈ [ n ]. It follows that (cid:82) z ( θ ) dθ = (cid:80) nt =1 (cid:82) tnt − n z ( θ ) dθ = n (cid:80) nt =1 x t . We now prove that z is feasible in LP ∞ . Clearly z (0) = 1 and z (cid:48) ( θ ) = 0 for θ ∈ [0 , \ { tn : 0 ≤ t ≤ n, t ∈ Z } . For every θ ∈ (0 , θ ∈ (cid:0) t − n , tn (cid:3) , and we have(1 − θ ) z ( θ ) + 2 (cid:82) θ z ( λ ) dλ = (1 − θ ) x t + 2 (cid:80) t − i =1 (cid:82) ini − n z ( θ ) dθ + 2 (cid:82) θ t − n z ( θ ) dθ = (1 − θ ) x t + n (cid:80) t − i =1 x i + 2 (cid:0) θ − t − n (cid:1) x t = (1 − t − n + ( θ − t − n )) x t + n (cid:80) t − i =1 x i ≥ (cid:0) − t − n (cid:1) x t + n (cid:80) t − i =1 x i ≥ , where the last inequality follows from the feasibility of x in LP n . The above inequality holds triviallyat θ = 0. For the last constraint, using the fact that (cid:82) z ( θ ) dθ = n (cid:80) nt =1 x t we have z (1) + (cid:82) z ( θ ) dθ = x n + n (cid:80) nt =1 x t ≥ , where the last inequality follows from the feasibility of x in LP n . We study a class of continuous linear program CP that includes LP ∞ as a special case. In particular, CP contains monotone and boundary conditions as constraints. Let K, L > A , B , C , F be measurable functions on [0 , D be a non-negative measurable function on[0 , . We describe CP and its dual CD , following which we present weak duality and complementaryslackness conditions. In CP , the variable is a function z that is differentiable almost everywherein [0 , CD , the variables are a real number γ , and measurable functions w and y , where y isdifferentiable almost everywhere in [0 , CP min p ( z ) = (cid:82) A ( θ ) z ( θ ) dθ s.t. z (0) = K (4.1) z (cid:48) ( θ ) ≤ , ∀ θ ∈ [0 ,
1] (4.2) B ( θ ) z ( θ ) + (cid:82) θ D ( θ, λ ) z ( λ ) dλ ≥ C ( θ ) , ∀ θ ∈ [0 ,
1] (4.3) z (1) + (cid:82) F ( θ ) z ( θ ) dθ ≥ L (4.4) z ( θ ) ≥ , ∀ θ ∈ [0 , . CD max d ( w, y, γ ) = (cid:82) C ( θ ) w ( θ ) dθ + Lγ − Ky (0)s.t. B ( θ ) w ( θ ) + (cid:82) θ D ( λ, θ ) w ( λ ) dλ + F ( θ ) γ + y (cid:48) ( θ ) ≤ A ( θ ) , ∀ θ ∈ [0 ,
1] (4.5) γ − y (1) ≤ γ, y ( θ ) , w ( θ ) ≥ , ∀ θ ∈ [0 , . Lemma 4.2 (Weak Duality and Complementary Slackness)
Suppose z and ( w, y, γ ) are fea-sible solutions to CP and CD respectively. Then, d ( w, y, γ ) ≤ p ( z ) . Moreover, suppose z and w, y, γ ) satisfy the following complementary slackness conditions: z (cid:48) ( θ ) y ( θ ) = 0 , ∀ θ ∈ [0 ,
1] (4.7) (cid:104) B ( θ ) z ( θ ) + (cid:82) θ D ( θ, λ ) z ( λ ) dλ − C ( θ ) (cid:105) w ( θ ) = 0 , ∀ θ ∈ [0 ,
1] (4.8) (cid:104) z (1) + (cid:82) F ( θ ) z ( θ ) dθ − L (cid:105) γ = 0 (4.9) (cid:104) B ( θ ) w ( θ ) + (cid:82) θ D ( λ, θ ) w ( λ ) dλ + F ( θ ) γ + y (cid:48) ( θ ) − A ( θ ) (cid:105) z ( θ ) = 0 , ∀ θ ∈ [0 ,
1] (4.10)( γ − y (1)) z (1) = 0 . (4.11) Then, z and ( w, y, γ ) are optimal to CP and CD , respectively, and achieve the same optimal value. Proof:
Using the primal and dual constraints, we obtain d ( w, y, γ ) = (cid:82) C ( θ ) w ( θ ) dθ + Lγ − Ky (0) ≤ (cid:82) (cid:104) B ( θ ) z ( θ ) + (cid:82) θ D ( θ, λ ) z ( λ ) dλ (cid:105) w ( θ ) dθ + Lγ − Ky (0) by (4.3)= (cid:82) (cid:104) B ( θ ) w ( θ ) + (cid:82) θ D ( λ, θ ) w ( λ ) dλ (cid:105) z ( θ ) dθ + Lγ − Ky (0) (*) ≤ (cid:82) [ A ( θ ) − F ( θ ) γ − y (cid:48) ( θ )] z ( θ ) dθ + Lγ − Ky (0) by (4.5)= (cid:82) A ( θ ) z ( θ ) dθ − (cid:82) y (cid:48) ( θ ) z ( θ ) dθ + (cid:104) L − (cid:82) F ( θ ) z ( θ ) dθ (cid:105) γ − Ky (0) ≤ (cid:82) A ( θ ) z ( θ ) dθ − (cid:82) y (cid:48) ( θ ) z ( θ ) dθ + z (1) γ − Ky (0) by (4.4)= (cid:82) A ( θ ) z ( θ ) dθ − y (1) z (1) + y (0) z (0) + (cid:82) z (cid:48) ( θ ) y ( θ ) dθ + z (1) γ − Ky (0) (**) ≤ (cid:82) A ( θ ) z ( θ ) dθ + ( γ − y (1)) z (1) by (4.1), (4.2) ≤ (cid:82) A ( θ ) z ( θ ) dθ by (4.6)= p ( z ) , where in (*) we change the order of integration by using Tonelli’s Theorem on non-negative mea-surable function g : (cid:82) (cid:82) θ g ( θ, λ ) dλdθ = (cid:82) (cid:82) θ g ( λ, θ ) dλdθ ; and in (**) we use integration by parts.Moreover, if z and ( w, y, γ ) satisfy conditions (4.7) – (4.11), then all the inequalities above holdwith equality. Hence, d ( w, y, γ ) = p ( z ); so z and ( w, y, γ ) are optimal to CP and CD , respectively. The performance ratio of
Ranking is lower bounded by the optimal value of LP ∞ . We analyze thisoptimal value by applying the primal-dual method to LP ∞ . In particular, we construct a primalfeasible solution z and a dual feasible solution ( w, y, γ ) that satisfy the complementary slacknessconditions presented in Lemma 4.2. Note that LP ∞ and LD ∞ are achieved from CP and CD bysetting K := 1, L := 1, A ( θ ) := 1, B ( θ ) := 1 − θ , C ( θ ) := 1, D ( θ ) := 2, F ( θ ) := .We give some intuition on how z is constructed. An optimal solution to LP ∞ should satisfy theprimal constraints with equality for some θ . Setting the constraint (1 − θ ) z ( θ ) + 2 (cid:82) θ z ( λ ) dλ ≥ z ( θ ) = 1 − θ . However this function violates the last constraint z (1)+ (cid:82) z ( θ ) dθ ≥ z is decreasing, we need to balance between z (1) and (cid:82) z ( θ ) dθ .The intuition is that we set z ( θ ) := 1 − θ for θ ∈ [0 , µ ] and allow z to decrease until θ reaches somevalue µ ∈ (0 , z ( θ ) := 1 − µ stays constant for θ ∈ [ µ, µ ,11ote that the equation z (1)+ (cid:82) z ( θ ) dθ = 1 should be satisfied, since otherwise we could constructa feasible solution with smaller objective value by decreasing the value of z ( θ ) for θ ∈ ( µ, − µ ) + (cid:16) − µ + µ (cid:17) = 1, that is, the value of µ ∈ (0 ,
1) is determined by theequation 3 µ − µ + 6 = 0.After setting z , we construct ( w, y, γ ) carefully to fit the complementary slackness conditions.Formally, we set z and ( w, y, γ ) as follows with their graphs on the right hand side: z ( θ ) = (cid:40) − θ, ≤ θ ≤ µ − µ, µ < θ ≤ w ( θ ) = (cid:40) − µ ) (5 − µ )(1 − θ ) , ≤ θ ≤ µ , µ < θ ≤ y ( θ ) = (cid:40) , ≤ θ ≤ µ θ − µ )5 − µ , µ < θ ≤ γ = − µ )5 − µ , where µ = −√ is a root of the equation3 µ − µ + 6 = 0 . θ µ − µγ z( θ ) y( θ )w( θ ) Figure 4.1: Optimal z and ( w, y, γ ) Lemma 4.3 (Optimality of z and ( w, y, γ ) ) The solutions z and ( w, y, γ ) constructed above areoptimal to LP ∞ and LD ∞ , respectively. In particular, the optimal value of LP ∞ is −√ ≈ . . Proof:
We list the complementary slackness conditions and check that they are satisfied by z and ( w, y, γ ). Then Lemma 4.2 gives the optimality of z and ( w, y, γ ).(4.7) z (cid:48) ( θ ) y ( θ ) = 0: we have y ( θ ) = 0 for θ ∈ [0 , µ ) and z (cid:48) ( θ ) = 0 for θ ∈ ( µ, (cid:104) (1 − θ ) z ( θ ) + 2 (cid:82) θ z ( λ ) dλ − (cid:105) w ( θ ) = 0: we have (1 − θ ) z ( θ ) + 2 (cid:82) θ z ( λ ) dλ − − θ ) +2( θ − θ ) − θ ∈ [0 , µ ) and w ( θ ) = 0 for θ ∈ ( µ, (cid:104) z (1) + (cid:82) z ( θ ) dθ − (cid:105) γ = 0: we have z (1)+ (cid:82) z ( θ ) dθ − − µ )+ (cid:16) − µ + µ (cid:17) − µ .(4.10) (cid:104) (1 − θ ) w ( θ ) + 2 (cid:82) θ w ( λ ) dλ + γ + y (cid:48) ( θ ) − (cid:105) z ( θ ) = 0: for θ ∈ [0 , µ ), we have(1 − θ ) w ( θ ) + 2 (cid:82) θ w ( λ ) dλ + γ + y (cid:48) ( θ ) − − µ ) (5 − µ )(1 − θ ) + 2 (cid:82) µθ w ( λ ) dλ + − µ )5 − µ + 0 − , and for θ ∈ ( µ, − θ ) w ( θ ) + 2 (cid:82) θ w ( λ ) dλ + γ + y (cid:48) ( θ ) − γ + y (cid:48) ( θ ) − − µ )5 − µ + − µ − . γ − y (1)) z (1) = 0: we have γ − y (1) = − µ )5 − µ − − µ )5 − µ = 0.Moreover, the optimal value of LP ∞ is (cid:82) z ( θ ) dθ = 1 − µ + µ = −√ ≈ . Proof of Theorem 1.1:
The expected ratio of
Ranking is lower bounded by the optimal valueof LP n . Hence, the theorem follows from Lemmas 4.1 and 4.3. References [1] Gagan Aggarwal, Gagan Goel, Chinmay Karande, and Aranyak Mehta. Online vertex-weightedbipartite matching and single-bid budgeted allocations. In
Proceedings of the Twenty-SecondAnnual ACM-SIAM Symposium on Discrete Algorithms , SODA ’11, pages 1253–1264. SIAM,2011.[2] S. Anand, Naveen Garg, and Amit Kumar. Resource augmentation for weighted flow-timeexplained by dual fitting. In
SODA , pages 1228–1241, 2012.[3] Jonathan Aronson, Martin Dyer, Alan Frieze, and Stephen Suen. Randomized greedy match-ing. ii.
Random Struct. Algorithms , 6(1):55–73, January 1995.[4] Martin E. Dyer and Alan M. Frieze. Randomized greedy matching.
Random Struct. Algorithms ,2(1):29–46, 1991.[5] Gagan Goel and Aranyak Mehta. Online budgeted matching in random input models withapplications to adwords. In
Proceedings of the nineteenth annual ACM-SIAM symposiumon Discrete algorithms , SODA ’08, pages 982–991, Philadelphia, PA, USA, 2008. Society forIndustrial and Applied Mathematics.[6] Gagan Goel and Pushkar Tripathi. Matching with our eyes closed. In
Proceedings of the2012 IEEE 53rd Annual Symposium on Foundations of Computer Science , FOCS ’12, pages718–727, Washington, DC, USA, 2012. IEEE Computer Society.[7] Chinmay Karande, Aranyak Mehta, and Pushkar Tripathi. Online bipartite matching withunknown distributions. In
Proceedings of the 43rd annual ACM symposium on Theory ofcomputing , STOC ’11, pages 587–596, New York, NY, USA, 2011. ACM.[8] R. M. Karp, U. V. Vazirani, and V. V. Vazirani. An optimal algorithm for on-line bipar-tite matching. In
Proceedings of the twenty-second annual ACM symposium on Theory ofcomputing , STOC ’90, pages 352–358, New York, NY, USA, 1990. ACM.[9] N. Levinson. A class of continuous linear programming problems.
Journal of MathematicalAnalysis and Applications , 16:73–83, 1966.[10] Mohammad Mahdian and Qiqi Yan. Online bipartite matching with random arrivals: anapproach based on strongly factor-revealing lps. In
Proceedings of the 43rd annual ACMsymposium on Theory of computing , STOC ’11, pages 597–606, New York, NY, USA, 2011.ACM.[11] Silvio Micali and Vijay V. Vazirani. An O ( √ V E ) algorithm for finding maximum matchingin general graphs. In
FOCS , pages 17–27. IEEE Computer Society, 1980.1312] Matthias Poloczek and Mario Szegedy. Randomized greedy algorithms for the maximummatching problem with new analysis.
Foundations of Computer Science, IEEE Annual Sym-posium on , 0:708–717, 2012.[13] Alvin E. Roth, Tayfun Sonmez, and M. Utku Unver. Pairwise kidney exchange. WorkingPaper 10698, National Bureau of Economic Research, August 2004.[14] William F. Tyndall. A duality theorem for a class of continuous linear programming problems.
Journal of the Society for Industrial and Applied Mathematics , 13(3):pp. 644–666, 1965.14 ppendix A: Issues with the Experimental Results on LP ( n ) We ran experiments on the LP described in Section III.B of [6] and obtained the following results.The source code (in MathProg format) is available at: http://i.cs.hku.hk/~algth/project/online_matching/issue.html .n = 20 0.5024n = 50 0.5010n = 100 0.5005n = 200 0.5003n = 300 0.5002n = 400 0.5001Table 1: Our Experimental Results on LP ( n ) in [6]Hence, it is impossible to use LP ( n ) to show that the performance ratio is larger than 0.5002. Appendix B: Hardness Result
Figure B.1: Double Bomb GraphIn this section, we show that we can slightly improve the hardness result in [7] by adjusting theparameter. An example of the graph is shown in B.1. We define the graph as follows:Let G be a bipartite graph over 2(3 + (cid:15) ) n vertices ( u i ’s and v i ’s). Define the edges by adjacencymatrix A . ( A [ i ][ j ] = 1 if there is an edge between u i and v j .) A [ i ][ j ] = i = j i ∈ [1 , n ] and j ∈ ( n, (2 + (cid:15) ) n ]1 if i ∈ ( n, (2 + (cid:15) ) n ] and j ∈ ((2 + (cid:15) ) n, (3 + (cid:15) ) n ]0 otherwiseWe run experiments on different n ’s and (cid:15) ’s and get the following result. n = 20 n = 50 n = 100 n = 200 n = 500 (cid:15) = 0 .
63 0 . . . . . (cid:15) = 1 − /e the ratio is minimized for this kind of graph. It is close to 0 ..