How to Calculate the probability of two b's not coming together?

135 Views Asked by At

We have $8$ a's, $6$ b's and $5$ c's. If no two c's are together then calculate the probability of two b's not coming together.

I try to solve it but I'm realy confused. The number of permutations looks very much. Will the complementary method be solved?

2

There are 2 best solutions below

2
On

Without any restrictions the total no of permutations are \begin{equation} \frac{19!}{8!6!5!} \end{equation} No of permutations such that no two c's are together are \begin{equation} \frac{14!}{8!6!} \binom{15}{5} = \binom{14}{6} \binom{15}{5} \label{1} \tag{1} \end{equation} First arrange a's and b's without any restrictions, and place c's in those 15 gaps created by that arrangement. No of permutations such that no two b's or c's together are \begin{equation} \binom{9}{5} \binom{14}{6} \label{2} \tag{2} \end{equation} i.e. first arrange all a's (one way), arrange all c's in 9 gaps created by this, finally arrange 6 b's in 14 gaps. The required probability of no two b's together given no two c's together are \begin{equation} \frac{\binom{9}{5} \binom{14}{6}}{\binom{14}{6} \binom{15}{5}} = \frac{\binom{9}{5}}{\binom{15}{5}} \end{equation}

PS: There is a small confusion on whether to arrange b's or c's first in the gaps created by a's in the last case. I considered arranging c's first, since the no of permutations in this case are higher compared to arranging b's first. I'm open to any suggestions if I'm wrong.

0
On

Let's group letters together. If we change our "alphabet" to the following: a, ab, ca, cb, we can get all valid strings of letters (no doubled b's or c's) except those that begin with b or end with c. We can use the Addition Principle to get those, as well. So, we have the multiset $\{a\cdot x_1, ab\cdot x_2, ca\cdot x_3, cb\cdot x_4\}$, and we want all of the permutations. But, what are $x_1,x_2,x_3,x_4$? Well, we want all integral solutions to the following Diophantine Equations:

$$x_1+2x_2+2x_3+2x_4 = 19, x_1+x_2+x_3 = 8, x_2+x_4=6, x_3+x_4=5$$

Solving the system of equations in terms of $x_4$ gives:

$$\begin{matrix}x_1=2x_4-3 \\ x_2 = 6-x_4 \\ x_3 = 5-x_4\end{matrix}$$

So, $2\le x_4 \le 5$.

There are only four integral solutions:

$$\begin{matrix}x_1=1, x_2=4, x_3=3, x_4=2 \\ x_1=3, x_2=3, x_3=2, x_4=3 \\ x_1=5,x_2=2,x_3=1,x_4=4 \\ x_1=7,x_2=1,x_3=0,x_4=5\end{matrix}$$

Now, if we start with b, the equations change to:

$$x_1+2x_2+2x_3+2x_4 = 18, x_1+x_2+x_3 = 8, x_2+x_4=5, x_3+x_4=5$$

Again, solve in terms of $x_4$ yielding integral solutions:

$$\begin{matrix}x_1=0, x_2=4, x_3=4, x_4=1 \\ x_1=2, x_2=3, x_3=3, x_4=2 \\ x_1=4, x_2=2, x_3=2, x_4=3 \\ x_1=6, x_2=1, x_3=1, x_4=4 \\ x_1=8, x_2=0, x_3=0, x_4=5\end{matrix}$$

If we end with c, the equations change to:

$$x_1+2x_2+2x_3+2x_4 = 18, x_1+x_2+x_3 = 8, x_2+x_4=6, x_3+x_4=4$$

Yielding integral solutions:

$$\begin{matrix}x_1=0, x_2=5, x_3=3, x_4=1 \\ x_1=2, x_2=4, x_3=2, x_4=2 \\ x_1=4, x_2=3, x_3=1, x_4=3 \\ x_1=6, x_2=2, x_3=0, x_4=4\end{matrix}$$

And if we start with b and end with c, the equations change to:

$$x_1+2x_2+2x_3+2x_4 = 17, x_1+x_2+x_3 = 8, x_2+x_4=5, x_3+x_4=4$$

Yielding the integral solutions:

$$\begin{matrix}x_1=1, x_2=4, x_3=3, x_4=1 \\ x_1=3, x_2=3, x_3=2, x_4=2 \\ x_1=5, x_2=2, x_3=1, x_4=3 \\ x_1=7, x_2=1, x_3=0, x_4=4\end{matrix}$$

So, the total number of strings with no b's adjacent to b's or c's adjacent to c's would be found by adding up the numbers of permutations of the multisets (since the sets of permutations formed will each be disjoint) formed by each integral solution to the diophantine equations:

$$\dfrac{10!}{1!4!3!2!}+\dfrac{11!}{3!3!2!3!}+\dfrac{12!}{5!2!1!4!}+\dfrac{13!}{7!1!0!5!} + \dfrac{9!}{0!4!4!1!}+\dfrac{10!}{2!3!3!2!}+\dfrac{11!}{4!2!2!3!}+\dfrac{12!}{6!1!1!4!}+\dfrac{13!}{8!0!0!5!}+\dfrac{9!}{0!5!3!1!}+\dfrac{10!}{2!4!2!2!}+\dfrac{11!}{4!3!1!3!}+\dfrac{12!}{6!2!0!4!} + \dfrac{9!}{1!4!3!1!}+\dfrac{10!}{3!3!2!2!}+\dfrac{11!}{5!2!1!3!}+\dfrac{12!}{7!1!0!4!}=461,457$$

There is probably a much easier way to arrive at this answer, but off the top of my head, I cannot think of it. I am still not even sure if I missed anything, but I do not think so.

Now, the probability is:

$$\dfrac{461,457}{\dbinom{14}{6}\dbinom{15}{5}} = \dfrac{51,273}{1,002,001}$$

Edit: To see if my methodology works, let's try the same thing with only counting no adjacent c's. We can use the alphabet a,b,ac,bc and add in cases where we start with a c. $$\begin{matrix}x_1+x_2+2x_3+2x_4=19 \\ x_1+x_3=8 \\ x_2+x_4=6 \\ x_3+x_4=5\end{matrix}$$ This yields the following integral solutions: $$\begin{matrix}x_1=3, x_2=6, x_3=5, x_4=0 \\x_1=4, x_2=5, x_3=4, x_4=1 \\x_1=5, x_2=4, x_3=3, x_4=2 \\x_1=6, x_2=3, x_3=2, x_4=3 \\x_1=7, x_2=2, x_3=1, x_4=4 \\x_1=8, x_2=1, x_3=0, x_4=5\end{matrix}$$ And if we begin with c: $$\begin{matrix}x_1+x_2+2x_3+2x_4=18 \\ x_1+x_3=8 \\ x_2+x_4=6 \\ x_3+x_4=4\end{matrix}$$ This yields the following integral solutions: $$\begin{matrix}x_1=4, x_2=6, x_3=4, x_4=0 \\x_1=5, x_2=5, x_3=3, x_4=1 \\x_1=6, x_2=4, x_3=2, x_4=2 \\x_1=7, x_2=3, x_3=1, x_4=3 \\x_1=8, x_2=2, x_3=0, x_4=4\end{matrix}$$ So the total number of strings with no adjacent c's is given by: $$\dfrac{14!}{3!6!5!0!}+\dfrac{14!}{4!5!4!1!}+\dfrac{14!}{5!4!3!2!}+\dfrac{14!}{6!3!2!3!}+\dfrac{14!}{7!2!1!4!}+\dfrac{14!}{8!1!0!5!}+\dfrac{14!}{4!6!4!0!}+\dfrac{14!}{5!5!3!1!}+\dfrac{14!}{6!4!2!2!}+\dfrac{14!}{7!3!1!3!}+\dfrac{14!}{8!2!0!4!}$$ This yields a total of $9,018,009$ possible strings with no doubled c's. The value given in the other posted answer is: $$\dbinom{14}{6}\dbinom{15}{5} = 9,018,009$$ So, this method gives the same value that we agree on. In fact, I am beginning to think that this method yields a valid solution in the top case, as well (where I want no doubled b's or c's).