2

In Determinant Tic-Tac-Toe, Player 1 enters a 1 in an empty 3 × 3 matrix. Player 0 counters with a 0 in a vacant position, and play continues in turn until the 3 × 3 matrix is completed with five 1’s and four 0’s. Player 0 wins if the determinant is 0 and player 1 wins otherwise.

If a method for player 0 to always win exists, will it work for an (n × n) grid, where n > 3? I would like a detailed proof of whether this method (shown in the below link) would work, as described in the bounty on this question.

Note: A solution for a 3 x 3 can be found at Q4 solutions at http://math.ucr.edu/~muralee/p4sols.pdf but I'm not quite sure how the proof provided extends to an n x n grid.

Perhaps the above could be used as a starting point? Edit: The answer to the first part of the question can be found at Two players put fill $1$ and $0$ in a $3\times 3$ matrix and compute its determinant when it is full. Can Player $0$ win if $1$ starts at the center?

Edit: The determinant of a 3 x 3 matrix is calculated by

\begin{bmatrix}a&b & c\\d&e&f\\g&h&i\end{bmatrix}

The determinant is $$ a (ei-hf) - b (di -gf) + c (dh - ge)$$

global05
  • 824
  • 1
    For $n\ge4$ the "permanent game" is a win for player ONE (who wants the $n\times n$ matrix to have a nonzero permanent) even if player ZERO goes first. I'm not sure about the determinant game but my guess is that that's also a win for ONE. – bof May 24 '20 at 07:22
  • 1
    @global05: For the case where $n\ge 4$ and $n$ is even, Aravind clinched it very nicely, and Gill's answer for that case is, at heart, essentially the same. For the case where $n\ge 5$ and $n$ is odd, I agree that player $0$ still has a winning strategy, but for that case, of the answers posted so far, I don't think player $0$'s winning strategy has been made clear enough. I plan to post an answer which may help clarify, but since my answer will be just a variant of Aravind's answer, I am not competing for the bounty. – quasi May 29 '20 at 10:15

3 Answers3

3

Claim:$\;$If $n\ge 4$, player $0$ has a winning strategy.

The idea is simple, and in essence just a variation of Aravind's beautiful solution for the even case.

Of the first $4$ rows, call rows $1$ and $2$ a complementary pair, and similarly, call rows $3$ and $4$ a complementary pair.

In a complementary pair of rows, call two cells in the same column a complementary pair of cells.

Let $u$ be the $n$-vector with all entries equal to $1$.

As Aravind explained, if the completed matrix is such that each of the two complementary pairs of rows has sum equal to $u$ (i.e., $R_1+R_2=u=R_3+R_4$), then those $4$ rows are linearly dependent, hence the determinant is zero.

A two-phase winning strategy for player $0$ is as follows . . .

Phase $1$ strategy:

Whenever player $1$ places $1$ in a blank cell in one of the first $4$ rows for which the complementary cell is blank, player $0$ responds by placing $0$ in the complementary cell.

If player $1$ plays outside the first $4$ rows, player $0$ does the same, unless all cells outside the first $4$ rows are already filled, in which case, the strategy for player $0$ switches to the phase $2$ strategy.

Note that for even $n$, the number of cells outside the first $4$ rows is even, hence, assuming player $0$ has followed the phase $1$ strategy, there will never be a scenario where player $1$ fills the last blank cell outside the first $4$ rows. It follows that for even $n$, the game will run to completion with no need for player $0$ to switch to the phase $2$ strategy, and at completion, all pairs of complementary cells sum to $1$, so player $0$ wins.

So now assume:

  • $n$ is odd.$\\[2pt]$
  • It's player $0$'s turn.$\\[2pt]$
  • Player $1$ has just filled the last remaining blank cell outside the first $4$ rows.

Player $0$'s strategy now switches to phase $2$ . . .

Phase $2$ strategy:

Given that player $0$ faithfully followed the phase $1$ strategy, it follows that for every pair of complementary cells, either both cells are filled (and sum to 1) or both cells are blank.

If there are no blank cells, then the game is over and player $0$ has won.

Otherwise, player $0$ chooses some pair of complementary blank cells and places $0$ in one of those cells.

From that point on, player $0$'s basic strategy is to place $0$ is some cell to ensure that whenever it's player $1$'s turn to play, there is exactly one pair of complementary cells for which one of the two cells contains $0$ and the other one is blank.

To accomplish the phase $2$ basic strategy, player $0$'s choice of move depends on the nature of player $1$'s previous move. There are two cases . .

If player $1$ places $1$ in a cell for which the complementary cell is blank, player $0$ responds by placing $0$ in that complementary cell.

If player $1$ instead places $1$ in a cell for which the complementary cell contains $0$, and if the game is not over, there must be at least one pair of complementary blank cells, so player $0$ responds by placing $0$ in one of the cells of such a complementary pair.

In either case, after player $0$'s response, there is exactly one pair of complementary cells for which one of the two cells contains $0$ and the other one is blank.

Assuming player $0$ faithfully follows the phase $2$ basic strategy, player $1$'s last move will be in a blank cell (the only remaining blank cell) for which the complementary cell contains $0$, and at that point, all pairs of complementary cells sum to $1$, hence player $0$ has won.

This completes the proof.

quasi
  • 61,115
  • can you also use complementary columns as linearly dependent in this proof? Also, below in Aravind's solution he said that player 0 could could ensure that (b) row 3 + row 4 equals the all-1 vector. Does he mean the vector with all -1 (negative 1) or was that simply a hyphen, referring to the vector with all 1s? I see how this second possibility makes sense fairly easily, but just checking I am interpreting his syntax correctly? – global05 Jun 20 '20 at 01:37
  • 1
    @global05: Yes, complementary columns would work in the same way. – quasi Jun 20 '20 at 04:22
  • 1
    @global05: As regards Aravind's solution, yes, it's the vector of all ones. – quasi Jun 20 '20 at 04:25
2

Let $n \geq 5$, and let the first entry picked by player one be in the last row (without loss of generality).

Player $0$ can ensure that: (a) row 1 + row 2 equals the all $1$s vector, as well as (b) row 3 + row 4 equals the all-$1$ vector, thus ensuring a linear relation among the rows, and making the determinant zero.

To ensure that row 1 + row 2 (and row 3 + row 4) is the all $1$s vector, player $0$ avoids these rows until player 1 makes an entry there; if player $1$ enters a one in $(1,i)$, then player $0$ enters a zero in $(2,i)$ (and vice-versa and likewise for rows 3, 4). This means that player $0$ must be able to play in the other rows as long as player 1 plays in the other rows.

This is possible if $n$ is even, as the number of remaining entries, that is $n^2-4n$, is even. Even if $n$ is odd, this strategy works. The key point is that even if player $0$ has to move first on the first two rows, it can be ensured that their sum is all 1s; player 0 makes an arbitrary entry, say in $(1,1)$ and subsequently if player 1 makes an entry anywhere except $(2,1)$, follows the earlier strategy. Whenever player 1 makes an entry in $(2,1)$, it reduces to the game on two equal-sized rows (of shorter length) with player 0 to move, so we're done by induction.

Aravind
  • 6,220
  • could you please explain why Player 0 would want to ensure that: (a) row 1 + row 2 equals the all 1s vector, as well as (b) row 3 + row 4 equals the all-1 vector, thus ensuring a linear relation among the rows, and making the determinant zero. Can you prove why this is the case (preferably with a diagram)? – global05 May 27 '20 at 03:26
  • The goal is to make the determinant zero, for which it is sufficient (and necessary) to have some linear relation between the rows. In this case, player $0$ is ensuring the relation $R1+R2=R3+R4$. – Aravind May 27 '20 at 03:29
  • Could you explain why that is? Why exactly does having $R1+R2 = R3+R4$ make the determinant 0? – global05 May 27 '20 at 03:30
  • 1
    I can prove easily enough that having one row/one column/a 2 x 2 submatrix of all 0s forces the determinant to be 0. Could you prove your method (i.e. substitute)? – global05 May 27 '20 at 03:32
  • This is basic linear algebra. Adding a multiple of one row to another doesn't change the determinant. See property 14 at https://en.wikipedia.org/wiki/Determinant. The operations $R1 \to R1+R2$, followed by $R3 \to R3+R4$, followed by $R1 \to R1-R3$ leaves the determinant unchanged.After this last operation, the first row has all zeroes. – Aravind May 27 '20 at 03:36
  • So you are saying that if Player 1 plays in (1,) player 0 should play in (2,) and if player 1 then plays in (2,) then Player 0 should play (1,)? – global05 May 27 '20 at 04:00
  • Yes. that's it. – Aravind May 27 '20 at 04:35
  • @global05: Why do you think a $2{\times}2$ submatrix of all zeros forces the determinant to be zero? – quasi May 27 '20 at 19:49
  • @Aravind: When $n\ge 4$ and $n$ is even, I see that your proposed strategy for player $0$ works nicely (+1), but for odd $n\ge 5$, I don't see how player $0$ can force $R1+R2=R3+R4$. For example, for $n=5$, suppose player $1$ stays in row $5$ for the first $3$ moves. How does player $0$ deal with that?– – quasi May 27 '20 at 20:16
  • @Quasi here is my proof, using the matrix pronumerals given in the question diagram. 3. A submatrix of 2x2 made up of all 0s Proof. Let the submatrix of 2x2 be e, f, h and i as per the diagram in the question. (without loss of generality). The determinant is a(ei−hf)−b(di−gf)+c(dh−ge) which, by subsititution is equal to a(0−0)−b(0−0)+c(0−0) = 0 – global05 May 27 '20 at 22:19
  • @quasi Also if you have a clearer or better solution the bounty is still currently open as I search for the best solution. – global05 May 27 '20 at 22:20
  • @global05: The determinant formula that you edited into your question only applies to $3{\times}3$ matrices, but the question at hand concerns $n{\times}n$ matrices, where $n > 3$. – quasi May 27 '20 at 22:34
  • @global05: Regarding the bounty, Aravind's cool strategy elegantly handles the case where $n\ge 4$ and $n$ is even. I have doubts about his claim that it also handles the case where $n\ge 5$ and $n$ is odd, so I'll think about that case. – quasi May 27 '20 at 22:41
  • @quasi, I have explained this is in the last paragraph. The claim is that for the mini-game on two rows of equal size, player $0$ can force the sum to be all-ones irrespective of who plays first, so when $n$ is odd, this means that $0$ goes first. – Aravind May 28 '20 at 03:22
  • @Aravind: So for $n=5$, if player $1$ starts by taking $3$ cells from the last row, how does player $0$ respond? What is the minigame for this scenario? – quasi May 28 '20 at 04:02
  • Assuming that the last row is exhausted and it is player $0$ to move, player $0$ places a zero in $(1,1)$. – Aravind May 28 '20 at 12:05
  • @Quasi that is true, though I still think it holds for an m x m submatrix where m + m > n... What do you think of the 2nd solution which has appeared? Do you agree with the claim that in a 5 x 5 it doesn’t matter what goes in the first column? – global05 May 29 '20 at 01:06
  • @Aravind, just considering your solution again. You said player could could ensure that (b) row 3 + row 4 equals the all-1 vector. Do you mean the vector with all -1 (negative 1) or was that simply a hyphen, referring to the vector with all 1s? I see how this second possibility makes sense fairly easily, but just checking I am interpreting your syntax correctly? – global05 Jun 20 '20 at 01:24
  • And, @Aravind, is it possible to use this strategy with columns? – global05 Jun 20 '20 at 01:35
  • Yes, it was a hyphen, and it works the same for both rows as well as columns. – Aravind Jun 20 '20 at 17:08
1

Here’s an easier way to represent a winning strategy for Player 0 on the 4x4 matrix:

4 x 4 Matrix Representation

Whenever player 1 plays in a letter, claim the other of the same letter. The determinant of the resulting matrix must be zero; an easy way to demonstrate that is by direct computation.

Or, we can note that the sum of the first two columns is (1,1,1,1) and the second two columns is (1,1,1,1) so the four columns cannot be linearly independent.

This reasoning carries over to any other size of matrix; in fact, we only need to care about how we play in four of the columns! On a 5x5 we can extend the strategy, this is one of several ways:

enter image description here

Columns 2 and 3 add to (1,1,1,1,1) and columns 4 and 5 add to (1,1,1,1,1) so the determinant must be zero. So it doesn’t matter what goes in the first column.

global05
  • 824
  • 1
    @Global05 see this solution for a more visual and simple take. – global05 May 29 '20 at 01:03
  • how do you know that it doesn't matter what goes in the first column in a 5 x 5? What happens if Player 1 plays first in the first column? If you play in the same column won't Player 1 get the last square and force you into another column? – global05 May 29 '20 at 01:08