# In how many ways can you put two people in $5$ seats in a row if they cannot sit together?

In how many ways can you put two people in $5$ seats in a row if they cannot sit together?

So this is a simple combinatorics problem that i can't quite work out. I know that the answer is $12$ but i don't fully understand how to get it.

## 5 Answers

Hint:

$$\text{Find the number of ways they can sit (without restrictions).}\tag1$$

$$\text{Then, find the number of ways they cannot sit.}\tag2$$

$$\text{Answer}=(2)-(1)$$

• Your last sentence should say subtract the number of ways they cannot sit from the number of ways they can sit. – N. F. Taussig Mar 11 '18 at 0:22
• @N.F.Taussig How about now? – user535339 Mar 11 '18 at 0:25
• That is clearer. – N. F. Taussig Mar 11 '18 at 0:25

There are $5 \cdot 4 = 20$ ways to sit them in $5$ seats without any restrictions.

And there are $4\cdot 2 = 8$ ways to sit them together ($4$ places to sit together, $2$ options for switching two people).

So the answer is $20-8 = 12$.

The number of ways to seat $2$ people in $5$ seats is the permutation $5$p$2$ since order matters. $\frac{120}6 = 20$. Now, how many ways can they sit together? To figure this out I put $5$ dots on my paper and circled every possible pair. You can only do that $4$ times. There may be a more mathematical way to do that though. There are two ways to get a pair, which is $2!$. So, $4\cdot 2! = 8$ possible ways to sit together.

Therefore, $20 - 8 = 12$.

If we number the seats from $S_1$ to $S_5$, here are the possibilities:

$S_1$ for the first person. For the second person, there are $3$ possibilities.

$S_2$ and $2$ possibilities.

$S_3$ , with $2$

$S_4$ with $2$ finally $S5$ and $3$

$$\text{total}=3+2+2+2+3=12$$

• While your answer is correct, it is not clear what you mean by the first and the second here. Perhaps if you name the people, it would be clearer. – N. F. Taussig Mar 11 '18 at 0:25
• @N.F.Taussig First person. – hamam_Abdallah Mar 11 '18 at 9:19

Another way similar to ArsenBerk's method is grouping the two people together to become one. There are $4*3$ ways to do this, and you just subtract that from the total ways which is $5*4$.

• Are you suggesting that there are $20-12=8$ ways? – user535339 Mar 10 '18 at 22:20
• Your answer is incorrect. There are not $4 \cdot 3$ ways for the two people who sit together. How many ways can the leftmost seat of the pair of seats where the people sit be chosen? How many ways can the person who sits in that seat be chosen? – N. F. Taussig Mar 11 '18 at 0:20