 This problem only makes sense if the pile to be created has the same mass as the pile to be moved; therefore without loss of generality assume that formula_7 and formula_15 are probability distributions containing a total mass of 1.Assume also that there is given some cost function 

that gives the cost of transporting a unit mass from the point formula_43 to the point formula_44.A transport plan to move formula_7 into formula_15 can be described by a function formula_47 which gives the amount of mass to move from formula_43 to formula_44.