Online matching is a central problem in the area of online algorithms, and is extensively used in economics to model rapidly appearing online markets. Some prominent applications include matching platforms for ride sharing, healthcare (e.g., kidney exchange programs), job search, dating, and internet advertising. Internet advertising in particular is a killer application that has spurred a lot of research in the algorithmic and the algorithmic game theory communities on what came to be known as the “adword problem”, introduced byMehta et al. (2007), and studied extensively since (see, e.g., Devanur and Jain (2012); Buchbinder et al. (2007)). The goal in this problem is to match online-appearing users’ impressions to relevant advertisers. For a comprehensive recent survey on online matching and ad allocations, see Mehta (2013).
The adword problem alone has instigated many interesting variants and theoretical results, which inherent many features of the original online matching model in bipartite graphs with one-sided vertex arrivals considered in the seminal paper of Karp et al. (1990). In this model, one side of the bipartite graph is fixed, and vertices on the other side arrive online. Upon arrival of a vertex, its edges to vertices on the other side are revealed, and a matching decision (i.e., whether to match and to which vertex) should be made immediately and irrevocably. Since the introduction of the online matching problem, other arrival models in bipartite graphs have been studied, including edge arrival models, and two-sided vertex arrivals, both of which extend naturally beyond bipartite graphs. In particular, Gamlath et al. (2019b) recently showed that for the case of bipartite graphs with edge arrivals, no online algorithm performs better than the straightforward greedy algorithm, which is -competitive. On the positive side, they provide a -competitive online matching algorithm for the model of general vertex arrivals introduced by Wang and Wong (2015).
The results of Wang and Wong (2015) and Gamlath et al. (2019b) apply to the unweighted matching problem (where every edge either exists or not). However, many of the online matching problems induced by real-life applications are weighted in nature, where every edge is associated with a real-valued weight. There has been a huge recent interest in studying the weighted variant of the online matching problem using a Bayesian approach, rather than the traditional worst-case approach (see, e.g., Devanur et al. (2019) and references therein).
In the Bayesian variant of the problem, one assumes stochastic instances of the problem, and the goal is to provide guarantees on the expected value of the matching. Indeed, there is a clear practical motivation for adapting stochastic models, as many of the online platforms keep accumulating huge amounts of statistical data and are heavily using it in their online decision making. In this paper we study the problem of online stochastic weighted matching in general graphs, under the two classical arrival models, namely edge arrival and vertex arrival. We study this problem within the framework of prophet inequality.
Prophet inequality is an important line of work that is highly relevant to online stochastic algorithms and algorithmic mechanism design, which addresses practical incentive issues that arise in many online market applications, in particular the need of the algorithm to solicit private information from the selfish agents. Prophet inequality appeared first as a fundamental result in optimal stopping theory Krengel and Sucheston (1977, 1978). Hajiaghayi et al. (2007) were the first to realize the applicability of the prophet inequality framework within mechanism design applications. Later, Chawla et al. (2010) applied the prophet inequality framework to the design of sequential posted price mechanisms that give approximately optimal revenue in a Bayesian multi-parameter unit-demand setting (BMUD).
An important ingredient in the result of Chawla et al. (2010) is the first constant competitive (specifically, ) prophet inequality for the online weighted matching problem with edge arrival in a bipartite graph. In this version of the prophet inequality, the weight of every edge is drawn independently from an a-priory known probability distribution, and the edges arrive online in an unknown order. Upon arrival of an edge, its weight is revealed to the algorithm, which should in turn decide, immediately and irrevocably, whether to include this edge in the matching. The goal is to maximize the expected total weight of the selected matching, and its performance is compared with the expected total weight of the matching selected by a prophet, who knows the weights of all the edges in advance, and thus selects the maximum weight matching for every realized instance of the graph. The algorithm of Chawla et al. (2010) is non adaptive, meaning that the online algorithm calculates thresholds for all the edges before observing any weights, and accepts every edge if and only if (i) it can be feasibly added to the current matching, and (ii) the weight of the edge exceeds (or equal to) its threshold.
Later, Kleinberg and Weinberg (2019) introduced a general combinatorial prophet inequality for a broad class of Bayesian selection problems, where the feasible set is represented as an intersection of matroids. They found an adaptive111The algorithm calculates the threshold at the time of the element’s arrival. This threshold depends on the arrival order and the weights of all previously appearing elements. -competitive algorithm for this setting. They also showed that it can be used for the design of a truthful mechanism in the BMUD setting with more general feasibility constraints than in Chawla et al. (2010). The most recent result for bipartite matching with edge arrivals is a -competitive non-adaptive prophet inequality by Gravin and Wang (2019). They also gave an upper bound of , which establishes a clear separation between weighted and unweighted graphs (indeed, in the unweighted case, a simple greedy algorithm is -competitive, even in a non-stochastic setting). Some of the aforementioned results are summarized in Table 1.
|Edge Arrival||Vertex Arrival|
Batched Prophet Inequality
The common assumption in the literature on prophet inequalities is that the elements arrive one by one, thus the online algorithm makes a simple binary decision at the arrival of a new element. A notable exception is the setting of Bayesian combinatorial auctions considered by Feldman et al. (2015). In this scenario, multiple items should be allocated to selfish buyers, each of which has a potentially complex combinatorial (submodular) valuation over different sets of items. The valuation function of each buyer is drawn from an arbitrary a-priori known probability distribution, which are mutually independent across the buyers. The goal is to maximize the social welfare, i.e., the total sum of buyer values for their allocated sets, by a truthful mechanism. The proposed solution uses posted pricing and follows a similar charging argument as Chawla et al. (2010) and Kleinberg and Weinberg (2019), by decomposing the welfare into revenue and surplus.
Unlike the previous results on prophet inequality, the online algorithm in Feldman et al. (2015): (i) observes multiple elements at each time step, and thus should make a complex allocation decision (as opposed to a binary decision whether or not to accept the element), and (ii) the values of basic elements (allocation of item to buyer ) might be dependent across different items. To highlight the similarities and differences with other work on prophet inequalities, it is informative to consider the restriction of the combinatorial valuations in Feldman et al. (2015) to the class of unit-demand buyers. In this case the setting and the proposed solution in Feldman et al. (2015) correspond to the one-sided vertex arrival model of Karp et al. (1990), where elements (weighted edges of a bipartite graph) are revealed online in batches, and the online algorithm can choose one element out of many. On the other hand, the prior distribution, unlike Kleinberg and Weinberg (2019) or Gravin and Wang (2019), does not need to be independent: a buyer’s values for different individual items may be dependent.
In this work, we propose a new framework, termed “Batched prophet inequality”, that captures both the edge arrival model from Kleinberg and Weinberg (2019); Gravin and Wang (2019) and the one-sided vertex arrival model from Feldman et al. (2015). Within this framework, we generalize the model of bipartite matching with one-sided vertex arrivals to two-sided vertex arrivals, and also extend our results for both the vertex and edge arrivals to general (non bipartite) graphs. Unlike Kleinberg and Weinberg (2019); Gravin and Wang (2019); Feldman et al. (2015), who take a “pricing/charging” approach, our solution relies on two novel Online Contention Resolution Schemes (OCRS) for batched arrival settings.
Contention Resolution Schemes (CRS) were introduced by Chekuri et al. (2014) as a powerful rounding technique in the context of submodular maximization. The CRS framework was extended to the OCRS framework for online stochastic selection problems by Feldman et al. (2016), who provided OCRSs for different problems, including intersections of matroids and matchings. One particularly important application of OCRS was Prophet Inequality Feldman et al. (2016); Lee and Singla (2018). Specifically, for matching feasibility constraint, Feldman et al. (2016) constructed a -OCRS that implies -competitive algorithm for the prophet inequality setting of matching with edge arrival.
1.1 Our Results
We provide prophet inequalities for matching feasibility constraint in weighted general (non-bipartite) graphs in the two fundamental online models of vertex arrivals and edge arrivals. To obtain our results for these two different settings, we use a common approach that relies on two similar Online Contention Resolution Schemes (OCRS). To this end, we introduce a novel unified framework of Batched-OCRS that enables the analysis of settings where at each time step multiple elements arrive together as a batch, and a complex online decision should be made. This framework captures (among other models) both the vertex arrival and the edge arrival models in online matching.
Reduction from prophet inequality to OCRS.
Our first result is a general reduction from Batched-Prophet Inequality to Batched-OCRS for any downward-closed feasibility constraint. This general reduction implies that to get prophet inequalities with a certain competitive ratio, it suffices to construct an OCRS with the same selectable ratio. We then construct batched-OCRSs for both vertex and edge arrival models.
Matching with vertex arrival.
We present a simple -batched OCRS, and thus a -competitive prophet inequality algorithm for general (non-bipartite) graphs. This result is tight (a matching upper bound is derived from the classical prophet inequality problem). Our competitive ratio holds also with respect to the stronger benchmark of the optimal fractional matching. Unlike bipartite graphs, the optimal fractional matching in general graphs may indeed have a strictly higher weight than any integral matching.
An interesting implication of this result is that in the Bayesian setting there is no gap between the competitive ratio that can be obtained under the 1-sided and 2-sided vertex arrival models in bipartite graphs, or even under vertex arrival in general graphs. This is in contrast to the non-Bayesian (worst case) online model, where there is a gap between 1-sided and 2-sided vertex arrivals (see Table 1).
Our vertex arrival model restricted to the case of bipartite graphs is an importation of the two-sided vertex arrival model Wang and Wong (2015); Gamlath et al. (2019b) from the online matching literature to the online Bayesian selection problem. It generalizes the setting of Feldman et al. (2015) for unit-demand buyers to the model where buyers and items can both appear online.
Matching with edge arrival.
We revisit the prophet inequality matching problem with edge arrivals considered by Gravin and Wang (2019) and Kleinberg and Weinberg (2019). While Gravin and Wang (2019) and Kleinberg and Weinberg (2019) took a pricing/threshold-based approach, we use the OCRS approach. We first show that a simple OCRS already gives a -competitive algorithm, matching the previous best bound of Gravin and Wang (2019) for bipartite graphs, and generalizing their result to general non-bipartite graphs222Note, however, that unlike Gravin and Wang (2019), the OCRS-based algorithm is adaptive.. We further improve the competitive ratio to by constructing a better OCRS, which requires more subtle analysis. These results hold against the even stronger benchmark of the ex-ante optimal solution that satisfies fractional matching constraints (similar to the observation in Lee and Singla (2018)).
1.2 Our Techniques
As mentioned earlier, the OCRS approach is not as common as the pricing approach in prophet inequality settings. We note that the earlier algorithms of Chawla et al. (2010) and Alaei (2011), when applied to the classic prophet inequality setting, become a simple -competitive algorithm that is indeed a -OCRS. These algorithms also appear to be closer in spirit to our OCRS approach than to the more recent papers on prophet inequality Kleinberg and Weinberg (2019); Feldman et al. (2015); Gravin and Wang (2019); Duetting et al. (2017); Lucier (2017); Eden et al. (2018).
One of the reasons that OCRSs are not as prevalent in prophet inequality settings is that the formal definition of OCRSs is not specifically tailored for prophet inequalities. As a result, the approximation factors that are obtained by OCRSs are not as tight. For example, the original OCRS introduced by Feldman et al. (2016) for matching feasibility constraint achieves a competitive ratio of , whereas even a non-adaptive pricing-based algorithm achieves the much better ratio of Gravin and Wang (2019) .
Indeed, these OCRSs are usually designed to work against a strong almighty adversary, who controls the arrival order of the elements and knows in advance the realization of the instance and the random bits of the algorithm. The OCRSs we construct in this work are better tailored to the prophet inequality setting as they are designed against a weaker oblivious adversary, who can select an arbitrary order of element arrivals, but does not observe the algorithm’s decisions and the realization of the instance.
Our - and -selectable OCRSs for respective edge and vertex arrival models are surprisingly simple and intuitive. Moreover, the latter OCRS already gives a tight result for the vertex arrival model. We note, however, that formulating a general OCRS framework for batched arrivals of elements is not as trivial as it might seem at a first glance. We give an example in Appendix D illustrating why a simpler and apparently more natural than ours extension of OCRS to the setting with batched arrivals can be problematic.
Even more surprisingly, at the time of writing this paper, no pricing-based approach is known to match the -competitive guarantee attainable by the OCRS for the vertex arrival model. Moreover, several natural attempts of generalizing the pricing scheme in Feldman et al. (2015) fail miserably, even for bipartite graphs. For example, one natural generalization would be to set the price on a new vertex to be half of the expected contribution of the future edges incident to to the optimum matching. As it turns out, this pricing scheme achieves a competitive ratio as small as . This is demonstrated in Appendix E.
On the other hand, the -OCRS for the edge arrival model is based on a simple union bound which still leaves some room for improvement. We improve the ratio of to by bounding the negative correlation for any pair of events that vertex and vertex are matched at the time of edge arrival. This turned out to be most technical part of the paper.
1.3 Related Work
There is an extensive literature regarding online matching and stochastic matching problems. Below we survey the studies that are most related to our work. Recently, the “fully online matching" model has been studied Huang et al. (2018); Ashlagi et al. (2019); Huang et al. (2019), motivated by ride sharing applications. This is a different vertex arrival model in which all vertices from a general graph arrive and depart online. It is possible to study the stochastic/prophet inequality version of the fully online model, which we leave as an interesting future direction.
Gravin et al. (2019) studied the online stochastic matching problem with edge arrivals (a.k.a. the unweighted version of the prophet inequality with edge arrivals in this paper) and achieved a -competitive algorithm. The stochastic matching setting is also studied in the (offline) query-commit framework. The input of this problem is an (unweighted) graph associated with the existence probabilities of all edges. The algorithm can query the existence of the edges in any order. However, if an edge exists, it has to be included into the solution. The Ranking algorithm by Karp et al. (1990) induces an -competitive algorithm for this problem on bipartite graphs. Costello et al. (2012) provided a - competitive algorithm on general graphs and proved a hardness of . Gamlath et al. (2019a) provided a -competitive algorithm for the weighted version of this problem.
Online contention resolution schemes have also been studied in settings beyond worst case arrivals. Adamczyk and Wlodarczyk (2018) considered the random order model and constructed -OCRS for intersections of matroids. Lee and Singla (2018) constructed optimal -OCRS and -OCRS for matroids with arbitrary order and random order, respectively. Offline contention resolution schemes for matching have also attracted attention due to its applications in submodular maximization problems Chekuri et al. (2014); Feldman et al. (2011); Bruggmann and Zenklusen (2019), and the connection between the correlation gap and contention resolution schemes Guruganesh and Lee (2017). We refer the interested readers to Bruggmann and Zenklusen (2019) for a comprehensive recent survey on the topic.
Since prophet inequality problems were first introduced Krengel and Sucheston (1977, 1978); Samuel-Cahn et al. (1984), many variants have been developed over the years. A recent line of work has considered sample based variants, where the distributions of the values are not given explicitly, and the challenge is to provide good competitive ratios using a limited number of samples Azar et al. (2014); Correa et al. (2019, 2020); Ezra et al. (2018); Rubinstein et al. (2019). Another related line of work, initiated in Kennedy (1985, 1987); Kertz (1986), has considered multiple-choice prophet inequalities, and was later extended to combinatorial settings such as matroid (and matroids intersection) Kleinberg and Weinberg (2019); Azar et al. (2014), polymatroids Dütting and Kleinberg (2015), and general downward closed feasibility constrains Rubinstein (2016).
1.4 Paper Roadmap
Feldman et al. (2016) define the notion of online contention resolution scheme (OCRS) to study settings where elements arrive online, and establish a reduction from prophet inequality to OCRS. In Section 2 we extend the OCRS and prophet inequality frameworks to settings where elements arrive online in batches. We begin by introducing the general setting of batched arrival. In Section 2.1 we extend the notion of OCRS to batched-OCRS. In Section 2.2 we extend the notion of prophet inequality to batched prophet inequality. In Section 2.3 we establish a reduction from batched prophet inequality to batched OCRS. In Section 3 we present a natural special case of batched prophet inequality, namely graph matching prophet inequality. Then, in Sections 4 and 5 we construct OCRSs for vertex and edge arrival models, respectively. Finally, upper bounds on the competitive ratios for the prophet inequality with edge arrivals are provided in Section 6. Section 7 concludes this paper with a list of open problems and future directions.
2 Model and Preliminaries
Let be a set of elements, and let be a downward closed family of feasible subsets of , i.e., if , then for any . The elements in are partitioned into disjoint sets (batches) that arrive online in the order from batch to batch . I.e., at time , all elements of batch appear simultaneously. The partition of elements into the batches and their arrival order should conform to a certain structure formally specified by a family of all feasible ordered partitions of .
Some examples of feasible ordered partitions include the following: (i) all batches in are required to be singletons, (ii) given a partial order on , a feasible ordered partition is required to have for any where , (iii) suppose the set of elements consists of the edges of a bipartite graph , and each batch must contain all edges incident to a vertex .
2.1 Batched OCRS
For a given family of feasible batches , consider a sampling scheme that selects a random subset as follows: at time , all elements of batch arrive, of which a random subset is realized. The realized sets are mutually independent. is then defined as the random set .
Feldman et al. (2016) introduce the notion of -selectable online contention resolution scheme (OCRS), as an online selection process that selects a feasible subset of such that every realized element is selected with probability at least , for the special case where every batch is a singleton. We extend the definition of Feldman et al. (2016) to batched OCRSs as follows.
Definition 2.1 (-selectable batched OCRS).
An online selection algorithm ALG is a batched OCRS with respect to a sampling scheme if it selects a set at every time such that is feasible (i.e., ). It is called a -selectable batched OCRS (or in short -batched-OCRS) if:
The algorithm ALG does not know the complete partition into batches and the arrival order of future batches. It only knows the general structure . Thus, at time , ALG chooses based on , and .
2.2 Batched Prophet Inequality
In batched prophet inequality, every element has a weight . Let , and . Weights are unknown a-priori, but for every , is independently drawn from a known (possibly correlated) distribution , and ; I.e., we allow dependency within batches, but not across batches. Let for any set . As standard, let .
The particular partition of elements into batches and their order are a-priori unknown333
Note that might impose some constraints on the partition into batches: elements whose weights are dependent must belong to the same batch. No constraint is imposed on elements whose weights are independent and on the order of batches., except, of course, that must conform to the general structure of .
All elements of a batch and their weights are revealed to the algorithm at time .
We assume that the arrival order of the batches is decided by an oblivious adversary, i.e., the adversary can select an arbitrary partition and order of arrival of the batches in , but does not see the realization of the weights and the algorithm’s decisions444The oblivious adversary is a standard assumption in the literature on online algorithms in stochastic settings..
Let OPT be a function that given weights returns a feasible set of maximum weight (i.e., )555We assume that OPT is deterministic (if a given weight vector
is deterministic (if a given weight vectorinduces multiple feasible sets of maximal weight, returns one of them consistently)..
Definition 2.2 (-batched-prophet inequality).
A batched-prophet inequality algorithm ALG is an online selection process that selects at time a set such that is feasible (i.e., ). We say that ALG has competitive ratio if
2.3 Reduction: Prophet Inequality to OCRS
We define a random sampling scheme for as follows. Let be the random subset of where are generated independently of , and . Note that:
The distribution of
is a product distribution over the random variables.
Since is a product distribution, .
, has the same distribution as , where .
, , and . But, might not belong to .
For every ,
Theorem 2.3 (reduction from -batched prophet inequality to -batched OCRS).
For every set of feasible ordered partitions, given a -batched OCRS for the sampling scheme with , there is a batched prophet inequality algorithm for with competitive ratio .
3 Graph Matching
An interesting special case of prophet inequality is the problem of selecting a matching in a graph. Given a graph (not necessarily bipartite), the elements of the prophet inequality setting are the edges , and the family of feasible sets is given by all matchings in , i.e., is feasible iff for any .
We consider two different online arrivals models: (i) vertex arrival and (ii) edge arrival, which are natural special cases of our general framework of batched prophet inequality.
Vertex arrival model.
In the vertex arrival model, the vertices arrive in an arbitrary unknown order : , where is the vertex arriving at time . Upon arrival of vertex , the weights on the edges from to all previous vertices , where , are revealed to the algorithm. The online algorithm must make an immediate and irrevocable decision whether to match to some available vertex such that (in which case and become unavailable), or leave unmatched (in which case remains available for future matches). Let . The set of feasible ordered partitions for the vertex arrival model is
where is the set of permutations over .
Edge arrival model.
In the edge arrival model, the edges arrive in an arbitrary unknown order : . Upon arrival of edge , the algorithm must decide whether to match it (provided that and are still unmatched), or leave unmatched potentially saving and/or for future matches. Let be the singleton . The set of feasible ordered partitions for the edge arrival model is
where is the set of permutations over .
Another extreme case is where all edges arrive in a single batch . Then the online algorithm is no different than the offline algorithm, which can select the optimal offline solution .
For the special case of the family of matching feasible sets, one can also consider fractional matchings specified by the matching polytope
Every feasible ordered partition (that belongs to either or ) induces a random variable as defined in Section 2.3 with respect to the set of feasible matchings . Let be the probability that , where , and let . Note that for any edge , is precisely the probability that the edge is in , where . Therefore, . Furthermore, by Property 4 in Section 2.3, it holds that .
In Section 4 we construct a -batched OCRS for vertex arrival with respect to every whose corresponding belongs to . Since , we get a batched prophet inequality with competitive ratio for vertex arrival. Similarly, the -batched OCRS for edge arrival in Section 5 implies a batched prophet inequality with competitive ratio for edge arrival.
Guarantees against stronger benchmarks.
The guarantee in Definition 2.2 can be strengthen to hold against the stronger benchmark of the optimal fractional matching. This extensions of the definition of batched OCRS and the reduction from batched prophet inequality to batched OCRS are deferred to Appendix A. The construction of the OCRS for the setting of fractional matching in the vertex arrival model is deferred to Appendix C. In Appendix B we show that for the edge arrival model, our construction actually gives an approximation to an even stronger benchmark, known as the ex-ante relaxation.
4 A -Batched OCRS for Matching with Vertex Arrival
In this section we construct a -batched OCRS for the vertex arrivals. By the reduction in Theorem 2.3, the constructed batched OCRS gives a batched prophet inequality with competitive ratio with respect to the optimal matching.
For every vertex , let be an independent random subset of generated by the sampling scheme, and let . For every edge , let . We write if vertex arrives before vertex in the vertex arrival order .
If satisfies the following two conditions:
Then, admits a -batched OCRS for the structure of batches.
Upon the arrival of a vertex , we compute for every as follows:
Note that cannot be calculated before the arrival of . We claim that the following algorithm is a -batched OCRS with respect to :
Note that Algorithm 2 is well defined, since by Equation (5), and Algorithm 2 matches no more than one vertex to by (4). It remains to show that Algorithm 2 is a -batched OCRS with respect to . We fix the arrival order . We prove by induction (on the number of vertices ) that . The base of the induction for is trivially true. To complete the step of induction, we assume that for all and will show that for all . In what follows, we say that “ is unmatched at " if is unmatched right before arrives.
In order to prove that Algorithm 2 is a -batched OCRS with respect to , we need to show that for every
Here we discuss how our algorithm can be implemented efficiently. Note that given the probabilities , we can calculate by Equation (5
). Thus our batched OCRS can be implemented in polynomial time, if we are explicitly given the probability density functions of each element in. However, the batched OCRS in the reduction to prophet inequality, grants us only sample access to
. In a sense, it is a problem of calculating the value and estimating basic statistics of the maximum weighted matching benchmark. If we have only a sample access to, we can still apply standard Monte-Carlo algorithm to estimate ’s within arbitrary additive accuracy (with high probability), which leads to estimation of within arbitrary multiplicative accuracy (by Equation (5) and the fact that ). This gives us a -batched OCRS that runs in time.
5 A -OCRS for Matching with Edge Arrival
In this section we construct a -OCRS for the edge arrival model. We start with a warm-up in Section 5.1, establishing a -OCRS. In Section 5.2 we present an improved -OCRS, using subtle observations about correlated events. Our results imply a prophet inequality with competitive ratio for the edge-arrival model. In Appendix B we show that this guarantee holds also with respect to the optimal ex-ante matching (which is a stronger benchmark; stronger even than the optimal fractional matching).
In batched OCRS we define a sampling scheme (independent across batches), which in turn defines corresponding marginals . If every batch consists of a single element (as in the model of matching with edge arrival), any vector of marginal probabilities induces the unique sampling scheme . Hence, is described by . Based on Section 3, for the special case of matching with edge arrivals, it suffices to construct a -OCRS for every .
Let be any probability vector in the (fractional) matching polytope (see Section 3). Let be an arbitrary (unknown) order of the edges. Let be a sampling scheme that independently generates for each edge as follows. with probability , and otherwise. To simplify notation, we sometimes use to denote in . Recall that the definition of -OCRS requires the selected set to be feasible, and each element to satisfy . That is, the probability that is selected given that it is in should be at least . Our algorithm will actually guarantee the last inequality with equality, namely that for all . In the description of the algorithm and throughout this section, we write “at ” or “at ” as a shorthand notation to indicate the time right before the arrival of the edge .
Note that the term involves both randomness from and from previous steps of our algorithm.
It holds that:
which satisfies the inequality required by -OCRS (Equation (1)).
It remains to show that Algorithm 3 is well-defined, i.e., that for all . In Section 5.1 we show that can be proved using a relatively simple analysis. In Section 5.2 we present a more involved analysis showing that one can improve to .
The computation of is similar to the vertex arrival setting. In fact, we can work with a stronger benchmark of the ex-ante relaxation in the edge arrival setting, which is easier from the computational view point and admits a polynomial time algorithm that finds as the solution to the ex-ante relaxation. By contrast to the vertex arrival setting, given , it might take exponential time to precisely calculate in Algorithm 3. We still can use Monte-Carlo method to estimate ’s within arbitrary multiplicative accuracy (by the fact that ), which results in a -OCRS that runs in time.
5.1 Warm-up: -Ocrs
There is a -OCRS for matching in general graphs with edge arrivals.
Let . We prove by induction on the number of edges that all . The base case is trivial, since and . Let us prove the induction step. We can assume by induction hypothesis that for every edge but the last arriving edge . To finish the induction step we need to show that . Recall that our algorithm matches each edge preceding with probability . Therefore,
Indeed, the events that is matched to the vertex for each are disjoint, , and ; similar argument applies to By the union bound, we have
For , . Thus,
as desired, which concludes the proof. ∎
5.2 Improved Analysis: -Ocrs
In order to improve the competitive ratio beyond , we strengthen the lower bound on the probability that are unmatched at . We again apply the same inductive argument as in the warm-up, but use more complex estimate on than a simple union bound. We denote
Similar to (9) we have
Hence, by the inclusion-exclusion principle we have
If the matching statuses of and were independent, the bound (11) would be , and equating it to would yield . However, it is possible that the events that and are matched are negatively correlated. The following lemma gives a non-trivial lower bound on this correlation. This is the most technical lemma in this paper; its proof is the content of Section 5.3.
The bound in Lemma 5.2 leads to the construction of the improved -OCRS.
There is a -OCRS for general graphs with edge arrivals.
5.3 Proof of Lemma 5.2
Fix an edge arrival order . We prove Lemma 5.2 by induction on the number of edges (as in the warm-up in Section 5.1). The base case, where the number of edges is , holds trivially. By the induction hypothesis, we can assume that for every edge but the last edge in . To simplify notations, we slightly abuse the definition of by excluding edge from . We need to show that . By the induction hypothesis, Algorithm 3 matches each edge with probability exactly . For the purpose of analysis, we think of the following random procedure that unifies the random realization in and the random decisions made by our algorithm.
For each , with probability , and conditioned on the event , is active with probability .
Greedily pick active edges according to the arrival order . I.e., pick an active edge if both and are unmatched at .
In the above procedure, each edge is active with probability (independently across edges). Then, it is matched if both its ends are unmatched at the time the edge arrives. In the remainder of this section we give a lower bound on the probability that both are unmatched at .
Let be the set of the active edges. Suppose there is a vertex such that is the only active edge of . Then must remain unmatched before . When arrives, is either matched before, or it will be matched now. We call such a witness of , as existence of implies that is matched. Moreover, if both and admit witnesses , then must be matched at . Note that by definition .
Let us give a lower bound on the probability that each of have a witness. We first describe a sampler that given the set of active edges incident to , proposes a candidate witness of . Let be the following random mapping.
Resample each independently with probability . Let the active edges be .
Run greedy on the instance according to the arrival order .
If is matched with a vertex , return ; else, return null.
The sampling procedure corresponds to the actual run of our algorithm, since has the same distribution as . Thus, the probability that is returned as the candidate witness of equals the probability that is matched by our algorithm, which equals . Hereafter, we denote the event that a vertex is chosen by the sampler as the candidate witness of a vertex by “ candidate of ". Thus
We also define a similar sampler to generate the candidate witness of . Then,
For all such that ,
As and we just need to show
which is equivalent to
Two types of randomness are involved in this statement, the realization of edges that are incident to and the resampling of remaining edges in . Fix the realization of and . If is chosen as the candidate by when is active, it must also be chosen when is not active. This finishes the proof of the lemma. ∎
We also know that and . So we can continue the lower bound (13) on as follows
For any vertex ,
Without loss of generality, we assume that neighbors of are enumerated from to in such a way that among all edges incident to , the edge appears as the -th edge in . Notice that each edge is active independently with probability . Recall that . As is matched to with probability , we have by a union bound and induction hypothesis
Furthermore, each edge is active independently with probability . Therefore, we have
where second equality follows by the definition of , first inequality follows by Equation (14), and the last inequality by the fact that . ∎
We recall that . Therefore, we get the following bound from Equation (11).
where all summations are taken over . Note that since , then for all we have , , as well as and . Let us find the minimum of the function Equation (15). To conclude the proof it suffices to show that is at least the value in the statement of Lemma 5.2.
We observe that for all . Similarly, for all . That means that the minimum of is achieved at a boundary point , which does not allow us to increase any of the or . The analysis proceed in two cases.
If , then we can find a good upper bound on as follows. First,