[Math] Arranging people in a line without specific people at either end

combinatoricspermutations

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

Best Answer

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

Then use inclusion-exclusion for answer
$10! - (9!\times 2 + 9!\times 2) + 8!\times 2 $