How Many Ways Can 7 Girls and 3 Boys Sit on a Bench with Each Boy Next to a Girl?

combinatorics

In how many ways can $7$ girls and $3$ boys sit on a bench in such a way that every boy sits next to at least one girl

The answer is supposedly $1,693,440 + 423,360 = 2,116,800$

Best Answer

$7$ girls can be seated in $7!=5040$ ways. Each seating creates six inner slots where one or two boys can be placed, and two end slots where at most one boy can be placed.

When no two boys shall sit together we can place them in $8\cdot 7\cdot6=336$ ways in the eight slots ($8$ choices for the first boy, $7$ remaining for the second, and $6$ for the third).

When two boys shall sit together we can choose any of the $6$ inner slots for them. Then we can pick the lefthand one of the two in $3$ ways, the righthand one in $2$ ways. Finally we can choose any of the $7$ leftover slots for the third boy. In all we have $6\cdot3\cdot2\cdot 7=252$ possibilities for such an arrangement.

It follows that the total number of admissible seatings is given by $$5040\cdot(336+252)=2\,963\,520\ .$$