pull down to refresh

A group of 4 Chinese business associates are having dinner and sharing a plate of dumplings.
The plate of dumplings goes round and round the table. Each time the plate reaches a businessman, he decides how many dumplings to take.
The Chinese have a very particular culture about dinner table etiquette. Their goal is to maximize the number of dumplings they get, without being rude.
  • It is rude to take no dumplings when the plate comes to you.
  • It is rude to take more than 3 dumplings when the plate comes to you.
  • It is rude to take the last dumpling.
Suppose there are dumplings on the plate. How many dumplings should the current businessman take?
1,000 sats to the first person with the best, fully explained answer :)
1,000 sats paid
SimpleStacker's bounties
Let's call the guys A, B, C and D, with A to take first.
If N = 1, A loses immediately (he has to be rude) If N = 2,3 or 4, he will take N-1 and B loses. If N = 5,6 or 7, A will take 3, B will take N-4 and C loses. If N = 8,9 or 10, A and B will each take 3, C will take N-7 and D loses.
If N = 11, A will lose whatever he does (after his turn, it's the same situation as for N = 8,9 or 10, with the players shifted by one). If N = 12,13 or 14, A takes 1,2 and 3, respectively, so that 11 dumplings are left and B will lose. (If he takes too many, e.g. N=12 and he takes 2, it will again be the situation above with A in the losing seat.) If N = 15,16 or 17, A will take 3 and B will act as above, so in the end C loses. If N = 18,19 or 20, A and B take 3, C takes 1,2 or 3 respectively and D loses.
If N = 21, it's the same situation as for N = 11 again, A loses whatever he does.
And so on. In summary, the current business man:
  • loses anyway if N = 1 mod 10
  • should take 1 if N = 2 mod 10
  • should take 2 if N = 3 mod 10
  • should take 3 otherwise.
reply
good job!
reply
The trick is to leave the next person with a bad situation while still playing by the rules.
If there’s 1 dumpling left after you, take 1 dumpling. If there’s 2 left, take 2 dumplings. If there’s 3 left, take 3 dumplings. If it’s a multiple of 4, take 3 dumplings (don’t leave 4 that’s too good for the next person).
Example, if there are 10 dumplings, take 2. Simple. The key is to avoid being the guy stuck with 1 dumpling at the end it is bad etiquette.
reply
This doesn't work. If there's 2 dumplings left you should only take 1, leaving the last dumpling to the next person.
reply
If N is greater than 4 then the Chinese businessman will always take 3, leaving one. If N is 3 then he should take 2, leaving one. And if there is only one left then he should take it, because either way he will be seen as rude, but his goal is still to maximize his portion. It seems too simple so perhaps I missed something.
reply
What about for N>4?
reply
Always 3, maximum allowed
reply
Not quite right. There are some values of N>4 for which you won't want to take 3.
reply
Can't get stuck taking 3 on 11 or other prime numbers thereafter.
Edit: I'm at work so I can't fully flesh this out completely, but it would seem that 11, 13 and 17 screw you by taking three
reply
Actually maybe just 11 and 13. I don't know why but those numbers seem to screw you either way.
reply
You're right about 11. But with 13 you can avoid ending up with the last dumpling.
reply
Let me approach this as a game theory problem:
For any move to be valid, a businessman must: Take 1, 2, or 3 dumplings (not 0 or >3) Not take the last dumpling Let's analyze what would happen with different moves, assuming optimal play: If first person takes 1: 8 dumplings remain Next person could take 3 → 5 remain Next person could take 3 → 2 remain Last person can only take 1 → 1 remains Back to first person, who can't take the last one If first person takes 2: 7 dumplings remain Next person could take 3 → 4 remain Next person could take 3 → 1 remains Last person can't take it (would be the last one) If first person takes 3: 6 dumplings remain Next person could take 3 → 3 remain Next person could take 2 → 1 remains Last person can't take it
Looking at these scenarios, taking 2 dumplings is optimal because:
Taking 1 leaves too many for others Taking 3 doesn't improve the outcome Taking 2 forces a situation where some future player will be stuck unable to take dumplings (which is rude)
Therefore, the current businessman should take 2 dumplings.
reply
Well you are right to approach it game theoretically, but the answer should depend on N actually...
reply
Ok thanks, for the hint.
Data for the first several N values: N | Optimal Move | Position Type 0 | can't move | Losing 1 | can't move | Losing 2 | 1 | Winning 3 | 2 | Winning 4 | 3 | Winning 5 | 1 | Winning 6 | 1 | Winning 7 | 2 | Winning 8 | 3 | Winning 9 | 1 | Winning 10 | 1 | Winning 11 | 2 | Winning 12 | 3 | Winning
Looking at winning positions:
For N = 2,3,4: take N-1 dumplings For N = 5,6,7: take (N-4) dumplings For N = 8,9,10: take (N-8) dumplings For N = 11,12,13: take (N-10) dumplings
Key observations:
The pattern repeats every 4 numbers For any N, we can find our position in the cycle using modulo 4 But we need to handle N = 0,1 as special cases
Therefore, if N ≥ 2:
Let k = N mod 4 If k = 1, take 1 If k = 2, take 2 If k = 3, take 3 If k = 0, take 3
Or more concisely, for N ≥ 2: optimal move = k if k ∈ {1,2,3} optimal move = 3 if k = 0 where k = N mod 4 For N < 2, no valid move exists.
This ensures you always force your opponents into a losing position eventually, while never breaking the etiquette rules.
reply
You're on the right track, but the solution is not quite accurate yet.
For example, if N=3, your solution says take 3. But that's rude because you take the last dumpling.
Another example, if N=5, your solution says take 1. But if N=5, you can take 3, then the next person will take 1, leaving the next person with the last dumpling. This maximizes your dumplings without being rude.
reply
Ah yes, how about this:
optimal_move = if N ≤ 2: invalid if N ≤ 4: N-1 if N mod 4 ∈ {1,3}: 2 if N mod 4 ∈ {0,2}: 3
reply
There are 11 dumplings on the plate. Each partner takes 2, without taking 3 and being rude, and they also don't leave the plate empty since there is only 1 left.
reply
They can take 3 without being rude. They just can't take more than 3. Also the person who faces the last dumpling is forced to be rude since he either has to take the last dumpling or not take any, so he might as well take
reply
I understand, I have a question, does the plate necessarily have to be left empty? Or can there be an equal amount for everyone + 1 extra left on the plate. It would not be completely empty and everyone could take an appropriate amount without being rude. For example, a plate with 13 dumplings, then it would be 3 for each.
reply
Basically, no one wants to be the guy faced with the last dumpling.
You want to take as many as you can without ending up with the last one.
If you do end up with the last one, you'll take it. Since you have to be rude no matter what, might as well get that last dumpling.
reply
0 sats \ 1 reply \ @bief57 9 Dec
The solution then is that each person orders a portion of dumplings individually, thus avoiding the stress of whether or not they can eat a certain amount.
reply
Yes, that's what westerners do, but Chinese people like to order family style!
reply