GeekDad Puzzle of the Week Solution: When Are the Odds Even?

Geek Culture

The GeekDad Puzzle of the Week from this past week was solved by most using some straightforward snippets of code. While no one was disqualified for claiming to have checked all 1,000,000+ possibilities by hand, most every did admit (brag?) about the code they wrote.

Here’s the puzzle as posted:

If we have a bag containing equal numbers of black and white marbles, and we pull out one marble, the odds of it being black are even. If we have a bag containing 120 marbles, 85 of which are black, the odds of us pulling out two marbles and them both being black is also even — (85/120)x(84/119) = 0.5 or 50%.

If the largest bag we have can hold 1,000,000 marbles, for how many sets of marbles (i.e., the 120 marbles described above are one set) can we pull two marbles and have a 50% chance of them being the same? Are there any sets of marbles for which we can pull three marbles and have a 50% chance of them being the same? If so, how many?

It turns out that there are 8 sets of marbles in a bag that provide 50/50 odds of the first two balls being pulled out being black:

3 black marbles in a bag of 4
15 black marbles in a bag of 21
85 black marbles in a bag of 120
493 black marbles in a bag of 697
2871 black marbles in a bag of 4060
16731 black marbles in a bag of 23661
97513 black marbles in a bag of 137904
568345 black marbles in a bag of 803761

Within the constraints of the problem (under 1,000,000), there is only one set of marbles in a bag that provides 50/50 odds of the first three balls being pulled out being black:

5 black marbles in a bag of 6

Congratulations to Thom Walker for submitting a correct solution to this week’s puzzle. He will soon be the proud owner of a $50 ThinkGeek Gift Certificate. If you are shopping for a belated Father’s Day gift (Happy Fathers’ Day, everyone!) or just looking for great gifts and/or toys, please use the discount code GEEKDAD68JH to get $10 off a $50 ThinkGeek order.

Liked it? Take a second to support GeekDad and GeekMom on Patreon!
Become a patron at Patreon!