Transportation theory (mathematics)

{{Short description|Study of optimal transportation and allocation of resources}}

{{Use dmy dates|date=July 2021}}

In mathematics and economics, transportation theory or transport theory is a name given to the study of optimal transportation and allocation of resources. The problem was formalized by the French mathematician Gaspard Monge in 1781.G. Monge. Mémoire sur la théorie des déblais et des remblais. Histoire de l’Académie Royale des Sciences de Paris, avec les Mémoires de Mathématique et de Physique pour la même année, pages 666–704, 1781.

In the 1920s A.N. Tolstoi was one of the first to study the transportation problem mathematically. In 1930, in the collection Transportation Planning Volume I for the National Commissariat of Transportation of the Soviet Union, he published a paper "Methods of Finding the Minimal Kilometrage in Cargo-transportation in space".Schrijver, Alexander, [https://books.google.com/books?id=mqGeSQ6dJycC Combinatorial Optimization], Berlin; New York : Springer, 2003. {{isbn|3540443894}}. Cf. [https://books.google.com/books?id=mqGeSQ6dJycC&dq=a.n.+tolstoi+transportation+networks&pg=PA362 p. 362]Ivor Grattan-Guinness, Ivor, [https://books.google.com/books?id=2hDvzITtfdAC Companion encyclopedia of the history and philosophy of the mathematical sciences], Volume 1, JHU Press, 2003. Cf. [https://books.google.com/books?id=2hDvzITtfdAC&dq=%22a.n.+tolstoy%22+mathematics&pg=PA831 p.831]

Major advances were made in the field during World War II by the Soviet mathematician and economist Leonid Kantorovich.L. Kantorovich. On the translocation of masses. C.R. (Doklady) Acad. Sci. URSS (N.S.), 37:199–201, 1942. Consequently, the problem as it is stated is sometimes known as the Monge–Kantorovich transportation problem.{{cite book|author=Cédric Villani|title=Topics in Optimal Transportation|year=2003|publisher=American Mathematical Soc.|isbn=978-0-8218-3312-4|page=66}} The linear programming formulation of the transportation problem is also known as the HitchcockKoopmans transportation problem.{{cite book|author1=Singiresu S. Rao|title=Engineering Optimization: Theory and Practice|year=2009|publisher=John Wiley & Sons|isbn=978-0-470-18352-6|pages=221|edition=4th}}

Motivation

=Mines and factories=

Suppose that we have a collection of m mines mining iron ore, and a collection of n factories which use the iron ore that the mines produce. Suppose for the sake of argument that these mines and factories form two disjoint subsets M and F of the Euclidean plane \mathbb{R}^2. Suppose also that we have a cost function c : \mathbb{R}^2 \times \mathbb{R}^2 \to [0, \infty), so that c(x, y) is the cost of transporting one shipment of iron from x to y. For simplicity, we ignore the time taken to do the transporting. We also assume that each mine can supply only one factory (no splitting of shipments) and that each factory requires precisely one shipment to be in operation (factories cannot work at half- or double-capacity). Having made the above assumptions, a transport plan is a bijection T: M \to F.

In other words, each mine m \in M supplies precisely one target factory T(m) \in F and each factory is supplied by precisely one mine.

We wish to find the optimal transport plan, the plan T whose total cost

:c(T) := \sum_{m \in M} c(m, T(m))

is the least of all possible transport plans from M to F. This motivating special case of the transportation problem is an instance of the assignment problem.

More specifically, it is equivalent to finding a minimum weight matching in a bipartite graph.

=Moving books: the importance of the cost function=

The following simple example illustrates the importance of the cost function in determining the optimal transport plan. Suppose that we have n books of equal width on a shelf (the real line), arranged in a single contiguous block. We wish to rearrange them into another contiguous block, but shifted one book-width to the right. Two obvious candidates for the optimal transport plan present themselves:

  1. move all n books one book-width to the right ("many small moves");
  2. move the left-most book n book-widths to the right and leave all other books fixed ("one big move").

If the cost function is proportional to Euclidean distance (c(x, y) = \alpha \|x - y\| for some \alpha > 0) then these two candidates are both optimal. If, on the other hand, we choose the strictly convex cost function proportional to the square of Euclidean distance (c(x, y) = \alpha \|x - y\|^2 for some \alpha > 0), then the "many small moves" option becomes the unique minimizer.

Note that the above cost functions consider only the horizontal distance traveled by the books, not the horizontal distance traveled by a device used to pick each book up and move the book into position. If the latter is considered instead, then, of the two transport plans, the second is always optimal for the Euclidean distance, while, provided there are at least 3 books, the first transport plan is optimal for the squared Euclidean distance.

Hitchcock problem

The following transportation problem formulation is credited to F. L. Hitchcock:Frank L. Hitchcock (1941) "The distribution of a product from several sources to numerous localities", MIT Journal of Mathematics and Physics 20:224–230 {{MR|id=0004469}}.

:Suppose there are m sources x_1, \ldots, x_m for a commodity, with a(x_i) units of supply at x_i and n sinks y_1, \ldots, y_n for the commodity, with the demand b(y_j) at y_j. If c(x_i,\ y_j) is the unit cost of shipment from x_i to y_j, find a flow that satisfies demand from supplies and minimizes the flow cost. This challenge in logistics was taken up by D. R. FulkersonD. R. Fulkerson (1956) [https://priorart.ip.com/IPCOM/000128834/ Hitchcock Transportation Problem], RAND corporation. and in the book Flows in Networks (1962) written with L. R. Ford Jr.L. R. Ford Jr. & D. R. Fulkerson (1962) § 3.1 in Flows in Networks, page 95, Princeton University Press

Tjalling Koopmans is also credited with formulations of transport economics and allocation of resources.

Abstract formulation of the problem

=Monge and Kantorovich formulations=

The transportation problem as it is stated in modern or more technical literature looks somewhat different because of the development of Riemannian geometry and measure theory. The mines-factories example, simple as it is, is a useful reference point when thinking of the abstract case. In this setting, we allow the possibility that we may not wish to keep all mines and factories open for business, and allow mines to supply more than one factory, and factories to accept iron from more than one mine.

Let X and Y be two separable metric spaces such that any probability measure on X (or Y) is a Radon measure (i.e. they are Radon spaces). Let c : X \times Y \to [0, \infty) be a Borel-measurable function. Given probability measures \mu on X and \nu on Y, Monge's formulation of the optimal transportation problem is to find a transport map T : X \to Y that realizes the infimum

:\inf \left\{ \left. \int_X c(x, T(x)) \, \mathrm{d} \mu (x) \right| T_* (\mu) = \nu \right\},

where T_*(\mu) denotes the push forward of \mu by T. A map T that attains this infimum (i.e. makes it a minimum instead of an infimum) is called an "optimal transport map".

Monge's formulation of the optimal transportation problem can be ill-posed, because sometimes there is no T satisfying T_*(\mu) = \nu : this happens, for example, when \mu is a Dirac measure but \nu is not.

We can improve on this by adopting Kantorovich's formulation of the optimal transportation problem, which is to find a probability measure \gamma on X \times Y that attains the infimum

:\inf \left\{ \left. \int_{X \times Y} c(x, y) \, \mathrm{d} \gamma (x, y) \right| \gamma \in \Gamma (\mu, \nu) \right\},

where \Gamma (\mu, \nu) denotes the collection of all probability measures on X \times Y with marginals \mu on X and \nu on Y. It can be shownL. Ambrosio, N. Gigli & G. Savaré. [https://books.google.com/books?id=rCDK9JA5BAEC&q=%22optimal+transportation%22 Gradient Flows in Metric Spaces and in the Space of Probability Measures]. Lectures in Mathematics ETH Zürich, Birkhäuser Verlag, Basel. (2005) that a minimizer for this problem always exists when the cost function c is lower semi-continuous and \Gamma(\mu, \nu) is a tight collection of measures (which is guaranteed for Radon spaces X and Y). (Compare this formulation with the definition of the Wasserstein metric W_p on the space of probability measures.) A gradient descent formulation for the solution of the Monge–Kantorovich problem was given by Sigurd Angenent, Steven Haker, and Allen Tannenbaum.{{cite journal |first1=S. |last1=Angenent |first2=S. |last2=Haker |first3=A. |last3=Tannenbaum |title=Minimizing flows for the Monge–Kantorovich problem |journal=SIAM J. Math. Anal. |volume=35 |issue=1 |pages=61–97 |year=2003 |doi=10.1137/S0036141002410927 |citeseerx=10.1.1.424.1064 }}

=Duality formula=

The minimum of the Kantorovich problem is equal to

:\sup \left( \int_X \varphi (x) \, \mathrm{d} \mu (x) + \int_Y \psi (y) \, \mathrm{d} \nu (y) \right),

where the supremum runs over all pairs of bounded and continuous functions \varphi : X \rightarrow \mathbb{R} and \psi : Y \rightarrow \mathbb{R} such that

:\varphi (x) + \psi (y) \leq c(x, y).

=Economic interpretation=

The economic interpretation is clearer if signs are flipped. Let x \in X stand for the vector of characteristics of a worker, y \in Y for the vector of characteristics of a firm, and \Phi(x,y) =-c(x,y) for the economic output generated by worker x matched with firm y. Setting u(x) = -\varphi(x) and v(y) =-\psi(y), the Monge–Kantorovich problem

rewrites:

:\sup \left\{ \int_{X\times Y}\Phi(x,y) d\gamma(x,y) ,\gamma \in \Gamma(\mu,\nu) \right\}

which has dual:

:\inf \left\{ \int_X u(x) \,d\mu(x) +\int_Y v(y) \, d\nu (y) :u(x) +v(y) \geq \Phi(x,y) \right\}

where the infimum runs over bounded and continuous function u:X\to \mathbb{R} and v:Y\to \mathbb{R}. If the dual problem has a solution, one can see that:

:v(y) =\sup_x \left\{ \Phi(x,y) - u(x)\right\}

so that u(x) interprets as the equilibrium wage of a worker of type x, and v(y) interprets as the equilibrium profit of a firm of type y.

Solution of the problem

=Optimal transportation on the real line=

{{multiple image

| align = right

| direction = vertical

| width = 200

| image1 = Optimal transport matrix.png

| alt1 = Optimal transportation matrix

| link1 =

| caption1 = Optimal transportation matrix

| image2 = Continuous optimal transport.png

| alt2 = Continuous optimal transport

| link2 =

| caption2 = Continuous optimal transport

}}

For 1 \leq p < \infty, let \mathcal{P}_p(\mathbb{R}) denote the collection of probability measures on \mathbb{R} that have finite p-th moment. Let \mu, \nu \in \mathcal{P}_p(\mathbb{R}) and let c(x, y) = h(x-y), where h:\mathbb{R} \to [0,\infty) is a convex function.

  1. If \mu has no atom, i.e., if the cumulative distribution function F_\mu : \mathbb{R}\to[0,1] of \mu is a continuous function, then F_{\nu}^{-1} \circ F_{\mu} : \mathbb{R} \to \mathbb{R} is an optimal transport map. It is the unique optimal transport map if h is strictly convex.
  2. We have

::\min_{\gamma \in \Gamma(\mu, \nu)} \int_{\mathbb{R}^2} c(x, y) \, \mathrm{d} \gamma (x, y) = \int_0^1 c \left( F_{\mu}^{-1} (s), F_{\nu}^{-1} (s) \right) \, \mathrm{d} s.

The proof of this solution appears in Rachev & Rüschendorf (1998).Rachev, Svetlozar T., and Ludger Rüschendorf. Mass Transportation Problems: Volume I: Theory. Vol. 1. Springer, 1998.

=Discrete version and linear programming formulation=

In the case where the margins \mu and \nu are discrete, let \mu_x

and \nu_y be the probability masses respectively assigned to x\in \mathbf{X} and y\in \mathbf{Y}, and let \gamma_{xy} be the probability of an xy assignment. The objective function in the primal Kantorovich problem is then

: \sum_{x\in \mathbf{X},y\in \mathbf{Y}} \gamma_{xy}c_{xy}

and the constraint \gamma \in \Gamma(\mu ,\nu) expresses as

:

\sum_{y\in \mathbf{Y}}\gamma_{xy}=\mu_x,\forall x\in \mathbf{X}

and

:

\sum_{x\in \mathbf{X}} \gamma_{xy}=\nu_y,\forall y\in \mathbf{Y}.

In order to input this in a linear programming problem, we need to vectorize the matrix \gamma_{xy} by either stacking its columns or its rows, we call \operatorname{vec} this operation. In the column-major order, the constraints above rewrite as

: \left( 1_{1\times |\mathbf{Y}| }\otimes I_

\mathbf{X}
\right) \operatorname{vec}(\gamma)=\mu and \left( I_
\mathbf{Y}\
\otimes 1_{1\times |\mathbf{X}|}\right) \operatorname{vec}(\gamma)=\nu

where \otimes is the Kronecker product, 1_{n\times m} is a matrix of size n\times m with all entries of ones, and I_{n} is the identity matrix of size n. As a result, setting z=\operatorname{vec}(\gamma) , the linear programming formulation of the problem is

:

\begin{align}

& \text{Minimize } &&\operatorname{vec}(c)^\top z \\[4pt]

& \text{subject to:} && z \ge 0, \\[4pt]

& && \begin{pmatrix}

1_{1\times |\mathbf{Y}|}\otimes I_

\mathbf{X}
\\

I_

\mathbf{Y}
\otimes 1_{1\times |\mathbf{X}|}

\end{pmatrix} z=\binom{\mu}{\nu}

\end{align}

which can be readily inputted in a large-scale linear programming solver (see chapter 3.4 of Galichon (2016)Galichon, Alfred. Optimal Transport Methods in Economics. Princeton University Press, 2016.).

=Semi-discrete case=

In the semi-discrete case, X=Y=\mathbb{R}^d and \mu is a continuous distribution over \mathbb{R}^d, while \nu =\sum_{j=1}^J \nu_j\delta_{y_i} is a discrete distribution which assigns probability mass \nu_j to site y_j \in \mathbb{R}^d. In this case, we can seeSantambrogio, Filippo. Optimal Transport for Applied Mathematicians. Birkhäuser Basel, 2016. In particular chapter 6, section 4.2. that the primal and dual Kantorovich problems respectively boil down to:

: \inf \left\{ \int_X \sum_{j=1}^J c(x,y_j) \, d\gamma_j(x) ,\gamma \in \Gamma(\mu,\nu)\right\}

for the primal, where \gamma \in \Gamma(\mu ,\nu) means that \int_X d\gamma_j(x)=\nu_j and \sum_j d\gamma_j(x) =d\mu(x), and:

: \sup \left\{ \int_X\varphi(x)d\mu (x)+\sum_{j=1}^J\psi_j\nu_j:\psi_j+\varphi (x)\leq c(x,y_j) \right\}

for the dual, which can be rewritten as:

: \sup_{\psi \in \mathbb{R}^J}\left\{ \int_X\inf_j\left\{ c(x,y_j)-\psi_j\right\} d\mu (x)+\sum_{j=1}^J\psi_j\nu_j\right\}

which is a finite-dimensional convex optimization problem that can be solved by standard techniques, such as gradient descent.

In the case when c(x,y)=|x-y|^2/2, one can show that the set of x\in \mathbf{X} assigned to a particular site j is a convex polyhedron. The resulting configuration is called a power diagram.{{citation

| last = Aurenhammer | first = Franz | authorlink = Franz Aurenhammer

| doi = 10.1137/0216006

| issue = 1

| journal = SIAM Journal on Computing

| mr = 873251

| pages = 78–96

| title = Power diagrams: properties, algorithms and applications

| volume = 16

| year = 1987}}.

=Quadratic normal case=

Assume the particular case \mu =\mathcal{N}(0,\Sigma_X), \nu =\mathcal{N}(0,\Sigma _{Y}), and c(x,y) =|y-Ax|^2/2 where A is invertible. One then has

: \varphi(x) =-x^\top \Sigma_X^{-1/2}\left( \Sigma_X^{1/2}A^\top \Sigma_Y A\Sigma_X^{1/2}\right) ^{1/2}\Sigma_{X}^{-1/2}x/2

: \psi(y) =-y^\top A\Sigma_X^{1/2}\left( \Sigma_X^{1/2}A^\top \Sigma_Y A\Sigma_{X}^{1/2}\right)^{-1/2} \Sigma_X^{1/2}Ay/2

: T(x) = (A^\top)^{-1}\Sigma_X^{-1/2} \left(\Sigma_X^{1/2}A^\top \Sigma_Y A\Sigma_X^{1/2} \right)^{1/2} \Sigma_X^{-1/2}x

The proof of this solution appears in Galichon (2016).

=Separable Hilbert spaces=

Let X be a separable Hilbert space. Let \mathcal{P}_p(X) denote the collection of probability measures on X that have finite p-th moment; let \mathcal{P}_p^r(X) denote those elements \mu \in \mathcal{P}_p(X) that are Gaussian regular: if g is any strictly positive Gaussian measure on X and g(N) = 0, then \mu(N) = 0 also.

Let \mu \in \mathcal{P}_p^r (X), \nu \in \mathcal{P}_p(X), c (x, y) = | x - y |^p/p for p\in(1,\infty), p^{-1} + q^{-1} = 1. Then the Kantorovich problem has a unique solution \kappa, and this solution is induced by an optimal transport map: i.e., there exists a Borel map r\in L^p(X, \mu; X) such that

:\kappa = (\mathrm{id}_X \times r)_{*} (\mu) \in \Gamma (\mu, \nu).

Moreover, if \nu has bounded support, then

:r(x) = x - | \nabla \varphi (x) |^{q - 2} \, \nabla \varphi (x)

for \mu-almost all x\in X for some locally Lipschitz, c-concave and maximal Kantorovich potential \varphi. (Here \nabla \varphi denotes the Gateaux derivative of \varphi.)

Entropic regularization

Consider a variant of the discrete problem above, where we have added an entropic regularization term to the objective function of the primal problem

:

\begin{align}

& \text{Minimize } \sum_{x\in \mathbf{X}, y\in \mathbf{Y}}\gamma_{xy}c_{xy}+\varepsilon \gamma_{xy} \ln \gamma_{xy} \\[4pt]

& \text{subject to: } \\[4pt]

& \gamma\ge0 \\[4pt]

& \sum_{y\in \mathbf{Y}}\gamma_{xy} = \mu_x, \forall x\in \mathbf{X} \\[4pt]

& \sum_{x\in \mathbf{X}}\gamma_{xy} = \nu_y, \forall y\in \mathbf{Y}

\end{align}

One can show that the dual regularized problem is

:

\max_{\varphi ,\psi} \sum_{x\in \mathbf{X}} \varphi_x \mu_x + \sum_{y\in \mathbf{Y}} \psi_y v_y - \varepsilon \sum_{x\in \mathbf{X},y\in \mathbf{Y}} \exp \left( \frac{\varphi_x + \psi_y - c_{xy}}{\varepsilon }\right)

where, compared with the unregularized version, the "hard" constraint in the former dual (\varphi_x + \psi_y - c_{xy}\geq 0) has been replaced by a "soft" penalization of that constraint (the sum of the \varepsilon \exp \left( (\varphi _x + \psi_y - c_{xy})/\varepsilon \right) terms). The optimality conditions in the dual problem can be expressed as

:{{EquationRef|5.1|Eq. 5.1:}}

\mu_x = \sum_{y\in \mathbf{Y}} \exp \left( \frac{\varphi_x + \psi_y - c_{xy}}{\varepsilon} \right) ~\forall x\in \mathbf{X}

:{{EquationRef|5.2|Eq. 5.2:}}

\nu_y = \sum_{x\in \mathbf{X}} \exp \left( \frac{\varphi_x + \psi_y - c_{xy}}{\varepsilon }\right) ~\forall y\in \mathbf{Y}

Denoting A as the |\mathbf{X}| \times |\mathbf{Y}| matrix of term A_{xy}=\exp \left(-c_{xy} / \varepsilon \right), solving the dual is therefore equivalent to looking for two diagonal positive matrices D_1 and D_2 of respective sizes |\mathbf{X}| and |\mathbf{Y}|, such that D_1AD_2 1_

\mathbf{Y}
=\mu and (D_1AD_2)^\top 1_
\mathbf{X}
=\nu . The existence of such matrices generalizes Sinkhorn's theorem and the matrices can be computed using the Sinkhorn–Knopp algorithm,Peyré, Gabriel and Marco Cuturi (2019), "Computational Optimal Transport: With Applications to Data Science", Foundations and Trends in Machine Learning: Vol. 11: No. 5-6, pp 355–607. DOI: [http://dx.doi.org/10.1561/2200000073 10.1561/2200000073]. which simply consists of iteratively looking for \varphi_x to solve {{EquationNote|5.1|Equation 5.1}}, and \psi_y to solve {{EquationNote|5.2|Equation 5.2}}. Sinkhorn–Knopp's algorithm is therefore a coordinate descent algorithm on the dual regularized problem.

Applications

The Monge–Kantorovich optimal transport has found applications in wide range in different fields. Among them are:

  • Image registration and warping{{Cite journal|last1=Haker|first1=Steven|last2=Zhu|first2=Lei|last3=Tannenbaum|first3=Allen|last4=Angenent|first4=Sigurd|date=1 December 2004|title=Optimal Mass Transport for Registration and Warping|journal=International Journal of Computer Vision|language=en|volume=60|issue=3|pages=225–240|doi=10.1023/B:VISI.0000036836.66311.97|issn=0920-5691|citeseerx=10.1.1.59.4082|s2cid=13261370}}
  • Reflector design{{Cite journal|last1=Glimm|first1=T.|last2=Oliker|first2=V.|date=1 September 2003|title=Optical Design of Single Reflector Systems and the Monge–Kantorovich Mass Transfer Problem|journal=Journal of Mathematical Sciences|language=en|volume=117|issue=3|pages=4096–4108|doi=10.1023/A:1024856201493|s2cid=8301248|issn=1072-3374}}
  • Retrieving information from shadowgraphy and proton radiography{{Cite journal|last1=Kasim|first1=Muhammad Firmansyah|last2=Ceurvorst|first2=Luke|last3=Ratan|first3=Naren|last4=Sadler|first4=James|last5=Chen|first5=Nicholas|last6=Sävert|first6=Alexander|last7=Trines|first7=Raoul|last8=Bingham|first8=Robert|last9=Burrows|first9=Philip N.|date=16 February 2017|title=Quantitative shadowgraphy and proton radiography for large intensity modulations|journal=Physical Review E|volume=95|issue=2|pages=023306|doi=10.1103/PhysRevE.95.023306|pmid=28297858|arxiv=1607.04179|bibcode=2017PhRvE..95b3306K|s2cid=13326345}}
  • Seismic tomography and reflection seismology{{cite journal |last1=Metivier |first1=Ludovic |title=Measuring the misfit between seismograms using an optimal transport distance: application to full waveform inversion |journal=Geophysical Journal International |date=24 February 2016 |volume=205 |issue=1 |pages=345–377 |doi=10.1093/gji/ggw014 |bibcode=2016GeoJI.205..345M |url=https://academic.oup.com/gji/article-abstract/205/1/345/2594839|doi-access=free }}
  • The broad class of economic modelling that involves gross substitutes property (among others, models of matching and discrete choice).

See also

References

{{Reflist|30em}}

Further reading

  • {{cite book | last=Brualdi | first=Richard A. | title=Combinatorial matrix classes | series=Encyclopedia of Mathematics and Its Applications | volume=108 | location=Cambridge | publisher=Cambridge University Press | year=2006 | isbn=978-0-521-86565-4 | zbl=1106.05001 | url-access=registration | url=https://archive.org/details/combinatorialmat0000brua }}

{{Authority control}}

{{DEFAULTSORT:Transportation Theory}}

Category:Calculus of variations

Category:Matching (graph theory)

Category:Mathematical economics

Category:Measure theory

Category:Transport economics

Category:Optimization in vector spaces

Category:Mathematical optimization in business