In a row of $40$ kids, $22$ are sitting next to girls and $30$ are sitting next to boys. How many girls are there?

803 Views Asked by At

There are $40$ kids sitting in a row. Number of kids sitting next to girls is 22, Number of kids sitting next to boys is 30. How many girls are sitting in a row?

This is a problem from my brother's 6th grade homework. I've tried to solve it by considering easier cases and going from there, but couldn't really see the general pattern. Is there an easy solution that a 6th grader can understand?

6

There are 6 best solutions below

0
On

If they were sitting in a circle there would be a "simple" (though in fact requiring a very sophisticated level of thinking) solution, as follows.

There are $22$ kids sitting next to girls and $30$ sitting next to boys. Therefore there are $22+30-40=12$ sitting next to girls and boys, $10$ sitting next to only girls and $18$ sitting next to only boys.
Now let everyone hold hands in the circle. $12$ people are holding one girl's hand and $10$ are holding two girls' hands. Therefore there are $12+2\times10=32$ girls' hands, and so $16$ girls in total.

Unfortunately having a row, rather than a circle, breaks this argument, since there are two people only using one hand, and they could be boys or girls, and they could be next to boys or girls (messing up the counting in two ways). I don't see a good reason why there is a unique answer in this case.

2
On

Hint: consider the case when the $\text{Number of girls} = \text{Number of boys}$, and they are aligned like this:
$G_{1}, B_{1}, G_{2}, B_{2}, ..., G_{19}, B_{19}, G_{20}, B_{20}$

We need to keep track of 4 properties:

  1. $\text{Number of girls: } 20$
  2. $\text{Number of boys: } 20$
  3. $\text{Kids sitting next to girls: } 20$
  4. $\text{Kids sitting next to boys: } 20$

the latter 2 comes from the fact that each kid has the same type of neighbour.
As $\text{Kids sitting next to girls}$ and $\text{Kids sitting next to boys}$ are not per specified, we need to change $\text{Number of girls}$ and/or $\text{Number of boys}$ by replacing one with the other. We need to know, when we do this replacement, how it changes the above 4 properties if

  1. the kid is at the end of the row
  2. the kid is not at the end of the row

These can be written up with formulas, and then we can calculate which and how many replacements lead to the specification.

0
On

Divide the kids into three categories: $g$ kids not sitting next to any boy, $b$ kids not sitting next to any girl, and $n$ kids sitting next to both. It’s not hard to determine that $n=12$ and hence that $g=10$ and $b=18$. Now imagine that we wrap the row around into a circle, so that the kids on the two ends are now sitting next to each other; what are the possible changes in $g,b$, and $n$?

An end child who was sitting next to a girl can now be between two girls or between a girl and a boy; the first possibility does not change any of the quantities, and the second decreases $g$ by $1$ and increases $n$ by $1$. Similarly, an end child who was sitting next to a boy can now be between two boys or between a girl and a boy, the first possibility resulting in no change and the second in an increase of $n$ by $1$ at the expense of $b$. The following possibilities therefore exist:

  • no change in $g,b$, and $n$ (e.g., a row of the form $GG\ldots GG$);
  • $n$ increased by $1$ at the expense of $g$ (e.g., a row of the form $BG\ldots GG$);
  • $n$ increased by $1$ at the expense of $b$ (e.g., a row of the form $GB\ldots BB$);
  • $n$ increased by $2$ at the expense of $g$ (e.g., a row of the form $BG\ldots GB$);
  • $n$ increased by $2$ at the expense of $b$ (e.g., a row of the form $GB\ldots BG$); and
  • $n$ increased by $2$ and each of $g$ and $b$ decreased by $1$ (e.g., a row of the form $BB\ldots GG$);

In short, after we close the circle the possible values of the triple $\langle g,b,n\rangle$ are $\langle 10,18,12\rangle$, $\langle 9,18,13\rangle$, $\langle 10,17,13\rangle$, $\langle 8,18,14\rangle$, $\langle 10,16,14\rangle$, and $\langle 9,17,14\rangle$.

As in Especially Lime’s answer we now have the kids hold hands around the circle; $g$ kids are each holding two girls’s hands, and $n$ are each holding one girl’s hand for a total of $2g+n$ hands and therefore $g+\frac{n}2$ girls in the row. In particular, $n$ must be even, so we can rule out the second and third possibilities above. The remaining four yield $16,15,17$, and $16$ for the number of girls, so unless some of them can be ruled out by consideration of the internal structure of the row of kids, the question does not have a unique answer.

0
On

I think I have solved it in one way, but it is like playing chess, and not really a proof.
Consider an initial 20 girls and 20 boys, all in one group next to each other:
$G_1, G_2, ..., G_{19}, G_{20}, B_1, B_2, ..., B_{19}, B_{20}$

Now all girls have only girl neighbours except for one, which have also a boy, and the same the other way round, so
Kids next to girls: 20 + 1 = 21
Kids next to boys: 20 + 1 = 21

Now let's examine the operation of replacing a girl with a boy at the middle. First we remove a girl, now it would be $G_{20}$, which causes one girl, $G_{19}$ and one boy, $B_1$, to have a girl neighbour less. However, as $G_{19}$ has another girl neighbour, it only changes the "next-to" properties for $B_1$:
Kids next to girls: 21 - 1 = 20
Kids next to boys: = 21

Next we insert a boy in place of the removed girl, which causes $G_{19}$ and $B_1$ to have a boy neighbour more. However, as $B_1$ has another boy neighbour, it only changes the "next-to" properties for $G_{19}$:
Kids next to girls: 20
Kids next to boys: 21 + 1 = 22

So the operation of replacing a girl with a boy at the middle causes the following changes:
Kids next to girls: -1
Kids next to boys: +1
Number of girls: -1
Number of boys: +1

Let's repeat this operation 4 times, so we have
Kids next to girls: 21 - 4 = 17
Kids next to boys: 21 + 4 = 25
Number of girls: 20 - 4 = 16
Number of boys: 20 + 4 = 24
$G_1, G_2, ..., G_{15}, G_{16}, B_1, B_2, ..., B_{23}, B_{24}$

Now let's examine what happens, when we swap the 2 ends, i.e. $G_1$ and $B_{20}$:
Before: $G_1, G_2, G_3, ..., B_{18}, B_{19}, B_{20}$
After: $B_{20}, G_2, G_3, ..., B_{18}, B_{19}, G_1$
$B_{20}$ had originally a boy neighbour, and $G_1$ a girl neighbour, which have turned the other way round, while $G_2$ and $B_{19}$ still have their same type of neighbour and a new type.

So the operation of swapping the 2 ends causes the following changes:
Kids next to girls: +1
Kids next to boys: +1
Number of girls: +0
Number of boys: +0

After doing this operation we have
Kids next to girls: 17 + 1 = 18
Kids next to boys: 25 + 2 = 26
Number of girls: 16 + 0 = 16
Number of boys: 24 + 0 = 24
$B_{24}, G_2, ..., G_{15}, G_{16}, B_1, B_2, ..., B_{23}, G_1$

Now let's examine what happens, when we swap a girl with a boy who both have 2 neighbours of the same type on both sides, e.g. $G_4$ and $B_{17}$:
Before: $G_2, G_3, G_4, G_5, G_6, ..., B_{15}, B_{16}, B_{17}, B_{18}, B_{19}$
After: $G_2, G_3, B_{17}, G_5, G_6, ..., B_{15}, B_{16}, G_4, B_{18}, B_{19}$
$B_{17}$ had originally only boy neighbours, and $G_4$ only girl neighbours, which have turned the other way round, while $G_3$ and $G_5$, and $B_{16}$ and $B_{18}$ still have their same type of neighbour and a new type.

So the operation of swapping a girl with a boy who both have 2 neighbours of the same type on both sides causes the following changes:
Kids next to girls: +2
Kids next to boys: +2
Number of girls: +0
Number of boys: +0

After doing this operation we have
Kids next to girls: 18 + 2 = 20
Kids next to boys: 26 + 2 = 28
Number of girls: 16 + 0 = 16
Number of boys: 24 + 0 = 24
$B_{24}, G_2, G_3, B_{17}, G_5, G_6, ..., G_{15}, G_{16}, B_1, B_2, ..., B_{15}, B_{16}, G_4, B_{18}, B_{19}, G_1$

We can repeat the same operation with $G_7$ and $B_{14}$, and we are done:
Kids next to girls: 20 + 2 = 22
Kids next to boys: 28 + 2 = 30
Number of girls: 16 + 0 = 16
Number of boys: 24 + 0 = 24
$B_{24}, G_2, G_3, B_{17}, G_5, G_6, B_{14}, G_7, G_8,..., G_{15}, G_{16}, B_1, B_2, ..., B_{12}, B_{13}, G_7, B_{15}, B_{16}, G_4, B_{18}, B_{19}, G_1$

2
On

No, I'm sorry for the ambiguity (I translated this problem). If there's at least one girl sitting next to me, that means that i'm sitting next to a girl. That's what's meant.

This comment from OP seems to change the interpretation of the question a little with 'at least' being included - it would read more like:

There are 40 kids sitting in a row. The number of kids sitting next to at least one girl is 22, and the number of kids sitting next to at least one boy is 30. How many girls are sitting in a row?

It'd also be good to confirm whether the final question is referring to the number of girls sitting in 'a row', as in directly next to other girls, or in the row entirely

This seems like an easier problem to solve - we now have four pieces of information:

  1. 22 kids are sitting next to at least one girl
  2. 18 kids are not sitting next to any girls
  3. 30 kids are sitting next to at least one boy
  4. 10 kids are not sitting next to any boys

Let's build a 'row' with 40 slots using b for Boys, g for Girls, and X for not yet filled:

{X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X}

Start with the groups of kids who are only sitting next to kids of the same gender - 18 boys not next to any girls, and 10 girls not next to any boys. Put those groups at either end of the row:

{b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,X,X,X,X,X,X,X,X,X,X,X,X,g,g,g,g,g,g,g,g,g,g}

For those people to definitely fit into the 'only sits with same gender' groups, you need an extra 'buffer' boy and girl at the end of each of those groups:

{b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,X,X,X,X,X,X,X,X,X,X,g,g,g,g,g,g,g,g,g,g,g}

This satisfies conditions 2 and 4, so we need to address conditions 1 and 3. With the kids already placed, we have 11 kids who are sitting next to at least one girl (all of the girls), and 19 kids who are sitting next to at least one boy (all of the boys). We need another 22 - 11 = 11 kids sitting next to at least one girl, and 30 - 19 = 11 kids sitting next to at least one boy.

We have 10 empty slots still to fill. By filling these with alternating boys and girls we add an extra 10 kids to each category, and we also convert each of the two 'buffer' kids from earlier to be sitting next to one of each gender.

{b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,g,b,g,b,g,b,g,b,g,b,g,g,g,g,g,g,g,g,g,g,g}

This satisfies all 4 conditions, and gives us a total of 16 girls in the entire row, or 11 girls sitting in a row.

Feel free to edit with an actual proof, this was really just a simple step-by-step 'trial and error' style solution, using my first assumption at each step, that turned out to work - but I'd assume that that's probably what was expected for a sixth-grade student.

0
On

The simplest (for a 6-th grade ?) didactical approach I can think of would develop through the following stages.
Here I am summarizing them in "adult" terms.

a) Consider the following four building blocks and associated table $$ \matrix{ {K_{\,n,\,0} = B_{\,n} = \left( {B,B, \ldots ,B} \right)} & {K_{\,0,\,n} = G_{\,n} = \overline {K_{\,n,\,0} } = \left( {G,G, \ldots ,G} \right)} \cr {\left[ {\matrix{ {Kids\,near\;Girls} & 0 \cr {Kids\,near\;Boys} & n \cr {Boys} & n \cr {Girls} & 0 \cr } } \right]} & {\left[ {\matrix{ {Kids\,near\;Girls} & n \cr {Kids\,near\;Boys} & 0 \cr {Boys} & 0 \cr {Girls} & n \cr } } \right]} \cr {} & {} \cr {K_{\,n - 1,\,1} = \left( {B, \ldots ,B,G} \right)} & {K_{\,1,\,n - 1} = \overline {K_{\,n - 1,\,1} } = \left( {B,G, \ldots ,G} \right)} \cr {\left[ {\matrix{ {Kids\,near\;Girls} & 1 \cr {Kids\,near\;Boys} & n \cr {Boys} & {n - 1} \cr {Girls} & 1 \cr } } \right]} & {\left[ {\matrix{ {Kids\,near\;Girls} & n \cr {Kids\,near\;Boys} & 1 \cr {Boys} & 1 \cr {Girls} & {n - 1} \cr } } \right]} \cr } $$

  • make clear that joining such blocks any row sequence of boys/ girls can be composed,
  • explore the rules of composition of the joint table from the starting ones;
  • emphasize how for instance the number of kids sitting near to girls pass from a minimum of $g$ (the number of girls), to $2g$ (couples $(GB)$) and up to the maximum $3g$ (triples $(BGB)$) and correspondent number of boys, etc. ;
  • explore the inverse rules for decomposing a table;

b) Move down to consider just the elementary blocks $B$ and $G$, and repeat the above exploring about table composition for a sequence $B^{m_1},\, G^{n_1}, \, B^{m_2}, \; \cdots$ $$ \eqalign{ & \matrix{ {B^{\,m_{\,1} } } \cr {\left[ {\matrix{ {Kg} & 0 \cr {Kb} & {m_{\,1} } \cr B & {m_{\,1} } \cr G & 0 \cr {E = Kg + Kb - B - G} & 0 \cr } } \right]} \cr } \matrix{ {G^{\,n_{\,1} } } \cr {\left[ {\matrix{{Kg} & {n_{\,1} } \cr {Kb} & 0 \cr B & 0 \cr G & {n_{\,1} } \cr E & 0 \cr } } \right]} \cr } \Rightarrow \matrix{ {B^{\,m_{\,1} } G^{\,n_{\,1} } } \cr {\left[ {\matrix{{Kg} & {n_{\,1} + 1} \cr {Kb} & {m_{\,1} + 1} \cr B & {m_{\,1} } \cr G & {n_{\,1} } \cr E & 2 \cr } } \right]} \cr } \Rightarrow \cr & \Rightarrow \matrix{ {B^{\,m_{\,1} } G^{\,n_{\,1} } B^{\,m_{\,2} } } \cr {\left[ {\matrix{ {Kg} & {n_{\,1} + 2} \cr {Kb} & {m_{\,1} + m_{\,2} + 1 + \left[ {2 \le n_{\,1} } \right]} \cr B & {m_{\,1} + m_{\,2} } \cr G & {n_{\,1} } \cr E & {3 + \left[ {2 \le n_{\,1} } \right]} \cr } } \right]} \cr } \Rightarrow \matrix{ {G^{\,1} B^{\,m_{\,1} } G^{\,1} } \cr {\left[ {\matrix{ {Kg} & {1 + \left[ {2 \le m_{\,1} } \right]} \cr {Kb} & {m_{\,1} + 2} \cr B & {m_{\,1} } \cr G & 2 \cr E & {1 + \left[ {2 \le m_{\,1} } \right]} \cr } } \right]} \cr } \Rightarrow \cr & \matrix{ {B^{\,m_{\,1} } G^{\,n_{\,1} } B^{\,m_{\,2} } G^{\,n_{\,2} } } \cr { \Rightarrow \left[ {\matrix{ {Kg} & {n_{\,1} + \,n_{\,2} + 2 + \left[ {2 \le m_{\,2} } \right]} \cr {Kb} & {m_{\,1} + m_{\,2} + 2 + \left[ {2 \le n_{\,1} } \right]} \cr B & {m_{\,1} + m_{\,2} } \cr G & {n_{\,1} + \,n_{\,2} } \cr E & {4 + \left[ {2 \le n_{\,1} } \right] + \left[ {2 \le m_{\,2} } \right]} \cr } } \right]} \cr } \cr} $$ where $[P]$ denotes the Iverson bracket

c)With the building blocks above we should reach to be able to solve the problem at hand.