Analyzing the Setup
Welcome, future engineers. Today, we are not just solving a permutation problem; we are architects of order. We are looking at a group of 3 girls and 4 boys, and we need to arrange them in a queue.
We have 3 girls (G1,G2,G3) and 4 boys (B1,B2,B3,B4). The rules are clear: all girls must stand together, all boys must stand together, and the two boys B1 and B2 must not be adjacent.
Phase 1
The String Method (Creating the Super-Entities)
Imagine you are the queue manager. To simplify this, we use the 'String Method.' Since all girls must be together, we tie them with an imaginary string and treat them as a single unit, let us call it Unit G.
Similarly, we tie all the boys together into Unit B. Now, instead of worrying about 7 individuals, we only have 2 massive blocks to arrange. This is the beauty of combinatorics—reducing complexity by grouping.
Phase 2
The Macro Arrangement
With our two units, Unit G and Unit B, how many ways can we arrange them? It is a simple binary choice: either the girls stand first, or the boys stand first.
Mathematically, this is 2!=2 ways. We have now set the stage for the entire queue, but we must still account for the internal arrangements of these blocks.
Phase 3
The Internal Dance of the Girls
Inside the girls' block, we have 3 distinct individuals. They can shuffle their positions among themselves in 3! ways.
Every time we arrange the girls, we are creating a unique configuration for the queue.
Phase 4
The Boys' Dilemma (The Core Challenge)
Now, we arrive at the most thrilling part of the problem: the boys. We have 4 boys, but B1 and B2 refuse to stand next to each other. We use the 'Complementary Counting' strategy to solve this.
First, the total unrestricted arrangements for the 4 boys is 4!=24 ways. Now, let us find the forbidden cases where B1 and B2 are together.
If we force B1 and B2 to be together, we treat them as a single mini-unit. Now we have this mini-unit, plus B3, plus B4, giving us 3 entities to arrange:
Within that mini-unit, B1 and B2 can swap places in 2!=2 ways. So, the forbidden arrangements are 6×2=12 ways.
Subtracting the forbidden from the total, we get 24−12=12 valid ways for the boys to stand such that B1 and B2 are separated.
Phase 5
The Final Synthesis
We have all our pieces. The Fundamental Principle of Counting tells us that since these choices are independent, we multiply them. We have the arrangement of the main units (2!), the internal arrangement of the girls (3!), and the valid internal arrangement of the boys (12).
Substituting the values, we get:
There you have it! 144 distinct ways to form this queue. You have successfully navigated the constraints, used the string method, applied complementary counting, and arrived at the solution.