8 athletes are to be lined up for a race. 2 of athletes are from Zambia, and one each from Angola, Botswana, Cameroon, DR Congo, Egypt and Ghana. The two Zambian athletes are not allowed to be next to each other, neither are the Ghanian or Congolese athletes allowed to be next to each other. How many ways can the athletes line up?
2026-04-28 14:19:34.1777385974
On
How many ways can the athletes line up?
284 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Total number of allocations:$8!$. Number of ways to put (e.g. A and B) together: $F_2 = 7 \times6!2!$. Same for the second pair. Obviously we overcounted the cases when both pairs are together: these are $$ F_3 = 2 \times 5 \times 4! \times 2! \times 2! +\\ 5 \times 4 \times 4! \times 2! \times 2! $$ The first line is the case when one of the pairs takes slots 1,2 or 7,8. The second line is for all other cases.
Finally, $8! - 2 \times F2 + F3$ is your solution.
There are $8!$ to arrange athletes without restriction.
There are $2\cdot7!$ was to arrange athletes with the Zambians next to one another.
Also, there are $2\cdot7!$ with the Congolese next to the Ghanaian.
There are $4\cdot 6!$ ways with both the Zambians together and the Congolese next to the Ghanaian.
$8! - 4(7!-6!)$