Possible combinations of placing 14 different colors in a matrix 8x8

301 Views Asked by At

I have a matrix *8*x*8* where i can place color bricks. I can place bricks everywhere except on all four edges - So I have 60 different places where I can place bricks. I have 14 different colors of bricks and do not need to fill all 60 places with bricks (So I can leave all places empty or I can fill them all).

I want to calculate all different combinations I can create. I know that with 1 color I can create 60! different combinations.

But what happens when I start to mix colors on a matix? How can I calculate the right number of possibilities?

Thanks

1

There are 1 best solutions below

3
On BEST ANSWER

The answer is $(k+1)^{60}$, where $k$ is the number of colours you want to use. To see why this is so, consider a single cell: it may take $k$ different values for the different colours and an additional value if the cell is empty. Since the choice of each cell is independent of the others we get a multiplication. A single combination can be written as a vector: $v \in \{0,...,k\}^{60}$. Note that the size of the set is exactly $(k+1)^{60}$. Note that when you said edges you meant corners.