If the title is completely misleading/unclear please suggest something relevant and better.
Consider a situation where:
Candidate A gets a total of Ta votes from N constituencies, with distribution: {a1, a2, a3 .. aN}
Candidate B gets a total of Tb votes (Ta and Tb are unrelated, which means Ta < Tb, Ta = Tb & Ta > Tb are all possible) from M constituencies (IMP: M <= N), distribution unknown.
What is the best approach to allot the Tb votes to the constituencies b1, b2, b3.. bM such that, they are distributed in the same ratio as a1, a2, a3.. aN.
Some Cases:
1.Ideal
Ta = 20 (8,6,4,2) Tb = 10
Then we get: Tb (4,3,2,1)
2.Somewhat less ideal Ta = 20(8 ,6, 4, 1 , 1) Tb = 10
Then we get (4, 3, 2, 1, 0) which actually means (4,3,2,1) (M < N), and is still tolerable.