Problem 5 of the IMO was definitely the most interesting problem in the contest, although one of the harder ones. A mere 37 people out of 511 managed to solve it completely.

What made it so different was that it did not require any particular knowledge on olympiad math theorems, indeed such knowledge would be useless for this problem. It required only creative insight, and quite a bit of it. Technically it’s a combinatorics problem, but no specific combinatorics experience is needed to solve the problem.

Also this problem was the target for a mini-polymath project organized by Terry Tao, which took about two and a half hours to get from start to solving the problem. The solution I’ll give is mostly based on the polymath solution, although I came up with my own finishing steps which I think is less awkward.

### Problem

In each of six boxes there is initially one coin. There are two types of operation allowed:

**Type 1**: Choose a nonempty box with . Remove one coin from and add two coins to .

**Type 2**: Choose a nonempty box with . Remove one coin from and exchange the contents of (possibly empty) boxes and .

Determine whether there is a ﬁnite sequence of such operations that results in boxes being empty and box containing exactly coins. (Note that .)

### Initial observations

It is not entirely obvious how this problem should be approached; thus we will begin by playing with it and jotting down any interesting observations.

We begin with one coin in each box. For convenience, I will express this as

.

We need to have

Again for convenience, let us substitute

.

Now we can express the two types of moves in our new notation. First, Type 1 moves (we shall call it Move 1):

.

Next, Type 2 moves:

.

Notice how applying Move 1 adds one coin to the system as a whole, while Move 2 takes away one coin.

By applying Move 2 over and over, it is easy to **remove **arbitrarily large amounts of coins from the system (as long as the coins are in the first four boxes).

On the other hand, it isn’t so clear how do **add **large amounts of coins to the system.

Applying Move 1 adds a coin to the system, so logically adding coins should be done by repeated usage of Move 1.

Given , applying Move 1 results in ; applying it again results in . We can repeat this as many times as we like, or until the first box is depleted.

This creates a **compound move** for a pair, executed by applying Move 1 repeatedly:

.

What if we apply this on all six boxes? We first get

Next we have

;

A few more iterations and we will have:

.

We are far from our target: we have 63 coins and we’re stuck. There doesn’t seem to be any other way to introduce any more coins into the system.

The problem seems hopeless.

### Building up a repository of compound moves

We first need a way of getting a large amount of coins into the system. From there is is easy to reduce the coins.

The compound move explained in the previous section is a first step. Let’s call it** Compound Move 1**:

.

The next compound move is less obvious. Suppose that we start with

.

Applying Move 1 gives us

which, using Compound Move 1, can be used to get

.

Now we apply Move 2. Using up a coin to switch the two boxes, we have

Or equivalently,

.

We can repeat this: switching, doubling, switching again, and so on, until the first box is depleted. This gives us

.

So here we have **Compound Move 2**:

.

This is a lot better than what we had before. However, it’s still a while towards our goal.

With Compound Move 1, each additional coin in the left most box adds 2 coins to the next box.

But with Compound Move 2, each additional coin **doubles **the result in the next box.

Now this problem has a *Towers of Hanoi* feel to it. It turns out that we can take this one step further, which, when examined closely, looks remarkably similar to the previous case.

Suppose we have

.

in four consecutive boxes. Applying Move 1:

.

Applying *Compound *Move 2 using the last three boxes, we get

.

Now we apply Move 2 and switch the boxes:

.

If we do this again, we get

.

So, repeating this many times until the left box is empty gives us

.

No doubt the number we have is sufficiently big now. We will call this move **Compound Move 3**, which can only be expressed reasonably with Knuth’s up-arrow notation:

.

### Putting it together

The configuration we want is

which is equivalent to

.

It’s relatively easy to get most of the boxes empty except for the third. From the starting position, Move 1 gives us

Applying Move 2 three times gives us

;

Move 1 then gives

.

We invoke Compound Move 3, getting

.

Finally we can waste coins by consecutively executing Move 2 until we have

And we’re done.

### An additional note

It is easy to show, albeit informally, that . If we take the binary log (I’ll write it as ) of both sides, we have

.

It’s okay to ‘throw away’ the 2, considering the magnitude of the numbers. Taking the log again:

.

Considering that , and the right hand side evaluates to just a few thousand, it’s fairly safe to say which is bigger.

how do you manage to solve all of this?,,, despite you being only 15 years old

Hello trax. Going to answer all of your comments here.

For geometry, I would definitely recommend Geometry Revisited by Coxeter & Greitzer; although it’s a little bit short of IMO level, it brings you up to date on the more advanced geometry concepts.

Problem Solving Strategies by Engel is a very good problem book. Past IMO shortlist problems are pretty nice too.

The IMO is actually for people my age, although I’m not actually on Canada’s IMO team.

would you be a part of the canada’s imo team for years to come?… by the way, can wikipedia help in learning stuff like on how you solve problem 143 ,giving the proof for the remainder theorem, and all of the problems you posted? Do you plan to post all of the solutions for the imo problems?(problems 1,3,6). Are you specializing in geometry,? because i saw in the imo 2010 problem 4 saying you looked at it in detail because of geometry? and lastly, would you recommend to purchase the AoPS textbooks? (intro to alg.,num theory., coun. and prob. geometry., intermediate algebra, counting an probability, precalculus and calculus) and also the two books?(art of problem solving 1 and 2)…I was planning to purchase it but i thought of purchasing other books because it seems to not cater to the imo’s level. i thought it would be better for me to use the money to purchase other books that are more advanced and suitable for the imo,( which i am surveying on)…Sorry, this is so lenghty, thank you so much i appreciate your reply..:) Take care

Hi. In my opinion, the internet (with wikipedia, mathworld, khan academy, etc) is not really a substitute for a textbook: unless one already has a knowledge of calculus, he cannot learn it (at least not very well) by reading Wikipedia calculus articles and watching calculus tutorials on youtube. However wikipedia is a good resource for checking some more specific fact, like the proof of the remainder theorem or the like.

As for the AoPS textbooks, I suppose they’re okay, but not anything special (I’ve only seen the original one though). A list of classic math texts (Spivak, Rudin) can be found here http://math-blog.com/mathematics-books/

I do like geometry, and I feel it’s my strongest area (of algebra, combinatorics, number theory) though I’m far from an expert at it. I’m wondering if you’re on your country’s IMO team?

Cheers.

Oh, I see, thank you very much.

Well, i’ve just discovered IMO this year, and right now i have to go through two more steps (camp) before making the team.

I take it you are going to be entering the IMO next year?

I’m in a similar situation. I recently discovered the local CMS math club – I’m a junior high student- and have been loving it. I still have a long way to go, though, especially in geometry.

Excellent explanation to this problem. I find a lot of the official IMO solutions are very difficult to follow, but this was done at a level I (or just about any person) could understand. Great job!

I like the way u solved the problem…well explained