The International Space Station contains many centrifuges in its labs. Each centrifuge will have some number (C) of chambers each of which can contain 0, 1, or 2 specimens. You are to write a program which assigns all S specimens to the chambers such that no chamber contains more than 2 specimens and the following expression for IMBALANCE is minimized.
where:
CMi is the Chamber Mass of chamber i and is computed by summing the masses of the specimens assigned to chamber i.
AM is the Average Mass of the chambers and is computed by dividing the sum of the masses of all specimens by the number of chambers (C).