# Online fair division

Online fair division is a class of fair division problems in which the resources, or the people to whom they should be allocated, or both, are not all available when the allocation decision is made. Some situations in which not all resources are available include:
* Allocating food donations to charities (the "food bank" problem). Each donation must be allocated immediately when it arrives, before future donations arrive.
* Allocating donated blood or organs to patients. Again, each donation must be allocated immediately, and it is not known when and what future donations will be.
Some situations in which not all participants are available include:
* Dividing a cake among people in a party. Some people come early and want to get a cake when they arrive, but other people may come later.
* Dividing the rent and rooms among tenants in a rented apartment, when one or more of them are not available during the allocation.
The online nature of the problem requires different techniques and fairness criteria than in the classic, offline fair division.

## Online arrival of people
### The party cake-cutting problem

Walsh studies an online variant of fair cake-cutting, in which agents arrive and depart during the division process, like in a party. Well-known fair division procedures like divide and choose and the Dubins-Spanier moving-knife procedure can be adapted to this setting. They guarantee online variants of proportionality and envy-freeness. The online version of divide-and-choose is more robust to collusion, and has better empirical performance.

### The sequential fair allocation problem

Sinclair, Jain, Bannerjee and Yu study allocation of divisible resources when individuals arrive randomly over time. They present an algorithm that attains the optimal fairness-efficiency threshold.

### The secretive agent problem

Several authors studied fair division problems in which one agent is "secretive", i.e., unavailable during the division process. When this agent arrives, he is allowed to choose any part of the resource, and the remaining n-1 parts should be divided among the remaining n-1 agents such that the division is fair. Note that divide and choose satisfies these requirements for n=2 agents, but extending this to 3 or more agents is non-trivial. The following extensions are known:
* Meunier and Su show that there always exists an envy-free cake-cutting among any number of agents, when there is a single secretive agent.
* Frick, Houston-Edwards and Meunier show that there always exists an envy-free allocation of rooms and rent (also called rental harmony) when there is a single secretive agent. The result holds for very general class of the tenants' preferences, including quasilinear valuations, "miserly tenants", and more.
* Cheze shows a polynomial-time algorithm for connected proportional cake-cutting among any number of agents, when there is a single secretive agent. The algorithm is based on the Even–Paz protocol and uses O(n log n) queries.
* Arunachaleswaran, Barman and Rathi show a polynomial-time algorithm for rental harmony when there are n-1 agents with quasilinear utilities, and the n-th agent is secretive. They also show efficient algorithms for almost envy-free (EF1) item allocation and ε-approximate envy-free cake-cutting.

### The cake redivision problem

The cake redivision problem is a variant of fair cake-cutting in which the cake is already divided in an unfair way (e.g. among a subset of the agents), and it should be re-divided in a fair way (among all the agents) while letting the incumbent owners keep a substantial fraction of their present value. The model problem is land reform.

## Online arrival of resources
### The food bank problem

The food bank problem is an online variant of fair allocation of indivisible goods. Each time, a single item arrives; each agent declares his/her value for this item; and the mechanism should decide which of the agents should receive it. The model application is a central food bank, which receives food donations and has to allocate each donation to one of the charities who want it. The donations are consumed immediately, and it is not known what donations are going to come next, so the decision must be made based only on the previous donations.

#### Binary valuations

Working with Foodbank Australia, Aleksandrov, Aziz, Gaspers and Walsh have initiated the study of the food bank problem when all agents have binary valuations {0,1}, that is, for each arriving item, every agent states whether he likes the item or not. The mechanism should decide which of the agents who like the item should receive it. They study two simple mechanisms for this setting:
* LIKE: each item is given uniformly at random to one of the agents who likes it. It is strategyproof and envy-free ex-ante, but does not guarantee even approximate envy-free ex-post. With binary valuations, it attains the optimal egalitarian and utilitarian social welfare. With additive valuations, its expected egalitarian and utilitarian social welfare are least 1/n of the optimal values attainable by an offline algorithm. The same is true whether the agents are sincere or strategic (i.e., its price of anarchy is n).
* BALANCED-LIKE: each item is given uniformly at random to one of the agents who likes it, from among those who received the least number of items so far. It is envy-free ex-ante, and guarantees EF1 ex-post when all agents have binary valuations. It is strategyproof for two agents with binary valuations, but not strategyproof for three or more agents even with binary valuations. When agents bid sincerely, with binary valuations, it attains the optimal egalitarian and utilitarian social welfare. With additive valuations, its expected egalitarian and utilitarian social welfare do not attain any constant-factor approximation of the offline optimal values, even with two agents. When agents bid strategically, even with binary valuations, its price of anarchy is n.

#### Additive valuations

In a more general case of the food bank problem, agents can have additive valuations, which are normalized to [0,1].
Due to the online nature of the problem, it may be impossible to attain some fairness and efficiency guarantees that are possible in the offline setting. In particular, Kahana and Hazon prove that no online algorithm always finds a PROP1 (proportional up to at most one good) allocation, even for two agents with additive valuations. Moreover, no online algorithm always finds any positive approximation of RRS (round-robin share).
Benade, Kazachkov, Procaccia and Psomas study another fairness criterion - envy-freeness. Define the envy of agent i at agent j as the amount by which i believes that j's bundle is better, that is, $\max(0,V_{i}(X_{j})-V_{i}(X_{i}))$. The max-envy of an allocation is the maximum of the envy among all ordered agent pairs. Suppose the values of all items are normalized to [0,1]. Then, in the offline setting, it is easy to attain an allocation in which the max-envy is at most 1, for example, by the round-robin item allocation (this condition is called EF1). However, in the online setting, the envy might grow with the number of items (T). Therefore, instead of EF1, they aim to attain vanishing envy—the expected value of the max-envy of the allocation of T items should be sublinear in T (assuming the value of every item is between 0 and 1). They show that:
* The LIKE algorithm (allocating each item uniformly at random) attains vanishing envy - the envy after T items is in $O({\sqrt {T/n}})$.
* There is a deterministic algorithm with a similar envy-bound, using the method of pessimistic estimators.
* For any n ≥ 2 and r < 1, there exists an adaptive adversary (an adversary who chooses the valuations of item t after seeing the allocation at time t-1) such that any algorithm must have envy after T rounds in Ω((T/n)$^{r/2}$). In particular, in contrast to the case of binary valuations, no algorithm can guarantee EF1.
* They also study a more general setting in which the items come in batches of m each time, rather than 1 at a time. In this case, there is a deterministic algorithm with envy in $O({\sqrt {T/(mn)}})$.
Jiang, Kulkarni and Singla improve the bound for the case of n=2 agents, when the values are random (rather than adversarial). They reduce the problem to the problem of Online Stripe Discrepancy, which is a special case of discrepancy of permutations, with two permutations and online item arrival. They show that their algorithm for Online Stripe Discrepancy attains envy in $O(T^{c/\log \log T})$, for some universal constant c, with high probability (that depends on c). Their algorithm even bounds a stronger notion of envy, which they call ordinal envy: it is the worst possible cardinal envy that is consistent with the item ranking.
Zeng and Psomas study the trade-off between efficiency and fairness under five adversary models, from weak to strong. Below, v$_{it}$ denotes the value of the item arriving at time t to agent i.
* Identical independent agents: the adversary picks a probability distribution D$_0$. On each round t, v$_{it}$ is drawn independently from D$_0$.
* Different independent agents: The adversary picks a probability distribution D$_i$ for each agent i. On each round t, v$_{it}$ is drawn independently from D$_i$.
* Correlated agents: The adversary picks a joint probability distribution D. On each round t, the vector (v$_{1t}$, ..., v$_{nt}$) is drawn independently from D.
* Non-adaptive adversary: After seeing the algorithm code, the adversary picks the valuations of all n agents to all T items.
* Adaptive adversary: After seeing the algorithm code, and after seeing the allocation of the first t-1 items, the adversary picks the valuations of item t (In this is the model).
For adversary 3 (hence also 2 and 1), they show an allocation strategy that guarantees, to each pair of agents, either EF1, or EF with high probability, and in addition, guarantees ex-post Pareto efficiency. They show that the "EF1 or EF w.h.p." guarantee cannot be improved even for adversary 1 (hence also for 2 and 3). For adversary 4 (hence also 5), they show that every algorithm attaining vanishing envy can be at most 1/n ex-ante Pareto-efficient.
See also Benade, Kazachkov, Procaccia, Psomas and Zeng.

### The costly reallocation problem

In some cases, items that were previously allocated may be reallocated, but reallocation is costly, so the number of adjustments should be as small as possible. An example is the allocation of expensive scientific equipment among different university departments. Each piece of equipment is allocated as soon as it arrives, but some previously allocated equipment may be reallocated in order to attain a fairer overall allocation.
He, Procaccia and Psomas show that, with two agents, algorithms that are informed about values of future items can attain EF1 without any reallocations, whereas uninformed algorithms require Θ(T) reallocations. With three or more agents, even informed algorithms must use Ω(T) reallocations, and there is an uninformed algorithm that attains EF1 with O(T$^{3/2}$) reallocations.

## Uncertain supply

In many fair division problems, such as production of energy from solar cells, the exact amount of available resource may not be known at the time the allocation is decided. Buermann, Gerding and Rastegari study fair division of a homogeneous divisible resource, such as electricity, where the available amount is given by a probability distribution, and the agents' valuations are not linear (for example, each agent has a cap on the amount of the resource he can use; above this cap, his utility does not increase by getting more of the resource). They compare two fairness criteria: ex-post envy-freeness and ex-ante envy-freeness. The latter criterion is weaker (since envy-freeness holds only in expectation), but it allows a higher social welfare. The price of ex-ante envy-freeness is still high: it is at least Ø(n), where n is the number of agents. Moreover, maximizing ex-ante social welfare subject to ex-ante envy-freeness is strongly NP-hard, but there is an integer program to calculate the optimal ex-ante envy-free allocation for a special class of valuation functions - linear functions with a saturation cap.

## Uncertain demand

In many fair division problems, there are agents or groups of agents whose demand for resources is not known when the resources are allocated. For example, suppose there are two villages who are susceptible to power outages. Each village has a different probability distribution over storms:
* In village A, with probability 40%, two houses are hit;
* In village B, with probability 70%, three houses are hit.
The government has two generators, each of which can supply electricity to a single house. It has to decide how to allocate the generators between the villages. Two important considerations are utilization and fairness:
* Utilization is defined as the expected number of houses who need a generator and get it. The utilization is maximized (at 1.4) when both generators are given to village B.
* Fairness is defined as equalizing the difference between the fraction of served houses between the two villages. Here, the fairest allocation is giving a single generator to each village; the fraction is 1/2 in village A and 1/3 in village B, so the difference is 1/6.
Donahue and Kleinberg prove upper and lower bounds on the price of fairness—the maximum possible utilization, divided by the maximum utilization of a fair allocation. The bounds are weak in general, but stronger bounds are possible for some specific probability distributions that are commonly used to model demand.
Other applications with uncertain demands are allocation of orders in service supply chains, allocation of aircraft to routes, allocation of doctors to surgeries, and more.

## Uncertain value

Morgan studies a partnership dissolution setting, where the partnership assets have the same value for all partners, but this value is not known. Each partner has a noisy signal about the value, but the signals are different. He shows that Divide and choose is not fair - it favors the chooser. He presents another mechanism that can be considered fair in this setting.

## Repeated fair division

Repeated fair division is similar to online fair division in that the items are allocated in different time-periods, but it is easier as the items are the same in each period.
Igarashi, Lackner, Nardi and Novaro study repeated fair allocation of indivisible items. They consider two fairness notions: overall (after all rounds have completed) and per-round (after each individual round). They consider two settings: the number of rounds can be either fixed in advance, or variable (can be chosen by the algorithm). The prove that:
* When the number of rounds is fixed (T), if T is a multiple of n, then there is always a sequence that is overall envy-free (EF), and a sequence that is overall proportional and Pareto-efficient (PROP+PE). In contrast, if T is not a multiple of n, then there might not exist an overall-PROP sequence. Moreover, for any T and any n>2, there might not exist an overall EF+PO sequence.
* For n=2 agents and any even T, there always exists a sequence which is overall EF+PO and per-round weak EF1. For n=2 agents and T=2 rounds, there always exists a sequence that is overall EF+PO and per-round EF1; and we can always find a sequence that is overall EF and per-round EF1. But for T>2, there may be no sequence that is overall EF+PO and per-round EF1.
* When the number of rounds is variable (can be chosen by the algorithm), for any n, there always exists a sequence that is overall EF+PO and per-round PROP[1,1] (if there are only goods or only chores, then PROP[1,1] becomes PROP1). They do not give an upper bound on the number of rounds required.