MathDB
CIIM 2010 Problem 2

Source:

June 9, 2016
CIIM 2010CIIMundergraduate

Problem Statement

In one side of a hall there are 2N2N rooms numbered from 1 to 2N2N. In each room ii between 1 and NN there are pip_i beds. Is needed to move every one of this beds to the roms from N+1N+ 1 to 2N2N, in such a way that for every jj between N+1N+1 and 2N2N the room jj will have pjp_j beds. Supose that each bed can be move once and the price of moving a bed from room ii to room jj is (ij)2(i-j)^2. Find a way to move every bed such that the total cost is minimize.
Note: The numbers pip_i are given and satisfy that p1+p2++pN=pN+1+pN+2++p2N.p_1 + p_2 + \cdots + p_N = p_{N+1} + p_{N+2} + \cdots+ p_{2N}.