Ali and the eight loaves
Two travellers stop for a meal. The first has 5 loaves, the second has 3 loaves. A stranger, Ali, joins them and the three men share all 8 loaves equally. As he leaves, Ali gives them 8 coins for his share.
The first traveller proposes taking 5 coins and giving the second 3, in proportion to the loaves they brought. The second traveller demands 4 each. They ask a judge, who rules that the first traveller should get 7 coins and the second only 1.
Explain why the judge's split is the fair one.
Show a hint
Ali paid for what he ate, not for what was brought. How much of each traveller's bread did Ali actually eat?
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.