1 Problem Statement
Consider a bipartite graph , where and are the left and right vertices, respectively, and is the set of edges.
The online bipartite matching problem introduced by Karp, Vazirani and Vazirani  is the following: The graph is initially unknown. In iteration , for , vertex arrives, along with its adjacent edges (which are unknown from the outset). The algorithm needs to decide which neighbor of (if any) is matched to; this decision is irrevocable. The objective is to maximize the cardinality of the obtained matching.
A simple greedy algorithm for this problem matches each arriving vertex with an arbitrary unmatched neighbour, if available. Every greedy algorithm outputs a maximal matching, hence has cardinality at least a half of the maximum matching. It is not very difficult to see that this bound is tight; that is, there exist graphs for which this greedy algorithm cannot achieve more than half of the maximum matching. It was also shown that a randomized version of the greedy algorithm, which chooses a currently unmatched neighbor uniformly at random (if one exists) also has a competitive ratio of , up to low order terms .
In , Karp et al. introduced the randomized RANKING algorithm, and proved that it has a competitive ratio of . They also showed that this bound is tight (up to low order terms). RANKING first chooses a random permutation over the vertices in . Upon the arrival of a vertex , RANKING matches to the highest-ranked (according to ) currently unmatched neighbor of .
The analysis in the original paper was quite complicated. Subsequent papers by Goel and Mehta , Birnbaum and Mathieu  and Devanur Jain and Kleinberg  simplified the analysis considerably. The proof presented here is based on an economic interpretation of the online bipartite matching problem. It is similar to the proof of , but does not make an explicit use of linear programming duality.
2 An Economic-Based Analysis of RANKING
Consider the following interpretation of the RANKING algorithm. Given a graph , vertices of represent items, and vertices of represent utility maximizing buyers. If , then we say that buyer is connected to item . Every buyer has a binary unit-demand valuation, with value 1 to items connected to and value 0 otherwise.
Before the arrival of buyers, every item is assigned a price , where is a uniformly random number in (chosen independently for every item). Buyers arrive in arbitrary order. Every buyer, upon arrival, chooses an item that maximizes her utility, defined as the difference between her value for the item and the item’s price. This means that every buyer chooses the cheapest item she is connected to, which is still available.
We claim that the market process above is equivalent to the RANKING algorithm. To see this, one needs to show that every buyer purchases the item that is ranked highest among all available items, according to a preset random permutation. In the market setting, every buyer purchases the cheapest (currently available) item she is connected to. But since the price of every item is a strictly monotonically increasing function of , which is chosen independently and uniformly at random, the permutation induced by item prices is a random permutation.
We now proceed to the analysis of the market process.
For each item , let denote the revenue obtained by (i.e., if the item was purchased and 0 otherwise). The utility of buyer is
Fix some arrival order of the buyers and a price vector, and let be the set of the corresponding purchased items. Since every buyer that received an item has value 1, the social welfare is the cardinality of the obtained matching. The following equation shows that it can also be written as the sum of the buyers’ utilities and the total revenue:
Recall that for weights we set prices . We shall now present the main claim of the proof.
For every order of arrival of the buyers, let be chosen uniformly in , and let prices be as above. We have that for all edges :
Before proving Claim 2.1, we show how it is used to prove the competitive ratio of . Fix a maximum matching and let be the matching produced by the market process above. It follows that
We now proceed to proving Claim 2.1 — thus proving the competitive ratio of RANKING.
Proof of Claim 2.1.
Fix some arbitrary order of buyer arrival , buyer item such that , and let prices p be random prices as above. Consider the market without item and let be the price of the item chosen by buyer under the same arrival order (if buys nothing, set ). Then, under order , in the market with item , we have the two following properties:
Item is always sold when . This follows since either (a) some previous buyer bought item , or (b) buyer prefers item over the item chosen by when was unavailable.
The utility of buyer , . Observe that after reintroducing item to the market, every buyer has the same set of items available to him plus — possibly — one additional item. This is obviously true for the first incoming buyer, and remains true subsequently since the introduction of an additional item does never induces a buyer to take an item previously waived.
Property (1) above implies that
It now follows from property (2) that
Remark 1. Devanur et al.  gave an elegant and simple proof of the bound achieved by RANKING using primal-dual analysis, where the primal LP represents the matching problem. It is known that the dual variables can be interpreted as these ’s and ’s. Our proof uses a scaled version of the assignment of the relevant dual variables in  as prices for items. The new interpretation simplifies the proof in two ways. (a) It removes the need to argue about the dual program and its feasibility. (b) Viewed from the economic perspective, some of the arguments in  are more readily apparent.
Remark 2. Note that the proof Claim 2.1 only uses the random choice of , while all other values can be arbitrary.
Remark 3. While the choices of the buyers, and thus the bound, hold when prices are just chosen uniformly at random in 111or an arbitrary bijection from w to , the proof of Claim 2.1 requires that we use the prices as specified above. Specifically, consider the lower bound example from . In this instance, the last buyer to arrive is very unlikely to receive anything (in particular, it must be the case that the price of the last item is maximal, which happens w.p. ). Claim 2.1 is about all edges, in particular the edge from the last buyer. As the utility of the last buyer is small, the revenue must compensate, but the revenue from this item is at most under uniform price distributions.
This work was partially supported by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013) / ERC grant agreement number 337122, and by the Israel Science Foundation (grant number 317/17).
Richard M. Karp, Umesh V. Vazirani, and Vijay V. Vazirani.
An optimal algorithm for on-line bipartite matching.
Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, May 13-17, 1990, Baltimore, Maryland, USA, pages 352–358, 1990.
-  Nikhil R. Devanur, Kamal Jain, and Robert D. Kleinberg. Randomized primal-dual analysis of RANKING for online bipartite matching. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, New Orleans, Louisiana, USA, January 6-8, 2013, pages 101–107, 2013.
-  Gagan Goel and Aranyak Mehta. Online budgeted matching in random input models with applications to adwords. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008, pages 982–991, 2008.
-  Benjamin E. Birnbaum and Claire Mathieu. On-line bipartite matching made simple. SIGACT News, 39(1):80–87, 2008.
-  Michal Feldman, Nick Gravin, and Brendan Lucier. Combinatorial auctions via posted prices. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 123–135, 2015.
-  Paul Duetting, Michal Feldman, Thomas Kesselheim, and Brendan Lucier. Prophet inequalities made easy: Stochastic optimization by pricing non-stochastic inputs. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, 2017, pages 540–551, 2017.
-  Soheil Ehsani, MohammadTaghi Hajiaghayi, Thomas Kesselheim, and Sahil Singla. Prophet secretary for combinatorial auctions and matroids. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 700–714, 2018.