Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Reciprocal links
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Pennies in Boxes

Here is a problem:

Suppose N pennies are randomly distributed into several boxes. Take any two boxes A and B with p and q pennies, respectively. If p ≥ q you are allowed to remove q pennies from box A and put them into box B, and this action is called an operation. Show that regardless of the original distribution of pennies, a finite number of such operations can move all the pennies into one or two boxes. If N = 2n, pennies can be moved into a single box.

(To perform an operation in the applet below click on two boxes - circles - in succession.)


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet

Explanation

References

  1. G. Chang and T. W. Sederberg, Over And Over Again, MAA, 1997, pp. 27-28

Copyright © 1996-2008 Alexander Bogomolny

 

 

 

 

 

 

 

 

 

 

Explanation

We shall use the mathematical induction twice.

First, observe that in order to prove the first statement it is sufficient to prove it in the case of three non-empty boxes. If there are more, pick any three and arrange to empty one of them. As a result, you will have one less non-empty box which allows for the inductive step.

So let there be three boxes with the number of pennies x, y, z. If any two of the three numbers are equal, we may empty one of the boxes in one step. So assume that

(1) 0 < x < y < z.

Let, by the division algorithm, y = qx + r, where 0 ≤ r < x. We'll show that by a finite number of operations it is possible to make one of the boxes (in fact, the second one) contain r pennies. The assertion will then follow by the infinite descent argument: if r ≠ 0, continue to apply the same procedure to reduce the latter. Since there is only a finite number of non-negative integers less than a given x (or r) the process can't go on indefinitely, i.e. the infinite descent is not possible, but the only way for it to stop is to reach the case when the remainder in the division algorithm vanishes. (The impossibility of the infinite descent is equivalent to applying mathematical induction.) Thus, let's see what can be done with the configuration (1).

Assume the binary representation of q be

(2) q = a0 + a12 + a222 + ... + ak2k, with ak ≠ 0.

Apply the operation k+1 times to either x and y or x and z. Each such operation doubles x, the content of the first box! Thus in the first box we shall successively have x, 2x, 4x, ..., 2k+1x pennies. Where will the add-on pennies come from? This will depend on the coefficients ai in (2). If the first box contains 2ix pennies and ai = 1, remove 2ix pennies from the second (y) box. Otherwise, remove them from the third (z) box. The operations will always be legitimate, at least until qx pennies have been removed from y, leaving there r < x pennies, as desired.

Now assume that the total number N of pennies is a power of 2: N = 2n. We'll show that in this case the pennies can be collected into a single box. The induction is by n.

If n = 1, N = 2, and there are just two possibilities: the pennies are either in 1 or 2 boxes. We are immediately done in the former case, and need just one operation to empty a box in the latter.

Assume the statement is correct for N = 2k and let there be N = 2k+1 non-empty boxes. There are two possibilities: the number of pennies in each box is even, or there are boxes with an odd number of pennies. In a number of steps the latter case can be reduced to the former. Indeed, an operation on a pair of boxes with odd numbers of pennies leaves the two boxes with even numbers of pennies. (Since the total number of pennies is even, the odd boxes come in pairs.)

Now, if all the boxes contain even numbers of pennies, commit yourself to moving the pennies in pairs, for example, by gluing two pennies into a "double penny." The number of double pennies is then 2k, and we can use our assumption.

Copyright © 1996-2008 Alexander Bogomolny

28694905Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
Math
Posted by Laura
2 messages
06:56 AM, Apr-15-08

Divisibility rules - Jargon buste ...
Posted by Carolyn
2 messages
08:35 AM, Apr-04-08

drawing puzzle
Posted by martin gran
31 messages
06:53 PM, May-09-08

Distance to the horizon
Posted by Monty
3 messages
04:38 PM, May-08-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

Deriving functions based on diffe ...
Posted by ke_45
1 messages
12:47 PM, May-10-08

A typo in
Posted by alexwajn
1 messages
11:36 PM, Apr-19-08