In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
and economics, transportation theory or transport theory is a name given to the study of optimal
transport
Transport (in British English), or transportation (in American English), is the intentional movement of humans, animals, and goods from one location to another. Modes of transport include air, land (rail and road), water, cable, pipeline, an ...
ation and
allocation of resources. The problem was formalized by the French
mathematician
A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems.
Mathematicians are concerned with numbers, data, quantity, structure, space, models, and change.
History
On ...
Gaspard Monge
Gaspard Monge, Comte de Péluse (9 May 1746 – 28 July 1818) was a French mathematician, commonly presented as the inventor of descriptive geometry, (the mathematical basis of) technical drawing, and the father of differential geometry. Durin ...
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
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
. 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
The Soviet Union,. officially the Union of Soviet Socialist Republics. (USSR),. was a List of former transcontinental countries#Since 1700, transcontinental country that spanned much of Eurasia from 1922 to 1991. A flagship communist state, ...
mathematician and economist
Leonid Kantorovich
Leonid Vitalyevich Kantorovich ( rus, Леони́д Вита́льевич Канторо́вич, , p=lʲɪɐˈnʲit vʲɪˈtalʲjɪvʲɪtɕ kəntɐˈrovʲɪtɕ, a=Ru-Leonid_Vitaliyevich_Kantorovich.ogg; 19 January 19127 April 1986) was a Soviet ...
.
[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.
The
linear programming
Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear function#As a polynomial function, li ...
formulation of the transportation problem is also known as the
Hitchcock
Sir Alfred Joseph Hitchcock (13 August 1899 – 29 April 1980) was an English filmmaker. He is widely regarded as one of the most influential figures in the history of cinema. In a career spanning six decades, he directed over 50 featur ...
–
Koopmans Koopmans is a Dutch occupational surname meaning " merchant's".
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 subset
In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
s ''M'' and ''F'' of the Euclidean plane
In mathematics, the Euclidean plane is a Euclidean space of dimension two. That is, a geometric setting in which two real quantities are required to determine the position of each point ( element of the plane), which includes affine notions of ...
R2. Suppose also that we have a ''cost function'' ''c'' : R2 × R2 → [0, ∞), 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'' → ''F''.
In other words, each mine ''m'' ∈ ''M'' supplies precisely one target factory ''T''(''m'') ∈ ''F'' and each factory is supplied by precisely one mine.
We wish to find the ''optimal transport plan'', the plan ''T'' whose ''total cost''
:
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
The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows:
:The problem instance has a number of ''agents'' and a number of ''tasks''. Any agent can be assigned to perform any ta ...
.
More specifically, it is equivalent to finding a minimum weight matching in a bipartite graph
In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V, that is every edge connects a vertex in U to one in V. Vertex sets U and V are ...
.
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
In elementary mathematics, a number line is a picture of a graduated straight line (geometry), line that serves as visual representation of the real numbers. Every point of a number line is assumed to correspond to a real number, and every real ...
), 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:
# move all ''n'' books one book-width to the right ("many small moves");
# 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'') = α, ''x'' − ''y'', ) 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), 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 Lauren Hitchcock (March 6, 1875 – May 31, 1957) was an American mathematician and physicist known for his formulation of the transportation problem in 1941.
Academic life
Frank did his preparatory study at Phillips Andover Academy. He ...
:
:Suppose there are ''m'' sources for a commodity, with units of supply at ''x''''i'' and ''n'' sinks for the commodity, with the demand at ''y''''j''. If 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. Fulkerson
Delbert Ray Fulkerson (; August 14, 1924 – January 10, 1976) was an American mathematician who co-developed the FordFulkerson algorithm, one of the most well-known algorithms to solve the maximum flow problem in Flow network, networks.
Early l ...
and in the book ''Flows in Networks'' (1962) written with L. R. Ford Jr.
Lester Randolph Ford Jr. (September 23, 1927 – February 26, 2017) was an American mathematician specializing in network flow problems. He was the son of mathematician Lester R. Ford Sr.
Ford's paper with D. R. Fulkerson on the maximum flow p ...
Tjalling Koopmans
Tjalling Charles Koopmans (August 28, 1910 – February 26, 1985) was a Dutch-American mathematician and economist. He was the joint winner with Leonid Kantorovich of the 1975 Nobel Memorial Prize in Economic Sciences for his work on the theory o ...
is also credited with formulations of transport economics
Transport economics is a branch of economics founded in 1959 by American economist John R. Meyer that deals with the allocation of resources within the transport sector. It has strong links to civil engineering. Transport economics differs from ...
and allocation of resources.
Numerical solution in Excel
With large numbers of routes, the problem is solved numerically.
Inputs: The Transportation cells are T . The Supply data cells are S .The Demand data cells are D .
Think of each unit of supply as a large box (a shipping container).
Outputs: The shipment plan is X.
The current shipping cost is K.
Objective: Maximize the cost reduction
MAX R(X)=K-T·X
The shipment plan, X, must satisfy three types of constraint
(1) Non-negativity constraints X >= 0
(2) Supply constraints S-1•X >= 0
(3) Demand constraints X•1-D >= 0
One way to set up the problem in Excel is depicted in the table below.
The total shipping costs T·X are the product of terms in the array 2:H3
R-V solution method (an update of the simplex method):
For a small number of routes, the problem can be solved rather like a beginner's cross word puzzle or Sudoku.
The R-V Solution Method introduces Virtual unit Costs ''c'', Virtual Prices ''p'' and a Virtual Trader.
The VIrtual Trader provides Real implications.
Crucially, the V-trader is a price taker.
Then there will be excess demand on any strictly profitable route and demand will be zero on any strictly unprofitable route.
VIRTUAL PROFIT MAXIMIZATION VPM
The unit profit on each route is pj - tij -ci These are calculated in the V-PROFIT Box at the bottom right of the Table.
(If you are working with Excel, enter these formulas and then use SOLVER if for the numerically computed maximum.)
The profit must be zero on all utilized routs and no route is strictly profitable.
STEP 1: Build a table like the one below. in the table small numbers are data points. Large bold numbers are variables.
In each column the V-PRICE must at least be the minimum cost to satisfy VPM.
STEP 2: Make the lowest cost supplier the #1 supplier (top row).
STEP 3; Fill the orders sequentially. The first route to be filled should be in the top row 1:D1 Then fill sequentially by cost so 2;D1is filled next
STEP 3: The last order to be filled is in ''Italics''. The source in this row is the less valuable source. Then C2 is zero. Fill in the cell to the left of C2
STEP 4: Solve for the V-Prices and V-costs.
On each route select V-COSTS and V-PRICES so that the V-Trader breaks even on all the active routes.
Start with the column that has the fewest entries (Column 2)
V-SUDOKU
The V-Costs are initially left blank 2 (zero). To break even in Column 2, P2 = C2 +T22 =0 + 5 =5
In Column 1 both routes are used. Since C2 is zero, C1 =1. Then P1=C1 + T21 =5
V-CHECK If you set this V-PUZZLE up on a spreadsheet, the profit BOX will already be filled in.
The real value of the V-prices
Supply:
If you add a unit of supply at S1 you can lower the transportation cost by adding 1 to cell 1:C2 and subtracting 1 from cell 2;C2
This lowers shipping costs by 1, This is the meaning of C1. If the firm can rent an additional container at less than 1 (think "one thousand") there are additional cost savings.
If you try this at S2, the additional container doe not lower shipping costs. This is the meaning of C1.
Demand:
What would be the reduction in shipping costs if another unit of the product could be obtained locally (at the Destination).
Try reducing D1 by one unit. The shipping cost falls by...? Yes, by the V-PRICE
Using the V-virtual trader method therefore yields Virtual price and costs of Real importance.
Programming note:
If you use a canned maximizing program like Excels Add-In Solver, it will get to the correct answer in a flash.
If you look at the "Lagrange Multipliers" or "shadow prices" that may appear in a sensitivity report, they can be confusing.
Since Solver provides the solution, all you have to do is Sudoku your way to the V-Costs and V-prices.
Here is the set-up for 3 suppliers and 3 destinations. I suggest that you set S3=0 initially and Sudoku your way to the solution..
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
In mathematics, the concept of a measure is a generalization and formalization of geometrical measures ( length, area, volume) and other common notions, such as mass and probability of events. These seemingly distinct concepts have many simil ...
. 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 and be two separable metric space
In mathematics, a metric space is a set together with a notion of ''distance'' between its elements, usually called points. The distance is measured by a function called a metric or distance function. Metric spaces are the most general settin ...
s such that any probability measure
In mathematics, a probability measure is a real-valued function defined on a set of events in a probability space that satisfies measure properties such as ''countable additivity''. The difference between a probability measure and the more gener ...
on (or ) is a Radon measure (i.e. they are Radon space
In the mathematical discipline of general topology, a Polish space is a separable completely metrizable topological space; that is, a space homeomorphic to a complete metric space that has a countable dense subset. Polish spaces are so named beca ...
s). Let , i.e., if the cumulative distribution function
F_\mu = \mathbf\rightarrow[0,1] of
\mu is a
continuous function
In mathematics, a continuous function is a function such that a continuous variation (that is a change without jump) of the argument induces a continuous variation of the value of the function. This means that there are no abrupt changes in value ...
, then
F_^ \circ F_ : \mathbf \to \mathbf is an optimal transport map. It is the unique optimal transport map if
h is strictly convex.
# We have
::
\min_ \int_ c(x, y) \, \mathrm \gamma (x, y) = \int_0^1 c \left( F_^ (s), F_^ (s) \right) \, \mathrm 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 and
y\in \mathbf , and let
\gamma _ be the probability of an
xy assignment. The objective function in the primal Kantorovich problem is then
:
\sum_ \gamma_c_
and the constraint
\gamma \in \Gamma \left( \mu ,\nu \right) expresses as
:
\sum_\gamma_=\mu_x,\forall x\in \mathbf
and
:
\sum_ \gamma_=\nu_y,\forall y\in \mathbf.
In order to input this in a
linear programming
Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear function#As a polynomial function, li ...
problem, we need to
vectorize the matrix
\gamma_ by either stacking
its columns or its rows, we call
\operatorname this operation. In the
column-major order
In computing, row-major order and column-major order are methods for storing multidimensional arrays in linear storage such as random access memory.
The difference between the orders lies in which elements of an array are contiguous in memory. In ...
, the constraints above rewrite as
:
\left( 1_\otimes I_\right) \operatorname\left( \gamma \right) =\mu and
\left( I_\otimes 1_\right) \operatorname\left( \gamma \right) =\nu
where
\otimes is the
Kronecker product
In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a generalization of the outer product (which is denoted by the same symbol) from vectors to ...
,
1_ is a matrix of size
n\times m with all entries of ones, and
I_ is the identity matrix of size
n. As a result, setting
z=\operatorname\left( \gamma \right) , the linear programming formulation of the problem is
:
\begin
& \text \operatorname(c)^\top z \\ pt& \text \\ pt& z \ge 0 \\ pt& \begin
1_\otimes I_ \\
I_\otimes 1_
\end \\ pt& z=\binom
\end
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=\mathbf^d and
\mu is a continuous distribution over
\mathbf^d, while
\nu =\sum_^\nu _\delta_ is a discrete distribution which assigns probability mass
\nu _ to site
y_j \in \mathbf^d. In this case, we can see that the primal and dual Kantorovich problems respectively boil down to:
\inf \left\
for the primal, where
\gamma \in \Gamma \left( \mu ,\nu \right) means that
\int_ d\gamma _\left( x\right) =\nu _ and
\sum_d\gamma_\left( x\right) =d\mu \left( x\right), and:
\sup \left\
for the dual, which can be rewritten as:
\sup_\left\
which is a finite-dimensional convex optimization problem that can be solved by standard techniques, such as
gradient descent.
In the case when
c\left( x,y\right) =\left\vert x-y\right\vert ^/2 , one can show that the set of
x\in \mathbf assigned to a particular site
j is a convex polyhedron. The resulting configuration is called a
power diagram
In computational geometry, a power diagram, also called a Laguerre–Voronoi diagram, Dirichlet cell complex, radical Voronoi tesselation or a sectional Dirichlet tesselation, is a partition of the Euclidean plane into polygonal cells defined from ...
.
Quadratic normal case
Assume the particular case
\mu =\mathcal\left( 0,\Sigma_X\right) ,
\nu =\mathcal \left( 0,\Sigma _\right) , and
c(x,y) =\left\vert y-Ax\right\vert^2/2 where
A is invertible. One then has
:
\varphi(x) =-x^\top \Sigma_X^\left( \Sigma_X^A^\top \Sigma_Y A\Sigma_X^\right) ^\Sigma_^x/2
:
\psi(y) =-y^\top A\Sigma_X^\left( \Sigma_X^A^\top \Sigma_Y A\Sigma_^\right)^ \Sigma_X^Ay/2
:
T(x) = (A^\top)^\Sigma_X^ \left(\Sigma_X^A^\top \Sigma_Y A\Sigma_X^ \right)^ \Sigma_X^
The proof of this solution appears in Galichon (2016).
Separable Hilbert spaces
Let
X be a
separable Hilbert space
In mathematics, Hilbert spaces (named after David Hilbert) allow generalizing the methods of linear algebra and calculus from (finite-dimensional) Euclidean vector spaces to spaces that may be infinite-dimensional. Hilbert spaces arise natural ...
. Let
\mathcal_p(X) denote the collection of probability measures on
X that have finite
p-th moment; let
\mathcal_p^r(X) denote those elements
\mu \in \mathcal_p(X) that are Gaussian regular: if
g is any
strictly positive Gaussian measure
In mathematics, Gaussian measure is a Borel measure on finite-dimensional Euclidean space R''n'', closely related to the normal distribution in statistics. There is also a generalization to infinite-dimensional spaces. Gaussian measures are named ...
on
X and
g(N) = 0, then
\mu(N) = 0 also.
Let
\mu \in \mathcal_p^r (X),
\nu \in \mathcal_p(X),
c (x, y) = , x - y , ^p/p for
p\in(1,\infty), p^ + q^ = 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_X \times r)_ (\mu) \in \Gamma (\mu, \nu).
Moreover, if
\nu has
bounded
Boundedness or bounded may refer to:
Economics
* Bounded rationality, the idea that human rationality in decision-making is bounded by the available information, the cognitive limitations, and the time available to make the decision
* Bounded e ...
support
Support may refer to:
Arts, entertainment, and media
* Supporting character
Business and finance
* Support (technical analysis)
* Child support
* Customer support
* Income Support
Construction
* Support (structure), or lateral support, a ...
, then
:
r(x) = x - , \nabla \varphi (x) , ^ \, \nabla \varphi (x)
for
\mu-almost all
x\in X for some
locally Lipschitz
In mathematical analysis, Lipschitz continuity, named after German mathematician Rudolf Lipschitz, is a strong form of uniform continuity for functions. Intuitively, a Lipschitz continuous function is limited in how fast it can change: there exis ...
, ''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
& \text \sum_\gamma_c_+\varepsilon \gamma_ \ln \gamma_ \\ pt& \text \\ pt& \gamma\ge0 \\ pt& \sum_\gamma _ =\mu _,\forall x\in \mathbf \\ pt& \sum_\gamma_ = \nu_y, \forall y\in \mathbf
\end
One can show that the dual regularized problem is
:
\max_ \sum_ \varphi_x \mu_x + \sum_ \psi_y v_y - \varepsilon \sum_ \exp \left( \frac\right)
where, compared with the unregularized version, the "hard" constraint in the former dual (
\varphi_x + \psi_y - c_\geq 0) has been replaced by a "soft" penalization of that constraint (the sum of the
\varepsilon \exp \left( (\varphi _x + \psi_y - c_)/\varepsilon \right) terms ). The optimality conditions in the dual problem can be expressed as
:
\mu_x = \sum_ \exp \left( \frac \right) ~\forall x\in \mathbf
:
\nu_y = \sum_ \exp \left( \frac\right) ~\forall y\in \mathbf
Denoting
A as the
\left\vert \mathbf\right\vert \times \left\vert \mathbf\right\vert matrix of term
A_=\exp \left(-c_ / \varepsilon \right), solving the dual is therefore equivalent to looking for two diagonal positive matrices
D_ and
D_ of respective sizes
\left\vert \mathbf\right\vert and
\left\vert \mathbf\right\vert, such that
D_AD_1_=\mu and
\left( D_AD_\right) ^1_=\nu . The existence of such matrices generalizes
Sinkhorn's theorem
Sinkhorn's theorem states that every square matrix with positive entries can be written in a certain standard form.
Theorem
If ''A'' is an ''n'' × ''n'' matrix with strictly positive elements, then there exist diagonal matrices ''D''1 and ' ...
and the matrices can be computed using the
Sinkhorn–Knopp algorithm, which simply consists of iteratively looking for
\varphi _ to solve , and
\psi _ to solve . Sinkhorn–Knopp's algorithm is therefore a
coordinate descent Coordinate descent is an optimization algorithm that successively minimizes along coordinate directions to find the minimum of a function. At each iteration, the algorithm determines a coordinate or coordinate block via a coordinate selection rule, ...
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
* Reflector design
* Retrieving information from
shadowgraphy and proton radiography
*
Seismic tomography
Seismic tomography or seismotomography is a technique for imaging the subsurface of the Earth with seismic waves produced by earthquakes or explosions. P-, S-, and surface waves can be used for tomographic models of different resolutions based on ...
and
reflection seismology
Reflection seismology (or seismic reflection) is a method of exploration geophysics that uses the principles of seismology to estimate the properties of the Earth's subsurface from reflected seismic waves. The method requires a controlled seismi ...
* The broad class of
economic
An economy is an area of the Production (economics), production, Distribution (economics), distribution and trade, as well as Consumption (economics), consumption of Goods (economics), goods and Service (economics), services. In general, it is ...
modelling that involves gross substitutes property (among others, models of
matching and
discrete choice).
See also
*
Wasserstein metric
In mathematics, the Wasserstein distance or Kantorovich– Rubinstein metric is a distance function defined between probability distributions on a given metric space M. It is named after Leonid Vaseršteĭn.
Intuitively, if each distribution is ...
*
Transport function
*
Hungarian algorithm
The Hungarian method is a combinatorial optimization algorithm that solves the assignment problem in polynomial time and which anticipated later primal–dual methods. It was developed and published in 1955 by Harold Kuhn, who gave the name "Hun ...
*
Transportation planning
Transportation planning is the process of defining future policies, goals, investments, and spatial planning designs to prepare for future needs to move people and goods to destinations. As practiced today, it is a collaborative process that i ...
*
Earth mover's distance
*
Monge–Ampère equation
References
Further reading
*
{{DEFAULTSORT:Transportation Theory
Calculus of variations
Matching (graph theory)
Mathematical economics
Measure theory
Transport economics
Optimization in vector spaces
Mathematical optimization in business