# Arranging people in a line without specific people at either end

In how many ways can ten people be arranged in a line if neither of two particular people can sit on either end of the row?

What i thought was find how many ways one particular person must sit at either end then multiply that value by 2 then subtract it from how many ways ten people can be arranged without restriction

• I've noticed that for the past hour or so, you've been posting questions all on elementary combinatorics, with very similar names, showing only your questions, without demonstrating any attempt at finding an answer. Maybe you should put in a little more effort into finding an answer yourself, or at least showing where you have trouble, before posting a question. Also, you should give your questions more specific names to distinguish them. – Kevin Long Dec 20 '16 at 21:23
• Can you clarify what you mean by "if neither of two particular people can sit on either end of the row"? Can I assume that then you have 8 choices in the front end then 7 choices in the back end? – h94 Dec 20 '16 at 21:25
• Does 'two particular people sitting on either end' mean configurations like AxxxxB and BxxxxA only, or also ABxxxx, BAxxxx, xxxxAB and xxxxBA? – CiaPan Dec 20 '16 at 21:25
• Hint: choose a person for the left, choose a person for the right, then permute the remainder. – lulu Dec 20 '16 at 21:29
• As a suggestion for working on problems like these: if you think you have a good method, try it with a smaller collection. In this case, say, suppose you had four people, $A,B,C,D$ and that neither $A$ nor $B$ can be on an end. Now, it is easy to simply list all the cases so you can test your method out. Just asking other people to do it for you is a terrible way to learn anything. – lulu Dec 20 '16 at 21:34

In how many ways can ten people be arranged in a line if neither of two particular people can sit on either end of the row?

Without any restrictions, $10!$ ways you can arrange them

$9!\times 2$ ways where first person is at any end $9!\times 2$ ways where second person is at any end

$8!\times 2$ ways where both persons are at end

$10! - (9!\times 2 + 9!\times 2) + 8!\times 2$
You have $8$ choices for the person sitting on one end (because there are only $8$ people that can be on either end), you have $7$ choices for the person sitting on the other end (because you already put a person on the end and you still can't put two people on the end), and then you have $8!$ for the rest of the people. Your total is therefore $8*7*8!$.