Search code examples
algorithmlinear-programmingearth-movers-distance

What's the optimal solution for 1D optimal transport


Assume I want to move n goods to n warehouses. I have a n x n cost matrix M, where Mij denotes the cost of transporting jth good to the warehouse. How do I find the transporting plan that minimizes the total costs?

I know there are many general optimal transform algorithms but is there any efficient algorithm tailored for this 1D situation?


Solution

  • Found the solution as Hungarian algorithm.