Archive for May 2010

## On Mice and Coins

The following problem was sent to me by Joel Lewis.

You have 12 mice, one of which eats faster than all the others. You need to find it. You have a supply of standard cupcakes that you value very much and want to minimize how many of them you have to use. The only way you can find the mouse is to give cupcakes to several groups of mice and see which group is the fastest.

We assume that mice chew at a constant speed and all the mice in one group can attack the cake at the same time. I love this puzzle because I love coin problems. Let me restate the puzzle as a coin problem:

You have 12 coins, one of which is fake and weighs less than all the others. You have a balance scale with multiple pans, that is you can weigh several things at once and order them by weight. You do not care about the total number of weighings as in most classical coin puzzles, instead, this time using a pan is expensive and you want to find the fake coin with as few pan-uses as possible.

Spoiler warning: below I will discuss the solution for n mice.

You can, of course, give a cake to every mouse and see which one finishes first. You can save one cake by giving cakes at the same time to all but one of the mice. If everyone finishes simultaneously, the faster mouse is the unfed one.

It wastes cakes to give them to unequally-sized groups of mice. We can do better by copying the classical way to find a fake coin with the minimum number of weighings. That is, for each test, divide the mice into three groups as evenly as possible and give a cake to each of two equally-sized groups. The number of cakes you use is about 2log3n.

I wouldn’t have written this essay if that was the solution. Sometimes you can do even better. For example, you can find the faster mouse out of 12 using only 5 cakes.

First, if you give out k cakes in one test, the test tells you which of k+1 groups the mouse is in. In the worst case, the faster mouse will be in the biggest group, so you should minimize the biggest group. Hence, your groups that get cakes should have ⌈n/(k+1)⌉ mice.

A test with one cake gives no information. I argue that giving out more than three cakes doesn’t gain anything. Indeed, suppose we use four cakes in a test. That is, we divide the mice into five groups A, B, C, D and E, of which the first four are the same size. We can simulate the test by two tests in each of which we give out two cakes. In the first test we give cakes to A+B and C+D. If one of the groups is faster, say A+B, then in the second test give cakes to A and B; if not, E has the faster mouse. I leave it as an exercise to simulate a test with more than four cakes.

Thus, in an optimal strategy we can use two or three cakes per test. Also, if you give one test with k − 1 cakes and the next one with m − 1 cakes, you can switch them with the same effect. The largest group after either order of tests will have at most ⌈n/km⌉ mice.

I don’t need two tests of three cakes each, which would give me a group of size at least ⌈n/16⌉. I can achieve the same result with three tests of two cakes each, with the faster mouse restricted to a group of size at most ⌈n/27⌉.

That means all my tests use two cakes, except I might use three cakes once. It doesn’t matter in what order I conduct the tests, so I can wait until the end to use three cakes. I leave it as an exercise to the reader that the only small number of mice for which we would prefer three cakes is four. From this it follows quickly that for numbers of mice between 3 * 3i + 1 and 4 * 3i, the number of cakes is 2i + 1. For numbers between 4 * 3i + 1 and 3i+2 the answer is 2i + 2.

## USAMO 2007, Problem 5

A week ago I chatted with my son Sergei about memorable math problems. He mentioned problem 5 from USAMO 2007. The problem can be reduced to the following:

Prove that (x7 + 1)/(x + 1) is composite for x = 77n, where n is a non-negative integer.

Perhaps Sergei remembered this problem because as far as he knew, he was the only one in that competition to solve it. That made me curious as to how he solved it. His solution is available as solution 2 at the Art of Problem Solving website. His solution seemed mysterious and impossible to invent on the spot. I became even more curious to understand the thought process underlying his solution.

Here is his recollection:

We need to factor x6 − x5 + x4 − x3 + x2 − x + 1. If such factoring existed it would have been known. Therefore, we need to somehow use the fact that x = 77n. What is the simplest way to factor? We should try to represent the polynomial in question as the difference of squares. Luckily, x is an odd power of 7. We can make it a square if we multiply or divide it by 7 or another odd power of 7. So with a supply of squares on one side, we need to find a match for one of them to build the difference.

Let us simplify the problem and see what happens for (y3 + 1)/(y + 1) for y = 33n, when n = 1. In other words we want to represent 703 as a difference of squares. This can be done: 703 = 282 − 92. Now let us see how we can express 282 and 92 through y which in this case is equal to 27. The first term is (y + 1)2, and the second is 3y.

Now let’s go back to 7 and x, and check whether (x + 1)6 − (x6 − x5 + x4 − x3 + x2 − x + 1) is 7x. Oops, no. The difference is 7x5 + 14x4 + 21x3 + 14x2 +7x. On the plus side, it is divisible by 7x which we know is a square. The leftover factor is x4 + 2x3 + 3x2 +2x + 1, which is a square of x2 +x + 1.

The problem is solved, but the mystery remains. The problem can’t be generalized to numbers other than 3 and 7.

## The Rise of MIT

I decided to take a closer look at the Putnam Competition. I analyzed the results of the three top contenders for the best Putnam teams: Harvard, MIT, Princeton. I looked at the annual number of Putnam Fellows from each of these three schools starting from 1994.

Year Harvard MIT Princeton
1994 2 0 1
1995 3 0 0
1996 2 0 0
1997 4 0 0
1998 2 0 1
1999 2 1 0
2000 2 2 0
2001 2 1 0
2002 2 2 0
2003 1 2 1
2004 0 3 2
2005 2 3 1
2006 1 3 0
2007 1 2 1
2008 1 3 0
2009 1 2 0

As you may notice MIT couldn’t even generate a Putnam Fellow until 2000, but starting from 2003 MIT consistently had more Putnam Fellows than Harvard or Princeton.

Richard Stanley, the coach of the MIT team, kindly sent me the statistics for the most recent competition, held in 2009.

Category Overall MIT
Number of participants 4036 116
Mean score 9.5 34.7
Median score 2 31
Geometric mean 0 0
Percent of 0 score 43.7 4.3

Furthermore, MIT had 40% in the top 5, 33% in the top 15, 32% in the top 25, and 35% in the top 81. For comparison, in the top 81, MIT had 28 winners — more than the next three schools together: Caltech 11, Harvard 9, Princeton 7.

No comment.

## The Best Math Blogs

OnlineDegree.net selected the 50 Best Blogs for Math Majors, and I am pleased that Tanya Khovanova’s Math Blog is number two. Since they did not explain their criteria, I suspected that it might be according to the number of Google hits. To double check, I Googled “math blog” and once again my blog was number two.

This might be the right moment to acknowledge the others involved with my blog. First, Sue Katz, my writing teacher and editor, corrected the English in most of my posts. Now I do not “do” mistakes in English any more, I make them.

My sons, Alexey and Sergei, are a huge support. Sometimes my poor kids have to listen endlessly to my latest idea, until I am ready to write about it. And then they will even read the final piece, and continue to encourage me.

## An Algebra Text Book

I am usually disappointed with American math text books. I have had an underwhelming experience with them. Often I open a book and in the next 15 minutes, I find a mistake, a typo, a misguided explanation, sloppiness, a misconception or some other annoyance.

I was pleasantly surprised when I opened the book Introduction to Algebra by Richard Rusczyk. I didn’t find any flaws in it — not in the first 15 minutes, and not even in the first hour. In fact, having used the book many times I have never found any mistakes. Not even a typo. This was disturbing. Is Richard Rusczyk human? It was such an unusual experience with an American math book, that I decided to deliberately look for a typo or a mistake. After half a year of light usage, I finally found something.

Look at problem 7.3.1.

Five chickens can lay 10 eggs in 20 days. How long does it take 18 chickens to lay 100 eggs?

There is nothing wrong with this problem. But the book is accompanied by the Introduction to Algebra Solutions Manual in which I found the following solution, that I’ve shortened for you:

The number of eggs is jointly proportional to the number of chickens and the amount of time. One chicken lays one egg in 10 days. Hence, 18 chickens will lay 100 eggs in 1000/18 days, which is slightly more than 55 and a half days.

What is wrong with this solution? Richard Rusczyk is human after all.

I like this book for its amazing accuracy and clean explanations. There are also a lot of diverse problems in terms of difficulty and ideas. Richard Rusczyk has good taste. Many of the problems are from different competitions and require inventiveness. I like that there are a lot of challenge problems that go beyond the boring parts of algebra. Also, I like that important points of algebra are chosen wisely and are emphasized.

This book might not be for everyone. It doesn’t have pretty pictures. It doesn’t have color at all. This is not a flaw for a math book. The book concentrates on ideas and problems, not entertainment. So if you’re looking for math entertainment, you’ll find it on my blog. For solid study, try Richard Rusczyk’s books.

## Raymond Smullyan’s Magic Trick

I love Raymond Smullyan’s books, especially the trick puzzles he includes. The first time I met him in person, he played a trick on me.

This happened at the Gathering for Gardner 8. We were introduced and then later that day, the conference participants were treated to a dinner event that included a magic show. In one evening I saw more close-up magic tricks than I had in my whole life. This left me lightheaded, doubting physics and my whole scientific outlook on life.

Afterwards, Raymond Smullyan joined me in the elevator. “Do you want to see a magic trick?” he asked. “I bet I can kiss you without touching you.” I was caught off guard. At that moment I believed anything was possible. I agreed to the bet.

He asked me to close my eyes, kissed me on the cheek and laughed, “I lost.”

## by Peter Winkler

As a writer of books on mathematical puzzles I am often faced with delicate issues of phrasing, none more so than when it comes to questions about conditional probability. Consider the classic “X has two children and at least one is a boy. What is the probability that the other is a boy?”

It is reasonable to interpret this puzzle as asking you “What is the probability that X has two boys, given that at least one of the children is a boy” in which case the answer is unambiguously 1/3—given the usual assumptions about no twins and equal gender frequency.

This puzzle confounds people *legitimately*, however, because most of the ways in which you are likely to find out that X has at least one boy contain an implicit bias which changes the answer. For example, if you happen to meet one of X’s children and it’s a boy, the answer changes to 1/2.

Suppose the puzzle is phrased this way: X says “I have two children and at least one is a boy.” What is the probability that the other is a boy?

Put this way, the puzzle is highly ambiguous. Computer scientists, cryptologists and others who must deal carefully with message-passing know that what counts is not what a person says (even if she is known never to lie) but *under what circumstances would she have said it.*

Here, there is no context and thus no way to know what prompted X to make this statement. Could he instead have said “At least one is a girl”? Could he have said “Both are boys”? Could he have said nothing? If you, the one faced with solving the puzzle, are desperate to disambiguate it, you’d probably have to assume that what really happened was: X (for some reason unconnected with X’s identity) was asked whether it was the case that he had at least one son, and, after being warned—by a judge?—that he had to give a yes-or-no answer, said “yes.” An unlikely scenario, to say the least, but necessary if you want to claim that the solution to the puzzle is 1/3.

Consider the puzzle presented (according to Alex Bellos) by Gary Foshee at the recent 9th Gathering for Gardner:

I have two children. One is a boy born on a Tuesday. What is the probability I have two boys?

If the puzzle was indeed put exactly this way, and your life depended on defending any particular answer, God help you. You cannot answer without knowing, for example, what the speaker would have said if he had one boy and one girl, and the boy was born on Wednesday. Or if he had two boys, one born on Tuesday and one on Wednesday. Or two girls, both born on Tuesday. Et cetera.

Now, there is nothing mathematically wrong (given the usual assumptions, including X being random) about saying that “The probability that X has two sons, given that at least one of X’s two children is a boy born on Tuesday, is 13/27.” But if that is to be turned into an unambiguous puzzle attached to a presumed situation, some serious hypothesizing is necessary. For instance: you get on the phone and start calling random people. Each is asked if he or she has two children. If so, is it the case that at least one is a boy born on a Tuesday? And if the answer is again yes, are the children both boys? Theoretically, of the times you reach the third question, the fraction of pollees who say “yes” should tend to 13/27.

Kind of takes the fun out of the puzzle, though, doesn’t it? Kudos to Gary for stirring up controversy with a quickie.

## Sons and Tuesdays

I recently discussed the following problem:

You run into an old friend. He has two children, but you do not know their genders. He says, “I have a son born on Tuesday.” What is the probability that his second child is also a son?

I had heard this problem at the Gathering for Gardner 9 in a private conversation. My adversary had been convinced that the answer to the problem is 13/27. I came back to Boston from the gathering and wrote my aforementioned essay in which I disagreed with his conclusion.

I will tell you my little secret: when I started writing I substituted Wednesday for Tuesday. Then I checked my sons’ birthdays and they were born on Saturday and Tuesday. So I changed my essay back to Tuesday.

After I published it people sent me several links to other articles discussing the same problem, such as those of Keith Devlin and Alex Bellos, both of whom think the answer is 13/27. So I invented a fictional opponent — Jack, and here is my imaginary conversation with him.

Jack: The probability that a father with two sons has a son born on Tuesday is 13/49. The probability that a father with a son and a daughter has a son born on Tuesday is 1/7. A dad with a son and a daughter is encountered twice as often as a dad with just two sons. Hence, we compare 13/49 with 14/49, and the probability of the father having a second son is 13/27.

Me: What if the problem is about Wednesday?

Jack: It doesn’t matter. The particular day in question was random. The answer should be the same: 13/27.

Me: Suppose the father says, “I have a son born on *day.” He mumbles the day, so you do not hear it exactly.

Jack: Well, as the answer is the same for any day, it shouldn’t matter. The probability that his second child will also be a son is still 13/27.

Me: Suppose he says, “I have a son born …”. So he might have continued and mentioned the day, he might not have. What is the probability?

Jack: We already decided that it doesn’t depend on the day, so it shouldn’t matter. The probability is still 13/27.

Me: Suppose he says, “I have a son and I do not remember when he was born.” Isn’t that the same as just saying, “I have a son.” And by your arguments the probability that his second child is also a son is 13/27.

Jack: Hmm.

Me: Do you remember your calculation? If we denote the number of days in a week as d, then the probability of him having a second son is (2d−1)/(4d−1). My point is that this probability depends on the number of days of the week. So, if tomorrow we change a week length to another number his probability of having a son changes. Right?

At this point my imaginary conversation stops and I do not know whether I have convinced Jack or not.

Now let me give you another probability problem, where the answer is 13/27:

You pick a random father of two children and ask him, “Yes or no, do you have a son born on Tuesday?” Let’s make a leap and assume that all fathers know the day of the births of their children and that they answer truthfully. If the answer is yes, what is the probability of the father having two sons?

Jack’s argument works perfectly in this case.

My homework for the readers is: Explain the difference between these two problems. Why is the second problem well-defined, while the first one is not?