Flip the Board

On an 8 × 8 8\times 8 checkerboard, a double-flip move consists of the following: choose a square, then flip the colors of all the squares in its row, and then flip the colors of all the squares in its column. The chosen square's color stays the same because it's flipped twice.

What is the minimum number of double-flip moves necessary to make the whole board one color?

4 8 12 16 32

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Zain Majumder
Sep 30, 2018

Let's say we wanted to make all the black squares white. All 8 8 of the black squares marked with a red X X in the picture above need to be flipped at least once, but none of them share the same row or column. Since a double-flip will flip over an entire row AND an entire column, it is possible for one double-flip to flip 2 2 of the red X X squares at most. Since there are 8 8 red X X squares, at least 4 \boxed{4} double-flips are needed.

One example of a solution using 4 4 double-flips is if all of the blue O O squares are double-flipped. This works because all the white squares have an even number of O O s in their row and column, so they are flipped an even number of times and stay on white. All the black squares have an odd number in their row and column, so they are flipped an odd number of times and go to white.

good job, took me 3 hours and i still got it wrong

Aidan Hickson - 2 years, 8 months ago

Log in to reply

At first I was also lost. Then I did the following Excel file which I am sharing:

(https://1drv.ms/x/s!AiBgShkBQX6 kHlNRbaRsGIhAJn ) Snapshot of the Excel file Snapshot of the Excel file

and it became obvious that only 4 moves were needed. I really encourage you to play with it. The left most column and top row are filled with alternating -1 and 1. In the chessboard each square on a certain column & row is the product of the top row value with the left most column value. If the product value is -1 the cells becomes "black" and if it is 1 it becomes "white". This color coding together with the product formula ensures that if you change a 1 to -1 or vice versa in the top row or left most column you are flipping the sign in all cells of that column/row respectively and therefore you are flipping their colors.

It becomes obvious that if you want to make the chessboard all white you need to change all -1's in the top most row and on the left most column into 1. There are a total of eight -1's (as well, as 1's), but with a double flip move you can change two at once. That is, you pick any -1 in the top row and change it to 1 and then pick up any -1 on the left most column and do the same, performing like so a double flip move. After 4 of these moves there will be only 1's in the top row and left most column, so all products in the chess board will be 1, and therefore the board will be all white.

In general a NxN chessboard will need floor(N/2) double flip moves to turn it all in one color.

P S - 2 years, 7 months ago

I think now it will work. I did a quick webpage:

https://www.publishthis.email/chess-board-problem-r1Pa8AN2m

or maybe this link will work now:

https://onedrive.live.com/View.aspx?resid=BF7E4101194A6020!2169&app=Excel&authkey=!AOhV94RcFNe-ERk

P S - 2 years, 7 months ago

Snapshot of the Excel file Snapshot of the Excel file

I did the above Excel file. In that file each chessboard square is the product of the respective value in Column A and Row #1. If the product value is -1 the cell turns black (via conditional formatting) and if it is 1 it turns white.

I believe it becomes now obvious why you need 4 double flip moves. Basically we need to make Row #1 and Column A values all the same (either 1 or -1). Therefore we need to flip 4 digits in Row #1 and 4 digits in Column A. Since with a double flip move you can change a row and column at once, only 4 of those moves are needed. Eg.: change all 1's to -1's in Row #1 and all -1's to 1's in Column A and you end up with an all black chessboard.

In general a NxN chessboard will need "floor(N/2)" double flip moves to turn it all in one color.

P S - 2 years, 7 months ago

I guessed the answer 😎

Fred Ernst - 2 years, 7 months ago
Ben Hambrecht
Sep 14, 2018

Let's number the rows and columns from 1 1 to 8 8 , starting in the top left. Then the checkerboard can be thought of having been created from a blank white board by flipping all the even-numbered rows and columns (which are black except where they intersect). Undoing these flips, e. g. by applying flips at ( 2 , 2 ) (2,2) , ( 4 , 4 ) (4,4) , ( 6 , 6 ) (6,6) and ( 8 , 8 ) (8,8) , recovers the all-white board.

That's a nice problem and solution. Thank you for posting them.

But I'm sure I'm not the only one who would prefer to see "White bottom right" in your diagram!

Peter Macgregor - 2 years, 8 months ago

Awesome problem! I really liked it! :)

A Former Brilliant Member - 2 years, 8 months ago

An animation showing it will be very satisfying to watch.

Aniruddha Bagchi - 2 years, 8 months ago

I think this solution is the most intuitive I’ve read.

Hubert Co - 2 years, 8 months ago

Fun problem, I enjoyed it. I meant to hit 4 but clicked on 8 by accident.

Keegan Sevener - 2 years, 8 months ago
Laurel Rogers
Oct 1, 2018

Consider instead an n by n checkerboard covered with tiles which are black on one side and white on the other. It is easy to see that for n = 1, we need 0 double-flips; for n = 2, we need 1 double-flip; for n = 3 or n = 4, we need 2 double-flips....

More generally, starting with the tile in the upper left corner, a single double-flip produces a 2 by 2 square of black tiles. Furthermore, the top 2 rows have identical patterns, with a 2 by 1 white column adjacent to the black square; similarly for the two columns on the far left. And the remaining (n-2) by (n-2) board has the original pattern; call it the "new board". We perform a double-flip to the tile in the upper left corner of the new board to continue.

Using mathematical induction, we can see that if n = 2k, then we shall need k double-flips to get an entirely black board. When n = 2k - 1, we still need k double-flips. In particular, for an 8 by 8 board, we need 4 flips.

Hm, you have to be careful with the "use mathematical induction".

IE, what you can show is that "we can do it with k double flips". However, it is not immediately obvious to me how you prove "we need at least k double flips" via induction (as opposed to using something completely different).

Calvin Lin Staff - 2 years, 8 months ago

Log in to reply

On an nxn checkerboard, where you want to change the whole board to the color that is not on the main diagonal, you have to change the n cells on the diagonal. (Analogously to Zain Majumder's solution) If you match up the cells on the diagonal from the top, B 1,1 pairs with B 2,2, B 3,3 pairs with B 4,4 and so on, then you have floor(n/2) pairs which do not share any row or column with any other pair. Moreover, if n is odd then the last diagonal cell B_n,n does not share a row or column with anyone else. Thus you need at least ceiling(n/2) double flip moves.

Of course this is not an induction argument. I tried to do write down an induction argument (or rather a reduction argument) but got stuck...

Varsha Dani - 2 years, 8 months ago

Log in to reply

Right, my point is that "this is not an induction argument".

This doesn't lend itself nicely to an induction argument mainly because the n + 1 n+1 (or n + 2 n+2 ) board is much "richer" than the n n board. Even though we know what must happen on the n n board, that doesn't give us much control over what happens on the n + 1 n+1 board.

Calvin Lin Staff - 2 years, 8 months ago

Isn't it possible with a single double flip for n=3?

Fabricio Kolberg - 2 years, 8 months ago

Log in to reply

Depends on which color you want to change it to. You can change it to the color at the center with a single flip, but if you want to change it to the other color, you need two flips.

Varsha Dani - 2 years, 8 months ago
Ervyn Manuyag
Oct 3, 2018

Bcuz 8/2=4

The interesting point is that there are more than one solution... 96, to be precise.

We have the following 4Χ4 grid:

B2 B4 B6 B8

D2 D4 D6 D8

F2 F4 F6 F8

H2 H4 H6 H8

We choose 4 squares,in a way that they are all in different rows and columns of the grid.

For example:

B4, D8, F2, H6

Every different combination is a solution to our problem. There are 24 of them.

Same thing for this grid:

A1 A3 A5 A7

C1 C3 C5 C7

E1 E3 E5 E7

G1 G3 G5 G7

So, we have a total of 48 solutions for the one color. Same way for the other color, so the number of solutions becomes 96.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...