2

Arrange at random $10$ students consisting of $2$ students from class A, $3$ students from class B, and $5$ students from class C into a horizontal line. What is the probability that no $2$ students from any class stand right next to each other?

There is no verified answer to this problem, but the following is my attempt. I hope to know if my solution is correct and if a better solution exists as my approach does not seem to generalize well when the numbers are large.

Originally, I thought about considering unfavorable outcomes occurring in each class, each pair of class, and in all classes. For each case, I would consider the students standing next to each other as one single student. I soon realized that arranging the other students can also cause those from the same class to be adjacent to each other, and the approach became untractable.

I eventually came up with this somewhat spontaneous solution:

Line up the students from class C first:

[C] [C] [C] [C] [C]

Then distribute students from class B into this line so that they would separate the students from class C in their ability and they themselves do not stand next to each other.

E.g. (We have two types of arrangement)

(1): [B] [C] [B] [C] [C] [B] [C] [C] $\to$ At least one [B] is outside of the original boundaries created by [C]'s.

(2): [C] [B] [C] [B] [C] [B] [C] [C] $\to$ All [B]'s are inside the original boundaries created by [C]'s.

Now distribute students from class A.

First, let's consider the case when [A] can stand next to [B]. This is not possible in arrangement (1) since as soon as we let one [A] stand next to a [B], we have only one [A] left, but there are still two "unfilled gaps" between [C]'s.

On the other hand, in arrangement (2), if we let one [A] stand next to [B], the other [A] must go to fill the remaining gap between [C]'s.

So for the case when [A] can stand next to [B], [B] must be inside the boundaries created by [C]'s, and only one [A] can stand next to [B], while the other [A] goes to fill the remaining gap between [C]'s. The number of ways this can happen:

  • Arrange the 5 [C]'s and shuffle their positions: $5!$
  • Select 3 gaps among 4 gaps between [C]'s to distribute 3 [B]'s: $\dbinom{4}{3}$
  • Shuffle the 3 [C]'s: $3!$
  • Select 1 among 3 [B]'s to let an [A] stand next to: $3$
  • This [A] could stand either in front of or behind the [B]: $2$
  • Shuffle the [A]'s together: $2!$

Total: $S_1 = 5! \cdot \dbinom{4}{3} \cdot 3! \cdot 3 \cdot 2 \cdot 2!$

Second, let's consider the case when no [A] and [B] stand next to each other. In arrangement (1), we have 2 gaps between [C]'s, so the 2 [A]'s must help fill these gaps. Thus, there is only one possible pair of places for the 2 [A]'s (before shuffling their positions).

In arrangement (2), we have only one "unfilled gap" between [C]'s, so we could distribute one [A] to this gap, and the other [A] could go to the very end of the line or the beginning. Thu, there is two possible pair of places for the 2 [A]'s.

$S_2 = 5! \cdot 3! \cdot 2! \cdot [2 \cdot \dbinom{4}{2} \cdot 1 + \dbinom{4}{3}\cdot 2]$

So the probability that no 2 students from any class stand right next to each other is:

$$P = \dfrac{S_1 + S_2}{10!} = \dfrac{11}{630}$$

ten_to_tenth
  • 2,128

2 Answers2

1

We can assume that student's are distinguishable only by their class. I will denote them as $A$'s, $B$'s and $C$'s.

Total number of arrangements of $2 \times A$, $3 \times B$ and $5 \times C$ is: $$|\Omega| = \binom{10}{5} \cdot \binom{5}{3} \cdot \binom {2}{2} = 2520$$

Now let's consider the number of arrangements that satisfy given conditions. Let's start with $5$ students from class $C$ and try to separate them by placing other students in between. $$C-C-C-C-C$$ There are $2$ cases:

Case $1$: Between each $2$ consequtive $C$ there is exactly $1$ student.

This cases involves the fact, that we have one student staying in the most right or most left position of that sequence. If this is student $A$, then we have $2 \cdot \binom{4}{3}$ ways of doing that (we choose to place him at the front or at the back, and then place remaining $B$ and $A$ in between $C$). If this is student $B$, then we have $2 \cdot \binom{4}{2}$ ways. In total: $$2 \cdot \binom{4}{3} + 2 \cdot \binom{4}{2} = 20$$

Case $2$: There is one gap that is filled by $2$ students.

The only possible way for this is when some gap is filled with either $AB$ or $BA$. We choose this gap in $\binom{4}{1}$ ways, and place remaining $A$ and $B$ in $\binom{3}{2}$ ways. In total: $$2 \cdot \binom{4}{1} \cdot \binom{3}{2} = 24$$

The above cases are the only possible, thus: $$ P = \frac{20 + 24}{2520} = \frac{11}{630} $$

0

A systematic (though a bit laborious) way is to count gaps between $A's$ and $B's$where it is mandatory to put $C$ spacers (bullets), and place the "free" $C's$ in the remaining gaps (dots)

The $A's$ and $B's$ can be permuted in $\binom52=10$ ways, but taking advantage of reverse symmetry, we can reduce this number to $6$ and place the "free" $C's$

$.A\bullet A.B\bullet B\bullet B.\;$ and reverse:$\;2\cdot\binom32=6$

$.A.B.A.B\bullet B.\;$ and reverse: $\;2\cdot\binom54 =10$

$.A.B\bullet B.A.B. \;$ and reverse: $\;2\cdot\binom54 = 10$

$.B\bullet A\bullet B\bullet B. \;$ and reverse:$\;2\cdot\binom43 = 8$

$.A. B \bullet B \bullet B. A.\;\binom43 = 4$

$.B.A.B. A.B.\; \binom65 = 6\quad\quad total\;\; \boxed{44}$

Thus $Pr = \dfrac{44}{10!/(2!3!5!)} = \dfrac{11}{630}$


Of course, this will become impracticable as the problem size increases. For larger problems, "heavy artillery" is available, the one I like, a form of the generalised Laguerre polynomials, can be seen in my answer here for a similar problem

PS:

I find that I had given two answers, the first using "heavy artillery" and the second using the method given here ! There are answers using other methods, too, over there which you might like to see.