How To Solve The Following Counting Problem By Casework

combinationscombinatoricsdiscrete mathematics

I am trying to solve the following problem by casework:
enter image description here

However, my solution 85 is incorrect. The correct solution is 165. I would like to figure 2 things out: why my method is incorrect, and how to actually solve this problem using casework (in other words, how to solve this problem by breaking it into 4 cases: when it has 4 colours, 3 colours, 2 colours and 1 colour). I would appreciate any help on this.

Case where there are 4 colours: There are $5C4$ ways to choose 4 colours, and $4!$ ways to arrange these colours. However, because the square can be rotated 4 times, there are $5C4 * 3!$ ways.

Case where there are 3 colours: There are $5C3$ ways to choose 4 colours. There are 2 ways to arrange the colours: by placing the two identical colours diagonal to each other, or adjacent to each other. In the first case, there is only unique way to place all the colours. In the second case, there are 2 ways: we can swap the positions of the two unique colours. So we have $5C3 * (2+1)$ ways.

Case where there are 2 colours: There are $5C2$ ways to choose 2 colours. There are 2 ways to arrange the colours: by placing each pair diagonal to each other, or adjacent to each other. So we have $5C2 * (2)$ ways.

Case where there is 1 colour: There are 5 ways.

So we have a total of 85 ways.

Given this, could someone explain where I have gone wrong, and what's the correct way to solve this with casework?

Thanks in advance.

Best Answer

@Ethan_Chan I have two corrections in your solution.

Case where there are 3 colours: There are $5C3$ ways to choose 3 colours. From this 3 colours we have to use one colour 2 times. That colour can be chosen in 3 ways. From the collection of 4 colours(with one colour considered 2 times), there are totally 3 ways to colour. These are identical colours in diagonal, identical colours in adjacent with one permutation of the other 2 colours in the remaining two places, identical colours in adjacent with the other permutation of the other 2 colours in the remaining two places. Hence totally $5C3\times 3\times 3$

Case where there are 2 colours: There are $5C2$ ways to choose 2 colours. For each of these choices, there are totally 4 ways to colour the 4 cells. Let the 2 colours that are chosen be $a$ and $b$. The arrangements $(a,a,b,b), (a,b,a,b), (a,a,a,b), (a,b,b,b)$ will give the different colourings in this case when they are arranged into squares in the cyclic manner. Totally there are $5C2\times 4$

Now you count all the colourings in different categories to get the answer $165$.

You can also use Polya's theorem to get the answer in the more simplistic way. After using this theorem to solve this problem you may appreciate the usefulness of Polya's counting as I did.

Related Question