With four colors, how many different ways can you color in the 16 squares in a 4 × 4 grid such that each of the nine 2 × 2 grids inside the 4 × 4 grid contains each of the four colors?
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.
Nice write up, @Mark Hennings !
Nice Solution :)
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 ! = 2 4 ways.
For the remaining 1 2 boxes there are 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 grid. For the one you pick that is the same color as the bottom right one in the center 2 × 2 grid, there are 3 solutions, and for each of the other two colors there are 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:
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:
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 solutions for each of the 2 4 ways to paint the central 2 × 2 grid.
Make sense?
So, the total number of ways to paint the 4 × 4 grid is given by,
2 4 × 7 = 1 6 8
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.
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.
OK, I've updated the solution...
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.
Problem Loading...
Note Loading...
Set Loading...
For any colouring of the top-left 2 × 2 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 ways of colouring the square, once the top-left square has been filled in. This means there are 7 × 4 ! = 1 6 8 total colourings.