# How many ways to arrange 18 students and 2 teachers with 8 students between the 2 teachers

A school photo must be taken of a class consisting of 18 students and two teachers. The photographer wants that all people should stand next to each other in a row, but there should be exactly 8 students between the two teachers. In how many ways can this arrangement take place?

I am not sure how to do this, I assume it's a permutation since order matters but even if I know that there should be T S S S S S S S S T I can put the rest students however I want like 3 on the left and 7 on the right before and after the teacher. I don't know how to write this up.

• It seems you've put some effort olinto solving this problem, however it would be better if you showed us precisely what you have tried. This will help users better answer your question, and will tell them that you are interested in learning. Commented Sep 27, 2022 at 13:24
• Your starting point is sensible. First count the ways to arrange $10$ $S's$ and a symbol $X=TS^8T$. Not too many options there. Now, for any such arrangement, how many ways are there to assign the $S's$ to actual students and the $T's$ to actual teachers.
– lulu
Commented Sep 27, 2022 at 13:27

I am assuming that the teachers and students are all distinguishable, since otherwise the problem becomes trivial.

The two teachers must be in positions $$(x,y)$$, where $$(x,y)$$ is one of the elements in $$\{(1,10), (2,11), \cdots, (11,20)\}$$. So, you start with a factor of $$(11)$$, since the set of ordered pairs has $$(11)$$ elements in it.

Then, for each of the $$(11)$$ ordered pairs, the teachers can be permuted in $$(2!)$$ ways and the students can be permuted in $$[(18)!]$$ ways.

So, the overall enumeration is

$$11 \times (2!) \times [(18)!].$$

• Treat the block $$\boxed{TSSSSSSSST}$$ as one entity along with $$10$$ other entities (students).

• Place the block among $$11$$ entities in $$11$$ ways, and permute the students and teachers among themselves to get $$11\times18!2!$$

According to the picture $$(X)T_1(8)T_2(10-X)$$, $$2!\binom{18}{8} 8!\sum_{x=0}^{10} \binom{10}{x}x!(10-x)!=2!\frac{18!}{8!10!}8!\sum_{x=0}^{10} 10!=2!\frac{18!}{10!}\times11\times10!=22\times18!$$