In how many ways can 8 people be seated in a row if
(a) there are no restrictions on the seating arrangement?
(b) persons A and B must sit next to each other?
(c) there are 4 men and 4 women and no 2 men or 2 women can sit next to each other?
(d) there are 5 men and they must sit next to each other?
(e) there are 4 married couples and each couple must sit together?
part (b) Persons A and B can occupy 7 different positions and can be ordered in 2! ways, the rest of the people can occupy 6! positions,
$$7 \cdot 2! \cdot 6! =10080$$
We have to alternate men and women in this case, starting with either a man or a woman and so we multiply by 2 and can order the men 4! ways and the women 4! ways,
$$2 \cdot 4! \cdot 4! = 1152$$
If 5 men must sit next to each other they can only occupy 4 different spaces, the men can be ordered in 5! ways, and the remaining women can be ordered in 3! ways,
$$4 \cdot 5! \cdot 3!=2880$$
The married couples can be ordered in 4! ways and each couple can be ordered in 2! ways,
Surround your text in
**bold**, to write a math equation use, for example,