  We investigate the tradeoffs between fairness and efficiency when allocating
indivisible items over time. Suppose T items arrive over time and must be
allocated upon arrival, immediately and irrevocably, to one of n agents. Agent
i assigns a value v_{it} in [0,1] to the t-th item to arrive and has an
additive valuation function. If the values are chosen by an adaptive adversary
it is known that the algorithm that minimizes maximum pairwise envy simply
allocates each item uniformly at random; the maximum pairwise envy is then
sublinear in T. If the values are independently and identically drawn from an
adversarially chosen distribution D, it is also known that, under some mild
conditions on D, allocating to the agent with the highest value -- a Pareto
efficient allocation -- is envy-free with high probability.
  In this paper we study fairness-efficiency tradeoffs in this setting and
provide matching upper and lower bounds under a spectrum of progressively
stronger adversaries. On one hand we show that, even against a non-adaptive
adversary, there is no algorithm with sublinear maximum pairwise envy that
Pareto dominates the simple algorithm that allocates each item uniformly at
random. On the other hand, under a slightly weaker adversary regime where item
values are drawn from a known distribution and are independent with respect to
time, i.e. v_{it} is independent of v_{it'} but possibly correlated with
v_{i't}, optimal (in isolation) efficiency is compatible with optimal (in
isolation) fairness. That is, we give an algorithm that is Pareto efficient
ex-post and is simultaneously optimal with respect to fairness: for each pair
of agents i and j, either i envies j by at most one item (a prominent fairness
notion), or $i$ does not envy j with high probability. En route, we prove a
structural result about allocations of divisible items that might be of
independent interest.
