# Seating problem with boys & girls

Twenty children, some boys, some girls, sit at a round table. Each child wears a blue or a red T-shirt. The right neighbor of each boy wears a blue T-shirt, and the left neighbor of each girl wears a red T-shirt. How many boys can there be?

## work done:

I have showed that only 10 boys or 1 boy by showing the pattern of $$bbg$$ cannot exist as it would mean the boy in the middle would wear a blue and red shirt which can't be . I am trying to show an arrangement like $$ggbggbggbggbggbggbgb$$ will also suffice

• Well, you can show that the pattern $bgg$ can't exist either. – harvey Aug 4 '16 at 5:02
• By "some" do you mean a non-zero quantity? Because as it stands, I can't see why there can't be 20 boys. – Mr. Chip Aug 4 '16 at 5:22
• Yes 👽 i needed to edit my initial post that the sequence of ggb's ** IS NOT ** permissible ( my bad but understood why )( hence a ' typo') – Randin Aug 4 '16 at 7:18

Three possibilities are to have no boys, all boys, or 10 boys alternating with girls.

Number the seats 1-20 clockwise. If the person in seat 1 is a boy, then person 2 wears blue, so person 2 can't wear red, so person 3 can't be a girl. In general, if seat $n$ has a boy, then seat $n+2$ has a boy as well. Similarly, if $n$ has a girl, then $n-2$ has a girl as well. Iterating this argument shows that all odd numbered seats have the same gender, and same for even ones, proving those first three patterns are the only ones possible.

The two conditions can be modelled with sticks. "Right of boy (M) is blue (B) T-shirt" and "left of girl (F) is red (R) T-shirt" are as below:

--B-R--
|/| |\|
M-----F


Now put in a boy:

--B----
|/| | |
M-1----


If I am to extend this configuration, I may put at (1) a girl:

R-B----
|X| | | (A)
M-F-2--


or at (1) a second boy:

--B-B--
|/|/| | (B)
M-M-2--


In (B), I cannot place a girl at (2) because it contradicts the second boy's T-shirt colour. Therefore I must place a third boy:

--B-B-B
|/|/|/|
M-M-M--


and I am forced to continue this pattern right around the circle, whereupon I have 20 boys, all wearing blue shirts.

In (A) I must place a boy at (2), since placing a girl there would again introduce a contradiction:

R-B---B
|X| |/| (C)
M-F-M-3


and if I now place a boy at (3) I am forced around the circle like (B):

|   20 seats    |
R-B---B-B...B-B-B-R-B
|X| |/|/|...|/|/| |X|
M-F-M-M-M...M-M-4-M-F


But then (4) cannot be assigned boy or girl – another contradiction. Thus I must place a girl at (3) in (C):

R-B-R-B
|X| |X|
M-F-M-F


Inductively, I have the same conditions as (A), but with two fewer seats. Hence I must continue the pattern, and I end up with 10 boys with red shirts and 10 girls with blue shirts alternating.

This, of course, assumes you have at least one boy; you could also have 20 girls with red shirts around the table. (This is just the 20-boys solution with "boy" replaced by "girl" and "blue" by "red".)

The number of boys can thus be only 0, 10 or 20.

$1$: If there exists a boy with a blue t-shirt, then the right neighbour of this boy must be a boy with blue t-shirt again ( it cannot be a girl because the left neighbour has a blue t-shirt). Continuing this process, you will obtain 20 boys.

$2$: If there exists a girl with a red t-shirt, then the left neighbor of this girl must be a girl with red T-shirt again (it cannot be a boy because the right neighbour has a red t-shirt). Continuing this process, you will obtain 20 girls.

$3$: Let there exist at least one boy with a red T-shirt (in this instance, we know that there does not exist any boy with a blue t-shirt; see $1$). The neighbour to the right of this boy must be a girl with a blue t-shirt and the neighbour to the right of this girl must be a boy with a red t-shirt. Continuing this process, you will obtain ten boys with red t-shirts and ten girls with blue t-shirts.

So the number of boys can be $0$ or $10$ or $20$

The two combinations that can be safely ruled out of consideration are $$bbg$$ and $$bgg$$. This is because:

1) If $$bgg$$, then the girl in the middle is the right neighbor of a boy and the left neighbor of a girl and can wear a t shirt of only one colour.

2) If $$bbg$$, then the boy in the middle is the right neighbor of a boy and the left neighbor of a girl and can wear a t shirt of only one colour.

This also rules out possibilities like $$b....bg$$, and $$bg....g$$, where the dots indicate recurrence of boy/girl.

There are two clear possbilities:

1) There are no boys.

2) All the people are boys.

The third possibility means that both genders have to mix somewhere. Without loss of generality, suppose $$bg$$ happens in this sequence. Note that $$bgg$$ cannot happen as above, and hence we must have $$bgb$$. Now, two cases arise:

1) $$bgbg$$ : makes sense

2) $$bgbb$$ : now, a girl cannot come at all! Because if a girl comes after some point, it will become $$bgb...bg$$, which is not allowed. If there are no more girls, then because the table is round, the one girl who is left will be sitting between two boys and that leaves the boy on her left in trouble.

The same logic with a $$gb$$ happens .Note that $$gbb$$ cannot happen as in case 2) of above, and hence we must have $$gbg$$. Now, two cases arise:

1) $$gbgb$$ : makes sense

2) $$gbgg$$ : now, a boy cannot come at all! Because if a boy comes after some point, it will become $$gbg...gb$$, which is not allowed. If there are no more boys, then because the table is round, the one boy who is left will be sitting between two girls and that leaves the girl on his right in trouble.

Hence, $$20,10$$, or $$0$$ boys make the list.

• But by the ** wording ** of this problem : " SOME " boys and "SOME" girls means by logic at least one of each ! so the answers above and below of all boys (20) are wrong . And my proof thus shows 10 is only answer – Randin Aug 4 '16 at 7:23
• I'm sorry, I was not sure if "some" is necessarily non-zero. You should still specify it, because it makes questions easier to comprehend. Besides, I covered the important case, and as your analysis shows, you are correct. – астон вілла олоф мэллбэрг Aug 4 '16 at 9:27