# 2020 AMC Junior Q30

• I am stucked on the question below, anyone can help me?

My grandson makes wall hangings by stitching
together 16 square patches of fabric into a 4 × 4
grid. I asked him to use patches of red, blue,
green and yellow, but to ensure that no patch
touches another of the same colour, not even diagonally.
The picture shows an attempt which fails only
because two yellow patches touch diagonally.
In how many different ways can my grandson
choose to arrange the coloured patches correctly?

• Hey @gentlegorilla! Unforunately, there's no good formula to tackle this problem. I started off by trying to just make a pattern by myself and here's what I noticed:

In every 2x2 square, there can only be one of each color (this makes sense since colors can't touch each other, even diagonally). It might seem obvious, but this is really important! So, I started off by filling in the colors in the middle 2x2 square and going off from there.

Let's say I start off with
B G
Y R
in the middle 2x2. This means that the colors above B G have to be R & Y, in some order. With the same logic, the colors below Y R have to be B & G in some order. From there, you just have to pick one of each for those two and keep going.
For example, one way to continue the pattern:
R Y
B G
Y R
G B
(I just added to the top and bottom)
Now what you'll notice is that to the right of the Y & G in the top right, there has to be an R and a B. However, R can't go directly next to G because then they will touch diagonally!
R Y
B G R
Y R
G B