MaxWong

avatar
Nom d'utilisateurMaxWong
But9674
Membership
Stats
Questions 169
Réponses 3812

0
1543
3
avatar+9674 
MaxWong  13 janv. 2019
 #1
avatar+9674 
+3

I'm not CPhill, but I will try to help.

 

We can consider the total number of ways that they can stand in a line (without any extra constraints) and consider the total number of ways that they stand in a line, but no girls are standing next to each other(This is the opposite of what the question asked for).

 

The difference of the two is the answer we want according to Inclusion-Exclusion principle.

 

Also, note that the problem says "Everyone is distinguishable", that means "order matters".

 

Total number of ways that they can stand in a line is the permutation of 9 people, which is \(P^9_9 = 9! = 362880\).

 

Next, we consider the number of ways that they stand in a line, but no girls are standing next to each other.

 

We will first consider the boys first. We have \(P^4_4 = 4! = 24\) ways to arrange the boys into a line.

 

But we haven't considered the girls yet. Now, we can't put two girls between two boys, and we can't put two girls at the front, or at the end. We will consider all the possible spots for the girls to fit inside the queue.

 

In the following diagram, B means boy, and X means an unoccupied space.

 

After we have considered the boy, the queue looks like this:

X B X B X B X B X

 

No two girls can fit into the same X spot, so each girl must go to an unoccupied space.

 

The queue will look like this. (B means boy and G means girl)

 

G B G B G B G B G

 

But we haven't considered the order of the girls. We can arrange their order in \(P^5_5 = 5! = 120\) ways.

 

Multiplying the number of ways of arranging boys and the number of ways of arranging girls:

The number of ways of arranging all of them in a line, with no girls standing next to each other is \(24\times 120 = 2880\) ways.

 

Subtract that from the total number of ways, our required answer is \(P^9_9 - P^4_4 \times P^5_5 = 362880 - 2880 = \boxed{360000}\)

 

There are much more ways to arrange the order of the boys and girls than you think. smiley
I hope this is helpful and easy-to-understand.

15 juin 2020