A room holds 100 people, and 99 percent of them are left-handed: 99 left-handed and 1 right-handed. Only left-handed people may leave. How many of them must walk out for the room to be 98 percent left-handed?
Let left-handers leave. The room then has people, of whom are left-handed, so the left-handed share is
We want this to be .
Set the share equal to the target and clear the denominators:
Collect the terms on one side and the numbers on the other: , so . The equation has one solution, and it is a whole number between 0 and 99, so it is a real answer.
Forget the left-handers and watch the right-handed one. Only left-handers may leave, so the right-hander never goes. There is 1 of them from the start to the end, and what changes is the size of the room.
At the end the room is 98 percent left-handed, so it is 2 percent right-handed. One person is 2 percent of the room, so the room has people. It began with 100, so 100 − 50 = 50 left.
This is the same equation seen from the other side: the equation's answer is the size at which one person is two percent.
It is natural to say one person: 99 percent down to 98 percent is one percentage point, and one person out of a hundred is one percent. But that moves the people and the room together. After one leaver the room has 99 people, and the left-handed share is 98 out of 99, which is not 98 percent. It is a little over. The more left-handers leave, the smaller the room, so the one right-hander counts for more each time, and the share falls slowly at first.
The script computes the share for every number of leavers from 0 to 99. It falls at every step and never repeats, so 98 percent is reached at exactly one of them. Here are the rows the film shows:
| left-handers who leave | left-handed | in the room | share |
|---|---|---|---|
| 0 | 99 | 100 | 99.00% |
| 1 | 98 | 99 | 98.99% |
| 2 | 97 | 98 | 98.98% |
| 10 | 89 | 90 | 98.89% |
| 25 | 74 | 75 | 98.67% |
| 49 | 50 | 51 | 98.04% |
| 50 | 49 | 50 | 98.00% |
| 51 | 48 | 49 | 97.96% |
The share is 98.04 percent with 49 gone and 98.00 percent with 50, then 97.96 percent with 51. The target is reached with the 50th person to leave.
The share is . The one right-hander is of the room, and that fraction grows as the room shrinks. It is 1 percent at the start, 2 percent at 50 people, 10 percent at 10 people, and it reaches 100 percent when only the right-hander is left. Each leaver adds to the right-handed share, a little more than the one before.
A different target. Take a room of people with right-handers, and ask for a right-handed share of . The room must end at people, so of the left-handers leave. For the film, .
How far can it go? The right-hander stays, so the room never empties. With 98 left-handers gone the room is one left-hander and one right-hander, 50 percent each. With all 99 gone the room is the one right-hander, and the left-handed share is 0. No number of leavers can push the share up: every leaver lowers it.
scripts/left-handed.mjs asserts the claims below before it writes maths.json, and its --check fails if the file is stale. It checks that:
All the arithmetic is in whole numbers, so there is no rounding in the checks.
The right-hander must be 10 percent of the room, so the room has 10 people and 90 of the original 100 have left. The nine left-handers who stay are 90 percent of ten.
Two right-handers stay, and at 96 percent left-handed they are 4 percent of the room, so the room has 50 people and 50 have left. In the room, 48 of the 50 are left-handed, which is 96 percent.
No. The right-hander is a larger part of a smaller room each time, so the left-handed share falls at every step, which is what the script checks from 0 leavers to 99.