# Paint Eight Squares

Inspired by this question

Given a $$5 \times 5$$ grid of white squares, can you paint $$8$$ of the squares black so that each white square is orthogonally adjacent to exactly one black square?

It is

possible.

Proof:

    XX...
...XX
.....
XXX..
....X


• Did you just brute force it or is there a logical path to reach the solution above ? Jun 1 at 9:06
• @HemantAgarwal just take a row of n black squares and think about the profile it covers. Jun 10 at 21:44

## Other Solutions:

Here are a few ways to get more than 8:

9-

. x x x .
. . . . .
. x x x .
. . . . .
. x x x .

10 (Inspired by Loopy Walt's solution)-

x x . . .
. . . x x
x x . . .
. . . x x
x x . . .

15-

x x x x x
. . . . .
x x x x x
. . . . .
x x x x x

• These are not correct, all three have white squares which are adjacent to two black squares. In the last one, all of the white squares are adjacent to two black squares. May 24 at 15:10
• All of these have the wrong number of black squares, and all have white squares with two black neighbours instead the one. For the maximum number of coloured squares, you could have used the trivial solution with no white squares, but that isn't what OP was asking, either. (Hi, and welcome to PSE, we tend to be a bit nitpicky about following the exact rules given in puzzles, please try to tolerate us and do have fun :-)
– Bass
May 24 at 15:13