# Auction Algorithm

The auction algorithm[1] is an algorithm in optimal transport in which a set of buyers exchange goods for varied prices until an eventual equilibrium is reached. It is an iterative approach. The algorithm pertains to the discrete formulation of optimal transport, as well as provides a connection to the dual problem. The algorithm is useful in the field of economics[2] because of its ability to find an equilibrium. The algorithm was invented by Bertsekas[3], but it was eventually updated.

## The Assignment Problem

It is necessary to introduce the assignment problem[2] because it applies a context in which we may apply our algorithm to find such an optimal equilibrium. Suppose we have both ${\displaystyle N}$ buyers as well as ${\displaystyle N}$ goods. We introduce ${\displaystyle a_{ij}}$ to quantify the notion of some sort of utility, benefit, or happiness the buyer receives from their corresponding good. The assignment problem therefore seeks a way to maximize ${\displaystyle \sum _{i}a_{i\sigma (i)}}$, i.e., we hope to maximize the total utility. Note this is different from maximizing the utility of a particular buyer, because we seek to benefit the whole group the most. We use the index ${\displaystyle i}$ to denote a particular buyer we use the second index ${\displaystyle j=\sigma (i)}$ to denote the good, where ${\displaystyle \sigma }$ is some permutation of the goods among all of the buyers. A final thing to note is that the assignment of people to goods is one-to-one, i.e. there is one distinct good for every distinct buyer.

We've established what the aim of the assignment problem is, but we have yet to establish a sense of equilibrium that the auction algorithm hopes to achieve. First, we must define a price system. We say that a good ${\displaystyle j}$ has price ${\displaystyle p_{j}}$, which can be rewritten ${\displaystyle p=(p_{j})_{j}}$. Next, we define the equilibrium condition. The equilibrium is that all buyers are content with their purchases if

${\displaystyle a_{i\sigma (i)}-p_{\sigma (i)}=\max _{j=1,...,N}\{a_{ij}-p_{j}\}\ \ \ \ \ \ \ \ \ \ (*)}$

is satisfied. It is important to note that the absolute value is not taken. If the absolute value is taken, then it is possible for the system to be in equilibrium when each buyer has the worst possible good, and ${\displaystyle \sum _{i}a_{i\sigma (i)}}$ fails to be maximized. Now, another common way to say that the system is in equilibrium is that all of the buyers are "happy." Notationally, we say ${\displaystyle (p,\sigma )}$ is an equilibrium. If this is an equilibrium, then ${\displaystyle \sigma }$ is an optimal assignment, and ${\displaystyle p}$ is optimal in the dual problem.

## The Algorithm

The algorithm[2] starts from an arbitrary arrangement of buyers and goods. It does not matter to the algorithm who begins with what good. Denote this arbitrary arrangement with the prices and good permutation as ${\displaystyle (p_{0},\sigma _{0})}$. The algorithm acts with iterations, and once all buyers satisfy the "happy" condition, our algorithm is done. The algorithm is as follows:

• First, find a particular buyer. We will call this buyer ${\displaystyle i^{*}}$. We will only choose a buyer such that ${\displaystyle (*)}$ does not hold. The buyer then finds the good maximizing the difference between their personal utility and the price, i.e. ${\displaystyle \max _{j=1,...,N}\{a_{i^{*}j}-p_{j}\}}$. This buyer exchanges their good with this other buyer that originally held this other good. Denote this new good ${\displaystyle j^{*}}$.
• This buyer that just purchased the good maximizing their utility is going to increase the price of this new good by some amount ${\displaystyle \gamma _{i}}$ until this buyer is indifferent between object ${\displaystyle j^{*}}$ and the second best option. Mathematically, we say ${\displaystyle a_{i^{*}j^{*}}-p_{j^{*}}=\max _{j\neq j^{*}}\{a_{i^{*}j}-p_{j}\}}$.

Our iterative procedure continues until each buyer satisfies the "happy" condition.

## ${\displaystyle \epsilon -}$Complementary Slackness

One problem with the algorithm is the possibility that it never ends, i.e. it iterates indefinitely. To fix such a problem, we introduce a scalar ${\displaystyle \epsilon >0}$ and we alter our condition ${\displaystyle (*)}$ so that the buyer is within a tolerance of being content with their purchase. Such names for this are ${\displaystyle \epsilon -}$happy or "almost happy." Specifically, we alter ${\displaystyle (*)}$ by saying

${\displaystyle a_{i\sigma (i)}-p_{\sigma (i)}\geq \max _{j=1,...,N}\{a_{ij}-p_{j}\}-\epsilon .}$
Another name for the above condition is ${\displaystyle \epsilon -}$complementary slackness[3]. It may be necessary to modify the value for ${\displaystyle \epsilon }$ so that convergence of the algorithm is reached at a desirable rate. The algorithm maintains ${\displaystyle \epsilon -}$complementary slackness at each iteration[1].

## Relations with Optimal Transport

The auction algorithm has applications in optimal transport[3], mostly by extending situations in optimal transport to where the assignment problem applies. Converting optimal transport scenarios to the assignment problem gives us the opportunity to apply the auction algorithm to find a solution. Something to note is that this idea mostly applies to linear optimal transport problems. One area in which this idea can be done is network optimization problems[3]. Shortest path and max-flow problems can be converted into assignment problems, giving the auction algorithm a chance to offer a solution. A second area is transportation problems, and another is minimum cost flow problems. A final area is convex separable network optimization problems.

Allow us to provide an example of how the assignment problem and the auction algorithm have applications in optimal transport[1] . Define two discrete measures by

${\displaystyle \alpha =\sum _{i=1}^{n}(a_{i})(\delta _{x_{i}}),\ \ \ \ \beta =\sum _{i=j}^{n}(b_{i})(\delta _{y_{j}})}$

where ${\displaystyle a_{i}}$ and ${\displaystyle b_{j}}$ denote two sets of weights and ${\displaystyle \delta _{x_{i}}}$ and ${\displaystyle \delta _{y_{j}}}$ denote the Dirac function evaluated at certain locations (i.e., infinitely large at such position and trivial elsewhere). We seek a map that translocates the mass ${\displaystyle \alpha }$ to the mass ${\displaystyle \beta }$, where each point associated with the mass ${\displaystyle \alpha }$ is tied to a point for ${\displaystyle \beta }$. From this, we may apply the assignment problem. There exists a permutation ${\displaystyle \sigma }$ that associates each location for one mass with the other. We must find a permutation such that a cost function is minimized, i.e.,

${\displaystyle \min _{T}{\bigg \{}\sum _{i}c(x_{i},T(x_{i})):T\#\alpha =\beta {\bigg \}}}$

where ${\displaystyle c(x,y)}$ is a cost function and ${\displaystyle T\#\alpha =\beta }$ denotes the map transferring the masses spread across locations in ${\displaystyle \alpha }$ to those in ${\displaystyle \beta }$. The reason this map can be interpreted as a permutation is because the masses are constructed from a discrete number of points. Note that this minimization problem is analogous to our utility maximization problem previously discussed.