Minimum number of moves required to obtain chess like coloring.

103 Views Asked by At

I've been preparing for a competition and there is this problem that I cannot solve. Can you please help me and also tell me how to do similar problems if they appear in the future?

Problem:

Please click on the link because I can't send it by inserting it

1

There are 1 best solutions below

0
On

I am unsure what the "general procedure" should be for this kind of problem, but I can help for this specific one.

Note that for the $5\times 5$ square shown, there are $12$ black squares. Since none of the black squares are neighbors, we know that the minimum number of moves to take the starting configuration to the final configuration is at least $12$. Thus, if we can demonstrate a sequence of moves of length $12$ which accomplishes our goal, we will have proven that the minimum is exactly $12$.

SPOILERS AHEAD!

So what sequence of $12$ moves accomplishes our goal? Well, we can "click" each corner twice to get $8$ black squares while leaving the corners white (since two "clicks" will negate each other on the same square), and we can get the remaining $4$ black squares in the center by "clicking" the very middle square $4$ times.