The number of ways, 5 boys and 4 girls can sit in a row so that either all the boys sit together or no two boys sit together, is .
Answer
17280
Solution
The two cases cannot overlap (if all boys are together, two of them are adjacent).
[figure]
Case I: block + 4 girls = 5 units: 5! 5!=14400
Case II: girls first 4!, boys in the 5 gaps 5!: 24 120=2880
Total = 14400+2880=17280
Answer: 17280