Multicolored 4x4

With four colors, how many different ways can you color in the 16 squares in a 4 × 4 4\times4 grid such that each of the nine 2 × 2 2\times2 grids inside the 4 × 4 4\times4 grid contains each of the four colors?


The answer is 168.

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.

3 solutions

Mark Hennings
Nov 8, 2016

For any colouring of the top-left 2 × 2 2\times2 square, there are four possible colourings of the remainder of the top two rows.

For each of the first three possibilities, there is exactly one way of completing the full square. For the final possibility, there are two choices each for possible third and fourth rows.

Thus there are 7 7 ways of colouring the square, once the top-left square has been filled in. This means there are 7 × 4 ! = 168 7\times4! = \boxed{168} total colourings.

Nice write up, @Mark Hennings !

Geoff Pilling - 4 years, 7 months ago

Nice Solution :)

Ashish Yadav - 3 years, 6 months ago
Geoff Pilling
Nov 2, 2016

My apologies in advance, as this solution isn't elegant, and is a lot of bean counting... I would love to see if someone can come up with a simpler approach.

Consider the four in the middle. These can be chosen in 4 ! = 24 4! = 24 ways.

For the remaining 12 12 boxes there are 3 3 ways to choose the top left corner. You can pick any of the three colors that aren't in the top left corner of the center 2 × 2 2\times2 grid. For the one you pick that is the same color as the bottom right one in the center 2 × 2 2\times2 grid, there are 3 3 solutions, and for each of the other two colors there are 2 2 solutions.

Let the middle four be numbered: 1 - top left, 2 - top right, 3 - bottom left, 4 bottom right

For the sake of this description, we will use numbers instead of colors...

The three solutions for picking 4 for the top left color are:

  • 1 in top right
  • 3 in top right, 1 in bottom right
  • 3 in top right, 2 in bottom right
  • (2 and 4 in the top right won't lead to any solutions)

For each case, the rest of the numbers can be filled in trivially showing that these are the only solutions.

And the two solutions for picking 3 for the top left color are:

  • 2 in bottom right
  • 1 in bottom right
  • (3 and 4 in the bottom right won't lead to any solution)

Again, for each case, the rest of the numbers can be filled in trivially showing that these are the only solutions.

Finally, by symmetry, there are also two choices if you chose 2 for the top left box.

This leads then to a total of 7 7 solutions for each of the 24 24 ways to paint the central 2 × 2 2\times2 grid.

Make sense?

So, the total number of ways to paint the 4 × 4 4\times4 grid is given by,

24 × 7 = 168 24\times7 = \boxed{168}

Hm, I think explaining how we can get the 3 solutions and the 2 solutions would be helpful. It seems like there is still a bunch of casework.

Calvin Lin Staff - 4 years, 7 months ago

Log in to reply

Yeah, I was thinking someone might notice that "leap in logic"... :-/ I couldn't think of a nice way to explain it without a lot of figures and diagrams. Lemme think of a good way of explaining it, and I'll plan to add it to my solution.

Geoff Pilling - 4 years, 7 months ago

OK, I've updated the solution...

Geoff Pilling - 4 years, 7 months ago

Yours was better than mine , I had to make 3 cases. One with 0 repetition in columns , which corresponded to 4!. Case 2 with 1 letter repeating in columns , i.e. 4C1 ways of choosing , 2 ways of arranging , and for remaining 3 letters can be put in 2 places in 6 ways. So in case2 I had 48 ways. Case-3 with 2 letters repeating in columns , 6 ways of choosing repeating color, and 96 ways of arranging (I had to make branches like of a tree to answer this one). So overall 24+48+96=168 ways. And extra work to prove myself that the answer is 168 and that rows were automatically shuffled in my way to solution.

Hitesh Yadav - 6 months, 1 week ago
Sahil Goyat
Jul 13, 2020

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...