# Efficiency of Random Priority

Matchings are one of the most basic primitives used in the area of mechanism design. Whenever we need to assign items to agents we view it as a matching problem. Of course, physician plenty of variations differing in constraints and objectives can be considered, price but let us look at the simplest variant possible. We need to assign $n$ students to $n$ dorms. Students have preferences over dorms. We, visit this site the administration, would like to find an allocation that would meet students' preferences as much as possible. We cannot use money in deploying the mechanism. This problem have been considered many times in the literature, but in a setting where preferences of student $ain A$ are given by an ordering $preceq_{a}in I imes I$ over the set $I$ of dorms. In this setting it was shown that there exists only one truthful, non-bossy and neutral mechanism. The unique mechanism is called Serial Dictatorship and it works as follows. First, agents are sorted in a fixed order, and then the first agent chooses his favorite item, the next agent chooses his favorite item among remaining items, and so on. Moreover, its randomized variant called Random Serial Dictatorship (RSD), which scans according to a random order, possesses another nice properties of being symmetric and ex post efficient, i.e., it never outputs Pareto dominated outcomes. This mechanism is more often called Random Priority, and hence the title of this entry.

However, one can imagine a setting where the preferences of an agent are not given by an ordering of items, but rather where we are given values $w(a,i)in[0,1]$ telling how much agent $a$ values item $i$. In this model we can quantify social welfare of an assignment that a mechanism finds. Here, welfare of an assignment  $left {(a_{j},i_{phi(j)})
ight}_{j=1}^n$
is just the sum $sum_{j=1}^n w(a_{j},i_{phi(j)})$. Together with Piotr Sankowski and Qiang Zhang we decided to investigate the problem of comparing the social welfare obtained by RSD with the optimum offline welfare. By optimum offline welfare we mean the maximum weighted matching in the underlying graph. We assume that when the RSD proposes an agent to make a his choice, then he will pick an item he values the most. We also assume that an agent resolves ties randomly. At first sight, it might seem like obtaining any meaningful result on approximation factor of RSD is not possible. Just look at the example in the Figure.

For items $i_{2},i_{3},...,i_{n}$ each agent has value 0, that's why these edges are not in the Figure. The optimal social welfare is obviously 1. However, the first agent approached by RSD will always pick item $i_{1}$, and therefore the social welfare of RSD is $frac{1}{n}+frac{n-1}{n}varepsilonapproxfrac{1}{n}$. To overcome this problem, we asked two questions. First, what if valuations of agents are always either 0 and 1? Here the hard example does not apply anymore, if assumed that ties are resolved randomly. Second, what if the optimal social welfare is big compared to $n$? One can see, that in an extreme case with $OPT=n$ the RSD finds welfare of value at least $n/2$ (an inclusion maximal matching), so it's not bad either.

0/1 preferences

In case the preferences are 0 and 1, we can look only at the 1-edges in the underlying graph. Then we are given an unweighted graph and we just want to maximize the size of constructed matching. We stress here, that the random tie-breaking rule is crucial here. That is, we require that when RSD asks an agent that has 0 value for all remaining items, then this agent picks one of the items at random. Without this assumption we can see that the hard example from the figure still works --- suppose each agents $a_{2},a_{3},...,a_{n}$ value all items 0, but each of them always chooses $i_{1}$.

In this model, RSD is a $frac{1}{3}$-approximation, and below we show why. Instead of clunky agent has value 1 for an item'', we shall say shortly agent 1-values an item''. Consider step $t+1$ of the algorithm. Some agents and items are removed from the instance, so let $OPT^{t}subset OPT$ be what remains from optimal solution after $t$ steps of RSD. Also, let $RSD^{t}$ be the partial matching constructed by RSD after $t$ steps, and $
uleft(RSD^{t}
ight)$
be its welfare. It can happen that at time $t$, an agent does not 1-value any of remaining items, even though he could have 1-valued some of the items initially. Thus let $z^{t}$ be the number of agents who 0-value all remaining items. Let $a$ be the agent who is at step $t+1$ chosen by RSD to pick an item. With probability $1-frac{z^{t}}{n-t}$ agent $a$ 1-values at least one item. If so, then the welfare of RSD increases by 1, i.e., $
uleft(RSD^{t+1}
ight)=
uleft(RSD^{t}
ight)+1.$
Hence [mathbb{E}left[
uleft(RSD^{t+1}
ight)
ight]=mathbb{E}left[
uleft(RSD^{t}
ight)
ight]+1-frac{mathbb{E}left[z^{t}
ight]}{n-t}.] What is the expected number of edges we remove from $OPT^{t}$? That is, what is the expected loss $mathbb{E}left[
uleft(OPT^{t}
ight)-
uleft(OPT^{t+1}
ight)
ight]$
? Again, with probability $1-frac{z^{t}}{n-t}$ agent $a$ picks an item $i$ he values 1. Both agent $a$ and item $i$ may belong to $OPT^{t}$, in which case $OPT^{t}$ loses two edges. Otherwise $OPT^{t}$ loses one edge. Now suppose that agent $a$ 0-values all remaining items, which happens with probability $frac{z^{t}}{n-t}$. If $a$ is such an agent, then he picks an item at random from all remaining items, so with probability $frac{
uleft(OPT^{t}
ight)}{n-t}$
agent $a$ picks an item that belongs to $OPT^{t}$. If so, then $OPT^{t}$ loses 1, and otherwise, $OPT^{t}$ does not lose anything. We have $
uleft(OPT^{t}
ight)+z^{t}leq n-t$
, so $frac{
uleft(OPT^{t}
ight)}{n-t}leq 1-frac{z^{t}}{n-t}$
, and hence the expected decrease is: [egin{eqnarray*}&&mathbb{E}left[
uleft(OPT^{t}
ight)-
uleft(OPT^{t+1}
ight)
ight] \ leq &&mathbb{E}left[ 2cdotleft(1-frac{z^{t}}{n-t}
ight)+frac{z^{t}}{n-t}cdotfrac{
uleft(OPT^{t}
ight)}{n-t}
ight] \ leq &&mathbb{E}left[ 2cdotleft(1-frac{z^{t}}{n-t}
ight)+frac{z^{t}}{n-t}cdot left(1-frac{z^{t}}{n-t}
ight)
ight] \ leq&&3cdotleft(1-frac{mathbb{E}left[z^{t}
ight]}{n-t}
ight). end{eqnarray*}] Therefore, [egin{align*}mathbb{E}left[
uleft(OPT^{t}
ight)-
uleft(OPT^{t+1}
ight)
ight] &leq 3cdotleft(1-frac{mathbb{E}left[z^{t}
ight]}{n-t}
ight) \ &=3cdotmathbb{E}left[
uleft(RSD^{t+1}
ight)-
uleft(RSD^{t}
ight)
ight],end{align*}] and by summing for $t$ from $0$ to $n$ we conclude that [egin{align*}
uleft(OPT
ight)&=mathbb{E}left[
uleft(OPT^{0}
ight)-
uleft(OPT^{n}
ight)
ight]\ &leq3cdotmathbb{E}left[
uleft(RSD^{n}
ight)-
uleft(RSD^{0}
ight)
ight]=3cdot mathbb{E}left[
uleft(RSD
ight)
ight].end{align*}]

Connection to online bipartite matching

As we can see, in the analysis the main problem for RSD are agents who have value 0 for remaining items. If we could assume, that such an agent would reveal the fact that he 0-values remaining items, then we could discard this agent, and the above analysis would give a $frac{1}{2}$-approximation. But in this model, we could actually implement a mechanism based on the RANKING algorithm of Karp, Vazirani, Vazirani, and this would give us approximation of $left(1-frac{1}{e}
ight)approx0.67$
. In fact, it's also possible to use the algorithm of Mahdian and Yan (2013) and this would give a factor of $approx0.69$.

Big OPT

Now let us go back to the model with arbitrary real valuations from interval $left[0,1
ight]$
. Here we want to obtain approximation factor that depends on $
uleft(OPT
ight)$
--- for $
uleft(OPT
ight)=1$
the ratio should be around $frac{1}{n}$, while for $
uleft(OPT
ight)approx n$
it should be constant. This suggests that we should aim in approximation factor of $Thetaleft(frac{
uleft(OPT
ight)}{n}
ight)$
. Let us first show an upper-bound that cannot be achieved by any mechanism. Take any integer $k$, and copy $k$ times the instance from the Figure.  Let agents 0-value items from different chunks, so that social welfare of any mechanism is the sum of welfares in all chunks. On any chunk no mechanism can get outcome better than $frac{1}{n}+varepsilon$, hence no mechanism cannot do better than $kcdotleft(frac{1}{n}+varepsilon
ight)approxfrac{k^{2}}{ncdot k}$
on the whole instance. Here $
uleft(OPT
ight)=k$
, and the number of agents is $ncdot k$ this time. Therefore, asymptotic upper-bound on RSD's welfare is $frac{
uleft(OPT
ight)^{2}}{n}$
, where $n$ is the number of agents. But what is quite interesting, we can prove that RSD is only $frac{1}{e}$ fraction away from this upper-bound. That is, we show that expected outcome of RSD is at least $frac{1}{e}cdot frac{
uleft(OPT
ight)^{2}}{n}$
. However, this we shall not prove here. If you are interested from where this shapely constant of $frac{1}{e}$ comes, then please have a look at our arXiv report.

SAGT'14

It turns out that this natural problem at the same time was also investigated independently by Aris Filos-Ratsikas, Søren Kristoffer Stiil Frederiksen, Jie Zhang. They obtained similar results for the general $[0,1]$ valuations. Both their and our papers are accepted to SAGT'14, and we will have a joint presentation of the results. So if you are going to the symposium, then please give us a pleasure of attending our talk.