Online Bipartite Matching with Amortized O(log 2 n) Replacements

Aaron Bernstein, Jacob Holm, Eva Rotenberg
2019 Journal of the ACM  
In the online bipartite matching problem with replacements, all the vertices on one side of the bipartition are given, and the vertices on the other side arrive one by one with all their incident edges. The goal is to maintain a maximum matching while minimizing the number of changes (replacements) to the matching. We show that the greedy algorithm that always takes the shortest augmenting path from the newly inserted vertex (denoted the SAP protocol) uses at most amortized O(log 2 n)
more » ... ts per insertion, where n is the total number of vertices inserted. This is the first analysis to achieve a polylogarithmic number of replacements for any replacement strategy, almost matching the Ω(log n) lower bound. The previous best strategy known achieved amortized O( √ n) replacements [Bosek, Leniowski, Sankowski, Zych, FOCS 2014]. For the SAP protocol in particular, nothing better than the trivial O(n) bound was known except in special cases. Our analysis immediately implies the same upper bound of O(log 2 n) reassignments for the capacitated assignment problem, where each vertex on the static side of the bipartition is initialized with the capacity to serve a number of vertices. We also analyze the problem of minimizing the maximum server load. We show that if the final graph has maximum server load L, then the SAP protocol makes amortized O(min{L log 2 n, √ n log n}) reassignments. We also show that this is close to tight because Ω(min{L, √ n}) reassignments can be necessary. immediately upon arrival, and the matching cannot be changed later. Because of this irreversibility, the final matching might not be maximum; no algorithm can guarantee better than a (1 − 1/e)approximation [22] . But in many settings the irreversibility assumption is too strict: rematching a client is expensive but not impossible. This motivates the online bipartite matching problem with replacements, where the goal is to at all times match as many clients as possible, while minimizing the number of changes to the matching. Applications include hashing, job scheduling, web hosting, streaming content delivery, and data storage; see [8] for more details. In several of the applications above, a server can serve multiple clients, which raises the question of online bipartite assignment with reassignments. There are two ways of modeling this: Capacitated assignments. Each server s comes with the capacity to serve some number of clients u (s), where each u (s) is given in advance. Clients should be assigned to a server, and at no times should the capacity of a server be exceeded. There exists an easy reduction showing that this problem is equivalent to online matching with replacements [2] . A more formal description is given in Section 6.1. Minimize max load. There is no limit on the number of clients a server can serve, but we want to (at all times) distribute the clients as "fairly" as possible, while still serving all the clients. Defining the load on a server as the number of clients assigned to it, the task is to, at all times, minimize the maximum server load -with as few reassignments as possible. A more formal description is given in Section 6.2 √ n) result by Hopcroft and Karp [19], and the O(m 10/7 ) result by Madry [25] . The problem of online bipartite matchings with replacements was introduced in 1995 by Grove, Kao, Krishnan, and Vitter [13], who showed matching upper and lower bounds of Θ(n log n) replacements for the case where each client has degree two. In 2009, Chaudhuri, Daskalakis, Kleinberg, and Lin [8] showed that for any arbitrary underlying bipartite graph, if the client vertices arrive in a random order, the expected number of replacements (in their terminology, the switching cost) is Θ(n log n) using SAP, which they also show is tight. They also show that if the bipartite graph remains a forest, there exists an algorithm (not SAP) with O(n log n) replacements, and a matching lower bound. Bosek, Leniowski, Sankowski and Zych later analyzed the SAP protocol for forests, giving an upper bound of O(n log 2 n) replacements [6] , later improved to the optimal
doi:10.1145/3344999 fatcat:2krkte564jh4bheagk23jdvhx4