Erik Olsen/The New York Times

The following classic, which has appeared in a variety of incarnations over the years, was supposedly given its original form by Albert Einstein. The puzzle is often accompanied by a claim that only 2 percent of the world’s population can solve it. Are you a 2 percenter? Give it a try and find out.

Einstein’s Riddle

On a certain road there are five adjacent houses. Each house is a different color. In each house lives a woman of a different nationality. And each of these women has a favorite sport, a favorite beverage, and keeps a particular kind of pet.

The question: Who owns the fish?

The following conditions apply.

The Chinese woman lives in a red house. The American keeps dogs. The Japanese woman drinks tea. The green house is just to the left of the white house. The owner of the green house drinks coffee. The person who swims has a bird. The owner of the yellow house enjoys golf. The woman in the center house drinks milk. The Brazilian lives in the first house. The triathlete has a neighbor who keeps cats. The woman with a horse lives next to the golfer. The basketball player drinks beer. The Indian plays cricket. The Brazilian lives next to the blue house. The triathlete lives next to the water-drinker.

Recap: Boys and Girls



Two weeks ago we took on the family planning conundrum Girls and Boys.

The puzzle: What is the ratio of females to males in a country where couples have children until one is a girl? And what family-planning policy would maximize the proportion of girls in the population?

The solution: 50/50. That is, there will be the same number of females to males. And no family-planning policy would ever influence this ratio.

Before jumping into the solution, let’s acknowledge the remarkable team that made it all happen. In order of appearance: ibabel, CriticalCynic, RJ, Chris, Rich in Atlanta, Hans, Tom E., Gary, Steve Glaser, Ravi, VS, D-Ferg, Patrick C, Giovanni Ciriani, Justin, James, Shawn Cole, Steve Kass, Geoffrey A Landis, Vladimir and RS.

This team produced one of the most interconnected and insightful explorations we’ve seen on Numberplay. The discussion started off, as it usually does, by making short work of the proposed puzzle and its counterintuitive (for most of us besides ibabel) solution. CynicalCritic came in early with formulas blazing:

When compressed to infinite sums (number of children of a particular sex per family), you get: # Girls = Sum(n=1, INF, 1/(2^n))

# Boys = Sum(n=1, INF, (n-1)/(2^n)) Girls clearly converges to 1 (Zeno!), and Boys also converges to 1 after applying L’Hopital’s rule.

For those of us — ahem — who had no idea what that all meant, there was Steve’s Glaser’s approach:

The ratio of girls to boys will always be 50/50. Think of the problem this way. The first “generation” will be half boys and half girls. All of the couples that had a boy will now have a second child. Half of those children will be boys, half will be girls. Now the couples with two boys will have another child. This third “generation” will also be half boys and half girls. And so on.

This more intuitive solution was similar to that favored by Nick McKeown, the Stanford instructor who proposed this puzzle initially. Here’s Professor McKeown:

Consider these boys and girls before they’re born. One might imagine them all up in heaven, waiting to descend, one by one, into various households. What would be the ratio of girls to boys in this group before they start descending? 50/50. And this ratio would be preserved as the children are born regardless of family-planning policy.

As the Numberplay exploration rolled on I found myself intrigued by this distinction between formulas and intuitive explanations. I asked Professor McKeown about his preference and received this response by e-mail:

I like math, and studied with mathematicians for my PhD. “Some of my best friends are mathematicians” as they say. But I tend to think in pictures. If I have a mental image of a problem, the understanding tends to stay with me. My math teachers tended to prove first, then provide intuition/pictures after. I try to teach the other way round by building intuition and understanding first, then nailing it down with equations and formulas.

Equations and intuition. Equations can often be a bit intimidating, but intuition, as reader Gary from D.C. put it so well, can often be wrong. The combination of equations and intuition is what often drives the best Numberplay collaborations. We saw a beautiful balance of equations and intuition in Girls and Boys. Kicking it all off was reader ibabel, whose concise and astute observation captivated the team for the remainder of the week:

On the other hand, if you assume each couple has a possibly different probability p of producing a girl, where p need not be 0.5, it is a different and more interesting problem.

D-Ferg captured the essence of this different and more interesting problem with this early response:

As an exaggerated example, suppose that half of the population has a 75% chance of producing a girl, and the other half has a 25% chance. If everyone has as many children as they want without regard to gender, then there will be a 50/50 split of girls and boys. But what if each family has children until they’ve had one girl? Using Hans’s formula, the 75%-girl families will average 1 girl and 1/.75 – 1 = .333 boys. The 25%-girl families will average 1 girl and 1/.25 – 1 = 3 boys. That’s an overall average of 1.666 boys for every girl. As ibabel pointed out, if you actually want to favor girls, you should use the opposite plan: each family has children until they have a boy. Then the families that produce a higher percentage of girls will have more children, and you’ll get 1.666 girls for every boy.

Notes

Thank you, Nick McKeown, for the personal perspective on problem-solving, and thank you again for the Girls and Boys puzzle. Professor McKeown teaches electrical engineering and computer science at Stanford University. Thank you again to the readers who explored the Girls and Boys puzzle: ibabel, CriticalCynic, RJ, Chris, Rich in Atlanta, Hans, Tom E., Gary, Steve Glaser, Ravi, VS, D-Ferg, Patrick C, Giovanni Ciriani, Justin, James, Shawn Cole, Steve Kass, Geoffrey A Landis, Vladimir and RS. Every comment enriched the discussion in some way. Pradeep Mutalik returns next week.