Let be shipments, with column sums eight and row sums at most the four capacities. Total demand is , below total capacity , so unused capacity is allowed. This is a transportation problem with capacity inequalities; equivalently add a dummy shop demanding four units with zero shipping cost.
Using the original PDF's cost , take the feasible solution
Its row totals are and all column totals are eight. Four units of capacity remain unused at the second factory. Its shipping cost is .
To prove that the cost is a global minimum, use the transportation dual certificate with capacity inequalities. If row potentials satisfy and , every feasible solution satisfies
where . The second inequality uses the sign of : multiplying a capacity upper bound by a nonpositive number reverses it. Choose and . The reduced costs are
so every entry is nonnegative. The lower bound is , equal to the displayed shipping cost. The minimum shipping cost is .
For the production costs in a transportation problem, add the production cost of each factory to every real shipment from that factory. Unused capacity incurs no production cost, so the dummy-shop costs remain zero. The resulting real-shop cost matrix is
A feasible solution is
Its row totals are and column totals remain eight, leaving four units unused at the fourth factory. Its combined cost is .
For a matching transportation dual certificate with capacity inequalities, take and . Their reduced costs are
all nonnegative. The lower bound is . Thus the minimum combined production and shipping cost is , and the second allocation attains it.