Can you solve the seemingly impossible number of girls puzzle?

Originally published at: Can you solve the seemingly impossible number of girls puzzle? | Boing Boing

2 Likes

And people claim that there’s no use for algebra once we graduate from high school???
(It’s a nice little algebra problem, I enjoy these now and then to keep my brain from getting rusty in my engineering job that requires no math AT ALL.)

16 Likes

That’s a fun puzzle. I ended up solving it by finding the same equation they did, but I graphed it and looked at the values where x and y were both integers on the graph and found the one where they added together to be a multiple of 3. Pretty much the same thing they did.

7 Likes

Not going to spoil it exactly in the very first comment, but…

You can do some algebra to get a pretty simple equation with two unknowns. In the absence of other constraints, this’d leave a linear graph of correct answers.

But there are a few additional constraints to keep in mind; by one way of looking at it, the number of girls is >= 0, there cannot be more girls than students overall, and both quantities are whole numbers. And furthermore the “students overall” number must be evenly divisible by 3. This leaves only one possible correct choice.

But this all also makes one further assumption of a gender binary. Since nothing was said about the number of books any nonbinary students took home, I assume that these students brought 0 home, but any teddy bears they brought along would have brought home the 9 books as described. So an answer like “there is 1 girl in the class, 0 boys, and 95 gender-nonbinary children” is entirely valid.

9 Likes

I got the “right” answer, but in a completely different way than the video. oh well

4 Likes

Hmm, based on the text, this is unsolvable without making some assumptions. The 1/3 of the class bringing teddy bears is not specified to be evenly divided among b/g. Therefore, you can only assume what the ratio is when, strictly based on the information presented, it could be only boys who brought teddy bears.

1 Like

Why is this hard?? Took me like 2 minutes with some 5th grade algebra and a little bit of thought.

2 Likes

The other assumption is that all numbers are integers. That constrains it sufficiently.

10 Likes

The answer is 8. One of the bears was a girl.

Thinking Think GIF by Rodney Dangerfield

7 Likes

on average, each student takes 3 extra books

1 Like

Teddy bears bring home the same number of books regardless of whether a girl or a boy brought them to school.

If you didn’t feel like doing any algebra, you could solve this with brute force. If all the students were girls, what’s the maximum possible number of students? Now count down, removing one girl and adding some number of boys and teddy bears at each step, until you find a solution.

Solution

7 girls and 11 boys brought 6 teddy bears.
7 x 17 + 11 x 12 + 6 x 9 = 305.

6 = (7+11)/3

5 Likes

sad lazy coder’s solution:

for B in range(306):
     for G in range(306):
         if 12*B + 17*G + 3*(B + G) == 305:
             print(B,G,(B+G)/3.0)

3 13 5.33…
7 10 5.66…
11 7 6.0
15 4 6.33…
19 1 6.66…

and since the number of Teddy Bears ought to be a positive integer
the middle solution wins [kermit arms]

8 Likes

At no point in the solution is which specific students brought the bears, or what their gender is, relevant. 1/3 of the students brought bears. So the number of students needs to be evenly divisible by 3 because we can’t have fractional teddy bears.

8 Likes

As usual with problems like this, I expected to see a more elegant solution than the brute-force method I employed, but the solution in the video was the same as mine. Vindication!

5 Likes

Try telling that to the dog.

12 Likes

That’s exactly how I did it. I didn’t see any comment saying only girls brought them (which surprised me in the video ‘answer’). Solves very quickly this way.

I mean, both my son and daughter have stuffed animals and they are cis normal. My granddaughter’s school has “stuffed animal, blanket, and pajama” days every month and every single one of the kids has a stuffie with them. Heck, I’m an over half a century old male and I still have the stuffed animal I was given in 3rd grade for straight A’s.

Impossible number is only if you assign unlisted arbitrary constraints to it.

3 Likes

All of the Teddy Bears were mine; I took them along to protect me from bullies, keep me company in playground, and so I could take a load of extra books home. I don’t know why, but Teacher gave me a sad little smile when I explained this.

4 Likes

I hope you had a picnic!

1 Like

Are bags of holding real now–how the hell are these kids carrying 21/26 books and a teddy bear?

2 Likes

In Miss O’s class, 1/3 of the students brought a teddy bear to school. Each boy took 12 books, each girl took 17 books, and each teddy bear took 9 books. A total of 305 books were taken out. How many girls were there in Miss Q’s class?

Knowing what happened in Miss O’s class tells me nothing about what happened in Miss Q’s class. The problem is unsolvable.

15 Likes