# probability that binary number has no consecutive ones

• Dec 9th 2011, 08:19 AM
Jskid
probability that binary number has no consecutive ones
Let S be the set of all sequences of 6 zeros and 4 ones. Find the probability that a randomly selected element of S has no two consecutive ones. The sample space is 10!
• Dec 9th 2011, 08:28 AM
Plato
Re: probability that binary number has no consecutive ones
Quote:

Originally Posted by Jskid
Let S be the set of all sequences of 6 zeros and 4 ones. Find the probability that a randomly selected element of S has no two consecutive ones. The sample space is 10!

The number of bit-strings in $\displaystyle S$ is $\displaystyle \|S\|=\binom{10}{6}$.

Of those there $\displaystyle \binom{7}{4}$ which have no consecutive ones.
The reason for this is that we use the zeros as separators:_0_0_0_0_0_0_. So there are seven places for the 1's.
• Dec 9th 2011, 08:40 PM
Soroban
Re: probability that binary number has no consecutive ones
Hello, Jskid!

Quote:

Let $\displaystyle S$ be the set of all sequences of 6 zeros and 4 ones.
Find the probability that a randomly selected element of S has no two consecutive ones.
The sample space is 10! . No!

That would be true if we had 10 different objects to arrange.

Since we have six identical 0's and four identical 1's,
. . the sample space is: .$\displaystyle \frac{10!}{4!\,6!} \,=\,210$

Plato has the best solution.

I went about it differently ... and found that it required far more work.

Instinctively, I set about separating the 1's.

I arranged the four 1's in a row with a space before, after, and between them.
. . $\displaystyle \_\;1\;\_\;1\;\_\;1\;\_\;1\;\_$

Then I placed 0's in the three interior space:
. . $\displaystyle \_\;1\;0\;1\;0\;1\;0\;1\;\_$

Now I must distribute the three remaining 0's.

They can all go into any of the 5 spaces: 5 ways.

Two can go into one space, one into another: .$\displaystyle 5\cdot4 \,=\,20$ ways.

The three can go into separate spaces: .$\displaystyle {5\choose3} \,=\,10$ ways.

Hence, there are:.$\displaystyle 5 + 20 + 10 \,=\,35$ ways with no consecutive 1's.

I'm gratified that I got Plato's answer . . .
.