  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.
