Paint the town red!

Logic Level 2

You paint the 5 × 5 5 \times 5 grid red, one square at a time. You can only paint a square red if it shares an edge with 1 or 3 blue squares (diagonals don't count).

If you continue until there is no more blue square left to be painted red according to the rule above, what's the minimum possible number of squares you can color?

Below right is an example of a sequence of how you might paint the first 4 squares.


Clarification: The square colored red with sequence number 3 now borders two blue squares, but it was bordering three blue squares at the time of coloring.

4 5 6 7 8 9

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.

1 solution

Geoff Pilling
Jun 8, 2017

Here is one way you could paint 8 squares (in the order given):

Will try to come up with a rigorous proof as to why this is the minimum you can do... Stay tuned!

In the meantime, in case you are bored, can you come up with the general solution for an m × n m \times n grid? :0)

I interpreted the question as "what is the most number of squares you can paint".

Hm, both versions are interesting. It is not obvious how / why it is maximal/minimal.

Calvin Lin Staff - 4 years ago

Log in to reply

That's funny... That was the problem I was originally going to pose. The maximum problem is much easier to prove you have the right answer.

Geoff Pilling - 4 years ago

Log in to reply

Should we combine the two by asking for the maximum value minus the minimum?

Geoff Pilling - 4 years ago

Log in to reply

@Geoff Pilling Nah, at the most, post it as a separate problem (with different colors so that it's obvious that they are different problems).

Calvin Lin Staff - 4 years ago

Why not the squares a22, a32, a24, a34, a51, a53, a55?

Ananya Aaniya - 3 years, 11 months ago

Log in to reply

a<mn> => m is row, n is column.

Ananya Aaniya - 3 years, 11 months ago

Between a22 and a32, whichever you painted first would border four squares.

Geoff Pilling - 3 years, 11 months ago

I can't post images but I got an answer of 6. To picture it, number the all squares from 1 to 25, from left to right, one line at a time. Start painting square number 1, then number 4, then number 10, then number 16, then 22, and lastly square number 25. That's the least I could think of.

Of course, the moment I paint square number 1, square number 3 is also eligible for painting, but I choose not to, and paint square number 4 instead to diminish the number of eligible squares for painting in the future.There's no rule saying you must paint it then and there. If you skip it and paint another, then square number 3 becomes unable to be painted.

Gabriel Souza - 3 years, 11 months ago

Log in to reply

Ah, interesting... The only problem is, you can't paint 1 since it has an even number of squares you haven't yet painted red next to it.

Geoff Pilling - 3 years, 11 months ago

Log in to reply

I see, my bad

Gabriel Souza - 3 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...