4

Maya has six indentical pots, which she is planning to arrange in a straight line in her showcase. before that each of these pots is to be colored either red or yellow or green or blue, such that at least one pot is coloured with each of the four colours. In how many different ways can she arrange the pots in the showcase so that now two pots of the same colour are adjacent?

4 Answers4

2

@user155070

Using the method by Byron Schmuland that he got from Jair Taylor:

Arrangement of the word 'Success'

$$q(k)=\sum _{i=1}^k \frac{(-1)^{i-k} \ \binom{k-1}{i-1} x^i}{i!}$$

Pots can colored as 3 of one color and one of each other color and there are 4 ways to do that. Or they can 2 of one type and 2 of another like red,red,yellow,yellow, green, blue and there are 6 ways to do this.

$$6 \int_0^{\infty } \frac{q(2)^2 q(1)^2}{\exp (x)} \, dx+4 \ \int_0^{\infty } \frac{q(3) q(1)^3}{\exp (x)} \, dx = 600$$

Another way to do the calculation uses a method by Robert Israel I believe ( if I am incorrect on this I am sorry ) that uses matrices and generating functions:

$\left( \begin{array}{cccc} 1 & 1 & 1 & 1 \\ \end{array} \right).\left( \begin{array}{cccc} w & 0 & 0 & 0 \\ 0 & x & 0 & 0 \\ 0 & 0 & y & 0 \\ 0 & 0 & 0 & z \\ \end{array} \right).\left( \left (\begin{array}{cccc} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \\ \end{array} \right).\left( \begin{array}{cccc} w & 0 & 0 & 0 \\ 0 & x & 0 & 0 \\ 0 & 0 & y & 0 \\ 0 & 0 & 0 & z \\ \end{array} \right ) \right)^5.\left( \begin{array}{c} 1 \\ 1 \\ 1 \\ 1 \\ \end{array} \right)$

when you expand that you check the coefficient of $w^3 \cdot x \cdot y \cdot z $ which is 24 and there are 4 of that type.

Then you check the coefficient of $w^2 \cdot x^2 \cdot y \cdot z$ which will be 84 and there are 6 of that type.

$4(24) + 6(84) = 600$

This answer of 600 agrees of course with direct count.

bobbym
  • 2,546
2

This is an extension to bobbym's answer --

A summation was derived by Mark Hennings at brilliant (Sadly, you need to login to read the discussion)

Here is the final result, for four colors:

$\displaystyle \mathbb{N}\left(n_1,n_2,n_3,n_4\right) = \sum_{i=1}^{n_1}\, \sum_{j=1}^{n_2}\, \sum_{k=1}^{n_3}\, \sum_{l=1}^{n_4} \, \left(-1\right)^{n_1+n_2+n_3+n_4-i-j-k-l}\binom{i+j+k+l}{i,j,k,l} \binom{n_1-1}{i-1}\binom{n_2-1}{j-1}\binom{n_3-1}{k-1}\binom{n_4-1}{l-1} $

And we require: $4\cdot \mathbb{N}(1,1,1,3)+6\cdot \mathbb{N}(1,1,2,2)$ which gives the same answer.

Update

We can get a formula by using a directed graph, from the generating function obtained, which is:

\begin{align*} G(x) &= \frac{24\, x^4}{1-6\, x + 11\, x^2-6\, x^3} \end{align*}

By partial fraction decomposition, we extract $[x^n]$: \begin{align*} a_n &= 4 \cdot 3^{n - 1} - 6 \cdot 2^{n} + 12 \end{align*}

and we can see that $a_6=600$

gar
  • 4,948
1

case 1:3,1,1,1 case..choose 1 colour in 3C1 ways..now 3 balls of other colours can be distributed in 3! ways.rest 3 balls of same colour have to be plugged in 4C3=4 ways.so total 4*3!*4=96 ways.case 2:2,2,1,1 case..chose 2 colours in 4C2 ways..now total arrangement of these colours 6!/(2!*2!)..now arrangement where at least 1 of the 2 colours,which have 2 pots each, will always stay together=[(5!/2!)*2C1-4!]..so cases where none of the pots which have a common colour stay together=6!/(2!*2!)-[(5!/2!)*2C1-24]=84..so total cases here=4C2*84..so case 1+case 2=96+504=600.

0

First select the color to be repeated. So, there are two cases:

  • one color occurs three times
  • two colors occur twice

Case 1:

No. of ways = $^4C_1\cdot 2 \cdot 3!$

Case 2:

No. of way of selecting = $^4C_2$

Now, find the number of ways of arranging.