I originally misread the problem as "the person who removes the last sweet is the WINNER", and spent a good 15 minutes double checking why my answer was different than yours (I didn't watch the video yet, only peeked at your solution). Now everything looks good. By the way, the result I got for that different problem was the sequence 2,5,11,23... which is described by the recursion a_(n+1) = 2a_n + 1 (the explicit solution is a_n = 3*2^n - 1). It's interesting how that version of the game would be even more unfair to the 2.nd player, as the numbers are even sparser.
Really really cool problem! One question about the rules though: the problem states that the players must ensure to 'take no more than half of *what remains*'. Doesn't this mean that they can take at most 1/3 of the current values of sweets? For example, if there are 6 sweets, the player can take at most 2 sweets, leaving 4 sweets, and thus taking half of what remains. However, the player *cannot* take 3 sweets, since they would leave 3 sweets, and so they would have taken more than half of *what remains* (in fact, taking 3 sweets is taking as much as what remains). (I guess the solution would remain unchanged but with powers of 3 rather than powers of 2)
No it doesn’t, by “remaining” the rules mean “half of what’s available to take in that turn”. For example, if there’s 6 sweets, that means there are 6 sweets remaining, and the player can thus take 3, as that is half of the remaining sweets.
I originally misread the problem as "the person who removes the last sweet is the WINNER", and spent a good 15 minutes double checking why my answer was different than yours (I didn't watch the video yet, only peeked at your solution). Now everything looks good. By the way, the result I got for that different problem was the sequence 2,5,11,23... which is described by the recursion a_(n+1) = 2a_n + 1 (the explicit solution is a_n = 3*2^n - 1).
It's interesting how that version of the game would be even more unfair to the 2.nd player, as the numbers are even sparser.
Really really cool problem! One question about the rules though: the problem states that the players must ensure to 'take no more than half of *what remains*'. Doesn't this mean that they can take at most 1/3 of the current values of sweets?
For example, if there are 6 sweets, the player can take at most 2 sweets, leaving 4 sweets, and thus taking half of what remains. However, the player *cannot* take 3 sweets, since they would leave 3 sweets, and so they would have taken more than half of *what remains* (in fact, taking 3 sweets is taking as much as what remains).
(I guess the solution would remain unchanged but with powers of 3 rather than powers of 2)
No it doesn’t, by “remaining” the rules mean “half of what’s available to take in that turn”. For example, if there’s 6 sweets, that means there are 6 sweets remaining, and the player can thus take 3, as that is half of the remaining sweets.
Rules are confusing: When one sweet remains, it can't be taken because of the "at most half" rule.
@@paulw987 true to be fair, I hadn't noticed that. It should be reworded to, if there is one sweet left before your turn, you lose.