3 Girls and 4 Boys in a Queue, B1 and B2 Not Adjacent to Each Other

Permutations and CombinationsPermutations and CombinationsJEE Main 2025Moderate

JEE Main 2025 — 22 January, Shift 2. Previous Year Question.

Problem

In a group of 3 girls and 4 boys, there are two boys $B_1$ and $B_2$. The number of ways in which these girls and boys can stand in a queue such that all the girls stand together, all the boys stand together, but $B_1$ and $B_2$ are not adjacent to each other, is:

(A) $96$
(B) $144$
(C) $120$
(D) $72$

Key insight. “All girls together” and “all boys together” reduces the problem to arranging just two blocks. The only real work is counting boy-arrangements where $B_1$ and $B_2$ aren’t neighbours — which is easiest found by subtracting the adjacent cases from the total, not by building the non-adjacent cases directly.

Watch this explained step by step →  ·  More on the Shiwam’s Classes channel

Approach

Treat “all girls together” and “all boys together” as two solid blocks first — that fixes the outer structure. Then handle the internal arrangement of each block separately: the girls have no restriction, but the boys need $B_1$ and $B_2$ kept apart, which is most cleanly counted as (all arrangements) minus (arrangements where they are stuck together).

Solution

Step 1 — Arrange the two blocks

The girls-block and the boys-block can be ordered as “girls first, boys second” or “boys first, girls second”:

$$2! = 2 \text{ ways}$$

Step 2 — Arrange the girls within their block

No restriction on the 3 girls, so they can be arranged among themselves in:

$$3! = 6 \text{ ways}$$

Step 3 — Arrange the boys within their block, keeping $B_1$, $B_2$ apart

First count all arrangements of the 4 boys, with no restriction:

$$4! = 24$$

Now count the arrangements where $B_1$ and $B_2$ are adjacent, by gluing them into a single unit. That unit plus the other 2 boys makes 3 items to arrange, and $B_1$, $B_2$ can swap places within their unit:

$$3! \times 2! = 6 \times 2 = 12$$

Subtracting gives the boy-arrangements with $B_1$ and $B_2$ not adjacent:

$$24 – 12 = 12$$

Step 4 — Multiply everything together

$$2 \times 6 \times 12 = 144$$

Answer

$$144$$

Common mistakes

  • Forgetting the factor of $2!$ for which block goes first. It’s easy to arrange the girls and boys internally and forget the queue could start with either group.
  • Trying to directly place $B_1$ and $B_2$ into gaps instead of subtracting. It works, but subtracting “all boy-arrangements” minus “$B_1$, $B_2$ glued together” is faster and less error-prone than counting valid gap positions by hand.

Practise next

  • In a group of 4 girls and 5 boys with two specific girls $G_1, G_2$, count the queue arrangements where all girls stand together, all boys stand together, and $G_1, G_2$ are not adjacent.
Show answer

$2880$. With all girls together and all boys together there are just two blocks, orderable in $2!$ ways.

Inside the girls’ block, the $4$ girls can stand in $4!=24$ orders, of which the ones with $G_1,G_2$ adjacent number $3!\times2!=12$. So $24-12=12$ orders survive.

The boys are unrestricted: $5!=120$. Altogether $2\times12\times120=2880$.

Keep track of what you have finished — create a free account.

Similar Posts

Doubts are answered by Shiwam, usually within a day. Ask about this question specifically — a general question about the chapter is better asked in class.

Ask your doubt

Stuck on this question? Ask Shiwam directly.

A free account lets you post a doubt on any question, keep track of the exercises you have finished, and come back to the answer later.

Create a free accountI already have one