Hot answers tagged


Here's a little Python program to test it yourself: And here's C++ code written by user @im_so_meta_even_this_acronym


You should To prove, let us first do the following


As with pretty much all the nim variants, this one can be solved by starting from the end and working backwards. With the original total number of stones being an odd number (15, as given in the title) the players will have the same parity whenever there's an odd number of pebbles left, so it's easy to work out the best strategies: they are the ones that put ...


The strategy is to do a move that In particular, for $15$ pebbles, your first move would be The reason this works is more interesting than with other single-pile nim variants.


Code to find the pattern: (The third number printed out on each line is the winning move if the player to move is in a winning position)


User hexomino already figured out the puzzle, and managed to actually find the very complicated path that was exactly how I came up with the game. To recap: The game itself is a lot easier to play than that, though, so I'm posting this self-answer to show how. First, it's very useful to note that in a given board position, every move is uniquely defined by ...


We have a winning strategy for: The first move is:


Any permutation of the rows and columns is treated as an "equivalent" board. Part 1: Matt chooses to go second. (Case A) If Ben takes 2 or 3 tokens, then Matt can turn it into a 2x2 board and win. (Case B) If Ben takes 1 token: $$\begin{array}{ccc} O & O & O \\ O & O & O \\ \_ & O & O \end{array}$$ then Matt can take 2 tokens to ...


As described above, the first player loses if $N$, the initial number of marbles, is a Fibonacci number, and wins for any other integer $N > 1$. Proof follows. First, a definition. The remainder of any integer $k$ is the smallest entry in a list of distinct non-consecutive Fibonacci numbers that add up to $k$. (For Fibonacci numbers, the remainder of $...

Only top voted, non community-wiki answers of a minimum length are eligible