Two people start with a slab of chocolates with M rows and N columns and play the following game (with M,N ≤ 108). The players take turns breaking the piece of chocolate. Each person can cut the rectangle into two pieces, using either a single vertical or single horizontal line. After each cut, the piece with smaller area is discarded and the game continues with the bigger piece. Eventually, the slab will reduce to a 1×1 rectangle. The player who has to play with a 1×1 rectangle loses the game.
Develop a winning strategy.
Some positions are winning, some are losing.
Losing positions:
m ------------ | | n | | | | ------------
Generalizing the 1-D case, n×(2n+1) loses, n×(4n+3) is losing etc. In general, n×m is losing if m = 2k(n+1) - 1.
What if the rectangle is n×(2n+1) and the opponent reduces n to n'? Then, you can always reduce 2n+1 to 2n'+1 and leave a similar losing situation of n'×(2n'+1).
A losing position is a "trap" — once a player enters a losing position, no matter how he moves, the opponent wins.
©IARCS 2012–2016
Pěstujeme web | visit: Skluzavky