Mathematics · Permutations and Combinations

JEE Main 2025 — 23 Jan — Evening Shift — Question 21

The number of ways in which 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

Numerical answer — enter this value.

Step-by-step solution

All boys together: treat the 5 boys as one block, so arrange 5 units (the block + 4 girls) in 5!5! ways.

Arrange the 5 boys inside the block in 5!5! ways: 5!×5!=144005!\times5!=14400.

No two boys together: first arrange the 4 girls in 4!4! ways.

The 4 girls create 5 gaps, and all 5 gaps must be filled by one boy each in 5!5! ways: 4!×5!=28804!\times5!=2880.

The two cases are mutually exclusive, so add them.

Total =14400+2880=17280=14400+2880=17280.

Answer: 17280

Answer key and solution verified before publishing.

Practise Permutations and Combinations

Start with this question, then two more from the same chapter — with a tutor that explains every step. Free.

Exam
JEE Main 2025
Subject
Mathematics
Chapter
Permutations and Combinations
Topic
Applications of Permuations and Combination