Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

A grid of size n is made up of n x n tiles.

Each tile can either be on or off, true or false, 1 or 0, take your pick just realize there are two and only two options.

(For simplicity in creating this puzzle I will be useing 1 and 0)

When you hit a tile the tile you hit, and EVERY adjacent (not including diagnols) tile is changed to the other value, you do not wrap around if you should be flipping a tile not on the grid. For example if you hit a corner EXACTLY 3 tiles flip.

Solve this size 4 grid (make every tile 1) ... or prove that it can't be solved


[1][1][1][1]

[1][1][1][1]

[1][1][1][1]

[1][1][0][1]

I'm writing java code to solve any grid of size n, just to familiarize myself with the language some. I've gotten all grids of size 3, this is just the last piece I need for size 4, and I can't figure it out. I will probably also post more problems as I come across them.

Hitting these tiles flips ONLY the four corners

[0][0][0][0]

[1][0][0][1]

[1][1][1][1]

[1][1][1][1]


Hitting these tiles flips the entire board

[0][1][0][0]

[0][0][0][1]

[1][0][0][0]

[0][0][1][0]

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

So this is impossible.

To communicate this proof, let's call a "board" a current layout of 1's on the grid.

Your switching operation is a way to have one board B operate on another board C: say B( C) is the result of starting with the board C and then hitting the tiles of B.

Let's suppose to the contrary that the answer to your question is positive. That is, for the board S you have given with 15 `1's, there is another board B so that B(S) consists of all 1's. This means that B operates on other boards by flipping only the position (3,1).

By the symmetry of the grid, for each of the positions (i,j)=

(3,1) (2,1) (1,2) (1,3) (2,4) (3,4) (4,3) (4,2)

there is some board B(i,j) that operates by flipping only that one position. (since we can flip position (3,1) independently of others, we can just rotate or reflect our hitting operations to do any of these other symmetric positions)

Consider the corner (1,1). If we hit that position, then we flip (1,2) (1,1) and (2,1). Now apply B(1,2) and B(2,1) to flip (1,2) and (2,1) back. Thus, we have obtained a board B(1,1) whose operation is to flip only (1,1).

In similar fashion, for any position (i,j) we can prove the existence of a board B(i,j) that flips only that position. (to obtain a board that flips only one middle position, say (i,j)=(2,2), just hit (2,1) which flips (1,1) (2,1) (3,1) and (2,2) and the apply B(1,1) B(2,1) B(3,1) to flip back the unwanted positions)

This means that starting from any board C, and a given destination board D, there is some board B so that B( C)=D.

Obviously, there are exactly 2^16 possible boards. Since it is possible to get from C to any other board D, it follows that every board must have a distinct flipping operation associated with it.

But, this is demonstrably false, since the following two boards give the same flipping operation:

0000

1000

1000

0000

and

0110

0001

0001

0110

QED

thanks for the fun puzzle!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...