# Flow Equilibria via Online Surge Pricing

We explore issues of dynamic supply and demand in ride sharing services such as Lyft and Uber, where demand fluctuates over time and geographic location. We seek to maximize social welfare which depends on taxicab and passenger locations, passenger valuations for service, and the distances between taxicabs and passengers. Our only means of control is to set surge prices, then taxicabs and passengers maximize their utilities subject to these prices. We study two related models: a continuous passenger-taxicab setting, similar to the Wardrop model, and a discrete passenger-taxicab setting. In the continuous setting, every location is occupied by a set of infinitesimal strategic taxicabs and a set of infinitesimal non-strategic passengers. In the discrete setting every location is occupied by a set of strategic agents, taxicabs and passengers, passengers have differing values for service. We expand the continuous model to a time-dependent setting and study the corresponding online environment. Surge prices are in passenger-taxicab equilibrium if there exists a min cost flow that moves taxicabs about such that (a) every taxicab follows a best response, (b) all strategic passengers at v with value above the surge price r_v for v, are served and (c) no strategic passengers with value below r_v are served (non-strategic infinitesimal passengers are always served). This paper computes surge prices such that resulting passenger-taxicab equilibrium maximizes social welfare, and the computation of such surge prices is in poly time. Moreover, it is a dominant strategy for passengers to reveal their true values. We seek to maximize social welfare in the online environment, and derive tight competitive ratio bounds to this end. Our online algorithms make use of the surge prices computed over time and geographic location, inducing successive passenger-taxicab equilibria.

## Authors

• 8 publications
• 62 publications
• 1 publication
• ### Price Setting on a Network

Most products are produced and sold by supply chain networks, where an i...
04/14/2019 ∙ by Toomas Hinnosaar, et al. ∙ 0

• ### Spatio-Temporal Pricing for Ridesharing Platforms

Ridesharing platforms match drivers and riders to trips, using dynamic p...
01/11/2018 ∙ by Hongyao Ma, et al. ∙ 0

• ### Schelling Games on Graphs

We consider strategic games that are inspired by Schelling's model of re...
02/21/2019 ∙ by Edith Elkind, et al. ∙ 0

• ### The Competitive Effects of Variance-based Pricing

In many markets, like electricity or cloud computing markets, providers ...
01/31/2020 ∙ by Ludwig Dierks, et al. ∙ 0

• ### Social Welfare and Profit Maximization from Revealed Preferences

Consider the seller's problem of finding "optimal" prices for her (divis...
11/06/2017 ∙ by Ziwei Ji, et al. ∙ 0

• ### From Recommendation Systems to Facility Location Games

Recommendation systems are extremely popular tools for matching users an...
09/09/2018 ∙ by Omer Ben-Porat, et al. ∙ 0

• ### Balancing Cost and Dissatisfaction in Online EV Charging under Real-time Pricing

We consider an increasingly popular demand-response scenario where a use...
01/15/2019 ∙ by Hanling Yi, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## Abstract

We explore issues of dynamic supply and demand in ride sharing services such as Lyft and Uber, where demand fluctuates over time and geographic location. We seek to maximize social welfare which depends on taxicab locations, passenger locations, passenger valuations for service, and the distances between taxicabs and passengers. Our only means of control is to set surge prices, then taxicabs and passengers maximize their utilities subject to these prices.

We study two related models: a continuous passenger-taxicab setting, similar to the Wardrop model, and a discrete (atomic) passenger-taxicab setting. In the continuous setting, every location is occupied by a set of infinitesimal strategic taxicabs and a set of infinitesimal non-strategic passengers. In the discrete setting every location is occupied by a set of strategic agents, taxicabs and passengers, passengers have differing values for service.

We expand the continuous model to a time-dependent setting and study the corresponding online environment.

The utility for a strategic taxicab that drives from to and picks up a passenger at is the surge price at minus the distance from to . The utility for a strategic passenger at that gets service is the value of the service to the passenger minus the surge price at .

Surge prices are in passenger-taxicab equilibrium if there exists a min cost flow that moves taxicabs about such that (a) every taxicab follows a best response, (b) all strategic passengers at with value above the surge price for , are served and (c) no strategic passengers with value below are served (non-strategic infinitesimal passengers are always served).

This paper computes surge prices such that resulting passenger-taxicab equilibrium maximizes social welfare, and the computation of such surge prices is in poly time. Moreover, it is a dominant strategy for passengers to reveal their true values.

We seek to maximize social welfare in the online environment, and derive tight competitive ratio bounds to this end. Our online algorithms make use of the surge prices computed over time and geographic location, inducing successive passenger-taxicab equilibria.

## 1 Introduction

In the sharing economy111Also known as the “gig” economy. individual self-interested suppliers compete for customers. According to PWC, the sharing economy is projected to exceed billion USD within 8 years. Lyft and Uber are prime examples of such systems. According to [16, 11] it is the users who gain the majority of the surplus from such systems, and significantly so. Contrawise, many studies suggest negative societal issues in the sharing economy (e.g., see [20, 12, 21, 3]).

Unlike salaried employees of livery firms, drivers for Uber (and other “gig” suppliers) are free to decide when they are working and what calls/employment to accept. E.g., drivers can refuse to accept a call if it is too far away. To increase supply (and reduce demand) Uber introduced “surge pricing” which is a multiplier on the base price when demand outstrips supply. The surge price can be different at different locations.

In the past pricing schemes resulted in what was theorized to be negative work elasticity [6]. In their work it is suggested that drivers impose upon themselves “income targets”. This means that drivers will work until they reach their target income for the day causing them to extend their hours in times of low payouts. Recent studies suggest that this is false, surging prices in times of peak demand seems to conjure positive work elasticity [8], allowing supply and demand to balance more efficiently.

### 1.1 Network Model, Surge Pricing, Utility, and Passenger-Taxicab Equilibria

Our goal is to maximize social welfare, defined as the sum of valuations of the users serviced by taxicabs, minus the cost associated with providing such service. We do so by setting surge prices (one per location), and let the system reach equilibrium. Our surge pricing schemes have several additional features such as envy freeness.

We consider two related settings:

• A continuous setting where supply and demand consist of infinitesimal quanta, supply and demand are modeled as fractional quantities at locations. This is analogous to the non-atomic traffic model used in Wardrop equilibria [24].

• Here we assume that the taxicabs are strategic and respond to changing surge prices whereas passengers are non-strategic so that demand is insensitive to price (alternately, one may view these passengers as having high value for service).

• The cost for a taxicab at location to serve a customer at location is the distance from to .

• Our goal here is to set a surge price at every location so as to incentivize taxicabs to act in a way that maximizes social welfare, i.e., all possible demand is serviced while the sum of distances traversed is minimized.

• A discrete setting where both taxicabs and passengers are strategic, and every taxicab and passenger is associated with some location.

• In this setting both demand and supply may change as a function of the surge price. Every passenger has a value for service and every taxicab has a cost for service at a given location, e.g., the distance to the location.

• Our goal here is to maximize social welfare (the sum of the values for the served customers minus the sum of costs of the taxicabs to do so).

• At every location , we set a surge price , that incentivizes taxicabs to serve passengers in a manner that maximizes social welfare.

• Moreover, maximizing social welfare is not only in equilibrium but also envy free.

• Every passenger at whose value is strictly greater than is served, and no passenger at with value strictly less than is served.

We define the utility for a taxicab at to serve a passenger at as the surge price at , , minus the distance from to . A passenger at with value has utility to be served by a taxicab, and utility zero if she takes no taxicab. Clearly, a passenger at with will refuse to take a taxicab.

We introduce the notion of a passenger-taxicab equilibria, for both continuous and discrete settings. A flow is a mapping from the current supply to some new supply. A flow has an associated cost which is the sum over edges of the flow along the edge times the length of the edge. A flow is said to be a min cost flow that maps the current supply to the new supply if it achieves the minimal cost for moving the current supply to the new supply (this cost is also called the min earthmover cost).

A passenger-taxicab equilibria consists of a vector of surge prices

, where is the surge price at location , current supply , new supply and demand , such that, for any min cost flow from to , every taxicab and every passenger maximize their utility. I.e., no taxicab can improve its utility by doing anything other than following the flow, every passenger at who has value greater than is in and is served. Every passenger at who has value less than is not served.

The surge prices are poly time computable. In the continuous setting this is polynomial in the number of locations, in the discrete setting this is polynomial in the number of passengers and taxicabs.

### 1.2 Maximizing Social Welfare in an Online Setting via Surge Pricing

We consider an online setting based on the continuous setting, where the time progresses in discrete time steps. In each time step the following occurs: First, a new demand allocation appears. Second, the online algorithm determines a new supply. Given an allocation of supply and demand, the demand served at a location is the minimum between the supply and demand at the location. The social welfare is the difference between the total demand served and the total movement cost, summed over all locations and time steps. The main new crux of our model is that the online algorithm (principal) can not impose a new supply allocation, but is limited to setting surge prices. If flow is a flow equilibrium arising from these surge prices — strategic suppliers follow flow . Our results on surge prices for flow equilibria imply that the online algorithm has flexibility in selecting the desired supply.

Trivially, for any metric, a simple algorithm that randomizes the start setting and doesn’t move achieves a competitive ratio, where is the number of locations. However, If the costs of moving from any location to any other location is 1, we give an optimal competitive ratio of . If the demand sequence has the property that at any time and location the demand does not exceed (), then we show a tight competitive ratio bound of . For more general metric spaces we show mainly negative results. Specifically, if all the distances are we show that the competitive ratio is no better than , which implies an optimal competitive ratio of for .

Another extension we consider is when the average difference between successive demand vectors is bounded by (in total variation distance). In this case we show that simply matching supply to the current demand gives a competitive ratio of and show that the competitive ratio can not be better than (in the case that all the distances are ).

### 1.3 Related Work

It has been observed in taxicab services that a mismatch between supply and demand, along with first-in-first-out scheduling of service calls, without restricting the “call radius”, results in reduced efficiency and even market failure [1, 26]. This happens because taxicabs are dispatched to pick up customers at great distance because no closer taxicab is currently available, more time is wasted traveling to pick up clients, and the system performance degrades. Recent papers [9, 7] study how changing surge prices over time allow one to avoid such issues. These papers do not consider the issue of having geographically varying surge prices.

Assuming a stochastic passenger arrival rate, [2] uses a queue theoretic approach to model driver incentives in the system. The paper considers a simplistic dynamic pricing scheme, where there are two different pricing schemes for each node depending on the amount of drivers at said node. This model is compared to a simple flat rate. Drivers are assumed to calculate their incentives over several rides. The paper concludes that the dynamic pricing scheme can only achieve the welfare of the flat rate. However, the dynamic pricing scheme allows for the manager to have more room for error in calculating what the optimal rates are.

A central problem in handling a centralized taxi system involves routing empty cars between regions . Within the centralized mechanism, [5] shows that, assuming stochastic arrival of passengers, an optimal static strategy (i.e.

, one that does not change it’s routing policy based on current shortages) can be calculated by solving a linear programming problem.

Recently, and independently, a similar problem was studied in [18]. In their model, selfish taxicabs seek to maximize revenue over time. There is no explicit cost for travel, one loses opportunities by taking long drives. They derive prices in equilibria that maximize the sum of passenger valuations, but ignore travel costs. In contrast, we ignore the time dimension and focus on the passenger valuations and travel costs.

Competitive analysis of online algorithms [23, 22, 15] considers a worst case sequence of online events with respect to the ratio between the performance of an online algorithm and the optimal performance. In a centralized setting, task systems, [4], can be used to model a wide variety of online problems. Events are arbitrary vectors of costs associated with different states of the system, and an online algorithm may decide to switch states (at some additional cost). A strategic version of this problem, for a single agent, was considered in [10] where a deterministic incentive compatible mechanism was given. The competitive ratio for incentive compatible task system mechanisms is where is the number of states. We cannot use the incentive compatible task system mechanisms from [10] for two reasons: (1) in our setting there are a large number of strategic agents (many Uber drivers) split amongst a variety of different [task system] states (locations) rather than one such agent in a single state, and (2) the suppliers have both profits (payments) and loss (relocation).

Competitive analysis of the famous -server problem [19] has largely driven the field of online algorithms. A variant of the -server problem is known as the -taxicab problem [13, 25]. Although the problem we consider herein and the -taxicab problem both seek efficient online algorithms, and despite the name, the nature of the -taxicab problem is quite different from the problem considered in this paper. In the -taxicab problem a single request occurs at discrete time steps and a centralized control routes taxicabs to pick up passengers, seeking to minimize the distances traversed by taxis while empty of passengers. Taxicabs are not selfish suppliers, and all requests must be satisfied. This is quite different from our setting where both demand and supply are spread about geographically, there are many strategic suppliers, and not all demand must be served.

## 2 Model and Notation

### 2.1 The Continuous Passenger-Taxicab Setting

We model the network as a finite metric space , where is the distance between vertices . I.e., is the cost to a taxicab to switch between vertices and . Infinitesimally small taxicabs reside in the vertices .

Demand and supply are vectors in that sum to one. Given demand and current supply , we incentivize strategic taxicabs so that current supply becomes new supply which services the demand .

If the demand in vertex is , and the new supply in vertex is , then the minimum of the two is the actual demand served (in vertex ). Note that if the two are not identical then there are either unhappy passengers (without service) or unhappy taxicabs (with no passengers to service). Formally,

###### Definition 2.1.

we define the demand served, as follows:

• The demand served in vertex , , is the minimum of and , i.e., .

• Given a demand vector and a supply vector , the total demand served is .

Switching supply from to is implemented via a flow . A flow from to is a function that has the following properties:

• For all , .

• For all , .

• For all , .

We define the earthmover distance between supply vectors,

###### Definition 2.2.

The cost of flow is . The earthmover distance from supply vector to supply vector is

 em(s,s′)=min\rm flows f from s to s′em(f).

We assume that switching supply from to is implemented via a flow of minimal cost. Note that there may be multiple flows with the same minimal cost — see Figures 2 and 3.

In order to incentivize our strategic taxicabs to move to a new supply vector, we use surge pricing in vertices.

###### Definition 2.3.

Surge pricing is a vector, , where is the payment to a taxicab that serves demand in vertex .

We define the utility for an infinitesimal taxicab, given surge pricing , as follows.

###### Definition 2.4.

Given supply , new supply , surge prices , demand , and a min cost flow from to , the utility for a taxicab that switches from vertex to vertex is

To motivate the above definition of utility , of switching from to , consider the following:

• The probability of serving a passenger in vertex

is . This follows since:

• If passengers outnumber taxicabs in vertex then any such taxicab will surely serve a passenger.

• Alternately, if taxicabs outnumber passengers in vertex then the choice of which taxicabs serve passengers is a random subset of the taxicabs.

• The profit from serving a passenger in vertex is equal to the surge price for that vertex, .

• The cost of serving a passenger in vertex , given that the taxicab was previously in vertex , is .

Finally, we define the notion of a passenger-taxicab equilibrium, where no infinitesimal taxicab can benefit from deviations.

###### Definition 2.5.

Given a demand vector , current supply vectors , and new supply , we say that a surge pricing is in passenger-taxicab equilibrium, if for every min cost flow from to , for every such that we have that

 μ(u↦v|s′,r,d)=maxw∈Vμ(u↦w|s′,r,d). (1)

I.e., every infinitesimal taxicab is choosing a best response. Such a passenger-taxicab equilibrium is said to induce supply .

Our goal in the continuous setting is to set surge prices so that the new supply is a passenger-taxicab equilibrium.

In this continuous setting we take demand to be insensitive to the surge prices. In the next section we describe the discrete setting where both the demand and the supply are sensitive to the prices. One could define a continuous passenger-taxicab setting where every location has an associated density function for passenger valuations. Then, we could convert this continuous setting to an instance of the discrete passenger-taxicab setting with taxicabs/passengers. Under appropriate conditions, this will give a good approximation to a continuous passenger-taxicab setting where both demand and supply are sensitive to surge pricing.

### 2.2 The Discrete Passenger-Taxicab Setting

As above, we model the network as a finite metric space , and the cost to a taxicab to switch between vertices and is the distance between them, . Unlike the continuous case, there is an integral number of taxicabs and passengers at every vertex.

Let be a set of passengers and be a set of taxicabs. Every passenger has a value for service. A supply is a vector where for all , , and for all , .

A profile is a partition of the passengers , where for each the set is the set of passengers at . A demand is a function of a vertex and a surge price at the vertex. We define the function as follows:

 dv(rv)={bi∈Pv|\rm value(bi)≥rv}.

Ergo, is the set of passengers at vertex that are interested in service given that the price is , i.e., those passengers whose value is at least . Note that .

For ease of notation, we denote a collection of entities for each vertex , by . For example, , , and .

Define a flow from supply to supply as follows. The flow has the following properties:

• For all , .

• For all , .

• For all , .

The flow from a vertex is equal to the number of taxicabs at under supply , i.e., . The flow into a vertex is equal to the number of taxicabs at under supply , i.e., . The cost of a flow in the discrete setting is the same as the cost of a flow in the continuous setting (Definition 2.2), i.e., .

We now define the demand served at a vertex ,

###### Definition 2.6.

For a vertex , given a supply , a surge price , and a demand , we define the demand served, , as follows:

• If then .

• If then is the set of the highest valued passengers from , breaking ties arbitrarily.

Given demand functions , surge prices , and new supply , the total demand served and its value is given by

 ds(s′,d,r) = ∪v∈Vdsv(s′v,dv,rv); dsv(s′,d,r) = ∑bi∈ds(s′,d,r)\rm value(bi).
###### Definition 2.7.

The social welfare is the difference between the sum of the values of the passengers served and the cost of the min cost flow, which is the sum of the distances traveled by the taxis. Namely, for current supply , new supply , demand functions , and surge prices , the social welfare is

 SW(s,s′,r,d)=dsv(s′,d,r)−em(s,s′). (2)

Remark: we did not define social welfare in the continuous passenger-taxicab setting where the passengers are price insensitive. However, one can view the social welfare in the price-insensitive demand setting as a special case of the responsive demand setting when all passenger valuations are very high.

Like the definitions for utility and passenger-taxicab equilibria in the continuous case, one can define them for the discrete case: The utility of a taxicab moving from to , given new supply , surge prices and demand functions , is

 μtj(u↦v|s′,r,d)=min(|dv(rv)|,|s′v|)|s′v|⋅rv−ℓu,v.
###### Definition 2.8.

Given demand , current supply and new supply , surge prices are said to be in passenger-taxicab equilibrium if for every min cost flow from to and for any such that we have that

• Taxicabs are choosing a best response: .

• All passengers with are served. No passengers with are served.

### 2.3 Online Setting

In the online setting we inherit the continuous model setting, adding a function of time. Time progresses in discrete time steps . At time the demand vector associates each vertex with some demand , and we assume that the total demand . One should not think of a time step as being instantaneous, but rather as a period of time during which the demands remain steady.

Every time step also has an associated supply vector , where and for all . The supply at time is a “reshuffle” of the supply at time , by having infintestimally small suppliers moving about the network. In our model, the time required for suppliers to adjust supply from to is small relative to the period of time during which demand is valid.

If the demand in vertex at time is , and the supply in vertex at time is , then the minimum of the two is the actual demand served (in vertex at time ). Note that if the two are not identical then there are either unhappy customers (without service) or unhappy suppliers (with no customer to service). Formally, we define the benefit derived during each time period, the demand served, as in the continuous model.

We define the social welfare as follows:

###### Definition 2.9.

Given a demand sequence and a supply sequence we define the social welfare

An online algorithm for social welfare follows the following structure. At time :

1. A new demand vector appears.

2. The online algorithm determines what the supply vector should be. (Indirectly, by computing and posting surge prices so that the resulting passenger-taxicab-equilibrium induces supply ).

The goal of the online algorithm is to maximize the social welfare as given in Definition 2.9: Compute a supply sequence , so as to maximize . The supply vector is a function of the demand vectors but not of any demand vector , for . Implicitly, we assume that the passenger-taxicab equilibrium is attained quickly relative to the rate at which demand changes.

The competitive ratio of such an online algorithm, Alg, is the worst case ratio between the numerator: the social welfare resulting from the demand sequence and the online supply , and the denominator: the optimal social welfare for the same demand sequence, i.e.,

 mindsw(\rm Alg(d),d)maxssw(s,d).

## 3 The Continuous Passenger-Taxicab Setting

In this section we deal with the continuous passenger-taxicab setting. Given current supply , demand and new supply , we show how to set surge prices such that they are in passenger-taxicab equilibria. Moreover, for these , , and , the only possible which results in a passenger-taxicab equilibria is . (Similar techniques give surge prices that induce [almost] arbitrary supply vectors, , see below).

Proof overview: Given some min cost flow from supply to demand , we construct a unit demand market, with bidders and items. For every such that we construct a bidder and an item. We also define bidder valuations for all items. This unit demand market has Walrasian clearing prices that maximize social welfare (Lemma 3.2). We show how we can convert the Walrasian prices on items to surge pricing (Lemma 3.4).

We then show and that the resulting surge pricing has a passenger-taxicab equilibrium which induces supply equals demand (Lemma 3.5) and it is the case with all all passenger-taxicab equilibria (Lemma 3.7). Lemma 3.6 shows that the incentive requirements in Equation (1) also hold for any min cost flow , from to . This proves Theorem 3.8.

As a running example, consider the road network in Figure 1. Also, assume that the supply vector and demand vector . Two minimum cost flows are given in Figures 2 and 3. Both these flows have cost .

Given a minimum cost flow , we define a unit demand market setting as follows:

• Items , and unit demand bidders , both of which are indexed by pairs of vertices, where

• We set the value of item to bidder to be,

 ζbwz(mxy)=C−ℓw,y,\rm where\ C=maxi,jℓi,j+1.
• The utilities of bidders are unit demand and quasi-linear, i.e., the utility of bidder for item set and price is

As an example, let be the minimum cost flow of Figure 2. The market induced by is illustrated in Figure 4.

Given a flow , bidders and items we define the following weighted bipartite graph , where between bidder and item there is an edge of weight .

###### Definition 3.1.

Given a flow , a matching between bidders and items is a function , where bidder is matched to item or unmatched (if ), such that no two bidders are matched to the same item .

As there is an edge between every bidder and every item with weight , the maximum weight matching is a perfect matching between bidders and items and the mapping never assigns to a bidder.

###### Lemma 3.2.

The matching where , maximizes social welfare. In addition, there exist Walrasian prices for which is a competitive market equilibrium.

###### Proof.

The proof is via contradiction. Assume there exists some matching with strictly greater social welfare than the matching . For a bidder , define , iff for some , and , iff for some . Note that so for a given and we have if and zero otherwise.

Choose to be the minimum non-zero flow in , i.e., . We now define a flow , which is a slight perturbation of flow . In flow , the flow from to is:

We first prove that is a valid flow, and later we show that it has a lower cost than , in contradiction to the minimality of .

###### Lemma 3.3.

Flow is a valid flow from supply vector to demand vector .

###### Proof.

Consider the requirements that be a valid flow:

• For all , : By definition of if then and if then .

• For all , : By definition of we have . Thus,

 ∑yf′(x,y) = = = = st−1x.
• For all , : By definition of we have . Thus,

 ∑xf′(x,y) = = = = dty.

From the fact that has a higher social welfare we get,

 ∑w,z:bwz∈Bf∗ζbwz(~g(bwz))>∑w,z:bwz∈Bf∗ζbwz(g(bwz)).

Using the definition of the valuations we have,

 ∑w,z:bwz∈Bf∗C−ℓw,~h(bwz)>∑w,z:bwz∈Bf∗C−ℓw,h(bwz).

This implies that

 ∑w,z:bwz∈Bf∗ℓw,h(bwz)>∑w,z:bwz∈Bf∗ℓw,~h(bwz).

Using this last inequality, it follows that the cost of (Definition 2.2) satisfies

 em(f∗) =∑x,yf∗(x,y)⋅ℓx,y

which contradicts the fact that flow is a minimum cost flow.

The fact that there exist Walrasian prices for that are in competitive market equilibrium follows from [14]. This concludes the proof of Lemma 3.2. ∎

Let the Walrasian price of be as guaranteed by the lemma above. We first show that any two prices which correspond to the same vertex must have the same price.

###### Lemma 3.4.

For any two items and we have .

###### Proof.

For contradiction assume that . Let be the bidder assigned . Thus, for item bidder has utility which implies that is not in the demand set for bidder . A contradiction to the fact that are Walrasian prices. ∎

For any such that there exist items of the form for some , let denote the Walrasian price for such items (By Lemma 3.4 all those Walrasian prices are identical). If no items of the form exist, this implies that demand at vertex , , and we can set . Define surge prices, , for all .

###### Lemma 3.5.

Given current supply and demand , surge prices , new support , and such that then

###### Proof.

Let be such that .Then,

 = (3) = rty−ℓx,y (4) = C−py−ℓx,y (5) = (6) ≥ (7) = C−pw−ℓx,w (8) = rtw−ℓx,w (9) ≥ (10) = (11)

Equations (3),(11) follow from the definition of the utility in the continuous passenger-taxicab setting, definition 2.4.
Equations (4),(10) follows from considering the passenger-taxicab equilibrium where resulting in for all .
Equations (5),(9) follow from the definition of the surge prices.
Equations (6),(8) follow from the definition of the utility in the market setting.
Equation (7) follows from the market equilibrium.

So, we have that

It remains to consider for such that . In this case the surge price at is zero, so the utility . ∎

The following lemma shows that the incentive requirements of Equation (1) hold, not only for the flow , but also for any min cost flow from to .

###### Lemma 3.6.

Fix current supply and demand , surge prices , and new support . Let be an arbitrary min cost flow from to , then, for any such that we have that

###### Proof.

Define

 Γ(f)=∑u∈V∑v∈Vf(u,v)⋅(rv−ℓu,v)=∑v∈Vs′v⋅rv−em(s,s′).

As and are both min cost flows from to we have that .

For contradiction assume there exist some such that and .

 Γ(f∗) = ∑u∈V∑v∈Vf∗(u,v)⋅(rv−ℓu,v) (12) = ∑u∈V∑v∈Vf∗(u,v)⋅maxv∈V(rv−ℓu,v) (13) = ∑u∈Vsu⋅maxv∈V(rv−ℓu,v) (14) = ∑u∈V∑v∈Vf′(u,v)⋅maxv∈V(rv−ℓu,v) (15) > ∑u∈V∑v∈Vf′(u,v)⋅(rv−ℓu,v)=Γ(f′). (16)

Eq. (12) follows from the definition of . Eq. (13) follows from Lemma 3.5. Eq. (14) and (15) follows from the definition of a flow, since for any flow from we have that . Eq. (16) holds since we assumed, for contradiction, that there exist some such that and . Hence, we reached a contradiction to the assumption that is a min cost flow. ∎

If follows from the Lemma above that computing surge prices via flow ensures that taxicab routing using any other min cost flow is also a best response under surge prices .

Next we show that all relevant passenger-taxicab equilibria all have new supply .

###### Lemma 3.7.

Given current supply , demand , and surge prices , all passenger-taxicab equilibria induce .

###### Proof.

Let be a min cost flow from to . For contradiction, assume that that there exists some such that are in a passenger-taxicab equilibrium. Let be some min cost flow from to .

Consider (i.e., the set of all vertices for which the flow results in strictly more supply than demand). Since and they both sum to 1, we have that . Let (i.e., the set of all vertices from which supply flows to ). As it follows that .

We claim that there exists some , , such that . For contradiction assume that all the flow in from vertices in is to vertices in . By definition of flows: . We now have,

 ∑x∈H′∑y∈Vf(x,y) = ∑x∈H′∑y∈Hf(x,y) = ∑x∈H′∑y∈Hf′(x,y) = ∑y∈H∑x∈H′f′(x,y) > ∑y∈Hdty = ∑x∈H′∑y∈Hf(x,y),

This implies that there exist , such that . Since there also exists some such that .

We have shown that is in passenger-taxicab equilibrium, this implies that

 μt(w↦x|s′,r,d)=rtx−ℓw,x≥rty−ℓw,y=μt(w↦y|s′,r,d).

Since we have we have that resulting in the utility

where implies the last equality. This is in contradiction to the being a passenger-taxicab equilibrium. ∎

Theorem 3.8 follows from Lemma 3.5, Lemma 3.6, and Lemma 3.7.

###### Theorem 3.8.

Given distances and an arbitrary supply vector, . Let the demand vector be . Then, there exists a surge price vector that results in a passenger-texicab equilibrium which induces a supply . Moreover, any passenger-taxicab equilibrium of induces supply , and the surge prices can be computed in polynomial time.

We can extend the result from equating supply and demand to modifying the supply vector to any supply , with the restriction that if then . The new surge prices are computed as follows. First we compute, as before, the surge prices from to . Then, we set and the resulting surge prices are . In a similar way we can establish,

###### Theorem 3.9.

Let and let be the target supply vector, subject to the restriction that if then . Then there exist surge prices for which some passenger-taxicab equilibrium induces supply .

## 4 The Discrete Passenger-Taxicab Setting

In this section we consider a more realistic scenario where both demand and supply are sensitive to the surge pricing. All else being equal, higher surge prices mean less demand and more supply.

We define social welfare to be the sum of valuations of passengers served minus the sum of the distances traversed by the taxicabs to serve these passengers (Definition 2.7). Given current supply and a passenger profile , we give an algorithm for computing surge prices that creates a passenger-taxicab equilibrium that maximizes social welfare.

The location of a passenger and taxi is denoted by and respectively (i.e., ). For brevity, we use the notation .

### 4.1 Maximizing Social Welfare

As in the continuous case, we reduce the problem of computing surge prices to computing market clearing prices in a unit demand market. Given a set of passengers