Forcing a draw in TicTacToe

289 Views Asked by At

Let's consider the game of Tic-Tac-Toe on a $3\times3$ board. The first player places a cross in any free square. The second player places a circle in another free square. This continues. The first to have $3$ shapes in a row (also in the diagonals) has won.

Show that the second player can always be sure not to lose.

I would like to find something else than a game tree.

1

There are 1 best solutions below

5
On BEST ANSWER

The question is flawed. It's possible that the game could end in a draw.

For instance,

$$\begin{align} X O O \\ X X O \\ O X X \end{align}$$

is a complete $3\times 3$ board that ends in a draw. (If diagonals are included and the first player is X, the first player could win here too.)

The second player can force a draw.

Use a case by case analysis for the first player starting in the top right, the top middle, and the middle squares, then use the symmetry of a square to eliminate similar boards, like so:

$$\begin{align} X_1 O_1 \phi \\ X_2 \phi \phi \\ O_2 \phi \phi \end{align}$$

for the top right case,

$$\begin{align} \phi X_1 O_1 \\ \phi X_2 \phi \\ \phi O_2 \phi \end{align}$$

for the top middle case, and

$$\begin{align} \phi X_2 \phi \\ \phi X_1 O_2 \\ \phi O_1 \phi \end{align}$$

for the middle case.

(Here $\phi$ is an empty square and $\Delta_n$ is the $n$th move of the player with symbol $\Delta$, assuming $X$ comes first.)

In each case the second player will always seek to prevent the first player from getting three $X$s in a row, so, up to the symmetries of a square, the cases above suffice to show that the second player can force a draw.