How to divide based on fraction per partipant

58 Views Asked by At

I want to fairly divide a random number of sweets I buy every day between kids in my class for the day based on the days test results. I calculate the test results.

There are 10 Kids: At the end of the day I add their marks together and find the fraction over the total achieved mark for each kid. I get the following.

  • 1:0.1
  • 2:0.1
  • 3:0.15
  • 4:0.15
  • 5:0.2
  • 6:0.1
  • 7:0.1
  • 8:0.0.05
  • 9:0.025
  • 10:0.025

The fractions sum equal 100%

For example if I bring 48 sweets

  • 1:0.1 * 48 rounded = 5
  • 2:0.1 * 48 rounded = 5
  • 3:0.1 * 48 rounded = 5
  • 4:0.2 * 48 rounded = 10
  • 5:0.2 * 48 rounded = 10
  • 6:0.1 * 48 rounded = 5
  • 7:0.1 * 48 rounded = 5
  • 8:0.0.05 * 48 rounded = 2
  • 9:0.025 * 48 rounded = 1
  • 10:0.025 * 48 rounded = 1

After handing out the sweet I realized I am short one sweet as the total is 49

Some days I am short multiple sweet. Other days I have sweets left.

Is it possible to evenly divide the sweets every day so I have none short or left.

is there something in Mathematics that can assist me?

1

There are 1 best solutions below

0
On BEST ANSWER

In some cases, no fair division where you give out all the sweets is possible. Consider, for example, the outcome in which all $10$ children get the same score (and you brought $48$ sweets). You can't give each child $4.8$ sweets, but if you round some of the numbers up and the rest down, you end up with two children that have the exact same score but receive different amounts of candy.

Aside from that, a reasonable thing to do is the following:

  1. As a first approximation, round all the numbers down when giving out the candy. This will never demand more sweets than you have, but sometimes it will leave you with extra sweets left over. (If none are left over, you can stop at this step.)
  2. For each child, divide the fraction of a sweet that they didn't get (due to the rounding) by the amount they did get. For example, if a child earned $4.8$ pieces of candy, but only got $4$, write down $\frac{0.8}{4}$ for that child.
  3. Sort the children by the amounts calculated in step $2$, from largest to smallest, and give out the leftover candies to the children in this order, one at a time.

In the last step, break ties arbitrarily. (Maybe bias it towards children who got less candy, to be nice? Or maybe towards children who lost ties the previous time? Or both?)

So in your example, we have:

\begin{array}{c|l|c|c|c} \text{Child} & \text{Score} & \text{Candy earned} & \text{Step 1 candy} & \text{Fraction} & \text{Step 3 candy} \\ \hline 1 & 0.1 & 4.8 & 4 & \frac{0.8}{4} = 0.2 & 0 \\ 2 & 0.1 & 4.8 & 4 & \frac{0.8}{4} = 0.2 & 0 \\ 3 & 0.15 & 7.2 & 7 & \frac{0.2}{7} \approx 0.03 & 0\\ 4 & 0.15 & 7.2 & 7 & \frac{0.2}{7} \approx 0.03 & 0\\ 5 & 0.2 & 9.6 & 9 & \frac{0.6}{9} \approx 0.07 & 0\\ 6 & 0.1 & 4.8 & 4 & \frac{0.8}{4} = 0.2 & 1\\ 7 & 0.1 & 4.8 & 4 & \frac{0.8}{4} = 0.2 & 1\\ 8 & 0.05 & 2.4 & 2 & \frac{0.4}{2} = 0.2 & 1\\ 9 & 0.025 & 1.2 & 1 & \frac{0.2}{1} = 0.2 & 1\\ 10 & 0.025 & 1.2 & 1 & \frac{0.2}{1} = 0.2 & 1\\ \end{array}

(You see that again we run into problems where children with the same scores get different amounts of candy. Maybe this doesn't happen too often in practice if the scores are very unlikely to be equal?)

The motivation for this argument is that:

  1. Everyone should at least get the rounded-down amount of candy, so nobody is shortchanged by more than one sweet.
  2. After that, you give out the leftover candy in order of the percentage difference it would make. To the kid who earned $9.6$ sweets but only got $9$, the extra $0.6$ means less than an $0.4$ does to the kid who earned $2.4$ sweets and got $2$.