Monday, November 12, 2007

Puzzles

A while ago I came across a website purporting to list Google job interview questions, all of the brain teaser variety. I thought some of them were unlikely to appear in an actual interview as they've been kicking around for quite a while, but it revived in me a fascination with puzzles and brain teasers, and got me thinking about the different types and qualities of puzzles there are. I've decided to make something of a Monday tradition of presenting different puzzles and their solutions, for at least the next several Mondays.

Boy Country

In a country where people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?

Crazy Guy on a Plane

100 airline passengers are waiting to board a plane. They each hold a ticket to one of the 100 seats on the flight. (It doesn't matter, but imagine the first person has ticket #1, and so on.) The first person in line is crazy, and will select a seat at random, possibly even his own. Every person after him will sit in their own seat if it's available, and pick a random one if it isn't. You are the 100th person. What are your chances of getting your own seat?


These puzzles are both fine examples of what puzzles should be, in my opinion, because they fit three important criteria:
  • The solution is interesting, because it's not what you expected and/or simpler than you expected
  • Finding the solution requires only reasoning ability, not knowledge of higher mathematics
  • It's not "tricky" in the sense that the solver has to make any less-than-obvious assumptions ("you can melt the ice", "turn the sweater inside out", etc.)
Boy Country
SOLUTION


Using simple reasoning and no mathematics at all, you should be able to convince yourself that this birthing strategy does nothing to alter the natural gender ratio of 50/50 (or 51/49, according to some sources). Families have children. Some are girls, some are boys. Some families continue having children, some don't. As more babies are born, some are girls, some are boys. And so on.

If you're not convinced, consider 64 families. On average, 32 firstborns are boys, and 32 firstborns are girls. Some nine months or more later, 32 of those families give birth again: 16 have boys, 16 have girls. Next round: 8 boys, 8 girls, etc. The mathematics gets a little sticky when you get down to that last baby, but by then you have 63 boys and girls each to back up the 50/50 argument, and on a larger scale it's even more convincing.

Crazy Guy on a Plane
SOLUTION


For any problem involving an arbitrarily large number, it's always best to imagine it on a small scale first and see if any predictable patterns emerge. If it's just you and the crazy guy occupying 2 seats in a Cessna, your chances are 50%. Add one more person. Now the crazy guy has three options: his own seat ("good"), yours ("bad"), or the other person's seat. If he picks the other person's, then that other person has two options: the crazy guy's seat ("good") and yours ("bad"). Still 50%. Now consider the 100 person version. Crazy guy has one "good", one "bad" and 98 other options. If he sits in, say, passenger 57's seat, then passengers 2-56 get their own seats, and #57 has one "good", one "bad", and 42 other options. Any way you cut it, the odds will be 50%.

2 comments:

ksev said...

The first one is easy, the second less so. You should get the book of "Car Talk" Puzzlers. Clever and funny.

Anonymous said...

The second one is outside of the realms of my understanding. Why does that one guy have to be such a loose cannon? It's really inconsiderate.