How many different ways are possible to arrange 2 girls and three boys on a bench of five, so that at least 2 boys will seat next to each other?

Dear StackExchange dwellers,

Do you have any idea why this isn't 84? The answer gives: The only way to arrange the five people on the bench, without having two boys seating next to each other is: B-G-B-G-B (when, B-Boy, G-Girl). The number of ways to arrange the students as requested is: (All options) - (This specific option) = 5! - (2! x 3!) = 120 - (2 x 6) = 120-12 = 108. Notice that in that "specific option" the internal order of the Boys and of the Girls may differ, so there are (2! x 3!) options to subtract. In the "specific option": 2! represents the girls' possible arrangements and 3! represents the boys' possible arrangements.

But what about? Ways 3 boys sit next to each other (3!*3!) + Ways 2 boys sit next to each other (4!*2) = 84

• in way $2$ what if you put the other boy by the side of the collapsed group of $2$ boys? – Phicar Jun 15 '17 at 22:10
• It says 'at least 2 boys', that includes 3 – Alex Jun 15 '17 at 22:15
• Why do you think "Ways 2 boys sit next to each other" is (4!x2)? It isn't. And I don't understand why you think it does. – fleablood Jun 15 '17 at 22:42

Once you've picked two specific boys to sit together, there are indeed $4!\cdot2=48$ arrangements that have those two specific boys sitting together. However, there are ${3\choose2}=3$ ways to choose two specific boys, which gives a count of $3\cdot4!\cdot2=144$ arrangements. This is too big because it double counts the arrangements where all three boys are sitting together. (That is, if an arrangement has Al, Bob, and Charlie sitting in that order, it'll be counted once with Al and Bob as the specified pair and once with Bob and Charlie as the specified pair.). So you need to subtract the number of arrangements in which all three boys sit next to each other, which indeed is $3!3!$. This gives the correct answer,

$$3\cdot4!\cdot2-3!3!=144-36=108$$

Then number of ways for three boys to sit next to each other = number of ways to arrange three boys in a row x number of ways places to place the frist boy x number of ways to place the girls = $3!*3*2 = 36$

Number of ways for two boys to sit next to each other and one boy not to = number of ways to choose the boy that sits apart x number of ways to arrange the two boys that are next to each other x the ways to arrange the girls x times ways to position the three boys = $3*2*2 *$ |{two boys on far left and boy in position 4, two boys on far left and boy in position 5, two boys in positions 2 and 3 boy in position 5, two boys in positions 3 and 4 and boy in position 1, two boys on far right and boy in position 2, two boys on far right and boy in position 1}| =$12 *6 = 72 \ne 4!2$.

So Ways three boys sit next to each other + ways two boys sit next to each other = $36 + 72 = 108$.

====

You error was two fold. In assuming the two boys next to each other become a "glued together person" and there are two ways to determine which is on the left and which is on there right so there are two ways to "glue them together", you didn't take into account that there are $3$ ways to chose which two boys are glues together. So the $2$ instead of $3*2$ undercounts. But you didn't rule out what happens when the third boy sits next to the glued together boy. So that would have overcounted.

So we could do: Number ways to seat a "glued pair" = $6*4!= 144$. But we must take into account $A (BC \text{glued together}) = (AB \text{glued together}) C$. So that double counts three boys sitting together. So Answer is Ways 2 boys can be glued together - Ways 3 boys can be glued together = $6*4! - 3!*3! = 144 - 36 = 108$.

And one more:

Bench; (1, 2, 3, 4, 5).

The only way that no 2 boys are sitting next to each other:

The 2 girls are sitting in spot 2 and 4., I.e.

(B, G, B, G, B) .

Counting the number of ways this can happen:

There are 2! ways for the 2 girls to occupy spots 2 and 4.

There are 3! ways for the 3 boys to occupy spots 1,3 and 5.

Altogether: There are 2!×3! ways.

Total number of ways for 5 people to occupy the bench: 5! .

Number of ways that at least 2 boys sit next to each other:

5! - 2!×3! = 120 - 12 = 108.

So in your option, you want to look at $\#(\text{ ways 3 boys }) + \#(\text{ ways exactly 2 boys })$, and this is indeed a valid way of doing the calculation. However, your mistake comes from when you individually sit to calculate both these quantities.

For all 3 sitting next to each other, we have 3 possibilities, BBBGG, GBBBG, GGBBB. Now for each possibility we have $3!2!$ options ($3!$ for order of boys and $2!$ for girls), so we do indeed have $3 \times 3!2! = 36$ ways.

For all of exactly 2 boys sitting next to each other, we will have the following possibilities: BBGBG, BBGGB, BGBBG, BGGBB, GBBGB, GBGBB. Now again, we have $3!2!$ ways to order boys and girls for each option. In total, we have $6 \times 3!2! = 72$ ways. [This is where the error is]

I'm personally interested in how you thought it was $4!2$ ways, could you please comment on this with your reasoning.

• From this, you should also be able to see why the answer of inclusion-exclusion is far more slick, especially for such a problem. – mdave16 Jun 15 '17 at 22:32