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
All boys together: treat the 5 boys as one block. Arranging this block with the 4 girls gives arrangements, and the boys within the block can be arranged in ways:
No two boys together: first arrange the 4 girls in ways, creating 5 gaps (before, between, and after the girls). Placing the 5 boys into these 5 gaps, one per gap, is done in ways:
The two cases are mutually exclusive, so the total number of arrangements is
No two boys together: first arrange the 4 girls in ways, creating 5 gaps (before, between, and after the girls). Placing the 5 boys into these 5 gaps, one per gap, is done in ways:
The two cases are mutually exclusive, so the total number of arrangements is
JEE Main · 2025 · 23 Jan 2025 · Shift 2 · Integer answer