Competitive Ratios for Online Multi-capacity Ridesharing
CCompetitive Ratios for Online Multi-capacity Ridesharing
Meghna Lowalekar, Pradeep Varakantham, Patrick Jaillet † School of Information Systems, Singapore Management University † Department of Electrical Engineering and Computer Science, Massachussets Institute of [email protected], [email protected], [email protected]
Abstract
In multi-capacity ridesharing, multiple requests (e.g., customers, food items, parcels) with differentorigin and destination pairs travel in one resource. In recent years, online multi-capacity ridesharingservices (i.e., where assignments are made online) like Uber-pool, foodpanda, and on-demand shuttleshave become hugely popular in transportation, food delivery, logistics and other domains. This is becausemulti-capacity ridesharing services benefit all parties involved – the customers (due to lower costs), thedrivers (due to higher revenues) and the matching platforms (due to higher revenues per vehicle/resource).Most importantly these services can also help reduce carbon emissions (due to fewer vehicles on roads).Online multi-capacity ridesharing is extremely challenging as the underlying matching graph is nolonger bipartite (as in the unit-capacity case) but a tripartite graph with resources (e.g., taxis, cars),requests and request groups (combinations of requests that can travel together). The desired matchingbetween resources and request groups is constrained by the edges between requests and request groupsin this tripartite graph (i.e., a request can be part of at most one request group in the final assign-ment). While there have been myopic heuristic approaches employed for solving the online multi-capacityridesharing problem, they do not provide any guarantees on the solution quality.To that end, this paper presents the first approach with bounds on the competitive ratio for onlinemulti-capacity ridesharing (when resources rejoin the system at their initial location/depot after servinga group of requests). The competitive ratio is : (i) 0.31767 for capacity 2; and (ii) γ for any generalcapacity κ , where γ is a solution to the equation γ = (1 − γ ) κ +1 . Motivated by multiple online to offline services including point-to-point transportation, food delivery, lo-gistics, etc., online matching problems have received tremendous interest in the recent years. Specifically,on-demand unit-capacity (e.g., UberX, Lyft) and multi-capacity (e.g., Uberpool, Lyftline, Deliveroo, FoodPanda) ridesharing services have become hugely popular in many cities around the world. In these platforms,resources have to be matched online (in real-time) to either one request (unit-capacity) or a group of requests(multi-capacity) so as to maximize the weight of the matching (e.g., revenue, number of requests served).Given the win-win properties of multi-capacity ridesharing to all the concerned parties (customers, drivers,matching platform) and the environment (through reduced carbon emissions), we are interested in developinga performance guaranteed approach for multi-capacity ridesharing.There are two major threads of relevant research. The first thread is on online unit-capacity ridesharingwhere the underlying problem is an online bipartite matching problem. The standard online bipartitematching problem involves matching known (i.e., available offline) disposable resources on one side tothe online arriving vertices/requests on the other side, over multiple timesteps. Many approaches provideperformance guarantees under different arrival assumptions for incoming vertices [1, 2, 3]. Mehta [4] providesa detailed survey of the same. One popular arrival assumption is the known identical independent distribution(KIID) [3, 5], where online vertices arrive over T rounds and their arrival distributions are assumed to be Once a resource is assigned, it can not be used by any other incoming vertex/request. a r X i v : . [ c s . A I] S e p dentically distributed and independent over T rounds. This distribution is also known to the online algorithmin advance. The existing literature provide bounds of at least 1 − e on the expected competitive ratio (ratio ofthe expected value obtained by the algorithm to the expected value obtained by an offline optimal algorithm)for online bipartite matching problems under KIID.In case of unit-capacity ridesharing, the offline available resources (i.e., vehicles) are reusable. Dickerson et.al. [6] were able to provide a bound for the unit-capacity ridesharing in which resources are reusableand they join the system after serving the requests at the same location. Instead of KIID, they consider thatarrival distributions of online vertices can change from time to time (i.e., it is not iid) but this distribution isalso known to the algorithm. They refer to this distribution as the Known Adversarial Distribution (KAD).Unfortunately, this thread of work is only applicable for unit-capacity resources and cannot be directlyadapted to consider multi-capacity resources because the underlying problem is no longer an online bipartitematching problem (see below). Another limitation is that the existing work for unit-capacity ridesharinghas primarily focused on requests arriving sequentially (i.e., one by one) and not in batches which is adesirable property when considering multi-capacity ridesharing problems (for instance, last mile services attrain stations need to consider that the large number of passengers will arrive and request for last miletransportation to their home at the same time.).The second thread of relevant research is on approaches to solve online multi-capacity (capacity > >
1) make the problem challenging because resources have to bematched to groups of requests and not just to individual requests. This results in a significant change in thestructure of the underlying matching graph. Unlike unit-capacity ridesharing, where the underlying graph isbipartite, the multi-capacity ridesharing has a tripartite graph [9] with reusable resources (vehicles), requestgroups (i.e., combinations of passenger requests) and online vertices (corresponding to passenger requests).The desired matching between the resources and request groups (combination of requests) is constrained bythe edges between requests and request groups (i.e., a request can be part of at most one request group infinal assignment) in this tripartite graph. It should be noted that this matching problem in tripartite graphis not equivalent to any variant of bipartite matching problem [10, 11, 12, 13] studied in the literature. Thisis because the weight of a match and the time after which resource becomes available again is dependent onthe requests which are paired together in the group assigned to the resource.To the best of our knowledge, there has been no research on providing performance guaranteed algorithmsfor such tripartite graphs. There has been some work on solving a part of this matching problem whichfocused on finding the requests which can be grouped together over time by considering the sequentialarrival of requests [14, 15] in the adversarial and random order arrival. However, these works ignore themain component of matching the resources to the request groups.
Our first contribution is in designing a performance guaranteed online algorithm that provides a competitiveratio of for the unit-capacity ridesharing problem that considers batch arrival of online vertices underthe known arrival distribution. Due to the change in the value obtained by optimal algorithm (more detailsin Section 3), it is not obvious whether the competitive ratio will increase or decrease or remain the sameas compared to the sequential arrival case [6]. Therefore, this is an important result where in we are able toshow that the same competitive ratio can be achieved even when the vertices arrive in batches.Our second and the main contribution is to provide a performance guaranteed online algorithm that providesa non-zero competitive ratio for the online multi-capacity ridesharing problems considering batch arrival ofonline vertices under the known arrival distribution. The competitive ratio is: • The online arriving vertices correspond to the requests. Throughout the paper we use vertices and requests interchangeably. γ for any arbitrary capacity κ , where γ is solution to the the expression (1 − γ ) κ +1 = γ . Even though we require groups of vertices in this online algorithm, these groups can be generated offline andhence does not add to the run-time complexity.
These general bounds for arbitrary capacity ridesharing areapplicable under the assumption that the type of the resources/vehicles (i.e., their location) rejoining thesystem (after serving a group of vertices) does not change [6].
Finally , we provide simple heuristics (based on the offline optimal LP) which work well in practice (asdemonstrated in our experimental results).
In this section, we provide the formal definition of expected competitive ratio and the research relevant [6]to the work in this paper.
The performance of any online algorithm is measured using a metric called competitive ratio. An onlinealgorithm with a competitive ratio of γ is called γ -competitive algorithm. In case of known distributionmodels, the expected value of the competitive ratio is employed. The expected competitive ratio of anyalgorithm ALG is defined [4] as min I,D E [ ALG ( I,D )] E [ OP T ( I )] , where I denotes the input and D denotes the arrivaldistribution and E [ OP T ( I )] denotes the expected value of the offline optimal algorithm. In general, anupper bound on the value of E [ OP T ( I )] is provided by using a benchmark linear program. This results inproviding a valid lower bound on the resulting competitive ratio. Since we only employ expected competitive ratio in this paper, we henceforth just refer to it as competitiveratio.
We now describe the Online Matching with (Offline) Reusable Resources under Known Adversarial Distribu-tions (OM-RR-KAD) model [6] for ridesharing in which the vehicle capacity is restricted to 1. OM-RR-KADis a bipartite matching problem between offline reusable resources (e.g., vehicles), U , and vertices that arriveonline, V (e.g., user requests), over T rounds . Online vertices arrive according to a Known AdversarialDistribution (KAD) represented by a set of arrival probabilities, { p tv } ( (cid:80) v p tv = 1 , ∀ t ). Once an online vertexof type v arrives (i.e., sampled from p tv ), an irrevocable decision needs to be taken immediately to matchit to one of the offline resources, for which a weight, w tu,v is received, or to reject it. The offline resourcebecomes unavailable for a few rounds after it is matched and the number of rounds of unavailability, c tu,v , ischaracterized by an integral distribution, c tu,v ∈ { , , . . . , T } . The offline resource rejoins the system after c tu,v rounds. The goal is to design an online assignment policy that will maximize the weight.There are two key steps in obtaining a performance guaranteed online assignment policy: First , an upper bound on the offline optimal, x ∗ is computed using the linear program (LP) of Table 1. x ∗ ,tu,v denotes the probability of assigning resource u to online vertex of type v in round t . Constraint (1)ensures that the expected number of times a vertex of type v is matched is less than or equal to the expectednumber of times the vertex is available. Constraint (2) ensures that the resource u is assigned in round t ifand only if it is available in round t . It should be noted that this LP provides a solution over all realizationsof online vertices and hence that solution may not be applicable to a specific instantiation of online vertex(as the corresponding u may not be available). Second , an assignment rule is provided to compute the online probability of assigning a resource u for aspecific instantiation of online vertex (of type v in round t ) and is given by: x ∗ ,tu,v · γp tv · β tu (4) We use round and timestep interchangeably in the paper PSequential: max T (cid:88) t =0 (cid:88) u ∈U (cid:88) v ∈V w tu,v · x tu,v s.t. (cid:88) u ∈U x tu,v ≤ p tv ::: ∀ v ∈ V , ≤ t < T (1) t (cid:88) t (cid:48) =0 (cid:88) v (cid:48) ∈V x t (cid:48) u,v (cid:48) · P r [ c t (cid:48) u,v (cid:48) > t − t (cid:48) ] + (cid:88) v ∈V x tu,v ≤ ∀ u ∈ U , ≤ t < T (2)0 ≤ x tu,v ≤ ∀ u ∈ U , v ∈ V , ≤ t < T (3)Table 1: Unit Capacity Sequential Arrivalwhere x ∗ ,tu,v is a solution to the LP in Table 1 and γ is the desired competitive ratio of the online assignment;and β tu is the probability that resource u is safe for assignment in round t . By simulating the current strategyup to t , β tu can be estimated with a small error.The following theorem characterizes the bound on the expected competitive ratio. Theorem 1
Dickerson et.al. [[6]] The optimal value of LPSequential in Table 1 provides a valid upper boundon the offline optimal value for OM-RR-KAD. The online assignment rule of Equation 4 based on the LPachieves an online competitive ratio of − (cid:15) for any given (cid:15) > . The (cid:15) factor comes in the competitive ratio due to the error in the estimation of β tu . For a cleanpresentation, throughout the paper, we assume that these values can be estimated correctly and ignore theestimation error. In ridesharing problems, user requests typically arrive in batches instead of arriving sequentially (e.g., userscoming out of a train, theatre or mall looking for shared rides). So, we extend the OM-RR-KAD modelto consider batch arrival of online vertices and also provide an online algorithm that achieves the samecompetitive ratio of as in the sequential arrival case. Batch arrival is different from sequential arrivalbecause multiple online vertices (more information at each step) have to be matched to multiple offlineresources at each round.Since there are more vertices available in each round, online algorithms can potentially make betterassignments in the batch case as compared to the sequential case. Due to this, it seems that the competitiveratio in the batch arrival case will be higher than the sequential arrival case. However, • As the assignment for any vertex should be made in the same round of its arrival, in batch case whereeach round has multiple vertices, optimal algorithm (denominator of competitive ratio) also considers agreater number of vertices in each round and hence optimal value can also improve (as compared to theoptimal value for sequential case). • Compared to the sequential case, more time is spent deliberating (since we must wait until end of batchto make assignments) and during that time no assignment will happen and hence the number of verticesassigned by the optimal algorithm can be lower.Therefore, the relationship between the competitive ratio for the sequential and batch cases is non trivial.We now provide an algorithm which ensures that the competitive ratio in batch arrival case is equal to thesequential arrival case. 4e first mention the changes required in OM-RR-KAD model for the batch arrival case and then providethe performance guaranteed online algorithm for the unit-capacity case.
Changes to OM-RR-KAD for Batch Case:
In the OM-RR-KAD model, at each round t , a single vertexis sampled using the probability { p tv } . However, in the batch extension, b t vertices arrive at each round andeach of these b t vertices is sampled using the same probabilities { p tv } . The expected number of vertices oftype v arriving in round t is q tv and is given by: q tv = b t · p tv LP for Upper Bound on Offline Batch Optimal, LPBatch:
The optimization formulation for thebatch case is same as the LP in Table 1, except for the constraint in Equation (1). Given that there are q tv (and not p tv ) expected arrivals of vertex of type v at each round, the modified constraint is: (cid:88) u ∈U x tu,v ≤ q tv ::: ∀ v ∈ V , ≤ t < T (5)We will refer to the modified LP as LPBatch. Proposition 1
The optimal value of LPBatch provides a valid upper bound on the offline optimal value . Algorithm 1:
ADAPBatch( γ ) for t < T do Generate a random shuffling of the incoming b t vertices. Label the vertices from 1 to b t . for i = 1 to b t do v = type of vertex with label i If E t ∗ ,v,i = φ , then reject the vertex with label i ; Else choose u ∈ E t ∗ ,v,i with probability x ∗ ,tu,v · γq tv · β tu,i Update the sets E t ∗ ,v,j for all j > i based on the assignment. ADAPBatch
The online algorithm presented in Algorithm 1 is used to make an online assignment of theresources to the incoming vertices that are arriving in batches. We use an adaptive algorithm that employsthe probability of a resource being safe (available for assignment) while making assignments. The assignmentrule to compute the online probability of assigning a resource u for the vertex of type v with label i in round t is: x ∗ ,tu,v · γb t · p tv · β tu,i where β tu,i denotes the probability that resource u is safe in round t when the vertex with label i is beingconsidered; and E t ∗ ,v,i ⊂ U is used to denote the set of safe neighbours for a vertex of type v in round t whenthe vertex with label i is being considered.In the algorithm, we process the vertices that have arrived in a batch one by one by considering auniform random shuffling of incoming vertices. The intuition behind the assignment rule is to divide theoptimal assignment for round t uniformly into b t steps ( x ∗ ,tu,v b t ) and then to make sure that the vertex of type Proof is available in appendix. For an LP-based algorithm, we say that the algorithm is adaptive if for a given LP solution, the computation of strategyin each round t depends on the strategies in the previous rounds [16]. t for a single instance of arrival of vertices. We only show the detailed flowdiagram in the first block for each of the algorithms, rest of the blocks will have similar flow.6 is matched to resource u at any step with probability x ∗ ,tu,v · γb t unconditionally. Another key change in thealgorithm from the sequential case is the last step where the availability of offline resources is updated basedon assignments made in the same round. Figure 1 highlights the difference in the way the algorithms processonline information in the sequential and batch case. Proposition 2
The online algorithm ADAPBatch is competitive. Proof Sketch:
The maximum value of γ for which the algorithm ADAPBatch is valid is γ = . Theproof involves showing that the minimum possible value of β tu,i is , for which we use mathematical induc-tion. Finally, we show that ADAPBatch is γ competitive and since the maximum value of γ for which theassignment rule is valid is , the algorithm is competitive. (cid:4) In this section, we provide a model, an online algorithm and competitive ratio analysis for the online multi-capacity ridesharing problem with reusable resources.
To address the challenges associated with multi-capacity resources, we propose a new model called OPERA( O nline matching with offline multi-ca P acity r E usable R esources in b A tch Arrival Model). In OPERA,online vertices arrive in batches according to a Known Adversarial Distribution (KAD) . Once the onlinevertices arrive, there has to be an irrevocable decision made immediately on matching each offline resource u to a group of online vertices v g . The groups chosen for all vehicles should be such that each online vertexappears in at most one group. For each assignment of an offline resource u to a group of online vertices oftype v g in round t , a weight w tu,v g is received. After the assignment, the offline resource u is unavailablefor c tu,v g rounds before joining the system again . The goal is to design an online assignment policy forassigning offline reusable resources to the groups of online vertices that will maximize the weight receivedover all time steps. Unlike in OM-RR-KAD, the underlying problem in OPERA is no longer a bipartite matching problem buta matching in a tripartite graph containing offline resources, U groups of online vertices, V g and onlinevertices, V .Figure 2 shows the tripartite graph formed in the case of OPERA. Here are other key differences between OPERA and OM-RR-KAD: U : Each offline resource, u ∈ U in OPERA has a fixed capacity κ . V g : As κ >
1, unlike in OM-RR-KAD model, resources can be assigned to more than one vertex at a round,i.e., resources can be assigned to groups of vertices where group sizes vary from 1 to κ . For ease of analysis,we consider that all the vertices can be paired together, and the constraints on the feasibility of pairing ofvertices are handled through the weights received. Types of groups of vertices are obtained by generatingall possible combinations (with repetitions) of size 1 to κ of the set V . The resulting set is denoted by V g . Therefore, |V g | = κ (cid:88) k =1 (cid:18)(cid:18) |V| k (cid:19)(cid:19) = κ (cid:88) k =1 (cid:18) |V| + k − k (cid:19) For each group of type v g , n v,v g denotes the number of times vertex of type v ∈ V is present in group oftype v g (From the example Figure 2, for v g = ( v , v ), n v ,v g will be 2 and for v g = ( v , v ), n v ,v g will be1.) Algorithm is valid when the assignment rule probability lies between 0 and 1. In the context of last mile ridesharing – after serving the group of passengers, vehicle comes back to its initial location (cid:0)(cid:0) nk (cid:1)(cid:1) denotes the number of multisets of cardinality k , with elements taken from a finite set of cardinality n . V indicate the numberof vertices of each type available and blue numbers in V g denote the number of groups of each type whichcan be formed using available vertices in V . The blue lines indicate a valid assignment of resources in U to groups in V g . Red lines indicate an invalid assignment as the vertex of type v is used 3 times in thisassignment but there are only 2 vertices of type v available. q tv : We consider batch arrival of vertices. Therefore, similar to the extension in Section 3, b t vertices arriveat each round and each of these b t vertices is sampled using the same probabilities { p tv } . The expectednumber of vertices of type v arriving in round t is q tv and is given by: q tv = b t · p tv w tu,v g : Weight received is now based on the type of group assigned to the resource. c tu,v g : Rounds of unavailability after an assignment is now based on the type of the group assigned to theresource.Apart from the model differences, there are also differences with respect to the online assignments that canbe made. The irrevocable assignment of resources in U to V g should satisfy the following constraints: C1:
Each resource u ∈ U is assigned at most once in each round. C2:
The total number of vertices of each type v ∈ V used in the assigned groups is less than or equal to thenumber of vertices available. C3:
The number of groups of type v g ∈ V g assigned in round t is less than or equal to the number of availablegroups of type v g .In order to enforce constraint [C3] above in expectation (i.e., over all possible instantiations of arrivals), weneed to compute q tv g — the expected number of times group of type v g can be formed in round t . It is givenby : q tv g = h tv g (cid:89) v ∈ v g ( p tv ) n v,vg where h tv g = i = | v g | (cid:81) i =0 ( b t − i ) (cid:81) v ∈V ( n v,v g )! (6) It corresponds to drawing n v,v g vertices of each type v ∈ v g out of total b t trials for a multinomial distribution. Pleaserefer to https://tinyurl.com/rjs524p for details on deriving the expression. PShare: max T (cid:88) t =0 (cid:88) u ∈U (cid:88) v g ∈V g w tu,v g · x tu,v g (7) s.t. (cid:88) t (cid:48)
LP for Upper Bound on Offline Batch Optimal with Multi-Capacity Resources:
The optimizationformulation is provided in Table 2. We refer to this LP as LPShare. Since LP is for the offline case overall possible instantiations on arrival vertices, the constraints hold in expectation. Constraints (8), (9) and(10) refer respectively to C1 , C2 and C3 constraints (described in Section 4.1) in expectation (i.e., over allpossible instantiations of arrivals). Constraint (8) ensures that the resource u is assigned in round t iff u isavailable in round t . Proposition 3
The optimal value of LPShare provides a valid upper bound on the offline optimal value . ADAPShare- κ : For ease of explanation, we first present the online algorithm and competitive analysis for κ = 2.Let x ∗ ,tu,v g denotes the optimal probability of assigning a resource u to a group of type v g in round t (computedfrom offline optimal LP). We use Algorithm 2 to make online assignment of resources to the groups of verticesbased on { x ∗ ,tu,v g } values from the offline optimal LP. As shown in the algorithm, we perform a random shufflingof the b t vertices (that arrive in a batch in round t ) and label the vertices from 1 to b t . The assignment ofresources to groups is performed across b t · b t steps (as we consider groups of size 2). Step ( i, j ) correspondsto a step where we compute the probability for assignment of a group formed by vertices with labels i and j . It should be noted that when i = j , ( i, j ) corresponds to a group of size 1 with only vertex with label i .The assignment rule to compute the online assignment probability of assigning resource u to a group of type LP is based on satisfying the flow constraints in the graph shown in Figure 2. Proof is available in appendix. lgorithm 2: ADAPShare-2( γ ) for t < T do Generate a random shuffling of the incoming b t vertices. Label the vertices from 1 to b t . for i = 1 to b t do for j = 1 to b t do v g = type of group formed at step ( i, j ) based on the labels assigned to the vertices. if v g is available for assignment at step ( i, j ) then If E t ∗ ,v g , ( i,j ) == φ , reject v g Else choose ( u, v g ) ∈ E t ∗ ,v g , ( i,j ) with probability p where p = x ∗ ,tu,vg · γh tvg · P tvg, ( i,j ) · β tu, ( i,j ) Update E t ∗ , ∗ , ( i,j ) , available groups based on the assignment. v g at step ( i, j ) of the algorithm is defined by x ∗ ,tu,v g · γh tv g · P tv g , ( i,j ) · β tu, ( i,j ) (12)where β tu, ( i,j ) denotes the probability that resource u is available for assignment in round t at step ( i, j )over all arrival sequences. Similarly P tv g , ( i,j ) denotes the probability that group of type v g can be consideredfor assignment in round t at step ( i, j ) over all arrival sequences. h tv g was defined in Equation (6). We use E t ∗ ,v g , ( i,j ) ⊂ U to denote the set of safe resources for group of type v g at step ( i, j ). Similarities and Differences to ADAPBatch:
The intuition behind the assignment rule for a step is similarto the one in ADAPBatch. Assignment for a group of type v g in a step is obtained by dividing the optimalassignment of round t for group of type v g by the total number of steps where group of type v g can beconsidered .The key differences in assignment rule of ADAPShare- κ and ADAPBatch: • For κ = 2, since we can consider 2 vertices together (in a group) for assignment, we process the groups in b t · b t steps for ADAPShare-2. This is in comparison to b t steps in ADAPBatch. • In ADAPBatch, during online processing, vertex with label i in the batch will be considered for assignmentonly at one of b t steps. In ADAPShare- κ , a vertex is part of multiple groups, so it will be considered atmultiple steps. Therefore, at each step, the probability of vertex being available (and as a result a groupbeing available) needs to be recomputed based on the groups assigned at previous steps in the same round.Figure 1 highlights the difference in the way the algorithms ADAPBatch and ADAPShare- κ process theonline information. Competitive Ratio for ADAPShare-2
In this section, we provide the analysis to compute the competitive ratio for ADAPShare-2. We firstfind the value of γ for which the assignment rule in Equation (12) is valid, i.e., it corresponds to a validprobability value between 0 and 1. Each group of type v g will be considered at h tv g steps out of the total b t · b t steps. For κ = 2, from Equation (6) h tv g = b t , if | v g | = 1 ,b t · ( b t − if | v g | = 2 and v g = ( v, v (cid:48) ) , b t · ( b t − if | v g | = 2 and v g = ( v, v ) . This is because when both vertices are of same type in the group, for example if v g = ( v, v ), then v g considered at step ( i, j )means that the vertex with label i and the vertex with label j both are v and therefore steps ( i, j ) and ( j, i ) would be identical.On the other hand when both vertices are of different type, for example if v g = ( v, v (cid:48) ), then v g considered at step ( i, j ) meansthat the vertex with label i is v and the vertex with label j is v (cid:48) but v g considered at step ( j, i ) means the opposite. Hence inthis case the group of type v g will be considered at b t · ( b t −
1) steps across different online arrivals. Please refer to the examplein the document at https://tinyurl.com/rjs524p for more clarity. roposition 4 The maximum value of γ for which assignment rule in Equation (12) is valid is 0.31767. Proof:
Since the assignment rule always generates a positive value, the condition to be satisfied for theassignment rule to be valid is x ∗ ,tu,v g · γh tv g · P tv g , ( i,j ) · β tu, ( i,j ) ≤ (cid:88) u x ∗ ,tu,v g ≤ h tv g · (cid:89) v ∈ v g ( p tv ) n v,vg = ⇒ x ∗ ,tu,v g ≤ h tv g · (cid:89) v ∈ v g ( p tv ) n v,vg Substituting this in Equation (13) and rearranging terms, we get β tu, ( i,j ) ≥ γ · (cid:81) v ∈ v g ( p tv ) n v,vg P tv g , ( i,j ) ∀ t, i, j, v g (14)By considering the probabilities with which each of the vertex of type v ∈ v g is available at step ( i, j ), wecan show that , (cid:81) v ∈ v g ( p tv ) n v,vg P tv g , ( i,j ) ≤ − γ ) , ∀ t, i, j, v g (15)Using Equations (14) and (15), for the assignment rule to be valid it is sufficient to show that β tu, ( i,j ) ≥ γ (1 − γ ) .We can compute a lower bound on the value of β tu, ( i,j ) based on assignments performed in previous stepsand rounds. Specifically, using mathematical induction, we can show that β tu, ( i,j ) ≥ − γ .So, to find the maximum value of γ for which the assignment rule is valid, we take γ such that 1 − γ = γ (1 − γ ) Therefore, the possible value of γ is the solution to the equation γ = (1 − γ ) , which is γ = 0 . Proposition 5
The online algorithm ADAPShare-2 is 0.31767 competitive.
Proof:
The proof involves first showing that the ADAPShare-2 is γ competitive. Now, as from Proposition4, the maximum value of γ for which assignment rule is valid is 0.31767, therefore the algorithm is 0.31767competitive.To show that the ADAPShare-2 is γ competitive, we compute with respect to the optimal, the fraction oftimes any resource u is assigned to any group of type v g . The probability that the resource u is assigned toa group of type v g in round t in step ( i, j ) is given by x ∗ ,tu,v g · γh tv g · P tv g , ( i,j ) · β tu, ( i,j ) · β tu, ( i,j ) · P tv g , ( i,j ) = x ∗ ,tu,v g · γh tv g where first term in the product is the assignment rule, second term is the probability that u is available andthe last term is the probability that v g is available in round t at step ( i, j ).As mentioned before, each group of type v g will be considered for assignment at a total of h tv g steps.Therefore, the expected number of times a resource u is assigned to a group of type v g in round t is given by h tv g · x ∗ ,tu,vg · γh tvg = x ∗ ,tu,v g · γ , i.e., in online case each resource u is matched to group of type v g with probabilityequal to x ∗ ,tu,v g · γ .Therefore, ADAPShare-2 is γ competitive. (cid:4) Please refer to https://tinyurl.com/rjs524p for the detailed proof. orollary 1 The online algorithm ADAPShare- κ (generalization of ADAPShare-2 for any value of κ ) is γ competitive where the value of γ is the solution to the equation γ = (1 − γ ) κ +1 . Proof Sketch:
The proof is along the same lines as the proof for Proposition 5. In the Equation (15),instead of (1 − γ ) , we will have (1 − γ ) κ . Therefore, the value of γ for which assignment rule is valid is thesolution to the Equation γ = (1 − γ ) κ +1 . (cid:4) Hardness Result for Non-Adaptive Algorithms:
Dickerson et.al. [6] prove that no non-adaptive algorithm based on LPSequential can achieve a competitiveratio of more than + o (1) in OM-RR-KAD model. The analysis can be easily extended for the batch arrivalcase when κ = 1. As unit-capacity batch arrival is a special case of multi-capacity OPERA model with all w tu,v g = 0 , if | v g | ≥
2, therefore, no non-adaptive algorithm based on LPShare can achieve a competitiveratio of more than + o (1) for OPERA model. Discussion:
We now provide the justifications for the choices made in the modelling and analysis in section3 and 4.1. (1) We assume that there are b t arrivals in round t and b t is known in advance. However, this isnot at all a strong assumption because by considering a null type vertex in V and p tφ as the probability ofnull vertex, b t can be used to denote the maximum number of arrivals in round t . (2) For theoretical analysisof the solution quality, we ignore the computational complexity of generating exponential number of groupsin OPERA model. For practical purposes, the algorithms provided in [7] can be used to heuristically prunethe exponential set and generate the feasible groups efficiently. The pruned set of groups is used by bothoffline and online algorithms. This is because, if the offline optimal algorithm can generate the groups, asthe type of vertices are known in advance (through the known distribution), the online algorithm can alsouse those groups. In this section, we compare the following five approaches on the empirical competitive ratio metric: • Greedy - Runs an integer optimization at each timestep (based on the current information) to assign therequests/groups to the available offline resources . • Random - Shuffles available requests/groups randomly and then assigns each request/group randomly toan available offline resource. • Alg-OPERA-1 - Algorithm based on the offline optimal LP where match for any available resource u to a vertex or group is performed by looking at the value of x ∗ ,tu,vg q tvg . • Alg-OPERA-2 - Another algorithm based on the offline optimal LP where match for any availableresource u to a vertex or a group is performed by looking at the value of x ∗ ,tu,vg (cid:80) u x ∗ ,tu,vg . • (cid:15) -Greedy - With probability (cid:15) , greedy algorithm is executed and with probability 1 − (cid:15) , Alg-OPERA-1algorithm is executed.The goal of the experiments is to show that the algorithms which use guidance from the offline optimal LP,outperform the myopic approaches , which do not consider future information. All the values in the resultsare computed by taking an average over 10 instances and each instance is run 100 times. Synthetic Dataset:
We first present the results on a synthetic dataset. We use 200 timesteps/rounds andgenerate the unavailability (or time occupied serving requests) time ( c tu,v or c tu,v g ) for each resource andvertex/group pair randomly between 1 and 60. Weights received (revenue) are generated based on revenue Equivalent to the myopic approaches used in practice [7, 8] We provide heuristics, which are close to ADAPShare- κ , as computing β exactly is not always simple and may require largenumber of simulations. We observed that even though these heuristics are non-adaptive, they can achieve empirical competitiveratio higher than the theoretical competitive ratio of ADAPShare- κ . Currently used in practice for multi-capacity resources [7, 8] Capacity T o t a l R e v e nu e GreedyRandom (cid:15) -Greedy Alg-OPERA-1Alg-OPERA-2Optimal (a)
10 30 50
Batch Size E m p i r i c a l C o m p e t i t i v e R a t i o GreedyRandom (cid:15) -Greedy Alg-OPERA-1Alg-OPERA-2 (b)
Figure 3: |U| = 10 , |V| =10, T = 200 (a) Varying κ (b) κ = 2model used by taxi companies – base revenue + 0 . · c tu,v or c tu,v g . The probability of arrival of each vertextype at each round ( p tv ) is also generated randomly. The test instances are generated by sampling the onlinevertices from the generated p tv values. We vary the batch size and capacity and present the representativeresults.Figure 3a shows the total revenue obtained by different algorithms for different values of capacity κ . Thekey observations are:(1) Our online approaches (Alg-OPERA-1 and Alg-OPERA-2) outperform other algorithms, with Alg-OPERA-2 performing better than Alg-OPERA-1 on all the instances.(2) The performance of greedy algorithm decreases with the increase in capacity. Higher capacity providesmore opportunity to serve requests at each timestep. Due to its myopic nature, greedy algorithm servesmore requests initially, keeping the resources occupied for a longer time. On the other hand Alg-OPERA-1and Alg-OPERA-2, based on the guidance provided by the offline optimal LP, ignore some requests/groupswhich have higher c tu,v g value, to serve more requests at future timesteps.(3) Figure 3b shows the empirical value of competitive ratio for different batch sizes. For these experiments,we take the identical value of batch size for all the timesteps. Higher batch size for multi-capacity resourcesprovides an opportunity to group more requests. Therefore, as the batch size increases Alg-OPERA-1 andAlg-OPERA-2 show an improvement in performance. Real World Dataset:
We used the New York Yellow Taxi dataset which contains the records of tripsin Manhattan city. We divided the map of the city into a grid of squares, each 4 by 4 km, which resulted in atotal of 11 squares. Therefore, there can be 121 different types of requests, i.e., |V| = 121 (origin-destinationpairs). We experimented by taking real trips from the taxi dataset. We take the data across 10 days tocompute the p tv values and the average number of requests at each round/timestep, i.e., average value of b t .We run the offline optimal LP with these values and get a solution. The online algorithms are tested onactual instances (10 days) which are different from the ones we used for computing the parameter values.Therefore, the actual batch size b t can be different from the value used by an offline optimal solution. Thetaxis are initialized at random locations and since we are testing the last mile scenario after serving the trips,they come back to their starting location. We observe a high variance in the performance of our algorithmson this dataset during night time (Figure 4a). This is because the distribution of requests during night havehigh variance across days. During the day, the variance in distribution of requests is low, and as a resultour algorithms also show low variance. On an average , Alg-OPERA-1 and Alg-OPERA-2 outperform otheralgorithms on this dataset as well. These results indicate that the algorithms which use the guidance fromoffline optimal solution can consider the future effects of current matches and as a result provide betterperformance. 13 Capacity T o t a l R e v e nu e GreedyRandom (cid:15) -Greedy Alg-OPERA-1Alg-OPERA-2Optimal (a)
Capacity T o t a l R e v e nu e GreedyRandom (cid:15) -Greedy Alg-OPERA-1Alg-OPERA-2Optimal (b)
Figure 4: |U| = 30 , |V| =121, T = 240, Real Dataset (a) 12am (b) 8amWe would like to highlight that, to ensure that the theoretical bound on the competitive ratio holds empiri-cally, correct estimates of probability values ( p tv , β ) are required, which requires running multiple simulations.It is possible to create scenarios, where a high number of simulations are required to get the correct esti-mates (e.g., when all the p tv values are very small and V is large.). In such cases, empirical competitiveratio measured over low number of simulations, will be a wrong indicator. We would also like to mentionthat, it is possible to synthetically create unrealistic scenarios where Greedy algorithm can achieve close tooptimal value (essentially having a revenue model such that the difference between one long trip and multipleshort trips is almost negligible, so myopic decisions do not hurt) and can perform better than the LP basedapproaches. In this paper, we make a fundamental contribution of providing competitive ratios for the challenging onlinemulti-capacity ridesharing problems – where resources or vehicles retain their type after serving the requestsand rejoining the system – with batch arrival of requests. We demonstrate empirically on real and syntheticdatasets that our online heuristics based on offline optimal LP perform well in practice, as compared to themyopic approaches.
This work was partially supported by the Singapore National Research Foundation through the Singapore-MIT Alliance for Research and Technology (SMART) Centre for Future Urban Mobility (FM). We thankSanket Shah, Susobhan Ghosh and Tanvi Verma for providing valuable comments which greatly improvedthe paper.
ReferencesReferences [1] R. M. Karp, U. V. Vazirani, V. V. Vazirani, An optimal algorithm for on-line bipartite matching, in:Proceedings of the twenty-second annual ACM symposium on Theory of computing, ACM, 1990, pp.1452–358.[2] N. R. Devanur, K. Jain, R. D. Kleinberg, Randomized primal-dual analysis of ranking for online bipartitematching, in: Proceedings of the twenty-fourth annual ACM-SIAM symposium on Discrete algorithms,Society for Industrial and Applied Mathematics, 2013, pp. 101–107.[3] P. Jaillet, X. Lu, Online stochastic matching: New algorithms with better bounds, Mathematics ofOperations Research 39 (3) (2013) 624–646.[4] A. Mehta, et al., Online matching and ad allocation, Foundations and Trends R (cid:13) in Theoretical ComputerScience 8 (4) (2013) 265–368.[5] V. H. Manshadi, S. O. Gharan, A. Saberi, Online stochastic matching: Online actions based on offlinestatistics, Mathematics of Operations Research 37 (4) (2012) 559–573.[6] J. P. Dickerson, K. A. Sankararaman, A. Srinivasan, P. Xu, Allocation problems in ride-sharing plat-forms: Online matching with offline reusable resources, arXiv preprint arXiv:1711.08345 (2017).[7] J. Alonso-Mora, S. Samaranayake, A. Wallar, E. Frazzoli, D. Rus, On-demand high-capacity ride-sharingvia dynamic trip-vehicle assignment, Proceedings of the National Academy of Sciences 114 (3) (2017)462–467.[8] M. Lowalekar, P. Varakantham, P. Jaillet, ZAC: A zone path construction approach for effective real-time ridesharing, in: Proceedings of the Twenty-Ninth International Conference on Automated Planningand Scheduling, ICAPS 2018, Berkeley, CA, USA, July 11-15, 2019., 2019, pp. 528–538.[9] L. W. Beineke, The four color problem: Assaults and conquest (thomas saaty and paul kainen), SIAMReview 22 (2) (1980) 241–243.[10] G. Aggarwal, G. Goel, C. Karande, A. Mehta, Online vertex-weighted bipartite matching and single-bidbudgeted allocations, in: Proceedings of the twenty-second annual ACM-SIAM symposium on DiscreteAlgorithms, SIAM, 2011, pp. 1253–1264.[11] J. Feldman, N. Korula, V. Mirrokni, S. Muthukrishnan, M. P´al, Online ad assignment with free disposal,in: International workshop on internet and network economics, Springer, 2009, pp. 374–385.[12] E. Lee, S. Singla, Maximum matching in the online batch-arrival model, in: International Conferenceon Integer Programming and Combinatorial Optimization, Springer, 2017, pp. 355–367.[13] Z. Huang, N. Kang, Z. G. Tang, X. Wu, Y. Zhang, X. Zhu, How to match when all vertices arrive online,in: Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, ACM, 2018,pp. 17–29.[14] I. Ashlagi, M. Burq, C. Dutta, P. Jaillet, A. Saberi, C. Sholley, Maximum weight online matching withdeadlines, arXiv preprint arXiv:1808.03526 (2018).[15] I. Ashlagi, M. Burq, C. Dutta, P. Jaillet, A. Saberi, C. Sholley, Edge weighted online windowed matching,in: Proceedings of the 2019 ACM Conference on Economics and Computation, ACM, 2019, pp. 729–742.[16] J. P. Dickerson, K. A. Sankararaman, K. K. Sarpatwar, A. Srinivasan, K.-L. Wu, P. Xu, Online re-source allocation with matching constraints, in: Proceedings of the 18th International Conference onAutonomous Agents and MultiAgent Systems, International Foundation for Autonomous Agents andMultiagent Systems, 2019, pp. 1681–1689.[17] K. A. Sankararaman, Sequential decision making with limited resources, Ph.D. thesis, University ofMaryland, College Park (2019). 15 PBatch: max (cid:88) t ∈ T (cid:88) u ∈U (cid:88) v ∈V w tu,v · x tu,v s.t. (cid:88) u ∈U x tu,v ≤ q tv ::: ∀ v, t (16) (cid:88) t (cid:48)
Proposition 6
The optimal value of the LP presented in Table 3 is a valid upper bound on the offlineoptimal value.
Proof:
To show that the optimal value of the LP provides a valid upper bound on the offline optimal value,we prove that the expected value of the optimal matching is less than or equal to the optimal value of the LP.We have two distributions, first one corresponding to the arrival of vertices ( p tv ) and another correspondingto the number of rounds of unavailability ( c tu,v ). To prove that the optimal value of LP provides a valid upperbound in the presence of both distributions, similar to earlier works [17], we need to make an assumptionthat the optimal assignment only depends on the arrival distribution and is independent of the value of c tu,v .Consider a realization of arrivals denoted by sequence a . Let m tv ( a ) denotes the number of vertices oftype v arriving in round t for arrival sequence a . Similarly, consider a realization of the number of roundsof unavailability denoted by sequence r , where c tu,v ( r ) denotes the number of rounds for which resource u becomes unavailable on matching with vertex of type v in sequence r . Let δ ( c t (cid:48) u,v ( r ) > t − t (cid:48) ) is an indicatorvariable denoting that the number of rounds for which resource u becomes unavailable on being assigned tovertex of type v in round t (cid:48) is greater than t − t (cid:48) rounds in sequence r . Now, for any arrival sequence a andany realization of the number of rounds of unavailability r , the offline solution can be computed by solvingthe optimization program in Table 4 .As mentioned before, we make an assumption that the optimal assignment is independent of the real-ization of the number of rounds of unavailability, i.e., it only depends on a and not on r . Therefore, weuse x ∗ ( a ) to denote the optimal solution of the formulation in Table 4 for sequence a and r . The expectednumber of times edge ( u, v ) is matched at t is given by (cid:80) a x ∗ ,tu,v ( a ) · P ( a ). To prove that, the LP in Table3 is a valid upper bound on the offline optimal value, we show that ∀ u, v, t (cid:80) a x ∗ ,tu,v ( a ) · P ( a ) is a feasiblesolution to the LP.The optimization in Table 4 is solved for each sequence a and r . As x ∗ ( a ) denotes the optimal assignmentfor the sequence a and r , therefore, x ∗ ( a ) satisfies the constraints of the formulation in Table 4. Hence, weget (cid:88) u ∈U x ∗ ,tu,v ( a ) ≤ m tv ( a ) ::: ∀ v, t (19) (cid:88) t (cid:48)
Proposition 7
The online algorithm ADAPBatch is competitive. Proof:
The proof proceeds in two steps:1. We first prove that the maximum value of γ for which the assignment rule of ADAPBatch is valid is .2. Next, we prove that the online algorithm is γ competitive. As the maximum value of γ for which theassignment rule is valid is , therefore, the online algorithm is competitive. a and r are independently drawn from the distributions. (cid:88) t ∈ T (cid:88) u ∈U (cid:88) v ∈V w tu,v · x tu,v ( a ) (25) s.t. (cid:88) u ∈U x tu,v ( a ) ≤ m tv ( a ) ::: ∀ v, t (26) (cid:88) t (cid:48)
0, therefore, we only show the computation for the value of β u,b . β tu,i for any i and t is computed by computing the probability that u is assigned to any v before round t step i such that it has not rejoined the system yet. β u,b = 1 − (cid:88) v b − (cid:88) i =1 β u,i · p v · x ∗ , u,v · γb · p v · β u,i = 1 − ( b − · (cid:88) v x ∗ , u,v · γb ≥ − γ ( As b ≥ t = 1, we prove it by induction. Assume that it is valid for all t (cid:48) < t , i.e., in online casethe edge ( u, v ) is matched x ∗ ,tu,v · γ times in round t . Therefore, β tu, = 1 − (cid:88) v (cid:88) t (cid:48)
W S = (cid:81) | v g | i =0 ( b t − i ) (cid:81) v ∈ v g ( n v,v g )!Therefore, q v g = (cid:81) | vg | i =0 ( b t − i ) (cid:81) v ∈ vg ( n v,vg )! · (cid:81) v ∈ v g ( p tv ) n v,vg D Details about the Optimization Formulation in Table 5
Let the number of vertices of type v available in round t is m tv . We use m tv g to denote the number of groupsof type v g which can be formed in round t . n v,v g denotes the number of vertices of type v present in thegroup of type v g . Let x tu,v g denotes the assignment of resource u to the group of type v g . Let y tv,v g denotes21he flow on the edge from v to v g where v is a part of the group of type v g . Therefore, we will have followingflow preservation constraints: (cid:88) t (cid:48) (cid:88) v g (cid:48) ∈V g x tu,v g (cid:48) · P r ( c t (cid:48) u,v g (cid:48) > t − t (cid:48) ) + (cid:88) v g ∈V g x tu,v g ≤ ∀ u, t (38) (cid:88) u ∈U x tu,v g ≤ m tv g ::: ∀ v g , t (39) (cid:88) v g ; v ∈ v g y tv,v g · n v,v g ≤ m tv ::: ∀ v, t (40) (cid:88) v ∈ v g n v,v g · y tv,v g ≤ sizeof ( v g ) · m tv g ::: ∀ v g , t (41) y tv,v g = (cid:88) u ∈U x tu,v g ::: ∀ v g ; v ∈ v g , t (42)The Equation (42) is the conditional equal flow constraint which states that the total incoming flow to agroup will be equal to the total outgoing flow to each of the vertex which is a part of the group.Substituting Equation (42) in Equation (40), we get (cid:88) v g ; v ∈ v g (cid:88) u ∈U x tu,v g ≤ m tv ::: ∀ v, t (43)As m tv g ≥ min ( m tv ), if m tv is an integer, therefore, Equation (39) is redundant in the presence of Equation(43).Similarly on substituting Equation (42) in Equation (41), we get, (cid:88) v ∈ v g n v,v g (cid:88) u ∈U x tu,v g ≤ sizeof ( v g ) · m tv g ::: ∀ v g , t (44) (cid:88) u ∈U x tu,v g ≤ m tv g ::: ∀ v g , t (45)This is same as Equation (39) which is redundant.Therefore, we get the optimization formulation provided in Table 6. Please note that we keep theredundant constraint in the optimization formulation.We replace m tv g and m tv by q tv g and q tv which denote the expected number of groups/vertices. Theequations remains same as Equations (38) - (42).But unlike earlier case, we can not say that Equation (39) is redundant in presence of Equation (43).This is because q tv can lie between 0 and 1.Therefore, we get the optimization formulation presented in Table 5. E Proof of Proposition 3
Proposition 8
The optimal value of the LP presented in Table 5 is a valid upper bound on the offlineoptimal value.
Proof:
The proof is similar to the proof of Proposition 1.To show that the LP provides a valid upper bound on the offline optimal solution, we prove that theexpected value of matching is less than or equal to the optimal solution of LP. We have two distributions,one corresponding to the arrival of vertices ( p tv ) and another corresponding to the number of rounds ofunavailability ( c tu,v g ). To prove that the optimal value of the LP provides a valid upper bound in presence of22oth distributions, similar to earlier works [17], we need to make an assumption that the optimal assignmentonly depends on the arrival distribution and is independent of the value of c tu,v g .Consider a realization of arrivals denoted by sequence a . Let m tv ( a ) denotes the number of vertices oftype v arriving in round t for arrival sequence a and m tv g ( a ) denotes the number of groups of type v g whichcan be formed in round t in the arrival sequence a . Similarly, consider a realization of the number of roundsof unavailability denoted by sequence r , where c tu,v g ( r ) denotes the number of rounds for which resource u becomes unavailable on matching with group of type v g in sequence r . δ ( c t (cid:48) u,v g ( r ) > t − t (cid:48) ) is an indicatorvariable denoting that the number of rounds for which resource u becomes unavailable on being assigned togroup of type v g in round t (cid:48) is greater than t − t (cid:48) . Now, for any arrival sequence a and any realization ofthe number of rounds of unavailability r , the offline solution can be computed by solving the optimizationprogram in Table 6 .As mentioned before, we make an assumption that the optimal assignment is independent of the realiza-tion of the number of rounds of unavailability, i.e., it only depends on a and not r . Therefore, we use x ∗ ( a )to denote the optimal solution of the formulation in Table 6 for sequence a and r . The expected number oftimes ( u, v g ) is matched at t is given by (cid:80) a x ∗ ,tu,v g ( a ) · P ( a ). To prove that, the optimal value of LP in Table5 is a valid upper bound on the optimal solution, We show that ∀ u, v g , t (cid:80) a x ∗ ,tu,v g ( a ) · P ( a ) is a feasiblesolution to the LP.The optimization in Table 6 is solved for each sequence a and r . As we used x ∗ ( a ) to denote the optimalsolution for the sequence a and r , therefore, x ∗ ( a ) satisfies the constraints of formulation in Table 6. Hence,we get (cid:88) t (cid:48)
Example 1
Suppose V = { v , v } , b t = 3 . Out of the three incoming vertices - two vertices are of type v and one vertex is of type v . To distinguish between two vertices of type v , we refer them by v (1) and v (2) .On random shuffling of these three vertices, they are present in the following order:Sequence : ( v (1) , v , v (2) ) tep (1 , represent that the first and second vertex in the above sequence is considered. We define anordering over types of vertices. In this example, let v ¿ v . So, whenever we are considering group formedwith these two types of vertices, we will always consider ( v , v ) and not ( v , v ) . Therefore, in this example,we will consider the group at (1 , and (3 , not at (2 , or (2 , . This ensures that we are processing eachgroup only once. Step v g Step v g Step v g (1,1) v (1) (2,1) ( v , v (1)) (3,1) ( v (2) , v (1))(1,2) ( v (1) , v ) (2,2) v (3,2) ( v (2) , v )(1,3) ( v (1) , v (2)) (2,3) ( v , v (2)) (3,3) v (2) In another arrival sequence, two vertices are of type v and one vertex is of type v . To distinguishbetween these two vertices of type v , we refer to them by v (1) and v (2) . On random shuffling of thesethree vertices, they are present in following order:Sequence : ( v (1) , v , v (2) )In this case the groups will be processed as shown in the below table, Step v g Step v g Step v g (1,1) v (1) (2,1) ( v , v (1)) (3,1) ( v (2) , v (1))(1,2) ( v (1) , v ) (2,2) v (3,2) ( v (2) , v )(1,3) v (1) , v (2)) (2,3) ( v , v (2)) (3,3) v (2) So across these 2 sequences, we can see that the group of type ( v , v ) is processed at 4 places: (1 , , , (2 , , – Similarly if we create more sequences, we will observe that the group of type ( v , v ) can be considered at6 places (all places except (1 , , , ). G Complete proof of Proposition 4
Proving β tu, ( i,j ) ≥ − γ : To prove that β tu, ( i,j ) ≥ − γ , we use mathematical induction, at t = 1, initially all u are available,therefore, β u, (1 , = 1Please note that β tu, ( i,j ) keeps on decreasing as i, j increases for fixed u and t , therefore, we only showfor the value of β u, ( b ,b ) . β u, ( b ,b ) = 1 − (cid:88) v g b − (cid:88) i =1 b (cid:88) j =1 x ∗ , u,v g · γh v g · P v g , ( i,j ) · β u, ( i,j ) · P v g , ( i,j ) · β u, ( i,j ) − (cid:88) v g b − (cid:88) j =1 x ∗ , u,v g · γh v g · P v g , ( i,j ) · β u, ( i,j ) · P v g , ( i,j ) · β u, ( i,j ) (60)As mentioned before in ADAPShare- κ description, each group will be considered for assignment at h tv g steps, and at step ( b t , b t ), a single vertex will be considered, therefore, β u, ( b ,b ) ≥ − (cid:88) v g ( x ∗ , u,v g · γ ) (61)As maximum value of (cid:80) v g x ∗ ,tu,v g is 1. Therefore, β u, ( b ,b ) ≥ − γ .As it is valid for t = 1, we prove it by induction. Assume that it is valid for all t (cid:48) < t , i.e., in online casethe resource u is matched x ∗ ,tu,v g · γ times in round t to group of type v g . Therefore,25 tu, (1 , = 1 − (cid:88) v g (cid:48) (cid:88) t (cid:48)
Proposition 9
The online algorithm ADAPShare is γ competitive (The value of γ is the solution to theequation (1 − γ ) ( κ +1) = γ ). Proof:
Using Proposition 5(in the paper), we can show that ADAPShare- κ is γ competitive. Therefore,we need to find the maximum value of γ for which the assignment rule for ADAPShare- κ is valid. Wehighlight the differences in comparison to proof of Proposition 4.We can now group κ vertices together from the b t vertices arriving in round t , therefore, we define ( b t ) κ steps in our algorithm. 26imilar to ADAPShare-2, Step ( i , i , ..., i κ ) ( i (cid:54) = i (cid:54) = ... (cid:54) = i κ ) denotes that the group formed by vertexat i th , i th ... and ..i thκ label is considered. Step ( i, i, .., i ) denotes that a group of size 1 with one vertex at i th position is considered. Similarly, we can define steps where groups of size 2 to κ − s will be considered at s − (cid:81) i =0 ( b t − i ) steps. There will be ( b t ) κ − κ (cid:80) s =1 s (cid:81) i =0 ( b t − i ) steps where algorithmdoes not do anything, i.e., none of the groups is considered for assignment at these steps.Similar to ADAPShare-2 case, we find the maximum value of (cid:81) v ∈ vg ( p tv ) nv,vg P tvg, ( i ,i ,..,iκ ) and then show that β tu, ( i ,i ,...,i κ ) ≥ γ · (cid:81) v ∈ vg ( p tv ) nv,vg P tvg, ( i ,i ,..,iκ ) for this maximum value.Please note that P tv g , ( i ,i ,..,i κ ) = (cid:81) v ∈ v g P tv,i v , ( i ,i ,..,i κ ) . Therefore, we compute P tv,i v , ( i ,i ,..,i κ ) ∀ v where P tv,i v , ( i ,..,i κ ) denotesthe probability that vertex of type v labeled as i thv vertex is available at step ( i , .., i κ ). Please note that P tv,i, (1 , ,.., = p tv ∀ i . P tv,i v , ( i ,..,i κ ) = p tv − (cid:88) u (cid:88) v g (cid:48) ; v ∈ v g (cid:48) i − (cid:88) j =1 .. i κ − (cid:88) j κ =1 x tu,v g (cid:48) · γh tv g · P tv g (cid:48) , ( j ,..,j κ ) · β tu, ( j ,..,j κ ) · P tv g (cid:48) , ( j ,..,j κ ) · β tu, ( j ,..,j κ ) (66)Now, similar to κ = 2 case, in the above equation we only consider the steps where vertex of type v haslabel i v . Let e tv g ,v,i v , ( i ,..,i κ ) denote the maximum number of steps (for group of type v g ) which can affectthe computation of P tv,i v , ( i ,..,i κ ) , then P tv,i v , ( i ,..,i κ ) = p tv − (cid:88) u (cid:88) v g (cid:48) ; v ∈ v g (cid:48) e tv g ,v,i v , ( .. ) · x tu,v g (cid:48) · γh tv g (67)And e tv g ,v,i v , ( i ,..,i κ ) = (cid:81) | vg | i =1 ( b t − i )( (cid:81) v (cid:48)∈ vg ; v (cid:54) = v (cid:48) ( n v (cid:48) ,vg )!)( n v,vg − Therefore, e tvg,v,iv, ( i ,..,iκ ) h tvg = n v,vg b t Therefore, we can get following by proceeding in similar way as the analysis for κ = 2 P tv,i v , ( i ,..,i κ ) ≥ p tv − γ · p tv (68) P tv,i v , ( i ,..,i κ ) ≥ (1 − γ ) · p tv (69)Similar to κ = 2, we can use mathematical induction to show β tu, ( i ,..,i κ ) ≥ γ (1 − γ ) κ Therefore, maximumvalue of γ for which assignment rule is valid is the solution to the equation, γ = (1 − γ ) κ +1 lgorithm 3: ADAPShare- κ ( γ ) for t < T do Generate b t uniform random numbers and sort the vertices in order of generated random numbers.Label the vertices from 1 to b t . i = 1 , i = 1 , ..., i κ = 1 while i ≤ b t || i ≤ b t || ... || i κ ≤ b t do v g = group formed at step i , i , ..., i κ based on the labels assigned to the vertices. if v g is a valid group then If E ∗ ,v g ,t ! = φ , then choose ( u, v g ) ∈ E ∗ ,v g ,t with probability p where p = x ∗ ,tu,vg · γh tvg · P tvg, ( i ,i ,..,iκ ) · β tu, ( i ,..,iκ ) Update E ∗ , ∗ ,t ,available groups based on the group considered in previous steps. Increment the step i = 1 , i = 1 , ..., i κκ