0

I was doing this question:

$A$ has cans of paint in eight different colors. He wants to paint the four unit squares of a $2 \times 2$ board in such a way that neighboring unit squares are painted in different colors.

The number of distinct coloring schemes ‘A’ can make is equal to?

The number of distinct colouring schemes ‘A’ can make in which two colouring schemes are considered the same if one can be obtained from the other by rotation is equal to?

My attempt: For the first part, I tried to use inclusion exclusion:

$ 8^4 - (4)\binom{8}{1}(1)(8^2) + (4)\binom{8}{1}(1)(8^1) - (1)\binom{8}{1}(1)(8^0) $

This gave me an answer equal to 2272, but the answer given is 2072.

Any thoughts on where I am wrong?

EDIT: I forgot to explain my working.8^4 is to total no. of ways, and then I subtracted the case of selecting 2 consecutive blocks in 4 ways (the left two, the right two, the upper two and the bottom two), pick one color out of eight, fill that color in the two blocks in one way, and then color the remaining two blocks in 8*8=8^2 ways, and then added the case of selecting three consecutive blocks, coloring them one way, and coloring the remaining block with 8 ways, and then lastly subtracting the case of selecting all 4 blocks, and coloring them using a single color. The answer given in the book was simply as follows:

$\binom{8}{4} 4! + \binom{8}{3} 3! \times 1 + \binom{8}{2} \times 2! = 2072$

  • 1
    Can you explain the terms in your expansion? For example, why do you have $8^5$? – John Douma Feb 15 '25 at 14:43
  • 2
    I obtain 2408 for part 1 both through I/E and a different construction. Are you sure the given answer of 2072 is correct? – RobinSparrow Feb 15 '25 at 14:47
  • 1
    @RobinSparrow I obtained the same number considering number (from $2$ to $4$) of colors in the coloring, right? – chirico Feb 15 '25 at 14:50
  • 1
    Should say: I also get $2408$ if I ignore the bit about rotational equivalence. – lulu Feb 15 '25 at 15:30
  • 1
    It's always good to to represent your inclusion first by defining the whole set $AB$ and each subset $B_i$ so that you are trying to count $B\setminus (B_1\cup \dots\cup B_n).$ Here, it,isn't clear at all what you think you are counting. – Thomas Andrews Feb 15 '25 at 16:05
  • Why is is $8^5$ for the first term? Is it just a typo and should be $8^4?$ I'd guess a typo because that would give a huge,error. – Thomas Andrews Feb 15 '25 at 16:08
  • The first part is, effectively, a duplicate of this question – lulu Feb 15 '25 at 16:15

2 Answers2

2

Here are two ways to arrive at the answer for Part 1.

A direct construction. Choose a color for the upper left, then either we color both neighbors (upper right, lower left) the same and have a $n-1$ choices for the bottom right, or we color the two neighbors differently and have $n-2$ choices for the bottom right.

Diagonally same: $n(n-1)(n-1)=8*7*7$

Diagonally different: $n(n-1)(n-2)(n-2)=8*7*6*6$

For a total of $2408$ possible colorings, not worrying about rotational symmetry.

I/E: The condition to exclude is that neighboring pairs have the same color, there are $4$ such pairs to worry about:

$8^4-\binom{4}{1}8^3+\binom{4}{2}8^2-\binom{4}{3}8+\binom{4}{4}8=2408$

If you elaborate on your approach to the I/E above, which I didn't understand, perhaps we can help untangle your approach.

Edit:

Thanks for adding the requested info. I believe the book solution has a typo: the middle term should read "$\times 2$" and the sum is then $2408$ as with the other methods (also, it would be odd to intentionally write "$\times 1$"). The two term is taking into account the two possible orientations of diagonals when using 3 colors.

Wrong: $\binom{8}{4} 4! + \binom{8}{3} 3! \times 1 + \binom{8}{2} \times 2! = 2072$

Right: $\binom{8}{4} 4! + \binom{8}{3} 3! \times 2 + \binom{8}{2} \times 2! = 2408$

The issue with your initial method is you are not systematically choosing the combinations of your initial exclusions (the 4 neighbors) in the subsequent terms. For example, it is not just L shapes that have two pairs of neighbors selected, but also if you had both horizontal or both vertical pairs, which was neglected.

RobinSparrow
  • 3,669
  • Hello. While I completely understood your direct construction method, I had a little trouble understanding your I/E. You say there are 4 pairs of neighbor having the same color, and then in your I/E you simply just choose 1,2,3 and 4 of them and alternatively include and exclude? I don't quite follow what exactly are you excluding and including. – Arjun Sharma Feb 17 '25 at 14:49
  • There are 4 borders where neighbors could be the same color. We exclude each border individually in the first exclusion step, then the next is correcting for ones excluded twice, etc. There are only four "patterns" to consider sharing color: a rectangular pair, two rectangular pairs, an L, and the whole square, representing one, two, two, and four shared pairs. Look at the over and under corrections for each pattern, you'll see it adds up properly. – RobinSparrow Feb 17 '25 at 16:55
1

As for the second part you can use Burnside's lemma (or just on your own, since there are not that many possibilities). Recall that $$|C| = \frac{1}{|G|}\sum\limits_{g\in G}|X^{g}|,$$ where $C$ is the set of colorings, $G$ is a group acting on the set $C$ and $X^{g} = \{c\in C:g\cdot x = x\}$ --- the set of colorings that are fixed by $g$. In our case $G$ is a group of four rotations (generated by $\frac{\pi}{2}$ rotation): $G = \{\mathrm{id},r,r^{2},r^{3}\}$. Clearly, all colorings are fixed by $\mathrm{id}$, thus, $|X^{\mathrm{id}}| = 2408$. Colorings, that are fixed by $r$ consist of one color, but these are prohibited, so $|X^{r}| = 0$. Colorings, that are fixed by $r^{2}$ are those for which diagonals are monochromatic, thus, $|X^{r^{2}}| = 8\cdot 7 = 56$, the case with $r^{3}$ is identical to $r$, so $|X^{r^{3}}| = 0$. Finally, $$|C| = \frac{1}{4}(2408 + 56) = 616$$

chirico
  • 1,339