Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


A child has 12 blocks. 6 are black, 4 are red, 1 is white, and 1 is yellow

(A) If the child puts the blocks in a line, how many different arrangements are possible?

(B) If one of the arrangements in (A) is randomly selected, what is the probability that no two black blocks are next to each other?



If we assume the blocks are numbered, 1-12, then there are 12! arrangements possible. Since it isn't mentioned, there are 6! ways to arrange the black, 4! for the red, and 1! for each the white and the yellow.

 12!/6!4!!1!1 = 27'720


I'm not sure how to go about (B). I think the probability will be x/27'720 but I'm not sure how to arrive at x.

share|cite|improve this question
+1 for showing work. When using the division slash, please use parentheses to show what goes in the denominator. Many people assume a/bc=a/(bc) but computer languages and some people will read (a/b)c. – Ross Millikan Jan 30 '13 at 19:39
How do you distinguish between the six black blocks? If you number them you are essentially changing the problem. Any way you place the 6 black boxes in a row you will see six black boxes in a row--exactly the same thing regardless of the permutation so there is only one way to do this smaller problem. This needs an edit. – Barbara Osofsky Jan 30 '13 at 19:44
up vote 2 down vote accepted

Given that there are so many black blocks, there are not many ways to select their positions so that no two are touching. One way to count is to line up eleven blocks with the blacks in the odd number positions. Then you can insert the odd block in $7$ ways, as right of the leftmost block and left of the rightmost block are the same. We can permute the six other blocks in $\frac {6!}{4!1!1!}=30$ ways. So the total number of ways is $7 \cdot 30 = 210$. The probability that one of these is selected is $\frac {210}{27720}$

share|cite|improve this answer
Doesn't (6!)/(4!1!1!) = 30? How did you get 180? Besides that, thanks for the answer, totally makes sense! – jsan Jan 30 '13 at 20:19
@jsan: you are right. I'll fix – Ross Millikan Jan 30 '13 at 20:43
@AndréNicolas: I see. fixed. – Ross Millikan Jan 30 '13 at 23:27

We solve the following general problem. We have $n+b$ distinct blocks, of which $n$ are non-black and $b$ are black. The blocks are lined up in a row, with all arrangements equally likely. We find the probability no two black blocks are neighbours.

There are $\dbinom{n+b}{b}$ equally likely ways to choose the locations of the black blocks.

How many of these choices are good (no two neighbouring black blocks)? Write down $n$ symbols $\times$ like this: $\quad\times \quad\times \quad\times\quad\times\quad \cdots\quad\times$.

These determine $n+1$ "gaps" (we are including the endgaps) to slip a black block into. There are $\dbinom{n+1}{b}$ ways to choose $b$ of these gaps. So our probability is $$\frac{\binom{n+1}{b}}{\binom{n+b}{b}}.$$

Note that by definition $\binom{x}{y}=0$ if $x\lt y$.

share|cite|improve this answer

There are 12! ways the child can physically place these blocks in a line of 12 bins if there is a way of distinguishing all of the blocks, but as presented one cannot distinguish the 6 black boxes from each other or the 4 red blocks from each other. So the child might have chosen 6 places to put the red blocks (12 choose 6) ways = ${12!}\over{6!\cdot 6! }$ ways where the division by 6!\cdot 6! in the denominator says any permutation of the blocks in the chosen 6 places gives you the same placement of black blocks and you do not care about what goes into the other places. Next the red blocks can be placed in 4 of the remaining 6 bins in (6 choose 4) ways = ${6!}\over{4!\cdot 2! }$ ways and the remaining 2 bins can be filled in 2 ways, RY or YR. Hence the total number of ways to place the blocks is the product of these, that is $ \left( {12!}\over{6!\cdot 6! }\right) \cdot \left( {6!}\over{4!\cdot 2! }\right) \cdot {2!}$ = ${12!}\over{6!\cdot 4!} $

share|cite|improve this answer
Thanks. I corrected it. I never did the arithmetic and computing something into LaTeX is not easy for me. – Barbara Osofsky Jan 30 '13 at 22:12
guess this was extraneous as it just a little wordier version of the original solution. should i delete it? – Barbara Osofsky Jan 30 '13 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.