Transport problem

We have $n$ suppliers labelled $i=1,2,\ldots,n$, each supplying $s_i$ units of products. There are also $m$ consumers labelled $j=1,2,\ldots,m$, each demanding $d_i$ units of products. Transporting one unit of product from $i$ to $j$ costs $c_{ij}$.

This is a special case of the minimum cost flow problem, with $G$ being a bipartite graph and $E$ only consists of edges from a supplier to a consumer.

Transport problem

$$ \begin{align*} \text{Minimise } &\sum_{(i,j)\in E} c_{ij} x_{ij} \\ \text{subject to } &\sum_{j=1}^{m} x_{ij} = s_i && \forall i=1,2,\ldots,n, \\ &\sum_{i=1}^{n} x_{ij} = d_j && \forall j=1,2,\ldots,m, \\ &x_{ij} \geq 0 &&\forall (i,j)\in E. \end{align*} $$

We can let $E = V\times V$ and set the cost of the non-existent edges to be infinity.

Transport problem

$$ \begin{align*} \text{Minimise } &\sum_{i=1}^{n} \sum_{j=1}^{m} c_{ij} x_{ij} \\ \text{subject to } &\sum_{j=1}^{m} x_{ij} = s_i && \forall i=1,2,\ldots,n, \\ &\sum_{i=1}^{n} x_{ij} = d_j && \forall j=1,2,\ldots,m, \\ &x_{ij} \geq 0 &&\forall (i,j)\in E. \end{align*} $$