Algorithms for Trip-Vehicle Assignment in Ride-Sharing

We investigate the ride-sharing assignment problem from an algorithmic resource allocation point of view. Given a number of requests with source and destination locations, and a number of available car locations, the task is to assign cars to requests with two requests sharing one car. We formulate this as a combinatorial optimization problem, and show that it is NP-hard. We then design an approximation algorithm which guarantees to output a solution with at most 2.5 times the optimal cost. Experiments are conducted showing that our algorithm actually has a much better approximation ratio (around 1.2) on synthetically generated data.  The sharing economy is estimated to grow from $14 billion in 2014 to $335 billion by 2025 . As one of the largest components of sharing economy, ride-sharing provides socially efficient transport services that help to save energy and to reduce congestion. Uber has 40 million monthly active riders reported in October 2016 (Kokalitcheva 2016) and Didi Chuxing has more than 400 million users(Tec 2017). A large portion of the revenue of these companies comes from ride sharing with one car catering two passenger requests, which is the topic investigated in this paper. A typical scenario is as follows: There are a large number of requests with pickup and drop-off location information, and a large number of available cars with current location information. One of the tasks is to assign the requests to the cars, with two requests for one car. The assignment needs to be made socially efficient in the sense that the ride sharing does not incur much extra traveling distance for the drivers or and extra waiting time for the passengers. In this paper we investigate this ride-sharing assignment problem from an algorithmic resource allocation point of view. Formally, suppose that there are a set R of requests {(si, ti) ∈ R : i = 1, . . . ,m} where in request i, an agent is at location si and likes to go to location ti. There are also a set D of taxis {dk ∈ R : k = 1, . . . , n}, with taxi k currently at location dk. The task is to assign two agents i and j to one taxi k, so that the total driving distance is as small as possible. The distance measure d(x, y) here can be Copyright c  Manhattan distance (i.e., 1-norm), Euclidean distance (i.e., 2-norm), or distance on graphs if a city map is available. Here for any fixed tuple (k, {i, j}), the driver of taxi k has four possible routes, from the combination of the following two choices: he can pick agent i first or agent j first, and he can drop agent i first or drop agent j first. We assume that the driver is experienced enough to take the best among these four choices. Thus we use the total distance of this best route as the driving cost of tuple (k, {i, j}), denoted by cost(k, {i, j}). We hope to find an assignment M = {(k, {i, j}) : 1 ≤ i, j ≤ m, 1 ≤ k ≤ n} that assigns the maximum number of requests, and in the meanwhile with the cost(M) = ∑ (k,{i,j})∈M cost(k, {i, j}), summation of the driving cost, as small as possible. Here an assignment is a matching in the graph in the sense that each element in R∪D appears at most once in M . In this paper, we formulate this ride-sharing assignment as a combinatorial optimization problem. We show that the problem is NP-hard, and then present an approximation algorithm which, on any input, runs in time O(n) and outputs a solution M with cost(M) at most 2.5 times the optimal value. Our algorithm does not assume specific distance measure; indeed it works for any distance1. We conducted experiments where inputs are generated from uniform distributions and Gaussian mixture distributions. The approximation ratio on these empirical data is about 1.1-1.2, which is much better than the worst case guarantee 2.5. In addition, the results indicate that the larger n and m are, the better the approximation ratio is. Considering that n and m are very large numbers in practice, the performance of our algorithm may be even more satisfactory for practical scenarios. Related Work Ridesharing has become a key feature to increase urban transportation sustainability and is an active field of research. Several pieces of work have looked at dynamic ridesharing (Caramia et al. 2002; Fabri and Recht 2006; Agatz et al. 2012; Santos and Xavier 2013; Alonso-Mora et al. 2017), and multi-hop ridesharing (Herbawi and Weber 2011; Drews and Luxen 2013; Teubner and Flath 2015). That is, the algorithm only needs that d is nonnegative, symmetric and satisfies the triangle inequality. The Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18)