Combinatorics – Olympiad Combinatorics Coin on Boards Question

combinationscombinatoricscontest-math

A friend asked me this question, and I'm struggling to see how to solve it.


There is a $3 \times 100$ board, divided into unit squares. In each square, there is a coin which can be distinguished with heads up $H$ or tails up $T$. All coins have heads up. You are given the two following operations:

Operation 1: Select a row from $1$ to $3$ and change all the coins in that row to heads up. This means that, if the coin is heads up, it remains heads up, and if the coin is tails up, it changes to heads up.

Operation 2: Select a column from $1$ to $100$ and change all the coins in that column to tails up. This means that, if the coin is heads up, it changes to tails up, and if the coin is tails up, it remains tails up.

Using the above two operations, how many distinct board variations can you get?


Supposedly, the answer is $6 \cdot 4^{100} – 6\cdot 3^{100} +2^{100}$, but I have no clue on where to even begin! I can see that, given the initial state, any single coin can be flipped to tails to make a new state, but once more than two coins are flipped, things get a little tricky.

Any help would be greatly appreciated!

Best Answer

Let $1.i$ and $2.j$ denote that we toggled row i and column j respectively. There are no decimals in this writeup.

For simplicity (you'd see why in a moment), we add $2.1, 2.2, 2.3, \ldots, 2.99, 2.100, 1.1, 1.2, 1.3$ to the start of any sequence (meaning we toggle every single column first and then every row). Since the board ends up as all heads up after these operations, we've not changed the final outcome. However, it ensures that we've used each column and row operation at least once, which is very helpful to keep track of the counting.

Claim: Suppose that some series of operations was done. Then, the final display depends only on:

  • For each row, select the final time that it was done, ignore all previous instances. For each column, select the final time that it was done. Thus, we have $1.1, 1.2, 1.3, 2.1, 2.2, \ldots, 2.100$ each occurring exactly once.
  • Show that where a column appears relative to the rows is important. Show that where a column is relative to the other columns doesn't matter.
  • Show that where a row is relative to other rows will change the outcome, except in the case where 2 rows are consecutive (no columns between them), in which case the order doesn't matter.

You can prove this claim rigorously by showing that for each cell $(i,j)$, the state only depends on whether operation 1.i or 2.j was the last to be done.

We apply PIE based on the event where the rows are consecutive.
The total number of ways is $6$ (corresponding to which order we take $1.1, 1.2, 1.3$) $\times 4^{100}$ (each column can appear in 4 positions).
However, we've double-counted the cases when 2 rows appear consecutively, which correspond to $ 6 \times 3^{100}$ (each column can appear in 3 positions) that we need to subtract.
However, we now need to add back the case when all 3 rows appear consecutively, which correspond to $2^{100}$ cases (each column can appear in 2 positions).

Related Question