I have this instance:
Let's say I have two (could be more) friends, one weighing 200 pounds and another weighing 100 pounds; I won a box with 30 chocolates in a contest and I want to divide among these friends aiming at both having optimal satisfaction, measured by (chocolate)/(body weigh) ratio.
So far the problem is trivial, i give 20 chocolates to the heavier friend and 10 to the other; resulting in a chocolate/mass ratio of 1/10 for each.
But now let's assume they each had some chocolates beforehand, 3 for my thinner friend and 5 for the heavier one.
Now the problem gets complicated.
I have another instance with some 10 "friends" and the numbers are way larger. For this example I assumed the 30 chocolates were indivisible, but could also be divisible.
My question: what is this problem called? Are there any simple algorithms for it?