There is a game called Enemy/Defender that you might play with kids. The setup is as follows:
Everyone stands in a circle. You say, "Look around the circle and select someone (at random) to be your enemy. Now pick a different person to be your defender. When I say 'Go!', you have to position yourself so that your defender is between you and your enemy... Go!"
The players will run around frantically until you stop the game. On rare occasions though, there is a stable configuration that occurs where everyone is standing in a line and doesn't need to move at all.
The question is: For a game with n players with enemies and defenders chosen uniformly at random, what is the probability that a stable configuration exists?
I'm finding it surprisingly difficult to solve this or even simulate it efficiently. Here's some basic insights:
- Even if there is a solution where everyone is not standing in a line, we can collapse it to a line without breaking the order, so we only need to consider permutations of the players as solutions.
- The game needs at least 3 players, but no solution exists for 3 players. This is easy to see because the middle player in any proposed solution must be adjacent to their enemy. For 4 or more players, there is a nonzero chance a solution exists.
- For any solution, the players at either end of the line cannot be anyone's defenders
- If everyone chooses the same defender, then a stable solution exists iff you can partition the remaining players into two sets such that everyone's enemy is in the opposite set (and the common defender's enemy and defender are in the same set).
Some results from brute force simulation:
- 4 players : 8.3366% of 10000000 games
- 5 players : 12.2495% of 1000000 games
- 6 players : 16.6140% of 100000 games
- 7 players : 21.5500% of 10000 games
- 8 players : 28.1000% of 1000 games
- 9 players : 39.0000% of 100 games
I would be very surprised if a succinct closed form solution exists, but even some insight on how to simulate it faster would be appreciated.