 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" books of equal width on a shelf (the real line), arranged in a single contiguous block.