Transportation theory (mathematics)

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.
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".
Major advances were made in the field during World War II by the Soviet mathematician and economist Leonid Kantorovich. Consequently, the problem as it is stated is sometimes known as the Monge–Kantorovich transportation problem. The linear programming formulation of the transportation problem is also known as the Hitchcock–Koopmans transportation problem.
Suppose that we have a collection of m {\displaystyle m} mines mining iron ore, and a collection of n {\displaystyle 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 {\displaystyle M} and F {\displaystyle F} of the Euclidean plane R 2 {\displaystyle \mathbb {R} ^{2}} . Suppose also that we have a cost function c : R 2 × R 2 → [ 0 , ∞ ) {\displaystyle c:\mathbb {R} ^{2}\times \mathbb {R} ^{2}\to [0,\infty )} , so that c ( x , y ) {\displaystyle c(x,y)} is the cost of transporting one shipment of iron from x {\displaystyle x} to y {\displaystyle 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 → F {\displaystyle T:M\to F} . In other words, each mine m ∈ M {\displaystyle m\in M} supplies precisely one target factory T ( m ) ∈ F {\displaystyle T(m)\in F} and each factory is supplied by precisely one mine. We wish to find the optimal transport plan, the plan T {\displaystyle T} whose total cost
is the least of all possible transport plans from M {\displaystyle M} to F {\displaystyle 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.
The following simple example illustrates the importance of the cost function in determining the optimal transport plan. Suppose that we have n {\displaystyle 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:
If the cost function is proportional to Euclidean distance ( c ( x , y ) = α ‖ x − y ‖ {\displaystyle c(x,y)=\alpha \|x-y\|} for some α > 0 {\displaystyle \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 ) = α ‖ x − y ‖ 2 {\displaystyle c(x,y)=\alpha \|x-y\|^{2}} for some α > 0 {\displaystyle \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.
The following transportation problem formulation is credited to F. L. Hitchcock:
Tjalling Koopmans is also credited with formulations of transport economics and allocation of resources.
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 {\displaystyle X} and Y {\displaystyle Y} be two separable metric spaces such that any probability measure on X {\displaystyle X} (or Y {\displaystyle Y} ) is a Radon measure (i.e. they are Radon spaces). Let c : X × Y → [ 0 , ∞ ) {\displaystyle c:X\times Y\to [0,\infty )} be a Borel-measurable function. Given probability measures μ {\displaystyle \mu } on X {\displaystyle X} and ν {\displaystyle \nu } on Y {\displaystyle Y} , Monge's formulation of the optimal transportation problem is to find a transport map T : X → Y {\displaystyle T:X\to Y} that realizes the infimum
where T ∗ ( μ ) {\displaystyle T_{*}(\mu )} denotes the push forward of μ {\displaystyle \mu } by T {\displaystyle T} . A map T {\displaystyle 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 {\displaystyle T} satisfying T ∗ ( μ ) = ν {\displaystyle T_{*}(\mu )=\nu } : this happens, for example, when μ {\displaystyle \mu } is a Dirac measure but ν {\displaystyle \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 γ {\displaystyle \gamma } on X × Y {\displaystyle X\times Y} that attains the infimum
where Γ ( μ , ν ) {\displaystyle \Gamma (\mu ,\nu )} denotes the collection of all probability measures on X × Y {\displaystyle X\times Y} with marginals μ {\displaystyle \mu } on X {\displaystyle X} and ν {\displaystyle \nu } on Y {\displaystyle Y} . It can be shown that a minimizer for this problem always exists when the cost function c {\displaystyle c} is lower semi-continuous and Γ ( μ , ν ) {\displaystyle \Gamma (\mu ,\nu )} is a tight collection of measures (which is guaranteed for Radon spaces X {\displaystyle X} and Y {\displaystyle Y} ). (Compare this formulation with the definition of the Wasserstein metric W p {\displaystyle 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.
The minimum of the Kantorovich problem is equal to
where the supremum runs over all pairs of bounded and continuous functions φ : X → R {\displaystyle \varphi :X\rightarrow \mathbb {R} } and ψ : Y → R {\displaystyle \psi :Y\rightarrow \mathbb {R} } such that
The economic interpretation is clearer if signs are flipped. Let x ∈ X {\displaystyle x\in X} stand for the vector of characteristics of a worker, y ∈ Y {\displaystyle y\in Y} for the vector of characteristics of a firm, and Φ ( x , y ) = − c ( x , y ) {\displaystyle \Phi (x,y)=-c(x,y)} for the economic output generated by worker x {\displaystyle x} matched with firm y {\displaystyle y} . Setting u ( x ) = − φ ( x ) {\displaystyle u(x)=-\varphi (x)} and v ( y ) = − ψ ( y ) {\displaystyle v(y)=-\psi (y)} , the Monge–Kantorovich problem rewrites:
which has dual:
where the infimum runs over bounded and continuous function u : X → R {\displaystyle u:X\to \mathbb {R} } and v : Y → R {\displaystyle v:Y\to \mathbb {R} } . If the dual problem has a solution, one can see that:
so that u ( x ) {\displaystyle u(x)} interprets as the equilibrium wage of a worker of type x {\displaystyle x} , and v ( y ) {\displaystyle v(y)} interprets as the equilibrium profit of a firm of type y {\displaystyle y} .
For 1 ≤ p < ∞ {\displaystyle 1\leq p<\infty } , let P p ( R ) {\displaystyle {\mathcal {P}}_{p}(\mathbb {R} )} denote the collection of probability measures on R {\displaystyle \mathbb {R} } that have finite p {\displaystyle p} -th moment. Let μ , ν ∈ P p ( R ) {\displaystyle \mu ,\nu \in {\mathcal {P}}_{p}(\mathbb {R} )} and let c ( x , y ) = h ( x − y ) {\displaystyle c(x,y)=h(x-y)} , where h : R → [ 0 , ∞ ) {\displaystyle h:\mathbb {R} \to [0,\infty )} is a convex function.
The proof of this solution appears in Rachev & Rüschendorf (1998).
In the case where the margins μ {\displaystyle \mu } and ν {\displaystyle \nu } are discrete, let μ x {\displaystyle \mu _{x}} and ν y {\displaystyle \nu _{y}} be the probability masses respectively assigned to x ∈ X {\displaystyle x\in \mathbf {X} } and y ∈ Y {\displaystyle y\in \mathbf {Y} } , and let γ x y {\displaystyle \gamma _{xy}} be the probability of an x y {\displaystyle xy} assignment. The objective function in the primal Kantorovich problem is then
and the constraint γ ∈ Γ ( μ , ν ) {\displaystyle \gamma \in \Gamma (\mu ,\nu )} expresses as
and
In order to input this in a linear programming problem, we need to vectorize the matrix γ x y {\displaystyle \gamma _{xy}} by either stacking its columns or its rows, we call vec {\displaystyle \operatorname {vec} } this operation. In the column-major order, the constraints above rewrite as
where ⊗ {\displaystyle \otimes } is the Kronecker product, 1 n × m {\displaystyle 1_{n\times m}} is a matrix of size n × m {\displaystyle n\times m} with all entries of ones, and I n {\displaystyle I_{n}} is the identity matrix of size n {\displaystyle n} . As a result, setting z = vec ⁡ ( γ ) {\displaystyle z=\operatorname {vec} (\gamma )} , the linear programming formulation of the problem is
which can be readily inputted in a large-scale linear programming solver (see chapter 3.4 of Galichon (2016)).
In the semi-discrete case, X = Y = R d {\displaystyle X=Y=\mathbb {R} ^{d}} and μ {\displaystyle \mu } is a continuous distribution over R d {\displaystyle \mathbb {R} ^{d}} , while ν = ∑ j = 1 J ν j δ y i {\displaystyle \nu =\sum _{j=1}^{J}\nu _{j}\delta _{y_{i}}} is a discrete distribution which assigns probability mass ν j {\displaystyle \nu _{j}} to site y j ∈ R d {\displaystyle y_{j}\in \mathbb {R} ^{d}} . In this case, we can see that the primal and dual Kantorovich problems respectively boil down to:
for the primal, where γ ∈ Γ ( μ , ν ) {\displaystyle \gamma \in \Gamma (\mu ,\nu )} means that ∫ X d γ j ( x ) = ν j {\displaystyle \int _{X}d\gamma _{j}(x)=\nu _{j}} and ∑ j d γ j ( x ) = d μ ( x ) {\displaystyle \sum _{j}d\gamma _{j}(x)=d\mu (x)} , and:
for the dual, which can be rewritten as:
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 {\displaystyle c(x,y)=|x-y|^{2}/2} , one can show that the set of x ∈ X {\displaystyle x\in \mathbf {X} } assigned to a particular site j {\displaystyle j} is a convex polyhedron. The resulting configuration is called a power diagram.
Assume the particular case μ = N ( 0 , Σ X ) {\displaystyle \mu ={\mathcal {N}}(0,\Sigma _{X})} , ν = N ( 0 , Σ Y ) {\displaystyle \nu ={\mathcal {N}}(0,\Sigma _{Y})} , and c ( x , y ) = | y − A x | 2 / 2 {\displaystyle c(x,y)=|y-Ax|^{2}/2} where A {\displaystyle A} is invertible. One then has
The proof of this solution appears in Galichon (2016).
Let X {\displaystyle X} be a separable Hilbert space. Let P p ( X ) {\displaystyle {\mathcal {P}}_{p}(X)} denote the collection of probability measures on X {\displaystyle X} that have finite p {\displaystyle p} -th moment; let P p r ( X ) {\displaystyle {\mathcal {P}}_{p}^{r}(X)} denote those elements μ ∈ P p ( X ) {\displaystyle \mu \in {\mathcal {P}}_{p}(X)} that are Gaussian regular: if g {\displaystyle g} is any strictly positive Gaussian measure on X {\displaystyle X} and g ( N ) = 0 {\displaystyle g(N)=0} , then μ ( N ) = 0 {\displaystyle \mu (N)=0} also.
Let μ ∈ P p r ( X ) {\displaystyle \mu \in {\mathcal {P}}_{p}^{r}(X)} , ν ∈ P p ( X ) {\displaystyle \nu \in {\mathcal {P}}_{p}(X)} , c ( x , y ) = | x − y | p / p {\displaystyle c(x,y)=|x-y|^{p}/p} for p ∈ ( 1 , ∞ ) , p − 1 + q − 1 = 1 {\displaystyle p\in (1,\infty ),p^{-1}+q^{-1}=1} . Then the Kantorovich problem has a unique solution κ {\displaystyle \kappa } , and this solution is induced by an optimal transport map: i.e., there exists a Borel map r ∈ L p ( X , μ ; X ) {\displaystyle r\in L^{p}(X,\mu ;X)} such that
Moreover, if ν {\displaystyle \nu } has bounded support, then
for μ {\displaystyle \mu } -almost all x ∈ X {\displaystyle x\in X} for some locally Lipschitz, c {\displaystyle c} -concave and maximal Kantorovich potential φ {\displaystyle \varphi } . (Here ∇ φ {\displaystyle \nabla \varphi } denotes the Gateaux derivative of φ {\displaystyle \varphi } .)
Consider a variant of the discrete problem above, where we have added an entropic regularization term to the objective function of the primal problem
One can show that the dual regularized problem is
where, compared with the unregularized version, the "hard" constraint in the former dual ( φ x + ψ y − c x y ≥ 0 {\displaystyle \varphi _{x}+\psi _{y}-c_{xy}\geq 0} ) has been replaced by a "soft" penalization of that constraint (the sum of the ε exp ⁡ ( ( φ x + ψ y − c x y ) / ε ) {\displaystyle \varepsilon \exp \left((\varphi _{x}+\psi _{y}-c_{xy})/\varepsilon \right)} terms). The optimality conditions in the dual problem can be expressed as
Denoting A {\displaystyle A} as the | X | × | Y | {\displaystyle |\mathbf {X} |\times |\mathbf {Y} |} matrix of term A x y = exp ⁡ ( − c x y / ε ) {\displaystyle A_{xy}=\exp \left(-c_{xy}/\varepsilon \right)} , solving the dual is therefore equivalent to looking for two diagonal positive matrices D 1 {\displaystyle D_{1}} and D 2 {\displaystyle D_{2}} of respective sizes | X | {\displaystyle |\mathbf {X} |} and | Y | {\displaystyle |\mathbf {Y} |} , such that D 1 A D 2 1 | Y | = μ {\displaystyle D_{1}AD_{2}1_{|\mathbf {Y} |}=\mu } and ( D 1 A D 2 ) ⊤ 1 | X | = ν {\displaystyle (D_{1}AD_{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, which simply consists of iteratively looking for φ x {\displaystyle \varphi _{x}} to solve Equation 5.1, and ψ y {\displaystyle \psi _{y}} to solve Equation 5.2. Sinkhorn–Knopp's algorithm is therefore a coordinate descent algorithm on the dual regularized problem.
The Monge–Kantorovich optimal transport has found applications in wide range in different fields. Among them are: