Say I have the letters BBNNRRQK and I want to place them inside the squares as seen in the picture above.
Each square takes one letter at each time a combination is made.
The restrictions are: One B must be in a light square while the other B is in a dark square. K must be placed between two Rs (not necessary directly).
Examples of valid combination:
RBBKQNNR
BNQNRKRB
It says that there are 360 ways to place them inside the squares. I came up with a solution, but I feel that it is wrong. Is there a better way to do that?
Let the * be an empty square. I started with this combination.
BBR****R
The remaining letters are NNKQ
There are \(\displaystyle \frac{4!}{2!} = 12\) ways to place them.
We can have the same calculation if we have:
BR****RB = 12
RB****BR = 12
R****RBB = 12
R****BBR = 12
RBB****R = 12
including
BBR****R = 12
\(\displaystyle 12 \times 6 = 72\)
Another combination is:
BBR***R*
Now K is restricted to three positions each position gives Q three different positions. So we have:
BBR***R* = 9
RBB***R* = 9
R***BBR* = 9
R***RBB* = 9
R*BB**R* = 9
R**BB*R* = 9
R***R*BB = 9
BR***R*B = 9
BR*B**R* = 9
BR***BR* = 9
RB**B*R* = 9
RB***RB* = 9
R*B**BR* = 9
R*B**R*B = 9
R**B*RB* = 9
R***BR*B = 9
\(\displaystyle 9 \times 16 = 144\)
Another combination is when the K is restricted to two positions:
BBR**R** = 6
Same as above if we change the positions of Bs, we get 16 of them. So we have:
\(\displaystyle 6 \times 16 = 96\)
Another combination is when the K is restricted to one position:
BBR*R*** = 3
Same as above:
\(\displaystyle 3 \times 16 = 48\)
Finally, combining all of them:
\(\displaystyle 72 + 144 + 96 + 48 = 360\)