There are set of rods of length $1,2,3,4 \dots N$. Two players take turns to chose 3 rods and compose triangle with non-zero area. After that this particular 3 rods are removed. If it is not possible to compose triangle then player looses.
Who has winning strategy?
[Edit] Some easy observations:
- We get a triangle of non-zero area, if and only if the lengths of the chosen rods, say $a<b<c$, satisfy the strict triangle inequality $a+b>c$. It may be easier to use this in the form $a>c-b$ that can be interpreted as stating that the shortest chosen rod must be longer than the length gap between the two longer ones.
- The rod of length one can never be used because $a=1$ makes it impossible to satisfy the inequalities in the previous bullet. We can simply pretend that the rod of length one is not part of the game.
- When $N=7$ removing the triple $\{3,5,7\}$ leaves the other player with rods of lengths $\{2,4,6\}$ and no legal moves. This position is a win for the first player.
- When $N=8$ removing the triple $\{4,6,7\}$ similarly leaves the second player with an impossible task. The collection of lengths $\{2,3,5,8\}$ has (just barely) too long gaps for the second player to use either $2$ or $3$ in the role of $a$. This is also a win for the first player.
- On the other hand when $N=9$ the game plays out differently. After removing the triple of rods used by the first player, five rods of lengths $2\le x_1<x_2<x_3<x_4<x_5\le9$ remain. Here $x_2\ge3$. Because $x_3\ge4$ and $x_5\le9$ we have $x_3+2x_2>x_5$. This means that either $x_4-x_3$ or $x_5-x_4$ must be less than $x_2$. Therefore the second player can pick either the rods of lengths $\{x_2,x_3,x_4\}$ or the rods of lengths $\{x_2,x_4,x_5\}$. After having removed those rods, only two remain, so the second player wins in this case.
But what happens in the general case? [/Edit, JL]
This is a nim-like impartial game, so each possible position has a nim-value associated with it. I wrote a little program to calculate the nim-values, and the values of the starting positions are:
The game is therefore a win for the second player when $N$ is $9, 14, 15, 20, 21, 26, 27$, and a win for the first player for the other values with $4 \le N \le 28$.
Maybe the pattern of zeroes continues and it is a second player win for every $N\ge9$ with $N \equiv 2,3 \mod 6$.
For completeness, here is the c# code I used: