2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS)

Tight Bounds for Online

Ilan Reuven Cohen Binghui Peng§ David Wajc† CWI Columbia University CMU Email: [email protected] Email: [email protected]. Email: [email protected].

Abstract 3Δ —Vizing’s celebrated theorem asserts that any graph 2 colors. (This is tight.) Inspired by this result, Vizing of maximum Δ admits an edge coloring using at most [57] proved that any simple graph can be edge colored using Δ+1 colors. In contrast, Bar-Noy, Motwani and Naor showed Δ+1 colors. Clearly, Δ colors are necessary to edge color a over a quarter century ago that the trivial , which uses 2Δ − 1 colors, is optimal among online algorithms. graph, and for bipartite graphs multiple near-linear-time Δ- Their lower bound has a caveat, however: it only applies to edge-coloring algorithms are known [2, 12, 29]. For general low-degree graphs, with Δ=O(log n), and they conjectured graphs, several polytime (Δ + 1)-edge-coloring algorithms the existence of online algorithms using Δ(1 + o(1)) colors for are known [25, 47, 57], and this too is likely optimal, as ω n Δ= (log ). Progress towards resolving this conjecture was determining whether a general graph is Δ-edge-colorable is only made under stochastic arrivals (Aggarwal et al., FOCS’03 and Bahmani et al., SODA’10). NP-hard [32]. In addition to these optimal polytime algorithms, there adversarial We resolve the above conjecture for exists a simple quasilinear-time (2Δ − 1)-edge-coloring arrivals in bipartite graphs, for which we present a (1+o(1))Δ- edge-coloring algorithm for Δ=ω(log n) known a priori. greedy algorithm, which colors each edge with the lowest Surprisingly, if Δ is not known ahead of time, we show that color unused by its adjacent edges. The greedy algorithm e − no e−1 Ω(1) Δ-edge-coloring  algorithm exists. We then is implementable in many restricted models of computa- e o provide an optimal, e−1 + (1) Δ-edge-coloring algorithm tion, and improving upon its coloring guarantees, or even for unknown Δ=ω(log n). To obtain our results, we study them quickly in such models, has been the subject a nonstandard fractional relaxation for edge coloring, for of intense research. Examples include PRAM [41], NC and which we present optimal fractional online algorithms and a near-lossless online rounding scheme, yielding our optimal RNC [6, 38, 48], dynamic [7, 14] and distributed algorithms randomized algorithms. (e.g., [10, 15, 19, 24, 28, 50]). Keywords-online algorithms; edge coloring; online coloring; For online algorithms, little progress was made towards adversarial arrivals beating the greedy algorithm. The only positive results are under random-order edge arrival in “dense” bipartite multi- I. INTRODUCTION graphs. Specifically, under such stochastic arrivals, Aggarwal et al. [1] showed how to obtain a Δ(1+o(1)) edge coloring Edge coloring is the problem of assigning a color to of n-vertex if Δ=ω(n2) and Bahmani et al. each edge of a so that no two edges with a [4] showed how to obtain a 1.26Δ edge coloring under common endpoint have the same color. This classic problem, the milder assumption that Δ=ω(log n). The lack of even restricted to bipartite graphs, can be used to model progress for adversarial arrival order is likely explained by scheduling problems arising in sensor networks [27], switch the following theorem of Bar-Noy et al. [5]. routing [1], radio-hop networks [56] and optical networks [52], among others. Edge coloring can trace its origins back Theorem 1 ([5], informal). No online edge coloring algo- to the 19th-century works of Tait [55] and Petersen [51], rithm can 2Δ − 2 edge-color a graph. who studied this problem in the context of the . Shannon [54] later studied edge coloring in the However, the lower bound of Bar-Noy et al. requires a context of color coding wires in electrical units, and proved number of nodes n exponential in Δ: that is, it only holds that any multigraph G of maximum degree Δ=Δ(G) for some Δ=O(log n). Therefore, this lower bound can be admits a 3Δ -edge-coloring; i.e., a coloring using at most thought of as an additive lower bound of Δ+Ω(log n), rather 2 than a multiplicative lower bound of ≈ 2Δ. Put otherwise, − Work done in part while the author was at CMU and the University of it does not preclude a better-than-(2Δ 1) edge-coloring Pittsburgh. algorithm for Δ=Ω(logn) large enough. Indeed, Bar-Noy § Work done in part while the author was an undergraduate in Tsinghua et al. went so far as to conjecture that Δ(1 + o(1))-edge- University and visiting CMU as an intern. †Work done in part while the author was visiting EPFL. This work colorings are computable online for large enough Δ. was supported in part by NSF grants CCF-1527110, CCF-1618280, CCF- 1814603, CCF-1910588, NSF CAREER award CCF-1750808 and a Sloan Conjecture 2 ([5]). There exists an online algorithm which Research Fellowship. Δ(1 + o(1)) edge-colors graphs with Δ=ω(log n).

2575-8454/19/$31.00 ©2019 IEEE 1 DOI 10.1109/FOCS.2019.00010 Our focus: In this paper we study edge coloring under better-than-2 competitive ratios already for sufficiently large the adversarial online vertex-arrival model of Karp et al. Δ=O(log n). [39], where vertices on one side of a arrive Remark 2. We stated all our positive results for simple over time, with their edges to previously-arrived neighbors. graphs, though they hold more generally for any multigraph In this model, an online algorithm colors each edge e upon with maximum edge multiplicity o(Δ). (A necessary condi- arrival, immediately and irrevocably. Recall from above that tion – see Section XII). edge coloring in bipartite graphs has multiple applications, Our upper and lower bounds rely on a nonstandard frac- including in online settings. Indeed, such an application of tional relaxation for edge coloring. In particular, we present edge coloring bipartite graphs to switch routing (with input matching upper and lower bounds for this relaxation, and switches on one side and output switches on the other) was present a nearly-lossless online rounding of solutions to this precisely the motivation of Aggarwal et al. [1] to study relaxation. Using this relaxation, we show a complementary online edge coloring. The online edge coloring lower bound result: a separation between online edge coloring on general of [5] holds even for bipartite vertex arrivals. We show that and bipartite graphs, which we prove by showing a higher for such arrivals a large enough maximum degree indeed lower bound for the former (as well as a better-than-greedy allows to circumvent Bar-Noy et al.’s lower bound, and prove fractional algorithm for the latter). their conjecture. In particular, we present optimal algorithms Theorem 5. No fractional online edge coloring algorithm (up to o(1) terms) both for the known-Δ scenario, as well e is better than 1.606(> ) competitive for general graphs as for the stricter online problem where Δ(= OPT) is e−1 of unknown maximum degree Δ. On the other hand, there unknown a priori. exists a fractional edge coloring algorithm which is 1.777 A. Our Contributions competitive for general graphs of unknown maximum degree We provide the following optimal results for online edge Δ. coloring under adversarial vertex arrivals. For conciseness, To conclude, relying on our new relaxation, we present the we state our results in terms of competitiveness, calling an first online algorithms beating greedy under any adversarial α · Δ-edge-coloring algorithm α-competitive, as the optimal arrivals. In particular, we prove the conjecture of Bar-Noy edge coloring requires at least Δ colors. et al. and provide tight bounds for the well-studied model Our first result is an optimal algorithm for known large of Karp et al., both under known and unknown Δ. Δ. B. Techniques Theorem 3. There exists a (1 + o(1))-competitive ran- Novel Relaxation: The classic fractional relaxation domized edge coloring algorithm for bipartite graphs of for edge coloring asks to minimize xM , subject to known maximum degree Δ=ω(log n). A competitive M xe =1for every e ∈ E and xM ≥ 0 for every ratio of 1+√ o(1) is optimal – no randomized algorithm is Me matching M. That is, this relaxation fractionally uses inte- 1+o(1/ Δ) competitive for any Δ. gral matchings to cover each edge. For the online problem, Like all prior non-trivial online algorithms, the above this standard relaxation is not particularly useful, as the set of algorithm assumes a priori knowledge of a critical parameter matchings in the input graph is unknown a priori (since the of the input, namely Δ, which is the optimum number of edge set is unknown). Our first insight is a novel fractional colors needed to color the bipartite graph. However, in many relaxation which allows for more “myopic” assignments online scenarios, such assumptions are unreasonable. We upon vertex arrivals – its variables xe,c are the extent to show that removing this assumption results in a strictly which an edge e is colored c. Specifically, our relaxation harder problem, though here too greedy is suboptimal. integrally uses fractional matchings to cover each edge; i.e., Our main contribution is an optimal online algorithm for c xe,c =1. The goal is to minimize the number of non- unknown large Δ. zero fractional matchings used. This simple change to the e relaxation proves particularly useful in the online setting, Theorem 4. There exists an ( + o(1))-competitive ran- e−1 and underlies both our upper and lower bounds. We believe domized edge coloring algorithm for bipartite graphs of this relaxation may find applications to other incomplete- unknown maximum degree Δ=ω(log n). This is optimal e information models, such as dynamic, distributed, and local (up to o(1) terms) – no algorithm is better than e−1 computation algorithms. competitive for unknown Δ. Fractional Algorithms: Our relaxation admits a trivial Remark 1. For simplicity we stated our positive results 1-competitive solution: set xe,c =1/Δ, for each edge and in theorems 3 and 4 for Δ=ω(log n). More gener- c ∈ [Δ].IfΔ is known a priori, this solution can even ally, our algorithms’ competitive ratios are of the form be computed by an online fractional algorithm (which must c α + O( log n/Δ)) for some constant c ≥ 1 and α =1 fix the values xec for each edge e immediately on arrival). e or α = e−1 , respectively (see Section IV). Thus, we obtain By our lower bounds, for unknown Δ, other algorithms are

2 needed. A natural candidate is the greedy “water-filling” degree decrease at a rate of ≈ 1/α per color used. algorithm, which continuously increases an arriving edge’s How to sample such a number of fractional matchings, assignment for all colors minimizing the maximum load not too few and not too many, but just right, for unknown for either endpoint. However, this approach may yield an Δ is not immediate, however, as we do not even know how extremely unbalanced allocation. In particular, it can make many fractional matchings we will use (as Δ is unknown a vertex v have load of one in half of the colors used so and keeps increasing). To address this, we rely on the fact far and another vertex u have load of one in the other that Δ=ω(log n), allowing us to argue that sampling half. Adding an edge (u, v) would then force the algorithm each fractional matching (including matchings which are to open a new color – resulting in the trivial 2Δ − 1 currently trivial) a priori with appropriate probability p gives bound. (See Section VII-C.) Guided by our lower bounds for the following. We choose p = o(1) (guaranteeing few re- fractional algorithms, we derive simple but crucial changes colors) which also satisfies Δ · p = ω(log n) (in order to to the water-filling algorithm. First, we use an asymmetric have concentration up to (1 ± o(1)) factors on the number approach, where we pick colors to use based only on the load of non-trivial colors used), we color a ≈ 1 − p fraction of on the offline vertex. Secondly, in order to bound the load on the edges of high-degree vertices (i.e., ≈ Δ·p) edges, while the online vertex, we cap the value of each edge-color pair. using only ≈ αΔ·p colors, all with high probability. We then These changes yield bounded loads for the online vertex and compute another fractional edge coloring, but this time only a more balanced allocation, resulting in an optimal online on the residual uncolored subgraph. Repeatedly applying this fractional edge coloring. approach (computing another edge colorings, and rounding Online Rounding: Given an α-competitive fractional a sampled subset of its matchings) therefore allows us to online algorithm, our approach would be to use its αΔ decrease the maximum degree of the uncolored graph at the fractional matchings to obtain αΔ integral matchings, or required rate w.h.p. So, after αΔ colors are used this way, we colors, which leave the remaining uncolored subgraph hav- safely run greedy, yielding an (α + o(1))-competitive edge ing low maximum-degree (o(Δ)). Then using greedy on the coloring. Plugging in the optimal algorithms for known and remaining uncolored edges requires a further o(Δ) colors, or unknown Δ into this rounding scheme then yields our main (α+o(1))Δ colors overall. The question is how to compute positive results: optimal randomized online edge coloring αΔ colors based on the online fractional edge coloring. algorithms. One natural way to do so is to repeatedly round these frac- Lower Bounds: For our lower bounds (including the tional matchings online, using a near-lossless online round- tight ones for bipartite graphs) we formulate linear programs ing scheme for fractional matchings ([11]). Unfortunately, capturing constraints satisfied by any α-competitive frac- while maximum-degree vertices stand to be matched ≈ Δ tional online algorithms (for our relaxation) when run on times during such a rounding stage, a constant fraction of a tailor-made family of edge coloring instances. We then these matches would be along previously-matched (colored) present a family of feasible solutions to the dual program, edges. To see this, note that each edge has a constant whose value converges to the claimed lower bounds, imply- probability of being matched at least twice this way (since ing the lower bound on α by LP duality. (See [3] for more each edge has a constant probability of being colored more examples of this approach.) than once). We therefore employ a more elaborate approach, repeat- C. Related Work edly rounding subsets of multiple fractional edge colorings’ fractional matchings. Our guiding intuition is the following Online Edge Coloring: Several previous papers studied simple observation, that the load assigned to the edges of a edge coloring in online settings [1, 4, 5, 18, 20, 21, 45, 46]. maximum-degree vertex by an average fractional matching Mikkelsen [45, 46] studied the online edge coloring problem, among the αΔ matchings is precisely 1/α. Consequently, but with advice about the future. Favrholdt et al. [18, 20, 21] rounding a randomly-chosen fractional matching will result studied the “dual” problem of maximizing the number of in this vertex being matched with probability ≈ 1/α. If most edges colored using a fixed number of colors. Most relevant such matches are along previously-unmatched(uncolored) to our paper is the work of Motwani et al. [1, 4, 5]. edges, then this vertex’s degree in the uncolored graph will Aggarwal et al. [1] presented a (1 + o(1))-competitive decrease at the appropriate rate. However, as exhibited by algorithm for multigraphs with known Δ=ω(n2). Bahmani the previous approach, the probability of matching along et al. [4], inspired by the distributed algorithm of Panconesi an uncolored edge decreases when we use round many and Srinivasan [50], gave a 1.26-competitive algorithm for fractional matchings. Therefore, we only round a subset multigraphs with known Δ=ω(log n). Both algorithms of fractional matchings, small enough to not decrease the require random order edge arrivals, and fall short of the probability of v being matched along an uncolored edge guarantees of Conjecture 2 ([5]), either in the competitive (due to re-matches), yet large enough to apply tail bound ratio or in the requirement of Δ. In contrast, we consider and argue that all high-degree vertices have their uncolored vertex arrivals under the stricter adversarial arrival order,

3 for which we match these conjectured bounds for known Δ, The edge coloring relaxation we consider is thus the and also achieve optimal bounds for (harder) unknown Δ. following. We say a graph G(V,E) is fractionally k-edge- Online Matching: As edge coloring is the problem of colorable if there is a feasible solution to the linear program partitioning a graph’s edges into matchings, it is natural xe,c =1 ∀e ∈ E that our work relates to the long line of work on online c∈ k matching. This problem was introduced in the seminal work [ ] of Karp et al. [39], who presented the classic RANKING xe,c ≤ 1 ∀v ∈ V,c ∈ [k] 1 ev algorithm, which is (1 − e ) competitive for bipartite graphs under one-sided arrivals, and proved its optimality. A simpler xe,c ≥ 0 ∀e ∈ E,c ∈ [k] argument proves this algorithm’s optimality even among For any graph G, the minimal number of fractional colors fractional algorithms (see [22]). Alternative analyses of this k is equal to G’s maximum degree, Δ. We note that in algorithm were given over the years ([8, 13, 17, 30]) and bipartite graphs this relaxation and the classic relaxation are another optimal fractional algorithm with further applica- equivalent in an offline sense, in that any solution to one can tions, WATER FILLING, was given in [36]. Better bounds are be transformed to a solution of equal value to the other (for known under structural assumptions [9, 11, 49], and under general graphs, there can be a gap of one between the two, stochastic arrivals [23, 37, 43]. See the survey of Mehta [44] as exemplified by the ). In an online sense it for more on this problem and its extensions. Finally, we is not clear how to go from one relaxation to the other, and note the recent interest in online matching in general graphs so we will rely only on our new relaxation. [26, 33, 34, 58]. Our complementary results of Theorem 5 An LP Formulation.: For notational simplicity, rather for online edge coloring in general graphs are another step than discuss fractional algorithms using some k = α · Δ towards a better understanding of matching-theory-related colors, we will instead use k =Δcolors and relax the problems in online models in general graphs. second constraint to II. THE FRACTIONAL RELAXATION xe,c ≤ α ∀v ∈ V,c ∈ [Δ] ev In this section, we define the online fractional edge color- When dealing with fractional solutions, it is easy to “stretch” ing relaxation we study and discuss several of its properties. such a solution to obtain a feasible edge coloring (i.e., The Classic Fractional Relaxation: The classic relax- satisfying ev xe,c ≤ 1) while using α · Δ ≤α · Δ+1 ation for edge coloring has a nonnegative variable xM for colors, and this can be done online. Therefore, our goal will each matching M in G =(V,E), corresponding to the be to minimize α — the competitive ratio. (fractional) extent to which this matching is used in the Online Algorithms for the LP Relaxation: An online M solution. The objective is to minimize M x subject to fractional edge coloring algorithm must assign xe,c values ∈ Me xM =1for each edge e E. This relaxation for all edges e upon arrival, immediately and irrevocably. clearly lower bounds the chromatic index; i.e., the minimum For example, if Δ is known a priori, assigning each edge- number of matchings needed to cover G. A long-standing 1 color pair a value of Δ trivially yields a 1-competitive online conjecture of Goldberg and Seymour is that this relaxation fractional algorithm. If Δ is unknown, the situation is not is at most one lower than the chromatic index [31, 53]. (See so simple, as our lower bounds of Section V demonstrate. [42, Chapter 7.4] for more discussion of this relaxation.) In the following section we present our online fractional Unfortunately, this relaxation seems somewhat unwieldy in algorithms for unknown Δ, including an optimal algorithm an online setting, as we outline below. for bipartite graphs. The Relaxation We Study: The standard fractional edge coloring relaxation is difficult to use in online settings, where III. THE FRACTIONAL ONLINE ALGORITHM we do not know the edges which will arrive in the future, let Our LP relaxation asks to minimize the maximum load alone which matchings G will contain. This motivates us to of any vertex u in color c, Lu(c)  eu xe,c. The greedy study a more “myopic” relaxation, which allows us to make water-filling algorithm, upon arrival of edge e, increases all our (fractional) assignments immediately upon an edge’s xe,c for all colors c minimizing the maximum load of either arrival (due to one of its endpoints’ arrival). Specifically, endpoint of e. This natural algorithm is no better than the rather than relax the integrality of the extent to which we use integral greedy algorithm, however (see Section VII-A). In integral matchings, we relax the integrality of the matchings our algorithm, upon arrival of a vertex v, we run a variant used. That is, while the classic relaxation fractionally uses of the water-filling algorithm on each edge (u, v) in an integral matchings to color edges, our relaxation integrally arbitrary order. One difference in our algorithm compared to uses fractional matchings to color edges. As we will see, a the greedy one is that its greedy choice is asymmetric, and useful property of this relaxation is that it allows us to rely is only determined by the current loads of the previously- on machinery for rounding fractional matchings online. arrived endpoint, u. The second difference is that we set a

4 bound constraint of β/Δ for each color per edge, where considering a single vertex u). In addition, as σ will be clear Δ is the current maximal degree, and β is a parameter of from context, we will use color k as shorthand notation to the algorithm which will be determined later. The bound σ(k). Moreover, due to space constraints, we defer most constraints result in bounded load trivially for the online proofs to Section VIII. vertex, and by careful analysis, also for the offline vertex. We first observe that for our bounded water-filling algo- In addition, the bound constraints result in a more balanced rithm (as for its unbounded counterpart), the load of u is allocation, which uses more colors for each edge, but fewer monotone decreasing with respect to the σu order, and for colors overall. A formal description of our algorithm is given each step t, the increase in the load for i ≤ δt is monotone in Algorithm 1. Our algorithm is described as a continuous increasing in the σu order. process, but can be discretized easily. Observation 6. For all color indices i, and any t>A, Algorithm 1 Bounded Water Filling t t •  (i) ≥  (i +1). t t− t t− t Input: Online graph G(V,E) with unknown maximum de- •  (i) −  1(i) ≥  (i − 1) −  1(i − 1), for all i ≤ δ . gree Δ(G) under vertex arrivals, parameter β ∈ (1, 2). Output: Fractional edge coloring {xe,c | e ∈ E, c ∈ In our analysis, we focus on the critical colors at step T [Δ(G)]}. – colors whose load increased at step T and is higher than 1: (Implicitly) xe,c ← 0 for all e ∈ E,c ∈ N. the following color load. Formally, color k is critical with th T T −1 2: respect to vertex u and its T neighbor if  (k) > (k) for each arrival of a vertex v do T T 3: Δ ← max{current d(u) | u ∈ V }. and  (k) > (k +1). Clearly, in order to upper bound the /* Δ = current max. degree */ load at step T , it is sufficient to upper bound the load for k  k T ∈ critical colors k for T .IfweletV1 i  (i) be the 4: for each e=(u, v) E do =1T k  δ T 5: while c∈ xe,c < 1 do total load on colors 1, 2,...,k and V2 i=k+1  (i) be [Δ] T 6: let U := {c ∈ [Δ] | xe,c <β/Δ}. the total load on colors k +1,...,δ , we will upper bound /* “unsaturated” colors for e */ the load of color k by 7: let C := {c ∈ U | Lu(c)=minc∈U Lu(c)}. k T k /* “currently active” colors for e */ T V δ − V ∈ C  (k) ≤ 1 ≤ 2 , (1) 8: for all c do k k 9: increase xe,c continuously. /* update Lu(c),Lv(c),U and C */ where the first inequality is due to the monotonicity of the loads, and the second inequality is due to the total load T A. Basic properties of the algorithm being at most δ . Therefore, we will upper bound the load by proving a lower bound on the index of any critical color, Our water filling algorithm preserves important mono- and a lower bound on the total load after this index. tonicity properties on the loads of any previously-arrived The next lemma plays a key role in both lower bounds. vertex v. In particular, the order obtained by sorting colors We show that for any color k critical at step T and for all by their loads for v remains invariant following its future steps At−1(k), we have load of a color in a vertex with respect to this order; i.e., t we denote by u(i) the load of color σu(i) for vertex u t t−1 t t th  (i) −  (i)=β/δ ∀k T · − vertices in bipartite graphs). Next, we prove properties of δ (1 1/β). the load of a specific vertex u after its arrival (i.e., for steps Next, using Lemma 7 and some useful claims in Sec- t>Au), at which point the order σu is already set. For tion VIII we prove a lower bound on V k. ease of notation we omit the subscript u from variables , δ 2 and A whenever it will be clear from context (i.e., when Lemma 9. If k is a critical color at step T and k∗ ≥

5 max{k, δA}, then which assign at most some (small) value  to each edge- color pair, which we refer to as -bounded algorithms. (As δT k ≥ T − k∗ we shall see, the optimal fractional algorithms we will plug V2  (j)  (j) into this rounding scheme both satisfy this property.) We j=k+1 T now state our main technical result of this section: a nearly- ≥ · T − ∗ − δ lossless rounding process for bounded algorithms on graphs β δ k k log ∗ . k with high enough lower bound on Δ. Bounding the maximum load: Next, we use the previ- Theorem 15. For all α ∈ [1, 2] and  ≤ 1, if there exists an ous lemmas in order to bound the maximum load after an -bounded α-competitive fractional algorithm A for bipar- assignment of an edge. Specifically, we will bound the load tite graphs with unknown maximum degree Δ ≥ Δ ≥ 2/,  of u and v after coloring the edge (v, u), where v is the then there exists a randomized integral algorithm A which newly-arrived vertex. First, it is easy to bound the load of a is (α + O( 12 (log n)/Δ)-competitive w.h.p on bipartite vertex v for each color after its arrival, since we bound each graphs of unknown maximum degree Δ ≥ Δ ≥ c · log n Av ≤ edge-color pair’s value xe,c by β/δv β/Av at arrival of for some constant c. v (when it has Av neighbors). In the end of the section we show how to use this Av Av Observation 10. v (i) ≤ β for all i ∈ [δ ]. theorem to obtain a (1 + o(1))-competitive for known Δ. For now, we note that plugging in our optimal fractional We next use Lemma 9 and Equation (1) to bound the load 1 of previously-arrived vertex u. algorithm for unknown Δ into Theorem 15, we get an optimal randomized algorithm for edge coloring graphs with Au Lemma 11. If k>δu is a critical color at step T with unknown Δ. T ≤ β respect to u, then u (k) β log β−1 . e 12  Theorem 16. There exists an ( e−1 + O( (log n)/Δ ))-

Au competitive algorithm for n-vertex bipartite graphs G with Lemma 12. If k ≤ δ is a critical color at step T with  u unknown maximum degree Δ ≥ Δ ≥ c · log n for some respect to u, then T (k) ≤ β2 − β + β log 1 . u β−1 absolute constant c. Upper Bounding Algorithm 1’s Competitive Ratio: We Remark. The algorithm of Theorem 16 requires only a are now ready to bound the competitive ratio of Algorithm 1.   e lower bound Δ ≤ Δ for some Δ = ω(log n) in First, we show that Algorithm 1 is competitive for one- e e−1 order to output an ( + o(1)) · Δ coloring, and not sided bipartite graphs. That is, G(L, R, E) is a bipartite e−1 the exact value of Δ. Alternatively, our algorithm uses graph and the offline vertices L arrive before the algorithm e  ( e− +o(1))·max{Δ, Δ } colors for any unknown Δ, where starts (i.e., Au =0for all u ∈ L). 1 the multiplicative approximation ratio is clearly only worse e  Theorem 13. For bipartite graphs under one-sided arrivals, than ( e−1 + o(1)) for small Δ < Δ – in which case the { β } additive approximation term is only  . This result can Algorithm 1 is max β,β log β−1 competitive. Setting β = O(Δ ) e e therefore be read as an asymptotic approximation scheme, e−1 , we obtain an ( e−1 )-competitive algorithm. trading off between the additive term and the asymptotic Proof: We bound the load after coloring of edge (v, u), ∈ th competitive ratio. where v R is the T online neighbor of u. First, we bound To describe our rounding scheme, we need the following the load for any color i of v. By Observation 10,wehave Av Au online rounding scheme of bounded fractional matchings, v(i)=v (i) ≤ β. For vertex u,wehaveAu = δ =0. T β which motivates our study of bounded fractional edge col- Thus, by Lemma 11 we have that maxi  (i) ≤ β log . u β−1 orings. Finally, in Section VIII we bound our algorithm’s com- Lemma 17 (Per-Edge Guarantees [11]). For all  ∈ [0, 1], petitive ratio on general graphs, proving that it is better than there exists an online dependent rounding algorithm, MARK- greedy. ING, which if presented online with a feasible fractional bipartite matching x with an (a priori) guarantee maxe xe ≤ Theorem 14. For any graph, Algorithm 1 is β2 − β + M 1 , outputs a matching which matches each edge e with β log β−1 competitive. Setting β =1.586, we obtain a probability 1.777-competitive algorithm. 3 xe · 1 − 11  · log(1/) ≤ Pr[e ∈M] ≤ xe. IV. ONLINE ROUNDING OF FRACTIONAL EDGE COLORING 1Strictly speaking, our optimal fractional algorithm, Algorithm 1,isnot 2/Δ bounded. However, setting our initial lower bound on Δ to be Δ in In this section we show how to round fractional edge- Line 3 yields a 2/Δ -bounded solution without worsening the competitive coloring algorithms’ output online. Specifically, we will ratio. (This is equivalent to adding a dummy which does not increase round fractional edge colorings provided by algorithms the maximum degree.)

6 We now outline our rounding scheme, which consists Algorithm 2 Randomized Edge Coloring for Unknown Δ of phases, as follows. For each phase i, let Ui be the Input: Online n-vertex bipartite graph G(L, R, E) with uncolored graph at start of phase i. (Initially, U = G.)  1 Δ ≥ Δ ≥ c · logn, for c a constant TBD. We compute an α-competitive fractional edge coloring in Ui 12 Parameter p  (24 log n)/Δ(≤ 1/10). online. Upon the algorithm’s initialization, we sample each An -bounded fractional online edge-coloring algo- of the possible α · n fractional matchings of this fractional rithm A which is α competitive on graphs U with coloring, i.i.d with probability p. We then round and color Δ(U) ≥ 2/, for   (p4/12 log n). the sampled fractional matchings in an online fashion, as Output: Integral (α + O(p)) · Δ edge coloring, w.h.p. follows. Whenever a sampled fractional matching becomes 1: for all i, set Si ⊆ α·n to be such that each j ∈ α·n non trivial, we assign it a new color. Whenever a new vertex is in Si independently with probability p. v arrives, for each phase i in increasing order, we run the 2: for all i, denote by Ui the online subgraph of G not next step of MARKING for each of the sampled fractional colored during phases 1, 2,...,i− 1. matchings of phase i’s , and color all 3: for each arrival of a vertex v ∈ R do newly-matched edges with the color assigned to the relevant 4: for phase i =1, 2,..., (4/p)log(1/p) do fractional matching. Finally, we greedily color the remaining i 5: x( ) ← output of Algorithm A on current Ui. uncolored edges of v. Setting p = o(1) (guaranteeing few /* run next step of A */ re-colors) and also satisfying Δ · p = ω(log n) (in order to (i) 6: for j ∈Si with x = 0 do have concentration up to (1 ± o(1)) factors on number of j 7: if ci,j not set then colors used), this approach will use roughly p · α · Δ(Ui) th 8: set ci,j to next unassigned color index. colors for the i phase, while decreasing the uncolored ← (i) subgraph’s maximum degree by roughly p · Δ(Ui),ora 9: Mi,j output of MARKING on current xj . (1 − p) factor. Thus, using (1/p)log(1/p) phases yield an /* run next step of MARKING */ uncolored subgraph of maximum degree p · Δ (using α · Δ 10: if some e ∈ Mi,j previously uncolored then colors), which the greedy algorithm colors using 2p · Δ new 11: color e using color ci,j. colors. This implies Theorem 15. /* note: e  v */ 12: run greedy on uncolored edges of v, using colors A. Our Online Rounding Scheme not assigned during the phases. Our online rounding scheme, given an -bounded frac- tional edge-coloring algorithm A which is α competitive on graphs of maximum degree at least2/, for  = colors used. Repeating this for (4/p)log(1/p) phases, will 4  12  p /(12 log n), works as follows. Let p 24(log n)/Δ . therefore require (α + O(p))Δ colors and yield a subgraph  We use P (4/p)log(1/p) many phases. For phase i,we of maximum degree p · Δ, which we color greedily with S sample in advance a subset i of all possible color indices, O(p)Δ new colors, implying Theorem 15. S each taken into i with probability p. Let Ui be the subgraph To upper bound the number of colors used in phase i,we of edges not colored before phase i. When online vertex note that the number of non-trivial (i.e., not identically zero) ∈ v arrives, for each phase i [P ], we update a fractional fractional matchings we round in each iteration is clearly a (i) A i coloring x using Algorithm , based on v’s arrival in p-fraction of the (at most α·Δi ) non-trivial colors of x( ). ∈S (i) th Ui. For all sampled j i for which xj (the j fractional Therefore, by standard Chernoff bounds (Lemma 45), if Δi i matching of x( )) is non trivial, we use a distinct color ci,j to is large enough, the number of colors in the phase is small, color edges of a matching Mi,j computed online by running w.h.p. (i) MARKING on xj . Finally, all remaining uncolored edges of Lemma 18. If Δi ≥ (6 log n)/p3, then Ci, the number of v are greedily colored using new colors. This is Algorithm 2, colors used in phase i, satisfies below. 1 B. Analysis Pr [Ci ≥ αΔi · p · (1 + p)] ≤ . n2 We will study changes in the uncolored graph between Lemma 18 upper bounds the number of colors used in subsequent phases and the colors used during the phases. phase i by αΔi · p · (1 + p). Our main technical lemma,  For each i, let Δi Δ(Ui) be the maximum degree of below, whose full proof is deferred to Section IX, asserts the online graph not colored by phase 1, 2,...,i− 1. In this that these colors result in a decrease of roughly Δi · p in the section we will show that during each phase i, provided Δi is uncolored subgraph’s maximum degree during the phase. sufficiently large, Algorithm 2 uses some α·Δi ·p(1+O(p)) ≥ 4 new colors w.h.p., and obtain an uncolored subgraph Ui+1 Lemma 19. If Δi (24 log n)/p , then · − ± 2 ≤ · − − 2 ≤ 3 of maximum degree Δi+1 =Δi (1 p O(p )) w.h.p. This 1) Pr Δi+1 Δi (1 p 4p ) 3/n . 2 2 will imply a degree decrease at a rate of one per α + O(p) 2) Pr Δi+1 ≥ Δi · (1 − p +7p ) ≤ 6/n .

7 Proof Sketch: Let v be a vertex of degree di(v) ≥ number of colors used during the phases is Δi/2 in Ui. By Lemma 17 and the -boundedness of the ≤ · − fractional algorithm A (and some simple calculations), each Ci (α + p(1 + p)) (Δi Δi+1) i i edge e ∈ Ui is matched in Mi,j (j ∈Si) with probability (i) (i) ≤ (α + p(1 + p)) · Δ0 xe,j · (1 − O(p)) ≤ Pr[e ∈ Mi,j] ≤ xe,j. That is, we match · e in Mi,j with probability close to its sampled “load” for =(α + p(1 + p)) Δ. this color. By Chernoff bounds, as we sample each color On the other hand, after (1/p)log(1/p) phases we would of (i) with probability , the sampled load on ’s edges x p v get a final uncolored subgraph of maximum degree Δ · is i · ± w.h.p. So, by linearity and another /p /p d (v) p(1 O(p)) (1 − p)(1 )log(1 ) ≈ Δ · p w.h.p., and so the greedy Chernoff bound, the number of times v is matched during the · th 2 step of Line 12 would use at most 2Δ p colors. Overall, i phase satisfies Mv ≤ di(v)·p(1+O(p)) ≤ di(v)·p(1+ · 3 Algorithm 2 therefore uses at most (α+O(p)) Δ colors for , and v ≥ i · − ≥ i · − . 5  O(p)) M d (v) p(1 O(p)) d (v) p(1 O(p)) p = O( (log n)/Δ ) and Δ ≥ 24 log n. Our more involved bounds are due to the slightly looser bounds for Δi+1 in However, Mv also counts repeated matchings of edges terms of Δi in Lemma 19. See full proof in Section IX for of v, which do not contribute to v’s degree decrease in the details. uncolored subgraph. We therefore want to bound Rv – the Applications to Known Δ.: Algorithm 2 finds applica- number of times a previously-colored edge of v is matched tions for known Δ, too. In particular, by Lemma 19 we find during the phase. By Chernoff’s bound and -boundedness that if in each phase i we assign value 1/((1−p+7p2)i ·Δ) of the fractional algorithm, the load on each edge in the for each edge-color pair, then we obtain a feasible coloring sampled colors Si, which in expectation is precisely p,is w.h.p., requiring (1−p+7p2)i ·Δ colors when the maximum O(p) w.h.p. So, intuitively, we would expect Rv =Θ(p) · degree is at least (1 − p − 4p2)i · Δ, w.h.p.; i.e., this is a 2 Mv w.h.p., implying Rv =Θ(di(v) · p ) w.h.p. Of course, (1 + O(p2))-competitive fractional algorithm for uncolored as re-matches are not independent of matches, we cannot subgraph Ui. Replacing algorithm A in Algorithm 2 with simply multiply these expressions this way. However, relying this approach then yields, as in the proof of Theorem 15,an on the theory of negative association (see Section XIII-A), optimal randomized algorithm for known Δ. v i · 2 the intuitive claim that R =Θ(d (v) p ) w.h.p. can be 12 formalized. We conclude that the degree decrease of vertex Theorem 20. There exists a (1 + O( (log n)/Δ))- th v in the uncolored graph during the i phase is Mv −Rv = competitive algorithm for n-vertex bipartite graphs G with ≥ · di(v) · p · (1 − Θ(p)) w.h.p. Taking union bound over all known maximum degree Δ c log n for some absolute vertices v, the lemma follows. constant c. In this section we provided optimal online edge coloring Theorem 15 now follows from Lemma 18 and Lemma 19. algorithms for known and unknown Δ. In Section X we We sketch a proof of this theorem and defer its full proof improve the o(1) term in the 1+o(1) competitive ratio for to Section IX. known Δ. In the following section we present our lower bounds for known and unknown Δ, proving the optimality of Proof of Theorem 15 (Sketch): Clearly, Algorithm 2 our fractional and randomized algorithms, up to o(1) terms. colors all edges of G, due to Line 12. By definition, all V. L OWER BOUNDS color classes computed are matchings. As we shall show, the number of colors used during the phases is at most In this section we present our lower bounds for online (α + O(p)) · Δ w.h.p., and the greedy algorithm requires edge coloring. We start with by noting that for known Δ, some O(p) · Δ colors w.h.p., implying our claimed result. the competitive ratio of (1 + o(1)) we obtain is optimal (up 2 We outline this proof using a stronger claim than Lemma 19. to the exact o(1) term). Observation 21. No√ randomized online edge coloring al- Suppose instead of Lemma 19 we had that with high gorithm is (1 + o(1/ Δ))-competitive. probability Δi+1 =Δi · (1 − p). Then, by induction we i Proof: By [11], no online matching√ algorithm outputs a would have Δi =Δ· (1 − p) and in particular for all  matching of expected size (1−o(1/ Δ))·n in Δ-regular 2n- i ≤ (1/p)log(1/p) we would have Δi ≥ Δ · p ≥ Δ · p. 5 vertex bipartite graphs under one-sided arrivals. Given a (1+ Taking p ≥ (24 log n)/Δ would therefore imply that  )-competitive edge coloring algorithm, we can randomly Δi ≥ Δ ·p ≥ (24 log n)/p4, which in turn would allow us to i pick one of the (1 + ) · Δ color classes upon initialization appeal to union bound to prove that Δi =Δ·(1−p) for all i, and output that as our matching. For Δ-regular graphs on 2n or in other words Δi −Δi+1 =Δi ·p, and that the number of ≤ · · · colors used in each phase i is at most Ci α Δi p (1+p). 2A similar argument implies that 1+o(1) competitiveness is impossible Summing over all phases, this would imply that w.h.p., the on arbitrary multigraphs. See Section XII.

8 vertices, which have Δ · n edges, this results in a matching the following constraints. Δ·n of expected size  · =(1− O()) · n, from which we (1+√ ) Δ · ≤ ∀ ≤ ≤ conclude  =Ω(1/ Δ). k xkj α 1 j k. (2) Our main result of the section is a lower bound for e Moreover, since each offline vertex has one more edge unknown Δ of on the competitive ratio of any fractional e−1 during phase k, the average assignment to all edges should online algorithm for our relaxation (and by extension, for cover all edges of phase k, implying the following constraint. any randomized algorithm). To obtain this result, we derive linear constraints that any α-competitive fractional online k algorithm must satisfy and formulate these constraints as xkj ≥ 1 ∀k. (3) a family of linear programs. Specifically, we will rely on j=1 the modified fractional edge coloring formulation, where the Finally, as the load of all offline vertices (which have only competitive ratio α  maxv,c ev xe,c is the maximum one edge in phase ) for any color cannot exceed (and so load of any vertex v for color c, and xe,c ≥ 0 for all c ∈ [Δ] k j α neither can their average), we have the following constraint. and xe,c =0for all c>Δ, for Δ the current maximum degree. (See Section II.) We then construct feasible dual m solutions to these LPs, which by LP duality imply our xkj ≤ α ∀j. (4) claimed lower bounds. k=j

A. Matching Lower Bound for Bipartite Graphs Combining constraints (2)-(4), yields the following linear Our first lower bound concerns fractionally edge coloring program LPm, which lower bounds α. bipartite graphs. LPm  min α Theorem 22. No fractional online edge coloring algorithm k e ≥ ≤ ≤ is better than e−1 competitive on bipartite graphs under xkj 11k m one-sided arrivals. j=1 · ≤ ≤ ≤ ≤ Proof: Consider the following construction. For any m, k xkj α 1 j k m m we construct a bipartite graph Gm =(Lm,Rm,Em), where xkj ≤ α 1 ≤ j ≤ m Lm is the offline side and Rm is the online side. The offline k=j side, Lm, contains m! vertices, denoted by v , ··· ,vm . The 1 ! ≥ ≤ ≤ ≤ online side, Rm, arrives over m phases. In phase k (k ∈ xkj 01j k m. [m]), some m!/k vertices of degree k arrive. Each vertex We construct a series of dual feasible solutions to lower ui which arrives in phase k (i ∈ [m!/k]) neighbors offline ··· bound α. First, the dual LP is as follows. vertices vi,vm!/k+i, ,vm!(k−1)/k+i. We can see that each offline vertex has exactly one more neighbor in phase k and m the maximum degree in phase k is exactly k. See Figure 1 max yk for an illustrative example. The algorithm will have to be α k=1 competitive after each phase, as the adversarial sequence can m k m “terminate early”, after essentially presenting disjoint copies zkj + wj ≤ 1  of Gm for some m ≤ m. k=1 j=1 j=1 −k · zkj − wj + yk ≤ 01≤ j ≤ k ≤ m phase 3 yk,wj,zkj ≥ 01≤ j ≤ k ≤ m. phase 2 Let c(m)  m/e. We know that limm→∞ c(m)/m →  · − 1/e. Let t 1/(m +1+c(m) (Hc(m) Hm)), where phase 1 k Hk  1/k satisfies limm→∞ Hc m − Hm → offline L i=1 ( ) log(c(m)/m) →−1. We construct a feasible dual solution m Figure 1: The hard instance for bipartite graphs for =3. as follows: We let y1 = ···ym = t, and  x ≤ ≤ e∈phase k e,j t 1 j c(m) We use xkj  to denote the average assign- wj = |{e∈phase k}| 0 otherwise ment of color j to edges of phase k. The average load for online vertices of phase k for color · t/k c(m)+1≤ j ≤ k ≤ m j is k xkj, as each such online vertex has k edges. zkj = Consequently, as their average load is at most α,wehave 0 otherwise.

9 For any 1 ≤ j ≤ k ≤ m, we have that k ·zkj +wj = t = yk. bipartite and general graphs.3 We state this lower bound here For the first dual constraint, we have and defer its proof to Section XI. m m k Theorem 23. No fractional online edge coloring algorithm wk + zkj is better than 1.606 competitive in general graphs. k=1 k=1 j=1 m k − c(m) VI. CONCLUSION AND OPEN QUESTIONS = c(m) · t + · t k k=c(m) In this paper we present optimal online edge coloring · − · − · · − algorithms in bipartite graphs under one-sided vertex ar- = c(m) t +(m c(m)+1) t c(m) t (Hm Hc(m))) rivals, both when the maximum degree is known and when = m +1+c(m) · (Hc m − Hm · t =1. ( ) it is not. This work suggests a few follow up questions, The above is therefore a feasible dual solution, of value most prominent of which is to obtain optimal online edge coloring algorithms under vertex arrivals, or even under edge m m arrivals. Bar-Noy et al. [5] suggested a candidate algorithm yk = m · t = m + c(m) · (Hc m − Hm) for edge arrivals with known Δ, though this algorithm i=k ( ) 1 seems challenging to analyze. Is their candidate algorithm = . (1+o(1)) competitive? For unknown Δ, the problem seems c(m) · − 1+ m (Hc(m) Hm) much more challenging, even if one restricts oneself to 1 e fractional algorithms. When m →∞, this tends to − /e = e− . Consequently, 1 1 1 For vertex arrivals in general graphs we provided a better- limm→∞ LPm ≥ e/(e − 1), implying our claimed lower bound for fractional online edge coloring of bipartite graphs. than-greedy fractional algorithm. But can this algorithm be rounded without much loss? We note that our online round- Making the Graph Dense: The above construction ing approach of Algorithm 2 works under vertex arrivals in yields a sparse graph, as the number of vertices in this graph, general graphs too, though it requires an online dependent 1 ··· 1 ≈ rounding scheme for fractional matching in general graphs n = m!+m!(1 + 2 + + m ) m!logm, is exponential in its maximum degree, m. However, the following change with guarantees similar to those of Lemma 17. Such a tool yields a dense graph where the same lower bound still holds. would likely have applications to other online problems Fix any integer t>0, in the hard instance, we replace beyond edge coloring. each vertex with t identical copies, and correspondingly, Acknowledgements: The authors would like to thank connecting all copies of pairs (u, v) which are adjacent in Marek Elias, Seffi Naor and Ola Svensson for comments on the sparse graph. The obtained graph is still bipartite and the an earlier draft of this paper, which helped improve its pre- maximum degree and the number of vertices both increase sentation. The authors would also like to thank Lex Schrijver by a factor of t,tot · m and t · m!logm, respectively. for asking about extension of our results to multigraphs. Since we can take t to be arbitrarily large, the graph has APPENDIX maximum degree as high as Ω(n). In order to show that the lower bound still holds, we only need to slightly change VII. BAD EXAMPLES FOR NATURAL ALGORITHMS the meaning of xkj to be the average assignment of colors In this section we present bad examples for a variety of − − (j 1)t +1, (j 1)t +2,...jt during phase k. Constraints natural edge coloring algorithms for known and unknown (2)-(4) still hold with this new meaning in the denser graph. Δ. Thus, we conclude that Theorem 22 holds for graphs of arbitrarily high degree. A. Repeated Maximal Online Matching B. Lower Bound for General Graphs Here we give a bad example which shows that a family Next, we present a lower bound for general graphs. The of natural online algorithms, i.e., algorithms that iteratively lower bound is based on the construction for bipartite graphs, find a maximal matching, are no better than 2-competitive, but with more alterations. More specifically, recall that in the even on dense bipartite graphs under one-sided arrivals. construction for bipartite graphs, when the online vertices Notice that this family of algorithms includes the natural extension of the RANKING algorithm. I.e., iteratively find the of phase k arrive, we always connect them to k offline − vertices. However, in general graphs, we have more freedom. maximal matching via the optimal, (1 1/e)-competitive, online matching algorithm, RANKING – an approach which In phase k, there can be two possible futures: in one we ≈ − continue the sequence for bipartite graphs; in the other we at first glance one might guess yields an (e/(e 1))- connect all vertices which arrive during phases k, k +1,... competitive edge coloring. to the vertices which arrived in phase k − 1. This example 3In Section VIII-A, we show this example is a tight instance for yields a lower bound of 1.606, showing a separation between Algorithm 1, which is 1.777 competitive on it.

10 The bad example is as follows. The graph is made up the extreme approach of repeatedly running MARKINGΔ in of Δ stars with Δ − 1 leaves each, with the stars’ centers, Uc for c =1, 2,... until all edges are colored (i.e., without which are offline vertices, connected to a common vertex running greedy) requires at least Δ log Δ colors(!), even on v, which is the last offline vertex to arrive. It is easy to a star of maximum degree Δ whose center arrives last. see that that any algorithm that repeatedly uses a maximal C. Bad Examples for (Unbounded) Water Filling online matching for each color c =1, 2,... would color each star’s edges with colors 1, 2, ··· , Δ − 1 following the In this section, we will give bad examples to rule out star’s Δ − 1 leaves’ arrivals. The Δ edges of v therefore a natural candidate algorithm for fractional edge coloring; require a further Δ colors. Consequently, such an algorithm i.e., WATER FILLING. It is easy to see that we can make the would use 2Δ − 1 colors and is thus 2 competitive. Adding level of a color arbitrary large if we only do WATER FILLING 2 on one side. On the other hand, the following algorithm is n − Δ − 1 isolated dummy nodes with no edges, we get√ an example with n nodes and maximum degree Δ=O( n). a natural extension of this algorithm which only conducts WATER FILLING on the maximum of the two endpoints’ This example therefore rules out this natural√ family of online edge coloring algorithms for all Δ=O( n). loads for any edge (u, v) which arrives. More formally, the algorithm is as follows. B. Repeatedly Running Marking Our online rounding scheme for fractional edge colorings Algorithm 3 WATER FILLING  of Section IV applies MARKING to multiple fractional edge Input: Online graph G(V,E) with unknown Δ =Δ(G) colorings. For known Δ, this is done by running MARKING under vertex arrivals. 1  on some fractional matchings assigning values  , which we Output: Fractional edge coloring {xe,c | e ∈ E, c ∈ [Δ ]}. Δ  refer to as MARKINGΔ , for increasingly smaller value of Δ . 1: for each arrival of a vertex v do Here we show an example underlying the need for rounding 2: Δ ← max{current d(u) | u ∈ V }. multiple edge colorings. In particular, we show that simply /* Δ:=current max. degree */ iteratively coloring the matching output by MARKINGΔ on 3: for each e=(u, v) ∈ E do the uncolored subgraph – i.e., rounding one trivial edge 4: while c∈[Δ] xe,c < 1 do C { }} coloring – results in suboptimally many colors. 5: let := arg minc∈[Δ] max Lu(c),Lv(c) . To be precise, for c =1, 2,...,Δ, the algorithm con- /* set of “currently active” colors for e */ sidered computes Mc, the c-th color class, by running 6: for all c ∈ C do − MARKINGΔ in the subgraph not colored by the first c 1 7: increase xe,c continuously. c−1  \   C colors, Uc G c =1 Mc (and then reverts to some /* update Lu(c),Lv(c) and */ other algorithm on the uncolored graph, say greedy). For simplicity (though this is too good be true), let us assume Our first observation here is that WATER FILLING is 2 that MARKING matches each edge e with probability Δ competitive, even under edge arrivals. precisely 1/Δ in Mc if e ∈ Uc. Consider a star graph of degree Δ, with the star’s center arriving last. Denote by Claim 24. The WATER FILLING algorithm is at most 2 pe,c  Pr[e ∈ Mc] the probability that e is colored c. competitive under adversarial edge arrivals. Then, if we run MARKING for Δ phases on the uncolored Δ Proof: We only need to prove  ≤ 2 following updates graph, the probabilities pe,csatisfy the 1 due to the arrival of an edge (u, v). This inequality holds pe,c = · 1 −  pe,c . But this recurrence captures Δ c

11 which illustrates the weakness of WATER FILLING, and also VIII. OMITTED PROOFS OF SECTION III motivates the hard instance given in Section V. Here we provide the missing proofs of lemmas whose A Bad Example for General Graphs.: Consider a of proof was deferred from Section III, restated here for ease height n +1. The root locates in the first level. Each vertex of reference. in level k has n − k +1 children. In the online process, ≤ vertices arrive from level n +1 down to 1. See Figure 2 for Lemma 7. For a color k critical at step T , for all A (k), we have t t− t t  (i) −  1(i)=β/δ ∀k 0, then we can immediately derive Order n − 1 that t(k)=t(k +1), since k and k +1 are active n at the end of the iteration. But by Observation 6 we n +1 T T know that  (k)= (k +1) – a contradiction. Finally, Figure 2: The hard instance for (unbounded) water filling. t(i) − t−1(i) ≥ t(k +1)− t−1(k +1) for all k omit the proof here. δT · (1 − 1/β). Claim 25. The loads for all vertices in level k when they Proof: By Lemma 7, T (k) >T (k +1)and T (k) > first arrive are T − T T − T T  1(k) imply  (i)− 1(i)=β/δ , for k+1 ≤ i ≤ δ . • If (n − k +1) is odd, the load is T Hence, if k ≤ δ · 1 − 1 , we would obtain 2(n−k+1) ··· 2(n−k+1) ··· β (n−k+2) , , (n−k+2) , 0, , 0 . • If (n − k +1) is even, the load is k δT T T − T T − 2n−2k+1 ··· 2n−2k+1 1 ··· 1 ( (i) −  1(i)) = 1 − ( (i) −  1(i)) (n−k+1) , , (n−k+1) , (n−k+1) , , (n−k+1) . i i k When n is large and we set k =1, then the competitive =1 = +1 − T − T ratio goes to 2. =1 (δ k)β/δ T T < 1 − (β/δ ) · (δ /β) A Bad Example for Bipartite Graphs.: Notice that the bad example above is a bipartite graph, but vertices can =0, arrive from either side. Here we construct a slightly more which would imply T (k)=T −1(k) – contradicting the complicated bipartite example under one-sided arrivals on fact that k is critical. which WATER FILLING is 2 competitive. In the following In order to lower bound V 2, we first prove the following ··· ··· k claim, we use (a, b) to denote (a, ,a,b, ,b). two useful claims. / / Δ 2 Δ 2 Claim 27. If k is a critical color at step T , then for any Claim 26. For large enough Δ, there exists a sequence of j>kand for any S≥A, online vertices such that (2 − 4/Δ, 4/Δ) is achievable for T − S β offline vertices.  (j)  (j)= t . S (k). Assume not, then we have →···→(2 − 4/Δ, 0). δt t t− The initial state (1, 0) is achieved by connecting an offline 1= ( (i) −  1(i)) vertex v to Δ/2 online vertices one by one. (a) is reached i=1 by having an online vertex u neighbor Δ/2+1 offline δt t t vertices (1, 0) and one offline vertice (1 + 1/Δ, 1/Δ), = ( (i) −  (i − 1)) which can be produced in the former step. While (b) is i=k+1 t t achievable by connecting (2/Δ, 1+2/Δ) (online) and (1, 0) ≤ (δ − k) · β/δ (offline). Finally, we repeat the above process in (a)(b) to get T T ≤ (δ − k) · β/δ (2−4/Δ, 0). When Δ is large enough, we conclude that the water filling algorithm is exactly 2 competitive. < 1.

12 ∗ A Where that last inequality is due to k>(1 − 1/β)δT , k ≥ δ ≥ A), we have t − by Lemma 8. Therefore, by Lemma 7,wehave (j) T T t−1 t t δ δ j  (j)=β/δ for j ≤ δ . Consequently, ∗ − T − k · δ k  (j)  (j) = β j j k j k∗ δ T = +1 = +1 T S t t− δT  (j) −  (j)= ( (j) −  1(j)) − ≥ · j k t=S+1 β ∗ j T j=k +1 I{ t ≥ } t − t−1 T = δ j ( (j)  (j)) ≥ · T − ∗ − · δ β (δ k ) β k log ∗ t=S+1 k T β · T − ∗ − δ = t . = β δ k k log ∗ , S

Au Lemma 11. If k>δu is a critical color at step T with T ≤ β Next, we bound the total load on the colors after a critical respect to u, then u (k) β log β−1 . color k. Proof: As k is critical at step T , by Lemma 9, taking ∗ A Claim 28. If k is a critical color at step T , then for any k = k>δ ,wehave S≥A δT k T T T V2 =  (i) δ δ j T S δ − k i=k+1  (j) −  (j) ≥ β · . T δj δ j k j=S+1 T k = +1 ≥  (i) −  (i) i=k+1 T Proof: By Claim 27,wehave T δ ≥ β · δ − k − k log . k δT δT T S β  (i) −  (i) ≥ T 1 j In addition, by Lemma 8,wehavek ≥ δ · 1 − β . T δ i=k+1 i=k+1 S+1≤j≤δ δj ≥i Thus, we find that indeed, by Equation (1) δT T − k β T δ V2 =  (k) ≤ j k j S j δ = +1 δ ≥i≥k T − · T − − δT T δ β δ k k log k δ j δ − k ≤ = β · . k j T T j k∗ δ δ δ = +1 =(1− β) + β + β log k k ≤ β β log − . We are now ready to prove the main lower bound volume β 1 lemma.

∗ ≥ Au Lemma 9. If k is a critical color at step T and k Lemma 12. If k ≤ δu is a critical color at step T with max{k, δA}, then T ≤ 2 − 1 respect to u, then u (k) β β + β log β−1 .

T Proof: For ease of notation, in this lemma we will let δ T k ≥ T − k∗ Δ=δ . We will consider two cases and show the bound V2  (j)  (j) holds for both cases. j=k+1 δA/β ≤ k ≤ δA ∗ T Case 1: : By Lemma 9 with k = ≥ · T − ∗ − δ δA ≥ k,wehave β δ k k log ∗ . k T k ≥ · − A − δ V2 β Δ δ k log A . Proof: Substituting S with k∗ in Claim 28 (note that, δ

13 As a consequence, by Equation (1), we have Equation (1), we have that T (k) is at most

k k T Δ − V −  (k) ≤ 2 ≤ Δ V2 k k A A Δ − A − · · δ −k · − A − Δ ≤ Δ − β(Δ − δ )+βk log /k Δ (δ βk) β δA + β (Δ δ ) βk log δA δA ≤ Δ δA Δ k − Δ k Δ =(1 β) + β + β log A ≤ − 2 − 2 k k δ (1 β) + β + β β A + β log A A k δ δ δ − Δ Δ Δ k Δ k = ((1 β) A + β)+β log A =(1− β) + β2 + β − β2 + β(log +log ) k δ δ k δA k δA ≤ − Δ Δ k k Δ Δ β((1 β) A + β)+β log A = β2 + β +(β log − β2 )+(β log +(1− β) ) δ δ δA δA k k ≤ 2 − 1 1 β β β + β log − , ≤ β2 + β +(β log − β)+(β log − β) β 1 β β − 1 A δ ≤ 2 − 1 where the third inequality above holds because k β and = β β + β log − . Δ ≤ Δ ≤ − β 1 δA k β/(β 1), by Lemma 8 and the last inequality − Δ Δ holds because β((1 β) δA + β)+β log δA is maximized Δ − Finally, we will need the following simple inequalities for when δA =1/(β 1) (as can be verified by differentiating Δ our analysis. with respect to x = δA ). Case 2: k ≤ δA/β: Note that after the arrival of ∈ ≤ 2 − 1 Fact 29. For β (1, 2) we have β β β + β log β−1 , vertex u, the color load is at most β, by Observation 10. β 2 1 as well as β log β− ≤ β − β + β log β− . We may safely assume that A ≥ βk, since we can always 1 1 k Proof: increase A to βk without increasing volume in V2 (which we aim to lower bound), by Observation 10. For both inequalities, we rely on x − 1 ≥ log(x) for all x ≥ 1 to obtain the claimed inequalities. For the first, we Δ k have V = Δ(i) 2 1 i k 2 − − = +1 β β + β log − β Δ Δ β 1 A δA A =  (i)+ ( (i) −  (i)) 2 − 1 − = β β + β log − β i=k+1 i=k+1 β 1 Δ = β ((β − 1) − 1 − log (β − 1)) A Δ δ + ( (i) −  (i)) ≥ 0. i=k+1 A δ j For the second inequality, we have δ − k ≥ (A − βk)+ β · j 2 1 β j A δ β − β + β log − β log = +1 β − 1 β − 1 · − A − Δ = β(β − 1 − log β) + β Δ δ k log A δ ≥ A 0. A δ − k ≥ (A − βk)+(δ − A) · β · δA A Δ + β · Δ − δ − k log (5) A. Tight Example for Bounded Water Filling δA A − Here we give a tight instance for Algorithm 1 in general ≥ A − · · δ k · − A − Δ (δ βk) β A + β (Δ δ ) βk log A . graphs, showing our analysis in Section III-A is tight. We δ δ use the same construction shown in Theorem 23. Moreover, The first inequality holds by Observation 10, Claim 27 and we assume that the state is “old” until phase k =(β − 1)n. ∗ A Lemma 9 with k = δ ≥ βk ≥ k. The second inequality We only consider the case when b is sufficiently large. For j A holds since for j>A, δ ≥ δ . For the last inequality, sub- sufficiently large t, where t

14 Meanwhile, the color status for vertex ut is roughly Proof: For our proof, we will require the following fact. 1 t 0 i ≤ (1 − β )t ut (i)= 1 ∈ − − 2 ≥ − · β (1 − β )t

15 by Lemma 19 and Fact 30,wehavePr[Δi+1 ≥ Δi ·  = p, we obtain exp(−p/4) | A] ≤ Pr[Δi ≥ Δi·(1−p+7p2) | A] ≤ 6/n2. +1 ≥ ≥ E · Therefore, we find that the final uncolored subgraph U Pr[e p(1 + p)]=Pr[e [e] (1 + p)] has maximum degree Δ(U) ≤ Δ · p, as the probability p · p2 ≤ exp − Pr[Δ(U) ≥ Δ · p] is at most 3p3/(12 log n) − 4 ≤ ≥ · − · =exp( 4logn)=1/n . Pr[Δ (4/p)log(1/p) Δ exp( p/4 (4/p)log(1/p) )]  Similarly, as noted above, E[v]=p · di(v). Moreover, as ≤ ≥ · − i Pr (Δi+1 Δi exp( p/4)) x( ) is a feasible fractional matching, we have |Lv,j|≤1 i for all j. So, by Chernoff bounds (Lemma 45), with  = p,  ≤ ≥ · − we obtain Pr (Δi+1 Δi exp( p/4)) A +Pr[A] i 2 Pr[|v − E[v]|≥p · di(v)] ≤ n · 6/n2 +3/n =Pr[| Lv,j − E[Lv,j]|≥p · E[Lv,j]] =9/n. j j · di(v) · p · p2 Consequently, the greedy step of Line 12 uses a further 2Δ p ≤ 2exp − colors, and so Algorithm 2 is an (α+56p)-competitive online 3 edge coloring algorithm. Δi · p · p2 ≤ 2exp − 6 A. Progress in degree decrease ≤ 2exp(−3logn) In this section we will show that each phase i of Al- ≤ 2/n3. gorithm 2 with Δi ≥ 24(log n)/p3 decreases the maximum degree of the uncolored graph by a 1/(1−p±O(p2)) factor. That is, we will prove Lemma 19. As outlined in Section IV, We will now want to bound the number of times a vertex is our general approach will be to bound the number of times matched during a phase. We will rely on Lemma 31 together each near-maximum-degree vertex v in Ui is matched during with the following lemma. the phase and the number of times it is matched without Lemma 32. Let x be a fractional matching with maxe xe ≤ having an edge colored. p4/(12 log n). Then for each edge e, MARKING run with For the remainder of this section, we will need the input x outputs a matching M which matches each edge e following random variables. First, for any vertex v and index with probability i,weletdi(v) denote v’s degree in the uncolored subgraphs (i) (i) ∈S · − ≤ ∈M ≤ Ui. Moreover, for each edge e we let Le,j =xj if j i xe (1 3p) Pr[e ] xe (i) (i) and zero otherwise, and similarly Lv,j  Le,j.We ev Proof: The upper bound on Pr[e ∈M] is true for all refer to the above as the load of edge e and vertex v in (i) (i) x. For the lower bound, we have that by Lemma 17,as color j of phase i. Finally, we denote by e  L j e,j p ∈ [0, 1/10] and as we may safely assume n ≥ 2 (otherwise (i)  (i) and v j Lv,j the load of the edge e and vertex v in the problem is trivial), we have that the probability of e the sampled colors of phase i. Clearly, as each color index j belonging to M is at least is in Si with probability p, and as each edge is fractionally (i) matched exactly once, we have that E[e ]=p and therefore Pr[e ∈M] (i) E · 3 [v ]=di(v) p. The following lemma asserts that these ≥ xe · (1 − 11p p · log(12 log n/p3)/12 log n) variables are concentrated around their mean. In all notation, ≥ · − 3 we omit i, which will be clear from context. xe (1 11p3p log(1/p)/12 log n + p) 3 ≥ xe · (1 − 11p 3(1/e)/12 log n + p) p ∈ [0, 1] Lemma 31. If Δi ≥ (24 log n)/p3, then 3 ≥ xe · (1 − 11p 3/(e · 12 log 2) + p) n ≥ 2 1) for each edge e we have Pr[e ≥ p(1 + p)] ≤ 1/n4, 3 and ≥ xe · (1 − 11p 3/(e · 12 log 2) + 1/10) p ≤ 1/10 ≥ 2) for each vertex v of degree di(v) Δi/2 in Ui we ≥ xe · (1 − 3p). have Pr[|v − di(v) · p|≥di(v) · p2] ≤ 2/n3. E Proof: As noted above, [e]=p. Moreover, by Relying on Lemma 31.2 and Lemma 32, we obtain the the (p3/12 log n)-boundedness of f we have that e = following bounds on Mv, the number of times v is matched ∈ j Le,j is the sum of bounded independent variables Le,j during the ith phase. [0,p3/12 log n]. So, by Chernoff bounds (Lemma 45) with

16 Lemma 33. If Δi ≥ (24 log n)/p4, for each vertex v with with  = p, we obtain degree at least di(v) ≥ Δi/2, then Mv, the number of times v is matched during the ith phase, satisfies Pr[Mv ≤ di(v) · p(1 − 5p) | A] ≤ Pr[Mv ≤ di(v) · p(1 − p)(1 − 3p)(1 − p) | A] 1) Pr[Mv ≥ di(v) · p(1 + 4p)] ≤ 3/n4. 3 ≤ Pr[Mv ≤ E[Mv | A] · (1 − p) | A] 2) Pr[Mv ≤ di(v) · p(1 − 5p)] ≤ 3/n . E | · 2 ≤ − [Mv A] p j exp Proof: Let Mv be an indicator variable for the event that 2 v is matched in Mi,j. For any instantiation of the variables di(v) · p(1 − p)(1 − 3p) · p2 ≤ exp − Le,j, Lemma 32 implies that each edge e is matched in Mi,j 2 with probability Le,j ·(1−3p) ≤ Pr[e ∈ Mi,j] ≤ Le,j, and so 3 − − j 12(log n)p (1 p)(1 3p) by linearity we have Lv,j ·(1−3p) ≤ Pr[M ] ≤ Lv,j. In par- ≤ exp − v 2p4 ticular, if we let A  [di(v)·p(1−p) ≤ v ≤ di(v)·p(1+p)], ≤ exp (−3logn) then, by linearity we have both E[Mv | A] ≤ di(v)·p(1+p) ≤ 3 as well as E[Mv | A] ≥ di(v)·p(1−p)(1−3p) ≥ di(v)·p(1− 1/n , j 4p). Now, clearly, Mv = j∈Si Mv is the sum of binary random variables. Moreover, for any subset Si sampled, j where the second to last inequality holds for all p ≤ 1/10. these {Mv | j ∈Si} are independent, as all matchings Mi,j for j ∈Si are computed using independent copies of From the above we obtain the second claim, as MARKING. By Chernoff’s upper tail bound (Lemma 45) with  =2p, we thus obtain Pr[Mv ≤ di(v) · p(1 − 5p)] 3 ≤ Pr[Mv ≤ di(v) · p(1 − 5p) | A]+Pr[A] ≤ 3/n .

Pr[Mv ≥ di(v) · p(1 + 4p) | A] ≤ Pr[Mv ≥ di(v) · p(1 + p)(1 + 2p) | A] The above lemma asserts that the number of times a vertex th ≤ v ≥ E v | · | v of high degree in Ui is matched during the i phase is Pr[M [M A] (1 + 2p) A] i · E[Mv | A] · 4p2 Θ(d (v) p). The following lemma relies on the theory of ≤ exp − Negative Association (NA, see Section XIII-A) to show that 3 all but O(di(v) · p2) matches of v during this phase result di(v) · p(1 − 4p) · 4p2 ≤ exp − in an edge of v being colored. 3 (48 log n)p3(1 − 4p) Lemma 34. If Δi ≥ (24 log n)/p3, for each vertex v with ≤ exp − ≥ 3p4 degree at least di(v) Δi/2, the number of times v ≤ exp (−4logn) p ≤ 1/5 is matched along a previously colored edge, Rv, satisfies Pr[Rv ≥ 2di(v) · p2] ≤ 2/n2. ≤ 1/n4. Proof: Fix the realizations of Le,j for all e, j. For any edge e  v, let Me,j  1[e ∈ Mi,j] be an indicator for edge e being matched in iteration j of phase i.By  Therefore, we obtain the first claim, as the 0-1 rule, since at most one edge e v is in any matching, for each j the binary variables {Me,j | e  v} are NA. On the other hand, for j = j the joint distributions {Me,j | e  v} and {Me,j | e  v} are independent. Thus, by closure of NA distributions under independent Pr[Mv ≥ di(v) · p(1 + 4p)] union (Property 1), the {Me,j | j ∈Si,e  v} are NA. ≤ Pr[Mv ≥ di(v) · p(1 + 4p) | A]+Pr[A] By closure of NA distributions under monotone increas- ≤ 3/n3. ing functions of disjoint variables (Property 2), if we let Re  j Me,j ·min{1, j

17 of NA variables (see (39)) that Proof: For each vertex v, the decrease in v’s degree ⎡ ⎤ ⎡ ⎤ in the uncolored subgraph during the ith phase, denoted by  − ⎣ ⎦ ⎣ ⎦ Dv di(v) di+1(v), is precisely the number of times v E Me,j · Me,j ≤ E [Me,j] · E Me,j is matched and its matched edge is colored. That is, in the j j

≤ E[e | A] · E[e | A] The first claim then follows by union bound over all ≤ p2(1 + p)2. maximum degree vertices v in Ui. 2 Pr[Δi ≤ Δi · (1 − p − 3p )] Therefore, by linearity of expectation, E[Rv]= +1 E ≤ · 2 2 ev [Re] di(v) p (1 + p) .Now,as ≤ Pr[di+1(v) ≥ ≥ 3 di(v) Δi/2 12(log n)/p and as Rv = e Re v: di(v)=Δi is the sum of binary NA variables, we can upper bound v 2 R ≤ Δi · (1 − p − 3p )] using the upper multiplicative Chernoff bound of Lemma 42 √ ≤ 3 with  = p to obtain 3/n . √ 2 2 Now, we let λ  p(1 − 7p) and note that (1 − λ) · Δi ≥ Pr[Rv ≥ di(v) · p (1 + p) (1 + p) | A] i ≤ i ≤ − 2 2 Δ /2, since p 1/2. All vertices v of degree d (v) (1 di(v) · p (1 + p) · p · ≤ ≤ − · ≤ exp − λ) Δi in Ui clearly have di+1(v) di(v) (1 λ) Δi.On 3 the other hand, for every v with di(v) ≥ (1−λ)·Δi ≥ Δi/2, ≤ −12 log n ≤ 1 we have by lemmas 33 and 34 that exp 2 . 3 n ≥ − · √ Pr[di+1(v) (1 λ) Δi] Observing that for p ≤ 1/10 we have 2 ≤ (1+p)2(1+ p), ≤ Pr[di+1(v) ≥ (1 − λ) · di(v)] we find that =Pr[di(v) − di+1(v) ≤ di(v) · λ] 2 Pr[Rv ≥ 2di(v) · p | A] ≤ · √ =Pr[Dv di(v) λ] ≤ ≥ · 2 2 | Pr[Rv di(v) p (1 + p) (1 + p) A] =Pr[Dv ≤ di(v) · p(1 − 7p)] 2 ≤ 1/n . ≤ Pr[Mv ≤ di(v) · p(1 − 5p)]+Pr[Rv ≥ di(v) · p · 2p] ≤ 3 Now, by Lemma 31.1 we have for every e  v that 6/n . ≥ ≤ 3 Pr[e p(1 + p)] 1/n and so by union bound we have The second claim then follows by union bound over all ≤ · 3 2. We therefore conclude that indeed Pr[A] n 1/n =1/n vertices v of degree di(v) ≥ (1 − λ) · Δi in Ui, recalling 2 that − , since Pr[Rv ≥ 2 · di(v) · p ] λ = p(1 7p) 2 ≤ v ≥ · i · | Pr[Δi ≥ (1 − λ) · Δi] Pr[R 2 d (v) p A]+Pr[A] +1 ≤ 2 2/n . ≤ Pr[di+1(v) ≥ (1 − λ) · Δi] v: di(v)≥(1−λ)·Δi ≤ 2 Lemma 19, restated below for ease of reference, follows 6/n . from lemmas 33 and 34 and union bound of relevant subsets of vertices. X. IMPROVED o(1) TERMS FOR KNOWN Δ Lemma 19. If Δi ≥ (24 log n)/p4, then In this section we present an improved algorithm for ≤ · − − 2 ≤ 3 1) Pr Δi+1 Δi (1 p 4p ) 3/n . known Δ. Recall that for the known Δ regime, using ≥ · − 2 ≤ 2 2) Pr Δi+1 Δi (1 p +7p ) 6/n . our online rounding scheme of Theorem 15 we obtained

18 a 1+O( 12 (log n)/Δ)-competitive algorithm (see Theo- a tight (up to o(Δ)) bound d on the uncolored graph’s rem 20). In this section we will show how to decrease maximum degree for each phase,√ we divide the Δ coloring this competitive ratio to 1+O( 4 (log n)/Δ). That is, we iterations into phases of  = Δlogn iterations each, improve the o(1) term when Δ=ω(log n). during which we use the same upper bound. As  = o(Δ) We now turn to describing our approach, starting with and  = ω(log n), this gives us sharply concentrated upper an offline description. Iterating over c ∈ [Δ], we compute bounds di+1 on the resulting uncolored graph’s maximum and color a matching Mc in the uncolored subgraph G \ degree at the end of each phase i, which in turn serves as c−1  c=1 Mc . We then color the remaining uncolored subgraph a tight upper bound for the next phase. This results in the with new colors using the greedy algorithm. This approach desired rate of decrease in the uncolored graph’s maximum can be implemented online, by iteratively running online degree, namely 1 − o(1) per iteration. Greedy thus runs matching algorithms on the relevant uncolored subgraphs on a subgraph of maximum degree o(Δ). Our 1+o(1) to compute and color matchings. More concretely, when a competitive ratio follows. vertex v arrives, we iterate over c ∈ [Δ] and update Mc in c−1 A. The Improved Algorithm \  the current uncolored graph G c=1 Mc , as follows. We run the next step of the online matching algorithm used to We now present our online edge coloring algorithm, starting with an offline description. Our algorithm consists of compute Mc in the current uncolored graph after v’s arrival in this subgraph. We then color v’s newly-matched edge Δ iterations, equally divided into Δ/ log n phases. During (if any) using color c. Finally, we run steps of the greedy each iteration of phase i, we color a matching output by algorithm on the remaining uncolored edges of v. MARKINGdi run on Ui – the uncolored√ subgraph prior to  − · − For our analysis, we will analyze the above algorithm phase i, for di Δ i ( 8  log n). After all phases, according to its offline description. Since the greedy al- we run greedy with new colors, starting with Δ+1.Inthe gorithm requires a number of colors linear in its input online implementation, after each online vertex v√’s arrival, graph’s maximum degree, our objective will be to reduce the for phase i =1, 2,..., we run the next step of  = Δlogn independent runs of MARKINGdi in Ui, color newly-matched uncolored subgraph’s maximum degree to o(Δ) w.h.p. after  computing and coloring the first Δ matchings. In particular, edges and update Ui for i >iaccordingly. We then this will require us to match each maximum-degree vertex greedily color v’s remaining uncolored edges with new in G with probability roughly one for each of these Δ colors. The algorithm’s pesudocode is given in Algorithm 4. matchings. One way of matching vertices v of degree Δ in the uncolored subgraph with probability roughly one is Algorithm 4 Improved Algorithm for Known Δ to guarantee each edge e  v a probability of roughly Input: Online bipartite graph G(L, R, E) with maximum 1 Δ of being matched. An online matching algorithm which degree Δ=ω(log n). does just this is obtained from Lemma 17 applied to the Output: Integral√ (1 + o(1))Δ edge coloring, w.h.p. 1  trivial fractional matching which assigns a value of Δ to 1: let  Δlogn . √ phase length each edge. We will refer by MARKINGd to the application 2: let di  Δ − i · ( − 8  log n) for i ∈ [0, Δ/]. of MARKING to the trivially-feasible fractional matching degree upper bound for each phase 1 assigning xe =  = d for each edge in a graph of (known) 3: for all i, denote by Ui the online subgraph of G not maximum degree at most d. colored by colors [i · ]. 4: for each arrival of a vertex v ∈ R do Corollary 35. Algorithm MARKINGd is an online matching 5: for phase i =0, 1,...,Δ/−1 do algorithm which in graphs of maximum degree at most d 6: for colors c ∈ [i ·  +1, (i +1)· ] do outputs a matching M which matches each edge e with 7: Mc ← output of copy c of MARKINGd on probability i current Ui. 1 3 1 · 1 − 11 (log d)/d ≤ Pr[e ∈M] ≤ . /* run next step of MARKINGdi */ d d 8: if some e ∈ Mc is previously uncolored then The first natural approach given Corollary 35 is to itera- 9: color e using color c. tively run MARKINGΔ. However, as shown in Section VII-B, /* note: e  v */ this approach is suboptimal. Instead, we will increase the 10: run greedy on all uncolored edges of v, using new probability of high-degree vertices in the uncolored subgraph colors starting from Δ+1. to have an edge colored, by running MARKINGd with a tighter upper bound d than Δ for the uncolored graph’s maximum degree for each phase. Unfortunately, upon arrival B. Analysis of some vertex v, we do not know the uncolored graph’s The crux of our analysis is that for each phase i,we maximum degree for all phases, as this depends on future have di ≥ Δ(Ui) w.h.p. Consequently, the final uncolored arrivals and random choices of our algorithm. To obtain subgraph after the Δ iterations (and colors) has maximum

19 degree at most d / = o(Δ), so greedily coloring this sum of these  binary variables satisfies Δ ⎡ ⎤ subgraph requires a further o(Δ) colors. The following (i+1)· lemma asserts that if di ≥ Δ(Ui), then di+1 ≥ Δ(Ui+1), ⎣ ⎦ Pr Xc ≤  − 6  log n − 2 log n w.h.p. c i· = +1 √ ∈ − ≤ 2( 2 log n)2 Lemma 36. For all i [0, Δ/ 1],ifΔ(Ui) di, then ≤ exp − 3 Pr[Δ(Ui+1) >di+1] ≤ 1/n .  =1/n4. Proof: If Δ(Ui) ≤ di − , the claim is trivial, as then Put otherwise, v’s degree in the uncolored subgraph di+1 ≥ di −  ≥ Δ(Ui) ≥ Δ(Ui+1). We therefore focus √ decreases during phase by less than − − on the case di −  ≤ Δ(Ui) ≤ di. For this latter case, √ √ i  6  log n · − with probability at most 4. we will rely on the fact that for all i ≤ Δ/,wehavedi = 2 log n> 8  log n 1/n √ √ / Δ−i·(−8  log n) ≥ (Δ/)·8  log n>3Δ3/4 log1 4 n. Thus, as v has degree at most Δ(Ui) in Ui by definition, we find that vertex v’s degree in Ui+1, denoted by Dv, satisfies Vertices of degree less than Δ(Ui) −  ≤ di − 

20 t w.h.p. implies that the uncolored subgraph following the Furthermore, We use yk,j to denote the average assignment Δ/ phases has maximum degree at most of color j to edges between Vk and Vt when the state transitions from “old” to “new” in phase t. (I.e., this is the d / =Δ−Δ/·( − 8  log n) Δ average assignment of color j to edges of phase k>t, for ≤  +(Δ/) · 8  log n t the phase at which the transition occurred.) / / / / ≤ Δ1 2 log1 2 n +8Δ3 4 log1 4 n Again, as each edge between a Vt vertex and its neighbor / / in Vk (k>t) must be fractionally colored, we have ≤ 9Δ3 4 log1 4 n. k t The greedy algorithm therefore colors the remaining un- yk,j ≥ 1 ∀tt), then m!/kt vertices arrive and the i algorithms’ analyses do not require the graph to be simple, k t t ··· t vertex, vi , will neighbor vi ,vm!/kt+i, vm!(k−1)/kt+i.At as our analysis implies a bound on the maximum load after the end of phase k, the adversary decide whether to switch each edge has its value increased, and the relevant bounds state to “new”. Notice that the state can only transition from do not require there to be no parallel edges. “old” to “new". Randomized Algorithms.: For multigraphs, we “merge” Again, we let xkj denote the average assignment of color parallel edges into a single edge. When running MARKING j to edges of phase k, but this time only if the state is “old” on some fractional matching, we have a merged edge’s during this phase. The following constraints still hold for fractional assignment be the sum of its constituent edges’ the same reason as Constraints (2) and (3) for the bipartite fractional assignment. If each edge has multiplicity a suf- hard instance of Theorem 22. ficiently small o(Δ) term, this would assign each edge a k value of o(1). By the properties of MARKING (Lemma 17), xk,j ≥ 1 ∀k. (6) this implies that when we round a fractional matching x j=1 to compute a matching M, each edge e is matched in M m with probability xe · (1 − o(1)) ≤ Pr[e ∈M] ≤ xe. Our xi,j ≤ α ∀j. (7) arguments carry through, though with possibly worse o(1) k=j terms.

21 We note that the above stipulation that each edge have 1) Independent Union. If X1,X2,...,Xn are NA, bounded multiplicity is necessary in order to obtain (1 + Y1,Y2,...,Ym are NA, and {Xi}i are independent of 4 o(1)) competitiveness for known Δ. {Yj}j, then X1,X2,...,Xn,Y1,Y2,...,Ym are NA. 2) Concordant monotone functions. Let f1,f2,...,fk : Observation 38. No algorithm is (1 + o(1)) competitive on n R → R be functions, all monotone increasing or all multigraphs of arbitrary multiplicity. monotone decreasing, with the fi(X ) depending on Proof: By [11], no online matching algorithm outputs disjoint subsets of the {Xi}i. Then, if X1,X2,...,Xn a matching of expected size c · n in 2-regular 2n-vertex are NA, so are f1(X ),f2(X ),...,fk(X ). bipartite graphs under one-sided arrivals, for some constant Negative association implies several useful properties, c<1. Given an input online 2-regular graph, we simulate including the applicability of Chernoff-Hoeffding type the online arrival of a multigraph with k copies of each bounds [16] (we elaborate on this below). In addition, NA edge of the input (simple) graph, to obtain a 2k-regular clearly implies pairwise negative correlation. More gener- multigraph with each edge having multiplicity k. Given a ally, NA implies the stronger notion of negative orthant (1 + )-competitive edge coloring algorithm for multigraphs dependence. of maximum degree Δ=2k, we can randomly pick one of Definition 40. A joint distribution X ,X ,...,Xn is said the (1 + ) · 2k color classes upon initialization and output 1 2 to be Negative Upper Orthant Dependent (NUOD), if for all that matching. For 2-regular graphs on 2n vertices, which n x ∈ R it holds that have 2·n edges, this results in a matching in the multigraph kn 2 i ≥ i ≤ i ≥ i (which has 2kn edges) of expected size (1+)·2k = n/(1+), Pr[ X x ] Pr[X x ], from which we conclude  =Ω(1). i∈[n] i∈[n] and Negative Lower Orthant Dependent (NLOD) if for all XIII. USEFUL PROBABILISTIC INEQUALITIES x ∈ Rn it holds that For completeness, we cite here some useful probabilistic Pr[ Xi ≤ xi] ≤ Pr[Xi ≤ xi]. inequalities and notions of negative dependence, starting i∈[n] i∈[n] with the latter. A joint distribution is said to be Negative Orthant Dependent A. Negative Association and Other Negative Dependence (NOD) if it is both NUOD and NLOD. Properties. Lemma 41 (NA variables are NOD ([16, 35])). If In our analysis we rely on several notions of negative X1,...,Xn are NA, then they are NOD. dependence between random variables. In particular, one In our analysis we will prove some scaled Bernoulli notion we will rely on is the notion of negative association, random variables are NUOD. To motivate our interest in introduced by Khursheed and Lai Saxena [40] and Joag-Dev this form of negative dependence, we note that for binary and Proschan [35]. NUOD variables X1,X2,...,X n, we have that for each set Definition 39 (Negative Association [35, 40]). A joint I ⊆ [n], Pr[ i∈I Xi =1]≤ i∈I Pr[Xi =1]. As shown by distribution X1,X2,...,Xn is said to be negatively asso- Panconesi and Srinivasan [50, proof of Theorem 3.2, with ciated (NA) if for any two functions f,g both monotone λ =1], this property implies that the moment generating increasing or both monotone decreasing, with f(X ) and function of the sum of the Xi is upper bounded by the g(X ) depending on disjoint subsets of the Xi, f(X ) and moment generating function of the sum of independent g(X ) are negatively correlated; i.e., copies of the Xi variables. A simple extension of their argument shows the same holds if the Xi are NUOD scaled E[f(X ) · g(X )] ≤ E[f(X )] · E[g(X )]. Bernoulli variables. As in [50], following the standard proofs of Chernoff-Hoeffding type bounds, this upper bound on Clearly, independent random variables are NA. Another the moment generating function implies the applicability class of NA distributions is captured by the zero-one rule. of the following upper tail bounds to the sum of NUOD This rule asserts that if X ,X ,...,Xn are zero-one random 1 2 scaled Bernoulli variables “as though these variables were variables whose sum is always at most one, Xi ≤ 1, i independent”. then X1,X2,...,Xn are NA (see [16]). Additional, more complex, NA distributions can be “built” from simpler NA Lemma 42 (Chernoff Bound for NUOD Bernoulli Variables, distributions using the following closure properties. [50]). Let X = i Xi be the sum of binary NUOD random ∈ ≥ (P1) variables X1,X2, ..., Xn. Then, for any  [0, 1] and R E[X] 4Aggarwal et al. [1] showed that one cannot even achieve 5/4 − − · R competitiveness in multigraphs with unbounded edge multiplicities, though Pr[X>(1 + δ) · R] ≤ exp . under the possibly harder adversarial edge arrival model. 3

22  Lemma 43 (Bernstein’s Inequality for NUOD Scaled Proof: Let Bi = Ai ∧ j0, i i i −a2 Pr[X>E[X]+a] ≤ exp . by standard union bound. But then, we find that the above 2(σ2 + aM/3) is at most ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ In addition we will use the following simple coupling ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ argument, stated here for completeness. Pr Ai ∧ Aj = Pr Ai Aj · Pr Aj i j