This action might not be possible to undo. Are you sure you want to continue?
Solutions
© 2009 by
The Mathematical Association of America (Incorporated)
Library of Congress Catalog Card Number 2008938665
ISBN: 9780883858295
Printed in the United States of America
Current Printing (last digit):
10 9 8 7 6 5 4 3 2 1
Aha! Solutions
Martin Erickson
Truman State University
Published and Distributed by
Mathematical Association of America
Council on Publications
Paul Zorn, Chair
Problem Books Editorial Board
Richard A. Gillman Editor
Roger Nelsen
Mark Saul
Tatiana Shubin
MAA PROBLEM BOOKS SERIES
Problem Books is a series of the Mathematical Association of America consisting of col
lections of problems and solutions from annual mathematical competitions; compilations
of problems (including unsolved problems) specific to particular branches of mathematics;
books on the art and practice of problem solving, etc.
Aha! Solutions, Martin Erickson
The Contest Problem Book VII: American Mathematics Competitions, 19952000 Contests, com
piled and augmented by Harold B. Reiter
The Contest Problem Book Vlll: American Mathematics Competitions (AMC 10),20002007, com
piled and edited by J. Douglas Faires & David Wells
The Contest Problem Book IX: American Mathematics Competitions (AMC 12), 20002007, com
piled and edited by David Wells & J. Douglas Faires
A Friendly Mathematics Competition: 35 Years of Teamwork in Indiana, edited by Rick Gillman
The Inquisitive Problem Solver, Paul Vaderlind, Richard K. Guy, and Loren C. Larson
International Mathematical Olympiads 19861999, Marcin E. Kuczma
Mathematical Olympiads 19981999: Problems and Solutions From Around the World, edited by
Titu Andreescu and Zuming Feng
Mathematical Olympiads 19992000: Problems and Solutions From Around the World, edited by
Titu Andreescu and Zuming Feng
Mathematical Olympiads 20002001: Problems and Solutions From Around the World, edited by
Titu Andreescu, Zuming Feng, and George Lee, Jr.
Problemsfrom Murray Klamkin: The Canadian Collection, edited by Andy Liu and Bruce Shawyer
The William Lowell Putnam Mathematical Competition Problems and Solutions: 19381964, A. M.
Gleason, R. E. Greenwood, L. M. Kelly
The William Lowell Putnam Mathematical Competition Problems and Solutions: 19651984, Gerald
L. Alexanderson, Leonard F. Klosinski, and Loren C. Larson
The William Lowell Putnam Mathematical Competition 19852000: Problems, Solutions, and Com
mentary, Kiran S. Kedlaya, Bjorn Poonen, Ravi Vakil
USA and International Mathematical Olympiads 2000, edited by Titu Andreescu and Zuming Feng
USA and International Mathematical Olympiads 2001, edited by Titu Andreescu and Zuming Feng
USA and International Mathematical Olympiads 2002, edited by Titu Andreescu and Zuming Feng
USA and International Mathematical Olympiads 2003, edited by Titu Andreescu and Zuming Feng
USA and International Mathematical Olympiads 2004, edited by Titu Andreescu,
Zuming Feng, and PoShen Loh
MAA Service Center
P. O. Box 91112
Washington, DC 200901112
18003311622 fax: 13012069789
To Martin Gardner and Ross Honsberger
whose mathematical exposition inspires so many
Preface
Every mathematician (beginner, amateur, and professional alike) thrills to find simple, el
egant solutions to seemingly difficult problems. Such happy resolutions are called "aha!
solutions," a phrase popularized by mathematics and science writer Martin Gardner in his
books Aha! Gotcha and Aha! Insight. Aha! solutions are surprising, stunning, and scintil
lating: they reveal the beauty of mathematics.
This book is a collection of problems whose aha! solutions 1 enjoy and hope you will
enjoy too. The problems are at the level of the college mathematics student, but there
should be something of interest for the high school student, the teacher of mathematics,
the "math fan," and anyone else who loves mathematical challenges.
As a student first learning mathematics, 1 was inspired by the works of Martin Gardner
and mathematics expositor Ross Honsberger (I still am today). One of the best ways to
capture the imagination of young people and get them interested in mathematics is by
"hooking them" on irresistible problems. And such a hook is appropriate, since a great
part of mathematical study and investigation consists of problem solving. Sometimes the
problem solving is at an advanced level, sometimes it is what we discover and create in our
everyday mathematical lives.
For this collection, 1 have selected one hundred problems in the areas of arithmetic,
geometry, algebra, calculus, probability, number theory, and combinatorics. Some of the
problems 1 created, others are old but deserve to be better known. The problems start out
easy and generally get more difficult as you progress through the book. A few solutions
require the use of a computer. An important feature of the book is the bonus discussion
of related mathematics that follows the solution of each problem. This material is there to
entertain and inform you or point you to new questions. If you don't remember a mathe
matical definition or concept, there is a Toolkit in the back of the book that will help.
1 take to heart the poet Horace's decree that writing should delight and instruct. So 1
hope that you have fun with these problems and learn some new mathematics. Perhaps you
will have the satisfaction of discovering aha! solutions of your own.
Thanks to the following people who have provided suggestions for this book: Robert
Cacioppo, Robert Dobrow, Christine Erickson, Suren Fernando, Martin Gardner, David
vii
Garth, Joe Hemmeter, Ross Honsberger, Daniel Jordan, Ken Price, Khang Tran, and An
thony Vazzana.
viii
Contents
Preface vii
Elementary Problems
1.1 Arithmetic ...
Fair Division . .
A Mere Fraction 2
A Long Sum .. 4
Sums of Consecutive Integers 5
Pluses and Minuses 7
Which is Greater? 8
Cut Down to Size 10
Ordered Digits . . . 11
What's the Next Term? 12
1.2 Algebra ......... 13
How Does She Know? . 13
How Cold Was It? 14
Man vs. Train ..... 15
Uphill, Downhill .... 17
How Many Solutions? . 18
1.3 Geometry ........ 19
A Quadrilateral from a Quadrilateral 19
The Pythagorean Theorem . 20
Building Blocks .... 22
A Geometric Inequality 23
A Packing Problem .. 25
What's the Area? . . . . 26
Volume of a Tetrahedron . 27
Irrati onal <P . . . . 28
Tangent of a Sum .... 29
ix
1.4 No Calculus Needed
A Zigzag Path . .
A Stack of Circles
A Farmer's Field . .
CompostingA Hot Topic? .
Three Sines. . . .
2 Intermediate Problems
x
2.1 Algebra. . . . . .
Passing Time . . .
Sums to 1,000,000 .
An Odd Determinant.
Demanding a Polynomial
2.2 Geometry. . . . . . . . .
What's the Side Length? .
Napoleon's Theorem ...
A Graph on a Doughnut .
Points Around an Ellipse
Three Fixed Points . . . .
'Round and 'Round . . .
Reflections and Rotations
Cutting and Pasting Triangles
Cookie Cutting. .
Revolving Credit. . .
2.3 Calculus . . . . . . .
The Harmonic Series.
A Quick Integral . .
Euler's Sum . . . .
Strips of Carpeting .
Is it O? ..
Pi is Pi ...... .
2.4 Probability . . . . .
How Many Birthdays? .
The Average Number of Spots.
Balls Left in an Urn . . . .
Random Points on a Circle
The Gobbling Algorithm
2.5 Number Theory ..... .
Square Triangular Numbers
Foxy Factorial . . .
Always Composite .
A Problem of l's .
A Problem of 2's .
A Problem of3's .
Fibonacci Squared
32
32
33
35
36
37
.41
41
41
43
44
46
46
46
49
51
53
54
56
58
60
62
63
67
67
68
69
70
71
72
74
74
75
76
80
80
83
83
84
85
86
87
88
90
A Delight from Pascal's Triangle 93
An Unobvious Integer . 93
Magic Squares . . . . . 96
All Things Being Equal 99
2.6 Combinatorics . . . . . 100
Now I Know My ABC's . 100
Packing Animals in a Box 101
Linear Bumper Cars . . . 103
I Scream Aha! ...... 106
Lines Dividing the Plane . 107
A Number that Counts . 108
A Broken Odometer . 109
How Many Matrices? 110
Lots of Permutations . . III
Even Steven and Oddball Il3
HigherDimensional TicTacToe 115
The Spice of Life 117
Sperner's Lemma 120
An Infinite Series 122
Change for a Dollar 123
RookPaths ... 124
3 Advanced Problems 129
3.1 Geometry .... · ..... 129
SelfIntersecting Polygons. 129
Regular Simplices ... 131
n
2
+ I Closed Intervals 134
3.2 Probability ...... 135
1,000,000 Coin Flips .. 135
Bits of Luck ...... 138
A Game for Noncommunicating Mathematicians . 140
3.3 Algebra ................. 143
An Integer Matrix with Determinant I 143
Only I, I,D? . 146
168 Elements. . . . . . . . 148
3.4 Number Theory
· ..... 154
Odd Binomial Coefficients 154
Fibonacci Factors ..... 156
Exact Covering Systems . . 158
A Fibonacci Number Producing Polynomial 160
Perrin's Sequence 162
3.5 Combinatorics . . . . . . . 165
Integer Triangles . . . . . . 165
TopsyTurvy Tournaments . 167
Sudoku Solving · ..... 169
xi
The SET Game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 172
Girth Five Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 175
Unlabeled Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 178
A Toolkit 183
B list of Bonuses I 93
Bibliography 197
Index 199
About the Author 207
xii
1
Elementary Problems
Let's begin with some relatively easy problems. The challenges become gradually more
difficult as you go through the book. The problems in this chapter can be solved without
advanced mathematics. Knowledge of basic arithmetic, algebra, and geometry will be help
ful, as well as your own creative thinking. I recommend that you attempt all the problems,
even if you already know the answers, because you may discover new and interesting as
pects of the solutions. A bonus after each solution discusses a related mathematical topic.
Remember, each problem has an aha! solution.
I . I Arithmetic
Fair Division
Abby has fifteen cookies and Betty has nine cookies. Carly, who has no cookies, pays Abby
and Betty 24 cents to share their cookies. Each girl eats onethird of the cookies.
Betty says that she and Abby should divide the 24 cents evenly, each taking 12 cents.
Abby says that since she supplied fifteen cookies and Betty only nine, she should take 15
cents and Betty 9 cents.
What is the fair division of the 24 cents between Abby and Betty?
Solution
The key is to determine the worth of one cookie. Each girl eats eight cookies. Since Carly
pays 24 cents for eight cookies, each cookie is worth 3 cents. Thus Abby, who starts with
fifteen cookies and sells seven to Carly, should receive 21 cents, and Betty, who starts with
nine cookies and sells one to Carly, should receive 3 cents.
2 I Elementary Problems
Bonus: Cookie Jar Division
Abby, Betty, and early have 21 cookie jars (all the same size). Seven are full, seven are
halffull, and seven are empty. The girls wish to divide the cookie jars among themselves
so that each girl gets the same number of jars and the same amount of cookies. How can
they do this without opening the jars?
There are two different ways, as shown below.
Abby
Betty
early
FFFHEEE
FFFHEEE
FHHHHHE
Abby
Betty
early
FFHHHEE
FFHHHEE
FFFHEEE
We have designated the full cookie jars by F, the halffull ones by H, and the empty ones
by E. In both solutions, each girl receives seven jars and 3t jars' worth of cookies. We
have not counted as different the same solution with the girls' names permuted.
As we will see later (in "Integer Triangles" on p. 165), each solution corresponds to a
triangle with integer sides and perimeter 7, as shown below. In a given triangle, the side
lengths equal the number of full cookie jars for each girl in the corresponding cookie jar
solution.
~ 1
3
2 2
3
A Mere Fraction
(a) Find an integral fraction between 1/4 and 1/3 such that the denominator is a positive
integer less than 10.
(b) Find an integral fraction between 7/10 and 5/7 such that the denominator is a positive
integer less than 20.
Solution
(a) Since 3 < 3t < 4, we have, upon taking reciprocals, the inequalities
121
4 <"7 < 3·
We doublecheck, by crossmultiplication:
1 2
and
 <  since 1 x 7 < 4 x 2
4 7
2 1
 <  since 2 x 3 < 7 x 1.
7 3
One can check by exhaustion that 2/7 is the only solution.
I . I Arithmetic 3
(b) Notice that the fraction found in (a) can be obtained by adding the numerators and
denominators of 1/4 and 1/3:
1 + 1
2
=
4+3 7
Would the same trick work for 7/10 and 5/7? Let's try the plausible answer
7 + 5 12
10 + 7 17
We verify the inequalities
by crossmultiplication:
and
7 12 5
<<
10 17 7
7 12
 <  since 7 x 17 < 10 x 12
10 17
12 5
 <  since 12 x 7 < 17 x 5.
17 7
One can check by exhaustion that 12/17 is the only solution.
Bonus: Mediant Fractions
The answers to (a) and (b) are called mediantfractions.! The mediant fraction of a/b and
c/d is (a + c)/(b + d). Thus, the mediant fraction of 1/4 and 1/3 is 2/7, and the mediant
fraction of7 /10 and 5/7 is 12/17. If a/b < c/d (with band d positive), then
a a +c c
b< b+d <d'
I encourage the reader to prove these inequalities using crossmultiplication.
Here is an aha! proof of the mediant fraction inequalities. Assuming that a, b, c and d
are all positive, we will interpret the fractions as concentrations of salt in water. Suppose
that we have two solutions of salt water, the first with a teaspoons of salt in b gallons of
water, and the second with c teaspoons of salt in d gallons of water. The concentration
of salt in the first solution is a/b teaspoons/gallon, while the concentration of salt in the
second solution is c / d teaspoons/gallon. Suppose that the first solution is less salty than
the second, i.e., a/ b < c / d. Now, if we combine the two solutions, we obtain a solution
with a + c teaspoons of salt in b + d gallons of water, so that the salinity of the new
solution is (a + c)/ (b + d) teaspoons/gallon. Certainly, the new solution is saltier than the
first solution and less salty than the second. That is to say,
a a +c c
<<
b b+d d"
Our proof can truly be called a saline solution!
I Mediant fractions arise in the study of Farey sequences and in the "solution" of Simpson's Paradox.
4 I Elementary Problems
A long Sum
What is the sum ofthe first 100 integers,
1 +2+3+···+ 100?
Of course, we could laboriously add up the numbers. But we seek instead an aha! solu
tion, a simple calculation that immediately gives the answer and insight into the problem.
Solution
Observe that the numbers may be paired as follows:
1 and 100,
2 and 99,
3 and 98,
50 and 51.
We have 50 pairs, each pair adding up to 101, so our sum is 50 x 101 = 5050.
This solution works in general for the sum
1 + 2 + 3 + ... + n,
where n is an even number. We pair the numbers as before:
1 and n,
2 and n  1,
3 andn  2,
nl2 and nl2 + 1.
We have nl2 pairs, each adding up to n + 1, so our sum is nl2 x (n + 1) = n(n + 1)/2.
What if n is odd? We can no longer pair all the numbers (as the middle term has no
mate). However, throwing in a 0 doesn't change the total:
0+ 1 + 2 + 3 + ... + n.
Now we have an even number of terms, and they may be paired as
o andn,
1 and n  1,
2 andn  2,
(n  1)/2 and (n  1)/2 + 1.
We have (n + 1)/2 pairs, each adding up to n, so our sum is n(n + 1)/2 (again).
A "duplication method" works for both n even and n odd. Let S be the sum, and intro
duce a duplicate of S, written backwards:
S
S
=
=
n
+
+
2
(n  1)
+
+
3
(n  2)
+
+
+
+
n.
1.
1.1 Arithmetic 5
Add the two expressions for S, summing the first terms, then the second terms, and so on:
2S = (n + 1) + (n + 1) + (n + 1) + ... + (n + 1).
(The term n + 1 occurs n times.) This simplifies to
or
2S = n(n + 1),
S = n(n + 1).
2
Bonus: Sum of an Arithmetic Progression
Carl Friedrich Gauss (17771855), one of the greatest mathematicians of all time, is said
to have solved our problem for n = 100 when he was a 10yearold school pupil. However,
according to E. T. Bell [2], the problem that Gauss solved was actually more difficult:
The problem was of the following sort, 81297 + 81495 + 81693 + ... + 100899,
where the step from one number to the next is the same all along (here 198), and a
given number of terms (here 100) are to be added.
The problem mentioned by Bell is the sum of an arithmetic progression. We can evaluate
the sum using our formula for the sum of the first n integers. The calculation is
81297 + 81495 + ... + 100899 = 81297 x 100 + 198 x (1 + ... + 99)
99 x 100
= 8129700 + 198 x 2
= 9109800.
Sums of Consecutive Integers
Behold the identities
1+2=3
4+5+6=7+8
9 + 10 + 11 + 12 = 13 + 14 + 15
16 + 17 + 18 + 19 + 20 = 21 + 22 + 23 + 24
25 + 26 + 27 + 28 + 29 + 30 = 31 + 32 + 33 + 34 + 35
36 + 37 + 38 + 39 + 40 + 41 + 42 = 43 + 44 + 45 + 46 + 47 + 48.
What is the pattern and why does it work?2
2Roger B. Nelsen gives a "proof without words" for this problem in the February 1990 issue of Mathematics
Magazine.
6 I Elementary Problems
Solution
Consider the third identity:
9 + 10 + II + 12 = 13 + 14 + IS.
If we add 4 to each of the first three numbers on the left (9, 10, and II), then we obtain the
three numbers on the right (13, 14, and IS). We have added 4 . 3 = 12 on the left, which is
the fourth number on the left.
The nth identity (for n :::: I) is
n
2
+ (n
2
+ 1) + ... + (n
2
+ n) = (n
2
+ n + I) + (n
2
+ n + 2) + ... + (n
2
+ n + n).
There are n + I terms on the left and n terms on the right. If we add n + I to each term
on the left except the last term, then we obtain all the terms on the right. We have added
(n + I)n = n
2
+ n on the left, and this is the last term on the left.
Bonus: Finding a Polynomial
It's easy to find the sum given by the nth identity. The average of the n + I terms on the
left is (n
2
+ (n
2
+ n»/2, so the sum is
(n + l)(n
2
+ (n
2
+ 1»/2 = n(n + 1)(2n + 1)/2.
Let's suppose that we didn't know this formula, but only the sums:
3, IS, 42, 90, 165, 273, ....
How can we find the polynomial p(n), whose values for n = 1,2,3, ... are these num
bers? The method (from finite difference calculus) is to make a sequence of differences of
consecutive values of our starting sequence:
12, 27, 48, 75, 108, ....
We repeat this process, creating a sequence of sequences:
3, IS, 42,
12, 27, 48,
IS, 21, 27,
6, 6, 6,
90, 165, 273,
75, 108,
33,
Having obtained a constant sequence, we stop. Now, the polynomial p(n) is defined by
multiplying the first column of our array by successive binomial coefficients and adding:
This polynomial gives the values of our sequence starting at p(O). Since we want to start at
p(I), we simply replace n by n  I to obtain the polynomial p(n) = n(n + 1)(2n + 1)/2.
1.1 Arithmetic 7
Pluses and Minuses
Evaluate
Solution
Using the formula for the difference of two squares, x
2
 y2 = (x + y)(x  y), the
expression can be written as
(100 + 99)(100 99) + (98 + 97)(98  97) + (96 + 95)(96  95) + ... + (2 + 1)(2 I).
Since every other term in parentheses is equal to I, this expression simplifies to
100 + 99 + 98 + 97 + 96 + 95 + ... + 2 + l.
In "A Long Sum," we found this sum to be 5050.
Bonus: Curious Identities.
3
Can you explain the pattern for the identities
3
2
+ 4
2
= 52
10
2
+ 1I
2
+ 122 = 13
2
+ 142
212 + 222 + 23
2
+ 242 = 25
2
+ 26
2
+ 272
36
2
+ 37
2
+ 38
2
+ 39
2
+ 40
2
= 412 + 422 + 43
2
+ 44
2
?
Let's prove the last one in a way that indicates what's going on in general. Transposing all
terms on the left except 36
2
to the right side of the equation yields
Notice that we paired the largest and smallest terms, the secondlargest and secondsmallest,
etc. Now, using our difference of squares formula, we have
36
2
=(41 + 40)(41  40) + (42 + 39)(42  39)
+ (43 + 38)(43  38) + (44 + 37)(44  37)
=81·1 + 81·3 + 81·5 + 81 ·7
=81(1+3+5+7)
=81·16.
And certainly, 36
2
= 9
2
.4
2
= 81 . 16. Our computation tells the story in general. For
n ::: 1, we claim that
[n(2n + l)f + ... + [2n(n + 1)]2 = (2n2 + 2n + 1)2 + ... + (2n2 + 3n)2.
3 Michael Boardman gives a "proof without words" for this problem in the February 2000 issue of Mathematics
Magazine.
8
Transposing terms as we did in our test case, we obtain
[n(2n + 1)]2 = [(2n2 + 2n + 1)2  (2n(n + 1»2] + ...
+ [(2n2 + 3n)2  (n(2n + I) + 1)2]
I Elementary Problems
= (4n
2
+ 4n + 1)(1 + 3 + 5 + 7 + ... + 2n  I).
We need a formula for the sum of the first n odd numbers,
I + 3 + 5 + 7 + ... + 2n  1.
Since this is the sum of an arithmetic progression, we could use the method in "A Long
Sum." However, by the diagram below, we can see that the sum is equal to n
2
•
n
n
Using our formula for the sum of the first n odd numbers, our identity becomes
[n(2n + 1)]2 = (2n + 1)2n
2
,
which is obviously true. Our identity is verified!
Which is Greater?
Which number is greater,
We could compute square roots, but we seek instead an aha! solution that gives the
answer immediately.
Solution
The winning idea is to compare the squares of the two numbers (thus eliminating some of
the square roots). The larger number has the larger square.
The squares of the given numbers are
( J6 + J10t = 6 + 2.J60 + 10 = 16 + 2.J60
and
(..rs + .Ji2t = 5 + 2.J60 + 12 = 17 + 2.J60.
The second square is larger. Therefore, ..rs + .JTI is greater than J6 + JTO.
I. 1 Arithmetic 9
Bonus: A Diophantine Equation
The numbers in this problemlet's call the smaller one x and the larger one ysatisfy
the equation
x
2
+ I = y2.
This is an example of a Diophantine equation, after the Greek mathematician Diophantus
(c. 20Oc. 284). Diophantus called for rational number solutions to such equations. In our
problem, x and y are not rational numbers (as their squares are irrational numbers). Let's
find all rational solutions to the equation.
The graph of the equation is a hyperbola, as shown in the picture.
x
The point (0, I) is on the hyperbola, so we have one rational solution. If (x, y) is another
rational solution (where x =1= 0), then the slope of the line through (0, I) and (x, y) is also
rational. Let's call this slope m. Thus
yI
m=.
x 0
Solving for y, we obtain y = mx + I. Substituting this expression for y into the equation
of the hyperbola yields
Solving for x we have
and hence
x
2
+ I = (mx + 1)2
= m
2
x
2
+ 2mx + I.
2m
x = 1
2
'
m
y=
1 m
2
•
10 I Elementary Problems
These equations, where m is a rational number not equal to ± I, are a parameterization of
all rational solutions to the equation x
2
+ 1 = y2, except for the solution (0, I). For
example, if m = 4/11, then (x,y) = (88/105,137/105). The reason that (0,1) isn't
included is because it would determine a line with undefined slope. The value m = 0
corresponds to a tangent line to the hyperbola at the point (0, I). Can you see which values
of m correspond to the upper and lower branches of the hyperbola?
Cut Down to Size
Find two whole numbers greater than I whose product is 999,991.
Solution
Observe that
999,991 = 1,000,000  9
= 1000
2
_ 3
2
•
The algebra rule for factoring the difference of two squares comes in handy:
x
2
_ y2 = (x  y)(x + y).
Applying the rule with x = 1000 and y = 3, we obtain
999,991 = 1000
2
 3
2
= (1000  3)(1000 + 3)
= 997 x 1003.
Bonus: Finding the Prime Factorization
We have found two numbers, 997 and 1003, whose product is 999,991. Can these factors
be broken down further (i.e., do they have proper divisors?), or are they prime numbers
(see Toolkit)? We can divide 997 and 1003 by various other numbers, such as 2, 3, etc., to
see if the quotients are integers, but how many trials would we have to make?
When testing for proper divisors of n, we need only divide n by prime numbers, because
if n has a proper divisor then that divisor has a prime factor. As we test possible divisors,
2, 3, 5, etc., the quotients, n/2, n/3, n/5, etc., become smaller. The "breakeven point"
occurs at ..;n, since n/..;n = ..;n. Hence we only need to search for prime divisors up to
..;n. If there are no such divisors, then n is a prime number.
As 31 < J997 < 32, the only prime numbers we need to check as possible divisors of
997 are 2,3,5, 7, 11, 13, 17, 19,23,29, and 31. Upon division, we find that none ofthese
primes divides 997 evenly, so 997 is a prime number. To factor 1003, we work with the
same set of primes, since 31 < J I 003 < 32. Checking these, we hit paydirt with 17 and
find that 1003 = 17 x 59, the product of two primes. To verify that 59 is a prime, you need
only check that 59 isn't divisible by 2,3,5, or 7, since 7 < J59 < 8.
Therefore, the prime factorization of 999,991 is 17 x 59 x 997.
I . I Arithmetic II
Ordered Digits
How many positive integers have the property that their digits increase as read lefttoright?
Examples: 19,357, and 2589.
Solution
Each nonempty subset of the set of integers {I, 2, 3, 4, 5, 6, 7, 8, 9} yields such a number.
For example, the subset {2, 5, 8, 9} yields the integer 2589. An nelement set has 2
n
subsets
(including the empty set). In our problem, n = 9 and we exclude the empty set, so there
are 2
9
 I = 511 such numbers.
Bonus: Ordered Digits in a Square
What square numbers have the property that their digits are in nondecreasing order read
lefttoright?Examples: 122 = 144,13
2
= 169, and 83
2
= 6889.
Donald Knuth attacked this problem in one of his 1985 "Aha sessions," which were
classes where he and his students worked on challenging problems. You can find videos
of the sessions on the Stanford Center for Professional Development web pages
(http://scpd . stanford. edu/knuth/).
Let's show the existence of an infinite collection of perfect squares whose digits are in
order. This was found by Anil Gangolli.
We will demonstrate that
(6 ... 67)2 = 4 ... 48 ... 89, n:::: l.
'".' '".' '".'
n
n+l
n
For example, the case n = I is the statement that 67
2
= 4489.
Since
we have
441
= 4 ... 4+ + 4 ... 4+ +
'".' 9 '".' 9 9
2n+2 n+l
= 4 ... 48 ... 89.
'".' '".'
n+l n
A similar infinite family is:
(3 ... 34)2 = 1 ... 1 5 ... 56, n:::: l.
'".' '".' '".'
n
n+l
n
There are many other infinite families with the desired property.
12 I Elementary Problems
What's the Next Term?
Give the next term in each of the following sequences:
(a)
1, 4, 9, 16, 25, 36, 49, 64, 81, ...
(b)
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
(c)
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, ...
(d)
0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, ...
(e)
1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60, ....
Solution
For each sequence, try to relate the numbers to a pattern that you have seen before.
(a) The terms are the square numbers, n
2
• So the next term is 10
2
= 100.
(b) The terms are those of the famous Fibonacci sequence, {In}, defined by 10 = 0,
ft = 1, and In = InI + In2, for n ::: 2. So the next term is 144.
(c) The terms are the entries in Pascal's triangle (see Toolkit), reading across and down.
So the next term is 10.
(d) The terms are the values of Jl'(n), the number of primes less than or equal to n. So the
next term is Jl'(19) = 8.
(e) The terms are the smallest numbers with n positive divisors. So the next term is the
smallest number with 13 positive divisors. This number is 212 = 4096.
Bonus: The Online Encyclopedia of Integer Sequences
A good resource for tracking down an integer sequence is ''The OnLine Encyclopedia
of Integer Sequences," presided over by Neil J. A. Sloane (the online address is
www. research _ att. comrnjas/ sequences/). Simply type the first terms of a
sequence that you are interested in, press enter, and the search engine will show you
sequences that match. For example, if we enter the terms from (e) above,
1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60,
then the search comes up with sequence A005179 (the smallest number with n divisors).
1.2 Algebra 13
1.2 Algebra
How Does She Know?
A mother asks her daughter to choose a number between 1 to 10 but not reveal the number.
She then gives her daughter the following directions: add 7 to the number; double the
result; subtract 8; divide by 2; subtract the original number. She tells her daughter that the
final result is 3. How does the mother know this?
Solution
Suppose that the daughter chooses the number x (which can be any number). Then the
steps can be written algebraically as:
choose a number x
add 7 x+7
double the result 2(x + 7) = 2x + 14
subtract 8 2x + 14  8 = 2x + 6
divide by 2 (2x + 6)/2 = x + 3
subtract the original number x + 3  x = 3.
Thus, the initial number x has disappeared from the computation and the final result is 3,
regardless of x.
As an algebraic identity, we are simply saying
2(x + 7)  8 _ x  3
2  .
Bonus: Clock Magic
Ask a friend to think of any number on a clock (a clock with twelve numbers) without
revealing the number. Tell her that you are going to point to different numbers on the clock
while she silently counts up to 20, starting with her secret number and adding 1 every time
you point to a number. When she reaches 20, she should say "stop." You can arrange it so
that when she says "stop," the number you are pointing to is the number she chose. How
do you do this?
Keeping a silent count, you begin by pointing to seven numbers on the clock at random.
(Your friend cannot have said "stop" already because 20  7 = 13, and 13 is not a number
on the clock.) Then you point to the 12, then the 11, then the 10, and so on, going backwards
around the clock, until your friend says "stop." After the first seven numbers, your count
plus the number that you are currently pointing to always add up to 20 (e.g., 8 + 12, 9+ 11,
10 + 10). So when your friend says "stop," the number that you are pointing to is equal
to 20 minus your count, and this is the number that your friend started her count with.
For example, if your friend is thinking of 7:00, then you will point to thirteen numbers
altogether (20  7 = 13), and the last number that you point to will be 20  13 = 7.
14 I Elementary Problems
In algebraic terms, let
f = friend's number,
y = your count,
p = number you are pointing to (after the first seven).
Note that y and p are not constants; they change with each step of the count. We always
have
p=20y.
Hence, when your friend says "stop,"
f = 20 y = p.
How Cold Was It?
It was so cold that Fahrenheit equaled Centigrade. How cold was it?
Solution
We seek a number of degrees that represents the same temperature in Centigrade and
Fahrenheit. We can solve this problem if we know the freezing temperature and the boil
ing temperature of water in both Centigrade (C) and Fahrenheit (P). As shown in the table
below, water freezes at 0
0
C and 32
0
F, and it boils at 100
0
C and 212
0
F.
water freezes
water boils
C F
We observe from the table that a change in temperature of 100
0
C is equivalent to a
change in temperature of 180
0
F. So a change in temperature of 10
0
C is equivalent to a
change in temperature of 18
0
F. Hence,
30
0
C = 220 F
40
0
C = 40
0
F.
Therefore, 40
0
represents the same temperature in Centigrade and Fahrenheit. The an
swer is unique since as the temperature moves away from 40
0
, the Fahrenheit reading
changes by more than the Centigrade reading.
1.2 Algebra 15
Bonus: Centigrade to Fahrenheit
Let's find the conversion formula from c degrees Centigrade to f degrees Fahrenheit.
4
The
proportional change of temperature found in the Solution may be written
(f  32t
=
100° 180°
Upon simplification, we obtain the linear relation
(9/5)cO + 32° = r.
For example, the average normal human body temperature is about 37° C, so this is
(9/5)37° + 32° = 99° F (to two significant digits).
Man vs. Train
A man is crossing a train trestle on foot. When he is 4/7 of the way across he sees a train
corning toward him headon. He realizes that he has just enough time to run toward the
train and get off the trestle or to run away from the train and get off the trestle. If the man
can run 20 kilometers per hour, how fast is the train going?
417
_ ++___ /&El
f l\ L
317
/\
E
417
Solution
It's easy to get bogged down with formulas involving distances, rates, etc. A simple solu
tion obviates the need for complicated calculations.
The solution hinges on the fact that the man and train can be together at two points. Let's
distinguish between the near end and the far end of the trestle. The man can meet the train
at the near end after running 3/7 of the length of the trestle. If instead he runs this same
distance toward the far end, then the train will be at the near end at the same time as he is
1/7 of the length of the trestle from the far end. Since he can meet the train at the far end,
the train goes 7 times faster than he does, or 140 kilometers per hour.
4The Centigrade temperature scale was invented in 1742 by the astronomer Anders Celsius (17011744). The
Fahrenheit scale was invented around 1724 by the physicist Daniel Fahrenheit (16861736).
16 I Elementary Problems
Bonus: Sum of a Geometric Series
Speaking of trains and simple solutions, the story goes that John von Neumann
5
was asked
a problem of the following type: Two trains are headed toward each other on the same
track, each traveling at 60 miles per hour. When they are 2 miles apart, a fly leaves the
front of one train and travels at 90 miles per hour to the front of the other train. (Flies don't
really fly this fast.) Then it travels back to the first train, and so on, back and forth until the
two trains crash. How far does the fly travel?
There is a quick way and a methodical way to solve this problem. The quick way is to
realize that the trains crash in I minute (since they start 2 miles apart and are traveling at
the rate of 1 mile per minute). Since the fly travels at the rate of 1.5 miles per minute, it
travels 1.5 miles in this time.
The methodical way to solve the problem is to sum an infinite geometric series. The
fly completes the first step of its journey (traveling from one train to the other) in 4/5 of a
minute, since in this time the oncoming train travels 4/5 of a mile and the fly travels 6/5 of
a mile. Therefore, after 4/5 of a minute, we have a similar version of the original problem,
but with the trains 2  2 x 4/5 = 2/5 miles, or 1/5 of the original distance, apart. This
pattern continues, forming an infinite geometric series of distances, the sum of which is the
total distance the fly travels:
Let's find the sum of the infinite geometric series
S = I + r + r2 + r3 + ... ,
where r is a real number with I < r < I. (We need these bounds on r so that the series
converges; more on this in a moment.) Multiplying by r, we obtain
Subtracting the second equation from the first yields
or
and so
SSr=l,
S(lr) = 1,
I
S=.
lr
Letting r = 1/5, we complete our calculation of the distance traveled by the fly:
6 I 3
 x =  miles
5 I  1/5 2
(the same answer as before).
5 John von Neumann (19031957) made contributions in several areas of mathematics. including computer sci
ence and game theory.
1.2 Algebra 17
Von Neumann gave the correct answer instantly, so the questioner said that he surely
must have calculated the time the fly travels (our first method). Von Neumann replied that,
on the contrary, he had summed the series.
By the way, we can also obtain the sum of a finite geometric series,
s = I + r + r2 + r3 + ... + r
n
,
where r is any real number not equal to I. As before, multiply S by r, take the difference
of the two equations, and solve for S. This yields
1 r
n
+
1
S=
Ir
The convergence of the infinite geometric series is based on what happens to the finite
geometric series as n increases. If I < r < I, then the term rn+I gets closer to 0 as
n gets larger. Hence, as n tends to infinity, the sum of the finite geometric series tends to
1/( I  r), which is our formula for the sum of the infinite geometric series. In this sense,
we say that the infinite series converges (and the sum is given by our formula).
The sum with r = 1/2, i.e.,
I I I I
1++++···= =2
2 4 8 11/2
is particularly memorable. We see in the picture below that a rectangle of dimensions I x 2
is completely filled by smaller rectangles whose areas are the geometrically decreasing
terms of the series.
2
p:
1/4
1/8
I
112
Uphill, Downhill
A bicyclist goes up a hill at 30 kmlhr and down the same hill at 90 kmlhr. What is the
cyclist's average speed for the trip?
Solution
At first, you might think that the answer is the simple average of 30 kmlhr and 90 kmlhr,
i.e., 60 kmlhr. But this isn't correct since the cyclist spends less time at the faster rate.
18 I Elementary Problems
A quick way to find the average speed is to assume that the answer is independent of the
length of the hill. If that's true, then we can set the length of the hill to a convenient value,
say, 90 km. Then the trip takes 3 hours up the hill and I hour down. So the average speed
is 180 km /4 hr = 45 kmlhr.
To doublecheck this, suppose that the length of the hill is d km. Then the time going up
the hill is d /30 hr and the time going down the hill is d /90 hr. Hence, the average speed is
2d 2
I I = 45 kmlhr.
30 + 90
The average speed is called the harmonic mean of the two rates. As we have seen, the
harmonic mean is less than the arithmetic mean of the two rates (see the Bonus).
Bonus: Power Means
For any n positive real numbers XI, X2, ... , Xn and any real number p, we define the
ppower mean by the formula
for p '" 0, and
M
 ( )I/n
0 XI X2·· .Xn .
For p = 1, 0, and 1, these means are the arithmetic mean (AM), geometric mean (GM),
and harmonic mean (HM), respectively.
For XI, X2, ... , Xn fixed and not all equal, Mp is an increasing function of p. There is
equality in the means if and only if all the Xi are equal. In particular, we have the AM
GMHM inequalities: HM ::: GM ::: AM, with equality if and only if all the Xi are equal.
How Many Solutions?
How many solutions has the equation
X + 2y + 4z = 100,
where X, y, and z are nonnegative integers?
Solution
There are 26 choices for z, namely, all integers from 0 to 25. Among these choices, the
average value of 4z is 50. So, on average, X + 2y = 50. In this equation, there are 26
choices for y, namely, all integers from 0 to 25. The value of X is determined by the value
of y. Hence, altogether there are 26
2
= 676 solutions to the original equation.
1.3 Geometry 19
Bonus: Distributions, Partitions, and Schur's Estimate
By changing the coefficients of x, y, and z, we obtain many variations of our problem, all
more difficult than the one we tackled.
If all the coefficients are I, then we have the equation
x + y + z = 100,
which is called a distribution. The number of solutions in nonnegative integers is C ~ 2 ) =
5151 (see "Bonus: The Correct Number of Orders").
If the coefficients are I, 2, and 3, we obtain the equation
x + 2y + 3z = 100,
which is a partition of 100 into three or fewer parts. The number of partitions of n into one
part is I. The number of partitions of n into two parts is L n j2 J. The number of partitions
of n into three parts is {n
2
j12}, where {} denotes the nearestinteger function. Hence, the
number of partitions of 100 into three or fewer parts is I + LIOOj2J + {l002jI2} =
I + 50 + 833 = 884.
Let a, b, and c be the coefficients of x, y, and z, respectively. If a, b, and c are relatively
prime integers (they have no factors in common), then the number of nonnegative integer
solutions to the equation
ax + by + cz = n
is approximated by Issai Schur's6 asymptotic estimate
n
2
2abc'
I .3 Geometry
A Quadrilateral from a Quadrilateral
Let ABC D be a quadrilateral. Let E, F, G, and H be the midpoints of sides A B, B C ,
CD, and DA, respectively. Prove that the area ofthe quadrilateral EFGH is half the area
of ABCD.
C
A
61ssai Schur (18751941) was a mathematician who worked primarily in algebra.
20 I Elementary Problems
Solution
Assume that the quadrilateral is convex, as in the picture (the concave case is similar). Add
the two construction lines AC and BD, as shown by dotted lines. By a simple theorem of
geometry (see Bonus), the area of triangle AEH is onefourth the area of triangle ABD.
Likewise, the area of triangle C F G is onefourth the area of triangle C B D. Hence, the area
of triangles AEH and CFG together is onefourth the area of the quadrilateral ABCD.
Similarly, the area oftriangles DGH and BEF together is onefourth the area of ABCD.
It follows that the area of the four triangles AEH, CFG, DGH, and BEF together is half
the area of ABCD. Therefore, the area of the complement of these triangles, which is the
quadrilateral EFGH, is half the area of ABCD.
Bonus: A Vector Proof
We give a quick vector proof that the area of triangle AEH is onefourth the area of triangle
ABD. Represent the points A, B, D, E, and H by vectors a, b, d, e, and h, respectively.
Then e = (a + b)/2 and h = (a + d)/2. Hence
I
he="2(db).
Thus, the vector h  e is parallel to the vector d  b and half its length. Hence, the line
segment E H is parallel to the line segment BD and half its length. It follows that triangle
A E H is similar to triangle A B D, with a constant of proportionality of onehalf. Therefore,
the area of triangle AEH is onefourth the area of triangle ABD.
Note. From the proof, we see that the quadrilateral EFGH is a parallelogram. It is called
the Varignon parallelogram, after Pierre Varignon.
7
The Pythagorean Theorem
Prove: In any right triangle, the area of the square on the hypotenuse is equal to the sum of
the areas of the squares on the other two sides. (See Toolkit.)
I+II=III
III
In the diagram, the areas satisfy the relation I + II = III.
This is half of the famous Pythagorean theorem. The other half is the converse statement:
if I + II = III, then the angle opposite III is a right angle.
7Pierre Varignon (16541722) was a mathematical physicist and early advocate of calculus.
1.3 Geometry 21
Solution
Here is the most visually compelling proofthat I know of. It requires very little explanation.
Both of the above figures show four copies of the given right triangle, arranged inside a
square. The shaded area in the figure on the left is the square on the hypotenuse. Clearly.
the shaded area doesn't change when the four triangles are rearranged as in the figure on the
right. In this figure, the shaded area consists of the squares on the two legs of the triangle.
Bonus: A OneTriangle Proof
The above proof employs four copies of the given right triangle. Here is a proof that uses
only the original right triangle.
Let ABC be a right triangle with rightangle C. Let D be the point on AB such that AB and
CD are perpendicular. Extend the line CD so that it meets the square on the hypotenuse at a
second point. (See the above figure.) By similar triangles, IABI/IBCI = IBCl/IBDI, and
hence IABI·IBDI = IBCl
2
• It follows that the two dark gray areas are equal. Similarly,
we can show that the two light gray areas are equal . Adding areas, we see that the area of
the square on the hypotenuse is equal to the sum of the areas of the squares on the other
two sides.
Nearly 100 proofs of the Pythagorean theorem are presented at "CuttheKnot"
(http://www.cuttheknot.org).asite "for teachers, parents and students who
seek engaging mathematics."
I Elementary Problems
Building Blocks
What are the proportions of a 30°60°90° triangle?
Solution
In the solution to "A Long Sum," we worked with a sum S written twice. Can we do
something similar in this problem?
Let's work with two copies of the given triangle. Let the given triangle be ABC with
A = 30°, B = 60°, and C = 90°. As shown in the diagram below, we put a copy of
ABC, labeled AB'C, next to ABC.
A
B B'
The larger triangle formed, A BB', is an equilateral triangle (it has three 60° angles). Hence,
if IBCI = I, then IBB'I = 2, and so also IABI = 2. Now, by the Pythagorean theorem,
IACI = ../3.
Bonus: Another Memorable Triangle
What are the proportions of a 36°_72°_72° triangle?
In our solution for the 30°_60°_90° triangle, we put two geometric pieces together. To
solve the present problem, we do the reverse, dividing the triangle into two pieces. In the
diagram below, ABC is a 36°_72°_72° triangle with A = B = 72° and C = 36°. The
triangle ABC is divided into two smaller triangles, another 36°_72°_72° triangle and a
36°36°108° triangle. Let IABI = I and IACI = IBCI = ¢. By similar triangles, ¢
satisfies the relation ¢ /1 = 1/ (¢  I), so that ¢2  ¢  I = O. From the quadratic formula
(Toolkit), we find that ¢ = (..j5 + 1)/2. Thus, ¢ is the famous "golden ratio" (more about
¢ in the problem "Irrational ¢").
B
C
I .3 Geometry 23
We see at once that
cos 36° = ifJ/2 = (.J5 + 1)/4
and
cos 72° = (ifJ 1)/2 = (.J5  1)/4.
A Geometric Inequality
In the figure below, show that a + b > 2c.
Solution
In the previous problem ("Building Blocks"), we saw a solution involving the construction
of some additional lines. Let's try the same trick here.
Augment the figure to make a parallelogram with diagonals of lengths 2c and 2d. Two
adjacent sides of the parallelogram and the diagonal of length 2c make a triangle, so by the
triangle inequality, a + b > 2c.
Bonus: A Squarable lune
It is impossible to construct a square of the same area as a given circle, using straightedge
and compass. However, the problem of "squaring a lune" is possible for certain lunes (a
lune is formed by two intersecting circles of different radii).
Starting with the diagram below, let's construct a square with the same area as the shaded
lune. This construction was discovered by Hippocrates of Chios (c. 470c. 410 BeE).
24 I Elementary Problems
A number of auxiliary lines and circles are helpful. In the following diagram, by the
Pythagorean theorem, the area of the semicircle on the hypotenuse of the inscribed right
triangle is equal to the sum of the areas of the semicircles on the two sides.
The shaded semicircle on the hypotenuse may just as well be moved to the upper half of
the circle. This yields two heavily shaded overlapping areas, shown below, where the area
is counted twice.
Subtracting overlapping areas, it follows that the area ofthe two lunes below is equal to
the area of the inscribed right triangle.
I. 3 Geometry 25
By symmetry, the area of one lune is equal to the area of one of the small right triangles.
Now, it's easy to square the lune. as shown in the diagram below.
A Packing Problem
Find a way to pack (without overlap) 5 unit squares inside a square of side length less than
3.
Solution
The packing below of five unit squares in a square of side length 2 + 1/,J2 :::;:: 2.707 was
proved by Frits Gobel to be bestpossible (the large square is as small as possible while
still containing five unit squares).
2+ 1/V2
Erich Friedman shows many packing configurations (squares in squares, circles in squares,
etc.) at http://www . stetson. edu/  efriedma/packing. html.
26 I Elementary Problems
Bonus: Covering With Unit Squares
Here is an unsolved covering problem: Prove that n
2
+ I unit squares in a plane cannot
cover a square of side length greater than n. (The perimeter and interior of the given square
must be covered.) Below is an illustration of the problem where n = 3. The ten unit squares
fail to cover a square of side length greater than 3.
3 +e
What's the Area?
Suppose that the large triangle below is equilateral with area I. What is the area of the
black region? (The black triangles form an infinitely nested pattern.)
Solution
Add dotted white lines as in the picture below.
, '
, '
, '
, '
, '
, '
~ ~
..;'T';:
" "
.' "
• • \ I
. . , ,
.' "
1.3 Geometry 27
There are 16 subtriangles. Omitting the central one, we see that in the first stage we cover
12/15 = 4/5 of the subtriangles. Since the pattern repeats, the black region has area 4/5.
Bonus: Calculation by Geometric Series
At each stage we cover 3/4 of the equilateral triangle, and the equilateral triangles decrease
in area by a factor of 16. So by the formula for the sum of a geometric series (p. 16). the
area is
3( I I ) 3 I 4
4 I + l6 + 162 + ... = 4' 1 1/16 = 5'
Volume of a Tetrahedron
Find the volume of a regular tetrahedron of edge length I.
Solution
Place the vertices of the tetrahedron at four vertices of a cube with edge length 1/../2.
(These are opposite pairs of vertices on opposite faces of the cube.)
The volume of the tetrahedron is the volume of the cube minus the volumes of four identical
isosceles right tetrahedra that are comers of the cube:
../2
12
Using a similar argument, we can prove that the volume of a regular octahedron of edge
length I is .Ji/3.
Bonus: Symmetry Groups
The way that the tetrahedron is inscribed in the cube above reveals a connection between
the symmetry groups of the regular tetrahedron and the cube. If we pick up the cube and
set it down again so that it occupies its original space. then the vertices. edges, and faces
of the cube may have changed position. The symmetry group of the cube is the group of
all such ways to reposition the cube. It's easy to find the order (number of elements) of
the symmetry group of the cube. Since we can set the cube down on any of its six faces,
and once we have done this we can rotate it in any of four ways, there are 6 . 4 = 24
28 I Elementary Problems
symmetries in all. However, we still need to see which 24element group this is. We know
that the group of permutations on 4 objects has 4! = 24 elements. This group is called
the symmetric group of order 4, denoted S4. In fact, the group of symmetries of a cube is
isomorphic (equivalent) to S4. To see this, wejust need to find four parts of the cube that are
permuted in all possible ways by the symmetries of the cube. The four diagonals of the cube
have this property. Every symmetry of the cube permutes (interchanges) the diagonals, and
conversely every possible permutation of the diagonals comes from a symmetry of the
cube.
Similarly, we can show that the symmetry group of a regular octahedron is S4.
Now that we know the symmetry group of the cube (S4), we find that the symmetry
group of the regular tetrahedron goes along for the ride. Every symmetry of the cube au
tomatically gives a symmetry of the regular tetrahedron (with the tetrahedron inscribed in
the cube), or it moves the vertices of the tetrahedron to the other four vertices of the cube.
How many symmetries of the regular tetrahedron are there? Since we can put the tetrahe
dron down on any of its four faces and then rotate the tetrahedron in any of three ways, the
regular tetrahedron has 4·3 = 12 symmetries. The symmetries of the tetrahedron comprise
a subgroup of S4 of order 12. It can be shown that this subgroup is the alternating group
A
4
, consisting of "even permutations" in S4.
Irrational fJ
Show that the golden ratio, ifJ = (.J5 + 1)/2, is an irrational number.
Solution
The golden ratio ifJ is perhaps the irrational number with the simplest proof of irrationality.
The definition of ifJ comes from the relation ifJ = 1/(ifJ  1) that we saw in the "Building
Blocks" problem. A rectangle with dimensions ifJ x 1 has the property that if a square is
removed, the remaining rectangle has the same proportions as the original.
We will prove by contradiction that ifJ is irrational. Suppose that ifJ is a rational number,
say, n / m, where m and n are positive integers. Then we can construct such a rectangle
with sides m and n (see the diagram).
m nm
m
n
Now the relation ifJ = 1/(ifJ  1) implies that
n 1 m
=
m n/m 1 nm
Hence, ifJ is equal to a fraction, m/(n  m), with smaller positive integral numerator and
denominator. But this process could be repeated forever, which is clearly impossible, since
1.3 Geometry 29
we started with integers m and n. Therefore, our assumption that ifJ is rational is false; it is
irrational.
Bonus: Irrationality of .../i
There are several proofs that ../2 is an irrational number. One wellknown proof involves
investigating the parity of the numerator and denominator of a supposed rational represen
tation of ../2. By contrast, here is a proof using an infinite regression argument.
Suppose that ../2 = p / q, where p and q are positive integers. Then p2 = 2q2, and so
../2 = !!.. = p(p  q) = p2  pq = 2q2  pq = q(2q  p) = 2q  p.
q q(pq) q(pq) q(pq) q(pq) pq
Since q < p < 2q, we see that 0 < 2q  P < p and 0 < p  q < p. Hence, we have a
pair of positive integers, 2q  p and p  q, which are smaller than p and q, respectively,
and their quotient is ../2. But this process could be repeated forever, producing smaller
and smaller positive integers whose quotient is equal to ../2. Clearly, this is impossible.
Therefore ../2 is irrational.
Tangent of a Sum
In trigonometry, the formula for the tangent of a sum of two angles is
tan(A + B) = tan A + tan B .
I  tan A tan B
Find a formula fortan(A + B + C + D + E) in terms ofthe tangents of the angles A, B,
C, D,and E.
Solution
We start by finding a formula for the tangent of the sum of three angles. Using the formula
given for the tangent of the sum of two angles, we have
(A B C)
tan(A + B) + tanC
tan + + = ':'_____ :
1  tan(A + B) tan C
=
tanA+tanB + tan C
itan A tan B
1  ( tanA+tanB ) tanC
itan A tan B
tan A + tan B + (1  tan A tan B) tan C
1  tan A tan B  (tan A + tan B) tan C
tan A + tan B + tan C  tan A tan B tan C
ItanAtanB tanAtanC tanBtanC'
Notice that the numerator in this formula contains the sum of tan A, tan B, and tan C,
as well as the product of these terms, while the denominator contains all products of pairs
of these terms. Accordingly, we introduce notation for the sum of all products of k tan
gent terms, where 1 ::: k ::: 3. These expressions are based on the elementary symmetric
30 I Elementary Problems
polynomials (see Bonus). Define
sl(A, B, C) = tan A + tan B + tanC,
s2(A, B, C) = tan A tan B + tan A tan C + tan B tanC,
s3(A, B, C) = tan A tan B tan C.
Thus, we can write our formula for the tangent of the sum of three angles as
(A B C)
SI (A, B, C)  s3(A, B, C)
tan++ = .
1 s2(A, B, C)
We define similar expressions for sums of products of tangents of four angles, e.g.,
s2(A, B, C, D) = tan A tan B + tan A tanC + tan A tan D + tan BtanC
+ tan B tan D + tan C tan D,
and of five angles, e.g.,
s4(A, B, C, D, E) = tan A tan B tan C tan D + tan A tan B tan C tan E
+tanAtanBtanDtanE+tanAtanCtanDtanE
+ tan B tan C tan D tan E.
Now we find a formula for the tangent of the sum of four angles:
(
tan(A + B + C) + tan D
tan A + B + C + D) = 1 _ tan(A + B + C) tan D
s) (A,B,C)S3(A,B,C) + tan D
= __ __ __ __
1  (S\(A,B,C)S3(A,B,C») tan D
IS2(A,B,C)
=
=
SI (A, B, C)  s3(A, B, C) + (1  s2(A, B, C» tan D
1 s2(A, B, C)  (SI (A, B, C)  s3(A, B, C» tan D
SI (A, B, C)  s3(A, B, C) + tan D  s2(A, B, C) tan D
1  s2(A, B, C)  SI (A, B, C) tan D + s3(A, B, C) tan D
SI (A, B, C, D)  s3(A, B, C, D)
1  s2(A, B, C, D) + s4(A, B, C, D)'
Try to take the next step and deduce the following formula for the tangent of the sum of
five angles:
(A B C D E)
SI (A, B, C, D, E)  s3(A, B, C, D, E) + s5(A, B, C, D, E)
tan++++ = .
1  s2(A, B, C, D, E) + s4(A, B, C, D, E)
A pattern is apparent. Given positive integers nand k, such that 1 ::: k ::: n, let Sk stand
for sk(tan 0
1
, ... , tan On), the sum of all products of k of the tangents. Then the formula
for the tangent of the sum of n angles is
SI  S3 + S5  •••
tan(OI + ... + On) = ,
1  S2 + S4  •••
I. 3 Geometry 31
where we set Sk = 0 if k > n, so that the series in the numerator and denominator are
finite.
Let's give an aha! proof of this formula. The proof uses complex numbers and Euler's
formula
cos 0 + i sin 0 = e
jo
.
Setting 0 equal to the sum of our n angles, we obtain
COS(OI + ... + On) + i sin(OI + ... + On) = ej(OI +·+On) = e
jOI
.•• e
jOn
,
and hence the identity
COS(OI + ... + On) + i sin(OI + ... + On) = (cos 01 + i sin Od .• . (cos On + i sin On).
The real part of the left side of this identity is COS(OI + ... + On). The real part of the right
side consists of products of an even number of i sin OJ terms (since i 2 = I) together with
a complementary number of cos OJ terms. Hence, each product consists, for some m, of
2m terms of the form sin OJ and n  2m terms of the form cos OJ, multiplied by (_l)m.
The imaginary part of the left side of the identity is i sin(OI + ... + On). The imaginary
part of the right side consists of products of an odd number of i sin OJ terms together with
a complementary number of cos OJ terms. Hence, each product consists, for some m, of
2m + I terms of the form sin OJ and n  2m  I terms of the form cos OJ, multiplied by
i(l)m.
Upon dividing both sides of the imaginary part of the identity by the identity for COS(OI +
... + On), we obtain on the left side i tan(OI + ... + On). On the right side, we also divide
numerator and denominator by cos 0
1
••• cos On, thus killing off all the cos OJ terms and
turning the sin OJ terms into tan OJ terms. The resulting monomials can be grouped together
to form all terms of the form i (_l)m S2m+I in the numerator and all terms of the form
(l)m S2m in the denominator. Dividing by i establishes the claimed formula.
Bonus: Elementary Symmetric Polynomials
The elementary symmetric polynomials of order n, in the variables Xl, X2, ••• , X
n
, are
Sl = Xl + X2 + ... + Xn ,
S2 = L XjXj,
l::::,j<j::::,n
For example, with n = 3, we have
In our Problem, we worked with Xj = tan OJ.
32 I Elementary Problems
We will see in the Bonus to "Perrin's Sequence" that the elementary symmetric polyno
mials can be combined to produce any symmetric polynomial.
We show here Newton's identities relating the elementary symmetric polynomials to the
symmetric polynomials that are sums of powers of the variables. Let's look at an example.
Define
Then
P3 =xi + +
o 0 0 3
Po = X I + X
2
+ X3 =
PI = XI + X2 + X3
222
P2 = X I + X
2
+ X3
P3 = xi + +
=(Xl +X2 +xi+xi)  (XIX2+X2X3+X3Xl)(Xl +X2+X3) + 3XIX2X3
=SIP2  S2Pl + S3PO·
In general, with Pk = xf + + ... + x! and So = I, we have Newton's identities:
n
I:>kPnk(I)k = 0, n 1.
k=O
1.4 No Calculus Needed
A Zigzag Path
Two points A and B lie on one side of a line I. Construct the shortest path that starts at A,
touches I, and ends at B.
_A
B
Solution
We know that a straight line is the shortest distance between two points. Can we use this
fact?
As in the figure below, let B' be the symmetric point to B on the other side of I. Given
any choice of point P on I, the distance from P to B is the same as the distance from
P to B'. Hence, the length of the path from A to P to B is the same as the length of the
path from A to P to B'. The shortest path from A to B' is the straight line segment AB'.
Therefore, the intersection of this line segment with 1 determines the point P such that the
path from A to 1 to B is the shortest possible.
1.4 No Calculus Needed 33
A
B
B'
Bonus: Another Zigzag Path
Given two parallel lines [ and [', and points A and B between [ and [', what is the shortest
path that starts at A, touches [, then touches [', and ends at B?
.
. ,
B'
I ' A ~ L 7 ~ B
, .'
,
,
,
A'e#"
Let A' be the point symmetric to A with respect to [, and B' the point symmetric to B with
respect to ['. Construct the line from A' to B'. The intersections of this line with [ and ['
are the points where the desired path touches the parallel lines.
I. M. Yaglom in the books [21] and [22] presents this and other beautiful geometric
construction problems.
A Stack of Circles
What is the sum of the circumferences of the infinite stack of circles inside the triangle in
the picture below? (Each circle is tangent to sides of the triangle and to the circles above
or below it.)
34 I Elementary Problems
The height of the triangle is 12 (by the Pythagorean theorem). Hence, the sum of the
diameters of the circles is 12. The formula for the circumference of a circle of diameter d
is C = 1fd. Therefore, the sum of the circumferences of all the circles is 121f.
Isn't this easier than finding the diameter of each circle, applying the circumference
formula, and summing the infinite series?
Bonus: A Sum of Areas
What is the sum of the areas of the circles in the diagram above? This is easy to find using
simple geometry and the sum of a geometric series (see p. 16). Let r be the radius of the
largest circle (see the diagram below). Drop altitudes from the center of the largest circle
to the three sides of the triangle, thereby dividing the triangle into three smaller triangles.
The sum of the areas of these smaller triangles is equal to the area of the given triangle.
Hence
I I I 1
"2 lOr + "2
13r
+ "2
13r
= "2
10
.
12
,
and r = 10/3. (By the way, we'll use this method for finding the inradius of a triangle in
"Cutting and Pasting Triangles.")
10
Constructing a tangent line to the largest circle at its top, we see that the given triangle is
cut into two pieces, with the top piece similar to the given triangle. The given triangle has
height 12. The height of the smaller, similar triangle is 12  2r = 16/3. Hence, the ratio
of the smaller height to the larger one is
16/3 4
x=U="9'
The secondlargest circle has radius r x, the third largest r x
2
, etc. Therefore, the sum of
the areas of all the circles is
(
10)2 2 4 (10)2 ( I ) 1801f
1f  (I+x +x +"')=1f   =.
3 3 I  x
2
13
1.4 No Calculus Needed 35
A Farmer's Field
A farmer wishes to fence in a rectangular field using 300 meters of fence. One side of the
field needs no fencing since it is alongside an already existing fence. What is the largest
possible area of the field and what dimensions give this area?
Solution
Let the length of fence parallel to the existing fence be x and the two other lengths be y.
We are given that x + 2y = 300 m.
x
It's a common calculus problem to determine the dimensions x and y that yield the
maximum area xy. However, we can avoid calculus by using symmetry. Consider the
mirror image of the field with respect to the existing fence.
x
y y
y y
x
The field and its mirror image together make a rectangle of dimensions x x 2 y. Because
the field is always half of the area of this larger rectangle, whatever dimensions maximize
the area of the larger rectangle also maximize the area of the field. The perimeter of the
larger rectangle is fixed (it is 600 m). Since the rectangle of fixed perimeter with largest area
is a square, the maximum area of the field occurs when x = 2y. Hence, the dimensions
that yield the maximum area of the field are y = 100 m and x = 200 m, and the area is
xy = 20,000 m
2
•
Bonus: A Can of Minimum Surface Area
A cylindrical can is to be made to hold a certain volume. In what proportion are its radius
and height so that the can has minimum surface area?
Let h be the height of the can and r the radius of its base. We will show that h = 2r.
Let the can be inscribed in a rectangular box with dimensions 2r x 2r x h, with its base
circumscribed in the base of the box. The ratio of the area of the base of the cylinder to
the area of the base of the box is rr r2 / (2r)2 = rr / 4. The ratio of the area of the top of
the cylinder to the area of the top of the box is of course the same. The ratio of the lateral
surface area of the cylinder to the lateral surface area of the box is 2rrrh/8rh = rr/4.
Hence, the ratio of the total surface area of the can to the total surface area of the box is
36 I Elementary Problems
rr/4. The ratio ofthe volume ofthe can to the volume of the box is rrr2h/(2r)2h = rr/4.
The fact that these ratios are equal is unimportant; the relevant thing is that they are both
constants. Therefore, the surface area of the can is minimized when the surface area of the
circumscribing box is minimized. Since a box of given volume is minimized when the box
is a cube, the minimum surface area occurs when h = 2r. I leave it to you to prove the fact
that a box of given volume and minimum surface area is a cube. You can do it with two
applications of the isoperimetric inequality that the rectangle of given perimeter having the
greatest area is a square (see p. 36).
CompostingA Hot Topic?
Suppose that a compost bin is to be made so that the structure looks from above like the
letter E, with three parallel equallength pieces of fence in one direction and two equal
length pieces of fence in a line in the perpendicular direction. Given that the total length of
fencing is fixed, what dimensions yield the maximum area of the bin?
Solution
Let the segments of fence have lengths x and y, as shown in the left diagram below.
x
y y
x
y y
x x x x
We seek to maximize the area ofthe rectangle bounded by the E, that is, x(2y), subject to
the constraint 3x + 2y = /, where / is the amount of fencing available. We could solve
this problem using calculus, but there is a neat solution using only geometric reasoning.
Rearrange the segments of fence according to the right diagram above. The area of this
rectangle is (3x)(2y), which is three times the area that we started with. Hence, the values
of x and y that maximize the new area are the same as those that maximize the original
area. The perimeter of the rectangle is fixed (it is 6x + 4y = 2/). The area of a rectangle
of fixed perimeter is maximized when the rectangle is a square. In our case this means that
3x = 2y = //2, and so x = //6 and y = //4. Thus, half of the fencing is used in the
set of three parallel pieces and half in the set of two collinear pieces.
By the way, we can give an aha! proof that the square is the rectangle of fixed perimeter
with the greatest area. This is called an isoperimetric inequality. Suppose that we have a
square and a rectangle (not a square) of the same perimeter. We will show that the square
has the greater area. As in the diagram below, the square ABeD and the rectangle AEFG
are positioned so that they share a vertex A and have parallel corresponding sides. The
I. 4 No Calculus Needed 37
rectangle cuts the sides of the square at points G and H. The rectangle and square have
the shaded area in common. Since the perimeters of the square and rectangle are equal,
IHFI = IBEI = IDGI = ICHI. It follows that the unshaded area in the square is
greater than the unshaded area in the rectangle (since ICDI > IEFI). Therefore, the area
of ABCD is greater than the area of AEFG.
D C
A B E
Bonus: The AMGM Inequality
The arithmetic meangeometric mean (AMGM) inequality (see Toolkit) follows instantly.
Let a = IAEI and b = IAGI. Then
ab <
 2 '
or
J;;b<a+b.
 2
Equality occurs if and only if a = b.
Three Sines
Find the maximum value of sin A sin B sin C, where A, B, and C are the angles of a
triangle.
Solution
We are given that A, B, and C are positive numbers whose sum is 1f; hence sin A, sin B,
and sin C are positive. Two steps make finding the maximum value simple. First, by the
arithmetic meangeometric mean inequality,
(
sin A + sin B + sin C ) 3
sin A sin B sin C :5 3 '
with equality if and only if A = B = C = 1f /3. Second, since sin x is a concave down
ward function (see Bonus) for 0 < x < 1f, we have
sin A + sin B + sin C . (A + B + C)
3 :5 sm 3 '
with equality if and only if A = B = C = 1f /3. Therefore
. .. . (A + B + C) . 1f (v'3)3 3v'3
sm A sm B smC :5 sm
3
3 = sm
3
"3 = T = 8'
with equality if and only if A = B = C = 1f/3.
38 I Elementary Problems
Bonus: Convex Functions
A realvalued function f is convex on an interval I if
f«1  A)a + Ab) :::: (1  A)f(a) + Af(b),
for all a, bEl and 0 :::: A :::: 1. Geometrically speaking, f is convex if f lies below
its secants. In the diagram below, which illustrates the case A = 1/2, we can see that
f ( at
b
) :::: !(b) .
a
JENSEN'S INEQUALITY. Suppose that f is convex on I. If a I, ... , an E I and A I, ... , An
are nonnegative real numbers such that Al + ... + An = I, then
Equality occurs if and only if all the aj are equal or f is a linear function.
If the function  f is convex (i.e., f is concave downward), as is the case for the sine
function in our Problem, then the inequality is reversed.
Let's prove Jensen's inequality in the case where n = 4 and A = 1/2. Since f is convex
(we'll take the interval I for granted),
f
(
a + b) < f(a) + f(b)
2  2 '
with equality if and only if a = b (we'll assume that f is not a linear function). Now we
can use this hypothesis twice:
f (a
l
+ a
2
: a3 + a
4
) = f
f ( at ) + f )
<...:....'...:...'
2
!(a d+ !(a2) + !(a3)+ !(a4)
< __ 2"____ .... 2'_
2
1.4 No Calculus Needed 39
Our inequality is established, with equality if and only if al = a2 = a3 = a4.
We can use the same procedure to prove Jensen's inequality for n any power of 2. But
how do we prove it for, say n = 3? We use a little technique credited to Augustin Louis
Cauchy (17891857). Set a4 = (al + a2 + a3)/3. Then (al + a2 + a3 + a4)/4 =
(al + a2 + a3)/3, and hence
(
a
l
+ a2 + a
3
) < !(ad + !(a2) + !(a3) + ! (a
l
+al+a
3
)
! 3  4 .
Simplifying, we obtain
Equality occurs if and only if al = a2 = a3. The general statement of Jensen's inequality
can be proved similarly or by induction on n.
2
Intermediate Problems
I hope that you enjoyed the elementary problems. Now let's try a selection of somewhat
more difficult problems. In this chapter, we can expect to use familiar techniques from
calculus and other branches of mathematics. As usual, we are looking for illuminating
proofs. Aha! solutions are to be found!
2.1 Algebra
Passing Time
At some time between 3:00 and 4:00, the minute hand of a clock passes the hour hand.
Exactly what time is this? (Assume that the hands move at uniform rates.)
Solution
Let's solve the problem in a mundane way first (before giving an aha! solution). We reckon
time in minutes from the top of the hour (12 on the clock). Suppose that the minute hand is
at t minutes and the hour hand is, correspondingly, at 15 + t /12 minutes. (The term t /12 is
due to the fact that in 60 minutes the hour hand advances 5 minutes.) When the two hands
coincide, we have t = 15 + t /12, and hence t = 16 + 4/11. Therefore the solution is
3: 16+41l1 minutes.
In order to delve deeper into this problem, let's answer the same question for the time
between 2:00 and 3:00 when the minute hand and hour hand coincide. Using the same
reasoning as before, we obtain t = 10 + t/12, and hence t = 10 + 10/11, yielding the
solution 2: 10+ lOll 1 minutes. We see fractions with 11 in the denominator in both cases.
Reflecting on this, we realize that in the course of twelve hours the minute hand and hour
hand coincide eleven times. Specifically, this happens at 12:00; at some time between 1 :00
and 2:00; between 2:00 and 3:00 (we already figured this one out); between 3:00 and 4:00
(we figured this one out, too); between 4:00 and 5:00; between 5:00 and 6:00; between
41
42 2 Intermediate Problems
6:00 and 7:00; between 7:00 and 8:00; between 8:00 and 9:00; between 9:00 and 10:00;
and between 10:00 and II :00. The two hands do not coincide between 12:00 and I :00, or
between II :00 and 12:00, because the minute hand travels faster than the hour hand. By
symmetry, the eleven coincidences are equally spaced around the circular face of the clock.
We immediately see that the coincidence between 3:00 and 4:00 occurs 3/11 of the way
around the circle, i.e., at 3/11 x 60 = 16 + 4/11 minutes past 3:00.
Bonus: What About the Second Hand?
There is no time other than at 12:00 when the hour hand, the minute hand, and the second
hand of the (ideal) clock all coincide. The reason is that the minute hand and second hand
coincide at 59 points equally spaced around the circle, and the numbers II and 59 have no
common factor. (By the way, the hour hand and second hand coincide at 719 points equally
spaced around the circle.) Other than near 12:00, when are a clock's second hand, minute
hand, and hour hands closest together? (This problem is posed and answered in Martin
Gardner's treasure trove [7] but the solution isn't explained in detail.)
The strategy is to look at the eleven coincidences between minute hand and hour hand,
and determine where the second hand is at those times. When the second hand is closest,
that will give us nearly the time at which the second, minute, and hour hands are closest.
The coincidence of minute hand and hour hand between 1:00 and 2:00 occurs 1/11
around the circle, which is at 5 + 5/11 minutes, and hence the second hand is 5/11 around
the circle (rather far from the coincidence of minute hand and hour hand). Similarly, the
coincidence of minute hand and hour hand between 2:00 and 3:00 occurs 2/11 around the
circle, which is at 10 + 10/11 minutes, and hence the second hand is 10/11 around the
circle (also far). Continuing in this manner, we find that the coincidences of minute hand
and hour hand at which the second hand is closest are at 3: 16+4111 minutes and 8:43+7111
minutes. At these times, the second hand is 4/11 and 7/11 of the way around the circle,
respectively. In both cases, when the second hand gets as close as possible, it coincides with
the hour hand (since the minute hand moves faster than the hour hand). The coincidence
between second hand and hour hand (measured in seconds) that occurs between 3:16 and
2.1 Algebra 43
3: 17 is given by
16 t
t = 15 + 12 + 720'
and hence t = 11760/719 (seconds) = 16 + 196/719 (minutes). So the solution is
3: 16:16+2561719 seconds. The difference between the minute hand and hour hand at this
time is
16+256/719 16+196/719 1 f . I
60  60 = 719 0 the CIrC e.
This makes sense because the minute hand is at some multiple of 1/719 around the circle
(as its position is dictated by the hour hand's position), and the closest it can be is 1/719
of the circle. The other (symmetric) solution is 8:43:43+4631719 seconds.
Sums to 1,000,000
Find all sequences of consecutive positive integers that sum to 1,000,000.
Solution
This is the kind of problem that we could crunch out on a computer, but let's try to find a
deft mathematical solution.
The crux of the method lies in what to focus on. Let n be the number of terms in the
sequence and v the average of the terms. Then
nv = 1,000,000.
If v is an integer, then both n and v are integer divisors of 1,000,000. When is v an integer?
If n is odd, then v is an integer, since it is equal to the middle term of the sequence.
However, if n is even, then v is not an integer; it is equal to the average of the two middle
terms of the sequence (and hence is a halfinteger). So it seems that we must consider the
cases n odd and n even separately, and that the n even case is a little tricky. Believe it or
not, there is a way to ensure that n is odd, and this is where the aha! realization comes in.
The problem asks for sequences of positive integers but let's relax the condition tem
porarily to any integers (positive, negative, or zero). If we have a sum
a +···+b
of consecutive positive integers, then
(a  1) + ... + (a  1) + a + ... + b
is also a sum of consecutive integers. The new sum is equal to the old sum, as we have
introduced only 0 (if a = 1) or 0 and pairs of numbers that sum to 0 (if a > 1). Moreover,
the parity of the number of terms switches (as we have introduced an odd number of new
terms). Therefore, the sequences we are looking for occur in companion pairs, one with
an even number of terms and one with an odd number of terms, and one containing only
positive integers and the other containing some nonpositive integers.
By the above discussion of the companion sequences, we may focus on the sequences
where n is odd and therefore v is an integer; that is to say, n is an odd divisor of 1,000,000.
44 2 Intermediate Problems
Since the prime factorization of 1,000,000 is 2
6
.5
6
, the choices for n are 1,5,5
2
,5
3
,5
4
,
55, and 56, and each of these seven choices gives rise to exactly one solution (the resulting
sequence or its companion). The respective values of v are 1,000,000, 200,000, 40,000,
8000, 1600, 320, and 64. Hence, the sums and their companion sums are, respectively,
1,000,000 999,999 + ... + 1,000,000
199,998 + ... + 200,002 199,997 + ... + 200,002
39,988 + ... + 40,012 39,987 + ... + 40,012
7938 + ... + 8062 7937 + ... + 8062
1288 + ... + 1912 1287 + ... + 1912
1242 + ... + 1882 1243 + ... + 1882
7748 + ... + 7876 7749 + ... + 7876.
For example, to find the sum for n = 5 and v = 200,000, we calculate as the beginning
and ending terms v  (n  1)/2 = 199,998 and v + (n  1)/2 = 200,002.
We confirm that seven sequences have all positive terms.
Bonus: Sums to Any Number
For the general case of sequences of consecutive positive integers that sum to any given
"target integer," the argument is similar to the one above. The number of such sequences
is the number of odd divisors of the target integer. Hence, it is the product of terms of the
form e + 1, where pe ranges over all odd prime power divisors of the target. If the target
integer is a power of2, then the only such sequence is the number itself. (See "fundamental
theorem of arithmetic" in the Toolkit.)
An Odd Determinant
Does the matrix
[
1030 + 5
105 + 6
10
14
+ 80
10
50
+ 2
have a multiplicative inverse?
Solution
10
10
+ 4
10
100
+ 3
10
19
+ 4
1013 + 6
10
7
+2
10
8
+ 10
10
4
+5
10
23
+ 8
Let's determine whether the determinant of this matrix is even or odd. Replacing all even
entries by ° and all odd entries by I, we obtain the matrix
u;! n
2.1 Algebra 45
The determinant of this matrix is odd (it is 1). So the same is true of the original matrix
(since the determinant of a matrix is computed by addition and multiplication operations
on its entries). Hence, the determinant of the matrix is not 0 and the matrix is invertible.
Bonus: Inside or Outside?
Here is another problem that looks baffling at first but has a simple parity (even/odd) solu
tion. Can you tell at a glance whether the point is inside or outside the curve?
I

I
I
I
I
I
I
•
I
I
I
I
'
An easy way to do it is to draw a ray from the point and count the number of times
it crosses the curve. Each time the ray crosses the curve, it moves from inside the curve
to outside the curve or from outside the curve to inside the curve (this follows from the
Jordan curve theorem). In the picture below, the ray crosses the curve eleven times. The
odd number of crossings means that the point is inside the curve.
/
/
/
/
/
I /

/ I
I /
/ I
I /
/ I
I
"
I
I
I
I
'
46 2 Intermediate Problems
Demanding a Polynomial
Is there a polynomial p(x) with integer coefficients such that p(l) = 3 and p(3) = 2?
Solution
There is no such polynomial. For if we consider all operations modulo 2, the two require
ments are contradictory: p(l) == I (mod 2) and p(l) == ° (mod 2).
Bonus: lagrange's Interpolation Fonnula
Such a polynomial does existin fact, a linear onewith rational coefficients. Suppose
that p(x) = mx + b. Then m = (2  3)/(3  I) = 1/2, and the pointslope formula
yields p(x)  3 = 1/2(x  I), or p(x) = 1/2x + 7/2.
Here is a general recipe for creating polynomials with prescribed values.
LAGRANGE'S INTERPOLATION FORMULA.) Let ao, aI, ... , an be distinct complex num
bers and f3o, f31, ... , f3n arbitrary complex numbers.
(a) The polynomial
n
P(z) = Lf3i
i=O
n
ai aj
O ~ j ~ n
j f: i
has the property that P(ai) = f3i' for i = 0, I, ... , n.
(b) There is exactly one polynomial of degree at most n with the property specified in (a).
Statement (a) is verified by evaluating P at ao, aI, ... , an and noting that in each case
all terms in the sum but one are 0, yielding P(ai) = f3i.
To prove (b), suppose that P and Q are two such polynomials. Let R(z) = P(z) Q(z).
Then R has degree at most n and has n + I roots, namely, ao, aI, ... , an. Hence, R is
identically 0, and P and Q are identical polynomials. This proves uniqueness.
2.2 Geometry
What's the Side Length?
Let P be a point inside an equilateral triangle ABC, with PA = 4, P B = 3, and PC = 5.
Find x, the side length of the triangle.
IThis formula is credited to JosephLouis Lagrange (17361813). Lagrange made contributions in analysis,
number theory, and classical and celestial mechanics.
2.2 Geometry
Solution
C
A " " " " " " '        ~ B
x
47
As in the figure below, rotate .6.ABC 60
0
clockwise around B. Suppose that P and C
are transformed to P' and C', respectively. We see that .6.P P' B is equilateral and hence
PP' = 3. Since .6.PP'C has side lengths 3, 4, and 5, it follows that LPP'C is a right
angle. Hence
By the law of cosines (see Toolkit),
x
2
= 3
2
+ 4
2
 2·3·4· cos 150
0
= 25 + 12J3.
Therefore
~                   ~
C'
A ""="'=,.,
This innocent problem is a gateway to a lot of fascinating mathematics. We'll see some
in the Bonus.
Bonus: Integer Solutions
Let the distances from P to the three vertices be a, b, and c, as in the diagram below. With
similar reasoning to that in the Solution, we can derive a formula for x.
48 2 Intermediate Problems
~               ~
C'
A ~ ~      x         ~
We have
where
Eliminating (), we obtain
a
2
+ b
2
+ c
2
.j3
X = 2 ± 2 J2a
2
b
2
+ 2a
2
c
2
+ 2b
2
c
2
 a
4
 b
4
 c
4
•
The positive sign is the one relevant to our problem. The negative sign gives the solution
if P is a point in the exterior of the triangle. Because a, b, and c are the side lengths of
l:!.P pI C, they satisfy the weak triangle inequality a + b :::: c, where we take c to be the
largest of the three distances.
Rearranging our equation for x yields
X4 + a
4
+ b
4
+ c
4
= x
2
a
2
+ x
2
b
2
+ x
2
c
2
+ a
2
b
2
+ a
2
c
2
+ b
2
c
2
•
Is it possible to find an equilateral triangle with integer side lengths and a point P in the
interior of the triangle such that the distances from P to the three vertices are all integers?
Yes, a computer search reveals that the smallest integer solution is a = 57, b = 65, c = 73,
and x = 112.
Using Ptolemy'S theorem (see Toolkit), one can find infinitely many integer solutions
in which P is on the circumcircle of the triangle. One such solution is {a, b, c, x} =
{3, 5, 8, 7}. Similarly, one can find infinitely many integer solutions in which P is on an
extended side of the triangle. Let's call solutions trivial in which P is on the circumcircle
of the triangle or on a line determined by a side of the triangle. In 1990 Amfried Kemnitz
found an infinite family of nontrivial integer solutions in which P is in the plane of the
triangle:
b = m
2
mn + n
2
c = m
2
+ mn + n
2
m = 2(u
2
 v
2
)
n = u
2
+ 4uv + v
2
2.2 Geometry 49
where u and v are any positive integers with u > v. Notice that in this infinite family we
always have b + c = 2a. The computer solution mentioned above doesn't have this prop
erty, so not all nontrivial solutions are in Kemnitz' family. In fact, the quartic surface in
question cannot be parameterized (it is an irrational surface). The surface, called a tetrahe
droid, is a special kind of quartic known as a Kummer surface, named after number theorist
and algebraic geometer Ernst Eduard Kummer (18101893). A threevariable version of
the surface, via Mathematica®, is depicted below.
Napoleon's Theorem
Prove:
NAPOLEON' S THEOREM.
2
Given f:::,ABC, let A' , B', C' be the third vertices of equilateral
triangles constructed outwardly on sides BC, CA, AB, respectively, and let A", B", C"
be the centers of f:::,A' BC, f:::,B'CA, C' AB, respectively. Then f:::,A" B"C" is equilateral.
(See the picture below.)
A'
B'
2 It is not known whether Napoleon Bonaparte ( 17691821 ) was really the first person to discover and prove this
theorem, although he is known to have been an able mathematician.
50 2 Intermediate Problems
Solution
We give a proof that is easy to "see." Consider the "wallpaper pattern" in the following
figure, where the given triangle is black. Look at the hexagon formed by joining the centers
of six equilateral triangles that "go around" one of the equilateral triangles (the "focal
triangle") constructed on the sides of the given triangle. By symmetry, the sides of this
hexagon are all equal. Also by symmetry, alternate "spokes" of the hexagon are equal.
(The "'spokes" join the center of the focal triangle to the vertices of the hexagon.) Hence,
two consecutive triangles around the center of the hexagon are congruent. Therefore, all
six such triangles are congruent, and hence all central angles are JC /3. Since we could have
chosen any of the three equilateral triangles about the given triangle to be the focal triangle,
the triangle of Napoleon' s theorem is equilateral.
Bonus: An Algebraic Proof
Suppose that A, B, C (given, without loss of generality, in counterclockwise order) are
represented by vectors a, b, e, respectively. Then the third points of the equilateral trian
gles, A', 8', C', are given by a', b', e', respectively, where
M(a b) = e'b,
M(b' c) = a e,
M(e  a') = b  a',
and M is a rotation matrix around the origin of angle JC/3. (We don't need to write M
explicitly.) The centers of the equilateral triangles, A", 8", C", are given by a", b", e",
respectively, where
I
a" = 3(a' +b +e),
I
b"=3(a+b'+e),
I
e" = 3(a + b + e').
2.2 Geometry 51
To show that A", B", e" are the vertices of an equilateral triangle, we will demonstrate
that M(b"  a") = e"  a". Here is the algebra:
M(b"  a") = ~ M ( a + b' + e  a'  b  e)
3
I I I
= M(a  b + b  e + e  a)
3
I I I
= (e  b + a  e + b  a)
3
I I I
=  (a + b + e  a  b  e)
3
e" " = a.
By the way, the result in Napoleon's theorem also holds if the equilateral triangles are
constructed inwardly rather than outwardly. The area of the "outward Napoleon triangle"
IS
.J3(a
2
+ b
2
+ e
2
) I
24 + 2A
and the area of the "inward Napoleon triangle" is
where A is the area of the given triangle.
Liangshin Hahn's book [8] gives an elegant proof of Napoleon's theorem via complex
numbers.
A Graph on a Doughnut
The complete bipartite graph K
4
,4 consists of two sets of four vertices and all possible
edges between the two sets (see Toolkit).
Show that K4,4 can be drawn on the surface of a doughnut (torus) without edgecrossings.
Solution
The proof is by a simple picture (below). The square represents the torus. The top edge
and bottom edge of the square are "identified," i.e., they are regarded as the same. This
identification wraps the square around to make a cylinder. The left edge and right edge of
52 2 Intennediate Problems
the square are also identified. This glues the two ends of the cylinder together to form a
torus. The figure can be stretched to make the gluing happen.
The two sets of vertices in K
4
•
4
are represented by solid dots (for one set) and open
dots (for the other set). Vertices on the boundary of the square are shown multiple times
(because of the identifications of the edges). For instance, the four vertices at the comers
of the square are all the same vertex. Our diagram does what we want it to do, since each
vertex is joined to the four vertices of the other set and there are no edge crossings.
Here is a Euclidean depiction of the graph on the torus. The other four vertices are on
the opposite side of the torus.
Bonus: The Genus of a Graph
We say that a sphere has genus O. A surface obtained from a sphere by attaching g "han
dles" is called a surface of genus g. For example, a torus is a surface of genus I. The genus
of a graph G is the minimum g such that G can be drawn without edgecrossings on a
surface of genus g. We found in the Solution that the complete bipartite graph K4,4 has
genus at most I; in fact, it has genus I. The genus of the complete bipartite graph Km,n is
given by the formula
r(m  2 ~ ( n  2)1.
where r xl is the least integer greater than or equal to x. See, for example, [9].
2.2 Geometry 53
Points Around an Ellipse
Given an ellipse, what is the locus of points P in the plane of the ellipse such that there are
two perpendicular tangents from P to the ellipse?
Solution
Let the ellipse be given by
x2 y2
a2 + b2 = l.
We will prove that the locus is a circle centered at the origin with radius J a
2
+ b
2
•
Let Y = mx + n be a tangent to the ellipse. Then the equation
has a double root in x. We rewrite the equation as
Since this equation has a double root, its discriminant is 0, i.e.,
This equation simplifies to
Let P have coordinates (xo, Yo). Because the tangent lines pass through P, we have n =
Yo  mxo and hence
Since the two tangents from P to the ellipse are perpendicular, the two roots ml and m2 to
this latter equation satisfy m 1 m2 = I, and it follows that
which is the equation of a circle centered at the origin with radius J a
2
+ b
2
•
54 :2 Intermediate Problems
Bonus: The Problem for Hyperbolas and Parabolas
We can ask the same question for a hyperbola and a parabola. As an exercise, use the
method of the Solution to prove the following propositions:
(1) The locus of points P(xo, Yo) with the property that there are two perpendicular tan
gents from P to the hyperbola X2 / a 2  y2 / b
2
= 1, where a > b, is the circle
x5 + Y5 = a
2
 b
2
•
(2) The locus of points P(xo, Yo) with the property that there are two perpendicular tan
gents from P to the parabola y = kX2 is the horizontal line Yo = 1/ (4k).
Three Fixed Points
A transformation of Euclidean space that preserves distances between points is called an
isometry. Prove that if an isometry of the Euclidean plane fixes three noncollinear points
(i.e., these three points don't move), then the isometry fixes every point in the plane.
Solution
Let A, B, and C be fixed points of an isometry. We will prove the contrapositive form of
the assertion: if some point is moved by the transformation, then A, B, C are collinear.
Suppose that the transformation moves the point P to a different point P'. Let 1 be the
perpendicular bisector of the line segment joining P and P'. Then A lies on the line I,
since the distance from A to P is the same as the distance from A to P'. By the same
reasoning, B and C also lie on I. Hence, A, B, and C are collinear.
Bonus: Isometries of the Plane
P P'
•               )e
translation
P,
P''¥
reflection
P'
~ .
.
.
.p
rotation
e,
' ~ P '
glidereflection
As shown in the diagrams above, the four types of isometries of the plane are transla
tions, rotations, reflections, and glidereflections. A glidereflection is a composition of a
translation and a reflection in a line parallel to the direction of translation. A translation and
a glidereflection have no fixed points (although a glidereflection's reflecting line is fixed
2.2 Geometry 55
as a set of points), while a rotation has one fixed point (the center) and a reflection has a
line of fixed points. Translations and rotations are orientationpreserving, while reflections
and glidereflections are orientationreversing.
Let's show that these are the only types of isometries of the plane.
CLAIM: If f is an isometry of R2, then
f(x) = g(x) + h,
where g is an orthogonal linear transformation and h E R2.
We will see what an orthogonal linear transformation is presently. Let f be an isometry.
Then g(x) = f(x)  f(O) is an isometry, because, for x, y E R2, we have
Ilg(x)  g(y) II = Ilf(x)  f(O)  f(y) + f(O) II = IIf(x)  f(y) II = IIx  YII·
(We are denoting the length of a vector v by II v II.) Furthermore, g(O) = O.
We now show that g preserves the dot product of vectors. For any x, y E R2, we have
IIg(x)  g(y) II = IIx  yll,
IIg(x)g(y)1I
2
= IIxyIl2,
(g(x)  g(y)) . (g(x)  g(y)) = (x  y) . (x  y),
g(x) . g(x)  2g(x) . g(y) + g(y) . g(y) = X· x  2x· y + y . y,
IIg(x)1I
2
 2g(x) . g(y) + IIg(y)1I2 = IIxll2  2x· Y + lIyll2.
Since IIg(x) II = IIxll and IIg(y)1I = lIyll, it follows that
g(x) . g(y) = x . y.
Hence, g preserves the dot product of vectors.
Now suppose that {el' e2} is a standard basis for R2. Then, since g is an isometry,
IIg(edll = IIg(e2)1I = 1. Also,
Hence, {g(ed, g(e2)} is an orthonormal basis for R2. Furthermore, for
we have
g(x)·g(ej) =x·ej =Aj, i = 1,2,
and hence
This is what we mean by g being an orthogonal linear transformation: each vector is
mapped to a vector with the same coordinates with respect to the transformed basis. The
conclusion of the claim follows with h = f(O).
56 :2 Intermediate Problems
Now we know that f(x) = g(x) + h, where g is given by an orthogonal matrix and h is
a vector. What are the possible 2 x 2 orthogonal matrices? Since the columns ofthe matrix
are orthogonal unit vectors, we may take the first column to be
[
COS ()] 0 _< () < 2rr.
sin () ,
Two choices for the second column are
[
sin () ]
cos ()
and [
sin () ]
cos () .
Since there are only two unit vectors orthogonal to the first column, these must be the two!
These choices yield two possible matrices:
[
COS ()
sin ()
 sin () ]
cos ()
and
[
COS ()
sin ()
sin () ]
cos () .
The first matrix corresponds to a rotation, g(x) = Rex, the second matrix to a reflection
in the line through the origin with slope () /2.
Finally, we should show that upon adding a translation, we obtain the four types of
isometries claimed. If h = 0, then an isometry of the first type is a (counterclockwise)
rotation around the origin by angle (). If h f:. 0, then such an isometry is a translation (if
() = 0), or otherwise a rotation by () with center c = h(l  Re)l, since this value of c
satisfies the equation
Re(x  c) + c = Rex + h.
If h = 0, then an isometry of the second type is a reflection in the line through the origin
with slope () /2. If h f:. 0, then such an isometry is a glidereflection by h if h is parallel to
the line through the origin with slope () /2. If h is not parallel to this line, then the isometry
is a reflection with respect to this line translated by the vector h/2. For an explanation of
the significance of the halfangle () /2, see "Reflections and Rotations."
'Round and 'Round
Suppose that two circles of radii r and R intersect at two points. See the picture below.
Two particles start at one of the intersection points and move counterclockwise around
the two circles, at constant speeds, completing a revolution of their respective circles at the
same time. What is the locus of the midpoint of the line segment joining the two particles?
2.2 Geometry 57
Solution
Let CI be the center ofthe circle of radius rand C2 the center of the circle of radius R. Let
PI (t) and P2(t) be the positions of the two particles at time t. Set p(O) = PI (0) = P2(0),
i.e., the intersection point where the particles start. Then
PI (t) = Mt(p(O)  cd + Cl
and
P2(t) = Mt(p(O)  C2) + C2,
where M
t
is a rotation operator corresponding to time t. (We don't need to write M
t
explicitly.) Hence, the midpoint p(t) of the line segment joining PI (t) and P2(t) is given
by
p(t) = Pl(t); P2(t) = M
t
(P(O) _ CI ; C2) + Cl ; C2.
Therefore, the locus is a circle centered at the midpoint of the line segment joining the
circles' centers and passing through the circles' two intersection points. See the following
diagram.
Bonus: A Fundamental Parallelogram
Let x be the radius ofthe locus circle and 2y be the distance between the centers of the two
given circles. Then we have a parallelogram with sides rand R, and diagonals 2x and 2y,
as shown in the diagram below. As in "The Case of the Rotating Parallelogram," it follows
by the Law of Cosines (see Toolkit) that the four parameters satisfy the relation (known as
the parallelogram law)
r2 + R2 = 2X2 + 2y2.
From this relation, we could find x, the radius of the locus circle, in terms of r, R, and y.
58 2 Intermediate Problems
Reflections and Rotations
(a) Suppose that a and f3 are two intersecting lines in the Euclidean plane. What kind of
transformation of the plane results if a reflection is made with respect to a and then a
reflection with respect to f3?
(b) Suppose that P and P' are two distinct points in the Euclidean plane. What kind of
transformation of the plane results if a rotation is made with center P and angle 0 and
then a rotation with center P' and angle 0', where 0 + 0' is not an integer multiple of
2JC? (The angles are measured counterclockwise.)
Solution
Consider the diagrams below.
p'
~
P a 0
two reflections two rotations
(a) The figure on the left shows the intersecting lines of reflection, a and f3. Let's also
call the reflections themselves a and f3. The angle between a and f3 (measured coun
terclockwise) is O. We will show that the composition of a and f3 is a rotation with
center 0 (the intersection of a and f3) and angle 20.
We use conjugations, expressions of the form gxg
1
which perform an operation x
with respect to a reference frame given by g. Let rCIJ denote a rotation with center 0
with angle w. The composition of a and f3 is
(b) Let's say that the rotation at P has angle 20 and the rotation at P' has angle 20'.
From (a), we know that the rotation at P is the product of two reflections, a and f3,
intersecting at an angle 0, as in the figure on the right. (We have taken f3 to be the line
through P and P'.) Similarly, the rotation at P' is the product of two reflections, f3
and y, intersecting at an angle ()'. The composition of the two rotations is
(af3)(f3y) = a(f3f3)y = ay.
This is a rotation with center 0 (the intersection of a and y) and angle 2(0 + 0'),
since the angle between a and f3 is 0 + 0'.
Bonus: Tiling With Triangles
Which Euclidean triangles have the property that reflections in their sides produce tilings
of the Euclidean plane? (Think of flipping a triangle over with respect to its sides.) We will
show that there are exactly four such triangles: a 30°30°120° triangle, a 30°_60°_90°
triangle, a 45°45°90° triangle, and a 60°60°60° triangle.
2.2 Geometry 59
Since in the tiling the triangle is rotated around each vertex, the angles of the triangle are
2rrja, 2rrjb, 2rrjc, where a, b, c are integers greater than 2, and 2rrja+2rrjb+2rrjc = rr.
Hence
I I I I
 +  +  =.
abc 2
Suppose that 3 ::: a ::: b ::: c. We see that 3 ::: a ::: 6, for if a > 6 then the sum of the angles
is too small to make a triangle. If a = 6, then (a, b, c) = (6,6,6) is the only solution. If
a = 5, then c = lOb j(3b  10), and we find that the only solution is (a, b, c) = (5,5, 10).
Continuing in this manner, we determine all the solutions: (a, b, c) = (3,7,42), (3,8,24),
(3,9,18), (3, 10, 15), (3, 12, 12), (4,5,20), (4,6,12), (4, 8, 8), (5,5,10), (6,6,6).
By inspection (you may want to check this), only the triples (3, 12, 12), (4,6, 12),
(4,8,8), and (6,6,6) yield tilings. (The other triples correspond to triangles that overlap
each other when reflected.) The corresponding triangles have angle measures 30°30°
120°, 30°60°90°,45°45°90°, and 60°60°60°, respectively. The four triangle tilings
are illustrated below.
30° 30°120° triangles 30° 60°90° triangles
The geometric symmetries of these tilings can be indicated with "group presentations."
(See "Bonus: A Tiling of the Hyperbolic Plane.") The four group presentations, corre
sponding to the four tilings, are given below.
60
tiling
30°  30° 120° triangles
30° 60°90° triangles
45° 45°90° triangles
60° 60° 60° triangles
:2 Intermediate Problems
group presentation
(a,b,c:a
2
= b
2
= c
2
= (ab)3 = (bc)6 = (ca)6 = 1)
(a,b,c:a
2
= b
2
= c
2
= (ab)2 = (bc)6 = (ca)3 = 1)
(a,b,c:a
2
= b
2
= c
2
= (ab)2 = (bC)4 = (ca)4 = I)
(a,b,c:a
2
= b
2
= c
2
= (ab)3 = (bC)3 = (ca)3 = 1)
In each group presentation, the "generators" a, b, c represent reflections with respect to
the three sides of the given triangle. That is why we have the relations a
2
= 1, b
2
= 1,
and c
2
= 1 (two reflections with respect to the same line yield the identity). As we know
from the Solution, the composition of two reflections yields a rotation by an angle twice
the angle between the two reflecting lines. For example, in the tiling with 60°60°60°
triangles, the product ab is a rotation by 120°. This is why we have the relation (ab)3 = I
(three of these rotations yield the identity). A "word" in the group is any sequence of a's,
b's, and c's. Each word represents a symmetry moving a given triangle via a sequence of
reflections to a copy of that triangle elsewhere in the plane.
Cutting and Pasting Triangles
A triangle with sides 4, 12, 12 and a triangle with sides 6, 9, 13 both have perimeter 28 and
area 4.J35 (by Heron's formula). Is there a way to cut the first triangle into a finite number
of pieces that can be reassembled to form the second triangle, so that the perimeter of the
first triangle becomes the perimeter of the second triangle?
Solution
Surprisingly, given any two triangles with the same perimeter and area, there is a way to
cut the first triangle into a finite number of pieces that can be reassembled to form the
second triangle, so that the perimeter of the first becomes the perimeter of the second.
Observe that the radius r of the inscribed circle of a triangle satisfies r s = K, where s is
the semi perimeter of the triangle and K is its area. (See Toolkit.) This is obvious from the
diagram below. Hence r = K/s, so that the two given triangles have the same inradius.
A
Our method of cutting the first triangle to form the second triangle is also inherent in the
above diagram. Cutthe triangle into triangles and where
o is the incenter. Lay the three triangular pieces along a line, as in the picture below.
000
r::: :
rl2
ABC A
2.2 Geometry 61
In the picture, both endpoints of the line are labeled A to indicate how the triangles are cut
and laid along the line. Also, the apexes of the triangles are all labeled 0, since they all
come from the incenter.
Cut each of the three triangles into three pieces and arrange the pieces to make a rect
angle of the same area. This is easy to do by cutting along the dotted lines in the diagram.
Note that the altitude of each triangle (from the line) is interior to the triangle. The base of
each triangle becomes the base of the corresponding rectangle. If we perform this proce
dure for both of the given triangles, then we obtain two rectangles with base 2s and height
r /2. We recut the rectangle from the first triangle to match the cuts for the second triangle,
and then form the three subtriangles for the second triangle. This solves the problem.
Bonus: A Family of Triangle Pairs
Let's find an infinite family of nonsimilar pairs of triangles with integer side lengths such
that the two triangles in each pair have the same perimeter and the same area. Suppose that
the two triangles in a pair have sides a, b, c and a', b', c'. Since the triangles have the same
perimeter, 2s = a + b + c = a' + b' + c'. Because they have the same area, we have, by
Heron's formula,
Js(s  a)(s  b)(s  c) = Js(s  a')(s  b')(s  c'),
and hence,
(s  a)(s  b)(s  c) = (s  a')(s  b')(s  c').
As (s  a) + (s  b) + (s  c) = 3s  2s = s = (s  a') + (s  b') + (s  c'), we must
find triples of positive integers with the same sum and the same product. Set
sa = p s a' = I
sb = p s b' = pq
s c' = pq,
where p and q are positive integers greater than I. The equal sum condition means that
2p + q2 = I + 2pq,
so that
q = 2p  1.
Hence s = 4p2  2p + I, and we have the pairs {4p2  3p + I, 4p2  3p + I, 2p} and
{4p2_2p, 2p2 p + I, 2p2 P + I}, with common perimeter 8p2_4p +2 and common
area p(2p  l) J 4p2  2p + l. For example, with p = 3, we have the pairs {3D, 16, 16}
and {28, 28, 6}, both with perimeter 62 and area IS.J3T.
Our problem is similar to van Schooten's Problem:
3
Given an isosceles triangle, find
another isosceles triangle with the same perimeter and the same area. Isaac Newton (1642
1727) gave a solution based on the intersection of a hyperbola and a parabola.
3The problem is named after Franz van Schooten (16151660).
62 2 Intermediate Problems
Cookie Cutting
Suppose that we have an equilateral triangle made out of cardboard. Can we cut the triangle
into a finite number of polygonal pieces that can be reassembled to form a square (of the
same area)?
Solution
Yes, it can be done, and in fact a solution due to Henry Ernest Dudeney (18571930) uses
just four pieces. We can "see" the dissection via a simultaneous tessellation of the plane by
squares and by equilateral triangles.
The labeling of a particular equilateral triangle by I, 2, 3, 4 shows how the triangle can be
dissected into four pieces that can be reassembled to form the square.
In describing the tessellation precisely, we work with parallelograms such as those cen
tered around the large dot in the picture. The parallelogram formed from two adjacent
squares is inclined at a slope of .../3/2 from the parallelogram formed from two adjacent
equilateral triangles.
Bonus: The WaliaceBolyaiGelWien Theorem
If A and B are any plane polygonal regions of the same area, then A can be cut into a
finite number of pieces that can be reassembled to form B. This is known as the Wallace
BolyaiGerwien theorem. We will sketch a proof.
As in the Solution to "Cutting and Pasting Triangles," any triangle can be cut into three
pieces that can be reassembled to make a rectangle of the same area. Cut the triangle along
an internal altitude and along the perpendicular bisector of that altitude. It's easy to arrange
the pieces to make a rectangle.
The next step in proving the WallaceBolyaiGerwien theorem is showing that any rect
angle can be transformed into a square of the same area. The picture below shows how this
can be accomplished.
2.2 Geometry 63
CI'FiF,F
H
The rectangle A B I H can be transformed into a square C F J H of the same area. We leave
it as an exercise to show that the triangle A C D is congruent to the triangle G I J and
the triangle ABG is congruent to the triangle DF J . Now the transformation is obvious.
If the rectangle is "too skinny," so that the point D is not within the rectangle, then the
construction needs tweaking. Cut the rectangle in half (the short way) and stack the two
pieces together to make a "fatter" rectangle. Repeat this tweaking if necessary.
The above argument can be modified to transform any rectangle into a rectangle with a
prescribed base.
Now we can "put the pieces together" and complete the proof of the WallaceBolyai
Gerwien theorem. Cut the polygonal region A into triangles. Dissect the triangles into
squares. Cut the squares into pieces and rearrange them into rectangles all with the same
base. Put these rectangles together to form one rectangle. Transform that rectangle into a
square. Now, do the same process for B. Since both A and B can be cut into pieces that can
be reassembled to make squares of the same area, we can cut A into pieces and reassemble
the pieces to make B.
By the way, the corresponding dissection problem in three dimensions cannot always
be achieved. In particular, there exist two tetrahedra of the same volume such that one
tetrahedron cannot be cut into a finite number of pieces that can be reassembled to make
the other tetrahedron. This answers in the negative a famous problem of David Hilbert
(Hilbert's Third Problem). For more on Hilbert's problems, see p. 161.
Revolving Credit
A certain credit card has the shape of a rectangle of dimensions 3 units x 4 units. If you
rotate the card about one of its diagonals, what is the volume of the resulting solid of
revolution?
Here is a picture of the solid.
64 2 Intermediate Problems
Solution
We sol ve the general problem for a rectangular card of width w and length I, where w :s I.
Consider the diagram below.
" .
,
Using the formula for the volume of a cone (1/3 base x height), we have
(
1 1 ./w
2
+L2)
volume = 2 3TlX2Jw2 + 12  3
Tly2
2
= !!..Jw2 + L2(2X2 _ y2).
3
By similar triangles, x/w = 1/ ../w
2
+ 12, and so X2 = w
2
/2/(W
2
+ 1
2
). Likewise,
y /( ./w
2
+ 12 /2) = w / I, and so y2 = w
2
(w
2
+/2)/(4/2). Substituting in the expressions
for X2 and y2, and simplifying, we obtain
Tlw2(7/4  2/
2
w
2
 w
4
)
volume = .
I2L2./w
2
+ 12
For w = 3 and 1 = 4, we calculate that the volume of revolution is 4269Tl /320 cubic
units.
Bonus: The Case of the Rotating Parallelogram
What is the volume obtained by rotating a parallelogram about one of its diagonals? As
sume that the parallelogram has side lengths a and b, with a :s b, and diagonal lengths d
1
and d
2
• Of course, the four parameters are interdependent. Using the law of cosines (see
Toolkit), they can be shown to satisfy
df + di = 2a
2
+ 2b
2
•
Let's assume that b  a :s d < a + b, where d is the diagonal about which the parallel
ogram is rotated. Consider the diagram below.
2.2 Geometry 65
We find that x
2
+ z2 = a
2
and x
2
+ (d  Z)2 = b
2
. Taking the difference of these
equations, solving for z, and plugging the expression for z into the first equation yields
(
a
2
_ b2 + d
2
)2
x
2
= a
2
_
2d
By similar triangles, y j(dj2) = xj(d  z). Hence
d
2
x
2
2_
y  4 (::b=2_
X
:2:),
The volume is given by
rrd(2 2 2)
3 x y .
Upon substitution, the volume is
rrd ( (a
2
_b
2
+ d
2
)2) ( d
4
)
v(a, b, d) = 3 a
2
 4d
2
2  (a2 _ b
2
_ d
2
)2 .
For example,
v(3, 4, 5) = 4269rrj320
(the same result as in the Solution). Note that the volume formula also holds in the case
where the parallelogram leans over the diagonal and the resulting solid is concave.
What is the maximum volume, given a and b? When I posed this problem, I thought
that the maximum volume would occur when the two sides of the parallelogram are per
pendicular, or perhaps when the short side is perpendicular to a diagonal. But I was due
for a surprise, as neither is true. In fact, the optimal value of d
2
is a solution to a quintic
(degree 5) polynomial! I didn't expect to see a quintic come up in this problem.
The derivative of the volume function with respect to d is a rational function of a, b,
and d. We can write this rational function (divided by rr) as a fraction whose denominator
is positive and whose numerator is
h(a, b, d) =  2(a
2
 b
2
)5 + 2(a
2
 5b
2
)(a
2
_ b
2
)3d
2
+ 3(a
2
 b
2
)2 (3a
2
+ 5b
2
)d
4
_ (a
2
 b
2
)(l9a
2
 l5b
2
)d
6
+ (13a
2
 9b
2
)d
8
 3d
lO
•
Since the denominator is positive, the derivative changes sign exactly when h does. If we
set this polynomial (a quintic in d
2
) equal to 0, we will find candidates for the optimal
value of d.
Right away, we can verify that the maximum volume does not occur when the sides
are perpendicular, or when one side is perpendicular to a diagonal. Using a computer or
calculator, we find that there is one positive real solution to h(3, 4, d) = 0, namely, d ~
3.70407. Now we compare the volumes based on d having this value, d being the side
length of a diagonal of a rectangle, and d being the side length of a diagonal perpendicUlar
to the shorter side:
volume(3, 4, 3.70407) ~ 49.5291
volume(3, 4, 5) ~ 41.9108
volume(3, 4, ./7) ~ 43.6373.
66 2 Intermediate Problems
We see that the optimal diagonal is not the diagonal of a rectangle nor is it perpendicular
to a side of the parallelogram.
We will now prove that the volume function has a unique local maximum. We do this
by showing that the derivative is positive up to a certain point, and thereafter the curve is
concave down.
By scaling, we may as well assume that a = l.
Using Descartes' rule of signs (see Toolkit) we find that h has exactly one positive real
root if b
2
is in the ranges
So let's assume that b
2
falls in the range
19/15 < b
2
< 13/9.
Now we look at the second derivative of the volume function. Upon clearing the denom
inator (which is positive) and factoring out 1{ , we obtain
 2(1  b
2
)6 + 8(1  b
2
)5 d
2
 15(1 b
2
)4d
4
+ 20(1 3b
2
)(l  b
2
)2d
6
 4(1  b
2
)(5  3b
2
)d
8
+ 12(1  b
2
)d 10 _ 3d 12.
Since I ::: b, the coefficients of dO, d
2
, d
4
, d
6
, and d
l2
are negative. Moreover, the sum
ofthe degree 8 and 10 terms is negative under a certain condition. The sum ofthe d
8
and
d
10
terms is
Hence, the volume function is concave down when
20 + 12b
2
+ 12d
2
> O.
Since we are assuming that b
2
> 19/15, this will hold if d
2
> 2/5. So let's now assume
that
d
2
< 2/5.
We will prove that the volume function is increasing on this interval (b  I ::: d ::: ./2/5).
This is equivalent to showing that the function h is positive. With our assumptions, the
coefficients of d
6
and d
10
are positive, while the coefficients of dO, d
2
, d
4
, and d
8
are
negative.
Let's combine the d
4
, d
6
and d
10
terms and divide by d
4
. If we replace d with ./2/5
we get the following upper bound on this expression:
_ 23 _ 53 b2 + 27b4 _ 15b6 .
25 5
We claim that this expression is negative when 19/15 < b
2
< 13/9. Take the derivative:
:2.3 Calculus 67
Again, look at the last two terms. The sum is negative if and only if 108/90 < b
2
• We have
108/90 < 19/15 < b
2
, so the expression is decreasing. Since the value at b
2
= 19/15 is
negative, our claim is proved.
Given a triangle with side lengths a and b, with a ::: b, what should be the third side
length c, so that if the triangle is rotated about the third side, the volume of the resulting
body of revolution is maximized? Of course, c will satisfy b  a ::: c ::: b + a.
2.3 Calculus
The Harmonic Series
Show that the harmonic series
has an infinite sum.
Solution
I I I I I I I
1++++++++···
2 3 4 5 678
Consider the sum of the first 2k terms (where k ::: I):
I I I I I 1 I I
1+ +  +  +  +  +  +  + ... +.
2 345 6 7 8 ~
This sum is greater than
1++ + + +++ + ... + + ... + .
I (I I) (I I I I) ( I I )
2 4 4 8 8 8 8 2k 2k
Since each series in parentheses adds up to 1/2, this latter sum is
k
1+
2'
which tends to infinity with k. It follows that the harmonic series has an infinite sum.
4
Bonus: Estimating the Harmonic Sum
Let
I I 1
Hn = 1+2 + 3" + ... +;;.
The above argument shows that
Hence, if n = 2k, then
log2 n
Hn> 1+
2
,
4This argument was invented by Nicole Oresme (c. 13231382).
68 2 Intennediate Problems
Using the method of comparison of areas, we can obtain for Hn both an upper bound and
a better lower bound. Since the function 1/ x is decreasing for x > 0, we have
j
n+1 dx jn dx
 < Hn < 1+ .
1 X 1 X
Evaluating the integrals, we obtain
In(n + I) < Hn < I + Inn.
Therefore, Hn '" Inn (i.e., Hn is asymptotic to Inn). This means that Hn/ Inn + I as
n + 00.
A Quick Integral
Evaluate the definite integral
10
1
Inx dx.
Solution
By symmetry (see figure),
t Inx dx = 1
0
eX dx.
10 00
y
y=ex
(0,1) y=lnx
= = = = = = ~          +     ~ ~          x
Knowing that eX is its own antiderivative, we can complete the calculation:
:2.3 Calculus
Bonus: Another Quick Integral
We can also easily evaluate
69
fo 1 arcsin x dx.
By symmetry, this integral equals the area of a rectangle minus the area under a sine curve:
l
1C/2
rc . rc 1C/2 rc rc
I·   SlDX dx =   (cosx)lo =  + cos(rc/2)  cosO = I.
2 0 2 2 2
Euler's Sum
Evaluate the infinite sum
I I I 1 1 1
1 + 4 + 9 + 16 + 25 + 36 + 49 + ....
Note. The numerical value was determined by Leonhard (17071783).
Solution
Euler's solution is a bit of magic, starting with the power series representation of sin x:
x
3
x
5
x
7
sin x = x   +    + ...
3! 5! 7! .
Euler reasoned that since the zeros of the sine function are the integer mUltiples of rc (i.e.,
nrc, where n is an integer), sin x has the infinite product expansion
sin x = x ( I  ;.) (I + ;. ) (I  2:) (1 + 2:) (1  3:) (
1
+ 3:)'" .
To see this, simply plug in x = nrc and note that the right side is 0 (for any integer n). The
magic of the proof is that although this reasoning is valid for a polynomial, sinx is not a
polynomial. Euler's method is a leap of faith.
We equate our two representations:
x _ x
3
+ x
5
_ x
7
+ ... = x (1 X2) (1 x
2
) •••.
3! 5! 7! rc
2
4rc
2
9rc
2
Now consider the coefficient of x
3
• On the left side, it is 1/3! = 1/6. On the right side,
it is
:2 (I + + + ... ) .
Since these coefficients must be the same, we have
I I rc
2
1+
4
+
9
+",= 6'
This is a totally unexpected answer!
5 Leonhard Euler was one of the most prolific mathematicians of all time. He made foundational contributions
in analysis, numbertheory, graph theory, and mathematical notation.
70 2 Intermediate Problems
Bonus: Probability that Two Numbers are Coprime
Suppose that two positive integers from I to n are chosen at random. As n tends to infinity,
what is the probability that the integers are coprime (have no factor in common)? Two
numbers have a factor in common if and only if they have a prime factor in common. The
probability that two integers are not both divisible by 2 is, in the limit, I  1/22. The
probability that they are not both divisible by 3 is I  1/3
2
• In general, the probability that
two integers are not both divisible by a prime p is I  1/ p2. Hence, the probability that
the two integers are coprime is, in the limit,
where the product is taken over all prime numbers p. Using the formula for the sum of a
geometric series (see p. 16), we can write this expression as
I
n l + ~ + ~ + ...
p p p
n
p
(I + ;2 + ;4 + ... ) .
Since the reciprocal of each square integer is accounted for exactly once in the product,
this expression is equal to
I I '
1+
4
+
9
+ ...
the reciprocal of Euler's sum. Therefore, the probability that two positive integers chosen
at random are coprime is 6/rr
2
~ 0.608. Did you expect to see rr in the answer to this
problem?
Strips of Carpeting
Suppose that the unit disk is covered with n infinitely long rectangular strips of widths Wi,
where I ~ i ~ n. Prove that the sum of the Wi is at least 2.
Solution
We assume that the strips don't extend "widthwise" outside the disk (because any that did
would only contribute to a larger sum of the widths). Let S be the unit sphere with the
same center as the given circle and project each strip onto S. (A bolt from the blue!)
2.3 Calculus 71
We claim that the surface area of the projection of the i th strip is 2rr Wi. (Isn't it interesting
that the area depends only on the width of the strip and not where it is placed?) To see this,
we compute the surface area of the projection of a strip as an area of revolution. Choose
the coordinate axes so that the ith strip is perpendicular to the xaxis. Suppose that the ith
strip is bounded by the lines x = a and x = b. Then the surface area is given by
l
b
~
a 2rry y I + Y2 dx = 2rr(b  a) = 2JrWi.
Since the disk is covered by the strips, the surface of the sphere is also covered. It follows
that L:?=1 2rrwi 2: 4rr and L:?=l Wi 2: 2.
Bonus: Four Spherical Triangles
The above analysis shows that, for example, the surface areas of the following four regions
on a spherical globe are identical: (I) The region between 30
0
North Latitude and the North
Pole; (2) The region between 30
0
North Latitude and the equator; (3) The region between
the equator and 30
0
South Latitude; (4) The region between 30
0
South Latitude and the
South Pole. If the globe has surface area 4rr, then each of these four regions has surface
area rr.
What if we start with a spherical triangle of surface area rr (on a sphere of surface
area 4rr)? Is it true that four congruent copies of the spherical triangle can be arranged to
cover the sphere? This turns out to be the case. Since the angle sum of the given spherical
triangle is 2rr, we can place, at any point on the sphere, three copies of the triangle meeting
at a vertex. The three triangles define a complementary fourth region on the sphere that is
clearly congruent to the same triangle (see [4]).
Is it 01
Given
607 692 701
I(x) = 607x + I + 692x + I + 701x + l'
determine, without using a computing device, whether or not
where 1(12) denotes the twelfth derivative of I.
Solution
Via the power rule and the chain rule for derivatives, we obtain
[(
607 )13 ( 692 )13 ( 701 )13]
1(12)(X) = 12! 607x + I + 692x + I + 701x + 1 .
Hence
72 2 Intermediate Problems
Is it possible that this quantity is equal to O? No, by Fermat's Last Theorem (proved by
Andrew Wiles)! Remember that Fermat's Last Theorem says that the equation
is not solvable in positive integers a, b, c, if n > 2.
Bonus: Fermat's last Theorem
Fermat's Last Theorem (FLT) was the most famous unsolved mathematics problem when
Andrew Wiles solved it in 1995. The problem originated in 1637 when Pierre de Fermat
(16011665) wrote in the margin of his copy of Diophantus' Arithmetic,
Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos &
generaliter nullam in infinitum ultra quadratum potestatem in duos eiusdem nomi
nis fas est diuidere cuius rei demonstrationem mirabilem sane detexi. Hanc marginis
exiguitas non caperet.
[It is impossible to separate a cube into two cubes, or a fourth power into two fourth
powers, or in general, any power higher than the second into two like powers. I have
discovered a truly marvelous proof of this, which this margin is too narrow to contain.]
Wiles' proof is based on proving the farreaching TaniyamaShimura conjecture concern
ing elliptic curves.
6
Pi is Pi
The constant rr appears in the formula for the circumference of a circle (C = 2rr r) and
in the formula for the area of a circle (A = rrr2), where r is the radius of the circle.
Suppose that rr is defined by the circumference formula. Prove the area formula without
using circular reasoning.
Solution
The catch is the without using circular reasoning clause. For example, there is a flaw in
the following argument. Since the circle is given by the equation x
2
+ y2 = r2, the area
of the circle is given by the integral
21
r
v'r
2
x
2
dx.
r
6 I highly recommend Simon Singh's documentary film The Proof, about the proof of FLT.
2.3 Calculus 73
Making the change of variables x = r sin (), this integral becomes
(
I ) 11C/2
=1fr2+r2 i sin2(}
1C/2
The flaw in the reasoning is that the fact that the derivative of sin () is cos () (used in two
places above) depends on the formula for the area of a circle.
Here is an argument that avoids circular reasoning. The circumference formula, written
as an integral for arc length, is
21fr = 2jr .vI + (y')2 dx = 2jr r dx.
r r ../r2  x
2
Hence, using the fact that x dx = y dy, we obtain
= 21
r
../ r2 _ x2 dx + 2 [0 r2 ~ y2 ( _ ~ ) dy
= 21
r
../r2  x
2
dx + 21
r
.vr2  y2 dy
= 41
r
J r2  x
2
dx
=A.
This establishes the area formula.
Bonus: Irrationality of 7r
We will give a concise proof by contradiction, due to I van Niven (19151999), that 1f is
irrational.
Suppose that 1f is a rational number, say, 1f = P / q, where p and q are positive integers.
Define the polynomial
74 2 Intermediate Problems
where n is to be determined. We note that f(x) f(TC  x), for all x. It follows that
f(i)(O) = ±f(i)(TC), for all i :::: O. We claim that f(i)(O) (and hence also f(i)(TC» is an
integer for each i :::: O. For a typical term of f(x) looks like
a n+k
,x ,
n.
where 0 ::: k ::: n and a is an integer. Upon differentiation i times and evaluation at 0, this
quantity is 0 if j i= n + k and a = akW!k) if i = n + k.
Define
F(x) = f(x)  f(2)(x) + f(4)(X)  ... + (It f(2n)(x).
Observe that
:)F'(X) sinx  F(x) cos x] = [F"(x) + F(x)] sinx
= [f(x) + (_I)n+2 f(2n+2) (x)] sinx
= f(x)sinx
(since f has degree 2n).7 Now we compute
1011: f(x)sinx dx = [F"(x)sinx  = F(TC) + F(O).
Since all f(i)(O) and f(i)(TC) are integers, F(TC) + F(O) is an integer. However, forO <
x < TC, we have
. (TCp)n
0< f(x)smx < .
n!
In the upper bound, the numerator is an exponential function of n with a fixed base; this is
dominated by the n! function in the denominator, as n tends to infinity. Hence, the integral
is positive but arbitrarily small for sufficiently large n. But this is impossible since it is an
integer. So our assumption that TC is a rational number is false. Therefore, TC is irrational.
2.4 Probability
How Many Birthdays?
There are 100 people in a room. Each person states hislher birth date (month and day,
excluding February 29). Let N be the number of different birth dates. What is the expected
value of N? (Assume that the 365 birth dates are equally likely.)
7The definition of F(x) is motivated by our need for the relation F" + F = I. Working backwards from this
relation, we obtain (I + D
2
) F = I, where I is the identity operator and D is the derivative operator. Hence
F = C +ID2 ) 1 = 1  1(2) + 1(4)  ....
2.4 Probability 75
Solution
For 1 ~ i ~ 365, let Xi = 1 if date i is among the stated birth dates and Xi = 0 otherwise.
Then the expected number of different birth dates among the 100 people is
because of linearity of expectation (independence of events is not necessary). Since all
the dates are interchangeable, the sum on the right is equal to 365 . E(Xt}. The value of
E (X I) is the probability that January 1 is among the 100 dates, which is the complementary
probability of the event that January I is not one of the 100 dates. Hence E (X I) = 1 
(364/365)100. Therefore, the expected number of different birth dates among 100 people
is
365(1  (364/365)100) ~ 88.
Bonus: Average Number of Fixed Points of a Permutation
In a random permutation of n objects, how many objects are fixed (not moved by the
permutation)? This problem is also solved simply by using expectation. For 1 ~ i ~ n, let
Xi = 1 if object i is fixed by the permutation and Xi = 0 otherwise. Then the expected
number of fixed objects is
E(XI + X2 + X3 + ... + Xn) = E(Xt} + E(X2 ) + E(X3) + ... + E(Xn)
1 1 1 1
=  +  +  + ... +  (n terms)
n n n n
=1.
On average, one object is fixed, regardless of n.
The Average Number of Spots
A fair die is rolled until a 6 occurs. What is the average total number of spots seen on
the die before the 6 occurs? For example, if the rolls are 4, 2, 5, 2, 6, then the number is
4 + 2 + 5 + 2 = 13.
Solution
The average number of spots is 15. Suppose that the random variable X is the number of
spots seen on the die before the 6 occurs. Then the expected value of X, denoted E(X),
satisfies the equation
E( ) _ E(X) + 1 E(X) + 2 E(X) + 3 E(X) + 4 E(X) + 5
X  6 + 6 + 6 + 6 + 6 .
The reason is that the first roll is 1, 2, 3, 4, 5, or 6, each possibility occurring with proba
bility 1/6, and these outcomes add 1,2,3,4,5, or 0, respectively, to the total number of
spots.
Solving the equation for E (X) yields E (X) = 15.
76 :2 Intermediate Problems
Bonus: Average Waiting Time
How are we to interpret the answer 15 in our problem? The answer is related to a basic
probability problem called waiting time. Suppose that an event happens with probability
p. For example, in our problem, a die comes up 6 with probability 1/6. How long, on
average, do we have to wait for the event to happen, given repeated, independent trials?
For example, if the die comes up 4, 2, 5, 2, 6, then the number of trials is 5. Let the
expected number of trials be E. Then E satisfies the equation
E = p. 1 + (1 p)(E + 1).
The reasoning is similar to that in the Solution. Solving for E, we obtain E = 1/ p. In the
case of the die, this means that E = 6. So the average number of rolls before the 6 occurs
is 5. Since the number of spots on one roll of the die when it does not come up 6 is on
average (1 + 2 + 3 + 4 + 5)/5, it follows that the average total number of spots before a
6 occurs is 5· (1 + 2 + 3 + 4 + 5)/5 = 1 + 2 + 3 + 4 + 5 = 15.
Balls Left in an Urn
An urn contains n white balls and n black balls. A ball is chosen at random and removed.
This process is repeated until the urn contains only balls of one color. What is the expected
number of balls remaining in the urn?
Solution
We first pursue a mundane method using binomial coefficients. Suppose that there are k
black balls left in the urn, where 1 ~ k ~ n. (The case of k white balls is similar.) The
situation of k black balls left in the urn arises when, among the first 2n k 1 balls chosen,
there are n  1 white balls and n  k black balls, and the next (Le., (2n  k )th) ball chosen
is white. The probability that the (2n  k )th ball is white is 1/ (k + 1). Thus, the expected
number of balls left in the urn is
E = 2 ~ k . ~ ~ l ) ~ ~ k ) . _1_.
~ (2n) k+l
k=l 2nkl
For n = 1,2, 10, and 100, we find that E = 1,4/3,20/11, and 200/101, respectively. So
we guess that the general formula is E = 2n/(n + 1). Are you surprised that the answer
tends to 2 as n goes to infinity?
An aha! proof relies on two key realizations. First, the term 2n in the solution tells us
that we should figure out the probability that a given ball is left in the urn and multiply
this by 2n. Now, we need to show that the probability that a given ball is left in the urn is
1/ (n + 1). So what is the probability that a given white ball is left in the urn? The second
aha! realization is to imagine the experiment continuing until all the balls are selected and
withdrawn. Then the given white ball is left in the urn (in the original problem) if and only
if it is selected after all the black balls in the extended problem. There are n + I turns at
which the white ball can be selected (relative to the black balls and ignoring all the other
white balls): before the first black ball, between the first and second black balls, ... , after
2.4 Probability 77
the last black ball. Since these turns are equally likely, the probability that the white ball is
left in the urn is l/(n + I), and we are done.
As an exercise, generalize the problem so that the urn starts with b black balls and
w white balls. Suppose that balls are withdrawn at random until only balls of one color
remain. Show that the expected number of balls remaining is b / (w + I) + w / (b + I).
Bonus: A T woUm Problem
There are two urns. Urn A contains 5 white balls. Urn B contains 4 white balls and I black
ball. An urn is selected at random and a ball in that urn is selected at random and removed.
This procedure is repeated until one of the urns is empty. What is the probability that the
black ball has not been selected?
Actually, the problem isn't difficult to solve. The difficulty is in interpreting the answer.
The favorable outcomes end with a ball chosen from Urn A. The number of balls selected
from Urn B can be any k where 0 :s k :s 4, meaning that 5 + k balls are selected altogether.
In making 5 + k selections of the urns, the probability of selecting Urn A 5 times and Urn
B k times, with Urn A selected last, is (1/2)4+k (41
k
)(1/2). Given that k balls are selected
from Urn B, the probability that the black ball is not selected is (5  k)/5. Therefore, the
probability of a favorable outcome is
4 (4 + k) =
L k 2 5 256
k=O
Scrutinizing the answer, we notice that the denominator is a power of 2, i.e., 2
8
. If
we change it to 210 (so that the exponent is equal to the total number of balls), then the
numerator becomes 252, which is SO the answer may be written
CSO)
210 •
The presence of a binomial coefficient and a power of 2 makes us ask, what is being
counted?
The problem may be generalized so that Urn A contains n white balls and Urn B contains
n  I white balls and I black ball. The probability that the black ball is not selected is given
by
(Notice that using an upper summation limit of k = n instead of k = n  1 only introduces
a 0 summand.) The sum may be written as a telescoping series:
So in general we ask, what is being counted?
Here are three intriguing variations of the above problem.
78 2 Intennediate Problems
Tie Series: The first variation is a nonprobability version. Suppose that teams A and B
play a series of six games with each game won by one of the teams. We can represent the
outcomes of the games by a string of A:s and B's, showing who wins each game. Three
examples of strings are
AAAAAB
AABBAB
BBABBB.
The string AAAAAB, for instance, signifies that team A wins the first five games and team
B wins the last game. Since there are two possible outcomes for each of the six games,
there are 2
6
= 64 possible strings.
Let's suppose that the winner of the series is decided as soon as one of the teams wins
three games. Any games after that are considered exhibition games. We put an asterisk (*)
in the string at the point where the series is decided. Thus, the three example strings above
become
AAA*AAB
AABBA*B
BBAB*BB.
Let's perform this procedure for all of the 64 series.
AAA*AAA ABAA*AA BAAA*AA BBAAA*A
AAA*AAB ABAA*AB BAAA*AB BBAAA*B
AAA*ABA ABAA*BA BAAA*BA BBAAB*A
AAA*ABB ABAA*BB BAAA*BB BBAAB*B
AAA*BAA ABABA*A BAABA*A BBAB*AA
AAA*BAB ABABA*B BAABA*B BBAB*AB
AAA*BBA ABABB*A BAABB*A BBAB*BA
AAA*BBB ABABB*B BAABB*B BBAB*BB
AABA*AA ABBAA*A BABAA*A BBB*AAA
AABA*AB ABBAA*B BABAA*B BBB*AAB
AABA*BA ABBAB*A BABAB*A BBB*AAA
AABA*BB ABBAB*B BABAB*B BBB*ABB
AABBA*A ABBB*AA BABB*AA BBB*BAA
AABBA*B ABBB*AB BABB*AB BBB*BAB
AABBB*A ABBB*BA BABB*BA BBB*BBA
AABBB*B ABBB*BB BABB*BB BBB*BBB
We see that altogether there are 120 exhibition games, with 60 A wins and 60 B wins. What
is surprising about this is that 120 = 6·20 = 6 . ( ~ ) . Thus, the 60 A:s and 60 B's can be
arranged to form all the "tie series" of length 6, that is, strings with three A:s and three B's.
The twenty tie series of length 6 are
AAABBB
AABBAB
AABBBA
ABBAAB
AABABB
ABABAB
ABBBAA
ABBABA
BBABAA
BABABA
BBAAAB
BAABBA
BBBAAA
BBAABA
BAAABB
BAABBA.
2.4 Probability 79
In general, if we list all series of length 2n, with the winning team the first to win n
games, then the exhibition games can be arranged to produce all tie series of length 2n.
The tie series problem is equivalent to the urn problem since one can ask, in the series
problem, what is the expected number of exhibition games per series? This is 2n times the
probability that the black ball is not selected in the urn problem. I wonder whether there is
a neat bijection proof of the tie series assertion.
Random City Walk: An object travels along the integer points of the plane, starting at the
point (0,0). At each step, the object moves one unit to the right or one unit up (with equal
probability). The object stops when it reaches the line x = n or the line y = n. We will
show that the expected length of the object's path is 2n  2n e:)2
2n
.
The object's last stop before hitting a boundary line is a point of the form (n  1, k) or
(k, n 1), for 0 :s k :s n 1. The probability of visiting the point (n 1, k) and then hitting
the line x = n is By symmetry, the probability of visiting the point (k, n  1)
and then hitting the line y = n is the same. Hence, the expected path length is given by
nl 1 (+k 1) (l)n+kl
E = 2n  L (n  k)2 . _ n  
2 n 1 2
k=O
Thus, the expected number of steps to the corner (the point (n, n» is
2n  E = E(n _k)(n:: 1)
This is a telescoping series, for the summand may be written
It follows that
E = 2n  2n en
n
)T2n.
Is there an aha! proof of this formula?
Banach's Matchbox Problem:
8
A mathematician has two matchboxes, each containing n
matches. He selects a matchbox at random and withdraws a match. He repeats this process
until, attempting to withdraw a match, he finds that the matchbox he has selected is empty.
In Banach's matchbox problem, one wants the probability distribution of the number of
matches left in the nonempty box.
We can also ask, what is the expected number of matches in the nonempty box? Label
the matches in the first box 1,2, ... , n, and those in the second box also 1,2, ... , n. The
computation for the expected number of matches is basically the same as in the random
walk problem. We can think of Banach's problem as concerning two matchboxes with
n + 1 matches each. When the (n + 1 )st match is taken, that means that the box has been
emptied and the box has been selected again. We would like a simple proof that when the
experiment is over, the probability that any particular match is still in its box is e:)2
2n
;
then the expected number of matches left is 2n times this quantity.
8The problem comes from Stefan Banach (18921945), the founder of functional analysis.
80 :2 Intermediate Problems
Random Points on a Circle
Given n random points on the circumference of a circle, what is the probability that they
are all contained in a semicircular arc?
Solution
Let the points be Pi, P2 , ... , P
n
• For 1 ::: i ::: n, define Ei to be the event that the
semicircular arc starting at Pi and going clockwise around the circle contains no Pj, for
j f:. i. The events E; are disjoint and Pr(E;) = (lj2)nl. Hence, the desired probability
is
n
=
2nl'
Bonus: Random Arcs on a Circle
Suppose that n arcs of length a are selected at random on a circle of circumference 1. With
what probability is the circumference completely covered by the arcs?
Assuming that the arcs are given in counterclockwise order around the circle, it can be
shown that the probability that there are "gaps" at the clockwise endpoints of i specified
arcs is (1  ia)nl if 1 ::: i ::: LljaJ and 0 otherwise. It follows by the principle of
inclusion and exclusion (see Toolkit) that the probability that the circle is covered by the
arcs is
This formula was found by W. L. Stevens.
The Gobbling Algorithm
Here is a procedure that I call the Gobbling Algorithm.
GOBBLING ALGORITHM. Start with a positive integer n. Choose an integer from 1 to nat
random. Subtract this integer from n and replace n with the resulting integer. Repeat this
process until you obtain O.
Gobbling Algorithm
Let n be a positive integer.
While n > 0, do:
Let k be a random positive integer between 1 and n.
Output k.
Let n ~ n k.
:2.4 Probability 81
Let's do an example. Suppose that we start with n = 10. We choose an integer from 1 to
10 at random; let's say we choose 4. So we subtract, 104 = 6. Now we choose an integer
from 1 to 6. Let's say we choose 3. So we subtract, 6  3 = 3. Now we choose an integer
from 1 to 3. Let's say we choose 2. So we subtract, 3  2 = 1. Now we choose an integer
from 1 to 1, and of course this integer is 1. So we subtract, 1  1 = O. Having obtained 0,
we stop. Our example consists of four steps (choosing an integer and subtracting).
Starting with a positive integer n, what is the expected number of steps in the Gobbling
Algorithm?
Solution
Let e(n) be the expected number of steps starting with the integer n. Then the first number
chosen is either 1 (this happens with probability 1/ n) or not 1 (this happens with probabil
ity (n  l)/n). Thus, we obtain the recurrence relation
1 n  1
e(n) = (e(n  1) + 1) + e(n  1)
and it follows instantly that
n n
1
=e(n1)+, e(l)=l,
n
1 1 1
e(n) = 1 +  +  + ... + .
2 3 n
This quantity is the harmonic sum Hn (see p. 67).
Bonus: Average Number of Cycles in a Pennutation
Choose a random permutation of the set {I, 2, 3, 4, 5, 6,7,8,9, 1O}, say,
(
1 234 5 678
5 7 1 8 3 942
Written in cycle notation, the permutation is
9
10
(1,5,3)(2,7,4,8)(6,9, 10),
10)
6 .
and we see at a glance that it has three cycles. On average, how many cycles do we ex
pect in a permutation of n elements? Surprisingly, the answer comes from the Gobbling
Algorithm.
What is the relationship between the numbers produced by the Gobbling Algorithm and
the cycle lengths of a random permutation? If the algorithm produces the numbers 3, 4, 3
(in the case n = 10), is this outcome supposed to represent all permutations of cycle type
3 + 3 + 4? Clearly not, as the algorithm could produce these cycle lengths in a different
order. Which permutations of cycle type 3 + 3 + 4 does this outcome represent?
Actually, we can represent every permutation in a unique form that is consistent with
the algorithm. The way we have written our example permutation above (on 10 elements),
the smallest element in each cycle appears first, and the cycles are in order of their first
elements. Let's say that a permutation written in this way is in "standard form."
82 2 Intermediate Problems
Note. Normally, the order doesn't matter in a cycle type, so that, for example,
3 + 4 + 3 and 3 + 3 + 4
are regarded as the same. But in our situation, order matters, since different orders refer to
different permutations in standard form.
What is the probability that a permutation in standard form of cycle type 3 + 4 + 3
is chosen at random from the set of all permutations of the set {l, 2, 3, ... , IO}? There
is only one choice for the first element of the first cycle (it must be I), 9 choices for the
second element, and 8 choices for the third element. There is only one choice for the first
element ofthe second cycle (the smallest element not yet chosen), 6 choices for the second
element, 5 choices for the third element, and 4 choices for the fourth element. There is only
one choice for the first element of the third cycle (the smallest element not yet chosen), 2
choices for the second element, and 1 choice for the third element. The probability that
such a permutation is chosen is therefore
1·9·8·1·6·5·4·1·2·1
10·9·8·7·6·5·4·3·2·1 10·7·3
But this is the probability that the numbers 3, 4, 3 are produced by the algorithm!
Let's record our finding as a theorem.
GOBBLING ALGORITHM THEOREM. Let II, 12, ... , Ik be positive integers whose sum is
n. The probability that the Gobbling Algorithm, starting with n, produces the numbers II,
1
2
, ••. , Ik is equal to the probability that a permutation in standard form of cycle type
is chosen at random from the set of all permutations of n elements.
As a consequence of the Gobbling Algorithm Theorem, the average number of cycles in
a permutation of n elements is the average number of steps in the algorithm, i.e., Hn.
We can also consider a twodimensional version of the Gobbling Algorithm.
2·D Gobbling Algorithm
Let (m,n) be a an ordered pair of positive integers.
While m > 0 and n > 0, do:
Let kl be a random positive integer between 1 and m,
and k2 a positive integer between 1 and n.
Output (kl,k2)'
Let m 0( m  k
l
, n 0( n  k2 .
Given an ordered pair of positive integers (m, n), what is the expected number of steps in
the 2D Gobbling Algorithm?
2.5 Number Theory
2.5 Number Theory
Square Triangular Numbers
83
A child playing with pebbles discovers that she can place 36 pebbles in a triangle with 8
pebbles on a side or in a 6 x 6 square .
• • • • • • • •
• • • • • • • • • • • • •
• • • • • • • • • • • •
• • • • • • • • • • •
• • • • • • • • • •
• • • • • • • • •
• • • • • • • •
•
Thus, 36 is both a triangular number and a square number. Find another number greater
than 1 that is both a triangular number and a square number.
Solution
Obviously, 0 and I are both triangular and square numbers, but we don't see much of a
pattern looking at the numbers 0, 1, and 36. Let's introduce some variables. A triangular
number is of the form 1 + 2 + ... + m = m(m + 1)/2. A square number is ofthe form
n
2
• So we want a solution in integers to the equation
m(m + 1) 2
2=n.
We already know the solutions (m, n) = (0,0), (1,1), and (8, 6).
Multiplying by 8 and completing the square yields
(2m + 1)2 = 8n
2
+ 1.
Letting x = 2m + 1 and y = n, we arrive at the equivalent equation
This equation is called a Pell equation (see the Bonus). Notice that x is odd since x
2m + 1, and this condition is automatically satisfied by x in the above equation, since 8y2
is even and the right side is odd.
Let's write down the solutions to the Pell equation that we know.
x y
o
3 1
17 6
(trivial)
(obvious)
(the child's solution)
Now, we make an educated guess that the values in the x and y columns follow a pattern.
We see that 17 = 6·3  1 and 6 = 6· 1  O. So it appears that the pattern, for both columns,
is that you get the next number by multiplying the current number by 6 and subtracting the
previous number. That is to say, the numbers in each column satisfy the recurrence relation
84 :2 Intermediate Problems
If this is the case, then we can find new x and y values as follows:
x = 6·17  3 = 99, Y = 6·6  I = 35.
Indeed, these numbers satisfy Pell's equation:
The corresponding values of m and n are m = (99  1)/2 = 49 and n = 35, and we have
49·50/2 = 35
2
= 1225.
Thus, 1225 is both a triangular number and a square number.
Bonus: Pell Equations
Equations of the form x2  dy2 = I, where d is a positive nonsquare integer, are called
Pell equations. Pell equations are named after number theorist John Pell (16111685), but
they were studied much earlier by Brahmagupta.
9
In our problem, we considered the Pell equation
It can be shown that all nonnegative integer solutions to this equation are given by the
trivial solution (xo, Yo) = (I, 0), the obvious solution (Xl, y.) = (3, I), and the recurrence
formulas
Yk = 6Yk1  Yk2, k::: 2.
Brahmagupta left us with this challenge: "A person who can, within a year, solve X2 
92y
2
= I is a mathematician." Can you find a nontrivial solution to Brahmagupta's equa
tion?
Foxy Factorial
Recall that n! (.on factorial") is the product of the first n positive integers:
n!=1·2·3· .. ··n.
Without performing multiplications, find the digits denoted a and b in
23! = 258520Iab38884976640000.
9 Brahmagupta (598670) made contributions in algebra, analysis, geometry, trigonometry, and number theory.
His most famous work, Brahmasphutasiddhanta (The Opening of the Universe), gives among other things rules
for calculating with zero.
2.5 Number Theory 85
Solution
Do you know some divisibility rules that might help?
The sum of the given digits is 86, while the sum of all the digits must be a multiple of
9 (since 9 divides 23!). Hence a + b = 4 or a + b = 13. Also, the alternating sum of the
given digits is 10, while the alternating sum of all the digits must be a multiple of 11 (since
11 divides 23!). Hence, b  a = 1. The only integer solution to these equations is a = 6
andb = 7.
Bonus: Divisibility Rules
In the Solution, we used two divisibility rules:
• The sum of the digits of a number leaves the same remainder upon division by 9 as
the number itself.
• The alternating sum of the digits of a number leaves the same remainder upon division
by 11 as the number itself.
To prove the facts, suppose that a number n has the basel 0 representation
that is,
n = dk 10k + ... + d210
2
+ d) 10 + do.
Reducing each term with respect to the moduli 9 and 11, we obtain
n == dk + ... + d2 + d) + do (mod 9)
and
n==(I)kdk+···+d2dl+do (mod 11).
Hence, the remainder upon dividing n by 9 (respectively, 11) is the same as the remainder
upon dividing the sum of the digits (respectively, the alternating sum of digits) of n by 9
(respectively, 11). This proves the divisibility rules for 9 and II.
Note. For any base b, these same divisibility rules work for b  1 (if b > 2) and b + 1.
Always Composite
Prove that n
4
+ 4 is a composite number (see Toolkit), for all n :::: 2.
Solution
Surprisingly, the polynomial n
4
+ 4 factors. To see how, use the difference of squares
factorization, a
2
 b
2
= (a + b)(a  b). Thus
n
4
+ 4 = (n
2
+ 2)2  4n
2
= (n
2
+ 2 + 2n)(n2 + 2  2n).
As long as the two factors, n
2
+ 2n + 2 and n
2
 2n + 2, are both at least equal to 2,
their product will be a composite number. And this is easily verified: n
2
+ 2n + 2 >
n
2
 2n + 2 = n(n  2) + 2:::: 2.
86 2 Intermediate Problems
Bonus: The Folium of Descartes
We will show that the only point on the Folium of Descartes,1O x
3
+ y3 = 3xy, with
integer coordinates is (0,0). Using the factorization x
3
+ y3 + z3  3xyz = (x + y +
z)(x
2
+ y2 + z2  xy  yz  xz), we let z = I and obtain I = x
3
+ y3 + I  3xy =
(x + y + I)(x
2
+ y2 + I  xy  y  x). The only integer factorizations of I are I . I
and I· 1. In the first case, x + y + 1 = I and x
2
+ y2 + I  xy  y  x = I, and
hence x + y = 0, from which we obtain (x + yf = 3xy, and so 3xy = 0; this implies
that x = 0 or y = 0 (and hence x = y = 0). In the second case, x + y + I = I and
x
2
+ y2 + Ixy  y x = I, and hence x + y = 2, from which we obtain 3xy = 8;
but this is impossible since 3 does not divide 8 evenly. Hence, the only integer point on the
curve is (0,0).
y
          ~ ~ ~ ~ +        x
A Problem of I' s
Let
S=I+II+III+···+I. .. I,
'v'
III
where the last summand has III decimal digits each equal to I. What is the sum of the
digits of S?
Solution
Here is a simple way to compute S:
9S = 9 + 99 + 999 + ... + 9 ... 9 = 10  I + 10
2
 I + 10
3
 I + ... + lOll!  I
'v'
III
= III. .. IOIll = 1. .. IIl2
... 'v'
III 112
S = (1. .. 1112)/9.
'v'
112
IOThis curve was introduced by Rene Descartes (15961650), the founder of analytic geometry. The word
"folium" means "leaf" in Latin.
2.5 Number Theory 87
In dividing 1 ... 1 by 9, we notice a recurring pattern due to the fact that 111111111 =
'v'
112
9·12345679. Thus, the quotient consists of blocks 123456790 (oflength 9 and digital sum
37) plus "leftover" digits at the end. Since S has III = 9· 12 + 3 digits, there are 12 such
blocks and three leftover digits. The last four digits of S are (1111  0 112) / 9 = 0999/9 =
0111. Therefore, the sum of the digits of S is 12·37 + 3 = 447.
Bonus: A Googol
The number S has III digits, so it is greater than a famous number called a googol. A
googol is 10
100
, i.e., I followed by one hundred O's. A googol is the smallest number with
101 decimal digits. The term googol was coined in 1920 by Milton Sirotta (age nine).
A Problem of 2' s
Let
2
T = 2
22
.
~ '
222
where the tower of exponents consists of 2222's. What is the unit's digit of T?
Solution
The unit's digit of powers of 2 repeats in the pattern 2, 4, 8,6. Since the exponent of the
bottom 2 in T is a multiple of 4, the unit's digit of T is 6.
Bonus: Ackermann's Function
A tower of n 2's, i.e.,
2
n
is a fastgrowing function of n. However, much fastergrowing functions exist. Define
II (n) = 2n, i.e., the function that doubles each input. Define
h(n) = (flO ... 0 Id(l).
..
n
This is the composition of II with itself n times, evaluated at 1. Thus, h (n)
exponential function. Similarly, define
Thus,
!3(n) = (f2 0···0 h)(l)·
..
n
2
88
our tower of 2's function. Continuing in this manner, define
f4(n) = (/3 0'" 0 /3)(1).
~
n
2 Intermediate Problems
It's difficult to describe f4(n). It is a tower of 2's, where the number of 2's is itself a tower
of 2's, the number of which is a tower of 2's, etc. In general, define
A(n) = (Al 0"'0 Al)(1), k::: 2.
n
The fk are faster and fastergrowing functions of n. Ackermann's function f is the "diag
onal" of this process; that is,
f(n) = fn(n).
We can easily compute only the first three terms of Ackermann's function: f(1) = 2,
f(2) = 4, f(3) = 16. After these, the terms become very large. For instance, f(4) is a
tower of 65536 2's.
Ackermann's function 11 is recursive but not primitive recursive. A function is recursive
if it can be obtained as the result of a welldefined algorithm. A function is primitive re
cursive if it can be obtained by the usual arithmetic operations, as well as composition and
recursion in one variable. The function f(n) can be computed via recursion (it's easy to do
so using our definition of fk (n», but not recursion in one variable.
A Problem of 3' s
Let
U = 3 ... 3 x 3 ... 3,
~ ~
333 333
where each factor consists of 333 digits each equal to 3. What is the sum of the digits of U?
Solution
We have
U=3 ... 3x3 ... 3
~ ~
333 333
1 1
= 9 ... 9x9 ... 9
3 ~ 3 ~
333 333
= ~ ( 1 0 3 3 3 _ 1)(10
333
 1)
9
= ~ ( 1 0 6 6 6 _ 2 X 10
333
+ 1)
9
1
= (9 ... 980 ... 01)
9 ~ ~
332 332
= 1 ... 108 ... 89.
~ ~
332 332
II Ackermann's function was developed by the logician Wilhelm Ackermann (I 8961 962}.
2.5 Number Theory
Hence, the sum of the digits of U is
332 + 8 . 332 + 9 = 2997.
Bonus: A Square Root Algorithm
Consider a "toy version" of our problem,
333 x 333 = 110889.
89
So 110889 is a perfect square. If we were given this number, how would we quickly find
its square root? A neat square root algorithm is a little like long division. Write the number
under a radical sign, with pairs of digits separated by commas (starting at the right):
Jll, 08, 89.
Looking at the first pair of digits, 11, we ask, what is the largest square less than or equal
to this number? It is 3
2
= 9. Write 3 above the radical and 9 below the 11.
3
.JII, 08,89
9
Now subtract the 9 from the 11 and bring down the next two digits.
3
.JIl, 08, 89
9
208
Double the number above the radical (the 3) and write the result to the left as a twodigit
number with a blank for the unit's digit.
6_
3
.JIl, 08, 89
9
208
What is the largest number that we can put in the blank such that this number multiplied by
the twodigit number so obtained yields a product less than or equal to 208? It is 3, since
63 x 3 = 189, while 64 x 4 = 256. So put 3 in the blank and above the radical, write the
product (189) beneath the 208, subtract, and bring down the next two digits.
3 3
VII, 08, 89
9
2 08
63 1 89
19 89
Now double the number above the radical to get 66, put this number to the left as a three
digit number with a blank for the unit's digit.
90
3 3
Jll, 08, 89
9
2 08
63 1 89
19 89
2 Intermediate Problems
What is the largest number that we can put in the blank such that this number multiplied
by the threedigit number so obtained yields a product less than or equal to 1989? It is 3.
3 3 3
Jll, 08,89
9
208
63 1 89
19 89
663 19 89
0
Because we have obtained a 0 remainder, the process is over. We see that the square root
of 11089 is 333.
Why does this process work? Suppose that in computing the square root of n, the current
number above the radical sign is x, which represents 10
k
x, for some k. Then (1 Ok x f ::: n.
We put a new number, y, above the radical, so that the number above the radical represents
10
k
x + 1O
k

2
y, where (1 Ok x + 1O
k

2
y)2 ::: n, or
This inequality is the condition that the number represented by twice the number above the
radical (2x) with a digit appended (y) multiplied by the number represented by the digit
appended (y) is less than or equal to the current remainder (n  1 02k x
2
).
To test your understanding of the algorithm, try computing the square root of 1530169.
Fibonacci Squared
Let {!n
2
} be the sequence of squares of the Fibonacci numbers (see Toolkit). Find a linear
recurrence relation with constant coefficients for this sequence.
Solution
Start with the relations
!n = !nl + !n2,
!n3 = !nl  !n2.
:2.5 Number Theory
Square both equations and add:
!n
2
+ !n
2
_3 = (fnl + !n_2)2 + (fnl  !n_2)2
= 2!n
2
_1 +
And so we obtain the recurrence relation
91
An aha! proof of the recurrence relation comes from observing that !n2 and !nl are
the sides, and !n3 and !n the diagonals, of a degenerate (collapsed) parallelogram. The
formula given on p. 57 yields
and transposing the !L3 term to the right side gives our recurrence relation.
Bonus: Powers of Fibonacci Numbers
Let's investigate the same question for kth powers of Fibonacci numbers, where k is any
positive integer. We want to find a linear recurrence relation with constant coefficients for
the sequence {Ink}. The method is to use characteristic polynomials (see Toolkit under
"Fibonacci numbers").
Let's work out the k = 2 case first (this will reproduce our recurrence relation found in
the Solution). We know that the roots of the characteristic polynomial, x
2
 x  I, of the
Fibonacci sequence are ifJ = (l + J5)/2 and ¢ = (l  J5)/2. Thus, an explicit formula
for the Fibonacci numbers is
where Cl and C2 are constants (we could determine the constants but we don't need them).
It follows that
!n
2
= c:(ifJ2)n + +
and since = I, the characteristic roots ofthe polynomial for the sequence {!n
2
} are
ifJ2, , and I. Hence, the characteristic polynomial for this sequence is
To simplify further, we introduce the Lucas numbers L
n
, which satisfy the same recurrence
relation as the Fibonacci numbers but with initial values Lo = 2, L 1 = I. Thus, the Lucas
numbers are
2, 1, 3, 4, 7, 11, 18, 29, 47,
Using the initial values, it is easy to show that
So our formula for the characteristic polynomial in the case k = 2 simplifies to
(x
2
 L
2
x + I)(x + I) = (x
2
 3x + I)(x + I) = x
3
 2X2  2x + 1.
92 2 Intermediate Problems
From this we confirm the recurrence relation found in the Solution.
The case k = 3 is similar. By the binomial theorem, the roots of the characteristic
polynomial for the sequence U"J} are cp3, cp2¢ = cp, cp¢2 = ¢, and ¢3. Hence, the
characteristic polynomial is
(x  cp3)(X  ¢3)(X + cp)(x + ¢) = (x
2
 (cp3 + ¢3)X  1)(x
2
+ (cp + ¢)x  I)
= (x
2
 L3X  l)(x
2
+ L1x  I)
= (x
2
 4x  I )(x
2
+ X  I)
= X4  3x
3
 6x
2
+ 3x + I.
This gives us a recurrence relation for the cubes of the Fibonacci numbers:
Using the same method, we find the characteristic polynomial forthe sequence offourth
powers of the Fibonacci numbers,
for fifth powers,
for sixth powers,
for seventh powers,
and for eighth powers,
The pattern is evident now, and we can write it for all k ::: I as
L(kl)J2J { I
n (x
2
+ (_I)i+l Lk2iX + (_l)k). (x  I)
i=O (x+l)
if k mod 4 = 1,3,
ifk mod 4 = 0,
ifk mod 4 = 2.
This formula for the characteristic polynomial, found by John Riordan, means that the
sequence {Ink} of kth powers ofthe Fibonacci numbers satisfies a linear recurrence relation
of order k + I with integer coefficients.
:2.5 Number Theol)' 93
A Delight from Pascal' s Triangle
Prove this gem due to Paul Erd6s
12
and George Szekeres:
13
In a row of Pascal's triangle,
any two numbers aside from the I 's have a common factor.
For instance, in the sixth row,
I 6 15 20 15 6 1 ,
the numbers 6 and 15 have the common factor 3, the numbers 6 and 20 have the common
factor 2, and the numbers 15 and 20 have the common factor 5.
Solution
Suppose that the numbers are ('j) and (Z), with 0 < j < k < n. Can you think of an
identity that relates ('j) and (Z)?
We employ the "subcommittee identity" (see Bonus),
Obviously, ('j) divides the right side of this equation, so it also divides the left side. How
ever, if (j) and ( ~ ) were coprime, then ('j) would divide e), but this is impossible since
('j) > ( ~ ) . So (j) and ( ~ ) are not coprime; they have a common factor.
Bonus: The Subcommittee Identity
Here is an aha! proof of the identity
for 0 ~ j ~ k ~ n. The left side counts the number of ways to choose, from an organi
zation of n people, a committee of size k and a subcommittee of size j. (First choose the
committee and then choose the subcommittee.) But the right side counts the same thing.
(First choose the subcommittee and then choose the committee.) Therefore, the two ex
pressions are equal.
An Unobvious Integer
Prove that, for every integer n 2:: 1, the quantity
is an integer.
(2n _ 1)(2n  2)(2n _ 22)(2n  2
3
) ... (2n _ 2
n

l
)
n!
12Paul Erdos (19131996) was one of the most prolific mathematicians of all time. He made contributions in
combinatorics, graph theory, and number theory. I highly recommend George Paul Csicsery's documentary film
N is a Number: A Portrait of Paul Erdos, about Erdos' life and mathematics.
13George Szekeres (19112005) worked in geometric combinatorics and graph theory, as well as relativity the
ory. Szekeres took only one course in mathematics, as an undergraduate.
94 :2 Intermediate Problems
Solution
Quick calculations show that the quantity equals I, 3, 28, and 840, for n = I, 2, 3, and 4,
respectively.
A good method for showing that an algebraic expression is an integer is to show that it
counts something. Let's illustrate this method with a very simple problem. Prove that the
product of any n consecutive integers is a multiple of n!. This amounts to showing that the
expression
(k + I)(k + 2)(k + 3)··· (k + n)
n!
is an integer for all integers k and positive integers n. If one of the factors in the numerator
is 0, then obviously the quantity equals 0, and there is nothing to prove. If all the factors are
negative, then we may factor out a I from each term and obtain ± I times a quantity in
which all the factors in the numerator are positive. So, let's assume that all the factors in the
numerator are positive, i.e., k ::: 0. Now, this quantity is equal to the binomial coefficient
(see Toolkit)
so it counts the number of combinations of n objects from a set of k + n objects; hence it
is an integer.
Now, let's give a counting proof for our original problem. Our quantity counts the num
ber of bases for an ndimensional vector space over the field F = to, I} (see Toolkit).
For example, there are three bases of the 2dimensional vector space over F. They are
{(O, I), (I, O)}, {(O, I), (I, I)}, and {(l, 0), (I, I)}.
Let's show that our quantity counts these bases. Of course, there are n vectors in a
basis for an ndimensional space. I think you will guess (correctly) that the term n! in
the denominator accounts for all permutations of the n basis elements (since the order of
elements in a basis is unimportant). We must show that there are (2n  I )(2n  2)(2n 
22)(2n  2
3
) .•• (2n  2
n

l
) choices for an ordered set of n linearly independent vectors
of length n over F. There are 2
n
vectors of length n over F. Any of these vectors may be
taken for the first basis vector, except for the all ° vector. Hence, there are 2
n
 I choices
for the first basis vector. The second basis vector may be any of the 2
n
vectors of length n
except for those that are multiples of the first basis vector. Since there are only two possible
multipliers (0 and I), there are 2
n
 2 choices for the second basis vector. The third basis
vector may be any of the 2
n
vectors of length n except for linear combinations of the first
two basis vectors. A linear combination of two vectors v and w looks like av + {3w, where
a, {3 E F. Hence, there are 22 linear combinations and therefore 2
n
 22 choices for the
third basis vector. Continuing in this manner, we obtain all the factors in the numerator,
one for each vector in the ordered basis.
A different (although similar) proof is obtained by realizing that the numerator of our
quantity is the number of n xn invertible matrices over the field F. This is because the rows
of such matrices span the ndimensional vector space over F and hence are sequences of n
linearly independent vectors of length n, as indicated above. What about the denominator?
It counts the number of permutation matrices (matrices over F with a single I in each row
2.5 Number Theory 95
and column). Since the permutation matrices constitute a subgroup of the group of matri
ces, by Lagrange's theorem (see Toolkit), the number of such permutations (n!) divides the
order of the group. Hence, the ratio is an integer.
Is it true that the expression
nJ
k=O
n!
is an integer for every pair of positive integers band n? Our proofs using bases or matrices
extend to the case where b is a prime power (as we may replace F with a field with any
prime power number of elements). However, the proofs don't work when b is not a prime
power. Fortunately, a different (more prosaic) proof works for all values of band n.
We carry out this proof by comparing the power of each prime divisor of the numerator
and denominator. A prime p divides n! to the power
The reason is that there are L n / p J multiples of p at most equal to n; there are L n / p2 J
multiples of p2 at most equal to n, etc. The above sum is less than or equal to
which is a geometric series with sum
n n
++"',
p p2
n
pI
Since the power of p is an integer, it is at most
l p ~ IJ
We will show that the power of p that divides the numerator is at least equal to this number.
Since b
n
 b
k
= bk(b
n

k
 1), there is a multiple of p in the numerator for each term
b
n
 b
k
such that b
n

k
== 1 (mod p). If b is not a multiple of p, then, by Fermat's (little)
theorem (see Toolkit), this happens whenever p  1 I n  k. Since n  k ranges from n to
1 (as k ranges from 0 to n  1), there are Ln/(p  I)J such terms. If b is a multiple of p,
then the power of p in the numerator is in general much greater than the power of p in the
denominator, for it is equal to 1 + 2 + ... + n  1 = n(n  1)/2 (there is a contribution
of k from the factor b
k
, for 1 .::; k .::; n  1), which is greater than Ln/(p  I)J, if p > 2.
However, in the case p = 2, n = 2, the inequality goes in the wrong direction. But in this
case the quantity is
(b
2
 I)(b
2
 b)
2!
which is an integer since the numerator is even (it contains consecutive integer factors b  1
and b). Therefore, in all cases, the power to which p divides the numerator is at least equal
to the power to which it divides the denominator, and we are finished.
96 :2 Intermediate Problems
Bonus: Fermat's (little) Theorem
We can give an aha! proof of Fermat's (little) theorem (a
P
== a (mod p), for p prime)
in the case a ~ 1 via a counting argument. How many circular necklaces can be made
with p beads from a set of a different types of beads, not using only one type of bead,
where two necklaces are considered the same if we can rotate one to match the other?
(We call the allowed rotations "circular symmetries.") We claim that the number of such
necklaces is (a
P
a)/ p. The reason is that, without regard to the circular symmetries, there
are a
P
 a necklaces (we subtract the a necklaces made of only one type of bead). And
since p is a prime number, there are p different rotations of each necklace (think about
this!). Hence, taking into account the circular symmetries, there are (a
P
 a)/ p different
necklaces. Because the number of necklaces is an integer (our good method is at work
again), we obtain the congruence a
P
== a (mod p).
Magic Squares
An order n magic square is an n x n array of integers 1 through n
2
such that the sums
along every row, column, and main diagonal are the same.
(a) Create an order 3 magic square.
(b) Create an order 9 magic square.
(c) Create an order 6 magic square.
Solution
(a) Since 1 + ... + 9 = 45, the constant sum must be 45/3 = 15. With a little trial and
error we find the unique (up to rotation and reflection) magic square, as shown.
8 1 6
3 5 7
4 9 2
(b) Let's compute the constant sum for a magic square of side m. The sum of all the
numbers in the square is
1+···+m
2
.
From our formula found in "Forward and Backward," we can write this as
m
2
(m
2
+ 1)
2
Since each of the m rows has the same sum, this sum is
m
2
(m
2
+ 1) m(m
2
+ 1)
'' = ':'
2m 2
2.5 Number Theory 97
We can create a magic square of order 9 by superimposing an order 3 magic square
with itself. It is convenient to number rows, columns, and entries starting with O. In
this case, the constant sum of an order m magic square is m(m
2
 1)/2. Suppose that
A = [a(i . j)] is an order m magic square and B = [bU. j)] is an order n magic
square. Then we can create an order mn magic square C = [cU, j)] according to the
recipe
c(i , j) = a(li/nJ , U/nJ) . n
2
+ b(i mod n, j mod n), 0::: i , j ::: mn  1.
This puts a magic square in the same pattern as B in each place in A, numbered
accordingly.
We do a sample row sum, the sum of the elements of row 0:
mnl mnl
L c(O, j) = L [a(O, Lj/nJ) . n
2
+ b(O, j mod n)]
j=O j=O
nm(m
2
 1)· n
2
mn(n
2
 1)
= 2 + 2
mn(m
2
n
2
 1)
2
Following our recipe, we create an order 9 magic square (with constant sum 360).
70 63 68 7 0 5 52 45 50
65 67 69 2 4 6 47 49 51
66 71 64 3 8 I 48 53 46
25 18 23 43 36 41 61 54 59
20 22 24 38 40 42 56 58 60
21 26 19 39 44 37 57 62 55
34 27 32 79 72 77 16 9 14
29 31 33 74 76 78 11 13 15
30 35 28 75 80 73 12 17 10
In order to obtain a magic square numbered 1 through 81, we would add 1 to each
entry of our square.
(c) The constant for an order 6 magic square is Ill. It's difficult to see how to create such
a square from scratch, as we can' t compose a 3 x 3 magic square and a 2 x 2 magic
square (because there is no 2 x 2 magic square). However, we can create an order 6
magic square based on the order 3 magic square. The idea is to place a 2 x 2 array in
each cell of the order 3 magic square, and number each set of four cells consecutively
according to the pattern of the order 3 square. However, there is the question of how
to number the cells of the 2 x 2 array. For example, if we order the cells from left to
right and top to bottom, we do not obtain a magic square. Here is a numbering that
works (found by trial and error or the method of the Bonus):
98 2 Intermediate Problems
32 29 4 I 24 21
30 31 2 3 22 23
12 9 17 20 28 25
10 II 18 19 26 27
13 16 36 33 5 8
14 15 34 35 6 7
Bonus: Conway's lUX Method
John H. Conway invented a way. called the LUX method, to create an order 2m magic
square, given an order m magic square, where m is an odd number greater than I. (The
order six magic square above is the case k = I.) Assume that m = 2k + I, where k ::: I.
Create an m x m array consisting of k + 1 rows of L's, 1 row of V's, and k  1 rows of
X' s. Interchange the L in the middle of the array with the V below it. Below is the array
withk = 4.
L L L L L L L L L
L L L L L L L L L
L L L L L L L L L
L L L L L L L L L
L L L L V L L L L
V V V U L U V V V
X X X X X X X X X
X X X X X X X X X
X X X X X X X X X
Each cell above is filled with a 2 x 2 array according to one of three patterns, L, V, and
X, as shown below.
3 /00U30X3
1 ~ 2 1 22 1
L u x
We will create an order 2m magic square, assuming numbering beginning with O. A cell
containing number z in the order m magic square is replaced by four cells with numbers
4z, 4z + I, 4z + 2, and 4z + 3, according to the LUX numbering. Let's do some sample
computations to indicate that the row, column, and diagonal sums are correct.
2.5 Number Theory 99
Suppose that row 0 of an order m square has elements Xo, ... , Xml. Then the sum of
the elements of row 0 in the order 2m square is
(8xo + 3) + ... + (8Xm1 + 3) = 8(xo + ... + Xml) + 3m
= 8 (m3 2 m) + 3m
(2m)3  (2m)
2
This is the correct sum for an order 2m magic square.
Let's also calculate the sum of the elements of column O. Suppose that the column 0
elements of the order m magic square are Yo, ... , Yml. Since the column contains the left
half of k + 1 L's, 1 U, and k  1 X's, we obtain the sum
8(yo + ... + Ymd + 4(k + 1) + 1(1) + 2(k  1) = 8(yo + ... + Ym.) + 3m,
which we know is correct from our previous calculation.
The other row and column sums, and the diagonal contributions are similar. Can you see
why an L and U must be interchanged?
All Things Being Equal
Suppose that 2n + 1 integers have the property that upon removing anyone of them, the
remaining numbers can be grouped into two sets of size n with the same sum. Show that
all 2n + 1 numbers are equal. 14
Solution
Upon removing any number, the sum of the remaining numbers is even. It follows that
all the numbers are odd or all even; that is to say, all the numbers are congruent modulo
2. If the numbers are even, divide them all by 2; if they are odd, subtract 1 from each
number and divide by 2. In this way, we obtain a set of integers with the same property as
before. Repeating this process, we find that the original integers are all congruent modulo
4, modulo 8, etc. This implies that the numbers are all equal.
The result also holds for rational numbers simply by scaling ("clear denominators" by
multiplying by the product of all the denominators).
We can also generalize the problem in another direction. Let k ::: 2. Suppose that N =
k n + 1 integers have the property that upon removing anyone of them, the remaining
numbers can be grouped into k sets of size n with equal sums. Then all N numbers are
equal. The proof is an extension of the one given above. All the numbers are congruent
modulo k. Subtracting the remainder modulo k and dividing by k, we obtain a set of
integers with the same property as before. Continuing in this way, we find that the original
integers are all congruent modulo k, modulo k
2
, etc. Hence, they are all equal.
14This problem was given in the 1973 William Lowell Putnam Mathematical Competition.
100 2 Intermediate Problems
Bonus: The Passage to Real Numbers
Consider the generalization of our problem to real numbers. Suppose that N = 2n + I real
numbers have the property that upon removing anyone of them, the remaining numbers
can be grouped into two sets of size n with equal sums. Show that all N numbers are equal.
The idea is that the 2n + I real numbers generate an abelian (commutative) subgroup
of the (additive) group of real numbers.
15
For example, suppose that n = 3 and the seven
numbers are
1
5' "fi, 2, 3, 3, Jr, 7.
Of course, this set of numbers doesn 'f have the required property; we are only illustrating
how the subgroup is formed. The subgroup is the set of all linear combinations of these
numbers with rational coefficients, i.e., all numbers of the form
a + b"fi + eJr, a, b, e rational numbers.
It's easy to show that this representation is unique. Hence, the subgroup is isomorphic to
the direct product group Q x Q x Q, where Q is the additive group of rational numbers. As
far as our problem is concerned, the elements of this group are the only real numbers that
exist.
Now, we can write each such real number in terms of "coordinates." In our little example
above, (a, b, e) stands for a + b.J2 + e Jr. We are given that when any number is removed,
the remaining 2n numbers can be grouped into two sets of size n with equal sums. Equal
sums mean that in each coordinate, the sum of the values is the same. Thus we have, in
each coordinate, the rational number version of the result that we have already proved!
Hence, in each coordinate, all the rational values are equal. Therefore, all the real numbers
are equal.
The realnumber generalization of the k n + I problem is proved in just the same way.
2.6 Combinatorics
Now I Know My ABC's
An unusual dictionary contains as entries all permutations of the 26 letters A, B, C, ... , Z.
Of course, the entries are in alphabetical order.
(a) What is the next "word" after
ABCDEFGHIJKLMNOPQZYXWVUTSR?
(b) How many "words" are between
AZBCDEFGHllKLMNOPQRSTUVWXY and
ZABCDEFGHIJKLMNOPQRSTUVWXY?
JSGary Martin used this idea to solve a generalization of the problem in which the "numbers" are elements of an
abelian group (see the May 1988 issue of The American Mathematical Monthly).
2.6 Combinatorics 101
Solution
(a) Look at the longest decreasing (antialphabetical order) string that ends the word.
This is ZYXWVUTSR. To find the next entry, the letter to the left of this string, Q, is
interchanged with the first letter greater than Q that occurs in the decreasing string;
this is R. Then the decreasing string that ends the word is reversed. Thus, the next
entry is ABCDEFGHlJKLMNOPRQSTUVWXfZ.
(b) From the example in (a), we see that in going from one entry to the next, one letter
is advanced and the string to the right of that letter is reversed (after switching the
letter with the next highest available letter). In order for the kth letter to advance, all
permutations of the following 26  k letters must occur. This means that the entry
number of a word is given by
26
1 + Lak(n k)!,
k=l
where ak is the number of letters to the right of the kth letter in the word that precede
the kth letter alphabetically. Thus, the entry number of
AZBCDEFGHlJKLMNOPQRSTUVWXY
is 1 + 24· 24!, while the entry number of
ZABCDEFGHlJKLMNOPQRSTUVWXY
is 1 + 25· 25!. Hence, the number of entries between the two words is (1 + 25· 25!)
(1 + 24· 24!)  1 = 372,889,489,441,676,903,055,359,999.
Bonus: An Instant Identity
Suppose that the dictionary uses n letters and hence has n! entries. Then our analysis yields
the identity
n! = 1 + (n  l)(n  I)! + ... + 2· 2! + 1 . I!.
Packing Animals in a Box
Can you put the five 4square "animals"
I I
Skinny
EB
Elly Fatty
Tippy Knobby
into the 4 x 5 box
without overlap? (The figures may be rotated and flipped over if necessary.)
102 2 Intermediate Problems
Note. I composed this problem in 1982, when I took a class on game theory from Frank
Harary (19212005) at the University of Michigan. Professor Harary gave the figures their
whimsical names and proposed tictactoelike games in which two players attempt to
make patterns of O's and X's in the shapes of the figures. The figures were independently
introduced by Solomon Golomb, who called them "polyominoes."
Solution: Many people who try to solve this problem experiment with various arrange
ments without success and wonder why it isn't possible. They may eventually come up
with valid explanations for why the figures don't fit. However, the explanations tend to be
involved and wordy, with several cases to consider based on, say, which way Skinny is
oriented. In fact, a succinct explanation captures the gist of the situation rather neatly.
Shade the squares of the box in a checkerboard pattern.
There are ten gray squares and ten white squares. But when the animals are put into the box,
each requires two gray squares and two white squares, except for Knobby, which requires
three gray squares and one white square, or one white square and three gray squares.
crB ~ Skinny ~ EE
Elly o==r ITIJ Fatty
Tippy Knobby
Altogether the animals require nine gray squares and 11 white squares, or 11 gray squares
and nine white squares. So the animals don' t fit in the box.
This is the essence of an aha! solution: it is a revelation that illuminates a situation,
eliminating long, drawnout explanations.
Bonus: Packing 3D Animals
A 3dimensional version of the packing problem is worth considering. There are seven
4cube animals in 3D:
ffiB
Elly ffi
Tippy Knobby
LIIICI
I I I I
Skinny
Cornery Twisty
We can imagine the figures as made out of wooden blocks. The 3D figures have the same
names as the 2D figures, in addition to the two genuinely new figures which I call Cornery
and Twisty. Since these figures are composed of 28 cubes, it is natural to ask whether they
can be packed into a 2 x 2 x 7 box.
2.6 Combinatorics 103
See if you can accomplish the packing. I found the following type of diagram useful for
keeping track of what I was doing.
IIKIKIKIIII
IIIKIIIII
The diagram shows the top and bottom layers of the 2 x 2 x 7 box. I put a Knobby (K) in
the box, with three of its cubes in the top layer and one in the bottom layer.
Did you find a solution? Okay, the packing is possible, and here is one way to do it.
The key is: Tippy (T), Knobby (K), Elly (E), Skinny (S), Fatty (F), Cornery (C), Twisty
(W).
I admit that when I first posed the 3D puzzle, I tried unsuccessfully to find a packing and
then spent a good deal of time trying to prove that it was impossible. Fortunately, I put forth
a little more effort in the positive direction and solved it. This is typical of mathematical
problemsolving. We sometimes spend time working in the positive direction (trying to
show that something is possible) as well as in the negative direction (trying to prove that it
is impossible). We hedge our bets and hope to come to a conclusion one way or the other.
Linear Bumper Cars
Seven particles travel up and down on a straight vertical line bounded by two endpoints.
Initially, they all move upward with the same speed. When a particle strikes another par
ticle, or reaches either endpoint, its direction of motion changes while its speed remains
constant. How many particleparticle collisions occur before the particles again occupy
their original positions and are moving upward?
Solution
A good idea is to start with the simplest situation that shows what's going on in the prob
lem. Suppose that there is only one particle moving up and down on the line segment.
What does its path look like over time?
The "triangular wave function" (a) shows the path of the particle as a function of time.
Superimposing seven such graphs (b), we obtain the paths of all seven particles.
104 2 Intermediate Problems
(a)
time
(b)
time
Strictly speaking, (b) isn't the true picture of our sevenparticle system, because when
two particles collide they don't pass through each other (they strike each other and reverse
direction). However, the graph of two particles striking each other and reversing direction
looks exactly the same as the graph of two particles passing through each other. That is, the
pictures of the paths are the same. The only difference is which particle is on which path.
Since the pictures look the same, we may as well use our picture (b) to solve the problem.
We can see that every particle crosses paths twice with every other particle. Thus, the total
number of crossings (and hence the total number of collisions) is 7 x 6 = 42 (this counts
each collision twice, which is correct).
In our solution, a twodimensional picture is worth a thousand words.
Bonus: linear Elastic Collisions
Suppose that two particles (think of billiard balls) are moving on a straight line. One has
mass mI and velocity VI, the other has mass m2 and velocity V2. Suppose that the particles
collide, undergoing either a headon collision (if they are moving toward each other), or
a bump (if they are moving in the same direction with different speeds). As a result of
the collision, there is a change in the particles' velocities. The new velocities, v ~ and v;,
may be calculated by using the principles of conservation of momentum and energy. (We
2.6 Combinatorics
assume that the collision is elastic, meaning that no energy is lost.) Thus
ml Vl + m2V2 = ml +
2 I 2 I 12 I 12
2ml Vl + 2m2V2 = 2ml Vl + 2 m2V2 •
Combining like terms, we obtain
ml(Vl  =  V2),
ml(Vl  + =  + V2).
Dividing the second equation by the first yields
Vl + = V2 +
or
 = (Vl  V2).
105
Hence, the relative velocities of the two particles stay constant (except for a change in
sign).
Solving the equations
Vl + = V2 +
we arrive at equations for the new velocities:
1 ml m2 2m2
v
l
= Vl + V2,
ml+m2 ml+m2
2ml m2 ml
= Vl + V2.
ml +m2 ml +m2
After the particles collide, they will not collide again. But suppose that they could. What
would the new velocities and be? If we perform the above operations again, with Vl
and V2 replaced by and respectively, then we find that (surprisingly) = Vl and
= V2. That is to say, after two collisions the particles regain their original velocities.
This result is easy to show if we adopt the reference frame in which the origin is the center
of mass; that is,
m n
0== Vl + V2.
m+n m+n
In this case, we obtain the equations m 1 v 1 + m2 V2 = 0, m 1 + m2 = 0, and v 1 + =
V2 + which imply that = Vl and = V2, and hence = Vl and = V2.
The hypothetical situation of two collisions can be realized if we change "linear" to
"circular", so that the particles move around a frictionless circular track (with the '+'
direction counterclockwise and the '' direction clockwise). After two headon collisions
(or bumps, if the particles are moving in the same sense), the particles are back to their
original signed speeds.
106 :2 Intermediate Problems
I Scream Aha!
An icecream parlor has a special where you can order two vanilla icecream sundaes for
the price of one. You may choose up to four toppings (repetitions allowed) for each sundae
from a set of 12 toppings (cherries, nuts, chocolate syrup, etc.). The toppings for the two
sundaes may be the same or different. An example of a valid order is
{cherries, chocolate syrup} and {cherries, cherries, nuts, nuts}.
A sign claims that altogether there are 1,048,576 different orders. You immediately refute
this claim. How do you know?
Solution
Notice that 1,048,576 is a power of 2 (namely, 220). However, we will show that the num
ber of orders cannot be a power of 2.
Suppose that there are x ways to order an individual sundae, according to the conditions
of the special. It follows that the number of orders of two sundaes is (Xii). A quick way to
see this is to think of one more way to order a sundae, called "duplicate." When you order
two sundaes, you choose them from the set of orders of one sundae plus the possibility of
"duplicate."
Now we observe that (Xii) = (x + l)x/2, the product of two consecutive integers
divided by 2. Since one of the two consecutive integers must be odd, the product is not a
power of 2, because a power of 2 has no odd (proper) factors. This contradiction proves
that the claimed number of orders is incorrect.
Bonus: The Correct Number of Orders
We know from the Solution that the number of orders oftwo sundaes is (x + l)x /2, where
x is the number of orders of one sundae. How do we determine x? The number of toppings
can be 0, I, 2, 3, or 4. Let's add an extra topping to the list called "blank." When "blank"
is chosen, nothing is added to the sundae. For example, the toppings selection
{cherries, chocolate syrup, blank, blank}
is the same as the selection
{cherries, chocolate syrup}.
Now we can assume that exactly four toppings are chosen (from the new set of 13 top
pings). So the problem becomes, how many ways may we select four things (allowing
repetitions) from a set of 13 things? This is a basic problem in combinatorics, called a
distribution problem. The number of ways of selecting k things (repetitions allowed) from
a set of n things is given by the formula (k+ZI). Applying the formula to our problem we
obtain x = (4+IJI) = ( ~ 6 ) = 1820. Therefore, the number of orders of two sundaes is
1821 . 1820/2 = 1,657,110.
To explain the formula (HZI) for the number of ways of selecting k things (repetitions
allowed) from a set of n things, think of the things to be selected as represented by k copies
of the symbol 0, arranged in a row. The set of O's is partitioned into n subsets by n  1
vertical lines, I. The subsets represent the selections. Hence, we have k + n  1 items in a
row, and we must choose k of them to be O's (the others being I's). The number of ways
to make these choices is (HZI).
2.6 Combinatorics 107
As an illustration, suppose that we order one sundae with exactly four toppings (repeti
tions allowed) from a set of three toppings (cherries, nuts, chocolate syrup). The formula
says that the number of orders is (4+!I) = (!) = IS, and that each order corresponds to
a placement of four a's and two I's in a row. For example, the pattern of symbols for the
order
{cherries, cherries, nuts, nuts}
IS
001001·
The two a's to the left of the first I signify that two toppings of cherries are chosen; the
two a's between the two I's signify that two toppings of nuts are chosen; and the absence
of a's to the right of the second I signifies that no chocolate syrup topping is chosen. To
test your understanding, list all IS orders and the corresponding patterns of symbols that
represent them.
lines Dividing the Plane
Into how many regions is the plane divided by n lines in general position (no two lines
parallel, no three lines intersecting at a point)? For example, in the picture below, four
lines divide the plane into II regions.
Solution
The book [Ill, by Ross Honsberger, shows solutions to this problem by recurrence rela
tions and by Euler's formula (see Toolkit).
The result can also be seen "directly" using the combinatorial meaning of binomial
coefficients. Add a line below all the line intersection points (the dotted line in the picture
below). Note that none of the lines is horizontal. (If any line is horizontal, just rotate the
picture a little.) Think of the dotted line as "cutting off" the configuration oflines; it doesn't
change the number of regions bounded by solid lines. Now every region has a lowest point
(i.e., a point with a smallest yvalue) except the leftmost region. Moreover, each region's
lowest point is the intersection of either two solid lines or a solid line and the dotted line.
108 :2 Intermediate Problems
Conversely, each such intersection is the lowest point of exactly one region. Hence, the
number of regions is
1+ n + ( ~ ) = I + n + n(n; I) = n
2
+; + 2
Bonus: Partitioning Space
Into how many regions is 3dimensional space divided by n planes in general position (no
two planes parallel, no three planes intersecting in a line)? You can prove that the number
of regions is
By analogy with the planar case, put a new plane below all the intersections of three planes.
Tilt the configuration (if necessary) so that no plane is parallel to the xyplane. Now every
region has a lowest point (i.e., a point with a smallest zvalue) except one. The intersection
of every three planes is the lowest point of exactly one region. This counts all the regions
except the ones "cut off' by the new plane. There are
of these regions. So altogether there are
I + n + (;) + G) regions.
In d dimensional space, the maximum number of regions determined by n hyperplanes,
i.e., (d  I )dimensional planes, is
A Number that Counts
100!. .
Prove that ,so IS an mteger.
50.2
Solution
The integer has 79 digits, so we may not want to compute it by hand. There is an easy way,
however, to see that the number is an integer.
A standard technique for showing that a number is an integer is to show that it counts
something (recall "An Unobvious Integer"). In this case, the expression counts the ways of
pairing 100 people into 50 pairs. The reason is that the numerator, 100!, counts the ways
of permuting 100 people. Suppose that once the people are permuted, we take the first two
people to be the first pair, the second two to be the second pair, etc. We have overcounted
by a factor of 50! (all the ways of rearranging the pairs) and by a factor of 2
50
(all the ways
of switching the two people within a pair). Dividing by these factors results in the correct
count. Therefore, the quantity is an integer.
2.6 Combinatorics
Bonus: Other large Integers
By our counting technique, the expression
(2n)!
n!2n
109
is an integer for all n ::: 1. It is the number of ways of pairing 2n people into n pairs. More
generally, the expression
(mn)!
n!(m!)n'
for m ::: 1 and n ::: 1, counts the ways of grouping mn people into n groups of size m, and
hence is an integer. You can amaze your friends by claiming (and proving) that
5300!
100!(53!)100
is an integer. You certainly wouldn't want to write the number, as it has 10,319 digits.
A Broken Odometer
Alice and Bill are beginning a monthlong bicycle trip when they notice that Alice's trip
odometer is broken. At each mile, Alice's odometer advances the digit in the same place
as the digit that Bill's odometer advances, but the digits to the right of that digit (if any) do
not advance. Thus, the odometer readings for the first 25 miles of their trip are:
Alice's odometer Bill's odometer
001 001
002 002
003 003
004 004
005 005
006 006
007 007
008 008
009 009
019 010
010 011
011 012
012 013
013 014
014 015
015 016
016 017
017 018
018 019
028 020
029 021
020 022
021 023
022 024
023 025
110 2 Intermediate Problems
At the end of their trip, Bill asks Alice if she wants to know the correct mileage. Alice
replies, "I can figure it out myself from my odometer." Alice's odometer reads 347. How
does Alice calculate the correct mileage?
Solution
Alice explains that the rule is to add starting at the left, and take the remainder upon division
by 10, to find each digit in tum. So the hundreds place is 3, the tens place is 3 + 4 = 7,
and the units place is 3 + 4 + 7 = 14 == 4 (mod 10). Hence the correct mileage is 374.
Why does the rule work? Notice that in the normal operation of a counter (e.g., an
odometer), only one digit advances at each step of the count (any digits to the right of the
advancing digit are set to 0). Hence, each step amounts to adding a vector of the form
(0,0, ... , 0, 1, 1, ... , 1) to the count vector and reducing modulo 10. With the broken
odometer, only one digit advances, and the digits to the right of the advancing digit do
not change. This amounts to adding a vector of the form (0,0, ... , 0, 1,0, ... ,0) to the
count vector. Applying Alice's rule to the vector (0,0, ... ,0, 1,0, ... ,0), we obtain the
vector (0,0, ... , 0, 1, 1, ... , 1). Therefore, since the rule is linear, the correspondence is
preserved at each step of the count.
Bonus: Finite Derivative and Integral
The sequence of numbers given by the broken odometer is called a Gray code. 16 The con
nection between the normal count and the Gray code count is an example of a finite deriva
tive (going from normal count to Gray code count) and a finite integral (going from Gray
code count to normal count). The derivative operator takes successive differences of num
bers in the reading, starting at the left. For example, if the correct odometer reading is 457,
then the broken odometer reading would be 412. The derivative operator turns the vec
tor (0,0, ... ,0, 1, 1, ... , 1) into the vector (0,0, ... ,0, 1,0, ... ,0). The integral operator,
which takes successive sums of numbers starting at the left, performs the transformation in
the reverse direction.
How Many Matrices?
The 4 x 4 matrix below has the properties that (1) all entries are nonnegative integers, (2)
there are at most two positive entries per line (row or column), and (3) every line sum is 3.
How many such 4 x 4 matrices are there?
16Gray codes, named after their inventor, physicist Frank Gray, are used in some mechanical coding devices.
2.6 Combinatorics III
Solution
Our solution was found by David Callan. The matrix above can be written as
[
! H ~ ] + [ H H],
000 0 020
i.e., as a permutation matrix plus twice a permutation matrix. (A permutation matrix is a
square matrix with a single 1 in each row and column and the rest of the entries 0.) In
fact, any matrix that has properties (1), (2), and (3) can be written in the form P + 2Q,
where P and Q are order 4 permutation matrices. Simply write each '3' as '1 + 2' and
split the matrix up as an all O's and l's matrix plus an all O's and 2's matrix. Conversely,
every matrix of the form P + 2Q, where P and Q are order 4 permutation matrices, has
properties (1), (2), and (3).
Therefore, since there are 4! permutation matrices of order 4, the number of matrices
satisfying our conditions is 4!2 = 576 (the number of pairs of order 4 permutation matri
ces).
Using the same reasoning, we see that there are n!2 such matrices of order n.
Bonus: Arbitrary line Sums
Surprisingly, if we alter property (3) so that the line sums are all 2, then the problem of
counting the matrices is more difficult. (If, instead, we require all the line sums to be I,
then the matrices are permutation matrices and so there are n! of them.)
Let an be the number of matrices of order n satisfying (I) and (2), and with line sums
all equal to 2. Then the numbers an are given by the sequence
1, 3, 21, 282, 6210, 202410, 9135630, 545007960, 41514583320, ....
It is known that the an satisfy the recurrence relation
2 1 2
an = nanI  2n(n  I) an2, n ~ 3.
However, no simple direct formula for an is known.
Richard Stanley has shown [20, p. 151] that if the line sums are all equal to an arbitrary
positive integer r, then the number of such matrices of order n is n!2 times the coefficient
of xn in the power series expansion of
(I _ x)(1r)/2
e
(3r)x/2.
The r = 3 case is miraculously nice!
lots of Permutations
Prove that given any collection of n
d
 n
d

I
+ 1 distinct d tuples from the set S =
{I, 2, ... , n}, there exist n of the d tuples which, in each coordinate, are a permutation of
S. Show that the result is not true for a collection of d tuples of size n
d
 n
d

1
•
112 2 Intermediate Problems
Solution
Partition the n
d
d tuples into n
d

l
pairwise disjoint subsets of size n each, so that each
of these subsets consists of n points which in each coordinate are a permutation of {I, 2,
3, ... , n}. (A simple way to do it: for each vector v with I in the first coordinate, take all
its cyclic shifts, that is, v, v + (I, I, ... , I), v + (2, 2, ... , 2), etc., where addition is taken
modulo n.) Now, to destroy all these subsets, we have to omit at least one element from
each of them. Hence, we have to omit at least n
d

l
vectors, showing that n
d
_n
d

l
is tight;
it is the largest possible cardinality of a set of vectors with no forbidden configuration.
The collection of d tuples in which the first coordinate is not equal to I does not have
the desired property, and there are n
d
 n
d

l
such dtuples. Hence, the result is not true
for n
d
 n
d

l
d tuples.
Bonus: Integer Averages
P. Erdos, A. Ginzburg, and A. Ziv proved that given 2n  I integers, some n have an integer
average. For example, with n = 5, among the nine integers
7, 8, 3, 4, 7, 0, 10, I, 4
there are five with an integer average, e.g., 3, 4, 0, 10, and 1.
The value 2n  I is bestpossible, as a collection of n  I O's and n  II's (a set of size
2n  2) does not have the desired property.
We will give a proof by contradiction that draws on Fermat's (little) theorem and the
multinomial theorem (see Toolkit). Observe that we only have to prove the result for n
prime. For suppose that we have proved the result for a and b. If n = ab, then given
any 2n  I integers we can successively find subsets of size a with an integer average.
How many such subsets can we find? Upon identifying the first subset of size a, we have
2ab Ia = 2a (b I) 1 integers left. Upon identifying the second such subset, we have
2a (b  I)  1  a = 2a(b  2)  I integers left. Altogether, we can determine 2b  I such
subsets, as 2ab  1 = a(2b  1) + a  I. By hypothesis, some b of the integer averages
have an integer average, and hence the corresponding ab integers have an integer average.
Now, assume that p is prime and the collection Xl, X2, ... , X2p1 of integers has no
subset of size p with an integer average. Form the following sum over of all possible
subsets of size p:
L (Xkl + Xk2 + ... + Xkp)PI .
l:;:kl <k2< ... <kp:;:2p!
By Fermat's (little) theorem, each summand is congruent to I modulo p. Hence
L 1== (2
P
I) (mod p).
l:;:kl <k2< ... <kp:;:2p! p
The binomial coefficient is not a multiple of p (since the numerator contains one factor of
p and so does the denominator). The contradiction will arise from showing that the sum is
a multiple of p.
To see this, note that each monomial contains fewer than p different variables. It follows
that the number of occurrences of a given monomial is (fl, where 0 < i < p. Such a
binomial coefficient is divisible by p since there is a factor of p in the numerator and none
in the denominator.
2.6 Combinatorics 113
Even Steven and Oddball
In the game Even Steven, two players alternately take one or two stones from a pile of
n stones (n an odd number). The object is to take, in total, an even number of stones.
Someone must win, because whenever an odd number is the sum of two numbers, one of
the numbers is even and the other odd. Who should win Even Steven, the first player or the
second player? The game Oddball is identical to Even Steven except that the winner is the
player who takes an odd number of stones. Who wins Oddball?
Solution
The pattern depends on the remainder of n when divided by 4.
n
1 (mod 4)
3 (mod 4)
Even Steven
2nd player wins
1 st player wins
Oddball
1 st player wins
2nd player wins
For n = 1 or n = 3, the values of the table are trivial. If n = 1, then the first player
takes one stone and immediately loses (in Even Steven) or immediately wins (in Oddball).
If n = 3, then the first player wins Even Steven by taking two stones (and the second player
then takes one stone and the game is over). As for Oddball (when n = 3), the second player
has a winning strategy: if the first player takes two stones, then the second player takes one
(and wins); if the first player takes one stone, then the second player takes one stone and
the first player is forced to take another stone (hence the second player wins).
Larger values of n always reduce to the values 1 or 3. Assume that the table is correct
for all odd n < N. Now, if N == 1 (mod 4), then the first player wins Oddball by taking
two stones, for the game is reduced to the game where N  2 == 3 (mod 4), in which
the second player (formerly known as the first player) wins. If N == 3 (mod 4), then the
first player wins Even Steven by taking two stones and reducing the game to the game
where N  2 == 1 (mod 4) with a second player win (that is, the original first player wins).
The other two cases (N == 1 (mod 4) in Even Steven and N == 3 (mod 4) in Oddball)
are dealt with a little differently. Whatever move the first player makes, the second player
mimics, so that after a pair of moves, either four stones have been taken (two by each
player), and the game is represented by exactly the same entry in our table, with the second
player winning, or two stones have been taken (one by each player). If two stones have
been taken, then the column in the table that represents the game is changed (from Even
Steven to Oddball or vice versa) and the row is changed (from 1 mod 4 to 3 mod 4 or vice
versa). In any event, we go from one entry in the table (in which the second player wins)
to the diagonally opposite entry (in which the second player also wins).
The above explanation is a little involved. A simpler explanation comes (as is so often
the case) from expanding on the problem. In fact, the expansion is warranted. For what
would happen in practical play of the games? The players might not make the best possible
moves. For instance, if n = 21, then the first player should win Oddball by taking two
stones as a first move. But suppose that the first player instead takes one stone. This leaves
20 stones in the pile and our table doesn't say what to do. Perhaps the second player has a
chance to win, or perhaps the first player's move doesn't matter and the first player is still
winning. Let's find out what's going on in general by allowing any number of stones (even
114 2 Intermediate Problems
or odd) in the initial pile. If the initial number is even, then both players will end up with
an even number of stones or both an odd number of stones; hence, we need to change the
goal of the game. Let's say that in Even Steven (starting with any number of stones), the
first player wins if he/she takes an even number of stones, and the second player wins if
this does not happen. Similarly, the first player wins Oddball (starting with any number of
stones) if he/she takes an odd number of stones, and the second player wins if this does not
happen.
Now we can quickly generate a table showing who wins both generalized games.
n Even Steven Oddball
I 2nd player wins I st player wins
2 I st player wins I st player wins
3 I st player wins 2nd player wins
41st player wins 2nd player wins
5 2nd player wins I st player wins
6 1 st player wins I st player wins
We've already determined the n = I row. For n = 2, the first player wins Even Steven
by taking two stones, and the first player wins Oddball by taking one stone (and forcing the
second player to take one stone). We can generate the next two rows (n = 3 and n = 4)
from the first two rows. In general, we determine any row from the previous two rows.
Let's do this for n = 3. (We have already determined the n = 3 row, but let's do it again
to see the pattern.) In the game Even Steven, the first player wants to take an even number
of stones and so does the second player. Thus, the first player looks at the previous two
rows (n = 2 and n = I) of the Even Steven column to see if there is a second player
win (because he/she will be in effect the second player after the current move). There is
a second player win in the n = 1 row, so the first player takes two stones. Now the first
player (newly called the second player) wins. A similar situation occurs in Oddball (for
n = 3). Both players want to take an odd number of stones. Thus, the first player looks
at the previous two rows (n = 2 and n = I) of the Oddball column to see if there is
a second player win. There is not a second player win. Hence, whichever move the first
player makes (taking one or two stones), he/she cannot win. Therefore, the second player
wins. The calculation works similarly for any odd row. The first player always looks at the
previous two rows in the same column to see if there is a second player win. If there is,
then he/she moves into that position. If there isn't, then he/she cannot force a win and may
as well move randomly. The procedure for an even row is a little different. Let's illustrate it
for n = 4. In Even Steven, the first player wants to take an even number of stones and the
second player wants to prevent this; hence the second player wants to take an odd number
of stones. Thus, the first player looks at the previous two rows (n = 3 and n = 2) in the
Oddball game to see if there is a second player win (for he/she will shortly be the second
player, trying to prevent the opponent from taking an odd number of stones). There is a
second player win (in the n = 3 row). Hence, the first player moves accordingly (taking
one stone). The case of Oddball is dealt with similarly. The first player wants to take an
odd number of stones, while the second player wants to take an even number of stones.
Thus, the first player looks at the previous two rows (n = 3 and n = 2) in the Even Steven
column to see if there is a second player win. There is not a second player win, so the first
player cannot force a win and just moves randomly.
2.6 Combinatorics 115
Try to use the above procedure to determine row n = 5. Remember that in the case of
an odd value of n, you look at the previous two rows in the same column to see if there is
a second player win. Did you get the same answers as in the table above? Try it for n = 6,
as well. Remember that for even rows, you look at the previous two rows in the opposite
column. Did you get the same values as in the table above?
In our table, we see that rows n = 5 and n = 6 are the same as rows n = I and n = 2,
respectively. Since our procedure is defined at every step only in terms of the previous two
rows, we are guaranteed that the pattern we see in the first four rows is repeated forever.
To play a game, the first player calculates n modulo 4 and decides whether he/she can
force a win by using our procedure. If so, the player plays accordingly. If not, he/she plays
randomly. The second player does the same thing. If either player makes a mistake (has a
win but plays an erroneous move), then the other player determines what he/she needs to
win and plays accordingly.
Where is the aha! solution in this long discussion? I would say that it is found in the
above table. Once we understand how it is generated, we understand everything about the
games.
Bonus: Variations on the Games
It's surprising that in the repeating period of four rows, there is not an even distribution
between first player and second player wins (there are five first player wins and three
second player wins). To gain some perspective about this, we can change the games to
allow the players to remove one, two, or three stones at each turn. You might think that
this would make no difference to the outcomes, as one and three have the same parity, but
this is wrong. The resulting game table is quite different, with a period of eight rows. You
can use a modification of our procedure (looking at the previous three rows at each step) to
generate the table. More generally, consider the modified Even Steven and Oddball games
in which the players may take I through k stones on each turn, where k is a positive integer.
Show that the resulting table has a period of 2k + 2 rows if n = 2k (an even integer) and
4k rows if n = 2k  I (an odd integer).
HigherDimensional TicT acToe
Tictactoe is played on a 3 x 3 board. Two players, Oh and Ex, alternately write naughts 0
and crosses X in unoccupied cells of the board, with each player's objective to make "three
inarow" in his or her symbol. The three cells may be connected horizontally, vertically,
or diagonally. Two versions of the board are shown below.
# ~
It is well known that with bestpossible play by both players, tictactoe is a draw. Nei
ther player can achieve the goal of threeinarow.
116 2 Intermediate Problems
In our problem, we are interested in counting the number of winning lines. It's easy to
do this for the 3 x 3 board. There are three horizontal lines, three vertical lines, and two
diagonal lines; so altogether there are eight winning lines.
If tictactoe is played on a 3 x 3 x 3 cube, so that the goal is to complete three cubes in
a line, how many winning lines are there?
Solution
A very simple solution uses "outside the box" thinking. Put the 3 x 3 x 3 game cube in
the center of a 5 x 5 x 5 cube. Every winning line in the game cube can be extended by
one cube in both directions. The extension cubes lie in the "margin," i.e., the part of the
5 x 5 x 5 cube that is not in the 3 x 3 x 3 game cube. Hence, the number of winning lines
is the number of pairs of cube in the margin, i.e.,
The same technique allows us to count the number of winning lines in n
k
tictactoe, that
is, tictactoe played on a kdimensional board of side length n. The goal is to complete n
cells in a line. Place the n
k
game board in the center of an (n + 2)k board. Extend each
winning line by one cell in both directions. The extension cells are in the margin of size
(n + 2)k  nk. Hence, the number of winning lines is
Bonus: A General Drawing Strategy
Who should win tictactoe on a higherdimensional board? A basic tenet of game theory
is that in a "taking game" (where both players take objects to try to achieve a goal), only
the first player can win given bestpossible play. The reason is that if the second player had
a win, then the first player could copy the winning strategy and "get there first." So the real
question is whether the first player has a forced win or the second player can force a draw.
Paul Erdos and John Selfridge proved a general theorem about when the second player
can draw in a taking game. Suppose that a finite collection {Ai} of nelement subsets of
a finite universe are given. Two players take turns claiming elements of the universe. The
first player to claim all the elements of some Ai is the winner. If neither player achieves
this, then the game is a draw.
THE ERDOSSELFRIDGE THEOREM. If the number of winning sets is less than 2
n

I
,
then the second player has a forced draw. On the other hand, there exist games with 2
n

1
winning sets in which the first player can force a win.
We give a sketch of the proof. Consider the game based on the universe {z, Xl, Yl, X2,
Y2, ... ,Xnl, Ynd, where the winning sets consist of z together with exactly one of Xi,
Yi, for I ::: i ::: n  l. Then the winning sets have n elements each and there are 2
n

1
of
them. The first player can win this game by first choosing z and then choosing Xi if the
second player chooses Yi, or vice versa, for each i. This establishes the second half of the
theorem.
Now we must show that if the number of winning sets is less than 2
n

I
, then the second
player has a drawing strategy. Suppose that there are fewer than 2
n

1
winning sets in the
2.6 Combinatorics 117
game. Remember that these sets have size n. At any point when it is the second player's
tum to play, we define the "danger" of the position to indicate how precarious the posi
tion is for the second player. Sets from which the second player has already selected some
points represent no danger to the second player (since they cannot be completed by the first
player); so we discount such sets. We say that the danger of any other set is 2
m
, where the
first player has chosen m of the elements. The danger of the position is the total danger of
all the sets. If the first player occupied all n elements of the set, then the danger of that set
would be 2n. We will give a strategy by which the second player can prevent this. For each
element in the collection, we define the "score" of that element to be the sum of the danger
of all the sets that contain that element. The second player chooses the element with the
highest score. Now the first player gets a tum. We will argue that the result of the second
player's tum and the first player's tum cannot increase the danger of the position. The sec
ond player's move removes from consideration all sets that contain the chosen element.
The first player's move doubles the score of each element in the collection of sets contain
ing the chosen element. Since the second player chose a point with maximal score, the net
result of these two moves is to decrease the danger (or leave it unchanged). Note that the
danger of the position after the first player's first move is less than 2
n

1
• 21 = 2n. Since
the danger never increases, the first player can never force a position where the danger is
2n. Hence the first player cannot win.
Now we apply the ErdosSelfridge theorem to tictactoe. Consider the game played on
an n
k
board. As long as the number of winning lines is less than 2
n

1
, then Ex can force a
draw. From our formula for the number of winning lines, the criterion is
Numerical investigation shows, for instance, that Ex draws for k = 5 and n = 22, that is,
tictactoe on a 5dimensional board of side length 22.
The Spice of life
A teacher has 25 students. She wishes to make five groups of five students each. The groups
should be changed every day. How does she do this over a severalday period in such a way
that the number of times that two students are in the same group is minimized?
Solution
Any particular student will work with four students each day, so he/she will work with 24
students in six days. If these 24 students are all different, then the student will work with
each classmate exactly once during the six days. So the best possible schedule would be a
sixday schedule in which every student works with every other student exactly once. We
will describe a simple way to produce such a schedule.
Arrange the 25 students in five rows of five students each. Label the rows 0,1,2,3, and
4, and the columns 0, 1, 2, 3, and 4. Also, number the days 0, 1, 2, 3, and 4. On day 0, let
the columns be the groups, so that students in the same column work in the same group.
On day 1, shift every student in row 1 to the right one place (the student at the end of the
118 :2 Intennediate Problems
row gets moved to the beginning of the row); shift every student in row 2 to the right two
places (again, using "wraparound" here and throughout); shift every student in row 3 to
the right three places; and shift every student in row 4 to the right four places; don't change
row O. The columns of this new arrangement constitute day l's groups. Repeat this process
on days 2, 3, and 4. On day 5, let the rows be the groups.
This procedure allows every student to work with every other student. Here is why: If
two students are in the same row, then they work together on day 5. Suppose that two
students are in different rows, with the second student r rows down (r ¥ 0) and c columns
to the right of the first student. In the rightward march, the two students are separated by
c columns, r + c columns, 2r + c columns, 3r + c columns, and 4r + c columns on
days 0, 1,2,3, and 4, respectively (considering "wraparound"). These numbers constitute
a complete residue system modulo 5; that is, the numbers c, r + c, 2r + c, 3r + c, and
4r + c are equal to the numbers 0, I, 2, 3, and 4 (modulo 5), in some order. Since one
of the numbers is 0, the two students are in the same group on some day. To see that we
have a complete residue system, notice that the congruence xr + c == y (mod 5) has the
solution x == r1(y c) (mod 5). We just need to prove that r
1
(mod 5) exists for each
r ¥ O. Well, 2 and 3 are multiplicative inverses modulo 5, and 1 and 4 are multiplicative
selfinverses modulo 5. Hence, there is a solution x to the congruence.
Bonus: A Finite Field Method
Would our method work for a class of 16 students (arranged in four rows of four students
each)? No, it would not. The flaw is that the congruence xr + c == y (mod 4) does not
always have a solution. For example, the congruence 2x + 1 == 0 (mod 4) has no solution,
because an odd number is not a multiple of 4.
However, a schedule based on a finite field works in the case of 16 students. In fact, the
method will work for any number n
2
of students, where n is a prime power, for a field of
order n exists in these cases.
Let F be a field of n elements. Arrange the students in an n x n array, with the rows and
columns indexed by the n field elements:
{(x,y):x,y E F}.
We will construct an (n + I)day schedule in which every student works with every other
student exactly once.
We index the days by the elements of F, together with 00 for the last day. For each
kEF, on day k the groups are the sets of points on the "lines"
y = kx + b, b E F.
On day 00, the groups are the columns of the array, that is,
{(k,y):y E F}, kEF.
With this system, each student works with every other student exactly once, because
there is exactly one intersection of any two lines.
Let's use our method to construct the schedule for a class of 16 students. First, we need a
field of 4 elements. To construct this field, we require an irreducible polynomial of degree
2.6 Combinatorics 119
2 over the field of two elements, 0 and 1. (This means that the polynomial doesn't factor
into linear polynomials whose coefficients are 0 or 1.) The polynomial x
2
+ x + 1 works.
Suppose that () is a root of this polynomial, i.e.,
(}2 + () + 1 = O.
Then, since all coefficients are 0 or I, we have
MUltiplying by (), we obtain
(}3 = (}2 + () = () + 1 + () = 2() + 1 = 1.
Since (}3 = 1, there are only three different powers of (), namely, (}O = 1, (), and (}2 =
() + 1. These three elements are the nonzero elements of our field. When we include 0, we
have our field of four elements. For convenience, let's relabel () as a and (}2 as b. It's easy
to figure out addition and multiplication in the field from the two rules, a + b = 1 and
ab = 1.
Now we can solve the "Spice of Life" problem for a class of 16 students, according to
the recipe given above. For ease in reading, let's indicate an ordered pair of field elements
(x, y) by xy. Here is the fiveday schedule:
Day 0
too, 10, aO, bO}
{OI,II,al,bI}
{Oa, la, aa, ba}
{ ~ b , Ib, ab, bb}
Day 1
too, 11, aa, bb}
{OI,IO,ab,ba}
{Oa, Ib, aO, bI}
{Ob,Ia,aI,bO}
Day a
too, la, ab, bI}
{OJ, Ib, aO, bO}
{Oa, 10, aI, bb}
{Ob,II,aO,ba}
120
Dayb
Day 00
Sperner's Lemma
Prove Spemer's lemma:
{OO,lb,al,ba}
{OI,la,aO,bb}
{Oa , II , ab, bO}
{Ob, la, aa, bl}
{OO, Ol,Oa, Ob}
{to, II, la, Ib}
{20, 21, 2a, 2b}
{30, 31, 3a, 3b}.
2 Intermediate Problems
SPERNER' S LEMMA.I1 Let T be a triangle with vertices are labeled 1,2,3 (a "123 trian
gle"). Some new points are added to the edges and/or the interior of T. Points on edge 12
of T are labeled either I or 2; points on edge 13 are labeled 1 or 3; points on edge 23 are
labeled 2 or 3; and points in the interior of T are labeled 1, 2, or 3. Finally, T is triangulated
into smaller triangles whose vertices are the new points or the vertices of T . Then one of
these smaller triangles is a 123 triangle.
2
~       ~     ~   ~ 3
3 3
17 Spemer's lemma was proved by Emanuel Spemer (19051980). The analysis is used in fair division algorithms.
2.6 Combinatorics 121
Solution
The aha! realization is that a triangle with an odd number of edges labeled 12 must be a
123 triangle. We will show that there must be such a triangle. If there were no triangle with
an odd number of edges labeled 12, then the total number of edges labeled 12, over all
smaller triangles, would be an even number. But we will show that this total, call it s, is in
fact odd. There are two cases of 12 edges to consider: (l) those that are entirely on the 12
edge of the large triangle T, and (2) those that are not. There is an odd contribution to s
from the case (1) edges. For, starting at vertex 1 on T, and moving along the edge toward
vertex 2, we encounter a 12 edge only when we switch from a vertex labeled 1 to a vertex
labeled 2. Since there are an odd number of such switches, there are an odd number of 12
edges. As for case (2), a 12 edge in the interior of T contributes 2 to s, as it is an edge of
two different triangles. Hence, the total contribution to s from the case (2) edges is even.
Therefore, accounting for an odd contribution from case (1) and an even contribution from
case (2), we conclude that s is odd. This finishes the proof.
Bonus: Brouwer's FixedPoint Theorem
Brouwer's fixedpoint theorem (an important theorem of analysis), proved by Luitzen Eg
bertus Jan Brouwer,18 follows easily from Sperner's lemma.
BROUWER'S FIXEDPOINT THEOREM. Suppose that f is a continuous map from the unit
disk D E R2 into itself. Then f has a fixed point, i.e., a point p E D such that f(p) = p.
We demonstrate the result for a triangle (and its interior) rather than for a disk. We can
do this because a disk and a triangle are homeomorphic, and hence the two sets have the
same topological properties. Let the given triangle be T = ABC. We assign barycentric
coordinates to all points in T (and its interior) with respect to the vertices A, B, and C.
We think of A, B, and C as vectors and coordinatize each point x as (Xl, X2, X3), where
X = xlA + X2B + X3C, Xl + X2 + X3 = 1, and Xi ::: 0, for i = 1,2,3. Notice that A,
B, and C have coordinates (1,0,0), (0, 1,0), and (0,0,1), respectively. Now let ABC be
partitioned into many small triangles and let the vertices of these small triangles be labeled
as follows: If f maps vertex X = (XI, X2, X3) to the point x' = ( x ~ , x ~ , x;), then we assign
X the label i if Xi ::: X;, for i = 1, 2, 3. Notice that A is labeled 1, B is labeled 2, and C is
labeled 3, and each vertex must have some label (since the sum of the coordinates of any
point is 1) but can have two or even three labels. Sperner's lemma implies the existence
of a small 123 triangle T'. Repeating this process yields an infinite sequence of arbitrarily
small, nested 123 triangles:
ABC = T ;2 T' ;2 Til ;2 Till ;2 ....
Since triangles (with interiors) are compact sets, there exists a point p contained in all the
triangles of this sequence. We claim that p is a fixed point of f. As P is arbitrarily close
to points labeled 1, points labeled 2, and points labeled 3, it follows that p is labeled 1, 2,
and 3. And any point labeled 1,2, and 3 must be a fixed point, since the relations XI ::: x ~ ,
X2 ::: x ~ , X3 ::: x;, and XI + X2 + X3 = x ~ + x ~ + x; imply that Xl = x ~ , X2 = x ~ , and
X3 = x;.
18Luitzen Egbertus Jan Brouwer (18811966) worked in analysis and topology.
122 :2 Intennediate Problems
An Infinite Series
Determine the sum L ~ l nfn/3
n
, where fn is the nth Fibonacci number. Recall that fo =
0, It = 1, and fn = fnl + fn2, for n ::: 2.
Solution
The aha! realization is that a generating function underlies the sum. (A generating function
is a power series whose coefficients form a sequence of interest.) Define
00
f(x) = L fnxn.
n=l
Then
f(x) = x + x
2
+ 2x
3
+ 3x
4
+ 5x
5
+ 8x
6
+ ... ,
xf(x) = x
2
+ x
3
+ 2X4 + 3x
5
+ 5x
6
+ 8x
7
+ ... ,
x
2
f(x) = x
3
+ x4 + 2x
5
+ 3x
6
+ 5x
7
+ 8x
8
+ ... .
If we subtract the second and third equations from the first equation, almost everything
cancels (because of the recurrence relation). Hence
f(x)(l  x  x
2
) = x,
and so
x
f(x) = =
Ix x
2
·
In order to "manufacture" the n in our sum, we take a derivative. In this way, our sum is
determined to be
(xf'(x»)lx=1/3 = 6/5.
Bonus: Rational Generating Functions
Suppose that a sequence {an} satisfies a recurrence relation
with initial values ao, ai, ... , akl, where the Olj are constants. Then the generating func
tion
is a rational function of the form
p(x)
where p(x) is a polynomial of degree less than k. To obtain p(x), calculate
(ao + alX + ... + ak_lxk1)(1  OlIX  0l2X2  ...  OlkXk)
and discard all terms of degree k or higher.
2.6 Combinatorics 123
As an application, let's find the generating function of the Lucas numbers L
n
, which
satisfy the same recurrence relation as the Fibonacci numbers, i.e., Ln = Ln 1 + Ln2,
for n 2: 2, with the initial values Lo = 2 and Ll = 1. We calculate
and so the generating function is
2x
1 x  x
2
'
Can you find the sum L ~ l nLn/3
n
?
Change for a Dollar
Suppose that we have an unlimited supply of Icent, 3cent, 5cent, and 10cent coins. Are
there more ways to make 100 cents using an even number of these coins or using an odd
number of these coins?
Solution
Rather than try to count all the ways of making 100 cents, let's generate some data for
making the amount n, where n is small.
n # even ways # odd ways n # even ways # odd ways
1 0 1 11 1 8
2 0 12 9
3 0 2 13 2 10
4 2 0 14 11 2
5 0 3 15 3 13
6 4 0 16 14 4
7 0 4 17 4 15
8 5 0 18 17 5
9 0 6 19 6 18
10 7 20 21 7
For example, if n = 10, there are seven even ways (1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1,
1 + 1 + 1 + 1 + 1 + 1 + 1 + 3, 1 + 1 + 1 + 1 + 3 + 3, 1 + 3 + 3 + 3, 1 + 1 + 3 + 5,
1 + 1 + 1 + 1 + 1 + 5, 5 + 5) and one odd way (10).
We conjecture that if n is odd, there are more ways to make n with an odd number of
coins than with an even number, while if n is even, there are more ways to make n with an
even number of coins than with an odd number.
In order to prove our conjecture, we use the method of generating functions. Let
f(x) = ao + alX + a2x
2
+ a3x
3
+ a4x4 + a5
x5
+ ... ,
where an is the number of ways of making the amount n using an even number of coins
minus the number of ways of making n using an odd number of coins. We also define
ao = 1. Thus
f(x) = 1  x + x
2
 2x
3
+ 2X4  3x
5
+ ....
124 2 Intermediate Problems
A little reflection shows that
I
f(x) = (1 + x)(1 + x 3)(1 + x 5 )(1 + x
IO
)'
This may be seen by examining the contribution to the generating function from each term
in the denominator. For example, the term 1/(1 + x
3
) yields
I
___ = I  x
3
+ x
6
_ x
9
+ Xl2 _ X
l5
+ ....
I +x
3
In the product of such terms, one of the monomials above is selected. For instance, if
the _x
9
term is selected, this accounts for three 3cent coins, and a contribution ofI
to the sign of an (which makes sense, since three is odd). The other terms make similar
contributions, so that an is equal to the number of ways to make n using an even number
of coins minus the number of ways to make n using an odd number of coins. Now, we
perform a little algebra on f(x) to obtain
Since
f(x) = (l  x)(1  x
3
)(1  x
5
) •
(1  x
2
)(1  x
6
)(1  x
20
)
I
1
2
= 1+ x
2
+ X4 + x
6
+ x
8
+ x
lO
+ ... ,
x
the contribution to the generating function from 1/( I  x
2
) consists of only even powers
of x with positive coefficients. The same is true for the terms 1/(1  x
6
) and 1/(1  x
20
),
and hence also forthe product 1/((1 x
2
)(1 x
6
)(I x
20
». Therefore, as far as the truth
of our conjecture is concerned, the contribution from this product is "neutral" (it doesn't
change the sign of a coefficient of any power of x). The numerator when expanded is a
polynomial, namely, I  x  x
3
+ X4  x
5
+ x
6
+ x
8
 x
9
, whose coefficients are positive
for even powers and negative for odd powers. Therefore, the coefficients of the generating
function f(x) alternate in sign, with an > 0 if n is even and an < 0 if n is odd.
We have proved our conjecture, and in particular there are more ways to make 100 with
an even number of coins than with an odd number.
Bonus: More Change for a Dollar
The generating function for making change using pennies, nickels, dimes, quarters, fifty
cent pieces, and whole dollars is
I
f(x) = (1  x)(l  x 5 )(l  x10)(1  x
25
)(1  x
50
)(1  X 100)"
Using a computer algebra system, we find that the coefficient of x
lOO
of this generating
function is 293, i.e., there are 293 ways to make change for a dollar.
Rook Paths
A chess Rook can move any number of squares horizontally or vertically on a chess board.
How many different paths can a Rook travel in moving from the lowerleft corner (al) to
the upperrightcorner (hS) on the board? Assume that the Rook moves right or up at every
step. For example, one path is alcldld5f5flg7gShS.
2.6 Combinatorics
8
7
6
5
4
3
2
125
abc d e f g h
Solution: It's often a good idea to generalize a problem. Let's consider Rook paths to any
square on the board (with the Rook starting on al and moving right or up at every step).
We make a table displaying the number of paths. Shifting our orientation, let's say that the
upperleft entry of the table is the number of paths from al to ai, that is, l. We find each
new entry by adding all the entries above or to the left of the given entry. The reason is that
the Rook's last move must come from one of the squares represented by these entries. So,
for example, the entry in the (3,4) position is 4 + 12 + 2 + 5 + 14 = 37. Calculating the
entry corresponding to each square of the chess board, we find that the number of paths
to h8 is 470010. The dots in the table mean that we can further generalize our problem by
considering arbitrarily large chess boards.
I 2 4 8 16 32 64
2 5 12 28 64 144 320
2 5 14 37 94 232 560 1328
4 12 37 106 289 760 1944 4864
8 28 94 289 838 2329 6266 16428
16 64 232 760 2329 6802 19149 52356
32 144 560 1944 6266 19149 56190 159645
64 320 1328 4864 16428 52356 159645 470010
If we are lazy doing our sums, we can feed partial data, say, the diagonal elements, I,
2, 14, 106, into The OnLine Encyclopedia of Integer Sequences (see "What's the Next
Term?"). We find that the sequence (A051708) is
I, 2, 14, 106, 838, 6802, 56190, 470010, ....
The eighth term, 470010, is the number of Rook paths in our problem.
Bonus: A Generating Function for the Diagonal
Let f(x) be the generating function for the diagonal of our table, i.e.,
f(x) = x + 2x2 + 14x
3
+ 106x
4
+ 838x
s
+ 6802x
6
+ 56190x
7
+ 4700lOx
8
+ ....
Then
f(
I ( x (I  x) )
x) =  x + .
2 J(l  x)(l  9x)
Is it obvious? Hardly. Let's prove it.
126 2 Intermediate Problems
Call the elements of the above table a (m. n), and set a (m, n) = 0 if m = 0 or n = O. It's
easy to see that for positive integers m and n, the sequence a(m, n) satisfies a recurrence
relation (with initial conditions):
a(m,n) = 2a(m,n I) + 2a(m 1,n)  3a(m  I,n  I), m::: 3 or n ::: 3;
a(l, I) = I, a(I,2) = 1, a(2, 1) = 1, a(2,2) = 2.
It follows that the generating function for the doublyinfinite sequence is a rational func
tion, namely,
st(1  s  t + st)
I  2s  2t + 3s t
Expanded as a power series, the monomials are of the form a (m, n )sm t
n
, where m and n
are positive integers.
In order to get the generating function for the diagonal sequence
l9
, we make the change
of variables t = xis (so that st = x). Now, to accommodate terms such as s5t 7, we
allow arbitrary integer exponents for s. The exponents of x are positive integers. Thus, we
represent s5t 7 as S2X
7
.
SO we obtain the generating function
_:_:""""7_:'  X + :=:::
x (l  s  xis + x) I ( x (l  x)s )
12s2xls+3x2 2s2+(3x+l)s2x'
We see some of the terms of the claimed generating function. We need only concentrate on
the function
s
_2S2 + (3x + l)s 2x'
which, using the quadratic formula, we write as
s
2(s  a)(s  {3)'
where
a = 3x + I  J(l  x)(1  9x) R. = 3x + I + J(l x)(1 9x).
4 ,fJ 4
The diagonal generating function is the coefficient of so, because no s occurs in it.
We put our function into partial fractions form,
I [a fJ]
2(fJa) sa  sfJ '
or
I [als I]
2(fJa) 1(als)+I(slfJ) .
19 If a twovariable sequence satisfies a linear recurrence relation, then the generating function of its main diagonal
sequence is algebraic. This statement follows from a result in the theory offunctions known as Puiseux's theorem,
after Victor Puiseux (18201883), a mathematician who worked in elliptic functions and astronomy.
2.6 Combinatorics 127
For 1/9 < x < 1/9, we expand the function by a Laurent series
20
in the annulus lal <
lsi < ItJl,inpowersof(a/s)and (s/tJ),obtaining
The coefficient of sO is
2(tJ  a)
J(1  x)(1  9x)
We have found the last piece of our generating function f(x).
For more information on the method we have used, see [20]. Can you find the generating
function for the number of King paths from the lowerleft corner to the upperright corner
of an arbitrarysize chess board? At each step, the King moves one square to the right, one
square up, or both. Such paths are called Delannoy paths, named after Henri Delannoy
(18331915).
Now that we have the generating function for the diagonal sequence, we can use it to
obtain a recurrence relation for the sequence. Rather than work with f (x) itself, it is easier
to work with
x.Jf=X
g(x) = 2f(x) x = 11tC.
",1 9x
Note that f and g represent sequences satisfying the same recurrence relation but with
different initial conditions. The goal is to find an equation satisfied by g and some of its
derivatives, with polynomial coefficients. (We'll see why this is good shortly.) Via loga
rithmic differentiation, we obtain
g'(x) I k ~
=++,
g(x) x I  x I  9x
and hence
g'(x)x(l  x)(l  9x) = g(x)(l  3X)2.
Sequences that satisfy such equations are called Dfinite, meaning that the equations con
tain only a finite number of derivatives.
The corresponding equation for f is
f'(x)x(l  x)(1  9x) = f(x)(l  3X)2  2x
2
,
from which it follows that
[xf'(x)  f(x)] + [lOx
2
f'(x) + 6xf(x)] + [9x
3
f'(x)  9x
2
f(x)] = _2X2.
We can read off the recurrence relation for f by examining the coefficient of xn in the
generating function:
(n  I)a
n
+ (IO(n  I) + 6)a
n
l + (9(n  2)  9)a
n
2 = 0, n::: 3.
20 Laurent series were introduced by Pierre Alphonse Laurent (18131854).
128
Therefore, we can write the recurrence formula for {an} as
(IOn  16)anl  (9n  27)an2
nl
2 Intermediate Problems
n ~ 3.
Surely, this is not obvious. I don't know of a counting proof of this recurrence relation.
Perhaps you can find one.
3
Advanced Problems
An advanced problem may have an aha! solution. This doesn't necessarily mean that the
solution is easy, only that a key step is the product of inspired thinking. You may wish to
tum to the Toolkit for some mathematical terms in the statements of these problems. In
some cases, the solutions require advanced techniques and concepts.
3. I Geometry
SelfIntersecting Polygons
Given any polygon, join the midpoints of the edges (in order) to produce a new polygon.
Notice that the pentagon below yields a "child" (shown with dotted lines) that is nonself
intersecting.
However, the pentagram below yields a child that is selfintersecting.
129
130 3 Advanced Problems
If we repeat this process, then clearly our first example above produces a sequence of
descendant polygons that are all convex and hence all nonselfintersecting, while the
second polygon above produces a sequence of descendants that are all selfintersecting.
Find a polygon that produces a sequence of descendants that are alternately self
intersecting and nonselfintersecting.(
Solution
We saw in "A Quadrilateral from a Quadrilateral" that the child of any quadrilateral is a
parallelogram and hence all its descendants are nonselfintersecting (or the parallelogram
is degenerate and all its descendants are selfintersecting). However, a pentagon exists with
the required property. The aha! idea is to use the golden ratio.
x; X2 X3
We set (X2  xd/ (X3  X2) = <p = (I + .J5)/2 and form a nonselfintersecting pen
tagon as shown above. (The points' vertical coordinates don't matter.) Then the horizontal
coordinates of the child are in the same proportion as those of the original pentagon, for
X3 X2
=
=
2X2  Xl X3
(X2  Xd/(X3  X2)  1
1
<pl
= <p.
It's easy to check that the "grandchild" of our pentagon is nonselfintersecting, so it fol
lows that the descendants of the pentagon are alternately selfintersecting and nonself
intersecting.
Bonus: NonIntersecting Transformations
Let C be a curve in the plane that doesn't intersect itself. For simplicity, suppose that C
is piecewise linear. Under what conditions does there exist a similar copy of C arbitrarily
I This problem was posed and solved by E. R. Berlekamp, E. N. Gilbert, and F. W. Sinden.
3.1 Geometry 131
close to C without intersecting C? Of course, we must define our terms, but the picture
below conveys the meaning.
C
C'
The curve C' is obtained from C by translating downward a small distance. In general,
let's allow any similarity transformation. This includes scaling and rotation, as well as
translation (but let's exclude reflection).
An example of a figure that doesn't work is a "hard S," made of five line segments, as in
the picture below. There is no way to put a copy of the hard S close to the original without
overlapping.
5
hard S
I don't know what properties of C allow for such a transformation, but the resolution of
the problem may depend on "bottlenecks" in the curve. A bottleneck is a local minimum
of the distance between two points on the curve, such as between the two points labeled b
on the curve below.
Regular Simplices
Suppose that VI, ... , Vn are points in Rd such that IVi  Vj I = I for each distinct pair Vi,
V j . Show that n ::: d + I.
Note. A set of d + 1 points in Rd all the same distance apart, and the line segments joining
them, is called a regular simplex. For example, an equilateral triangle is a regular simplex
in R2 and a regular tetrahedron is a regular simplex in R3.
Solution
Let Wi = Vi  V
n
, for i = 1, ... , n  1. We will show that the Wi are linearly independent
and therefore n  1 ::: d. Note that I Wi I = 1, for each i, and hence Wi' Wi = 1. Also, for
i, j < n and i f. j, note that Vi, V j, and Vn are the vertices of an equilateral triangle, and
hence Wi • Wj = 1/2. Suppose that
III WI + ... + IlnI WnI = O.
132 3 Advanced Problems
Taking the dot product of both sides of this equation with W I yields the relation
I I I
al + 2a2 + ... + 2ai + ... + 2an1 = 0,
and, for 2 ::: i ::: n  I, taking the dot product with Wi yields
I I I I I
al + a2 + ... + aiI + ai + ai+1 + ... + anI = 0.
22222
Subtracting these equations implies that tal  tai = 0, i.e., ai = al. Hence, all the ai
are equal and thus all equal to 0. Therefore, the Wi are linearly independent and the result
follows.
A regular simplex exists for each d and is easy to construct. The d points (I, 0, 0, ... , 0),
(0, 1,0, ... ,0), ... , (0,0, ... , 0, I) in Rd are all distance J2 apart. We need only deter
mine a new point that is at distance J2 from all of them. Let the new point be (a, a, ... , a),
with
(a _1)2 + (d  l)a
2
= 2.
Using the quadratic formula, we obtain two solutions: a = (1 ± .Jf+d)/ d. Thus, there
are two choices for the new point, one with positive coordinates and one with negative
coordinates.
Bonus: lattice Point Vertices
We saw in the Solution that the maximum number of points in Rd all the same distance
apart is d + 1. Can we find such a collection of points with integer coordinates? We call a
point with integer coordinates a lattice point.
We see from the Solution that if d + I is a perfect square, then a is a rational number.
Let d + 1 = S2, where s is a positive integer. Then
I ± s 1 I
a =  =  or  .
S2  I s  1 s + I
By scaling, we have two sets of d + I lattice points:
(s  I, 0, ... , 0)
(0, s  1,0, ... , 0)
(O, ... ,O,sI)
(I, ... , 1)
(s + 1,0, ... , 0)
(0, s + I, 0, ... , 0)
(0, ... ,0, s + I)
(1, ... ,1).
For example, in R
3
, we obtain two regular tetrahedra with integer coordinates:
(1,0,0)
(0,1,0)
(0,0, I)
(1,1, I)
(3,0,0)
(0,3,0)
(0,0,3)
(I, 1, 1).
We have shown that a simplex in Rd with lattice point vertices exists if d + I is a perfect
square. Next, we show that if d is even, then such a simplex exists only if d + 1 is a perfect
square.
3.1 Geometry 133
Consider the case d = 2. We will show that there is no equilateral triangle in R2 with
integer coordinates. The method is to calculate the area of the triangle in two different
ways, one yielding a rational number and the other yielding an irrational number. This
contradiction will show that there is no such equilateral triangle. By elementary geometry,
the area of an equilateral triangle with side length s is s2./3/ 4. Suppose that the triangle
has lattice point vertices. Then s2 is an integer, and we conclude that the area is irrational.
However, the area is also given by the determinant formula
I
21 det[VI  V3, V2  v311,
where the rows of the 2 x 2 matrix are the vectors VI  V3 and V2  V3. But this is a rational
number!
For the general case, we need the formula for the volume of a regular simplex in Rd
with edges of length s. The formula is
.Jd+T d
d!2d / 2 S •
For example, the volume of a regular tetrahedron (d = 3) with edge length s = I is
..fi/12, a formula that we found in "Volume of a Tetrahedron."
We will prove the general volume formula by induction, for edges of length ..fi; in this
case, the volume is
.Jd+T
d!
The general formula follows by scaling. The formula is obvious if d = I. Assuming the
formula for d  I, we show that it holds for d. We must multiply the volume formula for
d I by
.Jd+T I
.j(j . d·
What accounts for this factor? Take d vertices to be standard basis vectors in Rd. The
centroid of this collection of points is (l / d, ... , 1/ d). The "height" of the simplex is the
distance from the centroid to the point (a, ... , a), with a = (1 ± ../f+d) / d, that we
found in the Solution. This distance is .Jd+T /.j(j. The other term in the factor, 1/ d ,
is the d dimensional version of the multiplication factor 1/2 used to obtain the area of a
triangle in R2. This completes the induction and the proof of the volume formula.
Now, assuming that d is even, the denominator of the volume formula is an integer. If
the vertices of the regular simplex are lattice points, then sd is also an integer. Hence, the
volume is rational if and only if d + 1 is a perfect square. As in the d = 2 case, the
determinant formula for volume,
1
d! 1 det[vl  Vd, V2  Vd,···, Vdl  vdll,
shows that the volume is a rational number (when d is even). This completes our argument.
A theorem of Isaac Jacob Schoenberg
2
says that there exists a regular simplex with
lattice point vertices in Rd if and only if (I) d + 1 is an odd square, (2) d == 3 (mod 4),
or (3) d == 1 (mod 4) and d + I is the sum of two squares.
2 Isaac Jacob Schoenberg (19031990) is best known for his invention of the spline method of approximation.
134 3 Advanced Problems
n
2
+ 1 Closed Intervals
Given n
2
+ I closed finite intervals on the real line, show that some n + I of them have a
point in common or some n + I of them are pairwise disjoint.
Solution
Let's define an order on the intervals. We say that interval [a, b] is less than interval [c, d]
if and only if b < c. Note that two intervals are comparable if and only if they are disjoint.
The aha! step is to assign to each interval the length of the longest "chain" that begins with
that interval, where a chain is a sequence of intervals each of which lies entirely to the left
of the next. If any of these numbers is n + I or more, then the intervals making up that
chain are pairwise disjoint and we are finished. So let's assume that all the numbers are
at most n. It follows by the pigeonhole principle (see Toolkit) that some number occurs at
least n + I times. But no intervals assigned to the same number can be in a chain together
(an interval to the left would have a greater number than an interval to the right). So every
pair of these n + I intervals intersect. The maximum left endpoint of the intervals (or, just
as well, the minimum right endpoint) is a point common to the n + I intervals.
Bonus: Dilworth's lemma
A generalization of the Problem is worth considering.
DILWORTH'S LEMMA.
3
Let P be a partial order on a set of mn + I elements. Then P
contains a chain of length m + I or an anti chain of size n + I.
A few definitions are needed. A partial order on a set S is a binary relation ~ on S that
satisfies the following conditions:
• (reflexivity) a ~ a, for all a E S;
• (antisymmetry) a ~ b implies that b i a, for all a, b E S and a i= b;
• (transitivity)a ~ b and b ~ c imply that a ~ c, for all a, b, c E S.
In a partially ordered set, two elements a and bare compamble if a ~ b or b ~ a. Oth
erwise, the elements are noncomparable. A chain in a partially ordered set is a collection
of elements in which every pair is comparable. An antichain is a collection of elements no
two of which are comparable.
The proof of Dilworth's Lemma is similar to the proof given in the Solution. The solution
to our problem follows immediately from Dilworth's Lemma, as a chain is a collection of
pairwise disjoint intervals and an antichain is a collection of intervals that share a point.
The fact that the relation in the Solution isn't reflexive is unimportant.
You may wonder whether every partial order on a finite set is equivalent to an order
given by intervals on the real line. This is not the case, and there is a simple counterexam
ple: {(a, a), (b, b), (a, b), (c, c), (d, d), (c, d)}. This partial order, called 2 $ 2, cannot be
represented by intervals on the real line (try it!). However, this is the only type of coun
terexample, as asserted by the following theorem of Peter Fishburn.
3This formula is credited to R. P. Dilworth (19141993), a pioneer in lattice theory.
3.2 Probability 135
THEOREM. A partial order on a finite set is an interval order if and only if it does not
contain a copy of 2 $ 2.
b d
a c
2$2
3.2 Probability
I ,000,000 Coin Flips
Suppose that we flip 1,000,000 fair coins and obtain X heads. Which event is more likely,
(A) X = 500,000 or (B) 0 :::: X :::: 495,000 ?
Solution
The X in our problem is called a binomial random variable. The distribution of a binomial
random variable X is denoted by B(n, p) to indicate that X is the sum of n independent
random variables each equal to 1 with probability p and 0 with probability 1  p. Here
the variables are the coin flips, with n = 1,000,000 and p = 1/2. For 0 :::: k :::: n, the
probability that X = k is given by the formula
For event (A), we have
_ _ (1,000,000) (1) 1,000,000
Pr{X  500,000}  500,000 2
An approximation is afforded by Stirling's approximation (see Toolkit):
It follows that
and hence
 ~ ~ 0.000798. (
1,000,000) (1) 1,000,000 1
500,000 2 Jn500,000
136 3 Advanced Problems
For event (B), we have
495,000 (1 000000) (1) 1,000,000
Pr{O ::: X ::: 495,OOO} = L 'k' 2
k=o
If X '" B(n, p), then X has mean JL = np and standard deviation a = Jnpq. In our
problem, JL = 500,000 and a = 500. The cutoff point for X is 10 standard deviations
from the mean. This implies that the probability of event (B) is extremely small. In order
to estimate the size, we establish a bound on the tail of the binomial distribution. For
0< p < l,define
H (p) =  p log p  q log q,
where q = 1  P and the logarithms are base 2. This is the entropy function of Information
Theory (see Bonus).
CLAIM: If 0 < x < 1/2, then
~ ( ~ ) < 2"H,x) .
Here is a proof. Let y = 1  x. Then
1 = (x + y)n
Therefore,
LnxJ ( )
L ~ < x
nx
yn
y
= 2
nH
(x).
k=O
This concludes the proof.
So, if X", B(n, !), then
Pr{O::: X ::: LnxJ} = Tn I: ( ~ )
k=o
< 2
n
• 2
nH
(x)
= 2n(IH(x»
= 2nC(x) ,
3.2 Probability 137
where C (x) = I  H (x) is called the capacity function. (We will see more about this func
tion in the Bonus for the next Problem.) If x = 0.495, then 2
nC
(x) ~ (0.99995000041665)n.
Therefore
Pr{O:::: X :::: 495,000} < (0.9999500005)1,000,000.
This bound is an extremely small number, approximately 1.92 x 10
22
. Comparing our
calculations for the probabilities of events (A) and (B), we see that the probability of event
(A) is astronomically larger (by a factor of at least 4.14 x 10
18
) than the probability of
event (B).
Bonus: The Entropy Function
Suppose that X is a random variable that takes values XI, ... , Xn with probabilities PI,
... , Pn, respectively, where each Pi :::: 0 and ,£7=1 Pi = I. If we learn that X = Xi, then
we say that we receive log2 Pi bits of information. Suppose that X takes one value after
another (independently), according to its probability distribution. Then the average amount
of information obtained per value of X is
n
H(X) =  L Pi log2 Pi bits.
i=1
We call H (X) the entropy of X. The concept of entropy was introduced by Ludwig Boltz
mann (18441906) in 1896, and Claude Shannon (19142001) was the first to apply it to
information sources (in 1948).
We write log for log2 and set 0 log 0 = lim X log x = O.
x+o+
If X takes two values, XI and X2, occurring with probabilities P and q, respectively, then
H(X) = plogp qlogq.
We also denote this expression by H (p). Below is the graph of this function.
(0.5, I)
H(p)
p
The entropy function H(p).
The importance of the entropy function in Information Theory is due to two theorems
of Shannon, one on coding an information source and the other on coding over a noisy
channel. We discuss Shannon's First Theorem here.
Shannon's First Theorem says that there is an encoding of the values of X, with strings
o and I, no string a prefix of another, so that the average length of the code words is within
138 3 Advanced Problems
I bit of H(X). Furthermore, the average length of the code words is always at least equal
to H(X).
For example, suppose that X is a random variable with the following distribution:
X _ (XI X2 X3 X4
 0.2 0.2 0.1 0.1
Xs
0.1
X6 X7 xs)
0.1 0.1 0.1 .
Then H(X) = 2(0.2 log 0.2) + 6(0.1 logO. I) ~ 2.9. A suitable code as guaranteed by
Shannon's First Theorem is
(
XI X2 X3
0.2 0.2 0.1
100 101 0000
The average length of this code is
Xs
0.1
X6
0.1
X7
0.1
0001 0010 0011 0100
Xs )
0.1 .
0101
0.2(3) + 0.2(3) + 0.1(4) + 0.1(4) + 0.1(4) + 0.1(4) + 0.1(4) + 0.1(4) = 3.6,
which is greater than, but within I bit of, H(X).
Bits of luck
You have the opportunity to playa game in which you can make a fortune. You possess
a biased coin with probability 0.53 of landing heads and probability 0.47 of landing tails.
You start the game with $1, and once a dayevery day for the rest of your lifeyou may
bet any fraction of your current amount on the event that the coin lands heads. If the coin
lands heads, you win an amount equal to the amount bet; if the coin lands tails, you lose the
amount bet. What fraction of your current amount should you bet, on a daytoday basis,
in order to maximize your longterm profit?
Solution
Let's solve the problem in general, where the coin lands heads with probability p and tails
with probability q, with p + q = I and p > q > O.
It's clear that you don't want to bet all of your current amount, because you could lose
and then you wouldn't be able to play anymore. But what fraction should you bet? Think
outside the box. Of course, it doesn't make sense to bet on the coin landing tails (even if
you could) because the coin is biased toward heads. However, let's imagine the possibility
of placing bets on heads and tails.
If you divide your entire fortune on the two types of bets, some of the bets will cancel
out. A hunch is that you should bet p of your current amount on heads and q of your
current amount on tails. In this case, q of the bets will cancel out, leaving a remainder of
p q of your amount bet on heads. Specifically, with p = 0.53, this is equivalent to betting
0.53  0.47 = 0.06 of your current amount on heads.
Let's prove that the hunch is correct. After n days, the expected number of heads is pn
and the expected number of tails is q n. Suppose that you bet A I of your amount on heads
and A2 of your amount on tails, where A I + A2 = I. We wish to show that the best choice
3.2 Probability 139
is A I = P and A2 = q. Each occurrence of heads yields a return of 2A I of your amount,
while each occurrence of tails yields a return of 2A2 of your amount. Hence, after n days,
the expected value of your amount is
(2Ad
np
(2A2)n
Q
•
We can write this as an exponential function of n, with 2 as the base:
2
en
, where c = 1 + plogAI +qlogA2,
and logarithms are base 2.
The hunch is that c, the coefficient of growth, is maximized when A I = P and A2 = q.
We prove this using the convexity of the log function:
c = 1 + plogAI +qlogA2
Al A2
= I + P log p + q log q + P log  + q log 
p q
:::: I + P log P + q log q + log (p; + q ~ 2 )
= 1 + P log P + q logq + 10g(AI + A2)
= 1 + P log p + q log q + log I
= I + P log p + q log q.
Hence, c :::: 1 + P log P + q log q, with equality if and only if A I = P and A2 = q.
With p = 0.53, the coefficient of growth is c ~ 0.00259841. At this growth rate,
it would take about 21 years of steadily playing the game to gain an expected return of
$1,000,000. Of course, you could win this amount in 20 days by betting the maximum
every day, if you were very lucky; the chance is (0.53)20, or about 3 out of 1,000,000.
Bonus: Channel Capacity
The value
c = I + P log p + q log q
in the Solution is significant in Information Theory. It is known as the channel capacity of
a binary symmetric channel. The channel capacity measures the rate at which information
can be reliably sent over a noisy channel.
In the binary symmetric channel (BSC), each binary symbol, 0 and 1, is sent accurately
over the channel with probability p and inaccurately with probability q = 1  p. See the
picture below.
o p 0
?><
p
Binary Symmetric Channel (BSC)
140 3 Advanced Problems
The capacity c (p) of the BSC is defined as
c (p) = 1 + P log p + q log q = 1  H (p).
The graph of the capacity function c(p) is shown below.
(0, 1)
r (1,1)
c(p)
(0.5,0)
p
The capacity function c(p).
Notice that c(O.S) = 0, which makes sense since a completely random channel cannot
convey any information, and c(O) = c(l) = 1, which also makes sense since a channel
that is 100% accurate or 100% inaccurate can convey information perfectly.
Shannon's Second Theorem states that information can be sent (using an errorcorrecting
code) over a BSC with arbitrarily high accuracy at any rate below the channel capacity.
A Game for Noncommunicating Mathematicians
You are at the Joint Mathematics Meetings
4
when you are approached by an organizer who
tells you that you may participate in a team game in which your team has the chance to win
a valuable prize. The game is not a competitive one; your team will work together toward
the goal of winning the prize. However, you may not meet with the other team members to
discuss strategy or communicate with them in any way.
Specifically, you are told that there are ten team members (including yourself). Each
player is given a fair coin. The players are not allowed to communicate with each other
at any time. You will all gather in a room and, at a signal, each of you will open hislher
hand to simultaneously reveal either the coin or nothing. Each player showing a coin will
flip hislher coin. The team wins if at least one coin is flipped and all the flipped coins land
heads. What strategy should each player follow in order to maximize the likelihood of the
team winning? What is the probability of winning?
Solution
Let's solve the problem in general for a team of n players, where n ~ 2. Without the
ban on communication, the team would choose one member to flip the coin and the team
would win half of the time. However, the team cannot communicate, so it would appear
4The Joint Mathematics Meetings is an annual event in which members of several large mathematical organiza
tions meet to give talks, discuss mathematics, and job hunt.
3.2 Probability 141
that there are only two possible strategies for each player: either flip the coin or don't flip
it. But everyone not flipping the coin is bad because the team automatically loses, and
everyone flipping the coin is bad because in that case the team wins with the very low
probability (l /2)n. With n = 2, the probability of winning if both players flip the coin
is 1/4. However, with a superior strategy a twoperson team can do better than 1/4. In
fact, with best play, an nperson team can do better than if they were able to choose two
members to flip their coins!
Each player should show hislher coin with probability p, where the value of p is to be
determined (0 ::: p ::: I). We obtain the probability of the team winning, wn(p), via a
binomial expansion:
Wn (p) = t. ( ~ r (;) pk (l  p )nk
= ( ~ + I  P r (l  p)n
= (1. ~ r (1  p)n.
Using calculus, we find that Wn is maximized at
Pn == P =
and the maximum winning probability is
1 u)l/(nl)
1 ut/(nl)
(I)
(2)
(3)
With two players, P2 = 2/3 and W2(P2) = 1/3. You can use the coin to generate an
event with the required probability: express Pn in base 2 and flip the coin until the number
generated (heads = I, tails = 0) deviates from Pn. The event is that the deviating bit is a
O. (This method was the subject of a 1990 Putnam Competition
5
problem. See [13].) You
can handle the case n = 2 in a particularly simple way: flip the coin twice; if it lands tails
both times, do over; the probability of one heads and one tails is 2/3.
A calculation with I'Hopital's rule (see Toolkit) shows that the winning probability Wn
has the property
. 1
hm wn(Pn) = .
n+oo 4
We can give an aha! explanation of this result. In (I), the second quantity is almost the
square of the first quantity, so we can reason that the limit is of the form x  x
2
, and
anyone who can complete a square knows that the maximum value of x  x
2
is 1/4.
It seems reasonable that the maximum probability of winning in (3) is a decreasing
function of n. Let's define a realvariable version of the function:
f(x) = 2
x
/(xl)  I ,
( )
lX
x> l.
5The William Lowell Putnam Mathematical Competition is an annual mathematics contest open to students in
the U.S.A. and Canada.
142 3 Advanced Problems
It's a tricky calculus problem to prove that f(x) is decreasing. Surprisingly, we can give a
short proof that Wn (Pn) is decreasing via the solution to our original problem:
wn(Pn) :::=: wn(Pn+d = wn+l(Pn+d.
The inequality holds by the definition of Pn. The equality, which you can prove by direct
calculation combining (I) and (2), says that the success probabilities for n and n + I are
equal for the optimum probability Pn+ I. This is tantamount to one team member "dropping
out," but of course no one member can choose to do so.
We see from (2) that the optimum probability Pn decreases to 0 as n tends to infinity.
What can we say about n Pn, the expected number of coins flipped? The limiting value
follows from (2), using l'Hopital's rule:
lim n Pn = In4.
n+oo
Furthermore, the expected number of coins flipped increases with n, that is,
nPn < (n + I)Pn+l, n :::=:2.
This inequality is equivalent to
2n/(nl)  2 2(n+l)/n  2
n· 2n/(nl) _ 1 < (n + 1) . 2(n+l)/n _ 1 '
which, by the formula for the sum of a geometric series, is equivalent to
1 + 2
1
/
n
+ 2
2
/
n
+ ... + 2
n
/
n
n+l
<
1 + 2 1/(nl) + 22/(nl) + ... + 2(nI)/(nl)
n
This last inequality follows from a simple proposition on convex functions applied to the
function cp(x) = 2x.
PROPOSITION. Let cp be a convex function defined on the interval [0, 1]. Then, for n :::=: 2,
1 n ( i ) 1 nI ( i )
"" cp  <  "" cp  .
n+16 n n6 nl
If cp is strictly convex, then this inequality is strict.
This proposition is easy to prove using Jensen's inequality for convex functions (see
p.38).
Bonus: The Hat Problem
In the widely publicized Hat Problem (see, e.g., [3]), each contestant on a team tries to
guess the color (blue or red) of a hat on his/her head while seeing only the hats of the other
contestants. The guesses are made simultaneously and "passing" is an option. The team
wins if at least one person guesses and no one guesses incorrectly. Before the guessing
round, the participants are allowed to discuss strategy. With best play, an nperson team
(where n is one less than a power of 2), can win with the surprisingly high probability
n / (n + 1). The solution is related to the Fano Configuration that we will see in the problem
"168 Elements."
3.3 Algebra 143
3.3 Algebra
An Integer Matrix with Determinant 1
The Catalan numbers
6
C
n
are given by the formula
C
n
= _1_ (2n), n::: o.
n + I n
The Catalan sequence begins
I, I, 2, 5, 14, 42, 132, 429, 1430, 5862, ....
Catalan numbers occur in many combinatorial situations (see, for example, [19]). For in
stance, C
n
is the number of paths in the xy coordinate system that start at (0,0) and stop
at (n, n), moving at each step either one unit right or one unit up and never crossing the
line y = x. The figures below show the five different paths with n = 3. The lowerleft
point is (0,0) and the upperright point is (3,3).
For any n ::: I, form the n x n matrix whose (i, j )th entry is the Catalan number C; + j 2.
For example, with n = 3, we have the matrix
~ ].
14
The determinant of this matrix is 1.
Prove that for every n the determinant of the matrix is 1.
Solution
Our solution combines the fact that the Catalan numbers count upright paths (as above)
with the permutation definition of the determinant. Recall that the determinant of an n x n
matrix A = [a(i, j)j is
n
detA = Lsgn(cr) n a(i,cr(i»,
a ;=1
6The Catalan numbers are named after Eugene Charles Catalan (18141894), who studied them in connection
with the Tower of Hanoi puzzle.
144 3 Advanced Problems
where u ranges over all permutations of the set {I, 2, 3, ... , n} and sgn( u), the sign of u,
is 1 if u is composed of an even number of transpositions and 1 if u is composed of an
odd number of transpositions.
We'll work out the computations for the n = 3 case in detail. The (i, nth entry of our
matrix is the Catalan number Ci+j2, for 1 :::: i, j :::: 3. Thus, it is the number of upright
paths starting at ((i  1),  (i  1», stopping at (j  1, j  1), and not crossing the line
y = x. Hence, a typical summand in the determinant is the number of systems of three
paths from the points ((i  1), (i  1» to the points (u(i)  1, u(i)  1), for I :::: i :::: 3,
multiplied by sgn(u).
The starting and stopping points are labeled in the diagram below.
(I,
(2,2)
(1,1)
(0,0)
I)
I
(2,2)
,
We claim that if any two paths in such a system have a point in common, then that system
can be ignored in the determinant calculation. Suppose that a path starting at point a and
stopping at point a' has a point, c, in common with a path starting at point b and stopping
at point b'. Then switching the parts of the paths after c results in a path from a to b' and
a path from b to a' which also have the point c in common. In the determinant calculation,
the two corresponding summands are opposite in sign, as the transposition interchanging
a' and b' switches the sign of the permutation. Hence, the contribution to the determinant
from these systems of paths is o. Therefore, we need only consider systems of three paths
that have no points in common. This will make calculating the determinant very simple.
The next thing to observe is that only the identity permutation yields a system of three
paths with no points in common. Consider the path that starts at (2, 2). If it stops at
either of the points (0,0) or (1, I), then the path that stops at (2,2) will intersect it. Hence,
we may assume that the path that starts at (2, 2) stops at (2,2). Similarly, we assume
that the path that starts at (1, 1) stops at (1, 1) and the path that starts at (0, 0) stops
at (0,0). This doesn't leave any wiggle room. The only allowable system of paths is the
collection of nested right angles in the following diagram.
(1
(2,2)
(22) ,
(l,1 )
...
(0,0)
I)
, I
Since there is only one allowable system of paths (and it corresponds to the identity
permutation), the determinant is 1. The same argument works for all n (the size of the
matrix).
3.3 Algebra
Bonus: The Catalan Numbers Modulo 2 and 3
If we look at the Catalan numbers modulo 2, a pattern emerges:
n 0
C
n
C
n
mod 2
2 3
2 5
o
4 5
14 42
o 0
6 7 8
132 429 1430
o 0
145
Based on the data, we guess that C
n
is odd if and only if n = 2k  I, for some integer
k. Let's prove this by induction. We will use the fact that the Catalan numbers satisfy the
recurrence relation
nI
Cn = LCiCnIi, n:::: l.
i=O
(This is easy to prove from the definition of Catalan numbers as counting upright paths,
as in the Problem).
The claim is true for n = 0, since Co = I, an odd number, and 0 = 2
0
 I. Assume
that the result holds for all Catalan numbers up to and including C
n
. Now consider C
n
+ I.
If n + I is even, then from the recurrence relation,
(nl)/2
CnH = 2 L CiCni,
i=O
which is even. If n + 1 is odd, then
(n2)/2
Cn+1 = 2 L CCni + C;/2'
i=O
which is odd if and only if C
n
/
2
is odd. Hence, C
nH
is odd if and only if C
n
/
2
is odd.
By the induction hypothesis, this occurs if and only if n/2 = 2k  I, for some k, i.e.,
n + 1 = 2
k
+
1
 l. This completes the induction.
What about C
n
mod 3? We will prove that the remainders modulo 3 of the Catalan se
quence occur in groups of three identical terms:
C3k1 == C3k == C3kH (mod 3), k:::: l.
From the formula C
n
= e:)/(n + 1), we obtain a recurrence relation whereby each
Catalan number can be computed from the next smaller number:
4n 2
Cn = CnI, n:::: l.
n+1
(It's easy to prove this relation by evaluating the quotient C
n
/ CnI in terms of the formula
and canceling lots of terms.) Multiplying by n + 1, we have
(n + I)Cn = (4n  2)C
n
l,
and hence
(n + I)Cn == (n + I)Cn 1 (mod 3).
146 3 Advanced Problems
Letting n = 3k, we have C
3
k == C
3
kl (mod 3). Letting n = 3k + 1, we obtain C
3
k+l ==
C
3
k (mod 3). Therefore
Much more can be discovered about the Catalan sequence modulo 3. Try to find more
patterns yourself and see if you can prove them!
Only 1, 1, 07
The four complex number solutions to the equation
are 1, 1, i, and i. The solution 1 satisfies the equation Z 1 = 1, and the solution 1
satisfies the equation z2 = 1. However, the solutions i and i do not satisfy any equation
zn = 1 with 0 < n < 4. We call i and i primitive 4th roots of unity, and we create the
monic polynomial of minimum degree that has these numbers as roots:
(z  i)(z + i) = z2 + 1.
We call this polynomial, denoted <l>4(Z), the cyclotomic polynomial of order 4.
For n :::: 1, the primitive nth roots of unity are given by ~ k , where ~ = e
2ni
/
n
and
gcd(k, n) = 1. There are cJ>(n) primitive roots of order n (where cJ> is Euler's totient func
tion). The cyclotomic polynomial of order n, denoted <l>n, is the monic polynomial whose
roots are the distinct primitive nth roots of unity:
The degree of <l>n (z) is cJ>(n).
I<k<n
gcd(k.n)=1
Prove that if n has at most two prime divisors, then the cyclotomic polynomial <l>n(z)
has no coefficients other than 1, 1, and O. Find a value of n for which the cyclotomic
polynomial <l>n (z) has a coefficient other than 1, 1, and O.
Solution
The key is a formula for computing cyclotomic polynomials:
znl=n<l>d(Z), n::::1.
din
The formula works because every root of zn  1 is a primitive dth root of unity for some
unique value of d, with din.
We will employ three consequences of this formula:
(1) For p prime, <l>p(z) = Zpl + ... + 1.
(2) Ifn is odd, then <l>2n(Z) = <l>n(z).
3.3 Algebra 147
(3) For n = p ~ 1 ... pZk (canonical factorization), then
Proof of ( 1 ): From the formula, we have
zP 1 = <l>l (z)<I>p (z) = (z I)<I>p(z),
and hence
zP  1
<l>p(z) = = Zpl + ... + 1.
z  1
Proof of (2): If ~ is a primitive nth root of unity, then  ~ is a primitive 2nth root of unity.
Furthermore, the number of primitive 2nth roots of unity is the same as the number of nth
roots of unity, as </J(2n) = </J(2)</J(n) = </J(n). Hence
<l>2n(Z) = n (z + ~ k ) = (_I)t/>(n) n (z  ~ k ) = <l>n(z).
gcd(k,n)=l gcd(k,n)=l
Proof of (3): We can "invert" our formula using Mobius inversion (see [5]) to obtain
<l>n(z) = n(zd _I)J.I.(n/d), n 2: I,
din
where f.L is the Mobius function, defined for nonnegative integers as follows:
if n = 1,
if n is a product of k distinct primes,
otherwise.
If f.L(n/d) f:. 0, then n/d is squarefree, so that p ~ l  l ... pZk
l
I d. Thus we may
restrict the product to divisors of the form d' p ~ l  l ... pZk
l
where d' I Pl . .. Pb and so
n
d'lpl···Pk
We see from (1) and (3) that if n is divisible by only one odd prime, then the coefficients
of <l>n (z) are alII. Now we will show that if n is divisible by only two distinct odd primes,
then <l>n(z) has coefficients only ±I and O. We have
(zpq  I)(z  1)
<I> (z)  
pq  (zP I)(zq 1)'
We know that the rational function above is equal to a polynomial of degree </J(n)
(pI )(qI) with integer coefficients. We will show that the coefficients of this polynomial
are all 1, 1, or O. Our treatment is based on [14].
Since gcd(p, q) = 1, there exist integers rand s such that
(p  I)(q  1) = rp + sq.
148 3 Advanced Problems
Furthermore, rewriting the above relation as
pq + I = (r + l)p + (s + l)q,
we see, since pq + I > pq, that we can take rand s to be nonnegative integers.
Let t be a primitive pqth root of unity. Then
r ql s pl
L(tP)i =  L (tP)i, L(tq)j =  L (tq)j,
i=O i=r+l j=O j=s+!
and hence
Now consider the polynomial
f(z) = (t ziP) (t zjq)  zpq (. I: ziP) (. I: zjq).
1=0 }=O I=r+l }=s+l
Since an arbitrary primitive pqth root of unity, t, is a root of this polynomial, and the
degree of the polynomial is (p  1)(q  1) = </J(pq), it follows that f(z) = cf>pq(z). By
inspection, each coefficient of the polynomial is 1, 1, or O.
It follows from our work above and formulas (1), (2), and (3), that if a cyclotomic poly
nomial has coefficients other than ± 1 and 0, then its order is divisible by three distinct
prime numbers. The smallest number with three distinct odd prime factors is 105, and
indeed the cyclotomic polynomial cf>lOS(Z) has the terms 2z
7
and _2z4!.
Bonus: Flat Cyclotomic Polynomials
The condition that the order n of a cyclotomic polynomial is divisible by three distinct
primes is necessary for the polynomial to have coefficients other than ± 1 and 0, but it is
not a sufficient condition. In fact, in 2006 Gennady Bachman [1] proved the existence of
an infinite family of cyclotomic polynomials of order pqr (where p, q, r are distinct odd
primes) with coefficients only 1,0, and 1. Such polynomials are called "flat polynomials."
The smallest example has order 3 . 7 . 11 = 232.
168 Elements
Let G be the group given by the presentation
Show that G has 168 elements.
Note. The elements of G are all possible finite strings of s's and t's. For example, G
contains the string
ssstttststst.
3.3 Algebra 149
Multiplication occurs by concatenating strings. If x E G, then we denote xx by x
2
, xxx
by x
3
, etc. We denote XO by 1.
Because of the equations t
2
= 1 and (st)3 = I, our example string ssstttststst reduces
to the string
In this problem, we want to show that every string of s's and t's reduces to one of 168
different strings.
Solution
The "aha!" realization consists of two parts. The first is a criterion for reducing strings.
The second is a method of showing that the reduced strings are distinct.
We will show that every element of G is equal to a string of one of the following types:
(A) Strings of the form sa. There are 7 such strings.
(B) Strings of the form sa t sb. There are 7 x 7 = 49 such strings.
(C) Strings of the form sats
2
ts
b
or sats
3
ts
b
. There are 7 x 7 x 2 = 98 such strings.
(D) Strings of the form ts
2
ts
4
ts
b
or ts
4
ts
2
ts
b
. There are 7 x 2 = 14 such strings.
The total number of such strings is 168.
At this point we do not claim that the above strings are all distinct. In fact they are,
but this follows from the existence of a representation of G by the matrix group GL(3, 2),
which has 168 elements.
So our task is to prove that every element of G is equal to one of the above strings. An
element of G may be written as a string in many ways. Let's consider only strings with
a minimum number of occurrences of t. Note that because of the equation t
2
= I, an
element of G consists of alternating powers of s (where the exponents are between 1 and
6) and terms of t.
We can say that certain substrings of an element do not occur. For example, the sub
string ts
6
t does not occur, since the equation (st)3 = 1 implies that ts
6
t = sts, and the
expression on the right has only one t (versus the two t's on the left).
The method of proof is to show that many substrings do not occur, leaving as the only
possibilities for strings those on our list (A)(D).
Let's identify two equations from the presentation, with several variations:
(1) (st)3 = 1
(la) ststst = 1
(1 b) ts
6
t = sts
(1 c) tst = s6ts6
(2) (S4t )4 = 1
(2a) S4t S4t S4t S4t = l.
(2b) ts
4
ts
4
t = s3ts3
(2c) ts
3
ts
3
t = S4ts4
(2d) ts
4
t = s3ts3ts3.
Now we go about describing the strings that do not occur. From (1b), the string ts
6
t
does not occur, and from (1c), the string tst does not occur. We abbreviate this by saying
that 6 and 1 do not occur, where these numbers refer to the exponents of s. To be precise,
when we say that a number or a string of numbers does not occur, we mean that the string
150 3 Advanced Problems
consisting of the corresponding powers of s, separated by t's, and beginning and ending
with at, does not occur. From (2d), we see that we can change a 4 to a 3 (and vice versa).
From (2b), the string 44 does not occur, and from (2c), the string 33 does not occur.
From (Ic), we obtain
(3) ts
2
t = tsttst = s6ts5ts6.
From (3), we can change a 2 to a 5 (and vice versa).
From (Ic), we obtain
(4) ts
2
ts
2
t = s6ts5ts6s2t = s6ts5tst = s6ts5s6ts6 = s6ts4ts6.
Thus, 22 does not occur.
From (I c) and (2d), we obtain
(5) ts
5
t = tstts
4
t = s6ts6s3ts3ts3ts3 = s6ts2ts3ts3
and, alternatively,
(6) ts
5
t = ts
4
ttst = s3ts3ts3s6ts6 = s3ts3ts2ts6.
Now we see from (5) that 23 does not occur, and from (6) that 32 does not occur.
From (2d), we obtain ts
3
ts
4
t = ts3(s3ts3ts3) = ts
6
ts
3
ts
3
, which reduces since the
right side contains a 6. Hence, 34 does not occur.
From (3), we obtain ts
2
(ts
5
t) = ts
3
s
6
(ts
5
t)s6s = ts3(s6ts5ts6)s = ts
3
ts
2
ts, which
reduces since the right side contains a 32. Hence, 25 does not occur.
By symmetry, 43 does not occur. (The symmetry comes from the symmetry in the expo
nents of s in the formulas (3) and (2d).)
From (2d) and (Ic), we obtain ts
4
ts
5
t = s3ts3tst = s3ts3s6ts6. Hence 45 does not
occur.
By symmetry, 52 does not occur.
From (3), we obtain ts
5
ts
5
t = ss6ts5ts6s6t = sts
2
ts
6
t, which reduces since the right
side contains a 6. Hence, 55 does not occur.
To summarize, the strings that we have shown do not occur are I, 6, 22, 23, 25, 32, 33,
34, 43, 44, 45, 52, 54, and 55. The only pairs left are 24, 35, 42, and 53.
From (2d), we obtain
ts
3
ts
5
ts
3
t = s4(s3ts3ts3)s6(s3ts3ts3) = s4(ts
4
t)S6(ts
4
t),
which reduces since it contains a 6.
Hence, 353 does not occur. Similarly, 535 does not occur.
From (3), we obtain
(ts
2
t)S4(ts
2
t) = (s6ts5ts6)S4(S6ts5ts6) = s6ts5ts2ts5ts6,
which reduces since it contains a 25.
Hence, 242 does not occur. Similarly, 424 does not occur.
We have established that the number of words is finite, since no word with four t's can
occur (we have excluded all triples of exponents of s). Thus, the nonexcluded words have
zero, one, two, or three t's. The cases of zero and one t are, respectively, (A) and (B). The
case oftwo t's looks like satscts
b
, where c = 2,3,4, or 5. However, 2 can become 5 (by
(3» and 3 can become 4 (by (2d», so in fact we have c = 2, 3. These strings comprise
(C). The case of three t's looks like sats
2
ts
4
ts
b
or sats
4
ts
2
ts
b
(the only pairs are 24
3.3 Algebra 151
and 42, as 35 can become 42 and 53 can become 24). In fact, we can take a = D via the
transformation
followed by changing 53 to 24 (by (2c)):
Performing this transformation a times results in a string with a = D. The case 42 is dealt
with similarly. These cases are thus covered by (D).
Now we know that G consists of at most 168 elements, as evidenced by our set of
reduced strings. We now need to show that these strings are distinct. This we do by fur
nishing a representation of G with 168 elements. The group is G L (3, 2), the group of 3 x 3
invertible matrices over the field {D, I}.
The general linear group GL(n, q) is the multiplicative group of invertible n xn matrices
with coefficients in the field of order q = pk, where p is a prime. Let's determine the order
of GL(n, q). There are qn  1 choices for the first row of an invertible n x n matrix (the all D
row is excluded). Given the first row, the second row can be any of the qn possible n tuples
except the q scalar multiples of the first row. Hence, there are qn  q choices for the second
row. Similarly, the third row can be any of the qn ntuples except linear combinations of
the first two rows. There are qn  q2 choices. Continuing in this manner, we find that the
number of invertible matrices is
In particular
IGL(3, 2)1 = (2
3
 1)(2
3
 2)(2
3
 22)
= 7·6·4
= 168.
For example, GL(2, 2) has six elements and is in fact isomorphic to S3. The group
Aut FC (to be defined) is isomorphic to GL(3, 2).
The Fano Configuration is named after the geometer Gino Fano (18711952).1 The Fano
Configuration is the prototypical example of many types of combinatorial structures, such
as projective planes, block designs, and difference sets. Let's look at the configuration and
observe some of its properties.
The Fano Configuration (FC) is shown below.
7In Fano's geometry, what we call the Fano Configuration was specifically excluded. This situation reminds me
of that of chess master Pedro Damiano (14801544), who analyzed a particular chess opening, found it wanting,
and recommended against playing it, only to have it named after him (Damiano's Defense). Such are the vagaries
of naming conventions.
152
2 ~     ~ ~ ~ ~     ~ 4
6
3 Advanced Problems
The points of FC are labeled I, 2, 3, 4, 5, 6, and 7. The lines are just unordered triples
of points (e.g., {I, 2, 3}); they have no Euclidean meaning.
We observe that FC has the following properties:
I. There are seven points.
2. There are seven lines.
3. Every line contains three points.
4. Every point lies on three lines.
5. Every two points lie on exactly one line.
6. Every two lines intersect in exactly one point.
The above properties occur in pairs called duals. If the words 'point' and 'line' are
interchanged, each property is transformed into its dual property.
We next determine the automorphism group ofFC, denoted Aut FC. This automorphism
group is the group of permutations of the vertices of FC which preserve collinearity. For
example, if we rotate FC clockwise by onethird of a circle, collinearity is preserved. This
particular permutation is written in cycle notation as (142)(356)(7).
We begin by calculating the order of Aut FC. It is evident from the picture of FC that all
seven vertices are equivalent in terms of collinearity. Therefore, vertex 1 may be mapped
by an automorphism to any of the seven vertices. Suppose that I is mapped to I'. Vertex
2 may be mapped to any of the remaining six vertices. Suppose that 2 is mapped to 2'.
In order to preserve collinearity, vertex 3 must be mapped to the unique point collinear
with I' and 2'. Call this point 3'. Vertex 4 is not on line 123, so its image 4' can be any of
the remaining four vertices. Finally, the images of the other points are all determined by
collinearity: 5 is collinear with I and 4; 6 is collinear with 2 and 4; and 7 is collinear with
3 and 4. Hence, there are 7 . 6 . 4 = 168 automorphisms.
Now we know that Aut FC is a group of order 168. In fact, Aut FC is isomorphic to a
group of matrices over a finite field.
Let F be the field of two elements {O, I}, and let F
n
be the vector space of ntuples
of elements of F. A vector v E F
n
is represented by a string of length n over F, e.g.,
v = 010101 E F6. The cardinality of Fn is 2n.
We will now show that Aut FC is isomorphic to GL(3, 2). We label the vertices of FC
with the seven nonzero vectors in F
3
, as shown below. This labeling is derived from the
labeling in the previous picture by assigning to each vertex i the vector which represents
the number i in binary. The vectors have been chosen so that VI, V2, V3 are collinear if
3.3 Algebra 153
and only if VI + V2 + V3 = 0 (in F
3
). The matrix group GL(3, 2) acts on the vectors
of Fe by the rule: V 1+ vM. It is easy to check that this action preserves collinearity:
VI + V2 + V3 = 0 {:} (VI + V2 + v3)M = O· M {:} vIM + V2M + V3M = O. Therefore,
Aut Fe is isomorphic to the group of 3 x 3 invertible matrices over F.
001
010
1I0
100
The special linear group SL(n, q) is the normal subgroup of GL(n, q) consisting of
n x n invertible matrices with entries from the field of q elements and determinant I. The
quotient group is given by
GL(n,q)/SL(n,q):::::: F \ {O},
where F is the field of q elements, and hence
For all n 2: I, we have GL(n, 2) :::::: SL(n, 2).
In fact (see [18]), SL(n, 2) is a simple group (a group with no nontrivial normal sub
groups), for all n 2: 2. The simple groups are crucial to the study of algebra. Fe is a
geometric model of SL(3, 2) (:::::: GL(3, 2)).
Let's investigate possible generators for Aut Fe. By direct calculation we see that the
rows of M are the images of the binary representations of I, 2, and 4. Let
We observe that T yields a flip of Fe around the 374 axis while S yields the 7cycle
(l 5 6 7 2 4 6). We will show that all 168 matrices in the automorphism group of Fe are
generated by combinations of S and T.
The "visible automorphisms" of Fe are the symmetries of the equilateral triangular
given by the elements of the symmetric group S3. These symmetries are combinations
of S and T, for T is a reflection of the triangle (i.e., a transposition of two of its vertices)
and the element (S2 T S2)2 T is a rotation of the triangle by onethird of a circle; all symme
tries of the triangle (permutation matrices) are combinations of a reflection and a rotation.
Furthermore, the element STS
2
T is a transvection (the identity matrix with an extra I
in an offdiagonal position). From the transvection, we can produce all transvections via
154 3 Advanced Problems
conjugation by permutations. Using elementary row operations, all invertible matrices can
be formed from permutation matrices and transvections. Therefore, all invertible matrices
are combinations of S and T .
Bonus: A Tiling of the Hyperbolic Plane
The element ST has order 3 (but isn't a rotation). Letting u = (St)I, we can say that
the group of order 168 is a homomorphic image of the "triangle group" generated by s, t,
and u:
(s,t,u:s
7
= t
2
= u
3
= stu = I).
This is the group of symmetries of a tiling of the hyperbolic plane with triangles with
angles Jr /2, Jr /3 and Jr /7. This tiling is shown below.
3.4 Number Theory
Odd Binomial Coefficients
Let k and m be integers such that 0 ~ k ~ 2
m
 I. Prove that the binomial coefficient
emk
I
) is odd.
Solution
A much more general result is true! We will prove that the binomial coefficient (Z) is odd
if and only if the binary representation of n contains a 1 in every position where the binary
representation of k contains a I. The result called for follows instantly.
3.4 Number Theory
Suppose that the base2 representation of n is
I
n = Ln;i.
;=0
By de Polignac's formula (see Bonus) the exact power of 2 that divides n! is
I I I I
Ln;i
1
+ Ln;i
2
+ ... + Ln;i
1
= Lni (i
I
+ i
2
+ ... + 1)
;=1 ;=2 ;=1 ;=1
I
= Ln;(i 1)
;=0
= Ln;i  Ln;
;=0 ;=0
where d
2
(n) is the number of 1 's in the binary representation of n.
155
Next, we will show that the exact power of 2 that divides the binomial coefficient ( ~ ) is
equal to the number of 'carries' when k and n  k are added in binary.8 By the preceding
observation, this power is
n  d(n)  (k  d(k) + n  k  d(n  k» = d(k) + d(n  k)  d(n).
Denote the ith bit of a binary number x by x;. Let e(i) = 1 ifthere is a carry in the ith bit
when k and n  k are added (in binary), and e (i) = 0 if there is no carry, for 0 ::: i ::: I.
Also, define e(I) = O. We see that n; = k; + (n  k); + e(i  1)  2e(i). Hence, the
power to which 2 divides ( ~ ) is
I I I
L[k; + (n  k);  nil = L(2e(i)  e(i  1» = Le(i).
;=0 ;=0 ;=0
Thus, we conclude that ( ~ ) is odd if and only if there are no carries when k and n  k
are added in binary. This is the case precisely when the binary representation of n contains
a 1 in every position where the binary representation of k contains a 1.
Bonus: De Polignac's Formula.
9
Let p be a prime. Then the exact power of p that divides n! is
f l njJ.
j=1 p
This is known as de Polignac's formula.
8This result was discovered by Ernst Eduard Kummer (18101893), who made contributions to algebraic ge
ometry and number theory.
9The formula is credited to Alphonse de Polignac (18171890), who is best known for making the Twin Prime
Conjecture: There are infinitely pairs of primes whose difference is 2, e.g., 17 and 19. This conjecture is un
proved.
156 3 Advanced Problems
Note. The sum is actually finite, since pj > n for j sufficiently large.
For example, the exact power of 3 that divides 100! is
l
100j l100j l100j l100j
3" + 9 + 27 + 81 = 33 + 11 + 3 + 1 = 48.
Thus, 100! is divisible by 3
48
but not by 3
49
.
To prove the formula, we observe that there are exactly L n J p J multiples of p less than or
equal to n, exactly LnJ p2 J multiples of p2 less than or equal to n, and in general, exactly
LnJ pj J multiples of pj less than or equal to n. The formula follows immediately.
Fibonacci Factors
Show that no Fibonacci number In with n odd has a prime factor of the form 4k + 3.
Solution
We check the claim by finding the prime factorizations of the first ten Fibonacci numbers
with odd subscripts:
h
2
2
15
5
5
h
13
13
h
34
2·17
III
89
89
113
233
233
/Is
610
2·5·61
By inspection, no prime factor above is of the form 4k + 3.
117
1597
1597
/I9
4181
37· 113.
So we have data to support the claim, but how do we prove the claim? A solution ties
together some tenuous clues. What distinguishing features of primes ofthe form 4k + 3 do
you know? One such feature is that for no prime p of the form 4k + 3 is the congruence
x
2
== 1 (mod p)
solvable for an integer x. On the other hand, the same congruence is always solvable for
primes ofthe form 4k + 1. For instance, 4
2
== 1 (mod 17).10
So now we see that the proof of the claim may have something to do with squares modulo
p. Can we think of a formula involving squares of Fibonacci numbers?
An identity comes to the rescue! Just the right sort of formula is supplied by Cassini's
identity: II
I
n
2
ln+llnl = (_l)n+l, n::: 1.
It is easy to prove Cassini's formula by induction, but we give an aha! proof using deter
minants. The Fibonacci numbers are conveniently generated by the matrix equation
[
In+l
In
In
Inl
] = [ ~ ~ r
n:::l.
IOThe reason that the existence of a solution to this congruence depends on the mod 4 status of p has to do with
the fact that the p  1 nonzero residue classes modulo p form a cyclic group.
II This identity was discovered by the astronomer Giovanni Domenico Cassini (16251712).
3.4 Number Theory 157
(This is easily proved by induction.) Take the determinant of both sides, using the rule that
the determinant of a product is the product of the determinants:
fn+1 fnI  fn
2
= I fnj,+l
n
fn I 11 0 In = (_I)n.
fnl  1
This yields Cassini's identity!
Armed with Cassini's identity, we can easily prove the claim. If p I fnl and n is even,
then
fn
2
== 1 (mod p).
But this is impossible if p = 4k + 3, as we have stated.
By the way, Wayne McDaniel has shown that all but eleven Fibonacci numbers have a
prime factor of the form 4k + 1.
Bonus: Repeated Numbers in Pascal's Triangle
We use Cassini's identity to prove a gem concerning Pascal's triangle.
The number 2 occurs in the second row of Pascal's triangle. It is evident that 2 will not
occur elsewhere, for the smallest number in row n (barring the 1 's at the ends) is n. How
often does, say, the number 10 appear? The fifth row of Pascal's triangle contains two lO's
and the tenth row contains two lO's. A search of the first ten rows shows that 10 occurs
exactly four times. Similarly, any number (greater than 3) that appears twice as the two
middle terms in a row appears at least four times altogether. However, it is difficult to find
numbers that appear more than four times. Would you be amazed to learn that there are
infinitely many numbers that occur at least six times in Pascal's triangle?
Consider solutions to
t
_ (m
n
_l) _ (nm 1),
3 ==:: m < (n  1)/2.
When there exists such a solution, the number t appears at least six times in Pascal's
triangle: twice in row t, twice in row n (in columns m  1 and n  m + 1), and twice
in row n  1 (in columns m and n  1  m).
Solutions are given by
We prove this by checking that the following equations are equivalent:
n! (n  I)!
= 
(m  1)!(n  m + I)! m!(n  m  I)!'
158 3 Advanced Problems
mn = (n m + 1)(n m).
hkd2khkhk+l = (f2khkH  hkd2k + 1)(f2khk+l  hkd2k)
= (f2k(f2k+l  hkl) + 1)(f2k(f2k+l  12kd)
= (f21 + 1)1
2
1.
hklhkH = 121 + 1.
The last relation is Cassini's identity (with n replaced by 2k). For k = 2. we obtain the
value t = 3003. Hence. 3003 appears at least six times in Pascal's triangle.
In fact. 3003 appears eight times in Pascal's triangle. in the following representations:
No other numbers are known to appear as many as eight times in Pascal's triangle. and the
maximum number of appearances of a number in Pascal's triangle is also unknown.
Exact Covering Systems
A covering system is a collection of congruences of the form x == ai (mod mi). for 1 ::::
i :::: k. where the mi are integers greater than 1. such that every integer x satisfies at least
one of the congruences. For example. the congruences x == 0 (mod 2). x == 0 (mod 3).
x == 1 (mod 4), x == 1 (mod 6), and x == 11 (mod 12) constitute a covering system. It's
easy to verify this. Just write the integers 0 through 11 and cross out those covered by each
congruence. All the numbers will be crossed out.
A covering system in which each integer x satisfies exactly one of the congruences is
called an exact covering system. The congruences x == 0 (mod 2) and x == 1 (mod 2) are
an exact covering system (but a boring one).
Prove that there does not exist an exact covering system with distinct moduli.
Solution
Here is a beautiful and surprising proof using generating functions. Let ml, m2 • ...• mk
be the distinct moduli of the congruences in an exact covering system. For I :::: i :::: k,
the positive integers that satisfy the congruence x == ai (mod mi) are represented by the
generating function
Therefore.
since 1/ (1  x) is the generating function for the set of all positive integers.
Now, the right side is a rational function with only one discontinuity (called a pole),
at x = 1. Let m be the maximum of the mi (which are distinct). On the left side, the
3.4 Number Theory 159
term xQm /(1  xm) has a discontinuity at x = e
2lfi
/
m
, and no other discontinuity cancels
this out. This is a contradiction. Therefore, there is no exact covering system with distinct
moduli.
Bonus: Never a Prime
Is it true that given any odd integer k, there exists an integer n such that k + 2
n
is a prime
number? For k = 5 we may take n = I, since 5 + 21 = 7, a prime. For k = 7 we may
take n = 2, since 7 + 22 = II, a prime. Does this always work? We will follow a method
of Paul Erdos, using a covering system of congruences, to find an odd integer k such that
k + 2
n
is prime for no n.
To get a feeling for what is going on, take k = 83. Now, 83 + 21 = 85, which is
divisible by 5. Hence, 83 + 2
n
is divisible by 5 if 2
n
== 2 (mod 5). The powers of 2
modulo 5 form the cycle {2, 4, 3, I}. It follows that 83 + 2
n
is composite (divisible by 5)
for n == I (mod 4). Also, 83 + 22 = 87, which is divisible by 3. Hence, 83 + 2
n
is divisible
by 3 if 2
n
== I (mod 3). The powers of 2 modulo 3 form the cycle {2, I}. It follows that
k + 2
n
is composite (divisible by 3) for n == 0 (mod 2). We have so far ruled out two
infinite arithmetic progressions as choices for k, namely, all solutions to n == 1 (mod 4)
and n == 0 (mod 2). The smallest positive integer not ruled out is 7, and 83 + 27 = 211,
a prime.
The idea of Erdos' method is to choose sufficiently many primes to rule out enough
arithmetic progressions to eliminate all possible values of n. We see from the example
k = 83 that we should study cycles of powers of 2 modulo various primes. This is easy
to do by hand or on a computer, but we probably want to use a computer to complete our
study since one of the key primes is 241, yielding a cycle of 24 powers of 2. The following
table shows our selection of primes and the number of powers of 2 modulo these primes.
prime length of cycle of powers of 2
3 2
5 4
7 3
13 12
17 8
241 24
We make a covering system with the lengths as moduli, as follows:
x==1
(mod 2)
x==O
(mod 4)
x==O
(mod 3)
x==2
(mod 12)
x==2
(mod 8)
x == 22
(mod 24).
160 3 Advanced Problems
To find an odd integer k such that k + 2
n
is never prime, we look for a solution to the
system of congruences
k == I (mod 2)
k == _21 (mod 3)
k == _2° (mod 5)
k == _2° (mod 7)
k == _22 (mod 13)
k == _22 (mod 17)
k == _222 (mod 241).
(The purpose of the first congruence is to ensure that k is odd.) This will furnish an arith
metic progression of integers k that satisfy the condition. For suppose, say, that n == 0
(mod 4). Then 2
n
== 1 (mod 5) and since k == 1 (mod 5), it follows that k + 2
n
is
divisible by 5 (and hence composite).
We find a simultaneous solution to the above congruences using the Chinese remainder
theorem. Let m = 2·3·5·7· 13 . 17·241 = 11184810. Next we solve the following
congruences:
(m/2)k1 == 1
(mod 2)
(m/3)k
2
== _21 (mod 3)
(m/5)k3 == _2° (mod 5)
(m/7)k
4
== _2° (mod 7)
(m/13)k
s
== _22 (mod 13)
(m/17)k6 == _22 (mod 17)
(m/241)k7 == _222 (mod 241).
We find the solutions k1 = 1, k2 = 2, k3 = 2, k4 = 2, ks = 12, k6 = 1, and k7 = 210.
Therefore, the solution, modulo m, is
k == (;) 1 + ( ~ ) 2+ ( ~ ) 2+ ( ~ ) 2+ ( ~ ) 12+ ( ~ ) 1 + (2:1) 210 = 41446999.
Let's take k to be the smallest positive integer in this congruence class, i.e.,
k = 41446999  3·11184810 = 7892569.
So 7892569 + 2
n
is prime for no n. Can you find a smaller value of k?
A Fibonacci Number Producing Polynomial
In 1975 James P. Jones wrote an article titled "Diophantine representation of the Fibonacci
numbers" for the The Fibonacci Quarterly [12]. Paul Hartung, in his review ofthat article,
said "The author throws a real bombshell here." The bombshell was the following: The set
3.4 Number Theory 161
of positive values of the polynomial
2y  x4y _ 2x
3
y2 + x
2
y
3 + 2xy4 _ y5,
where x and y are positive integers, is precisely the set of (positive) Fibonacci numbers.
Furthermore, the polynomial represents each Fibonacci number exactly once. Can you
explain why this is true?
Solution
We begin by writing the polynomial in the useful form
Now it's easy to see that the polynomial can have a positive value if and only if y2  xy 
x
2
= 0 or ± l. But the first case is impossible, since y2  x Y  x
2
= 0 implies that
4y2  4xy  4x
2
= 0, and hence (2y  x)2 = 5x
2
, but 5 is not the square of an integer.
Therefore, we must have
y2 xy _x
2
= ±1.
Does this equation remind you of a famous identity?
Cassini's identity (recall the solution to "Fibonacci Factors") is
2 { I n odd,
In  Inlln+l = I n even.
Let's rewrite the relation as
y2 x(y + x) = ±1.
Now we see the resemblance to Cassini's identity.
By Cassini's identity, the ordered pairs (x,y) = Unl, In), for n :::: I, satisfy the
equation. In fact, these are the only solutions.
The main idea is that if (x, y) satisfies the equation, then (y  x, x) satisfies the same
equation, since
x
2
 (y  x)x  (y  X)2 = x
2
 (y  x)y = x
2
+ xy  y2 = =F 1.
Continuing the descent, we end up with (x, y) = (1,2). Ascending from this pair, the
transformation (x,y) ~ (y,x + y) yields the sequence {Unl, In)}, with n even if the
+ I occurs and n odd if the 1 occurs.
Bonus: Hilbert's Tenth Problem
Consider the equation
2x + 3y = 100.
We can see that the equation has integer solutions, e.g., (x, y) = (35,10). By contrast, the
equation
x
2
+ y2 = 103
has no integer solutions, as we can see by checking all values of x, Y such that 0 ::: x, y :::
10. Another way to see that this equation has no solutions is to recognize that squares
162 3 Advanced Problems
always are always congruence to 0 or 1 modulo 4. Since the left side is the sum of two
squares, it is congruent to 0, 1, or 2 modulo 4, while the right side is congruent to 3 modulo
4.
In 1900 David Hilbert (18621943), in a lecture to the International Congress of Math
ematicians in Paris, discussed 23 important unsolved problems in mathematics. The tenth
problem on his list asks whether there exists a decision procedure for Diophantine equa
tions. Hilbert phrased the problem, which he called "Entscheidung der LOsbarkeit einer
diophantischen Gleichung" ("Determination of the Solvability of a Diophantine Equa
tion"), as follows:
Given a Diophantine equation with any number of unknown quantities and with
rational integral numerical coefficients: To devise a process according to which it can
be determined by a finite number of operations whether the equation is solvable in
rational integers.
In this context, a Diophantine equation has integer coefficients and its solutions (if any)
are integers. Hilbert's Tenth Problem calls for a universal procedure which, given any Dio
phantine equation, will determine whether it is solvable or unsolvable. For example, the
procedure should be able to decide whether an equation such as
has a solution in integers x and y.
In 1973 Yuri Matiyasevich demonstrated that there is no such procedure: Hilbert's Tenth
Problem is unsolvable. Matiyasevich's proof uses a Diophantine representation of the "Fi
bonacci function" n = 1m, that is, a polynomial whose integer solutions are the ordered
pairs (m, n) for which n = 1m. In our Problem, we discussed a representation of the set of
Fibonacci numbers but not ofthe Fibonacci function. Finding a Diophantine representation
of the Fibonacci function is difficult and is the crux of Matiyasevich's proof. See [16] for
a comprehensive treatment.
Perrin's Sequence
Perrin's sequence I
2
{an} is defined by the following recurrence formula: ao = 3, al = 0,
a2 = 2, and an = an3 + an2, for n :::: 3. So Perrin's sequence is
3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, 39, 51, 68, 90, 119, 158, 209,
Find a composite number n that divides an. Also, prove that if p is a prime number, then
p divides a
p
.
Note. If it were true that n divides an if and only if n is prime, then we would have a
polynomialtime test for primality, as we can compute the nth term of any linear recurrence
modulo k in n log n time.
I2The sequence is named after R. Perrin, who studied it in 1899, but the sequence was investigated in 1878 by
Edouard Lucas (18421891).
3.4 Number Theory 163
Solution
To find a composite number n that divides an, we will need to compute an mod n, as in
the following algorithm.
Choose n.
{x, y, z} + {3, 0, 2}.
Do n2 times:
Computing an mod n
{x,y,z} + {y,z, mod (x + y,n)}.
Output z.
Which n should we try? According to the statement of the problem, it doesn't make sense
to take n to be a prime. A reasonable guess is to take n to be the square of a prime, n = p2.
Finding n (a prime squared) such that n I an
For m = I to 100 do:
n + P;" (Pm is the mth prime);
{x, y, z} + {3, 0, 2};
Do n2 times:
{x,y,z} + {y,z, mod (x + y,n)};
if z = 0, output n.
271441
Hence 271441 (= 521
2
) is a number of the desired kind.
Now we prove that if p is a prime, then p divides a
p
. The characteristic polynomial of
the sequence is x
3
 X  I = 0, with roots, say, a, fJ, and y. We find that the general term is
an = an + fJn + yn. The simplicity of this general term is one of the nice traits of Perrin's
sequence. Let p be a prime. Then, since a + fJ + y = 0, we have 0 = (a + fJ + y)P =
a
P
+ fJP + yP + ps, where s is a symmetric polynomial (with integer coefficients) in
a, fJ, y. Hence, by the fundamental theorem of symmetric polynomials (see Bonus), sis
a polynomial in the elementary symmetric polynomials in a, fJ, and y. The elementary
symmetric polynomials are a + fJ + y, afJ + fJy + ya, and afJy. These expressions are
given by the coefficients of the characteristic polynomial of the recurrence relation:
x
3
 X  I = (x  a)(x  fJ)(x  y)
= x
3
 (afJ + fJy + ya)x
2
+ (a + fJ + y)x  afJy·
Since the characteristic polynomial has integer coefficients, s is an integer. It follows that
p divides a
p
.
164
Bonus: The Fundamental Theorem of Symmetric Polynomials
Recall the elementary symmetric polynomials from p. 31 :
SI = XI + X2 + ... + Xn •
S2 = L XiXj.
I::;i<j::;n
Sn = XIX2 •.. Xn .
3 Advanced Problems
THE FUNDAMENTAL THEOREM OF SYMMETRIC POLYNOMIALS. If f is a symmetric
polynomial in the variables XI. X2 • ...• Xn • with integer coefficients. then f is a polynomial
in the elementary symmetric polynomials in XI. X2 ••••• X
n
• with integer coefficients.
For example. the symmetric function X3 y + X3 Z + y3 Z + y3 X + z3 X + z3 Y may be
written as
UT h h . h f ·al al a2 an· ( )
nesayt att ewelg to amonOmI XI X
2
••. Xn IS al.a2 •...• an.
Let f be a symmetric polynomial. Order the monomials of f lexicographically accord
ing to weight. Choose a monomial of greatest weight (al.a2 •...• a
n
). with al ~ a2 ~
••• ~ an. This monomial is "killed off' by a monomial in the elementary symmetric poly
nomials of weight (al  a2. a2  a3 • •••• anI  an. an). i.e .• the polynomial
Subtract off this polynomial and the remainder is a symmetric polynomial oflesser weight.
Continue this process until we have "killed off" the polynomial.
Let's work out the details of this procedure for the example. given earlier. of the poly
nomial
S = x3y + x
3
z + y3 z + y3x + z3 X + z3y .
We see that the greatest weight of a monomial is (3. 1.0). Performing the reduction indi
cated above. we obtain (2. 1.0). Hence. we calculate
We find that the greatest weight is (2.2.0). Performing the reduction. we obtain (0.2.0).
Hence. we calculate
It's easy to see that this last expression is equal to SIS3. Therefore
3.5 Combinatorics 165
3.5 Combinatorics
Integer Triangles
How many incongruent triangles have integer side lengths and perimeter 10? There are
only two: (2,4,4) and (3,3,4). (We specify a triangle by giving the ordered triple of its
side lengths in nondecreasing order. A triple (a, b, c) must satisfy the triangle inequality
a+b>c.)
How many triangles have integer side lengths and perimeter 10100?
Solution
The number of such triangles is 2083 ... 3, where there are one hundred ninetysix 3 's. We
need some theory to arrive at this number. Once we have the theory, we can calculate the
number by hand!
Let t(n) be the number of integer triangles of perimeter n. Let's generate some data. (It
is convenient to set t(O) = 0.)
n o I 2 3 4 5 6 7 8
t(n) 000 o 2
The sequence {t(n)} is known as Alcuin's sequence.
13
More about this fascinating se
quence in the Bonus ....
We will employ a generating function. The main idea is that we can "build up" to any
triangle (a, b, c) starting from the (I, I, 1) triangle. Suppose that (a, b, c) is a triangle of
perimeter n, i.e., n = a + b + c. How can we build up to, say, the triangle (23, 37, 40)? A
naive approach is to add triples ofthe form (I, I, 1), (0, I, 1), and (0, 0, I). We can certainly
obtain the desired triangle in a unique way:
(23,37,40) = (I, I, 1) + 22(1, I, 1) + 14(0, I, I) + 3(0,0, I).
The snag is that by this method we can construct triples that don't satisfy the triangle
inequality, e.g., the triple (23, 37, 100).
Instead, we go by steps (0, I, I), (I, I, 1), and (I, 1,2). These triples satisfy the weak
triangle inequality a + b :::: c, and the weak triangle inequality is good enough, since we
start with a genuine triangle. A unique solution exists to the equation
(a, b, c) = (I, I, I) + a(O, I, 1) + ,8(1, 1, I) + y(1, 1,2),
130ur sequence {t(n)} is called Alcuin's sequence because it generalizes a problem given by Alcuin (735804)
in a problems book called "Propositions of Alcuin, A Teacher of Emperor Charlemagne, for Sharpening Youths."
The generalized problem may be stated as follows: A dying father has n empty casks, n casks halffull of wine,
and n casks full of wine that he wishes to divide among his three sons so that each receives the same number
of casks and the same amount of wine. In how many ways may this be done? We met the n = 7 case of this
problem in "Cookie Jar Division" on p. 2. In terms of cookie jars, each full jar of cookies must be counterbalanced
by an empty jar, so all we need to do is specify the number of full cookie jars that each person receives (as in
the diagram on p. 2). No one may have more than n/2 full jars, since there wouldn't be enough empty jars to
compensate. So, if the three people have a, b, and c full jars, then a + b + c = n, where, say, a :::: b :::: c, and
c :::: n/2. This means that (a, b, c) is an integer triangle that is possibly degenerate, i.e., a + b = c.1f n is odd,
the degenerate case cannot occur, so the number of solutions is t(n). If n is even, then the number of solutions is
t(n + 3). Can you figure out why?
166 3 Advanced Problems
namely, a = ba, (3 = a+bcl, y = cb. Since2a+3{3+4y = a+b+c3 = n3,
we see that t (n) is equal to the number of ways of writing n  3 as a sum of 2 's, 3 's, and
4's (order of terms is unimportant).
The generating function that captures this counting problem is
x
3
( 2 ( 3 ( 4 = t(O) + t(l)x + t(2)x
2
+ t(3)x
4
+ t(4)x
4
+ ....
lx)lx)lx)
In order to understand this, consider first the simpler generating function
Each factor in the denominator yields a geometric series, and the product of these series is
(l +x +X
2
+X
3
+X4 + ... )(1 +X2 +X4 +X6 +X8 + ... )(1 +X3 +X6 +X9 +X
12
+ ... ).
The first factor consists of the sum of all nonnegative powers of x, the second factor all even
powers, and the third factor all powers that are multiples of three. What is the coefficient
of, say, x
10
? It is the number of ways of writing 10 as a sum of 1 's (coming from the
first factor), 2's (from the second factor), and 3's (from the third factor). Our generating
function for the triangles of perimeter n works similarly. The allowable summands are 2,
3, and 4, accounting for the factors in the denominator. The x
3
in the numerator offsets the
count by 3 so that it counts partitions of n  3.
Using partial fractions (and perhaps a computer algebra system), we can rewrite the
generating function as
1 13 1 1 x + 1 x + 2
::+    + .
24(x  1)3 288(x  1) 16(x + 1)2 32(x + 1) 8(x
2
+ I) 9(x
2
+ X + I)
Who would have thought that such a suavelooking rational function would yield such un
couth partial fractions? Although the expansion may be ugly, it will give rise to a beautiful
formula.
Via the binomial theorem (for arbitrary exponents), the first four terms can be written
I= (3)(_lt
xn
 E. I=xn  I= (2)xn  I=(_l)nx n.
24 n=O n 288 n=O 16 n=O n 32 n=O
Using the identity = (n+!l), we can simplify the coefficient of xn to
+ 2) _ E. _ + I) _
24 n 288 16 32
6n
2
+ 18n  1  18n(l)n  27(l)n
288
Multiplying the final two terms by 1  x
2
and 1  x, respectively, we observe that the
resulting coefficients of xn follow a pattern modulo 12. This pattern is c /72 where c is
given in the table.
n mod 12 0 2 3 4 5 67891011
c 7 17 25 17 17 25 17 7
3.5 Combinatorics 167
Thus, we obtain the formula t(n) n
2
/48 + (c  7)/72, for n even, and t(n) =
(n + 3)2/48 + (c  7)/72, for n odd. This can be represented as t(n) = {n
2
/48}, for n
even, and {(n + 3)2/ 48}, for n odd. Here, {x} is the nearest integer to x. So, to answer our
question, we compute {102oo/48} by long division (observing a recurring pattern in the
quotient), and obtain the result stated above.
Bonus: Alcuin's Sequence
Since Alcuin's sequence has a rational generating function, the sequence satisfies a linear
recurrence relation (of order 9):
t(n) = t(n2)+t(n3)+t(n4)t(n5)t(n6)t(n7)+t(n9), n:::: 9.
The form of the recurrence relation comes from the expanded denominator in the generat
ing function. The initial values, for ° ::::: n ::::: 8, are given in our table of data.
Here are three neat facts about Alcuin's sequence:
1. It is a zigzag sequence (its values alternately rise and fall), for n :::: 6. You can prove
this directly from the definition of t (n) or from the formula for t (n).
2. Its recurrence relation is palindromic, that is, the sequence is defined by the same
recurrence relation going forward and backward. Moreover, since there are eight O's
in a row, for 5 ::::: ° ::::: 2, the sequence is the same forwards and backwards. So if we
care to define {t(n)} for negative n, we have the curious relation t(n) = t(n  3).
It follows that the explicit formula for t (n) given in the Solution is valid for negative
n. We aren't claiming that a triangle with negative perimeter is meaningful, only that
the sequence has strange symmetry.
3. Consider the sequence modulo 2. We obtain a repeating cycle of length 24:
0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0.
We say that the period mod 2 is 24. In general, given any modulus m :::: 2, the period
of Alcuin's sequence mod m is 12m. You can prove this from the formula for t(n).
TopsyTurvy Tournaments
A tournament is a complete graph in which each edge is replaced by an arrow. The direction
of the edge shows who wins a game between teams designated by the two endpoint vertices.
We say that a tournament has Property k if, for every k vertices, some vertex beats all of
them. For example, the tournament below has Property 1. Find a tournament with Property
2.
2
3
168 3 Advanced Problems
Solution
The following diagram shows a tournament with Property 2. It is called a quadratic residue
tournament. The vertices are labeled 0 through 7, since the directions of the edges can be
given by a simple rule using modulo 7 arithmetic. Vertex i is directed to vertex j if i  j
is a square modulo 7. The squares modulo 7 are 0
2
== 0 (mod 7), (±If == I (mod 7),
(±2)2 == 4 (mod 7), and (±3f == 9 == 2 (mod 7). Observe that a nonzero element x is a
square modulo 7 if and only if xis not a nonsquare modulo 7, so that if i  j is a square,
then j  i is a nonsquare.
2
3
o
4
5
Bonus: The Probabilistic Method
It's not nearly as easy to find a tournament with, say, Property 10. Instead, we give an
existence argument to show that given an arbitrary integer k there exists a tournament with
Property k (without constructing it).
THEOREM (Paul Erdos). Let k be a positive integer. For some integer n, there exists a
tournament on n vertices with Property k.
We employ a probabilistic approach. Let k be a given positive integer and n be an integer
that we will determine later. Assume that the edges of the tournament on n vertices are
directed one way or the other at random, with equal probability, and independently of all
the other edges. We call such a tournament a "random tournament." For every subset S of
k vertices, let As be the event that there is no vertex that beats all the vertices of S. In
order for event As to occur, none of the n  k vertices in the complement of S may be
directed to all vertices of S. Hence
Since probabilities are subadditive (the probability of a union is at most equal to the sum
of the probabilities of the individual events), we have
3.5 Combinatorics 169
Observe that Pr(Us As) is the probability that there does not exist a tournament with
Property k . The expression on the right is the product of two terms: (Z) and (1 _ 2
k
(k.
As k is fixed, (Z) is a polynomial in n (of degree k), while (1  2
k
t
k
is an exponential
function in n (with base less than 1). As n tends to infinity, the exponential function domi
nates and the product of the two terms tends to O. Hence, the upper bound tends to 0 and at
some point must be less than 1. By taking complements, we see that for n sufficiently large,
a random tournament has Property k with positive probability. But this probability is equal
to the number of tournaments with Property k divided by the total number of tournaments
(on n vertices). Therefore, there exists a tournament with Property k.
Following the method of the proof, we deduce that there exists a tournament with Prop
erty lOon 102653 vertices, since
< 1,
for n = 102653.
Sudoku Solving
1 6 8 3
5 2 1
2 6 8 I
5 7
8 4 2 7 5 3
2 8
5 3 6 2
5 7 4
9 6 2 5
Sudoku is a Japanese word meaning "single number." The goal in a Sudoku puzzle
l4
is
to fill in the blank cells of a 9 x 9 grid so that every row, column, and 3 x 3 box contains
every digit from I to 9. If you are not familiar with the puzzle, you might want to try
solving the above specimen.
Can you program a computer to solve Sudoku puzzles?
14Howard Garns created the puzzle in 1979 for Dell Pencil Puzzles & Word Games magazine. The puzzle was
called "Number Place." The puzzle was rediscovered in 1997 by Wayne GOUld. who saw a partly completed
puzzle. called Sudoku. in a Japanese book shop. Gould gave the puzzle to The Times newspaper in Britain,
which first published it in 2004. The tremendous popUlarity of Sudoku internationally has led to it being called
"the Rubik's cube of the 21 st century." Besides being fun to figure out, Sudoku gives rise to some interesting
mathematical questions (both solved and unsolved) [10).
170 3 Advanced Problems
Solution
There may be as many different solutions as there are computer programmers. We give a
solution, by Donald Knuth, using exact covers.
What is an exact cover? Consider, for example the set
and the subsets
S = {a,b,c,d,e,j,g}
XI = {c,e,f}
X
2
={a,d,g}
X
3
={b,c,f}
X4 = {b}
Xs = {b,g}
X6 = {d, e, g}.
Is there a collection of the Xi whose union contains each element of S exactly once? Yes,
the subsets X I, X2 , and X4 constitute such a collection. We call such a collection an exact
cover.
In general, an exact cover problem is to find a collection of sets that "cover" each element
in the base set exactly once.
An exact cover problem can be given in terms of a binary matrix. Define the matrix so
that its columns represent the elements of the base set and the rows represent the subsets.
Put a I in a given position if the corresponding element is in the subset; put a 0 in the
position otherwise. The binary matrix associated with our example is
000 I 0
100 100 I
000 I 0
o 0 0 000
o 0 000
000 0
The columns represent the elements a, b, c, d, e, j, and g, and the rows represent the
subsets XI, X
2
, X
3
, X
4
, X
s
, and X
6
• An exact cover problem in the context of a binary
matrix is to find a set of rows that have exactly one I in each column. Thus, in our example,
the first, second, and fourth rows constitute a solution.
How do we convert the Sudoku problem into an exact cover problem? We form a 729 x
324 binary matrix that encodes all possible ways to put a number into the Sudoku grid.
Since the grid has 81 cells and there are 9 possible numbers to put in a cell, there are
81 . 9 = 729 possible ways to put a number in the grid. This accounts for the number of
rows in our matrix. Each row has exactly four I 's, corresponding to conditions that are met
when a number is placed in the grid. The conditions are of four types:
• xOy means that cell (x, y) is occupied .
• xRy means that number x is in row y.
3.5 Combinatorics 171
• xCy means that number x is in column y .
• xBy means that number x is in block y.
These conditions are represented by the 4 . ~ = 324 columns.
The given numbers in a Sudoku puzzle are represented by given rows of the matrix.
Solving the Sudoku puzzle is equivalent to extending the set of given rows to an exact
cover of the matrix. The fact that there is exactly one I in each column of an exact cover
is equivalent to the fact that there is exactly one i (where I ::: i ::: 9) in each row, column
and block of the Sudoku grid and that each cell is occupied by a number.
So we can solve a Sudoku puzzle by solving the exact cover problem that extends the
given set of rows of the matrix.
Here is a depthfirst search algorithm that solves the Exact Cover Problem.
Exact Cover Algorithm
Let AI be a binary matrix.
If AI is empty, then the problem is solved.
Otherwise, choose a column c with the minimum number
of I's . If this number is zero, then terminate
unsuccessfully.
Choose, in turn, all rows r such that AI(r, c] = I.
Include r in a partial solution.
For each j such that AI(r, jJ = I:
Delete column j from AI.
For each i such that AI[i,jJ = I, delete row i from AI.
Repeat this algorithm recursively on the reduced
matrix AI.
A computer implementation of the algorithm solves every Sudoku problem instantly.
If there is no solution, then that is also determined instantly. For instance, the following
puzzle isn't solvable because there is no way to put a 4 in the topleft block. The program
discovers this right away since there is no I in column 4 B I.
I
2
3
4
4
172 3 Advanced Problems
The algorithm has a nice symmetry in that the search is over all the digits that can fit in
a cell and all the places a digit can fit in a row, column, or block.
I'd like to end by relating that I once saw an advertisement for Sudoku books that said,
"Don't worrythere's no math involved."
Bonus: Dancing links
The exact cover problems that represent Sudoku puzzles are not particularly large (they
have dimensions 729 x 324) and are solved instantly by a computer implementing our
Exact Cover Algorithm. However, larger exact cover problems might pose a difficulty
in that our algorithm calls for a lot of searching for l's in the binary matrix. Knuth has
suggested a method for efficiently implementing the algorithm (see wwwes fa eu 1 t Y .
stanford. edu/ knuth/preprints. html). He calls the method Dancing Links
because the data structures used are linked lists and these links execute a "dance" as the
algorithm proceeds. In particular, the l's in the matrix are nodes in circular doublylinked
lists, one such list for each column and one for each row. Each 1 is linked to its neighboring
l's to the left and right, above and below, and there is "wraparound" at the borders of the
matrix. In addition, each column is linked to a node called a column header, which keeps
track of the number of l's in that column. As the algorithm proceeds, various rows and
columns are eliminated or replaced. The linked list data structure makes it much easier to
keep track of all of this.
The SET Game
The SET game
lS
consists of a deck of 81 cards, each displaying certain figures. The figures
have four attributes: color, shape, number of objects, and shading. Each attribute has three
possible values, as shown in the following table.
attribute
color
shape
number
shading
values
green, purple, red
oval, diamond, squiggle
1,2,3
solid, open, striped
For example, one of the cards looks like this:
15 The SET game was created in 1991 by the geneticist Marsha Falco.
(green)
3.5 Combinatorics 173
A "set" consists of three cards that, in each attribute, have all the same value or all differ
ent values. For example, the cards with attributes {green, oval, 3, open}, {green, diamond,
2, open}, and {green, squiggle, 1, open} are a set.
The goal in the game SET is to obtain a set. However, in this problem, we are interested
in the minimum number of cards thatforce the existence of a set.
We can think of the attributes as coordinates and let each coordinate take the possible
values 0, 1, and 2 (to represent the three values for that attribute). Thus, the 81 (= 3
4
) cards
are (0,0,0,0), (0,0,0, 1), ... , (2,2,2,2). With this representation, a set consists of three
ordered 4tuples (vectors) that sum to (0,0,0,0), where addition is carried out modulo 3.
For example, the cards (0, 1, 1,0), (2,2, 1,0), and (1,0, 1,0) are a set. Notice that for any
two cards, there is a unique third card that makes a set with them.
The following 20 cards do not contain a set:
(0,0, 1, 1) (1,0,0,0) (1,0,2,0) (1,0,0,2)
(1,0,2,2) (2,0,1,1) (0,1,1,0) (0,1,0,1)
(0,1,2,1) (0, 1, 1,2) (2,1,1,0) (2,1,0,1)
(2,1,2,1) (2,1,1,2) (0,2,1,1) (1,2,0,0)
(1,2,2,0) (1,2,0,2) (1,2,2,2) (2,2,1,1).
We can also represent these vectors geometrically, as in the following diagram.
EaE8Ea
83tE83
EaE8Ea
The rows of 3 x 3 grids represent the first coordinate and the columns of grids represent
the second coordinate. In each 3 x 3 grid, the rows represent the third coordinate and the
columns represent the fourth coordinate. The coordinates are numbered 0, 1, 2, from left
to right, bottom to top. For example, the dot in the middle of the topright grid represents
the card (2,2, 1, 1). The geometric representation gives a quick portrayal of 20 cards con
taining no set, as we notice that no three cards going either down, across, or diagonally
completely agree or disagree in each coordinate. By inspection, we can see that if we add a
21 st card, then this collection will indeed contain a set. However, this is merely an example,
and does not constitute a proof that every collection of 21 cards contains a set.
The problem is to prove that every collection of 21 cards must contain a set. Can you do
this, using both mathematics and computer programming?
Solution
We can't rely on a computer alone, for the number of collections of 21 cards is ( ~ ! ) ~
1.4 x 10
19
, too gigantic for any computer.
174 3 Advanced Problems
We need to make certain reductions first, before unleashing the power of a computer.
Let's say that we have a collection of 21 cards (given as 4tuples). Without loss of gen
erality, we may assume that the collection contains (0,0,0,0). This is because, for any
21subset, v I, V2, ••• , V21, we may take any vector, say, v I, and subtract it from each of
the vectors in the set, giving us now (0, 0, 0, 0) as the first vector in the set. We are allowed
to do this since, if WI, W2, and W3 is a set, then so is WI  VI, W2  VI, and W3  VI, as
(WI  vt) + (W2  VI) + (W3  vt) = (WI + W2 + W3)  3vI = (0,0,0,0). Thus, the prop
erty of being a set is unaffected by translation. Furthermore, the set property is unaffected
by multiplication by a nonsingular matrix (the proof is an exercise for the reader). Hence,
we may assume that our collection contains the four standard basis vectors (1,0,0,0),
(0, 1,0,0), (0,0, 1,0), and (0,0,0, I).
Note. We need to check that all 21 cards do not lie in a 3dimensional subspace, but this
is easy to do. A 3dimensional subspace, say, the one consisting of all 4tuples with fourth
coordinate 0, contains 27 vectors. Assuming that the collection contains (0,0,0,0) and
three basis vectors, we can exclude ( ~ ) = 6 other vectors, namely, those that make sets
with the first four vectors. But excluding 6 vectors leaves 21 vectors, so every other vector
in the subspace must be in the collection. However, this allows for numerous sets, such as
(1,2, 1,0), (1,0, 1,0), (I, I, 1,0).
Now we have five cards that are definitely in our collection, and we can exclude G) = 10
cards that are definitely not, namely, the ones that make sets with the five included cards.
At this point, the size of the problem is
(
81  IS) _ (66) "'"' 8 14
215  16"'" .6xlO .
Although this number is large, we can tackle it (with a computer) by systematically putting
in vectors and ruling out vectors. This verifies that every collection of 21 cards contains a
set.
Bonus: A Combinatorial Problem
A neat problem generalizes our SET game problem and our earlier problem "Lots of Per
mutations."
The (n, d) SET game consists of n
d
cards, each representing d characteristics with n
choices for each characteristic. A set is a collection of n cards which, with respect to each
characteristic, all agree or all disagree. The original SET game problem corresponds to
n = 3, d = 4.
Let I(n, d) be the minimum number of cards that force a set in the generalized SET
game. Some values of this function, for small nand d, are 1(3, I) = 3, 1(3,2) = 5,
1(3,3) = 10,/(3,4) = 21. In general, we have (trivially) I(n, I) = n. We can also give
the value of I(n, 2), for any n.
PROPOSITION. For n ::: I, we have I(n, 2) = (n _1)2 + I. That is, if (n 1)2 + I cells of
an n x n grid are filled, then one of the following patterns of filled cells results: n in a row,
n in a column, or n with no two in the same row or column (a transversal). Furthermore,
this conclusion is not guaranteed if (n  1)2 + I is replaced by (n  If.
3.5 Combinatorics 175
Let's prove this. If we fill all the cells except the last row and column, this accounts for
(n  If cells and there is no filled row, column, or transversal.
Now assume that we fill (n  1)2 + 1 cells and there is no completely filled row or col
umn. We must show that there is a completely filled transversal. We will use an important
theorem of combinatorics called Hall's Marriage Theorem. 16
HALL'S MARRIAGE THEOREM. Let S be a collection of subsets of an nelement set X.
Suppose that, for I :::: k :::: n, the union of any k members of S has cardinality at least k.
Then there exists, for each s E S, a distinct x E X such that XEs. Such a collection of x
is called a system of distinct representatives. 17
Note. Of course, the conditions of the theorem are necessary for the conclusion. What is
not obvious is that they are sufficient.
For a proof of Hall's Marriage Theorem, see [15].
Asanexample,letX = {1,2,3,4,5},andletsl = {l,2,3},S2 = {2,3,5},S3 = {4,5},
and S4 = {3, 5}. Then one system of distinct representatives (there is more than one in this
case) is I E Sl, 2 E S2, 5 E S3, and 3 E S4.
To continue with our proof, let X be the columns of the grid and S the collection of
filled cells in each row. We will show that the hypothesis of Hall's Marriage Theorem is
satisfied, and it will therefore follow that the grid contains a filled transversal.
If the hypothesis fails for k = 1, then some row is empty. But then the (n  1)2 + I filled
cells occur in n  1 rows, and it follows that one of these rows is complete, contradicting
our assumption. Hence, the hypothesis is satisfied for k = 1. A similar argument shows
that the hypothesis is satisfied for k = n.
Suppose that the hypothesis fails for some k such that I < k < n. Then a union of some
k rows contains filled cells in at most k I columns, accounting for at most k(k I) filled
cells. But then the remaining n  k rows, which contain at most (n  k)(n  I) filled cells,
must account for the rest. However, we can show that
(n k)(n 1) + k(k 1):::: (n _1)2,
for this inequality is equivalent to our assumption that n ~ k + 1. The contradiction
means that the hypothesis of Hall's Marriage Theorem is satisfied, and we have our desired
conclusion.
In general, the calculation of f(n, d) is an unsolved problem. In particular, no formula
is known for f(n, 3).
Girth Five Graphs
The girth of a graph is the length of a smallest cycle in the graph. For example, the girth of
the graph on the left is 5, as the graph is a 5cycle. The girth of the graph on the right is 3,
as the graph contains a triangle.
16Hall's Marriage Theorem is credited to algebraist Philip Hall (19041982).
17The whimsical name of the theorem derives from thinking of the elements of X as men and the elements of S
as lists of men whom various women would like to marry. The conclusion of the theorem is a satisfactory pairing
of the men with the women.
176 3 Advanced Problems
A graph is rregular if every vertex is adjacent to exactly r vertices. The graph on the
left is 2regular and the graph on the right is not regular.
Suppose that a graph is rregular, for some r, and has girth 5. How many vertices will
the graph have? Well, every vertex is adjacent to r vertices, and none of these vertices
can be adjacent to each other (or else the graph would contain a triangle). So we have the
following picture.
rl
rl
r 1
The vertices in the third column must be distinct (or else the graph would contain a
4cycle). Hence, the graph contains at least 1 + r + r(r  1) = r2 + 1 vertices.
The question is, what are the possible values of r such that an rregular graph of girth
5 contains exactly r2 + 1 vertices? For example, the 5cycle pictured above satisfies the
condition where r = 2.
Solution
Surprisingly, only four values of r are possible: 2, 3, 7, and 57. How do we prove such a
thing? The aha! idea is to introduce an adjacency matrix. Define A = [aij j, an n x n matrix
with n = r2 + 1, where aij = 1 if vertices Vi and V j are adjacent and 0 otherwise. Note
that A is a symmetric matrix.
The critical observation is that
A2 + A  (r  1)/ = J,
where / is the n x n identity matrix and J is the n x n matrix of all 1 'so To prove this, we
observe that
n
(A2)ij = L AikAkj
k=l
= the number of neighbors common to the vertices viand v j .
3.5 Combinatorics 177
Now, consider two vertices, Vi and Vj of the graph. If i = j, then (A2)ij = r, and the left
side of the identity to be proved counts r + 0  (r  1) = 1, which is the same as the right
side counts. If i =1= j and Vi and V j are adjacent, then Vi and V j have no common neighbors
(or else the graph would have a triangle), so the left side counts 0 + I  (r 1)0 = I, which
agrees with the right side. If i =1= j and Vi and Vj are nonadjacent, then Vi and Vj have
exactly one common neighbor (why?), and so the left side counts I + 0  (r  1)0 = I,
which agrees with the right side. Hence, the relation is true.
Next, we investigate the eigenvalues of A. As these numbers must be integers, there will
be serious restrictions on the possible values of r. Because A is a symmetric matrix, it
has n eigenvectors. In fact, A has an orthogonal basis of eigenvectors (this is known as
the "spectral theorem"). One of the eigenvectors of A is the all I 's vector, with eigenvalue
r. Suppose that A is an eigenvalue of another eigenvector of A, say, e. Since the basis is
orthogonal, we have J e = O. Therefore
This implies that
0= Je
= (A2 + A  (r  I)I)e
= A
2
e + Ae  (r  I)e.
Using the quadratic formula, we find that
I
A = 2:(1 ± J4r  3).
Define Al = t(t'  J4r  3) and A2 = t(1 + J4r  3). Now we know that all
possible eigenvalues of A are r, AI, and A2.
What can we say about the multiplicities of these eigenvalues? The eigenvalue r has
multiplicity 1, since neither A I or A2 can equal r (check). Let m I and m2 be the multiplicity
of Al and A2, respectively. Hence
We also know from linear algebra that the sum of the eigenvalues of a matrix is equal to
the trace of the matrix. All the diagonal elements of A are 0, so the trace of A is 0, and
hence
r + mlAI + m2A2 = O.
Combining these last two equations together with the values of Al and A2, we obtain
Consider two cases. If ml  m2 = 0, then r = 2. If ml  m2 =1= 0, then J4r  3 is
a rational number and hence an integer. Denote this integer by s. Then r = (s2 + 3)/4.
Simplifying our equation yields
178 3 Advanced Problems
It follows that s divides 15, and hence s is 1, 3, 5, or 15. But s = 1 implies that r = 1,
which doesn't give a girth five graph. Therefore, r is 2 (from the first case), 3, 7, or 57.
This result was proved in 1960 by Alan Hoffman and Robert Singleton.
Do rregular, girth five graphs with r2 + 1 vertices exist for these values of r? Our 5
cycle above is an example with r = 2. A little experimentation yields a graph with r = 3.
It has ten vertices and is called the Petersen graph. It was discovered by Julius Petersen
( 18391920).
The existence of such a graph with r = 7 is shown in the Bonus. No one knows whether
a 57regular, girth five graph with 3250 vertices exists. Such a graph would have 3250
vertices.
Bonus: The HoffmanSingleton Graph
We will show how to make the HoffmanSingleton graph. Remember that the graph is to
be a 7regular graph with 50 vertices and girth 5. Let Po, PI, P
2
, P3, and P
4
be 5cycles,
with vertices numbered 0,2,4,1, and 3 (in cyclic order). Let Qo, QI, Q2, Q3, and Q4 be
5cycles, with vertices numbered 0, 1, 2, 3, and 4 (in cyclic order). The P cycles and Q
cycles have altogether 50 vertices, and these are the vertices of our graph. Each vertex in
one of the P cycles will be joined to exactly one vertex in each of the Q cycles. Thus, each
vertex will be adjacent to 2 + 5 = 7 vertices. Here is the recipe for how to join the vertices.
A vertex i in Pj is joined to vertex i + j k in Qb where the calculation is performed
modulo 5.
The automorphism group (the group of symmetries) of the HoffmanSingleton graph
has order 252000 = 50· 7!. Each vertex of the graph may be moved to any vertex (that
is to say, the symmetry group is transitive). Once this operation is carried out, the seven
vertices adjacent to any given vertex may be permuted arbitrarily. Altogether, this accounts
for 50· 7! symmetries.
What is the symmetry group of the Petersen graph?
Unlabeled Graphs
How many graphs are there on the vertex set {I, 2, 3, ... , n }? There are 2 m, as there are
( ~ ) possible edges and each edge can be included or not included in the graph. For example,
there are 2m = 2
6
= 64 labeled graphs on 4 vertices. However, if we regard the vertices
3.5 Combinatorics 179
as indistinguishable (in other words, the graph is unlabeled), then there are only 11 graphs
on 4 vertices.
Here are the II unlabeled graphs of order 4.
• •
• •
I :
I I L
LLlL
Drs:
IZJ
~
Let gn be the number of labeled graphs on n vertices and gn the number of unlabeled
graphs on n vertices. As we have said, g n = 2 ( ~ ) . Determine a formula for gn.
Solution
The 64 labeled graphs on 4 vertices are partitioned into 11 sets of equivalent unlabeled
graphs (the graphs pictured above). For example, the 12 labeled graphs below are all equiv
alent as unlabeled graphs.
I 2 I 4 2 334
lLlLlLlLlLlL
343 2 3 4 2 4 2 4 2 3
232232432
lLlLlLlLlLlL
4 3 4 2 4 3 4 3 4
These 12 labeled graphs constitute an orbit. To test your understanding, determine the
size of the orbit corresponding to each of the 11 unlabeled graphs above. The sum of these
orbit sizes will be 64.
180 3 Advanced Problems
We need a formula for the number of orbits when a group (the group of permutations)
acts on a set (the set of unordered pairs of vertices). The formula is given by Burnside's
lemma. For a proof of Burnside's lemma, which is a nice example of doublecounting, see
[6].
BURNSIDE'S LEMMA. Let a finite group G act on a finite set X. Then the number of orbits
is given by
I
WI L f
g
,
geG
where fg is the number of elements of X fixed by g.
Let's use Burnside's lemma to prove that there are II unlabeled graphs of order 4. Let
V = {l,2,3,4},thesetofverticesofthegraph,and V(2) = {12, 13, 14,23,24, 34},theset
of unordered pairs of vertices. What is the permutation of V(2) given by, for example, the
permutation (1,2)(3,4) of V? Looking at what happens to each element of the unordered
pairs, we find that the corresponding permutation of V(2) is (12)(13,24)(14,23)(34). The
number of fixed points of this permutation is 2 raised to the number of cycles, i.e., 2
4
, as
each cycle in a fixed point is a cycle of edges or nonedges.
The cycle lengths of a permutation make up the cycle type of the permutation. For ex
ample, the cycle type of the permutation (abc)(de)(f)(ghi) is given as I + 2 + 3 + 3.
We also represent a cycle type as a vector (Cl' C2, ••• ,c
n
), where Ci is the number of
cycles oflength i, for I :::: i :::: n. The permutation (abc)(de)(f)(ghi) is represented as
(I, 1,2,0,0,0,0,0,0). Permutations of the same cycle type yield the same number of fixed
points. The following table lists the cycle type of permutations of V, the number of per
mutations of each cycle types, the cycle types of the corresponding permutations of V (2) ,
and the number of fixed points.
cycle type of # of permutations cycle type of #of
permutation of V of given cycle type
permutation of V(2)
fixed points
1+1+1+1 I 1+1+1+1+1+1 2
6
1+1+2 6 1+1+2+2
24
2+2 3 1+1+2+2
24
1+3 8 3+3
22
4 6 2+4
22
Thus, by Burnside's lemma, the number of non isomorphic graphs of order 4 is
~ ( l . 2
6
+ 6.2
4
+ 3.2
4
+ 8.2
2
+ 6.2
2
) = II
24 .
The general formula, due to George P61ya,18 is given by
I
gn = I" L h(c)2
Q
(C),
n.
C
where c = (Cl' ... , cn) is the cycle type of a permutation of V,
n!
h(c)  ::
 nk=l kCkq!
ISGeorge P6ya (18871985) was a master problem solver, well known for his book How to Solve It [17].
3.5 Combinatorics 181
is the number of permutations of cycle type c, and
q(C) = L Ck + L k (C;) + L gcd(r, s)cscs
k k r<s
is the number of cycles in a corresponding permutation of V (2) • The first term of q(c)
comes from two vertices in the same cycle of the permutation of V. The second term
comes from two vertices in different cycles of the same length. The third term comes from
two vertices in different cycles of different lengths.
Bonus: Asymmetric Graphs
The typical unlabeled graph has no nontrivial symmetries and hence is an asymmetric
graph. That is,
gn
gn '" ,.
n.
I leave it to you to explain the trivial lower bound,
::: gn.
n.
The complications in the formula for gn melt away in the following proof of the upper
bound. Assume that the permutation has n  j fixed points, where 0 ::: j ::: n. The case
j = 0 gives the term 2m In!. We will show that the other terms are bounded above by
expressions which, upon division by 2m In!, tend to 0 as n 00.
We have
q(c) ::: L + 1)J + Lrnin(r,s)crcs
k r<s
I" 2 ,,(r+s)
::: 2 kCk + 2 CrCs
k r<s
I
=  LkckLCk
2 k k
1
= 2
n
The number of permutations with n  j fixed points is
The case j = 2 yields the exponent
q(c) = 1 + (n 2) + I . (n  2).1 = (;)  n + 2.
Upon dividing by 2 min!, the contribution is bounded by r
n
+2+2Iog2 n , which tends to 0
asn 00.
182
Now let's look at the case j ~ 3, so that 1  j /2 < O. We obtain
L:>k :snj +j/2=nj/2
k
and
1 (n) 1
q(c) :s 2n(n  j/2) = 2 + 2n(1  j/2).
3 Advanced Problems
Upon dividing by 2m In!, the contribution is bounded by 2!n(1j/2)+j log2
n
, which tends
toO asn ~ 00.
We conclude that
A
Toolkit
AM, GM, HM and AMGMHM inequalities. Let XI, ••• , Xn be positive real numbers.
The arithmetic mean (AM), geometric mean (GM), and harmonic mean (HM) of XI,
••• , Xn are defined as
1 n
AM=  LX;,
n
;=1
(
n ) lin
GM= nx; ,
1=1
n
HM=.
n 1
L ~
;=1 1
These means satisfy the inequalities
HM::::GM::::AM,
with equality if and only if all the X; are equal.
Area. The area of a square of side length s is s2. The area of a triangle of base b and
height his bh/2 (also see Heron's formula under the entry for Triangle). The area of
a parallelogram of base b and height h is bh. The area of a circle of radius r is rr r2.
Binomial coefficient. The expression
(
n) n!
k  k!(n k)!'
for 0 :::: k :::: n, which is equal to the number of kelement subsets of an nelement
set.
183
184 A Toolkit
Another important binomial coefficient expression is
(
n + k 1)
k 1 '
which is equal to the number of distributions of n indistinguishable objects into k
classes.
Binomial theorem. The identity
(x + yt = t ( ~ ) x k ynk, n::: O.
k=O
Letting x = y = 1, we obtain the identity
Chinese remainder theorem. If n 1, n2, ... , nk are pairwise relatively prime positive in
tegers and rl, r2, ... , rk are any integers, then there exists an integer x satisfying the
simultaneous congruences
x == rl (mod n.),
x == r2 (mod n2),
Furthermore, x is unique modulo n In2 ... nk.
We can find the value of x as follows. Let n = nln2 ... nk. For I :s i :s k, solve the
congruence (n/ni)xi == ri (mod ni). Then
k
x == L !!....Xi (mod n).
i=1 ni
Combination. A selection of objects from a set in which the order of the objects is unim
portant. The number of combinations of size k from a set of size n is given by the
binomial coefficient ( ~ ) .
Conic sections. The intersection of a plane with a double cone. The nondegenerate conic
sections are circles, parabolas, ellipses, and hyperbolas. After suitable translations and
rotations, the equation of a conic section can be put into a simple form. The equation
of a circle is
The equation of a parabola is
A Toolkit 185
The equation of an ellipse is
The equation of a hyperbola is
Convex function. A realvalued function f is convex if
f«(I  A)X + AY) ::: (I  A)f(x) + Af(y),
for all real x, y and 0 ::: A ::: l.
Derivative. The derivative of a realvalued function gives the rate of change of the func
tion. An important rule of differentiation is the power rule: the derivative of the func
tion f(x) = xn is f'(x) = nx
n

I
.
Descartes' rule of signs. The number of positive roots of a polynomial is equal to the
number of sign changes of its coefficients, or less by an even number.
Determinant. The determinant of a square matrix A = [a (i, j) In xn is given by
n
detA = L(l)sgn(u) n a(i,aU)),
u
i=1
where the sum is over all permutations a of {I, 2, ... , n} and sgn( a), the sign of a, is
+ I if a is an even permutation and I if a is an odd permutation. The determinant
of a matrix is nonzero if and only if the matrix is invertible.
Directed graph. A graph in which each edge {x, y} has a direction, i.e., from x to y or
from y to x.
Euler's formula. Suppose that a connected planar graph with V vertices and E edges
partitions the plane into F regions ("faces"). Then
V + F = E +2.
Euler's function. For n :::: I, let tP (n) be the number of integers between I and n that are
relatively prime to n. If the prime factorization of n is
k
n = np7
i
,
i=1
then
k
n
(
e eI)
tP(n) = p/  Pi' .
i=1
The following fact is useful:
LtP(d) = n.
din
186 A Toolkit
Fermat's (little) theorem. If p is a prime number and p f a, then
a
p

I
== 1 (mod p).
Fibonacci sequence. The sequence
Un} = {O, 1, 1,2,3,5,8, 13,21,34, ... }
defined by 10 = 0, II = I, and In = Inl + In2, for n ::: 2.
In order to find an explicit formula for the Fibonacci numbers, assume that there exists
a value of x such that the sequence {xn} satisfies the recurrence relation. Then
and hence
x
2
= X + I,
or
x
2
x I = 0.
The polynomial x
2
 x  I is called the characteristic polynomial of the recurrence
relation. From the quadratic formula, we find that the roots of the characteristic poly
nomial are
Hence, the sequences
1+ v's
cJ> = 2 '
A Iv's
cJ>=2·
satisfy the recurrence relation. If two sequences u and v satisfy the recurrence relation,
then so does any linear combination of them, CI U + C2V, with CI and C2 constants.
Hence, the sequence
{ClcJ>n + C 2 ~ n }
satisfies the Fibonacci recurrence relation. From the initial values, we deduce that
and so the sequence
satisfies the recurrence relation and the initial conditions. But there is only one se
quence that does both. Therefore
Field. A field F is a set (with at least two elements) on which are defined two binary
operations, + and ., such that the following conditions hold:
1. F is an abelian group with respect to + ;
A Toolkit 187
2. F  {O} (where 0 is the additive identity) is an abelian group with respect to . ;
3. (distributive law) for all x, y, Z E F,
X· (y + z) = X· Y + X· z.
Examples: (I) the set R of real numbers with the usual addition and multiplication;
(2) the set Q of rational numbers with the usual addition and subtraction; (3) the set
Z2 = {O, I} with addition and multiplication modulo 2.
A finite field exists of any order pk, where p is a prime and k ::: I. These are the only
possible orders of finite fields.
Fundamental theorem of arithmetic. Every integer n > 1 has a unique (up to order of
factors) prime factorization
_ el e2 ek
n  PI P2 ···Pk '
where the Pi are distinct primes and the ei are positive integers.
Generating function. The (ordinary) generating function of a sequence {an} is the power
series
ao + alX + a2x2 + a3x3 + a4x
4
+ ....
For example, the generating function for the Fibonacci sequence is
x + x
2
+ 2x
3
+ 3x
4
+ 5x
5
+ 8x
6
+ 13x
7
+ ....
Golden ratio. The number ifJ = (1 + ./5)/2. This number has the property that
ifJ2 = <p + 1.
Graph. A graph G consists of a set V of vertices and a set E of edges joining some pairs
of vertices. Vertices joined by an edge are adjacent. Vertices not joined by an edge are
nonadjacent. In a drawing of a graph, adjacent vertices may be joined by a straight or
curved line and the lines may cross arbitrarily.
The picture below shows a graph with seven vertices and ten edges.
t><J1
•
The degree of a vertex is the number of vertices adjacent to it. In the above graph, the
vertices have degrees I, 2, 3, 3, 3, 4, 4.
The complete graph on n vertices, denoted K
n
, is a set of n vertices and all possible
edges between vertices. The number of edges is ( ~ ) .
The complete bipartite graph on m, n vertices, denoted Km,n, is a set of m vertices, a
set of n vertices, and all possible edges between vertices in different sets. The number
of edges is mn.
188 A Toolkit
Greatest common divisor. Let a and b be integers, not both O. The greatest common
divisor of a and b, written gcd(a, b), is the greatest integer that divides both a and b.
Given integers a and b with greatest common divisor g, there exist integers x and y
such that
g = ax + by.
Group. A group G is a nonempty set on which is defined a binary operation * satisfying
the following three axioms:
1. (associativity) for all x, y, Z E G, x * (y * z) = (x * y) * Z;
2. (identity element) G contains an element e with the property that, for all x E G,
x * e = e * x = x;
3. (inverse elements) for every x E G there exists an XI E G with the property
that x * XI = XI * X = e.
Examples: (I) the set of integers Z under addition; (2) the set of nonzero real numbers
R \ {O} under multiplication; (3) the set of invertible n x n matrices with real entries
under matrix multiplication.
We say that G is abelian if x * y = y * x for all x, y E G; otherwise, G is nonabelian.
Examples: the groups (I) and (2) above are abelian and (3) is nonabelian.
Group action. Let G be a group and X a nonempty set. Then a group action of G on X
is a function from G x X to X such that (1) ex = x, for all x E X, where e is the
identity element of G, and (2) g(hx) = (gh)x, for all g,h E G and x E X. In a
group action, each element of G permutes the elements of X.
Integral. An indefinite integral is the antiderivative of a function. A definite integral can
represent the area under a curve. An important integration rule is the power rule:
f
xn dx = _l_xn+l + en.../.. 1.
n+l ,;
Intermediate value theorem. If f is a continuous realvalued function defined on the
closed interval [a, bj, and y is any number between f(a) and feb), then there exists
a number x in (a, b) such that f(x) = y.
Jordan curve theorem. If C is a simple closed curve in the plane, then C divides the
plane into two components.
Lagrange's theorem. The order of a subgroup of a finite group divides the order of the
group.
Lattice point. An ordered ntuple (XI, ... ,x
n
) E R
n
, where XI, ... , Xn are integers.
Law of cosines. Given ~ A B C labeled as below,
A Toolkit 189
B
A
~ ____________ ~ C
b
Law ofsines. Given t:.ABC labeled as above,
sin A sin B sinC
= =
a b c
Least common multiple. Let a and b be integers, not both O. The least common multiple
of a and b, written Icm(a, b), is the least positive integer that is a multiple of a and b.
L'Hopital's rule. Suppose that f and g are differentiable functions and g' is nonzero on
an interval containing a (except possibly ata). Iflimx+a f(x) = o and limx+a g(x) =
0, or if limx +a f(x) = ±oo and limx +a g(x) = ±oo, then
lim f(x) = lim f'(x)
x+a g(x) x+a g'(x)
(ifthe second limit exists).
Modulo n. Two integers a and b are congruent modulo n, and we write
a == b (mod n),
when n divides ab. For example, 7 == 107 (mod 10).
Multinomial coefficient. The expression
where all a; ::: 0 and al + a2 + ... + ak = n, which is equal to the number of
permutations of n elements in which there are ai elements of type i, for 1 ~ i ~ k.
Multinomial theorem. The identity
n ::: O.
Numbers. The set of natural numbers {I, 2, 3, ... } is denoted by N. The set of integers
{ ... , 3, 2, 1, O,I,2,3, ... } is denoted by Z.
The set of real numbers is denoted by R. A real number is mtional if it is of the form
p / q, where p and q are integers and q oF o. The set of rational numbers is denoted by
Q. A real number that is not rational is called irmtional. Examples: 2/3, 4/7, and
14 are rational numbers, while .fi, e, and rr are irrational numbers.
190 A Toolkit
The set of complex numbers is denoted by C.
A complex number is algebraic if it is the root of a polynomial with integer coef
ficients. A number that is not algebraic is called transcendental. Examples: ,.fi is
algebraic and TC and e are transcendental.
Pascal's identity. The identity
Pascal's triangle. Pascal's identity is the basis for generating Pascal's triangle of binomial
coefficients.
2
3 3
464
5 10 10 5
Permutation. A selection of objects from a set in which the order of the objects is impor
tant. The number of permutations of size k from a set ofsizen isn(nl)(n2)··· (n
k+ 1). Ifk = n, this number is given by the "factorial" n! = n(nI)(n2)··· 3·2·1.
The cycle form of a permutation shows the image of each element and the resulting
cycles. For example, the permutation of {I, 2, 3, 4, 5, 6} that sends 1 to 4, 2 to 5, 3 to
1,4 to 3, 5 to 2, and 6 to 6 is written in cycle form as (1,4,3)(5,2)(6).
Pigeonhole principle. There are many versions of this useful combinatorial principle.
Here is a simple version: If n + 1 objects are in n classes, then one of the classes
must contain at least two of the objects.
Polynomial. A polynomial of degree n is an expression of the form
A root of a polynomial P(x) is a number r such that P(r) = O.
A simple relationship exists between the roots of a polynomial and its factors: r is a
root if and only if x  r is a factor.
Every polynomial of degree n has n roots in the field of complex numbers C.
Power set. The power set of a set S, denoted P(S), is the collection of all subsets of S. If
S has n elements, then P(S) has 2
n
elements.
Prime and composite numbers. A natural number n ::: 2 is composite if n has positive
factors other than 1 and n. Otherwise, n is prime. Examples: 15, 100, and 2
100
are
composite numbers; 2, 17, and 1999 are primes.
A Toolkit 191
Principle of inclusion and exclusion. Suppose that A I, ... , An are finite sets. For I <
k ::: n, define
In,k =
Then
n
IAI U··· U Ani = L(I)k+lln,k.
k=1
The case n = 2 is the wellknown Venn diagram rule IA U BI = IAI + IBIIA n BI.
Ptolemy's theorem. A quadrilateral of side lengths a, b, c, and d (in cyclic order) and
diagonal lengths m and n is cyclic (the vertices of the quadrilateral lie on a circle) if
and only if
ac +bd = mn.
Pythagorean theorem. The side lengths of a triangle, a, b, c, satisfy the relation
if and only if the triangle is a right triangle with right angle opposite the side of length
c.
Quadratic formula. The quadratic equation ax
2
+ bx + c = 0 has solutions
b ± Jb
2
 4ac
x =     ~ ~     
2a
Rational root theorem. If P(x) = anx
n
+ an_IX
n

1
+ ... + alx + ao is a polynomial
with integer coefficients, and p/q is a rational root of P (with gcd(p, q) = 1), then
p divides ao and q divides an.
Series. A series is a sum of a sequence of numbers. The number of terms in the sum may
be finite or infinite.
An arithmetic series is one whose terms increase by a constant amount. Thus, an
infinite arithmetic series is of the form
a + (a + d) + (a + 2d) + (a + 3d) + ... ,
where a is the first term and d is the common difference.
A geometric series is one whose terms change by a fixed ratio. Thus, an infinite geo
metric series is of the form
a + ar + ar2 + ar
3
+ ... ,
where a is the first term and r is the common ratio.
Stirling's approximation:
192 A Toolkit
Triangle. The area of a triangle is A = tah, where a is the length of one of the sides
and h is the length of the altitude from the opposite vertex. The area is also given by
Heron's formula:
A = ../s(s  a)(s  b)(s  c),
where a, b, c are the side lengths and s = t(a + b + c) is the semi perimeter.
In any triangle with side lengths a, b, and c, the triangle inequality asserts that
a < b + c.
If the sides are given by vectors x, y, and x + y, the inequality becomes
Ix + yl ::: Ixl + Iyl·
Equality occurs if and only if the vectors are parallel (and the triangle degenerate).
A triangle's circumcenter is the center of its circumscribed circle. It is the intersection
of the perpendicular bisectors of the sides of the triangle. The triangle's incenter is the
center of its inscribed circle. It is the intersection of the three angle bisectors of the
triangle. The centroid is the center of mass of the triangle. It is the intersection of the
three medians ofthe triangle (a median is a line joining a vertex to the midpoint ofthe
opposite side). The orthocenter is the intersection of the three altitudes of the triangle
(an altitude is a line passing through a vertex and perpendicular to the opposite side).
Tournament. A complete directed graph, i.e., one in which every pair of vertices x, y are
joined by an arrow from x to y or from y to x.
Vector space. A vector space V over a field F is an additive abelian group together with
a rule that assigns to every I E F and v E V an element I . v E V such that, for all
I, I .. 12 E F and v, v .. V2 E V, the following conditions hold:
1. I· (VI + V2) = I· VI + I . V2;
2. (II + h)· v = II . v + h· v;
3. II· (12 . v) = (II h)· v;
4. I· v = v, where I is the multiplicative identity of F.
The elements of V are called vectors and the elements of F are called scalars.
Examples: the vector space R2 over the field R, and the vector space R3 over R. In
these vector spaces, the vectors can be pictured by arrows in R2 and R3, respectively.
Volume. The volume of a cube of side length s is s3. The volume of a cylinder of radius r
and height h is 7r r2 h. The volume of a tetrahedron or cone of base area A and height
h is Ah/3. The volume of a sphere of radius r is 47r r3 /3.
H
list of Bonuses
Cookie Jar Division p. 2
Mediant Fractions p. 3
Sum of an Arithmetic Progression p. 5
Finding a Polynomial p. 6
Curious Identities p. 7
A Diophantine Equation p. 9
Finding the Prime Factorization p. 10
Ordered Digits in a Square p. II
The OnLine Encyclopedia oflnteger Sequences p. 12
Clock Magic p. 13
Centigrade to Fahrenheit p. 15
Sum of a Geometric Series p. 16
Power Means p. 18
Distributions, Partitions, and Schur's Estimate p. 19
A Vector Proof p. 20
A OneTriangle Proof p. 21
Another Memorable Triangle p. 22
193
194 B List of Bonuses
A Squarable Lune p.23
Covering With Unit Squares p.26
Calculation by Geometric Series p.27
Symmetry Groups p.27
Irrationality of ,J2 p.29
Elementary Symmetric Polynomials p.31
Another Zigzag Path p.33
A Sum of Areas p.34
A Can of Minimum Surface Area p.35
The AMGM Inequality p.37
Convex Functions p.38
What About the Second Hand? p.42
Sums to Any Number p.44
Inside or Outside? p.45
Lagrange's Interpolation Formula p.46
Integer Solutions p.47
An Algebraic Proof p.50
The Genus of a Graph p.52
The Problem for Hyperbolas and Parabolas p.54
Isometries of the Plane p.54
A Fundamental Parallelogram p.57
Tiling With Triangles p.58
A Family of Triangle Pairs p.61
The WallaceBolyaiGerwien Theorem p.62
The Case of the Rotating Parallelogram p.64
Estimating the Harmonic Sum p.67
Another Quick Integral p.69
Probability that Two Numbers are Coprime p. 70
Four Spherical Triangles p. 71
B list of Bonuses 195
Fermat's Last Theorem p.72
Irrationality of TC p.73
Average Number of Fixed Points of a Permutation p.75
Average Waiting Time p.76
A TwoUrn Problem p.77
Random Arcs on a Circle p.80
Average Number of Cycles in a Permutation p.81
Pell Equations p.84
Divisibility Rules p.85
The Folium of Descartes p.86
A Googol p.87
Ackermann's Function p.87
A Square Root Algorithm p.89
Powers of Fibonacci Numbers p.91
The Subcommittee Identity p.93
Fermat's (Little) Theorem p.96
Conway's LUX Method p.98
The Passage to Real Numbers p.100
An Instant Identity p.lOl
Packing 3D Animals p.102
Linear Elastic Collisions p.104
The Correct Number of Orders p.106
Partitioning Space p.108
Other Large Integers p.109
Finite Derivative and Integral p.110
Arbitrary Line Sums p. 111
Integer Averages p.112
Variations on the Games p.115
A General Drawing Strategy p.116
196 B list of Bonuses
A Finite Field Method p. 118
Brouwer's FixedPoint Theorem p. 121
Rational Generating Functions p. 122
More Change for a Dollar p. 124
A Generating Function for the Diagonal p. 125
NonIntersecting Transformations p. 130
Lattice Point Vertices p. 132
Dilworth's Lemma p. 134
The Entropy Function p. 137
Channel Capacity p. 139
The Hat Problem p. 142
The Catalan Numbers Modulo 2 and 3 p. 145
Flat Cyclotomic Polynomials p. 148
A Tiling of the Hyperbolic Plane p. 154
De Polignac's Formula p. 155
Repeated Numbers in Pascal's Triangle p. 157
Never a Prime p. 159
Hilbert's Tenth Problem p. 161
The Fundamental Theorem of Symmetric Polynomials p. 164
Alcuin's Sequence p. 167
The Probabilistic Method p. 168
Dancing Links p.l72
A Combinatorial Problem p. 174
The HoffmanSingleton Graph p. 178
Asymmetric Graphs p. 181
Bibliography
[1] G. Bachman. Flat cyclotomic polynomials of order three. Bulletin of the London
Mathematical Society, 38:5360, 2006.
[2] E. T. Bell. Men of Mathematics. Simon and Schuster, New York, 1937.
[3] M. Bernstein. The Hat Problem and Hamming Codes. Focus, 21(8):46,2001.
[4] G. Cairns, M. McIntyre, and J. Strantzen. Geometric proofs of some recent results of
Yang Lu. Mathematics Magazine, 66(4):263265,1993.
[5] M. Erickson and A. Vazzana. Introduction to Number Theory. Chapman & Hall/CRC
Press, Boca Raton, Florida, 2008.
[6] M. J. Erickson. Introduction to Combinatorics. Wiley, New York, first edition, 1996.
[7] M. Gardner. The Colossal Book of Mathematics: Classic Puzzles, Paradoxes, and
Problems. W. W. Norton & Company, New York, 2001.
[8] Liangshin Hahn. Complex Numbers and Geometry. Mathematical Association of
America, U.S.A., 1994.
[9] N. Hartsfield and G. Ringel. Pearls in Graph Theory: A Comprehensive Introduction.
Academic Press, New York, second edition, 1994.
[10] A. M. Herzberg and M. Ram Murty. Sudoku squares and chromatic polynomials.
Notices of the American Mathematical Society, 54(6):708717,2007.
[II] R. Honsberger. Mathematical Gems I. Mathematical Association of America, U.S.A.,
1973.
[12] James P. Jones. Diophantine representation of the Fibonacci numbers. Fibonacci
Quarterly, 13:8488, 1975.
[13] K. Kedlaya, B. Poonen, and R. Vakil. The William Lowell Putnam Mathemati
cal Competition, Problems and Solutions 19852000. Mathematical Association of
America, Washington, D. C., 2002.
197
198 Bibliography
[14] T. Y. Lam and K. H. Leung. On the cyclotomic polynomial1Jpq(x). American Math
ematical Monthly, 103(7):565567, 1996.
[15] J. H. van Lint and R. M. Wilson. A Course in Combinatorics. Cambridge University
Press, Cambridge, 1992.
[16] Y. V. Matiyasevich. Hilbert's Tenth Problem. MIT Press, Cambridge, MA, first
edition, 1993.
[17] G. P6lya. How to Solve It: A New Aspect of Mathematical Method. Doubleday, New
York,1957.
[18] J. Rotman. The Theory of Groups: An Introduction. Allyn and Bacon, Boston, second
edition, 1973.
[19] R. P. Stanley. Enumerative Combinatorics, volume I. Cambridge University Press,
New York, 1999.
[20] R. P. Stanley. Enumerative Combinatorics, volume 2. Cambridge University Press,
New York, 1999.
[21] I. M. Yaglom. Geometric Transformations I. Mathematical Association of America,
U.S.A., 1962.
[22] I. M. Yaglom. Geometric Transformations ll. Mathematical Association of America,
U.S.A., 1968.
Index
Ackermann's function, 87
Ackermann, Wilhelm, 88
Aha! Gotcha, vii
Aha! Insight, vii
Alcuin, 165
Alcuin's sequence, 165, 167
algebra, 1,19,84
algorithm
depthfirst search, 171
gobbling, 80
alternating group, 28
AMGMHM inequalities, 18, 183
analysis, 46,69, 84
analytic geometry, 86
animals, 10 I
annulus, 127
anti derivative, 68
arc length, 73
area, 19,20,26,62,68, 183
of circle, 72
of equilateral triangle, 133
of quadrilateral, 19
of triangle, 192
arithmetic, I
modular, 168
arithmetic mean, 18
arithmetic meangeometric mean inequality, 37
arithmetic progression, 5, 159
asymptotic, 68
automorphism group, 152
Bachman, Gennady, 148
Banach's matchbox problem, 79
Banach, Stefan, 79
barycentric coordinates, 121
baseIO representation, 85
base2 representation, 155
baseb representation, 85
Bell, E. T., 5
Beriekamp, E. R., 130
binary matrix, 170
binomial coefficient, 76, 94, 107, 154,155,183
binomial distribution, 136
binomial random variable, 135
binomial theorem, 166, 184
bits of information, 137
Boardman, Michael, 7
Boltzmann, Ludwig, 137
Bonaparte, Napoleon, 49
Brahmagupta, 84
Brahmasphutasiddhanta, 84
Brouwer's fixedpoint theorem, 121
Brouwer, Luitzen Egbertus Jan, 121
Burnside's lemma, 180
calculus, 20, 36
Callan, David, III
capacity, 140
capacity function, 137, 139
Cassini's identity, 156, 161
Cassini, Giovanni Domenico, 156
Catalan number, 143
Catalan, Eugene Charies, 143
Cauchy, Augustin Louis, 39
celestial mechanics, 46
Celsius, Anders, 15
Centigrade, 14
centroid, 133, 192
channel
binary symmetric, 139
199
200
capacity of, 140
channel capacity, 137, 139
characteristic polynomial, 163, 186
checkerboard, 102
chess, 124, 151
Chinese remainder theorem, 160, 184
184
area of, 72, 183
of, 33, 72
192
classical mechanics, 46
clock, 13,41
coefficient of growth, 139
coin, 123
biased,138
unbiased, 135
combination, 94, 184, 190
combinatorics,93,175
complete bipartite graph, 51
complete graph, 187
complete residue system, 118
complex number, 51
composite number, 85
computer science, 16
cone, 64
volume of, 192
congruence, 158
conic sections, 184
conjugation, 58
conservation of momentum and energy, 104
constant of proportionality, 20
construction, straightedge and compass, 23
convergence of series, 17
convex function, 38, 142
Conway, John H., 98
counter, 110
covering system, 158
Csicsery, George Paul, 93
cube, 102
symmetry group of, 27
volume of, 192
curve, 130
cycle type, 180
cyclotomic polynomial, 146
flat, 148
cylinder, 35
volume of, 192
Damiano, Pedro, 151
Dancing Links, 172
data structure, 172
de Polignac's formula, 155
De Polignac, Alphonse, 155
decision procedure, 162
degree, 187
Delannoy path, 127
Delannoy, Henri, 127
derivative, 71, 185
finite, 110
derivative operator, 74, 110
Descartes' rule of signs, 66, 185
Descartes, Rene, 86
determinant, 44, 133, 143, 156, 185
dice, 75
difference of squares, 85
digit, II, 84, 108
Dilworth's Lemma, 134
Dilworth, R. P., 134
Diophantine equation, 9, 161
Diophantus, 9,72
discriminant, 53
disk, unit, 70, 121
distribution, 19, 184
distribution problem, 106
divisibility rule, 85
divisor, 12
draw game, 115
Dudeney, Henry Ernst, 62
"duplication method", 4
elementary symmetric polynomial, 30
ellipse, 53, 184
elliptic curve, 72
entropy function, 136
equation
Diophantine, 161
quadratic, 191
Erd6sSelfridge theorem, 116
Erd6s, Paul, 93, 112, 116, 159, 168
errorcorrecting code, 140
Euclidean plane, 54, 58
Euclidean space, 54
Euler's formula, 31, 185
Euler's function, 146,185
Euler, Leonhard, 69
Even Steven, 113
exact cover, 170
exact cover problem, 170
existence argument, 168
expectation, 75, 81
expected value, 74
exponential function, 139
factorial, 84, 190
Fahrenheit, 14
Fahrenheit, Daniel, 15
Index
Index
fair division, 120
Falco, Marsha, 172
Fano, Gino, 151
Farey sequences, 3
Fermat's (little) theorem, 95, 96, 112, 186
Fermat's Last Theorem, 72
Fermat, Pierre de, 72
Fibonacci number, 12, 122, 156, 161, 186
Fibonacci sequence, 12,186
The Fibonacci Quarterly, 160
field, 118, 186
finite, 1I8, 187
finite difference calculus, 6
Fishburn, Peter, 134
fixed point, 54,75,121,180
Folium of Descartes, 86
fraction, 2
mediant,3
function, 185
convex, 38
doubling, 87
exponential, 87
linear, 38
primitive recursive, 88
rational, 65, 122, 158
recursive, 88
sine, 69
tower, 88
functional analysis, 79
fundamental theorem of arithmetic, 44, 187
fundamental theorem of symmetric polynomi
als, 164
game, 113, 138
Even Steven, 113
Oddball, 113
SET,I72
taking, 1I6
tictactoe, 102, 115
game theory, 16, 102
GangoIli, Anil, II
Gardner, Martin, vii, 42
Garns, Howard, 169
Gauss, Carl Friedrich, 5
generating function, 122, 123, 125, 158, 165,
187
algebraic, 126
rational, 126, 167
genus, 52
geometric construction, 32
geometric mean, 18
geometry, I, 84
analytic, 86
Gilbert, E. N., 130
Ginzburg, A., 112
glidereflection, 54
globe, 71
Gobel, Frits, 25
golden ratio, 22,28,130,187
Golomb, Solomon, 102
googol,87
Gould, Wayne, 169
graph, 9, 178, 187
asymmetric, 181
complete, 167
cycle of, 175
girth of, 175
Petersen, 178
regular, 176
graph theory, 69,93
graph, directed, 185
Gray code, 110
Gray, Frank, 110
greatest common divisor, 188
group, 59, 148, 180, 188
abelian, 100, 188
alternating, 28
automorphism, 178
general linear, 151
matrix, 149
of symmetries, 154
presentation, 148
special linear, 153
symmetric, 28
triangle, 154
group action, 188
group presentation, 59
Hahn, Liangshin, 51
Hall's Marriage Theorem, 175
Hall, Philip, 175
Harary, Frank, 102
harmonic mean, 18
harmonic series, 67
harmonic sum, 67, 81
Hartung, Paul, 160
Heron's formula, 60, 192
hexagon, 50
Hilbert's Tenth Problem, 161, 162
Hilbert's Third Problem, 63
Hilbert, David, 63, 162
23 problems, 162
Hippocrates of Chios, 23
Hoffman, Alan, 178
Honsberger, Ross, 107
Horace, vii
201
202
hyperbola, 9, 54, 61, 184
hyperbolic plane, 59, 154
hyperplane, 108
identity operator, 74
incenter, 192
inequalities
AMGMHM, 183
inequality, 2, 23
AMGM,37
AMGMHM, 18
Jensen's, 38
mediant fractions, 3
triangle, 192
Information Theory, 136, 139
integer triangles, 2
integral, 72, 188
definite, 68
finite, 110
integral operator, 110
intermediate value theorem, 188
interval, 134
irrational number, 28
isometry,54
isoperimetric inequality, 36
Jensen's inequality, 38, 142
Joint Mathematics Meetings, 140
Jones, James P., 160
Jordan curve theorem, 45, 188
Kemnitz, Amfried, 48
Knuth, Donald, II, 170, 172
Kummer surface, 49
Kummer, Ernst Eduard, 49, 155
Lagrange's interpolation formula, 46
Lagrange's theorem, 95, 188
Lagrange, JosephLouis, 46
lattice point, 132, 188
lattice theory, 134
Laurent series, 127
Laurent, Pierre Alphonse, 127
law of cosines, 47, 64, 188
law of sines, 189
least common multiple, 189
I'Hopital's rule, 141,142,189
line, 32,118
linear elastic collision, 104
linear recurrence relation, 167
lines, perpendicular, 53
linked lists, 172
locus, 53
Lucas number, 91, 123
Lucas, Edouard, 162
lune,23
LUX method, 98
magic square, 96
Martin, Gary, 100
matches, 79
mathematical induction, 39
mathematical notation, 69
Matiyasevich, Yuri, 162
matrix, 44, 110, 143, 153
binary, 170
determinant of, 44, 143
eigenvalue of, 177
eigenvector of, 177
invertible, 94, 151
nonsingular, 174
orthogonal, 56
permutation, III
rotation, 50
symmetric, 176
matrix group, 149
McDaniel, Wayne, 157
mean
arithmetic, 18, 183
geometric, 18, 183
harmonic, 18, 183
median, 192
mediant fraction, 3
Michigan, University of, 102
Mobius, 147
Mobius inversion, 147
modulo 2, 46
multinomial coefficient, 189
multinomial theorem, 112,189
Napoleon's theorem, 49
necklace, 96
Nelson, Roger B., 5
Newton's identities, 32
Newton, Isaac, 61
Index
N is a Number: A Portrait of Paul Erdos (film),
93
Niven, Ivan, 73
nonselfintersecting, 130
number
algebraic, 190
Catalan, 143
complex, 31, 51,146
composite, 190
Fibonacci, 12, 122, 156, 161, 186
irrational, 9, 28, 29, 189
Lucas, 123
Index
prime, 10, 159, 190
rational, 9, 99, 189
sequence, 186
square, II, 12, 83, 132
transcendental, 190
triangular, 83
number theory, 46, 69, 84, 93
octahedron, 27
Oddball,113
odometer, 109
operator
derivative, 74, 110
identity, 74
integral, 110
orbit, 179
Oresme, Nicole, 67
orthocenter, 192
parabola, 54,61, 184
parallelogram, 20, 23, 57, 62, 64, 91, 130
area of, 183
Varignon,20
parallelogram law, 57
parameterization, 10
parity, 45, 115
partial fractions, 126, 166
partial order, 134
particleparticle collisions, 103
partition, 19
Pascal's identity, 190
Pascal's triangle, 12,93, 157, 190
path,143
shortest, 32
Pell equation, 84
Pell,John,84
pentagon, 129, 130
pentagram, 129
period, 167
permutation, 75, 100, 108, 180
cycle notation, 81
cycle type of, 81
random, 81
Perrin's sequence, 162
Perrin, R., 162
Petersen, Julius, 178
Jr, 70, 72
pigeonhole principle, 134, 190
plane, 107
pointslope formula, 46
points
at unit distance, 131
inRd, 131
pole, 158
P6lya, George, 180
polygon, 129
selfintersecting, 130
polynomial, 6, 46, 161, 190
cyclotomic, 146
elementary symmetric, 30, 31
flat, 148
irreducible, 118
monic, 146
quintic, 65
polyominoes, 102
power mean, 18
power series, 69, III, 187
power set, 190
prime number, 10,12,159,190
203
principle of inclusion and exclusion, 80, 191
probabilistic method, 168
probability, 81, 82
projection, 70
proof by contradiction, 73
The Proof (film), 72
Ptolemy's theorem, 48,191
Puiseux's theorem, 126
Puiseux, Victor, 126
Pythagorean theorem, 20, 24, 34, 191
quadratic equation, 191
quadratic formula, 22, 126, 132, 191
quadratic residue tournament, 168
quadrilateral, 19, 130
cyclic, 191
random variable, 75
binomial, 135
random walk, 79
rational root theorem, 191
rational solution, 9
real numbers, 100
rectangle, 36, 62, 63, 69
recurrence relation, 83, 122, 145
linear, 90, 167
palindromic, 167
recursion, 88
reflection, 54
relativity theory, 93
Riordan, John, 92
rotation, 54
rotation matrix, 50
rotation operator, 57
salt water, 3
scalar, 192
204
Schoenberg, Isaac Jacob, 133
Schur's estimate, 19
Schur, Issai, 19
Selfridge, John, 116
serniperimeter, 192
sequence, 122
Vfinite, 127
Alcuin's, 165, 167
Fibonacci, 12, 156
Perrin's, 162
series, 191
arithmetic, 191
geometric, 16, 191
SET game, 172
Shannon's First Theorem, 137
Shannon's Second Theorem, 140
Shannon, Claude, 137
simplex, 131
Simpson's Paradox, 3
Sinden, F. W., 130
sine curve, 69
Singh, Simon, 72
Singleton, Robert, 178
Sirotta, Milton, 87
Sloane, Neil J. A., 12
solid of revolution, 63
spectral theorem, 177
Sperner's lemma, 120
Sperner, Emanuel, 120
sphere, 52
unit, 70
volume of, 192
spline method, 133
square, 8, 25, 62, 83
area of, 183
unit, 26
square root, 8, 89
Stanley, Richard, III
Stevens, W. L., 80
Stirling's approximation, 135, 191
subcommittee identity, 93
subset, II
Sudoku,169
sum
harmonic, 67
infinite, 69
surface, 52
irrational, 49
Kummer, 49
quartic, 49
tertrahedroid, 49
surface area, 35
symmetric group, 28
symmetric point, 32
symmetry,35,59,68, 154, 178, 181
circular, 96
symmetry group, 27
system of distinct representatives, 175
Szekeres, George, 93
tangent line, 53
TaniyamaShimura conjecture, 72
tessellation, 62
tetrahedroid, 49
tetrahedron, 27, 28, 63
regular, 131
volume of, 192
Index
The OnLine Encyclopedia of Integer Sequences,
12, 125
tictactoe, 102, 115
tie series, 78
tiling, 58, 154
torus, 51
tournament, 167, 192
Tower of Hanoi puzzle, 143
train, 15
transformation
isometry, 54
orthogonal linear, 55
similarity, 131
translation, 54
transvection, 153
transversal, 174
triangle, 2,20, 23, 33, 37, 58, 60, 62,67, 83,
120, 154, 165, 192
altitude of, 192
area of, 60, 183
circumcircle of, 48
equilateral, 26, 46, 49, 62,131
inradius of, 34, 60
isosceles, 61
perimeter of, 60
right, 20
serniperimeter of, 60
spherical, 71
triangle group, 154
triangle inequality, 23,165,192
triangle, "centers" of, 192
triangular wave function, 103
trigonometry, 29, 84
Twin Prime Conjecture, 155
Van Schooten, Franz, 61
Varignon parallelogram, 20
Varignon, Pierre, 20
vector, 20, 192
Index
dot product, 55
vector space, 192
basis for, 94, 174
Venn diagram, 191
volume, 27, 35, 63,192
of cone, 64
of regular simplex, 133
of tetrahedron, 27
von Neumann, John, 16
waiting time, 76
WallaceBolyaiGerwien theorem, 62
wallpaper pattern, 50
Wiles, Andrew, 72
William Lowell Putnam Mathematical Compe
tition, 99, 141
Yaglom, I. M., 33
zigzag sequence, 167
Ziv, A., 112
205
About the Author
Martin Erickson is Professor of Mathematics at Truman State University. He received
his PhD at University of Michigan in 1987. He has authored three mathematics textbooks:
Introduction to Number Theory (with Anthony Vazzana; Chapman & Hall), Introduction
to Combinatorics (Wiley), and Principles of Mathematical Problem Solving (with Joe
Flowers; PrenticeHall). Professor Erickson is a member of both the American Mathe
matical Society and the Mathematical Association of America.
207
Aha! Solutions
© 2009 by The Mathematical Association of America (Incorporated)
Library of Congress Catalog Card Number 2008938665
ISBN: 9780883858295
Printed in the United States of America Current Printing (last digit):
10 9 8 7 6 5 4 3 2 1
Aha! Solutions
Martin Erickson
Truman State University
Published and Distributed by Mathematical Association of America
Chair Problem Books Editorial Board Richard A. Gillman Editor Roger Nelsen Mark Saul Tatiana Shubin .Council on Publications Paul Zorn.
Aha! Solutions. Marcin E. Klosinski. Alexanderson. Kedlaya. Reiter The Contest Problem Book Vlll: American Mathematics Competitions (AMC 10). Ravi Vakil USA and International Mathematical Olympiads 2000. and George Lee. compiled and edited by J. edited by Rick Gillman The Inquisitive Problem Solver. and Commentary. compiled and edited by David Wells & J. edited by Titu Andreescu and Zuming Feng Mathematical Olympiads 19992000: Problems and Solutions From Around the World. edited by Titu Andreescu and Zuming Feng USA and International Mathematical Olympiads 2002. books on the art and practice of problem solving. Guy. A. Kelly The William Lowell Putnam Mathematical Competition Problems and Solutions: 19651984. Gerald L. DC 200901112 fax: 13012069789 18003311622 . M. etc. compilations of problems (including unsolved problems) specific to particular branches of mathematics. edited by Titu Andreescu. edited by Titu Andreescu and Zuming Feng Mathematical Olympiads 20002001: Problems and Solutions From Around the World. Richard K. Bjorn Poonen. compiled and augmented by Harold B. edited by Titu Andreescu. R. Douglas Faires & David Wells The Contest Problem Book IX: American Mathematics Competitions (AMC 12). M. Larson The William Lowell Putnam Mathematical Competition 19852000: Problems. Douglas Faires A Friendly Mathematics Competition: 35 Years of Teamwork in Indiana.20002007. and PoShen Loh MAA Service Center P. Jr. 19952000 Contests. Paul Vaderlind. Zuming Feng. Kuczma Mathematical Olympiads 19981999: Problems and Solutions From Around the World. Larson International Mathematical Olympiads 19861999. Problemsfrom Murray Klamkin: The Canadian Collection. Gleason. L. O. edited by Titu Andreescu and Zuming Feng USA and International Mathematical Olympiads 2001. Kiran S. and Loren C. edited by Andy Liu and Bruce Shawyer The William Lowell Putnam Mathematical Competition Problems and Solutions: 19381964. edited by Titu Andreescu and Zuming Feng USA and International Mathematical Olympiads 2004. and Loren C. Leonard F. Solutions. Greenwood. E. Martin Erickson The Contest Problem Book VII: American Mathematics Competitions. 20002007.MAA PROBLEM BOOKS SERIES Problem Books is a series of the Mathematical Association of America consisting of collections of problems and solutions from annual mathematical competitions. Zuming Feng. edited by Titu Andreescu and Zuming Feng USA and International Mathematical Olympiads 2003. Box 91112 Washington.
To Martin Gardner and Ross Honsberger whose mathematical exposition inspires so many .
the teacher of mathematics. 1 take to heart the poet Horace's decree that writing should delight and instruct. And such a hook is appropriate. elegant solutions to seemingly difficult problems. Aha! solutions are surprising. Such happy resolutions are called "aha! solutions. stunning. A few solutions require the use of a computer. Some of the problems 1 created. One of the best ways to capture the imagination of young people and get them interested in mathematics is by "hooking them" on irresistible problems. amateur. An important feature of the book is the bonus discussion of related mathematics that follows the solution of each problem. sometimes it is what we discover and create in our everyday mathematical lives. calculus. Thanks to the following people who have provided suggestions for this book: Robert Cacioppo. algebra. and professional alike) thrills to find simple. The problems are at the level of the college mathematics student. The problems start out easy and generally get more difficult as you progress through the book. David vii . For this collection." a phrase popularized by mathematics and science writer Martin Gardner in his books Aha! Gotcha and Aha! Insight. This book is a collection of problems whose aha! solutions 1 enjoy and hope you will enjoy too.Preface Every mathematician (beginner. 1 have selected one hundred problems in the areas of arithmetic. Martin Gardner. Christine Erickson. This material is there to entertain and inform you or point you to new questions. the "math fan. but there should be something of interest for the high school student. geometry. and scintillating: they reveal the beauty of mathematics." and anyone else who loves mathematical challenges. probability. 1 was inspired by the works of Martin Gardner and mathematics expositor Ross Honsberger (I still am today). Sometimes the problem solving is at an advanced level. Suren Fernando. So 1 hope that you have fun with these problems and learn some new mathematics. and combinatorics. As a student first learning mathematics. others are old but deserve to be better known. If you don't remember a mathematical definition or concept. number theory. Robert Dobrow. there is a Toolkit in the back of the book that will help. Perhaps you will have the satisfaction of discovering aha! solutions of your own. since a great part of mathematical study and investigation consists of problem solving.
Daniel Jordan. Joe Hemmeter. and Anthony Vazzana. viii . Ross Honsberger. Ken Price. Khang Tran.Garth.
. . ..Contents Preface Elementary Problems 1. Irrati onal <P . Downhill . . Building Blocks . .. Tangent of a Sum . . . 1. A Geometric Inequality A Packing Problem .3 Geometry .. .. . Train .1 Arithmetic . . Volume of a Tetrahedron . .. . . . Fair Division . A Mere Fraction A Long Sum .. . What's the Next Term? 1.2 Algebra . . . . A Quadrilateral from a Quadrilateral The Pythagorean Theorem . Sums of Consecutive Integers Pluses and Minuses Which is Greater? Cut Down to Size Ordered Digits .. . How Does She Know? . vii 2 4 5 7 8 10 11 12 13 13 14 15 17 18 19 19 20 22 23 25 26 27 28 29 ix .. .. . How Cold Was It? Man vs. . . . . What's the Area? . . How Many Solutions? .... Uphill. . ..
Strips of Carpeting . A Problem of 2's . . A Graph on a Doughnut .5 Number Theory . Demanding a Polynomial 2. . The Average Number of Spots.41 41 41 43 44 46 46 46 49 51 53 54 56 58 60 62 63 67 67 68 69 70 71 72 74 74 75 76 80 80 83 83 84 85 86 87 88 90 . . What's the Side Length? . . An Odd Determinant.000 . . . Is it O? . . Square Triangular Numbers Foxy Factorial .3 Calculus . . . 32 32 33 35 36 37 2 Intermediate Problems 2. . .4 No Calculus Needed A Zigzag Path .1 Algebra. . A Problem of l's . Three Sines. . . Euler's Sum . 'Round and 'Round . . . . Pi is Pi . . Random Points on a Circle The Gobbling Algorithm 2. . . . . . . Napoleon's Theorem . . . . . A Problem of3's . .000. . 2. . Points Around an Ellipse Three Fixed Points . .4 Probability . The Harmonic Series. . . . . How Many Birthdays? . . . . . . . A Stack of Circles A Farmer's Field . . Revolving Credit. . . . . Fibonacci Squared x . . Balls Left in an Urn . . . Passing Time . . . . Always Composite . . Sums to 1. . Reflections and Rotations Cutting and Pasting Triangles Cookie Cutting. . A Quick Integral . . . . 2. .1.2 Geometry. CompostingA Hot Topic? ..
. A Fibonacci Number Producing Polynomial Perrin's Sequence 3. . A Game for Noncommunicating Mathematicians . All Things Being Equal 2. . Sudoku Solving · . .. · . ..3 Algebra . . .. 3. . SelfIntersecting Polygons.000.. . . . . . . . . Regular Simplices . How Many Matrices? Lots of Permutations . Exact Covering Systems .. Even Steven and Oddball HigherDimensional TicTacToe The Spice of Life Sperner's Lemma An Infinite Series Change for a Dollar RookPaths . Packing Animals in a Box Linear Bumper Cars .2 Probability ... . . TopsyTurvy Tournaments . Odd Binomial Coefficients Fibonacci Factors . . .. . 129 129 129 131 134 135 135 138 140 143 143 146 148 154 154 156 158 160 162 165 165 167 169 xi . .. .. A Broken Odometer . ..4 Number Theory · .. 93 93 96 99 100 100 101 103 106 107 108 109 110 III Il3 115 117 120 122 123 124 3 Advanced Problems 3.. . ..1 Geometry . . . .. 3. . . . ..D? ... ..6 Combinatorics . Magic Squares . ... . . . . . Lines Dividing the Plane . . A Number that Counts . . .A Delight from Pascal's Triangle An Unobvious Integer . n 2 + I Closed Intervals 3. . .. Now I Know My ABC's . 168 Elements... 1. I Scream Aha! .5 Combinatorics . .. Bits of Luck .000 Coin Flips . An Integer Matrix with Determinant I Only I. . . Integer Triangles .. . I... . . . . . . ..
. . . . . . . . . . . . . . . . . . . . .The SET Game. . . . . . . . . .. . . . . . . . . . . . . . Girth Five Graphs . . . . . Unlabeled Graphs . . 172 175 178 A Toolkit B list of Bonuses Bibliography Index About the Author 183 I 93 197 199 207 xii . . .. . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . .
The challenges become gradually more difficult as you go through the book. who starts with nine cookies and sells one to Carly. Thus Abby. . Each girl eats eight cookies. even if you already know the answers. each problem has an aha! solution. who has no cookies. Remember. because you may discover new and interesting aspects of the solutions. Betty says that she and Abby should divide the 24 cents evenly. as well as your own creative thinking. 1 I.I Arithmetic Fair Division Abby has fifteen cookies and Betty has nine cookies. each cookie is worth 3 cents. Abby says that since she supplied fifteen cookies and Betty only nine. should receive 21 cents. Since Carly pays 24 cents for eight cookies. pays Abby and Betty 24 cents to share their cookies. Knowledge of basic arithmetic. What is the fair division of the 24 cents between Abby and Betty? Solution The key is to determine the worth of one cookie. and geometry will be helpful. who starts with fifteen cookies and sells seven to Carly. she should take 15 cents and Betty 9 cents.Elementary Problems Let's begin with some relatively easy problems. A bonus after each solution discusses a related mathematical topic. Each girl eats onethird of the cookies. The problems in this chapter can be solved without advanced mathematics. should receive 3 cents. and Betty. algebra. each taking 12 cents. Carly. I recommend that you attempt all the problems.
the side lengths equal the number of full cookie jars for each girl in the corresponding cookie jar solution. as shown below. How can they do this without opening the jars? There are two different ways. and early have 21 cookie jars (all the same size). we have. Betty. seven are halffull. (b) Find an integral fraction between 7/10 and 5/7 such that the denominator is a positive integer less than 20. the halffull ones by H. The girls wish to divide the cookie jars among themselves so that each girl gets the same number of jars and the same amount of cookies. Abby Betty early FFFHEEE FFFHEEE FHHHHHE Abby Betty early FFHHHEE FFHHHEE FFFHEEE We have designated the full cookie jars by F. upon taking reciprocals. . as shown below. As we will see later (in "Integer Triangles" on p.since 2 x 3 < 7 x 1. Solution (a) Since 3< 3t < 4. In a given triangle. each girl receives seven jars and jars' worth of cookies.< . the inequalities 4 <"7 < 3· 121 We doublecheck. and the empty ones by E. each solution corresponds to a triangle with integer sides and perimeter 7. 3t ~1 3 2 2 3 A Mere Fraction (a) Find an integral fraction between 1/4 and 1/3 such that the denominator is a positive integer less than 10. In both solutions. and seven are empty. 7 3 One can check by exhaustion that 2/7 is the only solution. by crossmultiplication: .<  1 2 4 7 since 1x 7 < 4x 2 and 2 1 .2 I Elementary Problems Bonus: Cookie Jar Division Abby. 165). We have not counted as different the same solution with the girls' names permuted. Seven are full.
Suppose that the first solution is less salty than the second.I. and the mediant fraction of7 /10 and 5/7 is 12/17. Thus. the new solution is saltier than the first solution and less salty than the second. then a b< a +c b+d c <d' I encourage the reader to prove these inequalities using crossmultiplication. Here is an aha! proof of the mediant fraction inequalities. and the second with c teaspoons of salt in d gallons of water. I Arithmetic 3 (b) Notice that the fraction found in (a) can be obtained by adding the numerators and denominators of 1/4 and 1/3: 2 1+ 1 = 4+3 7 Would the same trick work for 7/10 and 5/7? Let's try the plausible answer 7+5 10 + 7 We verify the inequalities 12 17 7 12 5 <<10 17 7 by crossmultiplication: 7 12 . .since 12 x 7 < 17 x 5. i. a/ b < c / d. we will interpret the fractions as concentrations of salt in water.< 10 17 and since 7 x 17 < 10 x 12 12 5 . That is to say. so that the salinity of the new solution is (a + c)/ (b + d) teaspoons/gallon. a a +c c <<b b+d d" Our proof can truly be called a saline solution! I Mediant fractions arise in the study of Farey sequences and in the "solution" of Simpson's Paradox. while the concentration of salt in the second solution is c / d teaspoons/gallon. if we combine the two solutions. c and d are all positive.e. Certainly. Bonus: Mediant Fractions The answers to (a) and (b) are called mediantfractions. b. the first with a teaspoons of salt in b gallons of water. If a/b < c/d (with band d positive).. Assuming that a.< . the mediant fraction of 1/4 and 1/3 is 2/7. Now. 17 7 One can check by exhaustion that 12/17 is the only solution. The concentration of salt in the first solution is a/b teaspoons/gallon. we obtain a solution with a + c teaspoons of salt in b + d gallons of water. Suppose that we have two solutions of salt water.! The mediant fraction of a/b and c/d is (a + c)/(b + d).
50 and 51.. nl2 and nl2 + 1.1. we could laboriously add up the numbers.2.2) + + + + n. What if n is odd? We can no longer pair all the numbers (as the middle term has no mate). Solution Observe that the numbers may be paired as follows: 1 and 100. each adding up to n. Let S be the sum. We pair the numbers as before: 1 and n. 2 and n . each pair adding up to 101.2.1)/2 and (n .. so our sum is 50 x 101 = 5050..1)/2 + 1. . We have nl2 pairs. each adding up to n + 1. where n is an even number. This solution works in general for the sum 1 + 2 + 3 + . so our sum is nl2 x (n + 1) = n(n + 1)/2. a simple calculation that immediately gives the answer and insight into the problem. We have 50 pairs. + n. However. 3 andn . A "duplication method" works for both n even and n odd. written backwards: S S = = n + + 2 (n . But we seek instead an aha! solution. We have (n + 1)/2 pairs. 2 andn . throwing in a 0 doesn't change the total: 0+ 1 + 2 + 3 + . 3 and 98.. 1 +2+3+···+ 100? Of course. and they may be paired as o andn. (n .1) + + 3 (n . 2 and 99. + n. and introduce a duplicate of S. 1. so our sum is n(n + 1)/2 (again). 1 and n .1.4 I Elementary Problems A long Sum What is the sum ofthe first 100 integers. Now we have an even number of terms.
However. is said to have solved our problem for n = 100 when he was a 10yearold school pupil.1 Arithmetic 5 Add the two expressions for S.. + (n + 1). What is the pattern and why does it work?2 2Roger B. T. and a given number of terms (here 100) are to be added. (The term n + 1 occurs n times. . summing the first terms. 81297 + 81495 + 81693 + . We can evaluate the sum using our formula for the sum of the first n integers. one of the greatest mathematicians of all time. + 99) = 8129700 + 198 x = 9109800.. where the step from one number to the next is the same all along (here 198).. 2 Bonus: Sum of an Arithmetic Progression Carl Friedrich Gauss (17771855)... Nelsen gives a "proof without words" for this problem in the February 1990 issue of Mathematics Magazine.) This simplifies to 2S = n(n or S = n(n + 1). Bell [2]. + 100899 = 81297 x 100 + 198 x (1 + . The calculation is 81297 + 81495 + .. 99 x 100 2 Sums of Consecutive Integers Behold the identities 1+2=3 4+5+6=7+8 9 + 10 + 11 + 12 = 13 + 14 + 15 16 + 17 + 18 + 19 + 20 = 21 + 22 + 23 + 24 25 + 26 + 27 + 28 + 29 + 30 = 31 + 32 + 33 + 34 + 35 36 + 37 + 38 + 39 + 40 + 41 + 42 = 43 + 44 + 45 + 46 + 47 + 48.1. The problem mentioned by Bell is the sum of an arithmetic progression.. + 100899. according to E. + 1). and so on: 2S = (n + 1) + (n + 1) + (n + 1) + . the problem that Gauss solved was actually more difficult: The problem was of the following sort. then the second terms..
then we obtain all the terms on the right. we simply replace n by n . If we add 4 to each of the first three numbers on the left (9.. 27. Since we want to start at p(I).. then we obtain the three numbers on the right (13. 42. but only the sums: 3. which is the fourth number on the left. creating a sequence of sequences: 3. If we add n + I to each term on the left except the last term.2. There are n + I terms on the left and n terms on the right. . 48. 108. IS. The average of the n left is (n 2 + (n 2 + n»/2. whose values for n = 1. 33. 10.. 14. the polynomial p(n) is defined by multiplying the first column of our array by successive binomial coefficients and adding: This polynomial gives the values of our sequence starting at p(O). . 273. 6. 6. IS. We have added 4 ... 48. and IS). 165. 6. 42. Having obtained a constant sequence.. 75. + (n 2 + n) = (n 2 + n + I) + (n 2 + n + 2) + . 165. .. we stop. 75. 27. Bonus: Finding a Polynomial It's easy to find the sum given by the nth identity. Now. How can we find the polynomial p(n). 27.I to obtain the polynomial p(n) = n(n + 1)(2n + 1)/2. . 12. 90. 21. We repeat this process.3. and II). so the sum is (n + I terms on the + l)(n 2 + (n 2 + 1»/2 = n(n + 1)(2n + 1)/2. Let's suppose that we didn't know this formula.. 108. IS. The nth identity (for n :::: I) is n2 + (n 2 + 1) + . and this is the last term on the left.. are these numbers? The method (from finite difference calculus) is to make a sequence of differences of consecutive values of our starting sequence: 12.. We have added (n + I)n = n 2 + n on the left. 3 = 12 on the left..6 I Elementary Problems Solution Consider the third identity: 9 + 10 + II + 12 = 13 + 14 + IS. + (n 2 + n + n). 273. 90..
1.1 Arithmetic
7
Pluses and Minuses
Evaluate
Solution
Using the formula for the difference of two squares, x 2  y2 = (x expression can be written as
+ y)(x
 y), the
(100 + 99)(100 99) + (98 + 97)(98  97) + (96 + 95)(96  95) + ... + (2 + 1)(2 I).
Since every other term in parentheses is equal to I, this expression simplifies to
100 + 99 + 98 + 97 + 96 + 95 + ... + 2 + l.
In "A Long Sum," we found this sum to be 5050.
Bonus: Curious Identities. 3
Can you explain the pattern for the identities
32 + 42 = 52 102 + 1I 2 + 122 = 13 2 + 142 212 + 222 + 23 2 + 242 = 25 2 + 262 + 272 362 + 37 2 + 38 2 + 392 + 40 2 = 412 + 422 + 43 2 + 44 2 ?
Let's prove the last one in a way that indicates what's going on in general. Transposing all terms on the left except 362 to the right side of the equation yields
Notice that we paired the largest and smallest terms, the secondlargest and secondsmallest, etc. Now, using our difference of squares formula, we have
362 =(41 + 40)(41  40) + (42 + 39)(42  39) + (43 + 38)(43  38) + (44 + 37)(44  37) =81·1 + 81·3 + 81·5 + 81 ·7 =81(1+3+5+7) =81·16.
And certainly, 362 = 92 .42 = 81 . 16. Our computation tells the story in general. For n ::: 1, we claim that
[n(2n +
3 Michael
l)f + ... +
[2n(n + 1)]2 = (2n2 + 2n + 1)2 + ... + (2n2 + 3n)2.
Boardman gives a "proof without words" for this problem in the February 2000 issue of Mathematics
Magazine.
8
I Elementary Problems
Transposing terms as we did in our test case, we obtain
[n(2n
+ 1)]2 =
+ 2n + 1)2  (2n(n + 1»2] + ... + [(2n2 + 3n)2  (n(2n + I) + 1)2] = (4n 2 + 4n + 1)(1 + 3 + 5 + 7 + ... + 2n [(2n2
I).
We need a formula for the sum of the first n odd numbers, I
+ 3 + 5 + 7 + ... + 2n 
1.
Since this is the sum of an arithmetic progression, we could use the method in "A Long Sum." However, by the diagram below, we can see that the sum is equal to n 2 • n
n
Using our formula for the sum of the first n odd numbers, our identity becomes
[n(2n
+ 1)]2 =
(2n
+ 1)2n 2,
which is obviously true. Our identity is verified!
Which is Greater?
Which number is greater, We could compute square roots, but we seek instead an aha! solution that gives the answer immediately.
Solution
The winning idea is to compare the squares of the two numbers (thus eliminating some of the square roots). The larger number has the larger square. The squares of the given numbers are
and
J10t (..rs + .Ji2t
( J6 +
= 6 + 2.J60 + 10 = 16 + 2.J60 = 5 + 2.J60 + 12 = 17 + 2.J60.
The second square is larger. Therefore,
..rs + .JTI is greater than J6 + JTO.
I. 1 Arithmetic
9
Bonus: A Diophantine Equation
The numbers in this problemlet's call the smaller one x and the larger one ysatisfy the equation x 2 + I = y2. This is an example of a Diophantine equation, after the Greek mathematician Diophantus (c. 20Oc. 284). Diophantus called for rational number solutions to such equations. In our problem, x and y are not rational numbers (as their squares are irrational numbers). Let's find all rational solutions to the equation. The graph of the equation is a hyperbola, as shown in the picture.
x
The point (0, I) is on the hyperbola, so we have one rational solution. If (x, y) is another rational solution (where x =1= 0), then the slope of the line through (0, I) and (x, y) is also rational. Let's call this slope m. Thus
m=.
x 0
Solving for y, we obtain y = mx of the hyperbola yields
yI
+ I. Substituting this expression for y into the equation
+
I = (mx
x2
+ 1)2
= m2 x 2 Solving for x we have
+ 2mx + I.
x = 1 ' 2
2m m
and hence
y=
1 m 2
•
10
I Elementary Problems
These equations, where m is a rational number not equal to ± I, are a parameterization of all rational solutions to the equation x 2 + 1 = y2, except for the solution (0, I). For example, if m = 4/11, then (x,y) = (88/105,137/105). The reason that (0,1) isn't included is because it would determine a line with undefined slope. The value m = 0 corresponds to a tangent line to the hyperbola at the point (0, I). Can you see which values of m correspond to the upper and lower branches of the hyperbola?
Cut Down to Size
Find two whole numbers greater than I whose product is 999,991.
Solution
Observe that 999,991 = 1,000,000  9
= 10002
_
32 •
The algebra rule for factoring the difference of two squares comes in handy:
x 2 _ y2 = (x  y)(x
+ y).
Applying the rule with x = 1000 and y = 3, we obtain 999,991
= 10002 
32
= (1000  3)(1000 + 3) = 997 x 1003.
Bonus: Finding the Prime Factorization
We have found two numbers, 997 and 1003, whose product is 999,991. Can these factors be broken down further (i.e., do they have proper divisors?), or are they prime numbers (see Toolkit)? We can divide 997 and 1003 by various other numbers, such as 2, 3, etc., to see if the quotients are integers, but how many trials would we have to make? When testing for proper divisors of n, we need only divide n by prime numbers, because if n has a proper divisor then that divisor has a prime factor. As we test possible divisors, 2, 3, 5, etc., the quotients, n/2, n/3, n/5, etc., become smaller. The "breakeven point" occurs at ..;n, since n/..;n = ..;n. Hence we only need to search for prime divisors up to ..;n. If there are no such divisors, then n is a prime number. As 31 < J997 < 32, the only prime numbers we need to check as possible divisors of 997 are 2,3,5, 7, 11, 13, 17, 19,23,29, and 31. Upon division, we find that none ofthese primes divides 997 evenly, so 997 is a prime number. To factor 1003, we work with the same set of primes, since 31 < J I 003 < 32. Checking these, we hit paydirt with 17 and find that 1003 = 17 x 59, the product of two primes. To verify that 59 is a prime, you need only check that 59 isn't divisible by 2,3,5, or 7, since 7 < J59 < 8. Therefore, the prime factorization of 999,991 is 17 x 59 x 997.
Bonus: Ordered Digits in a Square What square numbers have the property that their digits are in nondecreasing order read lefttoright?Examples: 122 = 144.. the subset {2. . 89. and 2589. n n+l n There are many other infinite families with the desired property.+ 4 . 2.' 9 9 n+l = 4 .I . For example.. You can find videos of the sessions on the Stanford Center for Professional Development web pages (http://scpd .' ' . We will demonstrate that (6 . 3. 1 5 . 5.. 7. 48 . 48 ... so there are 29 . n n+l n For example. 8. '". we have = 4 . n = 9 and we exclude the empty set. 9} yields such a number.' 2n+2 441 9 '"..' '". ' . 4+. the case n Since = I is the statement that 67 2 = 4489... 9} yields the integer 2589." .. . 4+..' '". Donald Knuth attacked this problem in one of his 1985 "Aha sessions. 34)2 = 1 . 6. 56. Let's show the existence of an infinite collection of perfect squares whose digits are in order..+ '". and 83 2 = 6889..' n+l n A similar infinite family is: (3 .. 4...' '". 5. edu/knuth/)." which were classes where he and his students worked on challenging problems... stanford.. '".357.' n:::: l.13 2 = 169. I Arithmetic II Ordered Digits How many positive integers have the property that their digits increase as read lefttoright? Examples: 19. 8.I = 511 such numbers.." . . Solution Each nonempty subset of the set of integers {I. 67)2 = 4 . An nelement set has 2n subsets (including the empty set). 89.' n:::: l. In our problem.' '".. This was found by Anil Gangolli.
3. 48. 4. for n ::: 2. 60. 4.. 36. research _att. 1. 4. (d) The terms are the values of Jl'(n). 8. the number of primes less than or equal to n. A. 1. then the search comes up with sequence A005179 (the smallest number with n divisors).. 21. Sloane (the online address is www. 4. ft = 1. and the search engine will show you sequences that match. 1. 3. 6. 5.. 1.12 I Elementary Problems What's the Next Term? Give the next term in each of the following sequences: (a) 1. 13. 5." presided over by Neil J. 3. 60. 4. 12. n 2 • So the next term is 102 = 100. .. 34. 1. 55. 49. 1. 4. defined by 10 = 0. (b) The terms are those of the famous Fibonacci sequence. (c) The terms are the entries in Pascal's triangle (see Toolkit). Bonus: The Online Encyclopedia of Integer Sequences A good resource for tracking down an integer sequence is ''The OnLine Encyclopedia of Integer Sequences.. 2. 1.. 7. 6. 4. 4. 1. 64.. press enter. . 6. 36. 36. 1. So the next term is the smallest number with 13 positive divisors. Simply type the first terms of a sequence that you are interested in. 2.. 81. {In}. 7. 5. Solution For each sequence. 6. . 48. 2. reading across and down. 1. So the next term is 10. 16. 2. 24. 6. So the next term is Jl'(19) = 8. . (e) The terms are the smallest numbers with n positive divisors. 6. (c) 1. and In = InI + In2. 5. 64. 12. (d) 0. 64. So the next term is 144. 24. 1024. (a) The terms are the square numbers. 6. 1024. 16. 1. 16. comrnjas/ sequences/). 2. 2. 3. 89. (b) 0.. This number is 212 = 4096.. 1. 25. 4. (e) 1. . . try to relate the numbers to a pattern that you have seen before. if we enter the terms from (e) above. 9. 1. For example.. 3.
Thus." the number that you are pointing to is equal to 20 minus your count. and 13 is not a number on the clock. For example. then the 11. So when your friend says "stop." the number you are pointing to is the number she chose. double the result.7 = 13. then the 10. Bonus: Clock Magic Ask a friend to think of any number on a clock (a clock with twelve numbers) without revealing the number. until your friend says "stop. Then the steps can be written algebraically as: choose a number add 7 double the result subtract 8 divide by 2 subtract the original number x x+7 2(x + 7) = 2x + 14 2x + 14 . we are simply saying 2(x + 7) 2 8_ x . 9+ 11. subtract the original number." After the first seven numbers.7 = 13). She then gives her daughter the following directions: add 7 to the number. and so on.2 Algebra 13 1. 8 + 12. She tells her daughter that the final result is 3. if your friend is thinking of 7:00. regardless of x.) Then you point to the 12. 10 + 10). going backwards around the clock.13 = 7.8 = 2x + 6 (2x + 6)/2 = x + 3 x + 3 . she should say "stop. your count plus the number that you are currently pointing to always add up to 20 (e. you begin by pointing to seven numbers on the clock at random. and the last number that you point to will be 20 .x = 3. Tell her that you are going to point to different numbers on the clock while she silently counts up to 20." You can arrange it so that when she says "stop.3  .2 Algebra How Does She Know? A mother asks her daughter to choose a number between 1 to 10 but not reveal the number.g. starting with her secret number and adding 1 every time you point to a number. then you will point to thirteen numbers altogether (20 . How does the mother know this? Solution Suppose that the daughter chooses the number x (which can be any number). divide by 2. . When she reaches 20. and this is the number that your friend started her count with.1.. How do you do this? Keeping a silent count. (Your friend cannot have said "stop" already because 20 . the initial number x has disappeared from the computation and the final result is 3. As an algebraic identity. subtract 8.
the Fahrenheit reading changes by more than the Centigrade reading. Hence.14 I Elementary Problems In algebraic terms. The answer is unique since as the temperature moves away from 40 0 . let f p = friend's number. Therefore. Hence. As shown in the table below. C water freezes water boils F We observe from the table that a change in temperature of 1000 C is equivalent to a change in temperature of 1800 F. How cold was it? Solution We seek a number of degrees that represents the same temperature in Centigrade and Fahrenheit. y = your count. when your friend says "stop. . they change with each step of the count. Note that y and p are not constants." f = 20 y = p. water freezes at 0 0 C and 32 0 F. We always have p=20y. So a change in temperature of 100 C is equivalent to a change in temperature of 18 0 F. 300 C = 220 F 400 C = 400 F. 400 represents the same temperature in Centigrade and Fahrenheit. and it boils at 100 0 C and 212 0 F. How Cold Was It? It was so cold that Fahrenheit equaled Centigrade. = number you are pointing to (after the first seven). We can solve this problem if we know the freezing temperature and the boiling temperature of water in both Centigrade (C) and Fahrenheit (P).
Train A man is crossing a train trestle on foot. For example. . He realizes that he has just enough time to run toward the train and get off the trestle or to run away from the train and get off the trestle. the average normal human body temperature is about 37° C. 4The Centigrade temperature scale was invented in 1742 by the astronomer Anders Celsius (17011744).1. 4 The proportional change of temperature found in the Solution may be written (f . The man can meet the train at the near end after running 3/7 of the length of the trestle. When he is 4/7 of the way across he sees a train corning toward him headon. The solution hinges on the fact that the man and train can be together at two points. we obtain the linear relation = (9/5)cO + 32° = r. then the train will be at the near end at the same time as he is 1/7 of the length of the trestle from the far end. If instead he runs this same distance toward the far end. Let's distinguish between the near end and the far end of the trestle. the train goes 7 times faster than he does. rates. Man vs.2 Algebra 15 Bonus: Centigrade to Fahrenheit Let's find the conversion formula from c degrees Centigrade to f degrees Fahrenheit. so this is (9/5)37° + 32° = 99° F (to two significant digits). A simple solution obviates the need for complicated calculations. how fast is the train going? _ /\ E 417 f 317 l\ ++_ _ _ /&El L 417 Solution It's easy to get bogged down with formulas involving distances.32t 100° 180° Upon simplification. Since he can meet the train at the far end. The Fahrenheit scale was invented around 1724 by the physicist Daniel Fahrenheit (16861736). If the man can run 20 kilometers per hour. or 140 kilometers per hour. etc.
I 6 5 I 3 = .1/5 2 .x (the same answer as before). after 4/5 of a minute. 5 John von Neumann (19031957) made contributions in several areas of mathematics. we have a similar version of the original problem. (Flies don't really fly this fast. (We need these bounds on r so that the series converges. where r is a real number with I < r < I. lr Letting r = 1/5. This pattern continues.2 x 4/5 = 2/5 miles. or 1/5 of the original distance. apart.miles I . or S(lr) = 1. it travels 1. and so on.16 I Elementary Problems Bonus: Sum of a Geometric Series Speaking of trains and simple solutions. The quick way is to realize that the trains crash in I minute (since they start 2 miles apart and are traveling at the rate of 1 mile per minute). The methodical way to solve the problem is to sum an infinite geometric series. Since the fly travels at the rate of 1.5 miles in this time. the sum of which is the total distance the fly travels: Let's find the sum of the infinite geometric series S = I + r + r2 + r3 + . . more on this in a moment. a fly leaves the front of one train and travels at 90 miles per hour to the front of the other train. including computer science and game theory. we obtain Subtracting the second equation from the first yields SSr=l. back and forth until the two trains crash.) Multiplying by r. we complete our calculation of the distance traveled by the fly: .. but with the trains 2 . the story goes that John von Neumann5 was asked a problem of the following type: Two trains are headed toward each other on the same track. each traveling at 60 miles per hour.5 miles per minute. Therefore.) Then it travels back to the first train. and so S=. When they are 2 miles apart.. forming an infinite geometric series of distances. since in this time the oncoming train travels 4/5 of a mile and the fly travels 6/5 of a mile. The fly completes the first step of its journey (traveling from one train to the other) in 4/5 of a minute. How far does the fly travel? There is a quick way and a methodical way to solve this problem.
the sum of the finite geometric series tends to 1/( I . We see in the picture below that a rectangle of dimensions I x 2 is completely filled by smaller rectangles whose areas are the geometrically decreasing terms of the series. In this sense. + r n . so the questioner said that he surely must have calculated the time the fly travels (our first method).2 Algebra 17 Von Neumann gave the correct answer instantly.r). This yields 1.. and solve for S. By the way. 2 I I I I p: 1/4 1/8 I 112 Uphill.1. we say that the infinite series converges (and the sum is given by our formula). you might think that the answer is the simple average of 30 kmlhr and 90 kmlhr. then the term rn+I gets closer to 0 as n gets larger. s = I + r + r2 + r3 + . .. 1++++···= =2 2 4 8 11/2 is particularly memorable. Hence. Von Neumann replied that. multiply S by r.. But this isn't correct since the cyclist spends less time at the faster rate. on the contrary. If I < r < I. where r is any real number not equal to I.r n + 1 S=Ir The convergence of the infinite geometric series is based on what happens to the finite geometric series as n increases. i. The sum with r = 1/2. we can also obtain the sum of a finite geometric series. What is the cyclist's average speed for the trip? Solution At first. Downhill A bicyclist goes up a hill at 30 kmlhr and down the same hill at 90 kmlhr. which is our formula for the sum of the infinite geometric series.e. As before. i.e. take the difference of the two equations. as n tends to infinity.. 60 kmlhr. he had summed the series.
There is equality in the means if and only if all the Xi are equal. namely.. If that's true. and M 0. then we can set the length of the hill to a convenient value. How Many Solutions? How many solutions has the equation X + 2y + 4z = 100. namely. y. Hence.18 I Elementary Problems A quick way to find the average speed is to assume that the answer is independent of the length of the hill. on average. Xn and any real number p. all integers from 0 to 25. For XI. So the average speed is 180 km /4 hr = 45 kmlhr. there are 26 choices for y. In this equation. altogether there are 26 2 = 676 solutions to the original equation.. respectively. . and harmonic mean (HM). . the harmonic mean is less than the arithmetic mean of the two rates (see the Bonus). the average speed is 2d I 2 30 + 90 I = 45 kmlhr.( XI X 2·· . 90 km. As we have seen. these means are the arithmetic mean (AM). the average value of 4z is 50. For p = 1. where X. X2. 0. Hence. Among these choices. . geometric mean (GM). and z are nonnegative integers? Solution There are 26 choices for z. X + 2y = 50. we define the for p '" 0. Xn fixed and not all equal.. .Xn )I/n . Then the trip takes 3 hours up the hill and I hour down. To doublecheck this. X2. Bonus: Power Means For any n positive real numbers ppower mean by the formula XI. In particular. and 1. The average speed is called the harmonic mean of the two rates.. The value of X is determined by the value of y. say. Then the time going up the hill is d /30 hr and the time going down the hill is d /90 hr. with equality if and only if all the Xi are equal. . So. all integers from 0 to 25. Mp is an increasing function of p. we have the AMGMHM inequalities: HM ::: GM ::: AM. suppose that the length of the hill is d km.
Hence. Prove that the area ofthe quadrilateral EFGH is half the area of ABCD. G. If all the coefficients are I.3 Geometry 19 Bonus: Distributions. we obtain the equation x + 2y + 3z = 100. and Schur's Estimate By changing the coefficients of x. Let a. If a. The number of partitions of n into one part is I. y. which is a partition of 100 into three or fewer parts.1. all more difficult than the one we tackled. B C . and z. respectively. If the coefficients are I. The number of partitions n of n into three parts is {n 2 j12}. respectively. The number of solutions in nonnegative integers is C~2) = 5151 (see "Bonus: The Correct Number of Orders"). The number of partitions of n into two parts is L j2 J. then we have the equation x +y +z = 100. and c are relatively prime integers (they have no factors in common). Let E. y. F. and 3. which is called a distribution. and H be the midpoints of sides A B. . where {} denotes the nearestinteger function. and z. 2. Partitions. and c be the coefficients of x. then the number of nonnegative integer solutions to the equation ax + by + cz = n is approximated by Issai Schur's6 asymptotic estimate n2 2abc' I . C A 61ssai Schur (18751941) was a mathematician who worked primarily in algebra. we obtain many variations of our problem. and DA. the number of partitions of 100 into three or fewer parts is I + LIOOj2J + {l002jI2} = I + 50 + 833 = 884. b. b. CD.3 Geometry A Quadrilateral from a Quadrilateral Let ABC D be a quadrilateral.
and h. 7 I The Pythagorean Theorem Prove: In any right triangle. the area of the square on the hypotenuse is equal to the sum of the areas of the squares on the other two sides. Similarly. d. It follows that the area of the four triangles AEH. It is called the Varignon parallelogram. the area oftriangles DGH and BEF together is onefourth the area of ABCD. DGH. From the proof. 7Pierre Varignon (16541722) was a mathematical physicist and early advocate of calculus. Hence he="2(db). the areas satisfy the relation I + II = III.) I+II=III III In the diagram. and BEF together is half the area of ABCD. as in the picture (the concave case is similar). Thus. CFG.20 I Elementary Problems Solution Assume that the quadrilateral is convex. This is half of the famous Pythagorean theorem. Bonus: A Vector Proof We give a quick vector proof that the area of triangle AEH is onefourth the area of triangle ABD. . B. then the angle opposite III is a right angle. Therefore. Hence. with a constant of proportionality of onehalf. the area of triangle AEH is onefourth the area of triangle ABD . e. the area of triangles AEH and CFG together is onefourth the area of the quadrilateral ABCD . the area of triangle AEH is onefourth the area of triangle ABD.e is parallel to the vector d . Hence. By a simple theorem of geometry (see Bonus). after Pierre Varignon. (See Toolkit. the vector h . b. as shown by dotted lines. D. Likewise. we see that the quadrilateral EFGH is a parallelogram. Therefore.b and half its length. is half the area of ABCD. the line segment E H is parallel to the line segment BD and half its length. The other half is the converse statement: if I + II = III. and H by vectors a. which is the quadrilateral EFGH. Represent the points A. Note. respectively. It follows that triangle A E H is similar to triangle A B D. the area of the complement of these triangles. Then e = (a + b)/2 and h = (a + d)/2 . E. Add the two construction lines AC and BD. the area of triangle C F G is onefourth the area of triangle C B D.
Nearly 100 proofs of the Pythagorean theorem are presented at "CuttheKnot" (http://www. It requires very little explanation. and hence IABI·IBDI = IBCl 2 • It follows that the two dark gray areas are equal. Similarly. Bonus: A OneTriangle Proof The above proof employs four copies of the given right triangle.1. Extend the line CD so that it meets the square on the hypotenuse at a second point. (See the above figure.) By similar triangles. Let D be the point on AB such that AB and CD are perpendicular. the shaded area consists of the squares on the two legs of the triangle. IABI/IBCI = IBCl/IBDI." .cuttheknot. Adding areas. Clearly.org). Both of the above figures show four copies of the given right triangle.3 Geometry 21 Solution Here is the most visually compelling proofthat I know of. arranged inside a square. Here is a proof that uses only the original right triangle. Let ABC be a right triangle with rightangle C. the shaded area doesn't change when the four triangles are rearranged as in the figure on the right. we can show that the two light gray areas are equal. In this figure.asite "for teachers. we see that the area of the square on the hypotenuse is equal to the sum of the areas of the squares on the other two sides. The shaded area in the figure on the left is the square on the hypotenuse. parents and students who seek engaging mathematics.
" we worked with a sum S written twice.¢ . To solve the present problem. if IBCI = I. Bonus: Another Memorable Triangle What are the proportions of a 36°_72°_72° triangle? In our solution for the 30°_60°_90° triangle.. Hence. The triangle ABC is divided into two smaller triangles. we do the reverse. so that ¢2 .I = O. Now./3. dividing the triangle into two pieces. and so also IABI = 2. IACI = . In the diagram below.j5 + 1)/2. then IBB'I = 2. another 36°_72°_72° triangle and a 36°36°108° triangle. A BB'. is an equilateral triangle (it has three 60° angles). by the Pythagorean theorem. A B B' The larger triangle formed. next to ABC. ¢ is the famous "golden ratio" (more about ¢ in the problem "Irrational ¢"). Let the given triangle be ABC with A = 30°. From the quadratic formula (Toolkit).I). ABC is a 36°_72°_72° triangle with A = B = 72° and C = 36°. Thus. Let IABI = I and IACI = IBCI = ¢. we put two geometric pieces together. we find that ¢ = (. B C . B = 60°.I Elementary Problems Building Blocks What are the proportions of a 30°60°90° triangle? Solution In the solution to "A Long Sum. we put a copy of ABC. As shown in the diagram below.. By similar triangles. and C = 90°. labeled AB'C. ¢ satisfies the relation ¢ /1 = 1/ (¢ . Can we do something similar in this problem? Let's work with two copies of the given triangle.
we saw a solution involving the construction of some additional lines. This construction was discovered by Hippocrates of Chios (c.I . Starting with the diagram below. the problem of "squaring a lune" is possible for certain lunes (a lune is formed by two intersecting circles of different radii). Bonus: A Squarable lune It is impossible to construct a square of the same area as a given circle. show that a +b > 2c. However. 470c. Solution In the previous problem ("Building Blocks").J5 1)/4.3 Geometry We see at once that cos 36° = ifJ/2 = and cos 72° = (ifJ 1)/2 = 23 (. Augment the figure to make a parallelogram with diagonals of lengths 2c and 2d. . using straightedge and compass. so by the triangle inequality. 410 BeE).J5 + 1)/4 (. Two adjacent sides of the parallelogram and the diagonal of length 2c make a triangle. Let's try the same trick here. let's construct a square with the same area as the shaded lune. A Geometric Inequality In the figure below. a + b > 2c.
it follows that the area ofthe two lunes below is equal to the area of the inscribed right triangle. . The shaded semicircle on the hypotenuse may just as well be moved to the upper half of the circle. the area of the semicircle on the hypotenuse of the inscribed right triangle is equal to the sum of the areas of the semicircles on the two sides. In the following diagram. This yields two heavily shaded overlapping areas. shown below. where the area is counted twice.24 I Elementary Problems A number of auxiliary lines and circles are helpful. Subtracting overlapping areas. by the Pythagorean theorem.
as shown in the diagram below. it's easy to square the lune. etc.) at http://www . Solution The packing below of five unit squares in a square of side length 2 + 1/. circles in squares.efriedma/packing. Now.:: 2. stetson. html. the area of one lune is equal to the area of one of the small right triangles. 2+ 1/V2 Erich Friedman shows many packing configurations (squares in squares. edu/ .J2 :::.707 was proved by Frits Gobel to be bestpossible (the large square is as small as possible while still containing five unit squares).I. . A Packing Problem Find a way to pack (without overlap) 5 unit squares inside a square of side length less than 3. 3 Geometry 25 By symmetry.
.) Below is an illustration of the problem where n = 3. What is the area of the black region? (The black triangles form an infinitely nested pattern. I .'T'. . . ' . ' ' ' ' ' ' ~~ ..) Solution Add dotted white lines as in the picture below. . The ten unit squares fail to cover a square of side length greater than 3. 3 +e What's the Area? Suppose that the large triangle below is equilateral with area I. (The perimeter and interior of the given square must be covered.. .. " . . • " " \ .' • .26 I Elementary Problems Bonus: Covering With Unit Squares Here is an unsolved covering problem: Prove that n 2 + I unit squares in a plane cannot cover a square of side length greater than n.: " .
/2 12 Using a similar argument. Solution Place the vertices of the tetrahedron at four vertices of a cube with edge length 1/. edges.Ji/3.1/16 = 5' Volume of a Tetrahedron Find the volume of a regular tetrahedron of edge length I. the area is 3( I I ) 3 I 4 4 I + l6 + 162 + . there are 6 . we see that in the first stage we cover 12/15 = 4/5 of the subtriangles.. So by the formula for the sum of a geometric series (p. and faces of the cube may have changed position.. and the equilateral triangles decrease in area by a factor of 16.3 Geometry 27 There are 16 subtriangles. the black region has area 4/5. If we pick up the cube and set it down again so that it occupies its original space. Omitting the central one. 16). Bonus: Symmetry Groups The way that the tetrahedron is inscribed in the cube above reveals a connection between the symmetry groups of the regular tetrahedron and the cube. Since the pattern repeats. Since we can set the cube down on any of its six faces. we can prove that the volume of a regular octahedron of edge length I is . The symmetry group of the cube is the group of all such ways to reposition the cube.) The volume of the tetrahedron is the volume of the cube minus the volumes of four identical isosceles right tetrahedra that are comers of the cube: .. then the vertices./2. 4 = 24 . = 4 ' 1. Bonus: Calculation by Geometric Series At each stage we cover 3/4 of the equilateral triangle. It's easy to find the order (number of elements) of the symmetry group of the cube.. and once we have done this we can rotate it in any of four ways.1. (These are opposite pairs of vertices on opposite faces of the cube.
However. This group is called the symmetric group of order 4. consisting of "even permutations" in S4. denoted S4. Suppose that ifJ is a rational number. nm m m n Now the relation ifJ = 1/(ifJ . and conversely every possible permutation of the diagonals comes from a symmetry of the cube. In fact.1) that we saw in the "Building Blocks" problem. We will prove by contradiction that ifJ is irrational. we find that the symmetry group of the regular tetrahedron goes along for the ride. the regular tetrahedron has 4·3 = 12 symmetries. We know that the group of permutations on 4 objects has 4! = 24 elements.m). we can show that the symmetry group of a regular octahedron is S4.28 I Elementary Problems symmetries in all. which is clearly impossible. But this process could be repeated forever. or it moves the vertices of the tetrahedron to the other four vertices of the cube. A rectangle with dimensions ifJ x 1 has the property that if a square is removed. is an irrational number. Now that we know the symmetry group of the cube (S4). The definition of ifJ comes from the relation ifJ = 1/(ifJ . say. Show that the golden ratio. It can be shown that this subgroup is the alternating group A 4 . we still need to see which 24element group this is. since . Similarly. How many symmetries of the regular tetrahedron are there? Since we can put the tetrahedron down on any of its four faces and then rotate the tetrahedron in any of three ways. ifJ is equal to a fraction. Irrational Solution fJ (. The symmetries of the tetrahedron comprise a subgroup of S4 of order 12. Every symmetry of the cube permutes (interchanges) the diagonals. To see this. wejust need to find four parts of the cube that are permuted in all possible ways by the symmetries of the cube.1) implies that n m 1 m = nm n/m 1 Hence. where m and n are positive integers. The four diagonals of the cube have this property. Then we can construct such a rectangle with sides m and n (see the diagram). with smaller positive integral numerator and denominator. the group of symmetries of a cube is isomorphic (equivalent) to S4. the remaining rectangle has the same proportions as the original.J5 + 1)/2. Every symmetry of the cube automatically gives a symmetry of the regular tetrahedron (with the tetrahedron inscribed in the cube). ifJ = The golden ratio ifJ is perhaps the irrational number with the simplest proof of irrationality. n / m. m/(n .
/2. These expressions are based on the elementary symmetric .q) q(pq) = p2 . the formula for the tangent of a sum of two angles is tan(A Find a formula fortan(A + B) = tan A + tan B . Bonus: Irrationality of ./2 = !!... Solution We start by finding a formula for the tangent of the sum of three angles. this is impossible.tan(A + B) + tanC + B) tan C tanA+tanB + tan C itan A tan B itan A tan B 1.. C. Then p2 = 2q2.. Tangent of a Sum In trigonometry.pq q(pq) = 2q2  pq q(pq) = q(2q  p) q(pq) = 2q  p./2. Using the formula given for the tangent of the sum of two angles..tan A tan B + B + C + D + E) in terms ofthe tangents of the angles A./2 = p / q.. I . and their quotient is .tan A tan B) tan C 1 .p and p . But this process could be repeated forever. where p and q are positive integers. where 1 ::: k ::: 3. respectively. and tan C. it is irrational. our assumption that ifJ is rational is false..tan A tan B tan C ItanAtanB tanAtanC tanBtanC' Notice that the numerator in this formula contains the sum of tan A./2 is an irrational number.. B. = q p(p . Therefore. we introduce notation for the sum of all products of k tangent terms. here is a proof using an infinite regression argument. we have tan (A + B + C) = ':'_____: tan(A 1 .and E./2 is irrational.. pq Since q < p < 2q.3 Geometry 29 we started with integers m and n. Hence. Therefore . producing smaller and smaller positive integers whose quotient is equal to . while the denominator contains all products of pairs of these terms. Suppose that .1.q < p.(tan A + tan B) tan C tan A + tan B + tan C . we see that 0 < 2q . One wellknown proof involves investigating the parity of the numerator and denominator of a supposed rational representation of . D.P < p and 0 < p . 2q . tan B. Accordingly. and so .( = tanA+tanB ) tanC tan A + tan B + (1 .tan A tan B . we have a pair of positive integers. as well as the product of these terms./2./i There are several proofs that . Clearly.q. By contrast.. which are smaller than p and q.
. B.(S\(A. let Sk stand for sk(tan 01.s2(A. B. E) + s4(A.s3(A. D. D) = tan A tan B + tan A tanC + tan A tan D + tan BtanC + tan B tan D + tan C tan D. E) + s5(A. Thus. s2(A. and of five angles. e. B. .C») tan D IS2(A. C) . B. B. C. C» tan D = = SI (A.C~)~__~____ 1 . E) = tan A tan B tan C tan D + tan A tan B tan C tan E +tanAtanBtanDtanE+tanAtanCtanDtanE + tan B tan C tan D tan E. C) = tan A tan B tan C.B. C) = tan A + tan B + tanC. Then the formula for the tangent of the sum of n angles is tan(OI + . B.S3 1 + S5 S2 + S4  ••• . B.s3(A.B. C. D) + s4(A. C) . D. B.s2(A. C) + tan D . D.s2(A. B.30 I Elementary Problems polynomials (see Bonus). B. 1. e.. C. C) + (1 . B. Given positive integers nand k. B. C.s3(A.s3(A.B.C)S3(A. such that 1 ::: k ::: n. B. E) A pattern is apparent. C) . C. C) . C) ... C.SI (A.. D. B. C) . B. C. D. C. C) tan D 1 . D. B. B.B. tan On).s2(A. B.. C) = tan A tan B + tan A tan C + tan B tanC. C. D) .s2(A. C.C) SI (A. E) . Define sl(A. E) .s3(A. B.s2(A.C)S3(A. s4(A. B. we can write our formula for the tangent of the sum of three angles as (A B t a n + + C) = SI (A. B. C. C) tan D SI (A. B. 1 .B~. C) tan D + s3(A. s3(A.C) + tan D = __~~I~S~2(~A~. s2(A. B. Now we find a formula for the tangent of the sum of four angles: tan(A + B + C) + tan D ( tan A + B + C + D) = 1 _ tan(A + B + C) tan D s) (A. C) . C) We define similar expressions for sums of products of tangents of four angles.s3(A. + On) = SI .(SI (A. ••• . .g.s2(A. D) 1 . B. B. B. the sum of all products of k of the tangents.B. D)' Try to take the next step and deduce the following formula for the tangent of the sum of five angles: (A B C D t a n + + + + E) = SI (A. B.g. B. B. C» tan D 1.
for some m.. each product consists. For example. of 2m terms of the form sin OJ and n . + X n . ••• . multiplied by (_l)m. Bonus: Elementary Symmetric Polynomials The elementary symmetric polynomials of order n. On the right side.I. Upon dividing both sides of the imaginary part of the identity by the identity for COS(OI + ..2m . so that the series in the numerator and denominator are finite. + On). we obtain on the left side i tan(OI + .. of 2m + I terms of the form sin OJ and n . The imaginary part of the left side of the identity is i sin(OI + ... = S2 L l::::. The proof uses complex numbers and Euler's formula cos 0 + i sin 0 = e jo . multiplied by i(l)m. we worked with Xj = tan OJ..n XjXj... we have In our Problem.2m terms of the form cos OJ. The imaginary part of the right side consists of products of an odd number of i sin OJ terms together with a complementary number of cos OJ terms. with n = 3... 3 Geometry 31 where we set Sk = 0 if k > n. X n . are = Xl + X2 + ... + On). we obtain COS(OI + .j<j::::. Hence...I terms of the form cos OJ. + On) = (cos 0 1 + i sin Od .. Let's give an aha! proof of this formula. + On). Sl X2. Hence. we also divide numerator and denominator by cos 0 1 ••• cos On. (cos On + i sin On).•• e jOn .• . each product consists. + On). and hence the identity COS(OI + . The resulting monomials can be grouped together to form all terms of the form i (_l)m S2m+I in the numerator and all terms of the form (l)m S2m in the denominator.. The real part of the left side of this identity is COS(OI + . Setting 0 equal to the sum of our n angles.. Dividing by i establishes the claimed formula. for some m. + On) + i sin(OI + .. + On) = ej(OI +·+On) = e jOI . thus killing off all the cos OJ terms and turning the sin OJ terms into tan OJ terms. The real part of the right side consists of products of an even number of i sin OJ terms (since i 2 = I) together with a complementary number of cos OJ terms. . + On) + i sin(OI + . in the variables Xl.
we have Newton's identities: I:>kPnk(I)k = 0.4 No Calculus Needed A Zigzag Path Two points A and B lie on one side of a line I. Then P3 =xi + X~ + X~ =(Xl +X2 +X3)(X~ +xi+xi) . Let's look at an example. Given any choice of point P on I. the intersection of this line segment with 1 determines the point P such that the path from A to 1 to B is the shortest possible. let B' be the symmetric point to B on the other side of I. the distance from P to B is the same as the distance from P to B'. Hence. k=O n ~ 1. touches I. .(XIX2+X2X3+X3Xl)(Xl +X2+X3) + 3XIX2X3 =SIP2 . We show here Newton's identities relating the elementary symmetric polynomials to the symmetric polynomials that are sums of powers of the variables. Define Po PI P2 P3 = XI o + X2 0 0 + X3 = 3 = XI + X2 + X3 = = XI 222 + X 2 + X3 xi + X~ + X~. and ends at B.32 I Elementary Problems We will see in the Bonus to "Perrin's Sequence" that the elementary symmetric polynomials can be combined to produce any symmetric polynomial. _A B Solution We know that a straight line is the shortest distance between two points. 1.S2Pl + S3PO· In general. Can we use this fact? As in the figure below. The shortest path from A to B' is the straight line segment AB'. with Pk = xf + x~ + . Therefore. + x! and So = n I... Construct the shortest path that starts at A. the length of the path from A to P to B is the same as the length of the path from A to P to B'.
Construct the line from A' to B'. A'e#" . touches [. .' Let A' be the point symmetric to A with respect to [.) . what is the shortest path that starts at A. . I.1. B' . . M. then touches ['.4 No Calculus Needed 33 A B B' Bonus: Another Zigzag Path Given two parallel lines [ and ['. . and ends at B? I'A~L7~B . A Stack of Circles What is the sum of the circumferences of the infinite stack of circles inside the triangle in the picture below? (Each circle is tangent to sides of the triangle and to the circles above or below it. and B' the point symmetric to B with respect to ['. The intersections of this line with [ and [' are the points where the desired path touches the parallel lines. . Yaglom in the books [21] and [22] presents this and other beautiful geometric construction problems. and points A and B between [ and ['.
the sum of the areas of all the circles is 16/3 4 1f ( 10)2 (I+x 2 +x 4 3 +"')=1f (10)2 ( I.34 I Elementary Problems The height of the triangle is 12 (by the Pythagorean theorem). we see that the given triangle is cut into two pieces. we'll use this method for finding the inradius of a triangle in "Cutting and Pasting Triangles.") I I I 1 10 Constructing a tangent line to the largest circle at its top. etc. Therefore.x =1801f . Hence "2 lOr + "2 13r + "2 13r = "2 10 . Hence. (By the way. Hence. Drop altitudes from the center of the largest circle to the three sides of the triangle. Isn't this easier than finding the diameter of each circle. The height of the smaller. the sum of the diameters of the circles is 12. similar triangle is 12 . 12 . The sum of the areas of these smaller triangles is equal to the area of the given triangle.2r = 16/3. thereby dividing the triangle into three smaller triangles. the ratio of the smaller height to the larger one is x=U="9' The secondlargest circle has radius r x. The formula for the circumference of a circle of diameter d is C = 1fd. the sum of the circumferences of all the circles is 121f. and summing the infinite series? Bonus: A Sum of Areas What is the sum of the areas of the circles in the diagram above? This is easy to find using simple geometry and the sum of a geometric series (see p. with the top piece similar to the given triangle. 16). and r = 10/3. applying the circumference formula. 13 . the third largest r x 2 .) 2 3 I. Therefore. The given triangle has height 12. Let r be the radius of the largest circle (see the diagram below).
we can avoid calculus by using symmetry. The ratio of the lateral surface area of the cylinder to the lateral surface area of the box is 2rrrh/8rh = rr/4. the dimensions that yield the maximum area of the field are y = 100 m and x = 200 m. Consider the mirror image of the field with respect to the existing fence. the maximum area of the field occurs when x = 2y. We will show that h = 2r. and the area is xy = 20. One side of the field needs no fencing since it is alongside an already existing fence. Hence. Let the can be inscribed in a rectangular box with dimensions 2r x 2r x h. The ratio of the area of the base of the cylinder to the area of the base of the box is rr r2 / (2r)2 = rr / 4. What is the largest possible area of the field and what dimensions give this area? Solution Let the length of fence parallel to the existing fence be x and the two other lengths be y. Because the field is always half of the area of this larger rectangle. However. x y y y y x The field and its mirror image together make a rectangle of dimensions x x 2 y.1. whatever dimensions maximize the area of the larger rectangle also maximize the area of the field. x It's a common calculus problem to determine the dimensions x and y that yield the maximum area xy. We are given that x + 2y = 300 m. In what proportion are its radius and height so that the can has minimum surface area? Let h be the height of the can and r the radius of its base. Hence.4 No Calculus Needed 35 A Farmer's Field A farmer wishes to fence in a rectangular field using 300 meters of fence.000 m2 • Bonus: A Can of Minimum Surface Area A cylindrical can is to be made to hold a certain volume. Since the rectangle of fixed perimeter with largest area is a square. The perimeter of the larger rectangle is fixed (it is 600 m). the ratio of the total surface area of the can to the total surface area of the box is . The ratio of the area of the top of the cylinder to the area of the top of the box is of course the same. with its base circumscribed in the base of the box.
half of the fencing is used in the set of three parallel pieces and half in the set of two collinear pieces. By the way. as shown in the left diagram below. the square ABeD and the rectangle AEFG are positioned so that they share a vertex A and have parallel corresponding sides. what dimensions yield the maximum area of the bin? Solution Let the segments of fence have lengths x and y. We will show that the square has the greater area. The ratio ofthe volume ofthe can to the volume of the box is rrr2h/(2r)2h = rr/4. Rearrange the segments of fence according to the right diagram above. Given that the total length of fencing is fixed. The fact that these ratios are equal is unimportant. x y x y y x y x x x We seek to maximize the area ofthe rectangle bounded by the E. The area of this rectangle is (3x)(2y). The perimeter of the rectangle is fixed (it is 6x + 4y = 2/). and so x = //6 and y = //4. Hence. The . Since a box of given volume is minimized when the box is a cube. In our case this means that 3x = 2y = //2.36 I Elementary Problems rr/4. the minimum surface area occurs when h = 2r. with three parallel equallength pieces of fence in one direction and two equallength pieces of fence in a line in the perpendicular direction. Therefore. Suppose that we have a square and a rectangle (not a square) of the same perimeter. where / is the amount of fencing available. x(2y). Thus. we can give an aha! proof that the square is the rectangle of fixed perimeter with the greatest area. the values of x and y that maximize the new area are the same as those that maximize the original area. 36). This is called an isoperimetric inequality. but there is a neat solution using only geometric reasoning. subject to the constraint 3x + 2y = /. that is. As in the diagram below. CompostingA Hot Topic? Suppose that a compost bin is to be made so that the structure looks from above like the letter E. The area of a rectangle of fixed perimeter is maximized when the rectangle is a square. You can do it with two applications of the isoperimetric inequality that the rectangle of given perimeter having the greatest area is a square (see p. the surface area of the can is minimized when the surface area of the circumscribing box is minimized. We could solve this problem using calculus. which is three times the area that we started with. the relevant thing is that they are both constants. I leave it to you to prove the fact that a box of given volume and minimum surface area is a cube.
where A. Solution We are given that A. It follows that the unshaded area in the square is greater than the unshaded area in the rectangle (since ICDI > IEFI). Two steps make finding the maximum value simple.b<a+b. Three Sines Find the maximum value of sin A sin B sin C. Second. Let a = IAEI and b = IAGI. Since the perimeters of the square and rectangle are equal. First. (A + B + C) 3 ' with equality if and only if A = B = C = 1f /3. we have sin A + sin B + sin C 3 :5 sm . . by the arithmetic meangeometric mean inequality. 3 1f "3 = T (v'3)3 8' 3v'3 = . IHFI = IBEI = IDGI = ICHI. (A + B+ C) = sm . sin B. 3 =B =C = 1f/3. and sin C are positive. hence sin A.I. Then ab <  (~)2 ' 2 2 or J. D C GrTH~~F A B E Bonus: The AMGM Inequality The arithmetic meangeometric mean (AMGM) inequality (see Toolkit) follows instantly. since sin x is a concave downward function (see Bonus) for 0 < x < 1f.. Equality occurs if and only if a = b. 4 No Calculus Needed 37 rectangle cuts the sides of the square at points G and H. . and C are positive numbers whose sum is 1f. and C are the angles of a triangle.. Therefore. B. sin A sin B sin C :5 ( sin A + sin B + sin C ) 3 3 ' with equality if and only if A = B = C = 1f /3. Therefore sm A sm B smC :5 sm3 with equality if and only if A . B. The rectangle and square have the shaded area in common. the area of ABCD is greater than the area of AEFG.
38 I Elementary Problems Bonus: Convex Functions A realvalued function f is convex on an interval I if f«1 .. f (a + b) 2 < f(a) + f(b) 2 ' with equality if and only if a = b (we'll assume that can use this hypothesis twice: f is not a linear function). + An = I... An are nonnegative real numbers such that Al + . .'.:... f is convex if f lies below its secants. Geometrically speaking. . we can see that f ( at b ) :::: !(a)~ !(b) .:. an E I and AI.. If the function .. Suppose that f is convex on I. 2'_ + !(a3)+ !(a4) 2 ...e.. In the diagram below. as is the case for the sine function in our Problem.A)a + Ab) :::: (1  A)f(a) + Af(b). bEl and 0 :::: A :::: 1. If a I..'!(a d+ !(a2) < _ _2"_ _ _ _. ... Let's prove Jensen's inequality in the case where n = 4 and A = 1/2. . which illustrates the case A = 1/2.. for all a.... Since f is convex (we'll take the interval I for granted). Now we f (a l + a2 : a3 + a4 ) = f (~: ~) 2 f ( at ~a2 ) + f (a3~a4 ) <. a JENSEN'S INEQUALITY. then Equality occurs if and only if all the aj are equal or f is a linear function.. then the inequality is reversed..f is convex (i. f is concave downward).
The general statement of Jensen's inequality Equality occurs if and only if al can be proved similarly or by induction on n. Then (al + a2 + a3 + a4)/4 = (al + a2 + a3)/3.4 No Calculus Needed 39 Our inequality is established. We can use the same procedure to prove Jensen's inequality for n any power of 2. Set a4 = (al + a2 + a3)/3. = = . with equality if and only if al = a2 = a3 = a4. Simplifying. But how do we prove it for.1. and hence ( al + a2 + a 3 ) 3 < !(ad + !(a2) + !(a3) + ! 4 ! (a +al+a l 3 )  . we obtain a2 a3. say n = 3? We use a little technique credited to Augustin Louis Cauchy (17891857).
.
We reckon time in minutes from the top of the hour (12 on the clock). between 5:00 and 6:00. at 15 + t /12 minutes. and hence t = 10 + 10/11. In this chapter. we can expect to use familiar techniques from calculus and other branches of mathematics. we have t = 15 + t /12. Specifically. we obtain t = 10 + t/12. and hence t = 16 + 4/11. too). we realize that in the course of twelve hours the minute hand and hour hand coincide eleven times. In order to delve deeper into this problem. Reflecting on this. between 2:00 and 3:00 (we already figured this one out). correspondingly. As usual. Aha! solutions are to be found! 2. this happens at 12:00.) Solution Let's solve the problem in a mundane way first (before giving an aha! solution). we are looking for illuminating proofs. at some time between 1:00 and 2:00. Using the same reasoning as before. between 41 . between 3:00 and 4:00 (we figured this one out. Suppose that the minute hand is at t minutes and the hour hand is.) When the two hands coincide. yielding the solution 2: 10+ lOll 1 minutes. the minute hand of a clock passes the hour hand. between 4:00 and 5:00.1 Algebra Passing Time At some time between 3:00 and 4:00. (The term t /12 is due to the fact that in 60 minutes the hour hand advances 5 minutes. Exactly what time is this? (Assume that the hands move at uniform rates. Therefore the solution is 3: 16+41l1 minutes.2 Intermediate Problems I hope that you enjoyed the elementary problems. Now let's try a selection of somewhat more difficult problems. let's answer the same question for the time between 2:00 and 3:00 when the minute hand and hour hand coincide. We see fractions with 11 in the denominator in both cases.
(By the way. and the second hand of the (ideal) clock all coincide. at 3/11 x 60 = 16 + 4/11 minutes past 3:00.42 2 Intermediate Problems 6:00 and 7:00. and hour hands closest together? (This problem is posed and answered in Martin Gardner's treasure trove [7] but the solution isn't explained in detail.) Other than near 12:00.e. between 8:00 and 9:00. We immediately see that the coincidence between 3:00 and 4:00 occurs 3/11 of the way around the circle. In both cases. that will give us nearly the time at which the second. between 7:00 and 8:00. when are a clock's second hand. and between 10:00 and II :00. When the second hand is closest.) The strategy is to look at the eleven coincidences between minute hand and hour hand. the hour hand and second hand coincide at 719 points equally spaced around the circle. The reason is that the minute hand and second hand coincide at 59 points equally spaced around the circle. By symmetry. minute. we find that the coincidences of minute hand and hour hand at which the second hand is closest are at 3: 16+4111 minutes and 8:43+7111 minutes.. At these times. the eleven coincidences are equally spaced around the circular face of the clock. respectively. minute hand. Continuing in this manner. or between II :00 and 12:00. it coincides with the hour hand (since the minute hand moves faster than the hour hand). The coincidence of minute hand and hour hand between 1:00 and 2:00 occurs 1/11 around the circle. and the numbers II and 59 have no common factor. Bonus: What About the Second Hand? There is no time other than at 12:00 when the hour hand. i. the second hand is 4/11 and 7/11 of the way around the circle. when the second hand gets as close as possible. and hour hands are closest. which is at 5 + 5/11 minutes. the coincidence of minute hand and hour hand between 2:00 and 3:00 occurs 2/11 around the circle. because the minute hand travels faster than the hour hand. and hence the second hand is 5/11 around the circle (rather far from the coincidence of minute hand and hour hand). the minute hand. between 9:00 and 10:00. which is at 10 + 10/11 minutes. and hence the second hand is 10/11 around the circle (also far). and determine where the second hand is at those times. The two hands do not coincide between 12:00 and I :00. The coincidence between second hand and hour hand (measured in seconds) that occurs between 3:16 and . Similarly.
So it seems that we must consider the cases n odd and n even separately. and that the n even case is a little tricky. Believe it or not. as we have introduced only 0 (if a = 1) or 0 and pairs of numbers that sum to 0 (if a > 1). By the above discussion of the companion sequences.1) + . that is to say. However. Therefore. When is v an integer? If n is odd. Moreover. then v is not an integer. This makes sense because the minute hand is at some multiple of 1/719 around the circle (as its position is dictated by the hour hand's position). if n is even. The difference between the minute hand and hour hand at this time is 16+256/719 16+196/719 1 f .000 Find all sequences of consecutive positive integers that sum to 1.2. I 60 60 = 719 0 the CIrC e. and this is where the aha! realization comes in. or zero). negative. the parity of the number of terms switches (as we have introduced an odd number of new terms). and one containing only positive integers and the other containing some nonpositive integers. The other (symmetric) solution is 8:43:43+4631719 seconds. since it is equal to the middle term of the sequence. then (a . If we have a sum a +···+b of consecutive positive integers. So the solution is 3: 16:16+2561719 seconds. Then nv = 1. there is a way to ensure that n is odd. and the closest it can be is 1/719 of the circle.1 Algebra 43 3: 17 is given by 16 t t = 15 + 12 + 720' and hence t = 11760/719 (seconds) = 16 + 196/719 (minutes). + b is also a sum of consecutive integers.000. one with an even number of terms and one with an odd number of terms. Sums to 1. The problem asks for sequences of positive integers but let's relax the condition temporarily to any integers (positive.000..1) + a + ..000. The crux of the method lies in what to focus on. the sequences we are looking for occur in companion pairs. Let n be the number of terms in the sequence and v the average of the terms. ..000. + (a . n is an odd divisor of 1.000.000..000.000. Solution This is the kind of problem that we could crunch out on a computer. it is equal to the average of the two middle terms of the sequence (and hence is a halfinteger). The new sum is equal to the old sum. then v is an integer. but let's try to find a deft mathematical solution. If v is an integer. then both n and v are integer divisors of 1. we may focus on the sequences where n is odd and therefore v is an integer.000.
Replacing all even entries by and all odd entries by I. we obtain the matrix ° u.000.. The respective values of v are 1. 200..999 + .. we calculate as the beginning and ending terms v .. 8000. to find the sum for n = 5 and v = 200.44 2 Intermediate Problems Since the prime factorization of 1....52 . Hence. respectively.54 . and 64. If the target integer is a power of2..000.012 7938 + . . + 7876 For example. the sums and their companion sums are. The number of such sequences is the number of odd divisors of the target integer. + 40. where pe ranges over all odd prime power divisors of the target. Hence.000.(n .002 .012 7937 + .000. 55. (See "fundamental theorem of arithmetic" in the Toolkit.. + 7876. + 1882 7749 + .000 199. Bonus: Sums to Any Number For the general case of sequences of consecutive positive integers that sum to any given "target integer. + 1912 1243 + ." the argument is similar to the one above..1)/2 = 199. + 200... + 1912 . and 56..000 is 26 .) An Odd Determinant Does the matrix 1030 +5 [ 105 + 6 10 14 + 80 1050 + 2 +4 +3 10 19 + 4 1013 + 6 10 10 10 100 107 +2 108 + 10 104 +5 1023 + 8 have a multiplicative inverse? Solution Let's determine whether the determinant of this matrix is even or odd.988 999. then the only such sequence is the number itself.997 + 39.5 6.. + 8062 1287 + . and each of these seven choices gives rise to exactly one solution (the resulting sequence or its companion). + 1.998 39..000.000.002. + 40.987 + .998 and v + (n .. 1..000.5 3 . 40.1)/2 = 200. + 8062 1288 + 1242 + + .. the choices for n are 1..... + 200. We confirm that seven sequences have all positive terms. 320. + 1882 7748 + .002 + .....! n .000.000 199. it is the product of terms of the form e + 1. 1600.5.
So the same is true of the original matrix (since the determinant of a matrix is computed by addition and multiplication operations on its entries).1 Algebra 45 The determinant of this matrix is odd (it is 1). the determinant of the matrix is not 0 and the matrix is invertible. Can you tell at a glance whether the point is inside or outside the curve? I I I I I I  • I I I ' I I An easy way to do it is to draw a ray from the point and count the number of times it crosses the curve. the ray crosses the curve eleven times. it moves from inside the curve to outside the curve or from outside the curve to inside the curve (this follows from the Jordan curve theorem). Each time the ray crosses the curve. The odd number of crossings means that the point is inside the curve. In the picture below. Bonus: Inside or Outside? Here is another problem that looks baffling at first but has a simple parity (even/odd) solution. Hence.2. / / / / I /  I I I I I I / / / / / / I I I I ' " .
yielding P(ai) = f3i. . f3n arbitrary complex numbers. .2 Geometry What's the Side Length? Let P be a point inside an equilateral triangle ABC. I. (b) There is exactly one polynomial of degree at most n with the property specified in (a). . f31. and PC = 5. To prove (b).Q(z). an. an and noting that in each case all terms in the sum but one are 0. or p(x) = 1/2x + 7/2. Let ao.. ° Bonus: lagrange's Interpolation Fonnula Such a polynomial does existin fact.. the side length of the triangle. This proves uniqueness. an be distinct complex numbers and f3o.. LAGRANGE'S INTERPOLATION FORMULA. For if we consider all operations modulo 2. Suppose that p(x) = mx + b. . number theory. a linear onewith rational coefficients.3)/(3 .3 = 1/2(x ... P B = 3. 2. aI. suppose that P and Q are two such polynomials.. . and the pointslope formula yields p(x) .I) = 1/2.. namely. R is identically 0. = 4. and P and Q are identical polynomials. . Hence. Statement (a) is verified by evaluating P at ao. . the two requirements are contradictory: p(l) == I (mod 2) and p(l) == (mod 2). ... IThis formula is credited to JosephLouis Lagrange (17361813). . n. . aI. with PA Find x. . ao. Let R(z) = P(z). and classical and celestial mechanics.) (a) The polynomial n P(z) = Lf3i i=O O~j~n n f: ai aj j i has the property that P(ai) = f3i' for i = 0. Here is a general recipe for creating polynomials with prescribed values. aI. Then m = (2 . Then R has degree at most n and has n + I roots. Lagrange made contributions in analysis.46 2 Intermediate Problems Demanding a Polynomial Is there a polynomial p(x) with integer coefficients such that p(l) = 3 and p(3) = 2? Solution There is no such polynomial..I).
6. With similar reasoning to that in the Solution.PP'C has side lengths 3. it follows that LPP'C is a right angle. and 5. Bonus: Integer Solutions Let the distances from P to the three vertices be a.. We'll see some in the Bonus.2.6. b.2 Geometry C 47 A""""""'~B x Solution As in the figure below. rotate . we can derive a formula for x.. x 2 = 32 Therefore + 42  2·3·4· cos 1500 = 25 + 12J3. . We see that . ~~ C' A ""="'=.ABC 60 0 clockwise around B. This innocent problem is a gateway to a lot of fascinating mathematics. as in the diagram below. Since . 4.6. Suppose that P and C are transformed to P' and C'. and c.P P' B is equilateral and hence PP' = 3. respectively. Hence By the law of cosines (see Toolkit).
we obtain X = a2 + b2 + c2 2 ± 2 . One such solution is {a. 8. Let's call solutions trivial in which P is on the circumcircle of the triangle or on a line determined by a side of the triangle. c.P pI C. Similarly. b = 65. The negative sign gives the solution if P is a point in the exterior of the triangle. x} = {3. c = 73. a computer search reveals that the smallest integer solution is a = 57. Using Ptolemy'S theorem (see Toolkit). and x = 112. one can find infinitely many integer solutions in which P is on an extended side of the triangle.48 ~~ 2 Intermediate Problems C' A~~x~ We have where Eliminating (). Rearranging our equation for x yields X4 + a4 + b4 + c4 = x 2a2 + x 2b 2 + x 2 c 2 + a 2 b 2 + a 2 c 2 + b 2 c 2 • Is it possible to find an equilateral triangle with integer side lengths and a point P in the interior of the triangle such that the distances from P to the three vertices are all integers? Yes. 5. where we take c to be the largest of the three distances. 7}. b. they satisfy the weak triangle inequality a + b :::: c.j3 J2a 2 b 2 + 2a 2 c 2 + 2b 2 c 2  a4  b4  c4 • The positive sign is the one relevant to our problem. Because a. b. In 1990 Amfried Kemnitz found an infinite family of nontrivial integer solutions in which P is in the plane of the triangle: b = m 2 mn + n2 c = m2 + mn + n 2  m = 2(u 2 v2 ) n = u2 + 4uv + v 2 . one can find infinitely many integer solutions in which P is on the circumcircle of the triangle. and c are the side lengths of l:!.
so not all nontrivial solutions are in Kemnitz' family.A' BC.B'CA. named after number theorist and algebraic geometer Ernst Eduard Kummer (18101893). C" be the centers of f:::. The computer solution mentioned above doesn't have this property. C' be the third vertices of equilateral triangles constructed outwardly on sides BC. via Mathematica®. C' AB. . CA. The surface. f:::. (See the picture below.2. the quartic surface in question cannot be parameterized (it is an irrational surface). is a special kind of quartic known as a Kummer surface. let A'. and let A". B".) A' B' 2 It is not known whether Napoleon Bonaparte ( 17691821 ) was really the first person to discover and prove this theorem.2 Geometry 49 where u and v are any positive integers with u > v. AB. respectively. 2 Given f:::. In fact. although he is known to have been an able mathematician. respectively.A" B"C" is equilateral. B'.ABC . Then f:::. called a tetrahedroid. is depicted below. Notice that in this infinite family we always have b + c = 2a. A threevariable version of the surface. Napoleon's Theorem Prove: NAPOLEON ' S THEOREM.
Also by symmetry. Since we could have chosen any of the three equilateral triangles about the given triangle to be the focal triangle. B. (The "'spokes" join the center of the focal triangle to the vertices of the hexagon. and hence all central angles are JC /3. A'. b'. where the given triangle is black. without loss of generality. b". 8". are given by a". e. e'. the sides of this hexagon are all equal. respectively. two consecutive triangles around the center of the hexagon are congruent. where a" = 3(a' +b +e). respectively. C (given. A". Then the third points of the equilateral triangles. Bonus: An Algebraic Proof Suppose that A. M(e ." Consider the "wallpaper pattern" in the following figure. 8'. e" = 3(a I I I + b + e'). and M is a rotation matrix around the origin of angle JC/3. Look at the hexagon formed by joining the centers of six equilateral triangles that "go around" one of the equilateral triangles (the "focal triangle") constructed on the sides of the given triangle. in counterclockwise order) are represented by vectors a. Therefore. alternate "spokes" of the hexagon are equal. the triangle of Napoleon 's theorem is equilateral. M(b' c) = a e. C'.50 2 Intermediate Problems Solution We give a proof that is easy to "see. (We don't need to write M explicitly.a'.) Hence. b. e". are given by a'. By symmetry. C" . b"=3(a+b'+e). all six such triangles are congruent. respectively. where M(a b) = e'b.) The centers of the equilateral triangles. .a') = b .
they are regarded as the same. B".b .a") = ~M(a + b' + e 3 3 a' .. Here is the algebra: M(b" . e" are the vertices of an equilateral triangle.b I I = (e ." i.a". The area of the "outward Napoleon triangle" IS . Show that K4.e) I = M(a . " By the way.b +b I . This identification wraps the square around to make a cylinder. we will demonstrate that M(b" .b . The square represents the torus.e +b I I a) I = . The top edge and bottom edge of the square are "identified.4 consists of two sets of four vertices and all possible edges between the two sets (see Toolkit).(a 3 +b +e .a . The left edge and right edge of .e +e I a) I 3 +a .e) = e" a.e.2.2 Geometry 51 To show that A".4 can be drawn on the surface of a doughnut (torus) without edgecrossings.J3(a 2 + b2 + e2 ) 24 + 2A I and the area of the "inward Napoleon triangle" is where A is the area of the given triangle.a") = e" . Liangshin Hahn's book [8] gives an elegant proof of Napoleon's theorem via complex numbers. Solution The proof is by a simple picture (below). A Graph on a Doughnut The complete bipartite graph K4 . the result in Napoleon's theorem also holds if the equilateral triangles are constructed inwardly rather than outwardly.
The other four vertices are on the opposite side of the torus.4 has genus at most I. a torus is a surface of genus I. [9]. Our diagram does what we want it to do. Vertices on the boundary of the square are shown multiple times (because of the identifications of the edges). The figure can be stretched to make the gluing happen. in fact. The genus of the complete bipartite graph Km. it has genus I. since each vertex is joined to the four vertices of the other set and there are no edge crossings. For instance. This glues the two ends of the cylinder together to form a torus. For example. A surface obtained from a sphere by attaching g "handles" is called a surface of genus g. the four vertices at the comers of the square are all the same vertex. r . where xl is the least integer greater than or equal to x. The two sets of vertices in K 4 •4 are represented by solid dots (for one set) and open dots (for the other set).52 2 Intennediate Problems the square are also identified. Here is a Euclidean depiction of the graph on the torus. Bonus: The Genus of a Graph We say that a sphere has genus O. We found in the Solution that the complete bipartite graph K 4 . for example. The genus of a graph G is the minimum g such that G can be drawn without edgecrossings on a surface of genus g. See.n is given by the formula 2~(n  r(m  2)1.
we have n = Yo . Yo). and it follows that which is the equation of a circle centered at the origin with radius J a 2 + b2 • . Then the equation J a2 + b2• has a double root in x.2.. Because the tangent lines pass through P.2 Geometry 53 Points Around an Ellipse Given an ellipse. its discriminant is 0.mxo and hence Since the two tangents from P to the ellipse are perpendicular. This equation simplifies to Let P have coordinates (xo. what is the locus of points P in the plane of the ellipse such that there are two perpendicular tangents from P to the ellipse? Solution Let the ellipse be given by x2 a2 y2 + b 2 = l. We will prove that the locus is a circle centered at the origin with radius Let Y = mx + n be a tangent to the ellipse. the two roots ml and m2 to this latter equation satisfy m 1 m2 = I. i.e. We rewrite the equation as Since this equation has a double root.
Yo) with the property that there are two perpendicular tangents from P to the hyperbola X2 / a 2 ... these three points don't move).. Bonus: Isometries of the Plane P' ~.)e P. A. then the isometry fixes every point in the plane. Prove that if an isometry of the Euclidean plane fixes three noncollinear points (i. rotations.y2 / b 2 = 1..e. is the circle x5 + Y5 = a2  b2• (2) The locus of points P(xo. P translation P' . use the method of the Solution to prove the following propositions: (1) The locus of points P(xo.. and C are collinear. and C be fixed points of an isometry. Solution Let A. C are collinear.... Hence. where a > b.p rotation • . Then A lies on the line I. Let 1 be the perpendicular bisector of the line segment joining P and P'. the four types of isometries of the plane are translations. P''¥ reflection '~P' glidereflection As shown in the diagrams above. B.. B. B and C also lie on I. A glidereflection is a composition of a translation and a reflection in a line parallel to the direction of translation. A translation and a glidereflection have no fixed points (although a glidereflection's reflecting line is fixed . We will prove the contrapositive form of the assertion: if some point is moved by the transformation.. since the distance from A to P is the same as the distance from A to P'. ... By the same reasoning. As an exercise. then A. e. Yo) with the property that there are two perpendicular tangents from P to the parabola y = kX2 is the horizontal line Yo = 1/ (4k).. reflections. Suppose that the transformation moves the point P to a different point P'.54 :2 Intermediate Problems Bonus: The Problem for Hyperbolas and Parabolas We can ask the same question for a hyperbola and a parabola. and glidereflections. B.. Three Fixed Points A transformation of Euclidean space that preserves distances between points is called an isometry..
Translations and rotations are orientationpreserving.2. Then g(x) = f(x) . (g(x) . we have Ilg(x) . y. because.2g(x) . Now suppose that {el' e2} is a standard basis for R2. while a rotation has one fixed point (the center) and a reflection has a line of fixed points. y E R2. g(x) . y E R2.g(y)) .g(y)) = (x . g(e2)} is an orthonormal basis for R2.2x· y 2x· Y +y . g(x) . i = 1.f(y) II = IIx  YII· (We are denoting the length of a vector v by II v II. it follows that g(x) . IIg(x)g(y)1I 2 = IIxyIl2. {g(ed. for x. g(O) O. and hence This is what we mean by g being an orthogonal linear transformation: each vector is mapped to a vector with the same coordinates with respect to the transformed basis. Hence.g(y) II = IIx  = yll. Furthermore. g preserves the dot product of vectors. g(y) = = X· x . Let f be an isometry. CLAIM: If f is an isometry of R2. The conclusion of the claim follows with h f(O). Let's show that these are the only types of isometries of the plane. IIg(edll = IIg(e2)1I = 1. for we have g(x)·g(ej) =x·ej =Aj. g(y) + g(y) . IIg(x)1I 2 .2 Geometry 55 as a set of points). y. We will see what an orthogonal linear transformation is presently. then f(x) = g(x) + h.y). since g is an isometry.f(y) + f(O) I = IIf(x) . g(y) + IIg(y)1I2 IIxll2  + lIyll2. (g(x) . Also.f(O) is an isometry.2. while reflections and glidereflections are orientationreversing. Since IIg(x) I = IIxll and IIg(y)1I = lIyll.2g(x) .f(O) . Hence. Then. g(y) = x .g(y) II = Ilf(x) . we have IIg(x) .y) . = . We now show that g preserves the dot product of vectors.) Furthermore. where g is an orthogonal linear transformation and h E R2. For any x. (x .
Finally. Two particles start at one of the intersection points and move counterclockwise around the two circles. Since there are only two unit vectors orthogonal to the first column. where g is given by an orthogonal matrix and h is a vector. For an explanation of the significance of the halfangle () /2. these must be the two! These choices yield two possible matrices: [ COS () sin () . see "Reflections and Rotations. then such an isometry is a translation (if () = 0). we should show that upon adding a translation. the second matrix to a reflection in the line through the origin with slope () /2.c) + c = Rex + h. What is the locus of the midpoint of the line segment joining the two particles? . we obtain the four types of isometries claimed.sin () ] cos () and [ COS () sin () sin () ] cos () . See the picture below. we may take the first column to be [ COS ( ) ] sin () ." 'Round and 'Round Suppose that two circles of radii r and R intersect at two points. Two choices for the second column are [ sin () ] cos () and [ sin () ] cos () . then the isometry is a reflection with respect to this line translated by the vector h/2. If h is not parallel to this line.Re)l. g(x) = Rex. since this value of c satisfies the equation Re(x . then such an isometry is a glidereflection by h if h is parallel to the line through the origin with slope () /2. 0 _< () < 2rr. If h = 0.56 :2 Intermediate Problems Now we know that f(x) = g(x) + h. at constant speeds. What are the possible 2 x 2 orthogonal matrices? Since the columns ofthe matrix are orthogonal unit vectors. 0. then an isometry of the second type is a reflection in the line through the origin with slope () /2. The first matrix corresponds to a rotation. or otherwise a rotation by () with center c = h(l . 0. If h f:. then an isometry of the first type is a (counterclockwise) rotation around the origin by angle (). If h = 0. If h f:. completing a revolution of their respective circles at the same time.
C2) where M t is a rotation operator corresponding to time t. See the following diagram. Let PI (t) and P2(t) be the positions of the two particles at time t.) Hence. as shown in the diagram below. P2(t) = M t (P(O) _ CI . C2) + Cl .e. we could find x. i. and diagonals 2x and 2y. Bonus: A Fundamental Parallelogram Let x be the radius ofthe locus circle and 2y be the distance between the centers of the two given circles. As in "The Case of the Rotating Parallelogram. From this relation. Then we have a parallelogram with sides rand R. .cd and + Cl + C2. (We don't need to write M t explicitly. the intersection point where the particles start. the radius of the locus circle.2 Geometry 57 Solution Let CI be the center ofthe circle of radius rand C2 the center of the circle of radius R. R. Then PI (t) = Mt(p(O) ." it follows by the Law of Cosines (see Toolkit) that the four parameters satisfy the relation (known as the parallelogram law) r2 + R2 = 2X2 + 2y2. C2. Therefore. the midpoint p(t) of the line segment joining PI (t) and P2(t) is given by p(t) = Pl(t). and y. the locus is a circle centered at the midpoint of the line segment joining the circles' centers and passing through the circles' two intersection points.2. in terms of r.. P2(t) = Mt(p(O) . Set p(O) = PI (0) = P2(0).
. a and f3.) Solution Consider the diagrams below.) We will show that there are exactly four such triangles: a 30°30°120° triangle. f3 and y. intersecting at an angle ()'. + 0'). a 30°_60°_90° triangle. as in the figure on the right. The composition of the two rotations is (af3)(f3y) = a(f3f3)y = ay. expressions of the form gxg. (We have taken f3 to be the line through P and P'. What kind of transformation of the plane results if a reflection is made with respect to a and then a reflection with respect to f3? (b) Suppose that P and P' are two distinct points in the Euclidean plane. Let rCIJ denote a rotation with center 0 with angle w. We will show that the composition of a and f3 is a rotation with center 0 (the intersection of a and f3) and angle 20. and a 60°60°60° triangle. intersecting at an angle 0. We use conjugations. The composition of a and f3 is (b) Let's say that the rotation at P has angle 20 and the rotation at P' has angle 20'. This is a rotation with center 0 (the intersection of a and y) and angle 2(0 since the angle between a and f3 is 0 + 0'. Bonus: Tiling With Triangles Which Euclidean triangles have the property that reflections in their sides produce tilings of the Euclidean plane? (Think of flipping a triangle over with respect to its sides. where 0 + 0' is not an integer multiple of 2JC? (The angles are measured counterclockwise.) Similarly. From (a). the rotation at P' is the product of two reflections. What kind of transformation of the plane results if a rotation is made with center P and angle 0 and then a rotation with center P' and angle 0'. a 45°45°90° triangle. p' P two reflections ~ a 0 two rotations (a) The figure on the left shows the intersecting lines of reflection. we know that the rotation at P is the product of two reflections.1 which perform an operation x with respect to a reference frame given by g. a and f3.58 2 Intermediate Problems Reflections and Rotations (a) Suppose that a and f3 are two intersecting lines in the Euclidean plane. Let's also call the reflections themselves a and f3. The angle between a and f3 (measured counterclockwise) is O.
10. are given below.=.6. 30° 30°120° triangles 30° 60°90° triangles The geometric symmetries of these tilings can be indicated with "group presentations. 12).18). b. and 60°60°60°. then (a. By inspection (you may want to check this). (4. 2rrjc. (4. (4.6. If a = 5. corresponding to the four tilings.") The four group presentations. and we find that the only solution is (a.2 Geometry 59 Since in the tiling the triangle is rotated around each vertex.9.20). If a = 6." (See "Bonus: A Tiling of the Hyperbolic Plane.5.7. (6. 8). (The other triples correspond to triangles that overlap each other when reflected. 30°60°90°.+ . c are integers greater than 2. 15). the angles of the triangle are 2rrja. only the triples (3. (3. c) = (5. 12).6) is the only solution. for if a > 6 then the sum of the angles is too small to make a triangle.5.8). We see that 3 ::: a ::: 6. . The four triangle tilings are illustrated below. 12).45°45°90°.8. b.42).10). b. c) = (6.6.12). Continuing in this manner. 12.5. (4. (3. and (6.2. b. 8. (5.6). c) = (3. (3.+ . 12.6. (3. then c = lOb j(3b . (4. we determine all the solutions: (a. 10). where a. respectively. abc 2 Suppose that 3 ::: a ::: b ::: c.8.6. and 2rrja+2rrjb+2rrjc = rr.) The corresponding triangles have angle measures 30°30°120°.24). Hence I I I I .6) yield tilings.10). 2rrjb.
given any two triangles with the same perimeter and area. Cutthe triangle ~ABC into triangles ~AOB. b's. b 2 = 1. the composition of two reflections yields a rotation by an angle twice the angle between the two reflecting lines.c:a 2 = b2 = :2 Intermediate Problems c2 c2 c2 c2 = (ab)3 = (ab)2 = (ab)2 = (ab)3 = (bc)6 = (bc)6 = (bC)4 = (bC)3 = (ca)6 = (ca)3 = (ca)4 = (ca)3 = 1) = 1) = I) = 1) In each group presentation.b. ~BOC.c:a 2 = b2 = (a.60 tiling 30° . This is why we have the relation (ab)3 = I (three of these rotations yield the identity). A "word" in the group is any sequence of a's. 13 both have perimeter 28 and area 4. Cutting and Pasting Triangles A triangle with sides 4. in the tiling with 60°60°60° triangles.b.) This is obvious from the diagram below. and c's. 12 and a triangle with sides 6. For example. Observe that the radius r of the inscribed circle of a triangle satisfies r s = K. there is a way to cut the first triangle into a finite number of pieces that can be reassembled to form the second triangle. That is why we have the relations a 2 = 1.b.b. Each word represents a symmetry moving a given triangle via a sequence of reflections to a copy of that triangle elsewhere in the plane. Lay the three triangular pieces along a line. b. 12. the "generators" a.c:a 2 = b2 = (a. 9. so that the perimeter of the first triangle becomes the perimeter of the second triangle? Solution Surprisingly. o 0 0 0 r::: ~:== rl2 A : A B C . and ~COA. c represent reflections with respect to the three sides of the given triangle. so that the perimeter of the first becomes the perimeter of the second. as in the picture below.c:a 2 = b2 = (a. where s is the semi perimeter of the triangle and K is its area. so that the two given triangles have the same inradius.J35 (by Heron's formula). Is there a way to cut the first triangle into a finite number of pieces that can be reassembled to form the second triangle. the product ab is a rotation by 120°. and c 2 = 1 (two reflections with respect to the same line yield the identity). (See Toolkit. A B~~'"'::'~C Our method of cutting the first triangle to form the second triangle is also inherent in the above diagram. where is the incenter. Hence r = K/s. As we know from the Solution.30°120° triangles 30° 60°90° triangles 45° 45°90° triangles 60° 60°60° triangles group presentation (a.
a') + (s .J3T. and hence.2p + l. both with perimeter 62 and area IS. .b')(s . The base of each triangle becomes the base of the corresponding rectangle. This is easy to do by cutting along the dotted lines in the diagram.a)(s . we have.2. by Heron's formula.b) + (s .c').c) = (s . then we obtain two rectangles with base 2s and height r /2. with p = 3.3p + I. 6}. b.b') + (s . we have the pairs {3D. find another isosceles triangle with the same perimeter and the same area.2p + I. This solves the problem.P + I}. where p and q are positive integers greater than I. Js(s . 16} and {28. Also. Because they have the same area. Since the triangles have the same perimeter. 2p2. Isaac Newton (16421727) gave a solution based on the intersection of a hyperbola and a parabola. with common perimeter 8p2_4p +2 and common area p(2p .c'). so that Hence s = 4p2 . 2s = a + b + c = a' + b' + c'.1. We recut the rectangle from the first triangle to match the cuts for the second triangle. Suppose that the two triangles in a pair have sides a.a) + (s . Cut each of the three triangles into three pieces and arrange the pieces to make a rectangle of the same area.a')(s . we must find triples of positive integers with the same sum and the same product. 28. Note that the altitude of each triangle (from the line) is interior to the triangle. (s . c'. both endpoints of the line are labeled A to indicate how the triangles are cut and laid along the line. Bonus: A Family of Triangle Pairs Let's find an infinite family of nonsimilar pairs of triangles with integer side lengths such that the two triangles in each pair have the same perimeter and the same area. J 3The problem is named after Franz van Schooten (16151660). Set sa = p sb = p s a' = I s b' = pq s c' = pq. q = 2p . b'.c) = Js(s . 2p2.b')(s .2s = s = (s . If we perform this procedure for both of the given triangles.a')(s .c) = 3s . and we have the pairs {4p2 .3p + I. 2p} and {4p2_2p. and then form the three subtriangles for the second triangle. c and a'.p + I. For example.c'). 4p2 . the apexes of the triangles are all labeled 0.2 Geometry 61 In the picture. Our problem is similar to van Schooten's Problem: 3 Given an isosceles triangle.b)(s . 16.b)(s . As (s . The equal sum condition means that 2p + q2 = I + 2pq.a)(s .l) 4p2 . since they all come from the incenter.
4 shows how the triangle can be dissected into four pieces that can be reassembled to form the square. We will sketch a proof. we work with parallelograms such as those centered around the large dot in the picture." any triangle can be cut into three pieces that can be reassembled to make a rectangle of the same area. .62 2 Intermediate Problems Cookie Cutting Suppose that we have an equilateral triangle made out of cardboard. The labeling of a particular equilateral triangle by I. it can be done. The next step in proving the WallaceBolyaiGerwien theorem is showing that any rectangle can be transformed into a square of the same area. Can we cut the triangle into a finite number of polygonal pieces that can be reassembled to form a square (of the same area)? Solution Yes. 2.. 3. Cut the triangle along an internal altitude and along the perpendicular bisector of that altitude.. The parallelogram formed from two adjacent squares is inclined at a slope of . We can "see" the dissection via a simultaneous tessellation of the plane by squares and by equilateral triangles. then A can be cut into a finite number of pieces that can be reassembled to form B. As in the Solution to "Cutting and Pasting Triangles. and in fact a solution due to Henry Ernest Dudeney (18571930) uses just four pieces. This is known as the WallaceBolyaiGerwien theorem./3/2 from the parallelogram formed from two adjacent equilateral triangles. The picture below shows how this can be accomplished. Bonus: The WaliaceBolyaiGelWien Theorem If A and B are any plane polygonal regions of the same area. In describing the tessellation precisely. It's easy to arrange the pieces to make a rectangle.
Revolving Credit A certain credit card has the shape of a rectangle of dimensions 3 units x 4 units. For more on Hilbert's problems. Now the transformation is obvious. then the construction needs tweaking. Repeat this tweaking if necessary. Now we can "put the pieces together" and complete the proof of the WallaceBolyaiGerwien theorem.2 Geometry 63 CI'FiF. . 161. the corresponding dissection problem in three dimensions cannot always be achieved. Put these rectangles together to form one rectangle. we can cut A into pieces and reassemble the pieces to make B. Cut the rectangle in half (the short way) and stack the two pieces together to make a "fatter" rectangle. Cut the polygonal region A into triangles. We leave it as an exercise to show that the triangle A C D is congruent to the triangle G I J and the triangle ABG is congruent to the triangle DF J . If you rotate the card about one of its diagonals. Cut the squares into pieces and rearrange them into rectangles all with the same base. If the rectangle is "too skinny. Since both A and B can be cut into pieces that can be reassembled to make squares of the same area. This answers in the negative a famous problem of David Hilbert (Hilbert's Third Problem). see p. do the same process for B." so that the point D is not within the rectangle. In particular.F H The rectangle A B I H can be transformed into a square C F J H of the same area. there exist two tetrahedra of the same volume such that one tetrahedron cannot be cut into a finite number of pieces that can be reassembled to make the other tetrahedron. Now. By the way. Dissect the triangles into squares. what is the volume of the resulting solid of revolution? Here is a picture of the solid. Transform that rectangle into a square. The above argument can be modified to transform any rectangle into a rectangle with a prescribed base.2.
x/w = 1/ ." :s I. Using the law of cosines (see Toolkit). where d is the diagonal about which the paralleldf . we calculate that the volume of revolution is 4269Tl /320 cubic units. Substituting in the expressions for X2 and y2. we have 1 volume = 2 ( 3TlX2Jw2 = !!. + di = 2a 2 + 2b 2 • :s d < a + b. Likewise. Consider the diagram below. I2L2.64 2 Intermediate Problems Solution We sol ve the general problem for a rectangular card of width w and length I. Using the formula for the volume of a cone (1/3 base x height). with a :s b. Bonus: The Case of the Rotating Parallelogram What is the volume obtained by rotating a parallelogram about one of its diagonals? Assume that the parallelogram has side lengths a and b./w 2 + 12. they can be shown to satisfy Let's assume that b .. . and diagonal lengths d 1 and d 2 • Of course. .. and simplifying./w 2 + 12 /2) = w / I. the four parameters are interdependent./w 2 +L2) 2 3 + L2(2X2 _ y2)./w 2 + 12 For w = 3 and 1 = 4.2/ 2w 2 .Jw2 + 12  3 Tly2 1 . By similar triangles. y /( . where w Consider the diagram below. and so y2 = w 2(w 2+/2)/(4/2). we obtain volume = Tlw2(7/4 . and so X2 = w 2/2/(W 2 + 12).w 4) .a ogram is rotated.
Upon substitution. the optimal value of d 2 is a solution to a quintic (degree 5) polynomial! I didn't expect to see a quintic come up in this problem. 3. Hence x 2 = a2 _ ( d 2x 2 2_ y . 4. In fact. 4./7) ~ 43. b.b 2)(l9a 2 . or perhaps when the short side is perpendicular to a diagonal. 4.b 2)2 (3a 2 + 5b 2)d 4 _ + (13a 2 . as neither is true. we find that there is one positive real solution to h(3.l5b 2)d 6 + 3(a 2 . 5) volume(3. I thought that the maximum volume would occur when the two sides of the parallelogram are perpendicular. d) = For example. The derivative of the volume function with respect to d is a rational function of a. Using a computer or calculator. 4.z). d) = 0. But I was due for a surprise. Now we compare the volumes based on d having this value.2. ~ ~ 49.(a2 _ b 2 _ d 2)2 .6373. b. d being the side length of a diagonal of a rectangle. namely.2 Geometry 65 We find that x 2 + z2 = a 2 and x 2 + (d . If we set this polynomial (a quintic in d 2 ) equal to 0. we will find candidates for the optimal value of d.9108 . 4. or when one side is perpendicular to a diagonal.4(::b=2_X :2:).5291 41. solving for z.3d lO • Since the denominator is positive. Note that the volume formula also holds in the case where the parallelogram leans over the diagonal and the resulting solid is concave. and plugging the expression for z into the first equation yields a 2 _ b2 + d 2 )2 2d By similar triangles. and d. Right away.9b 2)d 8 . . y j(dj2) = xj(d . 5) = 4269rrj320 (the same result as in the Solution).70407. given a and b? When I posed this problem.2(a 2  b 2)5 + 2(a 2  5b 2)(a 2 _ b 2)3d 2 (a 2 . What is the maximum volume. we can verify that the maximum volume does not occur when the sides are perpendicular.70407) volume(3. v(a. Taking the difference of these equations. 3 v(3.Z)2 = b 2. The volume is given by rrd(2 3 x 2 y 2) . d ~ 3. We can write this rational function (divided by rr) as a fraction whose denominator is positive and whose numerator is h(a. the volume is rrd ( 2 (a 2 _b 2 + d 2)2) ( d4 ) a 4d 2 2 . the derivative changes sign exactly when h does. and d being the side length of a diagonal perpendicUlar to the shorter side: volume(3. d) = . b.
d 6 and d 10 terms and divide by d 4.I ::: d ::: . We will now prove that the volume function has a unique local maximum. this will hold if d 2 > 2/5. d 2. and d l2 are negative. d 2.3b 2)d 8 + 12(1 .b 2)5 d 2 15(1. So let's now assume that d 2 < 2/5. Since we are assuming that b 2 > 19/15. We will prove that the volume function is increasing on this interval (b .b 2)d 10 _ 3d 12./2/5 we get the following upper bound on this expression: _ 23 _ 53 b2 25 5 + 27b4 _ 15b 6 . This is equivalent to showing that the function h is positive. the coefficients of dO. The sum ofthe d 8 and d 10 terms is Hence. the sum ofthe degree 8 and 10 terms is negative under a certain condition./2/5). the coefficients of d 6 and d 10 are positive. Using Descartes' rule of signs (see Toolkit) we find that h has exactly one positive real root if b 2 is in the ranges So let's assume that b 2 falls in the range 19/15 < b 2 < 13/9. Since I ::: b. Let's combine the d 4.3b 2)(l . and thereafter the curve is concave down. we may as well assume that a = l. d 4.b 2)4d 4 + 20(1. We do this by showing that the derivative is positive up to a certain point.b 2)6  + 8(1 . Moreover. while the coefficients of dO. We claim that this expression is negative when 19/15 < b 2 < 13/9.b 2)2d 6 4(1 . Now we look at the second derivative of the volume function. With our assumptions.66 2 Intermediate Problems We see that the optimal diagonal is not the diagonal of a rectangle nor is it perpendicular to a side of the parallelogram. the volume function is concave down when 20 + 12b 2 + 12d 2 > O. By scaling. d 4. d 6 . we obtain .2(1 . Take the derivative: . and d 8 are negative. Upon clearing the denominator (which is positive) and factoring out 1{ . If we replace d with .b 2)(5 .
+ . I I 1 Hence. The sum is negative if and only if 108/90 < b 2 • We have 108/90 < 19/15 < b 2 . +..3 Calculus The Harmonic Series Show that the harmonic series 1++++++++··· 2 3 4 5 678 has an infinite sum. this latter sum is 1+2' which tends to infinity with k.+ . Since the value at b 2 = 19/15 is negative. look at the last two terms. our claim is proved. ++++2 4 8 2k 2k I I I I I 1 I I Since each series in parentheses adds up to 1/2...+ ... 13231382).... I I I I I I I Solution Consider the sum of the first 2k terms (where k ::: I): 1+.5 6 7 8 2 3 ~ This sum is greater than I I) I I I) I I 1++ (I 4 + (I 8 8 8 + . 2. Given a triangle with side lengths a and b.. the volume of the resulting body of revolution is maximized? Of course. 4 k Bonus: Estimating the Harmonic Sum Let Hn = The above argument shows that 1+2 + 3" + . + ( + .. with a ::: b.:2.3 Calculus 67 Again. if n = 2k. . 2 n 4This argument was invented by Nicole Oresme (c.+ .) .+4+ .+ . c will satisfy b . what should be the third side length c. . then Hn> log2 1+. +. It follows that the harmonic series has an infinite sum.a ::: c ::: b + a.. so that if the triangle is rotated about the third side. so the expression is decreasing. +.
we obtain In(n + I) < Hn < I + Inn. This means that Hn/ Inn + I as n + 00.68 2 Intennediate Problems Using the method of comparison of areas. Therefore. Hn is asymptotic to Inn). Hn '" Inn (i.1) y=lnx ======~+~~x Knowing that eX is its own antiderivative. we can complete the calculation: .< Hn < 1+ .. we have j 1 n+1 dx jn dx . Since the function 1/ x is decreasing for x > 0. A Quick Integral Evaluate the definite integral 10 Solution By symmetry (see figure). 00 y y=ex (0.e. we can obtain for Hn both an upper bound and a better lower bound. 10 t Inx dx = 1 0 eX dx. 1 Inx dx. X 1 X Evaluating the integrals.
graph theory.I . Note. Euler reasoned that since the zeros of the sine function are the integer mUltiples of rc (i. sinx is not a polynomial.2:) (1 + 2:) (1 . simply plug in x = nrc and note that the right side is 0 (for any integer n). numbertheory. 3! 5! 7! . The magic of the proof is that although this reasoning is valid for a polynomial. He made foundational contributions in analysis.cosO = . nrc... and mathematical notation.. The numerical value was determined by Leonhard Eule~ (17071783)... Solution Euler's solution is a bit of magic..+ ..(cosx)lo 0 rc 2 1C/2 rc rc = .2 1 arcsin x dx..:2.+ .3 Calculus 69 Bonus: Another Quick Integral We can also easily evaluate fo rc I· . Since these coefficients must be the same. it is 1/3! = 1/6. To see this... ) rc 2 . ) (I .) (I + . dx = .= I 6' . it is :2 (I I + ~ + ~ + . we have 1+ This is a totally unexpected answer! 5 Leonhard Euler was one of the most prolific mathematicians of all time. By symmetry. Now consider the coefficient of x 3 • On the left side.... = x (17! rc 2 X2) (1~) (12 4rc 9rc 2 x2 ) •••. where n is an integer).e... sin x has the infinite product expansion x3 x5 x7 sin x = x ( I .+ cos(rc/2) . Euler's method is a leap of faith.. On the right side.. We equate our two representations: x _ x3 + x5 3! 5! _ x 7 + . 4+ 9 +". this integral equals the area of a rectangle minus the area under a sine curve: l 1C/2 SlDX . 2 2 Euler's Sum Evaluate the infinite sum 1+ 4+ 9+ I I I 1 1 1 16 + 25 + 36 + 49 + . starting with the power series representation of sin x: sin x = x .3:) ( 1 + 3:)'" ..
where the product is taken over all prime numbers p . in the limit. Let S be the unit sphere with the same center as the given circle and project each strip onto S. Prove that the sum of the Wi is at least 2.2 + .70 2 Intermediate Problems Bonus: Probability that Two Numbers are Coprime Suppose that two positive integers from I to n are chosen at random.1/ p2. Using the formula for the sum of a geometric series (see p.. ' the reciprocal of Euler's sum. the probability that two integers are not both divisible by a prime p is I .4 + . the probability that the two integers are coprime is. this expression is equal to I I 1+ 4 + 9 + . p p p I n (I + .1/22.608.. where I ~ i ~ n... p Since the reciprocal of each square integer is accounted for exactly once in the product.1/3 2 • In general. (A bolt from the blue!) . As n tends to infinity. the probability that two positive integers chosen at random are coprime is 6/rr 2 ~ 0.. The probability that two integers are not both divisible by 2 is. what is the probability that the integers are coprime (have no factor in common)? Two numbers have a factor in common if and only if they have a prime factor in common. The probability that they are not both divisible by 3 is I . Did you expect to see rr in the answer to this problem? Strips of Carpeting Suppose that the unit disk is covered with n infinitely long rectangular strips of widths Wi. Therefore. ) . 16).. we can write this expression as nl+~+~+ . Hence. I . in the limit. Solution We assume that the strips don't extend "widthwise" outside the disk (because any that did would only contribute to a larger sum of the widths).
Choose the coordinate axes so that the ith strip is perpendicular to the xaxis. Solution Via the power rule and the chain rule for derivatives.2. Since the angle sum of the given spherical triangle is 2rr. What if we start with a spherical triangle of surface area rr (on a sphere of surface area 4rr)? Is it true that four congruent copies of the spherical triangle can be arranged to cover the sphere? This turns out to be the case. the surface of the sphere is also covered. without using a computing device. at any point on the sphere. Suppose that the ith strip is bounded by the lines x = a and x = b. (Isn't it interesting that the area depends only on the width of the strip and not where it is placed?) To see this. Bonus: Four Spherical Triangles The above analysis shows that.a) = 2JrWi. the surface areas of the following four regions on a spherical globe are identical: (I) The region between 300 North Latitude and the North Pole.3 Calculus 71 We claim that the surface area of the projection of the i th strip is 2rr Wi. we compute the surface area of the projection of a strip as an area of revolution. The three triangles define a complementary fourth region on the sphere that is clearly congruent to the same triangle (see [4]). Then the surface area is given by l b a 2rry ~ yI + Y2 dx = 2rr(b . (3) The region between the equator and 300 South Latitude. If the globe has surface area 4rr. Since the disk is covered by the strips. 692 701 Hence . for example. Is it 01 Given 607 I(x) = 607x + I 692 701 + 692x + I + 701x + l' determine. (2) The region between 300 North Latitude and the equator. whether or not where 1(12) denotes the twelfth derivative of I. we can place. (4) The region between 300 South Latitude and the South Pole. we obtain 607 = 12! [( 607x + I 1(12)(X) )13 + (692x + I )13 + (701x + 1)13] . three copies of the triangle meeting at a vertex. then each of these four regions has surface area rr. It follows that L:?=1 2rrwi 2: 4rr and L:?=l Wi 2: 2.
Solution The catch is the without using circular reasoning clause. . or a fourth power into two fourth powers. Since the circle is given by the equation x 2 + y2 = r2. which this margin is too narrow to contain.72 2 Intermediate Problems Is it possible that this quantity is equal to O? No. Suppose that rr is defined by the circumference formula. or in general. any power higher than the second into two like powers. the area of the circle is given by the integral 21 6 I highly r v'r 2 x 2 dx. about the proof of FLT. c. Cubum autem in duos cubos. Hanc marginis exiguitas non caperet. b.] Wiles' proof is based on proving the farreaching TaniyamaShimura conjecture concerning elliptic curves. aut quadratoquadratum in duos quadratoquadratos & generaliter nullam in infinitum ultra quadratum potestatem in duos eiusdem nominis fas est diuidere cuius rei demonstrationem mirabilem sane detexi. there is a flaw in the following argument. [It is impossible to separate a cube into two cubes. Prove the area formula without using circular reasoning. if n > 2. 6 Pi is Pi The constant rr appears in the formula for the circumference of a circle (C = 2rr r) and in the formula for the area of a circle (A = rrr2). For example. by Fermat's Last Theorem (proved by Andrew Wiles)! Remember that Fermat's Last Theorem says that the equation is not solvable in positive integers a. where r is the radius of the circle. r recommend Simon Singh's documentary film The Proof. Bonus: Fermat's last Theorem Fermat's Last Theorem (FLT) was the most famous unsolved mathematics problem when Andrew Wiles solved it in 1995. I have discovered a truly marvelous proof of this. The problem originated in 1637 when Pierre de Fermat (16011665) wrote in the margin of his copy of Diophantus' Arithmetic.
Define the polynomial .3 Calculus 73 Making the change of variables x = r sin ().2. written as an integral for arc length.. r Hence./r2 _ x2 dx r = 21 .vr2  J r2  x 2 dx =A. we obtain = 21 r . Here is an argument that avoids circular reasoning./r2 . 1f = P / q. that 1f is irrational. This establishes the area formula. Suppose that 1f is a rational number./r2r.vI + (y')2 dx = 2jr . Bonus: Irrationality of 7r We will give a concise proof by contradiction..x 2 dx = 41 r +2 [0 r2 ~ y2 ( _~) y2 dy dy + 21 r . using the fact that x dx = y dy. this integral becomes =1fr2+r2 ( iI sin2(} ) 11C/2 1C/2 The flaw in the reasoning is that the fact that the derivative of sin () is cos () (used in two places above) depends on the formula for the area of a circle. say.x 2 dx. due to I van Niven (19151999). The circumference formula. is 21fr = 2jr r .. where p and q are positive integers.
It follows that f(i)(O) = ±f(i)(TC). the numerator is an exponential function of n with a fixed base.x . this is dominated by the n! function in the denominator. this quantity is 0 if j i= n + k and a (n!~)! = akW!k) if i = n + k. where 0 ::: k ::: n and a is an integer.. F(TC) x < TC.. excluding February 29).F(x) cos x] = [F"(x) = [f(x) + F(x)] sinx + (_I)n+2 f(2n+2) (x)] sinx = f(x)sinx (since f has degree 2n). + F(O) n! Since all f(i)(O) and f(i)(TC) are integers. We claim that f(i)(O) (and hence also f(i)(TC» is an integer for each i :::: O. Define F(x) = f(x) . What is the expected value of N? (Assume that the 365 birth dates are equally likely. 2. (TCp)n 0< f(x)smx < . for all i :::: O. + (It f(2n)(x). Upon differentiation i times and evaluation at 0. Hence. Hence F = C+ID2 ) 1 = 1  = 1(2) + 1(4)  + . for all x. :)F'(X) sinx .. But this is impossible since it is an integer. forO < . In the upper bound.4 Probability How Many Birthdays? There are 100 people in a room.. So our assumption that TC is a rational number is false.) 7The definition of F(x) is motivated by our need for the relation F" F = I. we obtain (I + D 2 ) F I. We note that f(x) f(TC .f(2)(x) Observe that + f(4)(X)  . we have is an integer.7 Now we compute 1011: f(x)sinx dx = [F"(x)sinx  F(x)cosx]l~ = F(TC) + F(O). Let N be the number of different birth dates. where I is the identity operator and D is the derivative operator. TC is irrational.. as n tends to infinity.. Each person states hislher birth date (month and day. Therefore.74 2 Intermediate Problems where n is to be determined. . the integral is positive but arbitrarily small for sufficiently large n. Working backwards from this relation.x). a n+k n. However.. For a typical term of f(x) looks like .
. Hence E (X I) = 1 (364/365)100. one object is fixed. let Xi = 1 if date i is among the stated birth dates and Xi = 0 otherwise.. Suppose that the random variable X is the number of spots seen on the die before the 6 occurs. 6.+ .3. the expected number of different birth dates among 100 people is 365(1 . to the total number of spots. For 1 ~ i ~ n. let Xi = 1 if object i is fixed by the permutation and Xi = 0 otherwise. and these outcomes add 1. the sum on the right is equal to 365 . Therefore. Bonus: Average Number of Fixed Points of a Permutation In a random permutation of n objects.. 2. . 2. On average.5. Then the expected number of different birth dates among the 100 people is because of linearity of expectation (independence of events is not necessary).. Solution The average number of spots is 15. E(Xt}. 5. respectively. + n n 1 n (n terms) =1. or 0.+ . The value of E (X I) is the probability that January 1 is among the 100 dates. which is the complementary probability of the event that January I is not one of the 100 dates. 2.2. satisfies the equation E( ) _ E(X) X  +1 6 + E(X) +2 6 + E(X) +3 6 + E(X) +4 6 + E(X) +5 . then the number is 4 + 2 + 5 + 2 = 13.2. Then the expected value of X. The Average Number of Spots A fair die is rolled until a 6 occurs. 5. how many objects are fixed (not moved by the permutation)? This problem is also solved simply by using expectation. Since all the dates are interchangeable.4 Probability 75 Solution For 1 ~ i ~ 365. or 6. + E(Xn) 1 1 1 =  n + . 6 The reason is that the first roll is 1. Solving the equation for E (X) yields E (X) = 15. denoted E(X).(364/365)100) ~ 88. each possibility occurring with probability 1/6.. 4.4. 3. Then the expected number of fixed objects is E(XI + X 2 + X3 + . regardless of n. + Xn) = E(Xt} + E(X2 ) + E(X3) + . if the rolls are 4.. What is the average total number of spots seen on the die before the 6 occurs? For example.
Since the number of spots on one roll of the die when it does not come up 6 is on average (1 + 2 + 3 + 4 + 5)/5. Balls Left in an Urn An urn contains n white balls and n black balls. Solving for E. 5. k+l For n = 1. . the expected number of balls left in the urn is E = 2 ~ k . Suppose that there are k black balls left in the urn. Are you surprised that the answer tends to 2 as n goes to infinity? An aha! proof relies on two key realizations. respectively. Then the given white ball is left in the urn (in the original problem) if and only if it is selected after all the black balls in the extended problem. and the next (Le. Now. A ball is chosen at random and removed.k )th) ball chosen is white. we find that E = 1. . For example.4/3. given repeated. Suppose that an event happens with probability p. The probability that the (2n .. where 1 ~ k ~ n. 2.k black balls. 6. in our problem. and 200/101. between the first and second black balls. So what is the probability that a given white ball is left in the urn? The second aha! realization is to imagine the experiment continuing until all the balls are selected and withdrawn. 10. on average. there are n ..2. this means that E = 6.) The situation of k black balls left in the urn arises when. we need to show that the probability that a given ball is left in the urn is 1/ (n + 1). and 100. we obtain E = 1/ p. Thus. 2. independent trials? For example. a die comes up 6 with probability 1/6. then the number of trials is 5.20/11. 1 + (1. What is the expected number of balls remaining in the urn? Solution We first pursue a mundane method using binomial coefficients. it follows that the average total number of spots before a 6 occurs is 5· (1 + 2 + 3 + 4 + 5)/5 = 1 + 2 + 3 + 4 + 5 = 15. among the first 2n k 1 balls chosen. So the average number of rolls before the 6 occurs is 5..1 white balls and n . (2n . The reasoning is similar to that in the Solution. _1_. There are n + I turns at which the white ball can be selected (relative to the black balls and ignoring all the other white balls): before the first black ball. if the die comes up 4. ~~l)~~k) ~ (2n) k=l 2nkl . First.k )th ball is white is 1/ (k + 1).p)(E + 1). after . do we have to wait for the event to happen. This process is repeated until the urn contains only balls of one color. How long. Then E satisfies the equation E = p. So we guess that the general formula is E = 2n/(n + 1). In the case of the die. (The case of k white balls is similar. Let the expected number of trials be E.76 :2 Intermediate Problems Bonus: Average Waiting Time How are we to interpret the answer 15 in our problem? The answer is related to a basic probability problem called waiting time. the term 2n in the solution tells us that we should figure out the probability that a given ball is left in the urn and multiply this by 2n.
Urn B contains 4 white balls and I black ball.) The sum may be written as a telescoping series: So in general we ask. then the numerator becomes 252. The probability that the black ball is not selected is given by (Notice that using an upper summation limit of k = n instead of k = n . Show that the expected number of balls remaining is b / (w + I) + w / (b + I). The number of balls selected from Urn B can be any k where 0 :s k :s 4. with Urn A selected last. what is being counted? The problem may be generalized so that Urn A contains n white balls and Urn B contains n . . the problem isn't difficult to solve. Given that k balls are selected from Urn B. the probability that the black ball is not selected is (5 . and we are done. The difficulty is in interpreting the answer. the probability that the white ball is left in the urn is l/(n + I). the probability of selecting Urn A 5 times and Urn B k times. If we change it to 210 (so that the exponent is equal to the total number of balls). What is the probability that the black ball has not been selected? Actually.I white balls and I black ball. As an exercise. 2 8 . Suppose that balls are withdrawn at random until only balls of one color remain.2. An urn is selected at random and a ball in that urn is selected at random and removed. Since these turns are equally likely. This procedure is repeated until one of the urns is empty.e. which is C~).4 Probability 77 the last black ball. the probability of a favorable outcome is k=O L 4 (4 + k) (~)S+k (~) k 2 5 = ~. meaning that 5 + k balls are selected altogether. SO the answer may be written CSO) 2 10 • The presence of a binomial coefficient and a power of 2 makes us ask.1 only introduces a 0 summand. what is being counted? Here are three intriguing variations of the above problem.. 256 Scrutinizing the answer. Urn A contains 5 white balls. we notice that the denominator is a power of 2. generalize the problem so that the urn starts with b black balls and w white balls. is (1/2)4+k (41 k )(1/2). i. Bonus: A TwoUm Problem There are two urns. The favorable outcomes end with a ball chosen from Urn A. Therefore. In making 5 + k selections of the urns.k)/5.
The string AAAAAB. for instance. showing who wins each game. What is surprising about this is that 120 = 6·20 = 6 . Any games after that are considered exhibition games. Thus. Since there are two possible outcomes for each of the six games. (~). Let's suppose that the winner of the series is decided as soon as one of the teams wins three games. Suppose that teams A and B play a series of six games with each game won by one of the teams. there are 26 = 64 possible strings. We put an asterisk (*) in the string at the point where the series is decided. the 60 A:s and 60 B's can be arranged to form all the "tie series" of length 6. . AAA*AAA AAA*AAB AAA*ABA AAA*ABB AAA*BAA AAA*BAB AAA*BBA AAA*BBB AABA*AA AABA*AB AABA*BA AABA*BB AABBA*A AABBA*B AABBB*A AABBB*B ABAA*AA ABAA*AB ABAA*BA ABAA*BB ABABA*A ABABA*B ABABB*A ABABB*B ABBAA*A ABBAA*B ABBAB*A ABBAB*B ABBB*AA ABBB*AB ABBB*BA ABBB*BB BAAA*AA BAAA*AB BAAA*BA BAAA*BB BAABA*A BAABA*B BAABB*A BAABB*B BABAA*A BABAA*B BABAB*A BABAB*B BABB*AA BABB*AB BABB*BA BABB*BB BBAAA*A BBAAA*B BBAAB*A BBAAB*B BBAB*AA BBAB*AB BBAB*BA BBAB*BB BBB*AAA BBB*AAB BBB*AAA BBB*ABB BBB*BAA BBB*BAB BBB*BBA BBB*BBB We see that altogether there are 120 exhibition games. signifies that team A wins the first five games and team B wins the last game.78 2 Intennediate Problems Tie Series: The first variation is a nonprobability version. Let's perform this procedure for all of the 64 series. that is. Thus. Three examples of strings are AAAAAB AABBAB BBABBB. We can represent the outcomes of the games by a string of A:s and B's. with 60 A wins and 60 B wins. the three example strings above become AAA*AAB AABBA*B BBAB*BB. strings with three A:s and three B's. The twenty tie series of length 6 are AAABBB AABBAB AABBBA ABBAAB AABABB ABABAB ABBBAA ABBABA BBABAA BABABA BBAAAB BAABBA BBBAAA BBAABA BAAABB BAABBA.
2. Random City Walk: An object travels along the integer points of the plane.2n . Hence. He selects a matchbox at random and withdraws a match.1) and then hitting the line y = n is the same. n. When the (n + 1)st match is taken. k) and then hitting the line x = n is tr!~~l By symmetry. starting at the point (0.1.. one wants the probability distribution of the number of matches left in the nonempty box. then the expected number of matches left is 2n times this quantity..2n . each containing n matches. n. n . 8The problem comes from Stefan Banach (18921945). We will show that the expected length of the object's path is 2n . that means that the box has been emptied and the box has been selected again.0). . the founder of functional analysis. Is there an aha! proof of this formula? Banach's Matchbox Problem: 8 A mathematician has two matchboxes.E = E(n _k)(n:: This is a telescoping series. .2.. the object moves one unit to the right or one unit up (with equal probability). the probability that any particular match is still in its box is e:)2. attempting to withdraw a match. k) or (k. _ (+k . In Banach's matchbox problem. what is the expected number of matches in the nonempty box? Label the matches in the first box 1. n 1). At each step.1) (l)n+kl 2 n 1 2 ~ 1) (~r+kl Thus. . We can think of Banach's problem as concerning two matchboxes with n + 1 matches each. the expected number of steps to the corner (the point (n. The tie series problem is equivalent to the urn problem since one can ask. n» is 2n . We would like a simple proof that when the experiment is over. if we list all series of length 2n. The computation for the expected number of matches is basically the same as in the random walk problem. in the series problem. The probability of visiting the point (n 1. the expected path length is given by E = 2n  nl k=O 1n L (n ..4 Probability 79 In general. The object stops when it reaches the line x = n or the line y = n.k)2 . for the summand may be written It follows that E = 2n . We can also ask. He repeats this process until. then the exhibition games can be arranged to produce all tie series of length 2n.2. the probability of visiting the point (k. I wonder whether there is a neat bijection proof of the tie series assertion. . what is the expected number of exhibition games per series? This is 2n times the probability that the black ball is not selected in the urn problem. for 0 :s k :s n 1. and those in the second box also 1.2n enn )T2n. with the winning team the first to win n games. The object's last stop before hitting a boundary line is a point of the form (n . he finds that the matchbox he has selected is empty.2n e:)2. .
are disjoint and Pr(E. do: Let k be a random positive integer between 1 and n. Output k. Start with a positive integer n. Let n ~ n k. i. While n > 0. . It follows by the principle of inclusion and exclusion (see Toolkit) that the probability that the circle is covered by the arcs is This formula was found by W. for j f:. GOBBLING ALGORITHM. Stevens. The Gobbling Algorithm Here is a procedure that I call the Gobbling Algorithm.80 :2 Intermediate Problems Random Points on a Circle Given n random points on the circumference of a circle. it can be shown that the probability that there are "gaps" at the clockwise endpoints of i specified arcs is (1 . Gobbling Algorithm Let n be a positive integer. Hence. what is the probability that they are all contained in a semicircular arc? Solution Let the points be Pi. Choose an integer from 1 to nat random. . L. define Ei to be the event that the semicircular arc starting at Pi and going clockwise around the circle contains no Pj. The events E.) = (lj2)nl. Pn • For 1 ::: i ::: n. Repeat this process until you obtain O. Subtract this integer from n and replace n with the resulting integer. . P2 .l ' n Bonus: Random Arcs on a Circle Suppose that n arcs of length a are selected at random on a circle of circumference 1..ia)nl if 1 ::: i ::: LljaJ and 0 otherwise.. the desired probability is = 2n . With what probability is the circumference completely covered by the arcs? Assuming that the arcs are given in counterclockwise order around the circle.
the permutation is (1. we stop. and we see at a glance that it has three cycles. 67).l)/n). we obtain the recurrence relation e(n) = (e(n . 6 Written in cycle notation. The way we have written our example permutation above (on 10 elements). 3 . n. So we subtract. and of course this integer is 1. 4. Now we choose an integer from 1 to 3. let's say we choose 4. Suppose that we start with n = 10.2 = 1. So we subtract. 6 . and the cycles are in order of their first elements.1 = O.1 1) n and it follows instantly that e(n) = 1 + . + . n 1 2 1 3 1 This quantity is the harmonic sum Hn (see p.8)(6.4.4 Probability 81 Let's do an example. Our example consists of four steps (choosing an integer and subtracting). 1 . We choose an integer from 1 to 10 at random.. Having obtained 0. the answer comes from the Gobbling Algorithm..1) + 1) n =e(n1)+. Now we choose an integer from 1 to 1. ( 1 5 234 7 1 8 5 3 678 942 9 10 10) . 1 1 + e(n n e(l)=l.+ . So we subtract. as the algorithm could produce these cycle lengths in a different order. Let's say we choose 2. we can represent every permutation in a unique form that is consistent with the algorithm.3)(2. is this outcome supposed to represent all permutations of cycle type 3 + 3 + 4? Clearly not.+ .7. Starting with a positive integer n. 104 = 6. So we subtract. Bonus: Average Number of Cycles in a Pennutation Choose a random permutation of the set {I. Let's say we choose 3.5. how many cycles do we expect in a permutation of n elements? Surprisingly. 2. 3." . the smallest element in each cycle appears first. 1O}. Which permutations of cycle type 3 + 3 + 4 does this outcome represent? Actually. On average. 6. 3 (in the case n = 10). Then the first number chosen is either 1 (this happens with probability 1/ n) or not 1 (this happens with probability (n . 10). Now we choose an integer from 1 to 6. Thus. What is the relationship between the numbers produced by the Gobbling Algorithm and the cycle lengths of a random permutation? If the algorithm produces the numbers 3. what is the expected number of steps in the Gobbling Algorithm? Solution Let e(n) be the expected number of steps starting with the integer n.9.9.3 = 3.:2. Let's say that a permutation written in this way is in "standard form. say. 5. 4.8.7.
the average number of cycles in a permutation of n elements is the average number of steps in the algorithm. But in our situation. We can also consider a twodimensional version of the Gobbling Algorithm. 4. 1 . starting with n. produces the numbers II. for example. . the order doesn't matter in a cycle type. n). since different orders refer to different permutations in standard form. The probability that the Gobbling Algorithm.. Let II. There is only one choice for the first element of the third cycle (the smallest element not yet chosen). GOBBLING ALGORITHM THEOREM.m . ••. Output (kl. .. i. 6 choices for the second element. Ik be positive integers whose sum is n. 2. so that. 5 choices for the third element.k l .n) be a an ordered pair of positive integers.k2)' Let m 0(. 12. 3+4+3 and 3+3+4 are regarded as the same.. What is the probability that a permutation in standard form of cycle type 3 + 4 + 3 is chosen at random from the set of all permutations of the set {l.82 2 Intermediate Problems Note. Hn. Given an ordered pair of positive integers (m. . .e. and k2 a positive integer between 1 and n. do: Let kl be a random positive integer between 1 and m. 9 choices for the second element. Ik is equal to the probability that a permutation in standard form of cycle type 2 is chosen at random from the set of all permutations of n elements.k2 . 3 are produced by the algorithm! Let's record our finding as a theorem. order matters. While m > 0 and n > 0. n 0(.. 2 choices for the second element. . 2·D Gobbling Algorithm Let (m. As a consequence of the Gobbling Algorithm Theorem. 3. and 8 choices for the third element. what is the expected number of steps in the 2D Gobbling Algorithm? . There is only one choice for the first element ofthe second cycle (the smallest element not yet chosen)..n . Normally. The probability that such a permutation is chosen is therefore 1·9·8·1·6·5·4·1·2·1 10·9·8·7·6·5·4·3·2·1 10·7·3 But this is the probability that the numbers 3. IO}? There is only one choice for the first element of the first cycle (it must be I). and 1 choice for the third element. and 4 choices for the fourth element.
Let's write down the solutions to the Pell equation that we know. + m = m(m + 1)/2. • • ••• ••• • • • •• • • • • • • • • • • •• • •••• • •• •• • • • • • • •• • • •• • •••• •••• • •• • • • • • • • • • •• •• Thus. and 36. we arrive at the equivalent equation This equation is called a Pell equation (see the Bonus).. A square number is ofthe form n2 • So we want a solution in integers to the equation 2=n. (1. So it appears that the pattern. n) = (0.5 Number Theory 83 2. 36 is both a triangular number and a square number.. Find another number greater than 1 that is both a triangular number and a square number. the numbers in each column satisfy the recurrence relation . we make an educated guess that the values in the x and y columns follow a pattern. and (8. We already know the solutions (m. A triangular number is of the form 1 + 2 + . for both columns. Notice that x is odd since x 2m + 1. Let's introduce some variables.1 and 6 = 6· 1 . That is to say.2. 1.0). Solution Obviously. We see that 17 = 6·3 . since 8y2 is even and the right side is odd. 6).5 Number Theory Square Triangular Numbers A child playing with pebbles discovers that she can place 36 pebbles in a triangle with 8 pebbles on a side or in a 6 x 6 square. but we don't see much of a pattern looking at the numbers 0. = 2m + 1 and y = n. Multiplying by 8 and completing the square yields m(m + 1) 2 (2m Letting x + 1)2 = 8n 2 + 1.1). and this condition is automatically satisfied by x in the above equation. 0 and I are both triangular and square numbers. x 3 17 y o 1 6 (trivial) (obvious) (the child's solution) Now. is that you get the next number by multiplying the current number by 6 and subtracting the previous number.O.
" Can you find a nontrivial solution to Brahmagupta's equa Foxy Factorial Recall that n! (. Y = 6·6 . we considered the Pell equation It can be shown that all nonnegative integer solutions to this equation are given by the trivial solution (xo. are called Pell equations. 0). solve X2 tion? 92y 2 = I is a mathematician. and the recurrence formulas Yk = 6Yk1 . Thus.) = (3.  Brahmagupta left us with this challenge: "A person who can. geometry. but they were studied much earlier by Brahmagupta.1)/2 = 49 and n = 35.9 In our problem. find the digits denoted a and b in 23! = 258520Iab38884976640000. the obvious solution (Xl. . then we can find new x and y values as follows: x = 6·17 . ··n. these numbers satisfy Pell's equation: The corresponding values of m and n are m = (99 . y. trigonometry. Bonus: Pell Equations Equations of the form x2 . 1225 is both a triangular number and a square number.I = 35. within a year. and we have 49·50/2 = 35 2 = 1225.on factorial") is the product of the first n positive integers: n!=1·2·3· . analysis.dy2 = I. Without performing multiplications. and number theory. where d is a positive nonsquare integer. Brahmasphutasiddhanta (The Opening of the Universe).Yk2. His most famous work. gives among other things rules for calculating with zero.3 = 99. I). Yo) = (I..84 :2 Intermediate Problems If this is the case. Indeed. Pell equations are named after number theorist John Pell (16111685). k::: 2. 9 Brahmagupta (598670) made contributions in algebra.
. the alternating sum of digits) of n by 9 (respectively. This proves the divisibility rules for 9 and II.. Also. n = dk 10k + . Always Composite Prove that n 4 + 4 is a composite number (see Toolkit). As long as the two factors. Hence.4n 2 = (n 2 + 2 + 2n)(n2 +2 2n). Bonus: Divisibility Rules In the Solution. n 2 + 2n + 2 and n 2 . while the sum of all the digits must be a multiple of 9 (since 9 divides 23!). Hence. (mod 9) Reducing each term with respect to the moduli 9 and 11. • The alternating sum of the digits of a number leaves the same remainder upon division by 11 as the number itself. while the alternating sum of all the digits must be a multiple of 11 (since 11 divides 23!). The only integer solution to these equations is a = 6 andb = 7. a 2 .5 Number Theory 85 Solution Do you know some divisibility rules that might help? The sum of the given digits is 86. 11) is the same as the remainder upon dividing the sum of the digits (respectively. we used two divisibility rules: • The sum of the digits of a number leaves the same remainder upon division by 9 as the number itself. To see how. use the difference of squares factorization. Solution Surprisingly. b . + d 2 + d) + do and n==(I)kdk+···+d2dl+do (mod 11). 11)..a = 1. suppose that a number n has the basel 0 representation that is. the remainder upon dividing n by 9 (respectively. we obtain n == dk + . Note.b 2 = (a + b)(a . the polynomial n4 + 4 factors. are both at least equal to 2. . And this is easily verified: n 2 + 2n + 2 > n 2 . + d210 2 + d) 10 + do.2.2n + 2. For any base b. these same divisibility rules work for b . Hence a + b = 4 or a + b = 13.1 (if b > 2) and b + 1. Thus n4 +4 = (n 2 + 2)2 .2) + 2:::: 2. To prove the facts. the alternating sum of the given digits is 10..b). for all n :::: 2. their product will be a composite number.2n + 2 = n(n .
.. I and I· 1.. . In the first case. but this is impossible since 3 does not divide 8 evenly. + 9 .. + lOll!  I III = III.I + 102 'v'  I + 103  I + . Hence. What is the sum of the digits of S? Solution Here is a simple way to compute S: 9S = 9 + 99 + 999 + .yz . and so 3xy = 0. and hence x + y = 0. . In the second case.. the only integer point on the curve is (0. Using the factorization x 3 + y3 + z3 .3xyz = (x + y + z)(x 2 + y2 + z2 .xz).'v' III 112 S = (1.. IIl2 .x = I. 'v' III where the last summand has III decimal digits each equal to I. 1112)/9.0).3xy = (x + y + I)(x 2 + y2 + I . x + y + I = I and x 2 + y2 + Ixy . x + y + 1 = I and x 2 + y2 + I . The word "folium" means "leaf" in Latin.. y ~~~~+ x A Problem of I' s Let S=I+II+III+···+I.1O x 3 + y3 = 3xy.0).. .. IOIll = 1. we let z = I and obtain I = x 3 + y3 + I . and hence x + y = 2. 'v' 112 IOThis curve was introduced by Rene Descartes (15961650).x).y x = I. this implies that x = 0 or y = 0 (and hence x = y = 0). The only integer factorizations of I are I .86 2 Intermediate Problems Bonus: The Folium of Descartes We will show that the only point on the Folium of Descartes.xy . from which we obtain (x + yf = 3xy.. 9 = 10 ..y . the founder of analytic geometry. I.. .y . from which we obtain 3xy = 8. .xy .xy . with integer coordinates is (0.
. 4. What is the unit's digit of T? Solution The unit's digit of powers of 2 repeats in the pattern 2. there are 12 such blocks and three leftover digits.n This is the composition of II with itself n times. 2 n is a fastgrowing function of n.n 0···0 2 Thus. Thus. the function that doubles each input. Therefore. A Problem of 2' s Let T 2 = 222 . evaluated at 1. A googol is 10 100 . the sum of the digits of S is 12·37 + 3 = 447.. exponential function. The last four digits of S are (1111 . However. 0 Id(l). .6. I followed by one hundred O's. A googol is the smallest number with 101 decimal digits. The term googol was coined in 1920 by Milton Sirotta (age nine). Define h(n) = (flO . so it is greater than a famous number called a googol. 8. i. ..e. i. the quotient consists of blocks 123456790 (oflength 9 and digital sum 37) plus "leftover" digits at the end. Since the exponent of the bottom 2 in T is a multiple of 4. 1 by 9.. i.5 Number Theory 87 In dividing 1 . Thus.0 112) / 9 = 0999/9 = 0111. we notice a recurring pattern due to the fact that 111111111 'v' = 112 9·12345679..2.. Bonus: Ackermann's Function A tower of n 2's.. ~' 222 where the tower of exponents consists of 2222's. much fastergrowing functions exist. Bonus: A Googol The number S has III digits. the unit's digit of T is 6.. define !3(n) h (n) = (f2 h)(l)· . Since S has III = 9· 12 + 3 digits. Similarly. Define II (n) = 2n.e.e..
. For instance.. where the number of 2's is itself a tower of 2's.. etc. 9x9 .. f(4) is a tower of 65536 2's. f(2) = 4. that is. the terms become very large... A function is primitive recursive if it can be obtained by the usual arithmetic operations. as well as composition and recursion in one variable. A Problem of 3' s Let U = 3 . ~~ 332 II Ackermann's 332 function was developed by the logician Wilhelm Ackermann (I 8961 962}.. After these. but not recursion in one variable. f(3) = 16. Ackermann's function 11 is recursive but not primitive recursive. n The fk are faster and fastergrowing functions of n.. It is a tower of 2's..88 our tower of 2's function... define A(n) = (Al 0"'0 Al)(1). 3 ~~ 333 333 1 1 = 9 .. 108 .. Ackermann's function f is the "diagonal" of this process. Continuing in this manner. A function is recursive if it can be obtained as the result of a welldefined algorithm. define 2 Intermediate Problems f4(n) = (/3 0'" 0 /3)(1). 01) 9~~ 332 332 = 1 . We can easily compute only the first three terms of Ackermann's function: f(1) = 2. In general... k::: 2. the number of which is a tower of 2's. 980 . What is the sum of the digits of U? Solution We have U=3 ... 3. The function f(n) can be computed via recursion (it's easy to do so using our definition of fk (n». 89.. ~ n It's difficult to describe f4(n). f(n) = fn(n). ~~ 333 333 where each factor consists of 333 digits each equal to 3.. 9 3~ 3~ 333 333 1)(10 333 1) = = ~(10333 _ 9 9 ~(10666 _ 1 2 X 10 333 + 1) = (9 . . 3x3 . 3 x 3 ..
89. 333 x 333 = 110889. 08. 3 . while 64 x 4 = 256. the sum of the digits of U is 332 + 8 . Write 3 above the radical and 9 below the 11.2. 08. 89 9 2 08 1 89 19 89 63 Now double the number above the radical to get 66. 332 + 9 = 2997. subtract. since 63 x 3 = 189. Looking at the first pair of digits. 3 . 3 3 VII. Write the number under a radical sign. 89 9 208 6_ What is the largest number that we can put in the blank such that this number multiplied by the twodigit number so obtained yields a product less than or equal to 208? It is 3. 89 9 208 Double the number above the radical (the 3) and write the result to the left as a twodigit number with a blank for the unit's digit.JIl. how would we quickly find its square root? A neat square root algorithm is a little like long division. 11.89 9 Now subtract the 9 from the 11 and bring down the next two digits. 3 .JII. and bring down the next two digits. Bonus: A Square Root Algorithm Consider a "toy version" of our problem. . we ask. So put 3 in the blank and above the radical. If we were given this number.JIl. 08. what is the largest square less than or equal to this number? It is 32 = 9. put this number to the left as a threedigit number with a blank for the unit's digit. 08. 08.5 Number Theory 89 Hence. write the product (189) beneath the 208. with pairs of digits separated by commas (starting at the right): Jll. So 110889 is a perfect square.
Fibonacci Squared Let {!n2} be the sequence of squares of the Fibonacci numbers (see Toolkit). We see that the square root of 11089 is 333. y. Find a linear recurrence relation with constant coefficients for this sequence. Solution Start with the relations !n = !n3 = !nl + !n2. Why does this process work? Suppose that in computing the square root of n. Then (1 Ok x f ::: n. the current number above the radical sign is x. the process is over. 89 9 2 08 1 89 19 89 2 Intermediate Problems 63 What is the largest number that we can put in the blank such that this number multiplied by the threedigit number so obtained yields a product less than or equal to 1989? It is 3. 08. To test your understanding of the algorithm. or This inequality is the condition that the number represented by twice the number above the radical (2x) with a digit appended (y) multiplied by the number represented by the digit appended (y) is less than or equal to the current remainder (n . for some k.2y)2 ::: n. where (1 Ok x + 1Ok . above the radical. !n2. 3 3 3 Jll. !nl  .90 3 3 Jll.89 9 208 1 89 19 89 19 89 0 63 663 Because we have obtained a 0 remainder. which represents 10k x. We put a new number. so that the number above the radical represents 10k x + 1Ok .102k x 2 ). 08.2y. try computing the square root of 1530169.
We know that the roots of the characteristic polynomial. the Lucas numbers are 2. The formula given on p. 11.J5)/2. L 1 = I. we introduce the Lucas numbers L n . Thus. 47.L 2x + I)(x + I) = (x 2 . Bonus: Powers of Fibonacci Numbers Let's investigate the same question for kth powers of Fibonacci numbers. ~2 . the characteristic polynomial for this sequence is To simplify further.3x + I)(x + I) = x 3 . x 2 . of a degenerate (collapsed) parallelogram.I. 4. of the Fibonacci sequence are ifJ = (l + J5)/2 and ¢ = (l . it is easy to show that So our formula for the characteristic polynomial in the case k = 2 simplifies to (x 2 . 7.x . It follows that !n2 = c:(ifJ2)n + 2CIC2(ifJ~)n + ci(~2)n. . Using the initial values. We want to find a linear recurrence relation with constant coefficients for the sequence {Ink}. which satisfy the same recurrence relation as the Fibonacci numbers but with initial values Lo = 2. and since ifJ~ = I. the characteristic roots ofthe polynomial for the sequence {!n2 } are ifJ2.!n_2)2 And so we obtain the recurrence relation An aha! proof of the recurrence relation comes from observing that !n2 and !nl are the sides. 1. and !n3 and !n the diagonals. 18. where k is any positive integer. Hence. 3. 29. and I. 57 yields and transposing the !L3 term to the right side gives our recurrence relation.5 Number Theory 91 Square both equations and add: !n2 + !n2 = (fnl _3 = 2!n2 _1 + !n_2)2 + (fnl + 2!n~2· . Thus. an explicit formula for the Fibonacci numbers is where Cl and C2 are constants (we could determine the constants but we don't need them). The method is to use characteristic polynomials (see Toolkit under "Fibonacci numbers"). Let's work out the k = 2 case first (this will reproduce our recurrence relation found in the Solution).2X2 .2x + 1.:2.
This gives us a recurrence relation for the cubes of the Fibonacci numbers: Using the same method.I) = X4 . the characteristic polynomial is (x . for sixth powers. ifk mod 4 = 0. ifk mod 4 = 2. This formula for the characteristic polynomial. for fifth powers. { I (x .I )(x 2 + X . The pattern is evident now.l)(x 2 + L1x . The case k = 3 is similar.4x . we find the characteristic polynomial forthe sequence offourth powers of the Fibonacci numbers. means that the sequence {Ink} of kth powers ofthe Fibonacci numbers satisfies a linear recurrence relation of order k + I with integer coefficients.92 2 Intermediate Problems From this we confirm the recurrence relation found in the Solution. and we can write it for all k ::: I as L(kl)J2J i=O n (x 2 + (_I)i+l Lk2iX + (_l)k).(cp3 + ¢3)X  1)(x 2 + (cp + ¢)x  I) = (x 2 . for seventh powers.I) (x+l) if k mod 4 = 1. found by John Riordan. and for eighth powers.3.cp3)(X .3x 3 .6x 2 + 3x + I.I) = (x 2 . cp¢2 = ¢. cp2¢ = cp. Hence. By the binomial theorem.L3X . .¢3)(X + cp)(x + ¢) = (x 2 . and ¢3. the roots of the characteristic polynomial for the sequence U"J} are cp3.
However. a committee of size k and a subcommittee of size j. the numbers 6 and 20 have the common factor 2. and the numbers 15 and 20 have the common factor 5. the numbers 6 and 15 have the common factor 3. and number theory. they have a common factor. The left side counts the number of ways to choose.2)(2n _ 22)(2n .. I 6 15 20 15 6 1. 13George Szekeres (19112005) worked in geometric combinatorics and graph theory. He made contributions in combinatorics. then ('j) would divide but this is impossible since ('j) > (~). (First choose the committee and then choose the subcommittee.) Therefore. ('j) divides the right side of this equation. (2n _ 2n  l) n! is an integer. Can you think of an identity that relates ('j) and (Z)? We employ the "subcommittee identity" (see Bonus). . as an undergraduate. from an organization of n people. graph theory. the quantity (2n _ 1)(2n .2 3 ) . about Erdos' life and mathematics. (First choose the subcommittee and then choose the committee. as well as relativity theory. So (j) and (~) are not coprime. any two numbers aside from the I 's have a common factor. For instance. I highly recommend George Paul Csicsery's documentary film N is a Number: A Portrait of Paul Erdos. in the sixth row. if (j) and (~) were coprime. Szekeres took only one course in mathematics. Obviously. for every integer n 2:: 1. so it also divides the left side. An Unobvious Integer Prove that.) But the right side counts the same thing.:2.5 Number Theol)' 93 A Delight from Pascal' s Triangle Prove this gem due to Paul Erd6s 12 and George Szekeres: 13 In a row of Pascal's triangle.. the two expressions are equal. e). with 0 < j < k < n. Bonus: The Subcommittee Identity Here is an aha! proof of the identity for 0 ~ j ~ k ~ n. 12Paul Erdos (19131996) was one of the most prolific mathematicians of all time. Solution Suppose that the numbers are ('j) and (Z).
(I. let's give a counting proof for our original problem. there are 2n .•• (2n . A good method for showing that an algebraic expression is an integer is to show that it counts something. and 4. 28..2n . Let's illustrate this method with a very simple problem. where a. i.e.I choices for the first basis vector. I} (see Toolkit). Our quantity counts the number of bases for an ndimensional vector space over the field F = to. as indicated above. then obviously the quantity equals 0. and {(l.2 3 ) . there are 2n . This amounts to showing that the expression (k + I)(k + 2)(k + 3)··· (k + n) n! is an integer for all integers k and positive integers n. there are n vectors in a basis for an ndimensional space. O)}. let's assume that all the factors in the numerator are positive. Of course. for n = I. k ::: 0. there are three bases of the 2dimensional vector space over F. The second basis vector may be any of the 2n vectors of length n except for those that are multiples of the first basis vector. except for the all vector.I )(2n . The third basis vector may be any of the 2 n vectors of length n except for linear combinations of the first two basis vectors. They are {(O. If one of the factors in the numerator is 0. If all the factors are negative. I). A linear combination of two vectors v and w looks like av + {3w. Now. Any of these vectors may be taken for the first basis vector. this quantity is equal to the binomial coefficient (see Toolkit) so it counts the number of combinations of n objects from a set of k + n objects. respectively. {3 E F. {(O. and 840. and there is nothing to prove. Hence. So. there are 22 linear combinations and therefore 2n . For example.2 choices for the second basis vector. I). I)}. Hence. We must show that there are (2n . This is because the rows of such matrices span the ndimensional vector space over F and hence are sequences of n linearly independent vectors of length n. Since there are only two possible multipliers (0 and I). I)}.2)(2n 22)(2n . 3. Let's show that our quantity counts these bases. What about the denominator? It counts the number of permutation matrices (matrices over F with a single I in each row ° .22 choices for the third basis vector.l ) choices for an ordered set of n linearly independent vectors of length n over F. 0). we obtain all the factors in the numerator. (I. Now. Continuing in this manner. 3. (I.94 :2 Intermediate Problems Solution Quick calculations show that the quantity equals I. Prove that the product of any n consecutive integers is a multiple of n!. I think you will guess (correctly) that the term n! in the denominator accounts for all permutations of the n basis elements (since the order of elements in a basis is unimportant). then we may factor out a I from each term and obtain ± I times a quantity in which all the factors in the numerator are positive. A different (although similar) proof is obtained by realizing that the numerator of our quantity is the number of n xn invertible matrices over the field F. one for each vector in the ordered basis. hence it is an integer. 2. There are 2n vectors of length n over F.
5 Number Theory 95 and column). If b is a multiple of p. by Lagrange's theorem (see Toolkit). the proofs don't work when b is not a prime power.bk such that bn .1).1 = n(n ..k. n . there is a multiple of p in the numerator for each term bn . the ratio is an integer.1). this happens whenever p . We carry out this proof by comparing the power of each prime divisor of the numerator and denominator. Since bn . the number of such permutations (n!) divides the order of the group. Fortunately.1 and b).1 I n . in all cases.1). Since the permutation matrices constitute a subgroup of the group of matrices. there are L / p2 J multiples of p2 at most equal to n.k == 1 (mod p). p p2 which is a geometric series with sum n n n pI Since the power of p is an integer. a different (more prosaic) proof works for all values of band n.. if p > 2.k . then. there are Ln/(p . But in this case the quantity is (b 2 .I)J such terms. A prime p divides n! to the power n n The reason is that there are L / p J multiples of p at most equal to n. and we are finished. which is greater than Ln/(p . in the case p = 2. n = 2. However. Hence. it is at most lp~ IJ We will show that the power of p that divides the numerator is at least equal to this number. Is it true that the expression nJ k=O n! is an integer for every pair of positive integers band n? Our proofs using bases or matrices extend to the case where b is a prime power (as we may replace F with a field with any prime power number of elements).I)J. However. + n .::. The above sum is less than or equal to ++"'. the power to which p divides the numerator is at least equal to the power to which it divides the denominator.bk = bk(b n . the inequality goes in the wrong direction.k ranges from n to 1 (as k ranges from 0 to n . k . Since n . If b is not a multiple of p. by Fermat's (little) theorem (see Toolkit). .2. then the power of p in the numerator is in general much greater than the power of p in the denominator.b) 2! which is an integer since the numerator is even (it contains consecutive integer factors b .I)(b 2 . for 1 . etc.::.1)/2 (there is a contribution of k from the factor b k . Therefore. for it is equal to 1 + 2 + .
" we can write this as m 2 (m 2 + 1) m(m 2 + 1) 2 2 Since each of the m rows has the same sum.a)/ p different necklaces. we obtain the congruence a P == a (mod p). (a) Create an order 3 magic square. The reason is that.a necklaces (we subtract the a necklaces made of only one type of bead). without regard to the circular symmetries.96 :2 Intermediate Problems Bonus: Fermat's (little) Theorem We can give an aha! proof of Fermat's (little) theorem (a P == a (mod p). Hence. The sum of all the numbers in the square is 1+···+m 2 . And since p is a prime number. not using only one type of bead. Solution (a) Since 1 + . Magic Squares An order n magic square is an n x n array of integers 1 through n 2 such that the sums along every row.. there are p different rotations of each necklace (think about this!). as shown. this sum is ''. where two necklaces are considered the same if we can rotate one to match the other? (We call the allowed rotations "circular symmetries. for p prime) in the case a ~ 1 via a counting argument. (b) Create an order 9 magic square. there are (a P . taking into account the circular symmetries. and main diagonal are the same. column.= ':' m 2 (m 2 + 1) 2m . + 9 = 45. (c) Create an order 6 magic square.. the constant sum must be 45/3 = 15. From our formula found in "Forward and Backward.") We claim that the number of such necklaces is (a P a)/ p. 8 3 4 1 6 7 2 5 9 (b) Let's compute the constant sum for a magic square of side m. With a little trial and error we find the unique (up to rotation and reflection) magic square. Because the number of necklaces is an integer (our good method is at work again). How many circular necklaces can be made with p beads from a set of a different types of beads. there are a P .
We do a sample row sum. j ::: mn .1.1)/2. However. It's difficult to see how to create such a square from scratch. we can create an order 6 magic square based on the order 3 magic square. j) = a(li/nJ . numbered accordingly. and entries starting with O.5 Number Theory 97 We can create a magic square of order 9 by superimposing an order 3 magic square with itself. (c) The constant for an order 6 magic square is Ill. U/nJ) . j)] is an order m magic square and B = [bU . n 2 + b(i mod n . and number each set of four cells consecutively according to the pattern of the order 3 square. if we order the cells from left to right and top to bottom. Suppose that A = [a(i . we create an order 9 magic square (with constant sum 360). 70 63 68 65 67 69 66 71 64 7 2 3 0 4 8 5 6 I 52 45 50 47 49 51 48 53 46 25 18 23 43 36 41 61 54 59 20 22 24 38 40 42 56 58 60 21 26 19 39 44 37 57 62 55 14 34 27 32 79 72 77 16 9 29 31 33 74 76 78 11 13 15 30 35 28 75 80 73 12 17 10 In order to obtain a magic square numbered 1 through 81. Lj/nJ) . as we can't compose a 3 x 3 magic square and a 2 x 2 magic square (because there is no 2 x 2 magic square). Then we can create an order mn magic square C = [cU .2. j) = L [a(O. we would add 1 to each entry of our square. there is the question of how to number the cells of the 2 x 2 array. For example. This puts a magic square in the same pattern as B in each place in A. 0::: i. j)] is an order n magic square. The idea is to place a 2 x 2 array in each cell of the order 3 magic square. the sum of the elements of row 0: mnl mnl L c(O. j mod n)]  j=O j=O nm(m 2 =  1)· n 2  2 + mn(n 2 2 1) mn(m 2 n 2 2 1) Following our recipe. j)] according to the recipe c(i . the constant sum of an order m magic square is m(m 2 . n 2 + b(O. columns. Here is a numbering that works (found by trial and error or the method of the Bonus): . However. j mod n). we do not obtain a magic square. It is convenient to number rows. In this case.
L L L L L L L L L L L L L L L L L L L L L L L L L U X X X L L L L L L L L L L L L L L L U X X X L L L L V L X X X V X X X V X X X V X X X V X X X V X X X V X X X Each cell above is filled with a 2 x 2 array according to one of three patterns. Let's do some sample computations to indicate that the row.98 2 Intermediate Problems 32 29 30 31 12 9 4 2 I 24 21 3 22 23 17 20 28 25 18 19 26 27 5 6 8 7 10 II 13 16 36 33 14 15 34 35 Bonus: Conway's lUX Method John H. 1 row of V's. L . given an order m magic square. Interchange the L in the middle of the array with the V below it. and X. (The order six magic square above is the case k = I. 4z + 2. and diagonal sums are correct. . Below is the array withk = 4. to create an order 2m magic square. Create an m x m array consisting of k + 1 rows of L's. called the LUX method. Conway invented a way. where m is an odd number greater than I. 4z + I. column.1 rows of X 's. assuming numbering beginning with O. and 4z + 3. according to the LUX numbering. 3 /00U30X3 22 1 1~21 L u x We will create an order 2m magic square.) Assume that m = 2k + I. V. and k . where k ::: I. A cell containing number z in the order m magic square is replaced by four cells with numbers 4z. as shown below.
etc. .. The other row and column sums.1 X's. 1 U. Then all N numbers are equal. and k .2.. we obtain a set of integers with the same property as before.. etc. Suppose that the column 0 elements of the order m magic square are Yo. all the numbers are congruent modulo 2. All the numbers are congruent modulo k. and the diagonal contributions are similar.. 14 Solution Upon removing any number. Since the column contains the left half of k + 1 L's.) + 3m. divide them all by 2. Hence. In this way. + Ymd + 4(k + 1) + 1(1) + 2(k  1) = 8(yo + . Xml. Can you see why an L and U must be interchanged? All Things Being Equal Suppose that 2n + 1 integers have the property that upon removing anyone of them. If the numbers are even.. Suppose that N = k n + 1 integers have the property that upon removing anyone of them.. modulo k 2 . the remaining numbers can be grouped into k sets of size n with equal sums. Let k ::: 2. This implies that the numbers are all equal. The result also holds for rational numbers simply by scaling ("clear denominators" by multiplying by the product of all the denominators). that is to say. Yml. . we obtain the sum 8(yo + ..(2m) 2 This is the correct sum for an order 2m magic square. . the sum of the remaining numbers is even. + Xml) + 3m + 3m = 8 (m3 2 m) (2m)3 . It follows that all the numbers are odd or all even. 14This problem was given in the 1973 William Lowell Putnam Mathematical Competition. which we know is correct from our previous calculation.. we find that the original integers are all congruent modulo 4. . Then the sum of the elements of row 0 in the order 2m square is (8xo + 3) + . Subtracting the remainder modulo k and dividing by k.. Let's also calculate the sum of the elements of column O. they are all equal.. Continuing in this way. . The proof is an extension of the one given above.. subtract 1 from each number and divide by 2. we find that the original integers are all congruent modulo k. + Ym. We can also generalize the problem in another direction.5 Number Theory 99 Suppose that row 0 of an order m square has elements Xo. Show that all 2n + 1 numbers are equal. modulo 8. we obtain a set of integers with the same property as before. Repeating this process. if they are odd. + (8X m1 + 3) = 8(xo + .. the remaining numbers can be grouped into two sets of size n with the same sum.
a. in each coordinate. B. Equal sums mean that in each coordinate.. Now. The idea is that the 2n + I real numbers generate an abelian (commutative) subgroup of the (additive) group of real numbers. in each coordinate..100 2 Intermediate Problems Bonus: The Passage to Real Numbers Consider the generalization of our problem to real numbers. 3. C. 15 For example. this set of numbers doesn 'f have the required property. where Q is the additive group of rational numbers. suppose that n = 3 and the seven numbers are 1 5' "fi. The subgroup is the set of all linear combinations of these numbers with rational coefficients. Show that all N numbers are equal. e) stands for a + b. 3. Suppose that N = 2n + I real numbers have the property that upon removing anyone of them. all the real numbers are equal. Hence. the sum of the values is the same. the entries are in alphabetical order. Combinatorics Now I Know My ABC's An unusual dictionary contains as entries all permutations of the 26 letters A. .. Z. Of course. b. It's easy to show that this representation is unique." In our little example above. we can write each such real number in terms of "coordinates. i. (a. the remaining 2n numbers can be grouped into two sets of size n with equal sums. Thus we have. The realnumber generalization of the k n + I problem is proved in just the same way. We are given that when any number is removed. all the rational values are equal. we are only illustrating how the subgroup is formed.6 (b) How many "words" are between AZBCDEFGHllKLMNOPQRSTUVWXY and ZABCDEFGHIJKLMNOPQRSTUVWXY? JSGary Martin used this idea to solve a generalization of the problem in which the "numbers" are elements of an abelian group (see the May 1988 issue of The American Mathematical Monthly). b.J2 + e Jr. 2.e. Of course. the elements of this group are the only real numbers that exist. the remaining numbers can be grouped into two sets of size n with equal sums. the rational number version of the result that we have already proved! Hence. all numbers of the form a + b"fi + eJr. the subgroup is isomorphic to the direct product group Q x Q x Q. 7. . Jr. As far as our problem is concerned. Therefore. . (a) What is the next "word" after ABCDEFGHIJKLMNOPQZYXWVUTSR? 2. e rational numbers.
+ 2· 2! + 1 . this is R. all permutations of the following 26 .6 Combinatorics 101 Solution (a) Look at the longest decreasing (antialphabetical order) string that ends the word.055.903. Thus. Thus.l)(n . This is ZYXWVUTSR. Packing Animals in a Box Can you put the five 4square "animals" I I Skinny Elly Tippy Knobby EB Fatty into the 4 x 5 box without overlap? (The figures may be rotated and flipped over if necessary. Hence.1 = 372. while the entry number of ZABCDEFGHlJKLMNOPQRSTUVWXY is 1 + 25· 25!.889. In order for the kth letter to advance.2. Then the decreasing string that ends the word is reversed.359. Then our analysis yields the identity n! = 1 + (n .441.k letters must occur. the entry number of AZBCDEFGHlJKLMNOPQRSTUVWXY is 1 + 24· 24!. I!.I)! + . we see that in going from one entry to the next.999.676.. one letter is advanced and the string to the right of that letter is reversed (after switching the letter with the next highest available letter). the letter to the left of this string.. To find the next entry. k=l where ak is the number of letters to the right of the kth letter in the word that precede the kth letter alphabetically. + 25· 25!) Bonus: An Instant Identity Suppose that the dictionary uses n letters and hence has n! entries. the number of entries between the two words is (1 (1 + 24· 24!) .) . is interchanged with the first letter greater than Q that occurs in the decreasing string. the next entry is ABCDEFGHlJKLMNOPRQSTUVWXfZ.489. This means that the entry number of a word is given by 26 1+ Lak(n k)!. (b) From the example in (a). Q.
which way Skinny is oriented. drawnout explanations. This is the essence of an aha! solution: it is a revelation that illuminates a situation. a succinct explanation captures the gist of the situation rather neatly. There are ten gray squares and ten white squares. Professor Harary gave the figures their whimsical names and proposed tictactoelike games in which two players attempt to make patterns of O's and X's in the shapes of the figures. crB Elly ~ o==rTippy Skinny ~ ITIJ Knobby EE Fatty Altogether the animals require nine gray squares and 11 white squares." Solution: Many people who try to solve this problem experiment with various arrangements without success and wonder why it isn't possible. They may eventually come up with valid explanations for why the figures don't fit. . when I took a class on game theory from Frank Harary (19212005) at the University of Michigan. each requires two gray squares and two white squares. In fact. But when the animals are put into the box. who called them "polyominoes. it is natural to ask whether they can be packed into a 2 x 2 x 7 box. in addition to the two genuinely new figures which I call Cornery and Twisty. say. However. So the animals don ' t fit in the box. with several cases to consider based on. which requires three gray squares and one white square. Bonus: Packing 3D Animals A 3dimensional version of the packing problem is worth considering. The 3D figures have the same names as the 2D figures. eliminating long. I composed this problem in 1982. Shade the squares of the box in a checkerboard pattern. the explanations tend to be involved and wordy.102 2 Intermediate Problems Note. There are seven 4cube animals in 3D: ffiBffi Elly Tippy Knobby I I I I Skinny LIIICI Cornery Twisty We can imagine the figures as made out of wooden blocks. The figures were independently introduced by Solomon Golomb. or one white square and three gray squares. Since these figures are composed of 28 cubes. or 11 gray squares and nine white squares. except for Knobby.
Initially. I put a Knobby (K) in the box. the packing is possible. Elly (E). and here is one way to do it. We hedge our bets and hope to come to a conclusion one way or the other. we obtain the paths of all seven particles. Suppose that there is only one particle moving up and down on the line segment. its direction of motion changes while its speed remains constant. The key is: Tippy (T). I found the following type of diagram useful for keeping track of what I was doing. Skinny (S). with three of its cubes in the top layer and one in the bottom layer. I admit that when I first posed the 3D puzzle.6 Combinatorics 103 See if you can accomplish the packing. Linear Bumper Cars Seven particles travel up and down on a straight vertical line bounded by two endpoints. What does its path look like over time? The "triangular wave function" (a) shows the path of the particle as a function of time. Twisty (W). Cornery (C). Did you find a solution? Okay. Fatty (F). . IIKIKIKIIII IIIKIIIII The diagram shows the top and bottom layers of the 2 x 2 x 7 box. Fortunately. Superimposing seven such graphs (b). How many particleparticle collisions occur before the particles again occupy their original positions and are moving upward? Solution A good idea is to start with the simplest situation that shows what's going on in the problem.2. I put forth a little more effort in the positive direction and solved it. We sometimes spend time working in the positive direction (trying to show that something is possible) as well as in the negative direction (trying to prove that it is impossible). they all move upward with the same speed. When a particle strikes another particle. I tried unsuccessfully to find a packing and then spent a good deal of time trying to prove that it was impossible. This is typical of mathematical problemsolving. Knobby (K). or reaches either endpoint.
the pictures of the paths are the same. there is a change in the particles' velocities. v~ and v. The only difference is which particle is on which path. We can see that every particle crosses paths twice with every other particle. (b) isn't the true picture of our sevenparticle system. One has mass mI and velocity VI. the graph of two particles striking each other and reversing direction looks exactly the same as the graph of two particles passing through each other. undergoing either a headon collision (if they are moving toward each other). However. Suppose that the particles collide. or a bump (if they are moving in the same direction with different speeds). The new velocities.104 2 Intermediate Problems (a) time (b) time Strictly speaking. Thus. That is. because when two particles collide they don't pass through each other (they strike each other and reverse direction). we may as well use our picture (b) to solve the problem. the total number of crossings (and hence the total number of collisions) is 7 x 6 = 42 (this counts each collision twice. As a result of the collision. (We . may be calculated by using the principles of conservation of momentum and energy. Since the pictures look the same. In our solution. the other has mass m2 and velocity V2. which is correct). Bonus: linear Elastic Collisions Suppose that two particles (think of billiard balls) are moving on a straight line. a twodimensional picture is worth a thousand words..
so that the particles move around a frictionless circular track (with the '+' direction counterclockwise and the '' direction clockwise). and hence v~ = Vl and v~ = V2. we arrive at equations for the new velocities: vl = V~ = 1 ml m2 Vl ml+m2 2ml Vl ml +m2 + + 2m2 V2.. they will not collide again.6 Combinatorics 105 assume that the collision is elastic.V~ = (Vl . which imply that v~ = Vl and v~ = V2.2.) Thus ml Vl 2 2ml V l + m2V2 I 2 = = ml v~ + m2V~.V2). Solving the equations Vl + v~ = V2 + v~. m+n m+n In this case.V l + . What would the new velocities v~ and v~ be? If we perform the above operations again. Dividing the second equation by the first yields Vl = V2 + V~. That is to say. m 1 v~ + m2 v~ = 0. ml+m2 m2 ml V2. that is. after two collisions the particles regain their original velocities. m n 0== . then we find that (surprisingly) v~ = Vl and v~ = V2. if the particles are moving in the same sense).. we obtain ml(Vl ml(Vl  V~) = m2(V~  V2). respectively. But suppose that they could. the relative velocities of the two particles stay constant (except for a change in sign). meaning that no energy is lost. Hence. 12 + 2m2V2 I 2ml V l + 2 m2V2 • I 12 Combining like terms. The hypothetical situation of two collisions can be realized if we change "linear" to "circular". After two headon collisions (or bumps. This result is easy to show if we adopt the reference frame in which the origin is the center of mass. the particles are back to their original signed speeds. . ml +m2 After the particles collide. we obtain the equations m 1 v 1 + m2 V2 = 0. or V~ . with Vl and V2 replaced by v~ and v~. V~)(Vl + V~) + V~ = m2(V~ V2)(V~ + V2). and v 1 + v~ = V2 + v~.V 2 .
I.048." When you order two sundaes. we have k + n . However. where x is the number of orders of one sundae." Now we observe that (Xii) = (x + l)x/2. Since one of the two consecutive integers must be odd. the toppings selection {cherries. An example of a valid order is {cherries. Suppose that there are x ways to order an individual sundae. The toppings for the two sundaes may be the same or different.1 items in a row. called "duplicate. The subsets represent the selections. nuts.657. A sign claims that altogether there are 1. according to the conditions of the special. chocolate syrup}. You immediately refute this claim. So the problem becomes. 220). the number of orders of two sundaes is 1821 . think of the things to be selected as represented by k copies of the symbol 0. You may choose up to four toppings (repetitions allowed) for each sundae from a set of 12 toppings (cherries. How do we determine x? The number of toppings can be 0. Hence. A quick way to see this is to think of one more way to order a sundae. how many ways may we select four things (allowing repetitions) from a set of 13 things? This is a basic problem in combinatorics. Bonus: The Correct Number of Orders We know from the Solution that the number of orders oftwo sundaes is (x + l)x /2. The number of ways of selecting k things (repetitions allowed) from a set of n things is given by the formula (k+ZI). you choose them from the set of orders of one sundae plus the possibility of "duplicate." When "blank" is chosen.048. because a power of 2 has no odd (proper) factors. .). blank. It follows that the number of orders of two sundaes is (Xii). For example. the product of two consecutive integers divided by 2. Now we can assume that exactly four toppings are chosen (from the new set of 13 toppings). How do you know? Solution Notice that 1.1 vertical lines. chocolate syrup.576 different orders.106 :2 Intermediate Problems I Scream Aha! An icecream parlor has a special where you can order two vanilla icecream sundaes for the price of one. the product is not a power of 2. 3. This contradiction proves that the claimed number of orders is incorrect. Therefore. To explain the formula (HZI) for the number of ways of selecting k things (repetitions allowed) from a set of n things. Applying the formula to our problem we obtain x = (4+IJI) = (~6) = 1820. nuts}. chocolate syrup. cherries. etc. nothing is added to the sundae.576 is a power of 2 (namely. arranged in a row. I. chocolate syrup} and {cherries. blank} is the same as the selection {cherries.110. 2. called a distribution problem. The number of ways to make these choices is (HZI). Let's add an extra topping to the list called "blank. or 4. The set of O's is partitioned into n subsets by n . we will show that the number of orders cannot be a power of 2. 1820/2 = 1. nuts. and we must choose k of them to be O's (the others being I's).
2.6 Combinatorics
107
As an illustration, suppose that we order one sundae with exactly four toppings (repetitions allowed) from a set of three toppings (cherries, nuts, chocolate syrup). The formula says that the number of orders is (4+!I) = (!) = IS, and that each order corresponds to a placement of four a's and two I's in a row. For example, the pattern of symbols for the order {cherries, cherries, nuts, nuts}
IS
001001·
The two a's to the left of the first I signify that two toppings of cherries are chosen; the two a's between the two I's signify that two toppings of nuts are chosen; and the absence of a's to the right of the second I signifies that no chocolate syrup topping is chosen. To test your understanding, list all IS orders and the corresponding patterns of symbols that represent them.
lines Dividing the Plane
Into how many regions is the plane divided by n lines in general position (no two lines parallel, no three lines intersecting at a point)? For example, in the picture below, four lines divide the plane into II regions.
Solution
The book [Ill, by Ross Honsberger, shows solutions to this problem by recurrence relations and by Euler's formula (see Toolkit). The result can also be seen "directly" using the combinatorial meaning of binomial coefficients. Add a line below all the line intersection points (the dotted line in the picture below). Note that none of the lines is horizontal. (If any line is horizontal, just rotate the picture a little.) Think of the dotted line as "cutting off" the configuration oflines; it doesn't change the number of regions bounded by solid lines. Now every region has a lowest point (i.e., a point with a smallest yvalue) except the leftmost region. Moreover, each region's lowest point is the intersection of either two solid lines or a solid line and the dotted line.
108
:2 Intermediate Problems
Conversely, each such intersection is the lowest point of exactly one region. Hence, the number of regions is
1+ n +
(~)
= I
+ n + n(n; I)
= n
2
+; + 2
Bonus: Partitioning Space
Into how many regions is 3dimensional space divided by n planes in general position (no two planes parallel, no three planes intersecting in a line)? You can prove that the number of regions is
By analogy with the planar case, put a new plane below all the intersections of three planes. Tilt the configuration (if necessary) so that no plane is parallel to the xyplane. Now every region has a lowest point (i.e., a point with a smallest zvalue) except one. The intersection of every three planes is the lowest point of exactly one region. This counts all the regions except the ones "cut off' by the new plane. There are
of these regions. So altogether there are I
+ n + (;) +
G)
regions.
In d dimensional space, the maximum number of regions determined by n hyperplanes, i.e., (d  I )dimensional planes, is
A Number that Counts
Prove that
,so
100!. . IS an mteger. 50.2
Solution
The integer has 79 digits, so we may not want to compute it by hand. There is an easy way, however, to see that the number is an integer. A standard technique for showing that a number is an integer is to show that it counts something (recall "An Unobvious Integer"). In this case, the expression counts the ways of pairing 100 people into 50 pairs. The reason is that the numerator, 100!, counts the ways of permuting 100 people. Suppose that once the people are permuted, we take the first two people to be the first pair, the second two to be the second pair, etc. We have overcounted by a factor of 50! (all the ways of rearranging the pairs) and by a factor of 250 (all the ways of switching the two people within a pair). Dividing by these factors results in the correct count. Therefore, the quantity is an integer.
2.6 Combinatorics
109
Bonus: Other large Integers
By our counting technique, the expression
(2n)! n!2n
is an integer for all n ::: 1. It is the number of ways of pairing 2n people into n pairs. More generally, the expression
(mn)! n!(m!)n'
for m ::: 1 and n ::: 1, counts the ways of grouping mn people into n groups of size m, and hence is an integer. You can amaze your friends by claiming (and proving) that 5300! 100!(53!)100 is an integer. You certainly wouldn't want to write the number, as it has 10,319 digits.
A Broken Odometer
Alice and Bill are beginning a monthlong bicycle trip when they notice that Alice's trip odometer is broken. At each mile, Alice's odometer advances the digit in the same place as the digit that Bill's odometer advances, but the digits to the right of that digit (if any) do not advance. Thus, the odometer readings for the first 25 miles of their trip are:
Alice's odometer Bill's odometer
001 002 003 004 005 006 007 008 009 019 010 011 012 013 014 015 016 017 018 028 029 020 021 022 023
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025
110
2 Intermediate Problems
At the end of their trip, Bill asks Alice if she wants to know the correct mileage. Alice replies, "I can figure it out myself from my odometer." Alice's odometer reads 347. How does Alice calculate the correct mileage?
Solution
Alice explains that the rule is to add starting at the left, and take the remainder upon division by 10, to find each digit in tum. So the hundreds place is 3, the tens place is 3 + 4 = 7, and the units place is 3 + 4 + 7 = 14 == 4 (mod 10). Hence the correct mileage is 374. Why does the rule work? Notice that in the normal operation of a counter (e.g., an odometer), only one digit advances at each step of the count (any digits to the right of the advancing digit are set to 0). Hence, each step amounts to adding a vector of the form (0,0, ... , 0, 1, 1, ... , 1) to the count vector and reducing modulo 10. With the broken odometer, only one digit advances, and the digits to the right of the advancing digit do not change. This amounts to adding a vector of the form (0,0, ... , 0, 1,0, ... ,0) to the count vector. Applying Alice's rule to the vector (0,0, ... ,0, 1,0, ... ,0), we obtain the vector (0,0, ... , 0, 1, 1, ... , 1). Therefore, since the rule is linear, the correspondence is preserved at each step of the count.
Bonus: Finite Derivative and Integral
The sequence of numbers given by the broken odometer is called a Gray code. 16 The connection between the normal count and the Gray code count is an example of a finite derivative (going from normal count to Gray code count) and a finite integral (going from Gray code count to normal count). The derivative operator takes successive differences of numbers in the reading, starting at the left. For example, if the correct odometer reading is 457, then the broken odometer reading would be 412. The derivative operator turns the vector (0,0, ... ,0, 1, 1, ... , 1) into the vector (0,0, ... ,0, 1,0, ... ,0). The integral operator, which takes successive sums of numbers starting at the left, performs the transformation in the reverse direction.
How Many Matrices?
The 4 x 4 matrix below has the properties that (1) all entries are nonnegative integers, (2) there are at most two positive entries per line (row or column), and (3) every line sum is 3.
How many such 4 x 4 matrices are there?
16Gray codes, named after their inventor, physicist Frank Gray, are used in some mechanical coding devices.
However. lots of Permutations Prove that given any collection of n d .) In fact. any matrix that has properties (1).e. (2). 545007960. n}.) Let an be the number of matrices of order n satisfying (I) and (2). 2. It is known that the an satisfy the recurrence relation 2 1 2 an = nanI . Show that the result is not true for a collection of d tuples of size n d . then the number of such matrices of order n is n!2 times the coefficient of xn in the power series expansion of (I _ The r = 3 case is miraculously nice! x)(1r)/2 e (3r)x/2.I) an2. and (3). . Conversely. instead. every matrix of the form P + 2Q. 3.. we see that there are n!2 such matrices of order n. where P and Q are order 4 permutation matrices. then the matrices are permutation matrices and so there are n! of them. 000 0 020 i. the number of matrices satisfying our conditions is 4!2 = 576 (the number of pairs of order 4 permutation matrices). (If. Then the numbers an are given by the sequence 1..2n(n . The matrix above can be written as [!H~]+[H H]. .1 • . then the problem of counting the matrices is more difficult. 41514583320. 9135630. 151] that if the line sums are all equal to an arbitrary positive integer r. (2). Richard Stanley has shown [20. 282. if we alter property (3) so that the line sums are all 2. and (3) can be written in the form P + 2Q. (A permutation matrix is a square matrix with a single 1 in each row and column and the rest of the entries 0. are a permutation of S. 21. 202410.. as a permutation matrix plus twice a permutation matrix. has properties (1). n ~ 3. Simply write each '3' as '1 + 2' and split the matrix up as an all O's and l's matrix plus an all O's and 2's matrix.I + 1 distinct d tuples from the set S = {I. we require all the line sums to be I. since there are 4! permutation matrices of order 4.n d . where P and Q are order 4 permutation matrices. in each coordinate.. there exist n of the d tuples which. Therefore. . no simple direct formula for an is known. Using the same reasoning. and with line sums all equal to 2. p..6 Combinatorics III Solution Our solution was found by David Callan.n d .2. Bonus: Arbitrary line Sums Surprisingly.. 6210.
112
2 Intermediate Problems
Solution
Partition the n d d tuples into n d  l pairwise disjoint subsets of size n each, so that each of these subsets consists of n points which in each coordinate are a permutation of {I, 2, 3, ... , n}. (A simple way to do it: for each vector v with I in the first coordinate, take all its cyclic shifts, that is, v, v + (I, I, ... , I), v + (2, 2, ... , 2), etc., where addition is taken modulo n.) Now, to destroy all these subsets, we have to omit at least one element from each of them. Hence, we have to omit at least n d  l vectors, showing that n d _n d  l is tight; it is the largest possible cardinality of a set of vectors with no forbidden configuration. The collection of d tuples in which the first coordinate is not equal to I does not have the desired property, and there are n d  n d  l such dtuples. Hence, the result is not true for n d  n d  l d tuples.
Bonus: Integer Averages
P. Erdos, A. Ginzburg, and A. Ziv proved that given 2n  I integers, some n have an integer average. For example, with n = 5, among the nine integers 7, 8, 3, 4, 7, 0, 10, I, 4 there are five with an integer average, e.g., 3, 4, 0, 10, and 1. The value 2n  I is bestpossible, as a collection of n  I O's and n  II's (a set of size 2n  2) does not have the desired property. We will give a proof by contradiction that draws on Fermat's (little) theorem and the multinomial theorem (see Toolkit). Observe that we only have to prove the result for n prime. For suppose that we have proved the result for a and b. If n = ab, then given any 2n  I integers we can successively find subsets of size a with an integer average. How many such subsets can we find? Upon identifying the first subset of size a, we have 2ab Ia = 2a (b I) 1 integers left. Upon identifying the second such subset, we have 2a (b  I)  1  a = 2a(b  2)  I integers left. Altogether, we can determine 2b  I such subsets, as 2ab  1 = a(2b  1) + a  I. By hypothesis, some b of the integer averages have an integer average, and hence the corresponding ab integers have an integer average. Now, assume that p is prime and the collection Xl, X2, ... , X2p1 of integers has no subset of size p with an integer average. Form the following sum over of all possible subsets of size p:
L
l:;:kl <k2< ... <kp :;:2p!
(Xkl
+ Xk2 + ... + Xkp)PI .
By Fermat's (little) theorem, each summand is congruent to I modulo p. Hence
L
l:;:kl <k2< ... <kp :;:2p!
1==
(2 P I)
p
(mod p).
The binomial coefficient is not a multiple of p (since the numerator contains one factor of p and so does the denominator). The contradiction will arise from showing that the sum is a multiple of p. To see this, note that each monomial contains fewer than p different variables. It follows that the number of occurrences of a given monomial is (fl, where 0 < i < p. Such a binomial coefficient is divisible by p since there is a factor of p in the numerator and none in the denominator.
2.6 Combinatorics
113
Even Steven and Oddball
In the game Even Steven, two players alternately take one or two stones from a pile of
n stones (n an odd number). The object is to take, in total, an even number of stones.
Someone must win, because whenever an odd number is the sum of two numbers, one of the numbers is even and the other odd. Who should win Even Steven, the first player or the second player? The game Oddball is identical to Even Steven except that the winner is the player who takes an odd number of stones. Who wins Oddball?
Solution
The pattern depends on the remainder of n when divided by 4.
n
1 (mod 4) 3 (mod 4)
Even Steven 2nd player wins 1st player wins
Oddball 1st player wins 2nd player wins
For n = 1 or n = 3, the values of the table are trivial. If n = 1, then the first player takes one stone and immediately loses (in Even Steven) or immediately wins (in Oddball). If n = 3, then the first player wins Even Steven by taking two stones (and the second player then takes one stone and the game is over). As for Oddball (when n = 3), the second player has a winning strategy: if the first player takes two stones, then the second player takes one (and wins); if the first player takes one stone, then the second player takes one stone and the first player is forced to take another stone (hence the second player wins). Larger values of n always reduce to the values 1 or 3. Assume that the table is correct for all odd n < N. Now, if N == 1 (mod 4), then the first player wins Oddball by taking two stones, for the game is reduced to the game where N  2 == 3 (mod 4), in which the second player (formerly known as the first player) wins. If N == 3 (mod 4), then the first player wins Even Steven by taking two stones and reducing the game to the game where N  2 == 1 (mod 4) with a second player win (that is, the original first player wins). The other two cases (N == 1 (mod 4) in Even Steven and N == 3 (mod 4) in Oddball) are dealt with a little differently. Whatever move the first player makes, the second player mimics, so that after a pair of moves, either four stones have been taken (two by each player), and the game is represented by exactly the same entry in our table, with the second player winning, or two stones have been taken (one by each player). If two stones have been taken, then the column in the table that represents the game is changed (from Even Steven to Oddball or vice versa) and the row is changed (from 1 mod 4 to 3 mod 4 or vice versa). In any event, we go from one entry in the table (in which the second player wins) to the diagonally opposite entry (in which the second player also wins). The above explanation is a little involved. A simpler explanation comes (as is so often the case) from expanding on the problem. In fact, the expansion is warranted. For what would happen in practical play of the games? The players might not make the best possible moves. For instance, if n = 21, then the first player should win Oddball by taking two stones as a first move. But suppose that the first player instead takes one stone. This leaves 20 stones in the pile and our table doesn't say what to do. Perhaps the second player has a chance to win, or perhaps the first player's move doesn't matter and the first player is still winning. Let's find out what's going on in general by allowing any number of stones (even
114
2 Intermediate Problems
or odd) in the initial pile. If the initial number is even, then both players will end up with an even number of stones or both an odd number of stones; hence, we need to change the goal of the game. Let's say that in Even Steven (starting with any number of stones), the first player wins if he/she takes an even number of stones, and the second player wins if this does not happen. Similarly, the first player wins Oddball (starting with any number of stones) if he/she takes an odd number of stones, and the second player wins if this does not happen. Now we can quickly generate a table showing who wins both generalized games. n Even Steven Oddball I 2nd player wins I st player wins 2 I st player wins I st player wins 3 I st player wins 2nd player wins 41st player wins 2nd player wins 5 2nd player wins I st player wins 6 1st player wins I st player wins We've already determined the n = I row. For n = 2, the first player wins Even Steven by taking two stones, and the first player wins Oddball by taking one stone (and forcing the second player to take one stone). We can generate the next two rows (n = 3 and n = 4) from the first two rows. In general, we determine any row from the previous two rows. Let's do this for n = 3. (We have already determined the n = 3 row, but let's do it again to see the pattern.) In the game Even Steven, the first player wants to take an even number of stones and so does the second player. Thus, the first player looks at the previous two rows (n = 2 and n = I) of the Even Steven column to see if there is a second player win (because he/she will be in effect the second player after the current move). There is a second player win in the n = 1 row, so the first player takes two stones. Now the first player (newly called the second player) wins. A similar situation occurs in Oddball (for n = 3). Both players want to take an odd number of stones. Thus, the first player looks at the previous two rows (n = 2 and n = I) of the Oddball column to see if there is a second player win. There is not a second player win. Hence, whichever move the first player makes (taking one or two stones), he/she cannot win. Therefore, the second player wins. The calculation works similarly for any odd row. The first player always looks at the previous two rows in the same column to see if there is a second player win. If there is, then he/she moves into that position. If there isn't, then he/she cannot force a win and may as well move randomly. The procedure for an even row is a little different. Let's illustrate it for n = 4. In Even Steven, the first player wants to take an even number of stones and the second player wants to prevent this; hence the second player wants to take an odd number of stones. Thus, the first player looks at the previous two rows (n = 3 and n = 2) in the Oddball game to see if there is a second player win (for he/she will shortly be the second player, trying to prevent the opponent from taking an odd number of stones). There is a second player win (in the n = 3 row). Hence, the first player moves accordingly (taking one stone). The case of Oddball is dealt with similarly. The first player wants to take an odd number of stones, while the second player wants to take an even number of stones. Thus, the first player looks at the previous two rows (n = 3 and n = 2) in the Even Steven column to see if there is a second player win. There is not a second player win, so the first player cannot force a win and just moves randomly.
2.6 Combinatorics
115
Try to use the above procedure to determine row n = 5. Remember that in the case of an odd value of n, you look at the previous two rows in the same column to see if there is a second player win. Did you get the same answers as in the table above? Try it for n = 6, as well. Remember that for even rows, you look at the previous two rows in the opposite column. Did you get the same values as in the table above? In our table, we see that rows n = 5 and n = 6 are the same as rows n = I and n = 2, respectively. Since our procedure is defined at every step only in terms of the previous two rows, we are guaranteed that the pattern we see in the first four rows is repeated forever. To play a game, the first player calculates n modulo 4 and decides whether he/she can force a win by using our procedure. If so, the player plays accordingly. If not, he/she plays randomly. The second player does the same thing. If either player makes a mistake (has a win but plays an erroneous move), then the other player determines what he/she needs to win and plays accordingly. Where is the aha! solution in this long discussion? I would say that it is found in the above table. Once we understand how it is generated, we understand everything about the games.
Bonus: Variations on the Games
It's surprising that in the repeating period of four rows, there is not an even distribution between first player and second player wins (there are five first player wins and three second player wins). To gain some perspective about this, we can change the games to allow the players to remove one, two, or three stones at each turn. You might think that this would make no difference to the outcomes, as one and three have the same parity, but this is wrong. The resulting game table is quite different, with a period of eight rows. You can use a modification of our procedure (looking at the previous three rows at each step) to generate the table. More generally, consider the modified Even Steven and Oddball games in which the players may take I through k stones on each turn, where k is a positive integer. Show that the resulting table has a period of 2k + 2 rows if n = 2k (an even integer) and 4k rows if n = 2k  I (an odd integer).
HigherDimensional TicTacToe
Tictactoe is played on a 3 x 3 board. Two players, Oh and Ex, alternately write naughts 0 and crosses X in unoccupied cells of the board, with each player's objective to make "threeinarow" in his or her symbol. The three cells may be connected horizontally, vertically, or diagonally. Two versions of the board are shown below.
#~
It is well known that with bestpossible play by both players, tictactoe is a draw. Neither player can achieve the goal of threeinarow.
.. where the winning sets consist of z together with exactly one of Xi. The extension cubes lie in the "margin. the number of winning lines is Bonus: A General Drawing Strategy Who should win tictactoe on a higherdimensional board? A basic tenet of game theory is that in a "taking game" (where both players take objects to try to achieve a goal). and two diagonal lines.. for each i. Then the winning sets have n elements each and there are 2n . the number of winning lines is the number of pairs of cube in the margin. then the first player could copy the winning strategy and "get there first. tictactoe played on a kdimensional board of side length n. or vice versa. Paul Erdos and John Selfridge proved a general theorem about when the second player can draw in a taking game. Y2. Every winning line in the game cube can be extended by one cube in both directions.e. . so that the goal is to complete three cubes in a line. Suppose that a finite collection {Ai} of nelement subsets of a finite universe are given. Consider the game based on the universe {z. only the first player can win given bestpossible play.nk. On the other hand. for I ::: i ::: n . Hence. how many winning lines are there? Solution A very simple solution uses "outside the box" thinking." So the real question is whether the first player has a forced win or the second player can force a draw.116 2 Intermediate Problems In our problem.e. The goal is to complete n cells in a line. The first player can win this game by first choosing z and then choosing Xi if the second player chooses Yi. we are interested in counting the number of winning lines. If tictactoe is played on a 3 x 3 x 3 cube. There are three horizontal lines. there exist games with 2n . i. . Suppose that there are fewer than 2n . that is..l.Xnl. The same technique allows us to count the number of winning lines in n k tictactoe. then the second player has a drawing strategy. Hence. THE ERDOSSELFRIDGE THEOREM.I . If neither player achieves this. We give a sketch of the proof.1 winning sets in which the first player can force a win.I . Ynd. Now we must show that if the number of winning sets is less than 2n . so altogether there are eight winning lines. X2." i. three vertical lines.1 of them. Put the 3 x 3 x 3 game cube in the center of a 5 x 5 x 5 cube. Yl. The first player to claim all the elements of some Ai is the winner. The reason is that if the second player had a win. This establishes the second half of the theorem. Yi. the part of the 5 x 5 x 5 cube that is not in the 3 x 3 x 3 game cube. The extension cells are in the margin of size (n + 2)k . It's easy to do this for the 3 x 3 board. Xl. then the second player has a forced draw. Place the n k game board in the center of an (n + 2)k board. Two players take turns claiming elements of the universe. Extend each winning line by one cell in both directions. If the number of winning sets is less than 2n .1 winning sets in the . then the game is a draw.
The second player's move removes from consideration all sets that contain the chosen element. so we discount such sets. so that students in the same column work in the same group. where the first player has chosen m of the elements. If these 24 students are all different. the first player can never force a position where the danger is 2n. shift every student in row 1 to the right one place (the student at the end of the . On day 0.2. So the best possible schedule would be a sixday schedule in which every student works with every other student exactly once. then Ex can force a draw. and 4. We will argue that the result of the second player's tum and the first player's tum cannot increase the danger of the position.1 • 21 = 2n. We will give a strategy by which the second player can prevent this. Now we apply the ErdosSelfridge theorem to tictactoe. = 5 and n = 22. Consider the game played on an n k board. for instance. 2.2. that is. The second player chooses the element with the highest score. and 4. 1. and the columns 0. How does she do this over a severalday period in such a way that the number of times that two students are in the same group is minimized? Solution Any particular student will work with four students each day. that Ex draws for k tictactoe on a 5dimensional board of side length 22. 3. At any point when it is the second player's tum to play. Since the second player chose a point with maximal score. Since the danger never increases.1. We say that the danger of any other set is 2m . number the days 0. As long as the number of winning lines is less than 2n . the net result of these two moves is to decrease the danger (or leave it unchanged). Hence the first player cannot win. On day 1. then the danger of that set would be 2n. 2. We will describe a simple way to produce such a schedule.3. The Spice of life A teacher has 25 students. From our formula for the number of winning lines. Now the first player gets a tum. Arrange the 25 students in five rows of five students each. Remember that these sets have size n. Note that the danger of the position after the first player's first move is less than 2n. Also. let the columns be the groups.6 Combinatorics 117 game. we define the "danger" of the position to indicate how precarious the position is for the second player. The danger of the position is the total danger of all the sets. If the first player occupied all n elements of the set. we define the "score" of that element to be the sum of the danger of all the sets that contain that element. The first player's move doubles the score of each element in the collection of sets containing the chosen element. Sets from which the second player has already selected some points represent no danger to the second player (since they cannot be completed by the first player). 1. 3. She wishes to make five groups of five students each.1. and 4. The groups should be changed every day. then the student will work with each classmate exactly once during the six days. Label the rows 0. so he/she will work with 24 students in six days. the criterion is Numerical investigation shows. For each element in the collection.
The columns of this new arrangement constitute day l's groups.y):x. because there is exactly one intersection of any two lines. For example. However.118 :2 Intennediate Problems row gets moved to the beginning of the row). shift every student in row 2 to the right two places (again. 3r + c columns. I. that is. each student works with every other student exactly once. don't change row O. Let's use our method to construct the schedule for a class of 16 students. In the rightward march. Arrange the students in an n x n array. Bonus: A Finite Field Method Would our method work for a class of 16 students (arranged in four rows of four students each)? No. 1. 3. the two students are separated by c columns. in some order.3. 3r + c. a schedule based on a finite field works in the case of 16 students. 2 and 3 are multiplicative inverses modulo 5. let the rows be the groups.1 (mod 5) exists for each r ¥ O. and 4r + c columns on days 0. We just need to prove that r. With this system. Repeat this process on days 2. the method will work for any number n 2 of students. where n is a prime power. To see that we have a complete residue system. respectively (considering "wraparound"). the congruence 2x + 1 == 0 (mod 4) has no solution. In fact. and 4r + c are equal to the numbers 0.y E F}. 2. together with 00 for the last day. First. To construct this field.y):y E F}. + b. the two students are in the same group on some day. The flaw is that the congruence xr + c == y (mod 4) does not always have a solution. b E F. Since one of the numbers is 0. and 4. kEF. 3. For each kEF. the numbers c. This procedure allows every student to work with every other student. with the rows and columns indexed by the n field elements: {(x. using "wraparound" here and throughout).2. 2r + c. and shift every student in row 4 to the right four places. Here is why: If two students are in the same row. On day 5. on day k the groups are the sets of points on the "lines" y = kx On day 00. Hence. {(k. with the second student r rows down (r ¥ 0) and c columns to the right of the first student. because an odd number is not a multiple of 4. r + c columns. then they work together on day 5. Well. These numbers constitute a complete residue system modulo 5. the groups are the columns of the array. We index the days by the elements of F. that is. and 4 (modulo 5). shift every student in row 3 to the right three places. it would not. for a field of order n exists in these cases. Suppose that two students are in different rows. we need a field of 4 elements. Let F be a field of n elements. we require an irreducible polynomial of degree . notice that the congruence xr + c == y (mod 5) has the solution x == r1(y c) (mod 5). and 1 and 4 are multiplicative selfinverses modulo 5. there is a solution x to the congruence. 2r + c columns. r + c. and 4. We will construct an (n + I)day schedule in which every student works with every other student exactly once.
ba} {Oa.) The polynomial x 2 + x + 1 works. 10. (}2 + () + 1 = O. there are only three different powers of ().II. we have our field of four elements. 10. aO. These three elements are the nonzero elements of our field. ba} {~b.II. let's relabel () as a and (}2 as b. la. (}O = 1. Here is the fiveday schedule: Day 0 too. When we include 0. It's easy to figure out addition and multiplication in the field from the two rules.IO. Then. la. we have MUltiplying by ().bO} Day a too. we obtain (}3 = (}2 + () = () + 1 + () = 2() + 1 = 1.bI} {Oa. Ib.2. bI} {OJ. bb} Day 1 too. let's indicate an ordered pair of field elements (x. namely.6 Combinatorics 119 2 over the field of two elements. aa. bb} {Ob. Ib. 11. aO.aI.Ia.ab. ab. according to the recipe given above. Ib.ba} . (This means that the polynomial doesn't factor into linear polynomials whose coefficients are 0 or 1. Since (}3 = 1. ().aO. i. ab. aO. bO} {OI. For ease in reading. For convenience. bb} {OI. a + b = 1 and ab = 1. and (}2 = () + 1.al. aI. bI} {Ob.. bO} {Oa. aa. Suppose that () is a root of this polynomial. since all coefficients are 0 or I.e. y) by xy. 0 and 1. Now we can solve the "Spice of Life" problem for a class of 16 students.
21.al. 3a. 3b}. . bO} {Ob . and points in the interior of T are labeled 1.3 (a "123 triangle"). The analysis is used in fair division algorithms. 2a.aO.lb. points on edge 23 are labeled 2 or 3. T is triangulated into smaller triangles whose vertices are the new points or the vertices of T .120 2 Intermediate Problems Dayb {OO. Points on edge 12 of T are labeled either I or 2. 2 ~~~~3 3 3 17 Spemer's lemma was proved by Emanuel Spemer (19051980). Ib} {20. ab . Finally. 31 . II .Oa . II. bl} Day 00 {OO . 2b} {30.I1 Let T be a triangle with vertices are labeled 1.ba} {OI.la. points on edge 13 are labeled 1 or 3. Ob} {to.2. 2.bb} {Oa . Sperner's Lemma Prove Spemer's lemma: SPERNER' S LEMMA. Some new points are added to the edges and/or the interior of T. la. Then one of these smaller triangles is a 123 triangle. Ol. la. aa. or 3.
and C. Notice that A is labeled 1. There is an odd contribution to s from the case (1) edges. and 3 must be a fixed point. the total contribution to s from the case (2) edges is even. Notice that A. There are two cases of 12 edges to consider: (l) those that are entirely on the 12 edge of the large triangle T. X2 = x~. For. As for case (2). there are an odd number of 12 edges. Therefore. where X = xlA + X2B + X3C. Then f has a fixed point.3.2 Till . We claim that p is a fixed point of f. 18Luitzen Egbertus Jan Brouwer (18811966) worked in analysis and topology. and C as vectors and coordinatize each point x as (Xl. for i = 1.2.0.2 T' . and C is labeled 3. and 3.. 2. and Xi ::: 0. Suppose that f is a continuous map from the unit disk D E R2 into itself.2. i. Hence.6 Combinatorics 121 Solution The aha! realization is that a triangle with an odd number of edges labeled 12 must be a 123 triangle. X3) to the point x' = (x~. and X3 = x. X3).0.). and points labeled 3. B. a point p E D such that f(p) = p.. would be an even number. Since there are an odd number of such switches.0).e. As P is arbitrarily close to points labeled 1. 1. (0. B is labeled 2. points labeled 2. Bonus: Brouwer's FixedPoint Theorem Brouwer's fixedpoint theorem (an important theorem of analysis). BROUWER'S FIXEDPOINT THEOREM.2 Til . We will show that there must be such a triangle. we encounter a 12 edge only when we switch from a vertex labeled 1 to a vertex labeled 2. But we will show that this total. then the total number of edges labeled 12. is in fact odd. then we assign X the label i if Xi ::: X. for i = 1. B.2.. X2 ::: x~. and moving along the edge toward vertex 2. and hence the two sets have the same topological properties. And any point labeled 1. Sperner's lemma implies the existence of a small 123 triangle T'. We assign barycentric coordinates to all points in T (and its interior) with respect to the vertices A. call it s.0). it follows that p is labeled 1. a 12 edge in the interior of T contributes 2 to s.. Now let ABC be partitioned into many small triangles and let the vertices of these small triangles be labeled as follows: If f maps vertex X = (XI. x~.. X2. as it is an edge of two different triangles. This finishes the proof. there exists a point p contained in all the triangles of this sequence. Xl + X2 + X3 = 1. accounting for an odd contribution from case (1) and an even contribution from case (2). B. since the relations XI ::: x~. and (2) those that are not. We can do this because a disk and a triangle are homeomorphic. we conclude that s is odd. and (0. Let the given triangle be T = ABC. nested 123 triangles: ABC = T .2 . and C have coordinates (1. and each vertex must have some label (since the sum of the coordinates of any point is 1) but can have two or even three labels. We demonstrate the result for a triangle (and its interior) rather than for a disk. . If there were no triangle with an odd number of edges labeled 12. We think of A. imply that Xl = x~. starting at vertex 1 on T.. X3 ::: x. 3.18 follows easily from Sperner's lemma. respectively. X2. proved by Luitzen Egbertus Jan Brouwer. Repeating this process yields an infinite sequence of arbitrarily small. x. over all smaller triangles. 2. and XI + X2 + X3 = x~ + x~ + x. Since triangles (with interiors) are compact sets..1).
. Solution The aha! realization is that a generating function underlies the sum.122 :2 Intennediate Problems An Infinite Series Determine the sum L~l nfn/3 n . . almost everything cancels (because of the recurrence relation).x 2) = x.. . Then the generating function is a rational function of the form p(x) where p(x) is a polynomial of degree less than k. Hence f(x)(l ... It = 1.. calculate (ao + alX + .0l2X2 . In this way. .. akl.. we take a derivative.OlIX .. and fn = fnl + fn2. . . and so x f(x) = =Ix x 2 · In order to "manufacture" the n in our sum. + ak_lxk1)(1 ... To obtain p(x). (A generating function is a power series whose coefficients form a sequence of interest. . If we subtract the second and third equations from the first equation. x 2 + x 3 + 2X4 + 3x 5 + 5x 6 + 8x 7 + . . where fn is the nth Fibonacci number. f(x) = x xf(x) = x 2f(x) = + x 2 + 2x 3 + 3x 4 + 5x 5 + 8x 6 + .OlkXk) and discard all terms of degree k or higher. Bonus: Rational Generating Functions Suppose that a sequence {an} satisfies a recurrence relation with initial values ao.. where the Olj are constants. Recall that fo = 0..) Define f(x) = Then L n=l 00 fnxn. for n ::: 2.. x 3 + x4 + 2x 5 + 3x 6 + 5x 7 + 8x 8 + . ai. our sum is determined to be (xf'(x»)lx=1/3 = 6/5.x .
.2x 3 + 2X4 . . there are more ways to make n with an even number of coins than with an odd number. In order to prove our conjecture. and 10cent coins. there are more ways to make n with an odd number of coins than with an even number.3x 5 + .. if n = 10. let's find the generating function of the Lucas numbers L n . 1 + 1 + 1 + 1 + 3 + 3. We calculate and so the generating function is 2x 1 x . Ln = L n..2. Thus f(x) = 1 . 1 + 1 + 3 + 5... while if n is even.x + x 2 .1 + L n2. Let f(x) = ao + alX + a2x 2 + a3x 3 + a4x4 + a5 x5 + .x 2 ' Can you find the sum L~l nLn/3 n? Change for a Dollar Suppose that we have an unlimited supply of Icent. We also define ao = 1. there are seven even ways (1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1. we use the method of generating functions. which satisfy the same recurrence relation as the Fibonacci numbers. where n is small. i.6 Combinatorics 123 As an application. 3cent.e. 5cent. 1 + 3 + 3 + 3. 1 + 1 + 1 + 1 + 1 + 5. n 1 2 3 4 5 6 7 8 9 10 # even ways # odd ways 0 0 2 0 4 0 5 0 7 1 0 2 0 3 0 4 0 6 n 11 # even ways # odd ways 12 13 14 15 16 17 18 19 20 1 9 2 11 3 14 4 17 6 21 8 10 2 13 4 15 5 18 7 For example. We conjecture that if n is odd. 5 + 5) and one odd way (10). with the initial values Lo = 2 and Ll = 1. for n 2: 2. let's generate some data for making the amount n. 1 + 1 + 1 + 1 + 1 + 1 + 1 + 3.. where an is the number of ways of making the amount n using an even number of coins minus the number of ways of making n using an odd number of coins. . Are there more ways to make 100 cents using an even number of these coins or using an odd number of these coins? Solution Rather than try to count all the ways of making 100 cents.
How many different paths can a Rook travel in moving from the lowerleft corner (al) to the upperrightcorner (hS) on the board? Assume that the Rook moves right or up at every step. whose coefficients are positive for even powers and negative for odd powers. . and whole dollars is I f(x) = (1 .x 6 )(1 . fiftycent pieces. and hence also forthe product 1/((1..x 3 + X4 . The other terms make similar contributions..x 2 )(1 x 6 )(I. namely.x 50 )(1 X 100)" Using a computer algebra system.x 20 ). Now.x 2 ) consists of only even powers of x with positive coefficients.x10)(1 . as far as the truth of our conjecture is concerned. ». i.x 5 )(l .x 20 Therefore. dimes.x 2 )(1 . with an > 0 if n is even and an < 0 if n is odd. so that an is equal to the number of ways to make n using an even number of coins minus the number of ways to make n using an odd number of coins. one of the monomials above is selected. since three is odd).x 9 . We have proved our conjecture. we find that the coefficient of x lOO of this generating function is 293. we perform a little algebra on f(x) to obtain f(x) = (l . the term 1/(1 + x 3 ) yields x 3 + x 6 _ x 9 + Xl2 _ X l5 + .. there are 293 ways to make change for a dollar.x)(1 . The same is true for the terms 1/(1 . one path is alcldld5f5flg7gShS. Therefore.. For example. the contribution from this product is "neutral" (it doesn't change the sign of a coefficient of any power of x). For instance...124 2 Intermediate Problems A little reflection shows that I f(x) = (1 + x)(1 + x 3 )(1 + x 5 )(1 + x IO )' This may be seen by examining the contribution to the generating function from each term in the denominator.x)(l .x 20 ) I ___ = I  Since 12 x I = 1+ x 2 + X4 + x 6 + x 8 + x lO + . Bonus: More Change for a Dollar The generating function for making change using pennies.x 25 )(1 . nickels. . and a contribution ofI to the sign of an (which makes sense. the contribution to the generating function from 1/( I . For example. The numerator when expanded is a polynomial. I .x 6 ) and 1/(1 . I +x 3 In the product of such terms.x 3 )(1 .x 5 + x 6 + x 8 . quarters. Rook Paths A chess Rook can move any number of squares horizontally or vertically on a chess board. this accounts for three 3cent coins.x . if the _x 9 term is selected.x 5 ) • (1 . and in particular there are more ways to make 100 with an even number of coins than with an odd number. the coefficients of the generating function f(x) alternate in sign.e.
i. Shifting our orientation. Is it obvious? Hardly. the entry in the (3. We make a table displaying the number of paths.e. 2. we can feed partial data.. Let's consider Rook paths to any square on the board (with the Rook starting on al and moving right or up at every step). The reason is that the Rook's last move must come from one of the squares represented by these entries. 470010. that is.. the diagonal elements. The eighth term.. say. .. for example.9x) . 106. we find that the number of paths to h8 is 470010. 470010.4) position is 4 + 12 + 2 + 5 + 14 = 37. We find each new entry by adding all the entries above or to the left of the given entry. is the number of Rook paths in our problem. The dots in the table mean that we can further generalize our problem by considering arbitrarily large chess boards. Calculating the entry corresponding to each square of the chess board.. So. 106. I 2 5 12 28 64 144 320 2 4 8 16 32 64 2 5 14 37 94 232 560 1328 4 12 37 106 289 760 1944 4864 8 28 94 289 838 2329 6266 16428 16 64 232 760 2329 6802 19149 52356 32 144 560 1944 6266 19149 56190 159645 64 320 1328 4864 16428 52356 159645 470010 If we are lazy doing our sums. into The OnLine Encyclopedia of Integer Sequences (see "What's the Next Term?"). 14. .6 Combinatorics 8 7 6 5 125 4 3 2 abc d e f g h Solution: It's often a good idea to generalize a problem. let's say that the upperleft entry of the table is the number of paths from al to ai. f(x) = x + 2x2 + 14x 3 + 106x 4 + 838x s + 6802x 6 + 56190x 7 + 4700lOx 8 + . f( x) = I ( x 2 Then + J(l .x)(l x (I . 6802.x) ) . I... 56190. Let's prove it.2. Bonus: A Generating Function for the Diagonal Let f(x) be the generating function for the diagonal of our table. 838. l. 14. We find that the sequence (A051708) is I. 2.
where m and n are positive integers. Now. a(2. the sequence a(m. + 2a(m 1.9x) R.x)s + :=:::.2t + 3s t Expanded as a power series.fJ = 3x + I + J(l. using the quadratic formula. We need only concentrate on the function s _2S2 + (3x + l)s 2x' s which.sfJ ' or [a fJ] 2(fJa) I [als 1(als)+I(slfJ) . st(1 . a mathematician who worked in elliptic functions and astronomy. I). x (l . SO we obtain the generating function _:_:""""7_:'.{3)' where a = 3x + I . n )sm t n . I) = I. 4 The diagonal generating function is the coefficient of so.3a(m .9x).xis + x) I ( X 12s2xls+3x2 x (l . 4 . The exponents of x are positive integers. we represent s5 t 7 as S2X 7 .s .I.n I) a(l. 1) = 1.) 2s2+(3x+l)s2x' We see some of the terms of the claimed generating function.2s . the monomials are of the form a (m.x)(1. m::: 3 or n ::: 3. In order to get the generating function for the diagonal sequence l9 . n). We put our function into partial fractions form. It's easy to see that for positive integers m and n. This statement follows from a result in the theory offunctions known as Puiseux's theorem. after Victor Puiseux (18201883).s .n) = 2a(m.x)(1 .J(l .n a(I. It follows that the generating function for the doublyinfinite sequence is a rational function. . n) satisfies a recurrence relation (with initial conditions): a(m. then the generating function of its main diagonal sequence is algebraic.2) = 1.a)(s .t + st) I . we allow arbitrary integer exponents for s. we write as 2(s . Thus. namely. to accommodate terms such as s5t 7. I 2(fJa) sa . n) = 0 if m = 0 or n = O. I] 19 If a twovariable sequence satisfies a linear recurrence relation.2) = 2. a(2.126 2 Intermediate Problems Call the elements of the above table a (m. because no s occurs in it. we make the change of variables t = xis (so that st = x).n) . and set a (m.
or both. (We'll see why this is good shortly.obtaining The coefficient of sO is 2(tJ .3X)2 . we obtain =++.9x and hence g'(x)x(l .f(x)] + [lOx 2 f'(x) + 6xf(x)] + [9x 3 f'(x) f 9x 2 f(x)] = _2X2. Now that we have the generating function for the diagonal sequence.a) J(1 . ". we expand the function by a Laurent series 20 in the annulus lal < lsi < ItJl. Can you find the generating function for the number of King paths from the lowerleft corner to the upperright corner of an arbitrarysize chess board? At each step.inpowersof(a/s)and (s/tJ). we can use it to obtain a recurrence relation for the sequence.3X)2.9x) = g(x)(l .9x) = f(x)(l .) Via logarithmic differentiation.x I .I)a n 20 Laurent by examining the coefficient of xn in the + (IO(n  I) + 6)a n .9)a n 2 = 0.6 Combinatorics 127 For 1/9 < x < 1/9. it is easier to work with g(x) = 2f(x) x = x.x)(1  9x) We have found the last piece of our generating function f(x). the King moves one square to the right. series were introduced by Pierre Alphonse Laurent (18131854).1.9x Note that f and g represent sequences satisfying the same recurrence relation but with different initial conditions. n::: 3.2.l + (9(n  2) .2x 2. meaning that the equations contain only a finite number of derivatives. one square up. The goal is to find an equation satisfied by g and some of its derivatives. Rather than work with f (x) itself. . Such paths are called Delannoy paths. For more information on the method we have used. with polynomial coefficients. g(x) x I . We can read off the recurrence relation for generating function: (n .x)(l .Jf=X 11tC. g'(x) I k ~ Sequences that satisfy such equations are called Dfinite.x)(1 . named after Henri Delannoy (18331915). see [20]. The corresponding equation for f is f'(x)x(l . from which it follows that [xf'(x) .
this is not obvious. I don't know of a counting proof of this recurrence relation.128 2 Intermediate Problems Therefore.l . . we can write the recurrence formula for {an} as (IOn .16)a n . Perhaps you can find one. Surely.(9n .27)a n 2 nl n ~ 3.
129 . the pentagram below yields a child that is selfintersecting.3 Advanced Problems An advanced problem may have an aha! solution. 3. the solutions require advanced techniques and concepts. only that a key step is the product of inspired thinking. You may wish to tum to the Toolkit for some mathematical terms in the statements of these problems. This doesn't necessarily mean that the solution is easy. In some cases. I Geometry SelfIntersecting Polygons Given any polygon. However. join the midpoints of the edges (in order) to produce a new polygon. Notice that the pentagon below yields a "child" (shown with dotted lines) that is nonselfintersecting.
Under what conditions does there exist a similar copy of C arbitrarily I This problem was posed and solved by E. Sinden. N.J5)/2 and form a nonselfintersecting pentagon as shown above. Berlekamp. It's easy to check that the "grandchild" of our pentagon is nonselfintersecting. Bonus: NonIntersecting Transformations Let C be a curve in the plane that doesn't intersect itself. W. and F. Find a polygon that produces a sequence of descendants that are alternately selfintersecting and nonselfintersecting. while the second polygon above produces a sequence of descendants that are all selfintersecting.xd/ (X3 . for = X3 X2 2X2 .( Solution We saw in "A Quadrilateral from a Quadrilateral" that the child of any quadrilateral is a parallelogram and hence all its descendants are nonselfintersecting (or the parallelogram is degenerate and all its descendants are selfintersecting).X2) = <p = (I + .X2) . . (The points' vertical coordinates don't matter. R. x. X2 X3 We set (X2 . The aha! idea is to use the golden ratio.Xl X3 (X2 . suppose that C is piecewise linear.1 = = 1 <pl <p.) Then the horizontal coordinates of the child are in the same proportion as those of the original pentagon. Gilbert. E. so it follows that the descendants of the pentagon are alternately selfintersecting and nonselfintersecting.130 3 Advanced Problems If we repeat this process. For simplicity. a pentagon exists with the required property. then clearly our first example above produces a sequence of descendant polygons that are all convex and hence all nonselfintersecting. However.Xd/(X3 .
and the line segments joining them. Solution Let Wi = Vi . A set of d + 1 points in Rd all the same distance apart. In general. For example. such as between the two points labeled b on the curve below. A bottleneck is a local minimum of the distance between two points on the curve. I= I for each distinct pair Vi. and hence Wi' Wi = 1. and Vn are the vertices of an equilateral triangle. but the picture below conveys the meaning. We will show that the Wi are linearly independent and therefore n . for i. Vn are points in Rd such that Vj .. j < n and i f. note that Vi..1 Geometry 131 close to C without intersecting C? Of course. Note that IWi I = 1. Also. . we must define our terms. This includes scaling and rotation. but the resolution of the problem may depend on "bottlenecks" in the curve. .. is called a regular simplex.. . and hence Wi • Wj = 1/2.1. hard S 5 IVi Vj I don't know what properties of C allow for such a transformation. There is no way to put a copy of the hard S close to the original without overlapping. Suppose that III WI + .Vn . j.1 ::: d.. C C' The curve C' is obtained from C by translating downward a small distance. Regular Simplices Suppose that VI. for each i. n .. Note. Vj. + IlnI WnI = O. as well as translation (but let's exclude reflection). as in the picture below. let's allow any similarity transformation. Show that n ::: d + I. an equilateral triangle is a regular simplex in R2 and a regular tetrahedron is a regular simplex in R3. An example of a figure that doesn't work is a "hard S. for i = 1. .3." made of five line segments. .
sI) (I. + 2an1 = 0. . 0) (s + 1..0). taking the dot product with Wi yields + a2 + . + 2ai + . I) (3... Next.tai = 0. Using the quadratic formula. .132 Taking the dot product of both sides of this equation with WI 3 Advanced Problems yields the relation al + 2a2 + .. Subtracting these equations implies that tal .0) (0.. ....0.0.e. i. + anI 2 2 2 2 2 al I I = 0.Jf+d)/ d. . . there are two choices for the new point. 1.. .0. we obtain two regular tetrahedra with integer coordinates: (1..= . .. We need only determine a new point that is at distance J2 from all of them. 1).. . then a is a rational number.0) (0.1. .. we show that if d is even. (0.1... the Wi are linearly independent and the result follows. s + I. Bonus: lattice Point Vertices We saw in the Solution that the maximum number of points in Rd all the same distance apart is d + 1.0. 1. we have two sets of d + I lattice points: (s . 0. .0.1 s +I By scaling. I) in Rd are all distance J2 apart. 0) (0.I. Therefore. 1) (0. . . 0) (O.. .1). 0). Thus. a). 0. .. .. 0) (0.O.or . ..I.0... Let the new point be (a. The d points (I. For example. where s is a positive integer. with (a _1)2 + (d . + aiI + ai + ai+1 + . 0.0. in R 3 ... . Let d + 1 = S2. Then a = .l)a 2 = 2. A regular simplex exists for each d and is easy to construct..0. . (0. all the ai are equal and thus all equal to 0. We have shown that a simplex in Rd with lattice point vertices exists if d square. Hence. . .. then such a simplex exists only if d square.... .0) (0... . . one with positive coordinates and one with negative coordinates... s . I) (1. + I is a perfect + 1 is a perfect ... s + I) (1. Can we find such a collection of points with integer coordinates? We call a point with integer coordinates a lattice point.. 0. We see from the Solution that if d + I is a perfect square.0) (0.0. for 2 ::: i ::: n .. we obtain two solutions: a = (1 ± .3) (I. 0. .... . ai = al..1. . S2  I±s I 1 I s. a.3. I I I I I I and.
the volume is rational if and only if d + 1 is a perfect square. As in the d = 2 case. the area is also given by the determinant formula I 21 det[VI V3. a).V3. The formula is obvious if d = I. assuming that d is even. (2) d == 3 (mod 4). This contradiction will show that there is no such equilateral triangle. the volume is . we need the formula for the volume of a regular simplex in Rd with edges of length s. Assuming the formula for d .Jd+T/. Now.Jd+T d!2 d / 2 d S • For example. .I by . the determinant formula for volume. The formula is . one yielding a rational number and the other yielding an irrational number. Then s2 is an integer. By elementary geometry./3/ 4. The "height" of the simplex is the distance from the centroid to the point (a.j(j . V2  v311.1 Geometry 133 Consider the case d = 2. 1/ d ./f+d) / d..3. we show that it holds for d. This distance is . The centroid of this collection of points is (l / d. . 1/ d)... This completes the induction and the proof of the volume formula. d· What accounts for this factor? Take d vertices to be standard basis vectors in Rd. is the d dimensional version of the multiplication factor 1/2 used to obtain the area of a triangle in R2. with a = (1 ± . where the rows of the 2 x 2 matrix are the vectors VI . If the vertices of the regular simplex are lattice points. However. shows that the volume is a rational number (when d is even). ..j(j. for edges of length . the denominator of the volume formula is an integer. We will show that there is no equilateral triangle in R2 with integer coordinates. Vdl .fi/12. that we found in the Solution. or (3) d == 1 (mod 4) and d + I is the sum of two squares. A theorem of Isaac Jacob Schoenberg2 says that there exists a regular simplex with lattice point vertices in Rd if and only if (I) d + 1 is an odd square. the volume of a regular tetrahedron (d = 3) with edge length s = I is . The other term in the factor. We must multiply the volume formula for d . Hence. .. then sd is also an integer.I. 2 Isaac Jacob Schoenberg (19031990) is best known for his invention of the spline method of approximation. But this is a rational number! For the general case. V2 .fi. a formula that we found in "Volume of a Tetrahedron. This completes our argument. the area of an equilateral triangle with side length s is s2. Suppose that the triangle has lattice point vertices.. and we conclude that the area is irrational.vdll. d! 1det[vl  1 Vd. .Jd+T I . in this case.Vd.···.V3 and V2 ." We will prove the general volume formula by induction. The method is to calculate the area of the triangle in two different ways.Jd+T d! The general formula follows by scaling..
b and b ~ c imply that a ~ c. It follows by the pigeonhole principle (see Toolkit) that some number occurs at least n + I times. (a. this is the only type of counterexample. The aha! step is to assign to each interval the length of the longest "chain" that begins with that interval. just as well. d)}. cannot be represented by intervals on the real line (try it!). as a chain is a collection of pairwise disjoint intervals and an antichain is a collection of intervals that share a point. a pioneer in lattice theory. The solution to our problem follows immediately from Dilworth's Lemma. 3This formula is credited to R. 3 Let P be a partial order on a set of mn contains a chain of length m + I or an anti chain of size n + I. If any of these numbers is n + I or more. b). called 2 $ 2. (b. This is not the case. then the intervals making up that chain are pairwise disjoint and we are finished. b E S and a E i= b. the elements are noncomparable. the minimum right endpoint) is a point common to the n + I intervals. This partial order. d] if and only if b < c. We say that interval [a. But no intervals assigned to the same number can be in a chain together (an interval to the left would have a greater number than an interval to the right). (d. two elements a and bare compamble if a ~ b or b ~ a. for all a. b. So let's assume that all the numbers are at most n. The maximum left endpoint of the intervals (or. Note that two intervals are comparable if and only if they are disjoint. A chain in a partially ordered set is a collection of elements in which every pair is comparable. . as asserted by the following theorem of Peter Fishburn. However. (c. Otherwise. So every pair of these n + I intervals intersect. The fact that the relation in the Solution isn't reflexive is unimportant. DILWORTH'S LEMMA. Bonus: Dilworth's lemma A generalization of the Problem is worth considering. d). a). An antichain is a collection of elements no two of which are comparable. You may wonder whether every partial order on a finite set is equivalent to an order given by intervals on the real line. A partial order on a set S is a binary relation satisfies the following conditions: • (reflexivity) a ~ on S that a. for all a. Solution Let's define an order on the intervals. b). c). • (antisymmetry) a • (transitivity)a ~ b implies that b i a. (c. and there is a simple counterexample: {(a. Then ~ P A few definitions are needed. where a chain is a sequence of intervals each of which lies entirely to the left of the next. Dilworth (19141993). P. show that some n point in common or some n + I of them are pairwise disjoint. The proof of Dilworth's Lemma is similar to the proof given in the Solution. for all a ~ E S. b] is less than interval [c. + I elements. In a partially ordered set.134 3 Advanced Problems n2 + 1 Closed Intervals + I of them have a Given n 2 + I closed finite intervals on the real line. c S.
000.000 Pr{X .000 fair coins and obtain X heads. p) to indicate that X is the sum of n independent random variables each equal to 1 with probability p and 0 with probability 1 . .000798.000.000) (1) 1.000 ? Solution The X in our problem is called a binomial random variable.000 ~ 0.000.000} 500.3.000 and p = 1/2.000 500.000 Coin Flips Suppose that we flip 1.p. with n = 1. we have _ _ (1.000 2 An approximation is afforded by Stirling's approximation (see Toolkit): It follows that and hence ( 1.000) (1) 1.000 or (B) 0 :::: X :::: 495. (A) X = 500. For 0 :::: k :::: n. A partial order on a finite set is an interval order if and only if it does not contain a copy of 2 $ 2.000 2 ~ 1 Jn500. Which event is more likely.000.2 Probability I . the probability that X = k is given by the formula For event (A). Here the variables are the coin flips.2 Probability 135 THEOREM.000.000. b d a c 2$2 3.500.000. The distribution of a binomial random variable X is denoted by B(n.
then Pr{O::: X ::: LnxJ} = Tn I: (~) k=o < 2.000 and a = 500.n • 2nH (x) = 2. we have 495. In our problem.n (IH(x» = 2nC(x) . This implies that the probability of event (B) is extremely small. where q = 1 . p). B(n.136 For event (B).000 3 Advanced Problems Pr{O ::: X ::: 495. then X has mean JL = np and standard deviation a = Jnpq.OOO} = L (1 'k' 000000) (1) 2 1. For 0< p < l. .define H (p) = . In order to estimate the size.000. Here is a proof.P and the logarithms are base 2. JL = 500.000 k=o If X '" B(n. k=O This concludes the proof. Let y = 1 . This is the entropy function of Information Theory (see Bonus). !). then ~ (~) < 2"H. So. we establish a bound on the tail of the binomial distribution. Then 1 = (x + y)n Therefore. The cutoff point for X is 10 standard deviations from the mean. LnxJ ( ) L ~ < xnx yn y = 2nH (x). if X". CLAIM: If 0 < x < 1/2.q log q.p log p .x.x) .
. occurring with probabilities P and q.000.. x+o+ If X takes two values. This bound is an extremely small number.000. Therefore Pr{O:::: X :::: 495. Suppose that X takes one value after another (independently).5.nC (x) ~ (0. according to its probability distribution. . with strings oand I.. where each Pi :::: 0 and . approximately 1.92 x 10.3. then H(X) = plogp qlogq. Below is the graph of this function.H (x) is called the capacity function. Bonus: The Entropy Function Suppose that X is a random variable that takes values XI. then we say that we receive log2 Pi bits of information.£7=1 Pi = I. Shannon's First Theorem says that there is an encoding of the values of X. . The concept of entropy was introduced by Ludwig Boltzmann (18441906) in 1896. Then the average amount of information obtained per value of X is H(X) =  L n Pi log2 Pi bits. Xn with probabilities PI.000} < (0. no string a prefix of another.9999500005)1.14 x 10 18 ) than the probability of event (B). one on coding an information source and the other on coding over a noisy channel. (We will see more about this function in the Bonus for the next Problem.99995000041665)n. The importance of the entropy function in Information Theory is due to two theorems of Shannon. XI and X2. I) H(p) p The entropy function H(p). respectively. .2 Probability 137 where C (x) = I .22 . Comparing our calculations for the probabilities of events (A) and (B). . then 2. Pn. We write log for log2 and set 0 log 0 = lim X log x = O. i=1 We call H (X) the entropy of X.. so that the average length of the code words is within . If we learn that X = Xi. and Claude Shannon (19142001) was the first to apply it to information sources (in 1948).) If x = 0. we see that the probability of event (A) is astronomically larger (by a factor of at least 4. We also denote this expression by H (p). We discuss Shannon's First Theorem here.495. (0. respectively.
where AI + A2 = I.53. H(X). but within I bit of. on a daytoday basis. A suitable code as guaranteed by ( XI 0.1 0010 0011 X7 0.1 0. leaving a remainder of p q of your amount bet on heads.1(4) = 3.1 0000 0001 Xs X6 0. you lose the amount bet.1 0100 0101 ) . What fraction of your current amount should you bet. and once a dayevery day for the rest of your lifeyou may bet any fraction of your current amount on the event that the coin lands heads. But what fraction should you bet? Think outside the box.47 = 0.2 101 0. with p + q = I and p > q > O. Suppose that you bet AI of your amount on heads and A2 of your amount on tails.1 logO. We wish to show that the best choice . you win an amount equal to the amount bet.1 0. q of the bets will cancel out.1 xs) Xs .0.1(4) + 0. Of course. Let's prove that the hunch is correct. For example. You possess a biased coin with probability 0. In this case.1(4) + 0.2 0. After n days. If you divide your entire fortune on the two types of bets. the expected number of heads is pn and the expected number of tails is q n. because you could lose and then you wouldn't be able to play anymore.47 of landing tails.1(4) + 0.2(3) + 0. Furthermore.1(4) + 0. it doesn't make sense to bet on the coin landing tails (even if you could) because the coin is biased toward heads.53 . It's clear that you don't want to bet all of your current amount.138 3 Advanced Problems I bit of H(X). Specifically. I) 2. if the coin lands tails. with p = 0. A hunch is that you should bet p of your current amount on heads and q of your current amount on tails. If the coin lands heads.2 log 0. some of the bets will cancel out. where the coin lands heads with probability p and tails with probability q.2) Shannon's First Theorem is + 6(0. in order to maximize your longterm profit? Solution Let's solve the problem in general.1 0.1 0.1 Xs 0. which is greater than.6. let's imagine the possibility of placing bets on heads and tails.1(4) + 0. You start the game with $1.9.2 X2 X3 X4 0. Bits of luck You have the opportunity to playa game in which you can make a fortune. the average length of the code words is always at least equal to H(X). this is equivalent to betting 0.2 100 X2 X3 0.53 of landing heads and probability 0. suppose that X is a random variable with the following distribution: X _  (XI 0. The average length of this code is 0.2(3) + 0.1 ~ X6 X7 0. Then H(X) = 2(0.06 of your current amount on heads.1 0. However.
000. o p ?>< p Binary Symmetric Channel (BSC) 0 . Hence. and logarithms are base 2. with equality if and only if AI = P and A2 = q. In the binary symmetric channel (BSC). the coefficient of growth. with 2 as the base: 2en . + q ~2 ) + q logq + 10g(AI + A2) + q log q + log I = 1 + P log P = 1 + P log p = I + P log p + q log q.3. It is known as the channel capacity of a binary symmetric channel. if you were very lucky.2 Probability 139 is AI = P and A2 = q. is maximized when AI = P and A2 = q.53)20. where c = 1 + plogAI +qlogA2. it would take about 21 years of steadily playing the game to gain an expected return of $1. The hunch is that c.000.53. you could win this amount in 20 days by betting the maximum every day. Of course. is sent accurately over the channel with probability p and inaccurately with probability q = 1 . Each occurrence of heads yields a return of 2A I of your amount. We prove this using the convexity of the log function: c = 1 + plogAI +qlogA2 = I + P log p + q log q + P log .000. Hence. Bonus: Channel Capacity The value c = I + P log p + q log q in the Solution is significant in Information Theory. while each occurrence of tails yields a return of 2A2 of your amount. the coefficient of growth is c ~ 0. the chance is (0. after n days.000.p.+ q log p Al A2 q :::: I + P log P + q log q + log (p. or about 3 out of 1. c :::: 1 + P log P + q log q. each binary symbol. the expected value of your amount is (2Ad np ( 2A 2)n Q • We can write this as an exponential function of n. 0 and 1. With p = 0. The channel capacity measures the rate at which information can be reliably sent over a noisy channel.00259841. See the picture below. At this growth rate.
1) r (1. Each player showing a coin will flip hislher coin. . The game is not a competitive one.5. However. The players are not allowed to communicate with each other at any time. so it would appear 4The Joint Mathematics Meetings is an annual event in which members of several large mathematical organizations meet to give talks. which makes sense since a completely random channel cannot convey any information.0) The capacity function c(p). A Game for Noncommunicating Mathematicians You are at the Joint Mathematics Meetings 4 when you are approached by an organizer who tells you that you may participate in a team game in which your team has the chance to win a valuable prize.S) = 0. Specifically. The graph of the capacity function c(p) is shown below. discuss mathematics. You will all gather in a room and. which also makes sense since a channel that is 100% accurate or 100% inaccurate can convey information perfectly. Each player is given a fair coin. and job hunt. at a signal. Shannon's Second Theorem states that information can be sent (using an errorcorrecting code) over a BSC with arbitrarily high accuracy at any rate below the channel capacity. and c(O) = c(l) = 1. the team would choose one member to flip the coin and the team would win half of the time. your team will work together toward the goal of winning the prize. where n ~ 2. Without the ban on communication. (0. What strategy should each player follow in order to maximize the likelihood of the team winning? What is the probability of winning? Solution Let's solve the problem in general for a team of n players. the team cannot communicate. p Notice that c(O. you are told that there are ten team members (including yourself). you may not meet with the other team members to discuss strategy or communicate with them in any way.140 3 Advanced Problems The capacity c (p) of the BSC is defined as c (p) = 1 + P log p + q log q = 1  H (p). each of you will open hislher hand to simultaneously reveal either the coin or nothing. However.1) c(p) (0. The team wins if at least one coin is flipped and all the flipped coins land heads.
ut/(nl) (2) and the maximum winning probability is (3) With two players. we find that Wn is maximized at 1. .p)n. so we can reason that the limit is of the form x . See [13]. with best play. x> l.A. the second quantity is almost the square of the first quantity. With n = 2. (~r (. Let's define a realvariable version of the function: n+oo .2 Probability 141 that there are only two possible strategies for each player: either flip the coin or don't flip it.3. It seems reasonable that the maximum probability of winning in (3) is a decreasing function of n. 1 f(x) = ( 2x /(xl)  I) lX . A calculation with I'Hopital's rule (see Toolkit) shows that the winning probability Wn has the property hm wn(Pn) = . You can use the coin to generate an event with the required probability: express Pn in base 2 and flip the coin until the number generated (heads = I. (This method was the subject of a 1990 Putnam Competition5 problem.) You can handle the case n = 2 in a particularly simple way: flip the coin twice. In fact.p)n (I) (1 . We obtain the probability of the team winning. However. where the value of p is to be determined (0 ::: p ::: I).u)l/(nl) Pn == P = 1. via a binomial expansion: Wn (p) = t. P2 = 2/3 and W2(P2) = 1/3.) (~ + I P pk (l .S. with a superior strategy a twoperson team can do better than 1/4. In (I). tails = 0) deviates from Pn.x 2 is 1/4. wn(p). and anyone who can complete a square knows that the maximum value of x . Using calculus. an nperson team can do better than if they were able to choose two members to flip their coins! Each player should show hislher coin with probability p.x 2 . and everyone flipping the coin is bad because in that case the team wins with the very low probability (l /2)n. ~r r (l . and Canada. the probability of winning if both players flip the coin is 1/4. the probability of one heads and one tails is 2/3. if it lands tails both times. 4 We can give an aha! explanation of this result. 5The William Lowell Putnam Mathematical Competition is an annual mathematics contest open to students in the U. But everyone not flipping the coin is bad because the team automatically loses. do over. The event is that the deviating bit is a O.p )nk = = (1.
" . that is. using l'Hopital's rule: n+oo lim n Pn = In4. The inequality holds by the definition of Pn. can win with the surprisingly high probability n / (n + 1). the expected number of coins flipped? The limiting value follows from (2).. This inequality is equivalent to 2 n /(nl) ."" cp If cp is strictly convex. This is tantamount to one team member "dropping out. This proposition is easy to prove using Jensen's inequality for convex functions (see Bonus: The Hat Problem In the widely publicized Hat Problem (see. p. . [3]). an nperson team (where n is one less than a power of 2). 1]. Furthermore. The guesses are made simultaneously and "passing" is an option.142 3 Advanced Problems It's a tricky calculus problem to prove that f(x) is decreasing. PROPOSITION.. is equivalent to 1 + 2 1/ n + 22 / n + . 1 n n+16 ( i ) 1 nI ( i ) < ." but of course no one member can choose to do so. 2(n+l)/n _ 1' which. + 2(nI)/(nl) n < This last inequality follows from a simple proposition on convex functions applied to the function cp(x) = 2x.. by the formula for the sum of a geometric series. e. each contestant on a team tries to guess the color (blue or red) of a hat on his/her head while seeing only the hats of the other contestants.n n6 nl . for n :::=: 2. Let cp be a convex function defined on the interval [0. the expected number of coins flipped increases with n. the participants are allowed to discuss strategy."" cp . + 2n/ n n+l 1 + 2 1/(nl) + 2 2 /(nl) + . With best play.. The solution is related to the Fano Configuration that we will see in the problem "168 Elements. we can give a short proof that Wn (Pn) is decreasing via the solution to our original problem: wn(Pn) :::=: wn(Pn+d = wn+l(Pn+d. What can we say about n Pn. n :::=:2.38).2 n· 2 n /(nl) _ 1 < (n + 1) .g. then this inequality is strict. Then. Before the guessing round. says that the success probabilities for n and n + I are equal for the optimum probability Pn+ I. which you can prove by direct calculation combining (I) and (2). nPn < (n + I)Pn+l. We see from (2) that the optimum probability Pn decreases to 0 as n tends to infinity. Surprisingly. The equality..2 2(n+l)/n . The team wins if at least one person guesses and no one guesses incorrectly..
2. with n = 3. n::: o.y coordinate system that start at (0. 42. 1430. who studied them in connection with the Tower of Hanoi puzzle. For any I. Recall that the determinant of an n x n matrix A = [a(i.3 Algebra 143 3.. +j For example. for example.0) and stop at (n. n). The figures below show the five different paths with n = 3. For instance. ..3). 5862. form the x matrix whose (i. The lowerleft point is (0. 5. .=1 a(i. I. [19]). Solution Our solution combines the fact that the Catalan numbers count upright paths (as above) with the permutation definition of the determinant.3. 6The Catalan numbers are named after Eugene Charles Catalan (18141894). Prove that for every n the determinant of the matrix is 1. Cn is the number of paths in the x.3 Algebra An Integer Matrix with Determinant 1 The Catalan numbers6 Cn are given by the formula C= n The Catalan sequence begins _1_ n+I (2n). j)j is detA = Lsgn(cr) a n n . moving at each step either one unit right or one unit up and never crossing the line y = x. n I. The determinant of this matrix is 1. we have the matrix n::: nn 2.0) and the upperright point is (3. 429.cr(i». 132. j )th entry is the Catalan number C. 14 ~ ]. 14. Catalan numbers occur in many combinatorial situations (see..
we assume that the path that starts at (1. j .1.(i .1) (0.(i .1). 0) stops at (0. multiplied by sgn(u).1». the contribution to the determinant from these systems of paths is o. Hence. we may assume that the path that starts at (2. Suppose that a path starting at point a and stopping at point a' has a point. j :::: 3. Thus. The next thing to observe is that only the identity permutation yields a system of three paths with no points in common. . The same argument works for all n (the size of the matrix).0) or (1.2) .1» to the points (u(i) . the determinant is 1. the two corresponding summands are opposite in sign.0). (l.. (i .2) (1. . I We claim that if any two paths in such a system have a point in common. 1) and the path that starts at (0. This will make calculating the determinant very simple. (2. the sign of u. Therefore. nth entry of our matrix is the Catalan number Ci+j2. then the path that stops at (2. u(i) . a typical summand in the determinant is the number of systems of three paths from the points ((i . . we need only consider systems of three paths that have no points in common. Consider the path that starts at (2. Similarly. is 1 if u is composed of an even number of transpositions and 1 if u is composed of an odd number of transpositions. 2.1). Hence. 3. as the transposition interchanging a' and b' switches the sign of the permutation. . 2) stops at (2. (22) . then that system can be ignored in the determinant calculation. 2)..0) (1 I) . We'll work out the computations for the n = 3 case in detail. The (i. in common with a path starting at point b and stopping at point b'. 1) stops at (1.1). This doesn't leave any wiggle room. Then switching the parts of the paths after c results in a path from a to b' and a path from b to a' which also have the point c in common.. The starting and stopping points are labeled in the diagram below.1 ) (0. it is the number of upright paths starting at (. If it stops at either of the points (0. stopping at (j . c.. and not crossing the line y = x. I). Hence.0) (I.2). I Since there is only one allowable system of paths (and it corresponds to the identity permutation). for I :::: i :::: 3.I) (2. n} and sgn(u).2) will intersect it.144 3 Advanced Problems where u ranges over all permutations of the set {I. In the determinant calculation. for 1 :::: i. (2. The only allowable system of paths is the collection of nested right angles in the following diagram.1).1.2) .
n+1 n:::: l. CnH is odd if and only if Cn / 2 is odd. From the formula Cn = e:)/(n + 1). a pattern emerges: n 0 2 3 Cn Cn mod 2 2 5 4 14 5 42 6 132 7 429 8 1430 o o 0 o 0 Based on the data. an odd number. for some integer k. We will use the fact that the Catalan numbers satisfy the recurrence relation nI Cn = LCiCnIi. This completes the induction. for some k.3. then (n2)/2 Cn+1 = 2 L CCni i=O + C. then from the recurrence relation.I. k:::: l.1 (mod 3). and 0 = 20 . Let's prove this by induction. (It's easy to prove this relation by evaluating the quotient Cn / CnI in terms of the formula and canceling lots of terms. i. i=O n:::: l. we obtain a recurrence relation whereby each Catalan number can be computed from the next smaller number: 4n 2 Cn = CnI. we have (n + I)Cn = (4n .2)Cn l. (This is easy to prove from the definition of Catalan numbers as counting upright paths. By the induction hypothesis. we guess that Cn is odd if and only if n = 2k . Now consider Cn + I. The claim is true for n = 0. as in the Problem). (nl)/2 CnH = 2 L CiCni. If n + I is even. Hence. Assume that the result holds for all Catalan numbers up to and including Cn . n + 1 = 2k + 1 . and hence (n + I)Cn == (n + I)Cn . What about Cn mod 3? We will prove that the remainders modulo 3 of the Catalan sequence occur in groups of three identical terms: C 3k1 == C3k == C 3kH (mod 3). .I. If n + 1 is odd./2' which is odd if and only if Cn / 2 is odd.l..e.) Multiplying by n + 1. this occurs if and only if n/2 = 2k . since Co = I.3 Algebra 145 Bonus: The Catalan Numbers Modulo 2 and 3 If we look at the Catalan numbers modulo 2.I. i=O which is even.
and the solution 1 satisfies the equation z2 = 1. Solution The key is a formula for computing cyclotomic polynomials: znl=n<l>d(Z). 1. where ~ = e 2ni / n and gcd(k. n) = 1. then <l>2n(Z) = <l>n(z). and i. we obtain C 3k+l == Much more can be discovered about the Catalan sequence modulo 3. (2) Ifn is odd.i)(z + i) = z2 + 1. Try to find more patterns yourself and see if you can prove them! Only 1. We will employ three consequences of this formula: (1) For p prime. 1. is the monic polynomial whose roots are the distinct primitive nth roots of unity: I<k<n gcd(k. <l>p(z) = Zpl + . We call this polynomial. with din. the solutions i and i do not satisfy any equation zn = 1 with 0 < n < 4. din n::::1. 1. then the cyclotomic polynomial <l>n(z) has no coefficients other than 1. and O. the primitive nth roots of unity are given by ~k. the cyclotomic polynomial of order 4. i. We call i and i primitive 4th roots of unity.. Prove that if n has at most two prime divisors. denoted <l>n. and O. For n :::: 1.. There are cJ>(n) primitive roots of order n (where cJ> is Euler's totient function). and we create the monic polynomial of minimum degree that has these numbers as roots: (z . . Letting n = 3k + 1.146 3 Advanced Problems Letting n = 3k. Find a value of n for which the cyclotomic polynomial <l>n (z) has a coefficient other than 1.1 is a primitive dth root of unity for some unique value of d. The solution 1 satisfies the equation Z1 = 1. denoted <l>4(Z). The cyclotomic polynomial of order n.n)=1 The degree of <l>n (z) is cJ>(n). we have C 3 k C3k (mod 3). 1. + 1. Therefore == C 3kl (mod 3). 07 The four complex number solutions to the equation are 1. However. The formula works because every root of zn .
. ..I.~k) = <l>n(z).. there exist integers rand s such that (p .(n/d). . 0. z..3.l I d. then n/d is squarefree. so that p~ll .L(n/d) f:. Pb and so If f.pq . Furthermore. d'lpl···Pk n We see from (1) and (3) that if n is divisible by only one odd prime. then the coefficients of <l>n (z) are alII. pZk. 1.1 and hence zP . gcd(k.. or O.. + 1.(zP I)(zq 1)' We know that the rational function above is equal to a polynomial of degree </J(n) (pI )(qI) with integer coefficients. We will show that the coefficients of this polynomial are all 1.I)(z ..1 <l>p(z) = . otherwise..I)(q . pZk (canonical factorization). We have (zpq . defined for nonnegative integers as follows: if n = 1.. q) = 1. Thus we may restrict the product to divisors of the form d' p~ll ..= Zpl + . we have zP 1 = <l>l (z)<I>p (z) = (z I)<I>p(z). where f. din n 2: I. Proof of (2): If ~ is a primitive nth root of unity. then <l>n(z) has coefficients only ±I and O.1) <I> (z) ...n)=l Proof of (3): We can "invert" our formula using Mobius inversion (see [5]) to obtain <l>n(z) = n(zd _I)J.l where d' I Pl .. pZk. Since gcd(p..n)=l gcd(k. then Proof of ( 1): From the formula.L is the Mobius function. Our treatment is based on [14].1) = rp + sq. then ~ is a primitive 2nth root of unity.3 Algebra 147 (3) For n = p~1 . Now we will show that if n is divisible by only two distinct odd primes. Hence <l>2n(Z) = n (z + ~k) = (_I)t/>(n) n (z . the number of primitive 2nth roots of unity is the same as the number of nth roots of unity. as </J(2n) = </J(2)</J(n) = </J(n). if n is a product of k distinct primes.
1)(q . For example. that we can take rand s to be nonnegative integers. and 1. Such polynomials are called "flat polynomials.0. }=s+l I: zjq). L(tq)j = j=O L j=s+! (tq)j. in 2006 Gennady Bachman [1] proved the existence of an infinite family of cyclotomic polynomials of order pqr (where p. since pq + I > pq. and (3). is a root of this polynomial. 1.zpq (. The elements of G are all possible finite strings of s's and t's. 168 Elements Let G be the group given by the presentation Show that G has 168 elements. and indeed the cyclotomic polynomial cf>lOS(Z) has the terms 2z 7 and _2z4!. and hence Now consider the polynomial f(z) = (t ziP) 1=0 (t zjq) . Since an arbitrary primitive pqth root of unity. G contains the string ssstttststst. 7 . each coefficient of the polynomial is 1. Let t be a primitive pqth root of unity." The smallest example has order 3 . r are distinct odd primes) with coefficients only 1. Note.148 3 Advanced Problems Furthermore. }=O I=r+l I: ziP) (. t. it follows that f(z) = cf>pq(z). that if a cyclotomic polynomial has coefficients other than ± 1 and 0. By inspection. . It follows from our work above and formulas (1). In fact.1) = </J(pq). but it is not a sufficient condition. or O. Bonus: Flat Cyclotomic Polynomials The condition that the order n of a cyclotomic polynomial is divisible by three distinct primes is necessary for the polynomial to have coefficients other than ± 1 and 0. q. The smallest number with three distinct odd prime factors is 105. rewriting the above relation as pq + I = (r + l)p + (s + l)q. (2). 11 = 232. then its order is divisible by three distinct prime numbers. we see. and the degree of the polynomial is (p . Then r ql s pl L(tP)i = i=O L i=r+l (tP)i.
Now we go about describing the strings that do not occur. since the equation (st)3 = 1 implies that ts 6t = sts. and the expression on the right has only one t (versus the two t's on the left). If x E G. The first is a criterion for reducing strings. The second is a method of showing that the reduced strings are distinct. an element of G consists of alternating powers of s (where the exponents are between 1 and 6) and terms of t. Let's identify two equations from the presentation. There are 7 x 7 = 49 such strings. The total number of such strings is 168. when we say that a number or a string of numbers does not occur. etc. we want to show that every string of s's and t's reduces to one of 168 different strings. (B) Strings of the form sa t sb. then we denote xx by x 2 . From (1b). There are 7 x 2 = 14 such strings. leaving as the only possibilities for strings those on our list (A)(D). the string tst does not occur. In fact they are. our example string ssstttststst reduces to the string In this problem. There are 7 such strings. the substring ts 6t does not occur. For example. and from (1c). xxx by x 3 . We will show that every element of G is equal to a string of one of the following types: (A) Strings of the form sa. There are 7 x 7 x 2 = 98 such strings. We abbreviate this by saying that 6 and 1 do not occur. (D) Strings of the form ts 2ts 4ts b or ts 4ts 2ts b . where these numbers refer to the exponents of s. with several variations: (1) (st)3 = 1 (la) ststst = 1 (1 b) ts 6t = sts (1 c) tst = s6ts6 (2) (S4 t )4 = 1 (2a) S4 t S4 t S4 t S4 t = l. 2).3. The method of proof is to show that many substrings do not occur. which has 168 elements. Solution The "aha!" realization consists of two parts. Let's consider only strings with a minimum number of occurrences of t. An element of G may be written as a string in many ways. we mean that the string . the string ts 6t does not occur. At this point we do not claim that the above strings are all distinct. To be precise. We denote XO by 1. So our task is to prove that every element of G is equal to one of the above strings. (2b) ts 4ts 4t = s3ts 3 (2c) ts 3ts 3t = S4ts4 (2d) ts 4t = s3 ts 3ts 3. (C) Strings of the form sats 2ts b or sats 3ts b .3 Algebra 149 Multiplication occurs by concatenating strings. but this follows from the existence of a representation of G by the matrix group GL(3. Because of the equations t 2 = 1 and (st)3 = I. We can say that certain substrings of an element do not occur. Note that because of the equation t 2 = I.
35. 25 does not occur. 25. 22 does not occur. or three t's. (A) and (B). we obtain (3) ts 2t = tsttst = s6ts5ts6. we obtain ts 3ts 4t = ts3(s3ts3ts3) = ts 6ts 3ts 3. does not occur. Hence. 34. we obtain (4) ts 2ts 2t = s6ts5ts6s2t = s6ts5tst = s6ts5s6ts6 = s6 ts 4ts 6. Hence 45 does not occur. two. 52 does not occur. which reduces since the right side contains a 6.4. the string 33 does not occur. the nonexcluded words have zero. From (3). By symmetry. and from (6) that 32 does not occur. 3. which reduces since the right side contains a 32. (6) ts 5t = ts 4ttst = s3ts3ts3s6ts6 = s3ts3ts2ts6. and beginning and ending with at. and from (2c). These strings comprise (C). we can change a 2 to a 5 (and vice versa). which reduces since it contains a 25. 424 does not occur. From (Ic). From (3). 353 does not occur. By symmetry. we obtain (5) ts 5t = tstts 4t = s6ts6s3ts3ts3ts3 = s6ts2ts3ts3 and. 52. we see that we can change a 4 to a 3 (and vice versa). The cases of zero and one t are. 43. From (2d). 44. Now we see from (5) that 23 does not occur. 242 does not occur. From (I c) and (2d). Hence. where c = 2. 33. Hence. 45. the strings that we have shown do not occur are I. which reduces since it contains a 6. From (3). 34 does not occur. respectively. From (2d). alternatively. Thus. or 5. From (2d). which reduces since the right side contains a 6. Hence.) From (2d) and (Ic). 23. 55 does not occur. and 53. separated by t's. the string 44 does not occur. since no word with four t's can occur (we have excluded all triples of exponents of s). 32. 54. From (Ic). The case of three t's looks like sats 2ts 4ts b or sats 4ts 2ts b (the only pairs are 24 . From (2b). From (3). The case oftwo t's looks like satscts b . we obtain (ts 2t)S4(ts 2t) = (s6ts5ts6)S4(S6ts5ts6) = s6ts5ts2ts5ts6. 42. one. 535 does not occur. Thus. we obtain ts 2(ts 5t) = ts 3s 6(ts 5t)s6s = ts3(s6ts5ts6)s = ts 3ts 2ts. 6. Similarly. The only pairs left are 24. and 55. Similarly. We have established that the number of words is finite. (The symmetry comes from the symmetry in the exponents of s in the formulas (3) and (2d). However. 2 can become 5 (by (3» and 3 can become 4 (by (2d». 43 does not occur.150 3 Advanced Problems consisting of the corresponding powers of s. we obtain ts 3ts 5ts 3t = s4(s3ts3ts3)s6(s3ts3ts3) = s4(ts 4t)S6(ts 4t). To summarize. we obtain ts 5ts 5t = ss6ts5ts6s6t = sts 2ts 6t. we obtain ts 4ts 5t = s3ts3tst = s3ts3s6ts6. so in fact we have c = 2.3. 22. Hence.
q). This we do by furnishing a representation of G with 168 elements. The general linear group GL(n. We now need to show that these strings are distinct. there are qn . This situation reminds me of that of chess master Pedro Damiano (14801544).3. Similarly. who analyzed a particular chess opening. 2) has six elements and is in fact isomorphic to S3. Given the first row. block designs. I}. The Fano Configuration is named after the geometer Gino Fano (18711952). The case 42 is dealt with similarly.q choices for the second row. For example. Continuing in this manner.1 choices for the first row of an invertible n x n matrix (the all D row is excluded). In fact. and recommended against playing it. 7In Fano's geometry. The group is G L (3. Such are the vagaries of naming conventions. Let's determine the order of GL(n. . where p is a prime. There are qn . Hence. only to have it named after him (Damiano's Defense). Now we know that G consists of at most 168 elements. such as projective planes. the second row can be any of the qn possible n tuples except the q scalar multiples of the first row. The Fano Configuration (FC) is shown below. 2)1 = (2 3  1)(23  2)(2 3  22) = 7·6·4 = 168. Let's look at the configuration and observe some of its properties. and difference sets. we can take a = D via the transformation followed by changing 53 to 24 (by (2c)): Performing this transformation a times results in a string with a = D. as 35 can become 42 and 53 can become 24). we find that the number of invertible matrices is In particular IGL(3. There are qn .1 The Fano Configuration is the prototypical example of many types of combinatorial structures. These cases are thus covered by (D). q) is the multiplicative group of invertible n xn matrices with coefficients in the field of order q = pk. found it wanting.3 Algebra 151 and 42. 2). The group Aut FC (to be defined) is isomorphic to GL(3. as evidenced by our set of reduced strings. GL(2.q2 choices. 2). what we call the Fano Configuration was specifically excluded. the group of 3 x 3 invertible matrices over the field {D. the third row can be any of the qn ntuples except linear combinations of the first two rows.
We will now show that Aut FC is isomorphic to GL(3. 6 .. 3. 3. Suppose that 2 is mapped to 2'. 4. V2.g. Hence. 4. The above properties occur in pairs called duals. they have no Euclidean meaning. This automorphism group is the group of permutations of the vertices of FC which preserve collinearity. v = 010101 E F6. Every two lines intersect in exactly one point. For example. Now we know that Aut FC is a group of order 168. We observe that FC has the following properties: I. The vectors have been chosen so that VI. 2). denoted Aut FC. as shown below. Every line contains three points.. Aut FC is isomorphic to a group of matrices over a finite field. collinearity is preserved. 5. e. 2. We begin by calculating the order of Aut FC. The cardinality of Fn is 2n. Call this point 3'. 2. Therefore. We next determine the automorphism group ofFC. Vertex 4 is not on line 123. We label the vertices of FC with the seven nonzero vectors in F 3 . V3 are collinear if . Every point lies on three lines. 6 is collinear with 2 and 4.g. There are seven points. 5. and let F n be the vector space of ntuples of elements of F. 4 = 168 automorphisms. The lines are just unordered triples of points (e. so its image 4' can be any of the remaining four vertices. This particular permutation is written in cycle notation as (142)(356)(7). the images of the other points are all determined by collinearity: 5 is collinear with I and 4. each property is transformed into its dual property. vertex 3 must be mapped to the unique point collinear with I' and 2'. {I. This labeling is derived from the labeling in the previous picture by assigning to each vertex i the vector which represents the number i in binary. Let F be the field of two elements {O. and 7 is collinear with 3 and 4.152 3 Advanced Problems 2~~~~~~4 6 The points of FC are labeled I. Finally. In fact. Every two points lie on exactly one line. In order to preserve collinearity. 3}). If the words 'point' and 'line' are interchanged. 6. Suppose that I is mapped to I'. if we rotate FC clockwise by onethird of a circle. A vector v E F n is represented by a string of length n over F. Vertex 2 may be mapped to any of the remaining six vertices. vertex 1 may be mapped by an automorphism to any of the seven vertices. 6. there are 7 . There are seven lines. It is evident from the picture of FC that all seven vertices are equivalent in terms of collinearity. and 7. I}. 2.
SL(n.q):::::: F \ {O}. Aut Fe is isomorphic to the group of 3 x 3 invertible matrices over F. all symmetries of the triangle (permutation matrices) are combinations of a reflection and a rotation. we have GL(n.3. the element STS 2 T is a transvection (the identity matrix with an extra I in an offdiagonal position). It is easy to check that this action preserves collinearity: VI + V2 + V3 = 0 {:} (VI + V2 + v3)M = O· M {:} vIM + V2M + V3M = O. for all n 2: 2. a transposition of two of its vertices) and the element (S2 T S2)2 T is a rotation of the triangle by onethird of a circle. The "visible automorphisms" of Fe are the symmetries of the equilateral triangular given by the elements of the symmetric group S3. for T is a reflection of the triangle (i. where F is the field of q elements. and 4. The matrix group GL(3.. Fe is a geometric model of SL(3. 2) (:::::: GL(3. By direct calculation we see that the rows of M are the images of the binary representations of I. In fact (see [18]). 2) acts on the vectors of Fe by the rule: V 1+ vM. Furthermore. 001 010 1I0 100 The special linear group SL(n. q) consisting of n x n invertible matrices with entries from the field of q elements and determinant I. From the transvection. These symmetries are combinations of S and T. Let We observe that T yields a flip of Fe around the 374 axis while S yields the 7cycle (l 5 6 7 2 4 6).q)/SL(n. 2. We will show that all 168 matrices in the automorphism group of Fe are generated by combinations of S and T. Therefore. Let's investigate possible generators for Aut Fe. and hence For all n 2: I. The simple groups are crucial to the study of algebra. The quotient group is given by GL(n. 2) is a simple group (a group with no nontrivial normal subgroups). q) is the normal subgroup of GL(n. 2)). 2). 2) :::::: SL(n.3 Algebra 153 and only if VI + V2 + V3 = 0 (in F 3 ).e. we can produce all transvections via .
Prove that the binomial coefficient Solution A much more general result is true! We will prove that the binomial coefficient (Z) is odd if and only if the binary representation of n contains a 1 in every position where the binary representation of k contains a I. k ~ 2m . Letting u = (St)I. This tiling is shown below. 3.154 3 Advanced Problems conjugation by permutations. all invertible matrices can be formed from permutation matrices and transvections. Using elementary row operations. and u: (s.4 emk Number Theory ~ Odd Binomial Coefficients Let k and m be integers such that 0 I ) is odd.u:s 7 = t 2 = u 3 = stu = I).t. all invertible matrices are combinations of S and T . Jr /3 and Jr /7. This is the group of symmetries of a tiling of the hyperbolic plane with triangles with angles Jr /2. The result called for follows instantly. t.I. . we can say that the group of order 168 is a homomorphic image of the "triangle group" generated by s. Bonus: A Tiling of the Hyperbolic Plane The element ST has order 3 (but isn't a rotation). Therefore.
. Let e(i) = 1 ifthere is a carry in the ith bit when k and n .d(n . . = k.8 By the preceding observation.k are added in binary. + 1) I = Ln.d(k) +n  k .Ln. We see that n.. This conjecture is unproved. + (n .i .1 + Ln. this power is n .k» = d(k) + d(n .. + e(i .(i 1) . Then the exact power of p that divides n! is j=1 f l njJ.=0 where d2 (n) is the number of 1's in the binary representation of n.=1 Lni . define e(I) = O.=0 By de Polignac's formula (see Bonus) the exact power of 2 that divides n! is I . Bonus: De Polignac's Formula.(k . .1) . 8This result was discovered by Ernst Eduard Kummer (18101893). Also.=1 I . 9The formula is credited to Alphonse de Polignac (18171890). 9 Let p be a prime. for 0 ::: i ::: I...k are added in binary.2e(i).k are added (in binary). .=0 e(i  1» = Le(i). we conclude that (~) is odd if and only if there are no carries when k and n . who made contributions to algebraic geometry and number theory..i.i2 + .d(n) . . + Ln.=2 I I Ln.=0 Thus. . This is the case precisely when the binary representation of n contains a 1 in every position where the binary representation of k contains a 1. e.=0 .d(n).4 Number Theory 155 Suppose that the base2 representation of n is I n = Ln. we will show that the exact power of 2 that divides the binomial coefficient (~) is equal to the number of 'carries' when k and n ..k). Next.3.I + i 2 + .=0 + (n  k). 17 and 19. p This is known as de Polignac's formula. and e (i) = 0 if there is no carry.=1 (i.k) .i1 = .i. Denote the ith bit of a binary number x by x.nil = L(2e(i) .g. Hence. the power to which 2 divides (~) is I I I L[k.=0 = Ln. who is best known for making the Twin Prime Conjecture: There are infinitely pairs of primes whose difference is 2.
the exact power of 3 that divides 100! is 100j 9 27 81 l3" + l100j + l100j + l100j = 33 + 11 + 3 + 1 = 48. . To prove the formula. and in general. but how do we prove the claim? A solution ties together some tenuous clues. For instance. n::: 1.1 nonzero residue classes modulo p form a cyclic group. is divisible by 348 but not by 349 . exactly LnJ pj J multiples of pj less than or equal to n. The formula follows immediately. The Fibonacci numbers are conveniently generated by the matrix equation [ In+l In In Inl ]=[~ ~r n:::l. For example. exactly LnJ p2 J multiples of p2 less than or equal to n. since pj > n for j sufficiently large. It is easy to prove Cassini's formula by induction. The sum is actually finite. the same congruence is always solvable for primes ofthe form 4k + 1. 4 2 == 1 (mod 17).10 So now we see that the proof of the claim may have something to do with squares modulo p. II This identity was discovered by the astronomer Giovanni Domenico Cassini (16251712). IOThe reason that the existence of a solution to this congruence depends on the mod 4 status of p has to do with the fact that the p .156 3 Advanced Problems Note. What distinguishing features of primes ofthe form 4k + 3 do you know? One such feature is that for no prime p of the form 4k + 3 is the congruence x2 == 1 (mod p) solvable for an integer x. no prime factor above is of the form 4k + 3. So we have data to support the claim. Thus. 100! Fibonacci Factors Show that no Fibonacci number In with n odd has a prime factor of the form 4k + 3. but we give an aha! proof using determinants. On the other hand. By inspection. Can we think of a formula involving squares of Fibonacci numbers? An identity comes to the rescue! Just the right sort of formula is supplied by Cassini's identity: II 2 I n ln+llnl = (_l)n+l. we observe that there are exactly L Jp J multiples of p less than or n equal to n. Solution We check the claim by finding the prime factorizations of the first ten Fibonacci numbers with odd subscripts: h 2 15 h 5 5 h 34 2·17 III 89 89 113 233 233 2 13 13 610 2·5·61 /Is 117 1597 1597 /I9 4181 37· 113.
1 . However. 3 ==:: m < (n . The number 2 occurs in the second row of Pascal's triangle. and twice in row n .4 Number Theory 157 (This is easily proved by induction. using the rule that the determinant of a product is the product of the determinants: fn+1 fnI .11 1 0 In = (_I)n. twice in row n (in columns m . it is difficult to find numbers that appear more than four times. Similarly. say. Would you be amazed to learn that there are infinitely many numbers that occur at least six times in Pascal's triangle? Consider solutions to t _ (m n _l) _ (nm. When there exists such a solution. we can easily prove the claim.m . the number t appears at least six times in Pascal's triangle: twice in row t. the number 10 appear? The fifth row of Pascal's triangle contains two lO's and the tenth row contains two lO's.1)!(n . Solutions are given by We prove this by checking that the following equations are equivalent: = (m .m). This yields Cassini's identity! Armed with Cassini's identity. as we have stated.3.I)!' n! (n . It is evident that 2 will not occur elsewhere. for the smallest number in row n (barring the 1's at the ends) is n. If p then I fnl and n is even.1).1 (in columns m and n .1 and n .I)! . Bonus: Repeated Numbers in Pascal's Triangle We use Cassini's identity to prove a gem concerning Pascal's triangle. By the way.m + 1).fn2 = I fnj.m + I)! m!(n . How often does.) Take the determinant of both sides.+l n fn fnl I . any number (greater than 3) that appears twice as the two middle terms in a row appears at least four times altogether. A search of the first ten rows shows that 10 occurs exactly four times.1)/2. Wayne McDaniel has shown that all but eleven Fibonacci numbers have a prime factor of the form 4k + 1. fn2 == 1 But this is impossible if p = 4k (mod p). + 3.
A covering system in which each integer x satisfies exactly one of the congruences is called an exact covering system. For I :::: i :::: k. hklhkH = 121 + 1.158 3 Advanced Problems mn = (n m + 1)(n m).x) is the generating function for the set of all positive integers. For k = 2. Prove that there does not exist an exact covering system with distinct moduli. + 1)(f2khk+l . at x = 1. Let m be the maximum of the mi (which are distinct). It's easy to verify this. in the following representations: No other numbers are known to appear as many as eight times in Pascal's triangle. the . 3003 appears eight times in Pascal's triangle. The congruences x == 0 (mod 2) and x == 1 (mod 2) are an exact covering system (but a boring one). where the mi are integers greater than 1. Let ml. Solution Here is a beautiful and surprising proof using generating functions. For example. and the maximum number of appearances of a number in Pascal's triangle is also unknown. The last relation is Cassini's identity (with n replaced by 2k). the right side is a rational function with only one discontinuity (called a pole). 3003 appears at least six times in Pascal's triangle.. Exact Covering Systems A covering system is a collection of congruences of the form x == ai (mod mi). x == 1 (mod 4).• mk be the distinct moduli of the congruences in an exact covering system. Now.. Just write the integers 0 through 11 and cross out those covered by each congruence. Hence. x == 0 (mod 3). such that every integer x satisfies at least one of the congruences. All the numbers will be crossed out. for 1 :::: i :::: k. On the left side. we obtain the value t = 3003. x == 1 (mod 6). the congruences x == 0 (mod 2).hkd2k = (f2k(f2k+l . In fact. and x == 11 (mod 12) constitute a covering system. since 1/ (1 .hkd2k) 12kd) hkd2khkhk+l = (f2khkH .hkl) = (f21 + 1)(f2k(f2k+l  + 1)121. m2 • . the positive integers that satisfy the congruence x == ai (mod mi) are represented by the generating function Therefore.
there exists an integer n such that k + 2n is a prime number? For k = 5 we may take n = I. The idea of Erdos' method is to choose sufficiently many primes to rule out enough arithmetic progressions to eliminate all possible values of n. 83 + 2n is divisible by 5 if 2n == 2 (mod 5). Hence. namely. It follows that k + 2n is composite (divisible by 3) for n == 0 (mod 2). This is easy to do by hand or on a computer.xm) has a discontinuity at x = e 2lfi / m. take k = 83. Now. It follows that 83 + 2n is composite (divisible by 5) for n == I (mod 4). . 3. which is divisible by 5. Hence. to find an odd integer k such that k + 2n is prime for no n. and 83 + 27 = 211. a prime. Also. Therefore. Does this always work? We will follow a method of Paul Erdos. but we probably want to use a computer to complete our study since one of the key primes is 241. 83 + 21 = 85. a prime. which is divisible by 3. I}. This is a contradiction. using a covering system of congruences. The powers of 2 modulo 3 form the cycle {2. The following table shows our selection of primes and the number of powers of 2 modulo these primes. To get a feeling for what is going on. and no other discontinuity cancels this out. 83 + 2n is divisible by 3 if 2n == I (mod 3). We see from the example k = 83 that we should study cycles of powers of 2 modulo various primes.3. The smallest positive integer not ruled out is 7. as follows: x==1 (mod 2) x==O (mod 4) x==O (mod 3) x==2 (mod 12) x==2 (mod 8) x == 22 (mod 24). prime 3 5 7 13 17 241 length of cycle of powers of 2 2 4 3 12 8 24 We make a covering system with the lengths as moduli. since 7 + 22 = II. there is no exact covering system with distinct moduli. We have so far ruled out two infinite arithmetic progressions as choices for k. I}. since 5 + 21 = 7. all solutions to n == 1 (mod 4) and n == 0 (mod 2). The powers of 2 modulo 5 form the cycle {2. a prime. yielding a cycle of 24 powers of 2.4 Number Theory 159 term xQm /(1 . 4. Bonus: Never a Prime Is it true that given any odd integer k. For k = 7 we may take n = 2. 83 + 22 = 87.
the solution. i. Paul Hartung. it follows that k + 2n is divisible by 5 (and hence composite). and k7 = 210. == _21 == _2° == _2° == _22 == _22 == _222 (The purpose of the first congruence is to ensure that k is odd. 17·241 = 11184810. k4 = 2. we look for a solution to the == I (mod 2) (mod 3) (mod 5) (mod 7) (mod 13) (mod 17) (mod 241). ks = 12. k = 41446999 . == _2° == _22 == _22 == _222 (m/7)k 4 == _2° (m/13)k s (m/17)k6 (m/241)k7 We find the solutions k1 = 1.) 1 + (~) 2+ (~) 2+ (~) 2+ (~) 12+ (~) 1 + (2:1) 210 = 41446999. that n == 0 (mod 4). Can you find a smaller value of k? A Fibonacci Number Producing Polynomial In 1975 James P. in his review ofthat article.) This will furnish an arithmetic progression of integers k that satisfy the condition. k3 Therefore. Jones wrote an article titled "Diophantine representation of the Fibonacci numbers" for the The Fibonacci Quarterly [12]. k6 = 1. == (." The bombshell was the following: The set . Let's take k to be the smallest positive integer in this congruence class.e.3·11184810 = 7892569. Next we solve the following congruences: (m/2)k 1 == 1 (m/3)k 2 == _21 (m/5)k3 (mod 2) (mod 3) (mod 5) (mod 7) (mod 13) (mod 17) (mod 241). We find a simultaneous solution to the above congruences using the Chinese remainder theorem. say. modulo m. So 7892569 + 2n is prime for no n. Then 2n == 1 (mod 5) and since k == 1 (mod 5). said "The author throws a real bombshell here.160 3 Advanced Problems To find an odd integer k such that k system of congruences k k k k k k k + 2n is never prime. is k = 2. Let m = 2·3·5·7· 13 . For suppose. k2 = 2..
(y .xy x 2 = 0 or ± l. Y such that 0 ::: x.X)2 = x 2 .(y .10). Ascending from this pair. I n even. but 5 is not the square of an integer. e. y) = (1.x 2 = 0 implies that 4y2 . these are the only solutions. the ordered pairs (x.4x 2 = 0.x)x . Therefore. we end up with (x. since x 2 . y) satisfies the equation. x) satisfies the same equation. Continuing the descent. (x. But the first case is impossible.x.Inlln+l = Let's rewrite the relation as y2 x(y I n odd. Now we see the resemblance to Cassini's identity. is precisely the set of (positive) Fibonacci numbers.x)2 = 5x 2.2). Bonus: Hilbert's Tenth Problem Consider the equation 2x + 3y = 100.x + y) yields the sequence {Unl. the transformation (x.3. + x) = ±1.x4y _ 2x 3y2 + x 2y 3 + 2xy4 _ y5.y) = Unl. with n even if the + I occurs and n odd if the 1 occurs. then (y . Another way to see that this equation has no solutions is to recognize that squares .g. satisfy the equation. as we can see by checking all values of x.x)y = x 2 + xy . where x and y are positive integers.x Y . and hence (2y . Can you explain why this is true? Solution We begin by writing the polynomial in the useful form Now it's easy to see that the polynomial can have a positive value if and only if y2 . the equation x 2 + y2 = 103 has no integer solutions. Does this equation remind you of a famous identity? Cassini's identity (recall the solution to "Fibonacci Factors") is 2 { In .y) ~ (y.(y .4xy .4 Number Theory 161 of positive values of the polynomial 2y . for n :::: I. since y2 .y2 = =F 1. In)}. We can see that the equation has integer solutions. In). y) = (35. the polynomial represents each Fibonacci number exactly once.. we must have y2 xy _x 2 = ±1. In fact. By Cassini's identity. The main idea is that if (x. Furthermore. y ::: 10. By contrast.
in a lecture to the International Congress of Mathematicians in Paris. then p divides a p . 10.162 3 Advanced Problems always are always congruence to 0 or 1 modulo 4. Find a composite number n that divides an. will determine whether it is solvable or unsolvable. given any Diophantine equation. 5. 3. 0. 90. In 1900 David Hilbert (18621943). 2. 39. 68. discussed 23 important unsolved problems in mathematics. Perrin's Sequence Perrin's sequence I 2 {an} is defined by the following recurrence formula: ao = 3. as we can compute the nth term of any linear recurrence modulo k in n log n time. that is. while the right side is congruent to 3 modulo 4. 5. 22. Perrin. the procedure should be able to decide whether an equation such as has a solution in integers x and y. In our Problem. 17. 119. In 1973 Yuri Matiyasevich demonstrated that there is no such procedure: Hilbert's Tenth Problem is unsolvable. In this context. and an = a n3 + a n2. Finding a Diophantine representation of the Fibonacci function is difficult and is the crux of Matiyasevich's proof. Also. 1. al = 0. For example. 51. . then we would have a polynomialtime test for primality. 29. Hilbert's Tenth Problem calls for a universal procedure which. See [16] for a comprehensive treatment. I2The sequence is named after R. If it were true that n divides an if and only if n is prime. Matiyasevich's proof uses a Diophantine representation of the "Fibonacci function" n = 1m. So Perrin's sequence is 3. we discussed a representation of the set of Fibonacci numbers but not ofthe Fibonacci function. it is congruent to 0. but the sequence was investigated in 1878 by Edouard Lucas (18421891). as follows: Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined by a finite number of operations whether the equation is solvable in rational integers. or 2 modulo 4. 209. 12. who studied it in 1899. a2 = 2. 7. a polynomial whose integer solutions are the ordered pairs (m. Note. prove that if p is a prime number. n) for which n = 1m. 158. 2. The tenth problem on his list asks whether there exists a decision procedure for Diophantine equations. for n :::: 3. which he called "Entscheidung der LOsbarkeit einer diophantischen Gleichung" ("Determination of the Solvability of a Diophantine Equation"). a Diophantine equation has integer coefficients and its solutions (if any) are integers. Since the left side is the sum of two squares. Hilbert phrased the problem.
P. The elementary symmetric polynomials are a + fJ + y. we will need to compute an mod n. Let p be a prime. {x. mod (x + y. by the fundamental theorem of symmetric polynomials (see Bonus).n)}. and afJy. Do n2 times: {x. we have 0 = (a + fJ + y)P = a P + fJP + yP + ps. say. These expressions are given by the coefficients of the characteristic polynomial of the recurrence relation: x 3 . . 0. The characteristic polynomial of the sequence is x 3 . s is an integer. Finding n (a prime squared) such that n I an For m = I to 100 do: n +. as in the following algorithm. Do n2 times: {x. and y. Computing an mod n Choose n.{3. It follows that p divides ap . z} +. fJ. fJ.{y. and y. Which n should we try? According to the statement of the problem.n)}. since a + fJ + y = 0. 0. 271441 Hence 271441 (= 521 2 ) is a number of the desired kind. Now we prove that if p is a prime.I = 0.z. afJ + fJy + ya.z} +.3. n = p2.a)(x .X . Then. if z = 0.X .z} +. sis a polynomial in the elementary symmetric polynomials in a. where s is a symmetric polynomial (with integer coefficients) in a. mod (x + y.I = (x . with roots. A reasonable guess is to take n to be the square of a prime.z. fJ.{3.(afJ + fJy + ya)x 2 + (a + fJ + y)x  afJy· Since the characteristic polynomial has integer coefficients. y. output n. y.y. We find that the general term is an = an + fJn + yn. then p divides ap . {x. Hence. Output z.4 Number Theory 163 Solution To find a composite number n that divides an.fJ)(x .{y. it doesn't make sense to take n to be a prime. 2}. y.y) = x 3 ." (Pm is the mth prime). a. 2}. The simplicity of this general term is one of the nice traits of Perrin's sequence. z} +.y.
an. we calculate It's easy to see that this last expression is equal to SIS3.. Choose a monomial of greatest weight (al. Order the monomials of f lexicographically according to weight. X2 ••••• X n • with integer coefficients. Hence. X2 • . Sn = XIX2 •. Let f be a symmetric polynomial...0).i<j::. We see that the greatest weight of a monomial is (3.n XiXj. Let's work out the details of this procedure for the example.a2 •. 1. This monomial is "killed off' by a monomial in the elementary symmetric polynomials of weight (al .• X n • with integer coefficients.. we obtain (2. For example.e . a2 . we calculate We find that the greatest weight is (2.164 3 Advanced Problems Bonus: The Fundamental Theorem of Symmetric Polynomials Recall the elementary symmetric polynomials from p. 1.• the polynomial UT Subtract off this polynomial and the remainder is a symmetric polynomial oflesser weight. i.a2. Therefore . THE FUNDAMENTAL THEOREM OF SYMMETRIC POLYNOMIALS. Performing the reduction.a2 •. then f is a polynomial in the elementary symmetric polynomials in XI. + Xn • L I::.• an. Xn IS ( al. an). 31 : SI S2 = = XI + X2 + . Continue this process until we have "killed off" the polynomial.• a n ). with al ~ a2 ~ ••• ~ an... given earlier.2. Hence..a3 • •••• anI .0). X n . al a2 an· ) nesayt hatt hewelg hto f amonOmI·al XI X 2 ••.0)... the symmetric function written as X3 y + X3 Z + y3 Z + y3 X + z3 X + z3 Y may be .2.0). we obtain (0. of the polynomial S = x3 y + x 3 z + y3 z + y3 x + z3 X + z3 y . Performing the reduction indicated above. If f is a symmetric polynomial in the variables XI.
then a + b + c = n.2). We can certainly obtain the desired triangle in a unique way: (23. The main idea is that we can "build up" to any triangle (a. 37. and the weak triangle inequality is good enough. How can we build up to. I. Let's generate some data. e. if the three people have a. where. 1.. 1. the triangle (23. We need some theory to arrive at this number. say. I). The snag is that by this method we can construct triples that don't satisfy the triangle inequality. 40)? A naive approach is to add triples ofthe form (I. i. b. 13 More about this fascinating sequence in the Bonus .. and n casks full of wine that he wishes to divide among his three sons so that each receives the same number of casks and the same amount of wine. (I. A Teacher of Emperor Charlemagne. b. so all we need to do is specify the number of full cookie jars that each person receives (as in the diagram on p. 1).e. 1). No one may have more than n/2 full jars." The generalized problem may be stated as follows: A dying father has n empty casks. If n is even. c) starting from the (I. we can calculate the number by hand! Let t(n) be the number of integer triangles of perimeter n. 1). for Sharpening Youths. I) + y(1. I. I. c) = (I. Once we have the theory. 3.5 Combinatorics 165 3. and (I. 130ur sequence {t(n)} is called Alcuin's sequence because it generalizes a problem given by Alcuin (735804) in a problems book called "Propositions of Alcuin. I). the degenerate case cannot occur.e. I. b. I. b. n casks halffull of wine. 100).5 Combinatorics Integer Triangles How many incongruent triangles have integer side lengths and perimeter 10? There are only two: (2. c) is an integer triangle that is possibly degenerate.1f n is odd. since there wouldn't be enough empty jars to compensate.4) and (3. This means that (a. I. I.) How many triangles have integer side lengths and perimeter 10100? Solution The number of such triangles is 2083 . since we start with a genuine triangle. c) is a triangle of perimeter n..) n t(n) o I 2 000 3 o 4 5 6 7 8 2 The sequence {t(n)} is known as Alcuin's sequence. These triples satisfy the weak triangle inequality a + b :::: c.g. and c full jars. Can you figure out why? = .4. each full jar of cookies must be counterbalanced by an empty jar.3. I. I) + 3(0. n = a + b + c. (We specify a triangle by giving the ordered triple of its side lengths in nondecreasing order. 2).. We will employ a generating function. a :::: b :::: c.3.8(1. A triple (a. we go by steps (0. where there are one hundred ninetysix 3 's.. i. a + b = c. and c :::: n/2. I. (It is convenient to set t(O) = 0. 1) + .40) = (I. 1) triangle. b. the triple (23. In terms of cookie jars. and (0.. c) must satisfy the triangle inequality a+b>c. 2. 1. b.37...2). (0. I) + a(O. so the number of solutions is t(n). In how many ways may this be done? We met the n 7 case of this problem in "Cookie Jar Division" on p. 37. then the number of solutions is t(n + 3). 1) + 14(0. Instead.4). 0. So. 1) + 22(1. say. A unique solution exists to the equation (a. I. Suppose that (a.0. I).
Using partial fractions (and perhaps a computer algebra system). What is the coefficient of. ). )(1 +X2 +X4 +X6 +X8 + ... The first factor consists of the sum of all nonnegative powers of x. and 3's (from the third factor). y = cb. (3 = a+bcl. say. The x 3 in the numerator offsets the count by 3 so that it counts partitions of n .I=xn (2)xn I=(_l)n x n. The allowable summands are 2. 2's (from the second factor). and 4.3. we see that t (n) is equal to the number of ways of writing n .1)3 1 13 1) 1 16(x + 1)2  1 32(x + 1)  x+ 1 8(x 2 + I) + 9(x 2 + x + 2 . we can rewrite the generating function as ::+ 288(x 24(x . Via the binomial theorem (for arbitrary exponents).27(l)n 288 Multiplying the final two terms by 1 . respectively. a = ba.E.. accounting for the factors in the denominator. n 288 n=O 16 n=O n 32 n=O ~ I= ~ Using the identity (~k)(_l)n = (n+!l). Since2a+3{3+4y = a+b+c3 = n3. 3...... the second factor all even powers._ ~(It(n + I) _ ~(_I)n 24 n 288 16 32 6n 2 + 18n  1 . the first four terms can be written ~ 24 n=O I= (3)(_lt xn .. and the product of these series is (l +x +X 2 +X 3 +X4 + .x.166 3 Advanced Problems namely. lx)lx)lx) x3 In order to understand this.. n mod 12 c 0 7 2 17 3 25 4 17 5 17 67891011 25 17 7 . and the third factor all powers that are multiples of three. )(1 +X3 +X6 +X9 +X 12 + . we observe that the resulting coefficients of xn follow a pattern modulo 12. 3 's. X + I) Who would have thought that such a suavelooking rational function would yield such uncouth partial fractions? Although the expansion may be ugly. The generating function that captures this counting problem is ( 2( 3( 4 = t(O) + t(l)x + t(2)x 2 + t(3)x 4 + t(4)x 4 + ..18n(l)n . x 10 ? It is the number of ways of writing 10 as a sum of 1's (coming from the first factor). consider first the simpler generating function Each factor in the denominator yields a geometric series. we can simplify the coefficient of xn to ~(n + 2) _E.x 2 and 1 . and 4's (order of terms is unimportant).3 as a sum of 2 's. it will give rise to a beautiful formula. This pattern is c /72 where c is given in the table. Our generating function for the triangles of perimeter n works similarly.
1. to answer our question. 1. and obtain the result stated above. Consider the sequence modulo 2. 0. for n :::: 6. for every k vertices. 0. since there are eight O's in a row. It follows that the explicit formula for t (n) given in the Solution is valid for negative n. We say that a tournament has Property k if. are given in our table of data. we have the curious relation t(n) = t(n . 0. 2 3 . the sequence is defined by the same recurrence relation going forward and backward. and {(n + 3)2/ 48}.7)/72. Find a tournament with Property 2. we compute {102oo/48} by long division (observing a recurring pattern in the quotient). for n odd. TopsyTurvy Tournaments A tournament is a complete graph in which each edge is replaced by an arrow. the tournament below has Property 1. and t(n) = (n + 3)2/48 + (c . In general. the sequence satisfies a linear recurrence relation (of order 9): t(n) = t(n2)+t(n3)+t(n4)t(n5)t(n6)t(n7)+t(n9). 1. We obtain a repeating cycle of length 24: 0. Its recurrence relation is palindromic. 0. the period of Alcuin's sequence mod m is 12m.5 Combinatorics 167 Thus. 0. 0. The direction of the edge shows who wins a game between teams designated by the two endpoint vertices. the sequence is the same forwards and backwards. So if we care to define {t(n)} for negative n. 1. 1. given any modulus m :::: 2. 1. for n ::::: 8. The form of the recurrence relation comes from the expanded denominator in the generating function.7)/72. 1. 0. You can prove this from the formula for t(n). Here are three neat facts about Alcuin's sequence: °: : 1. 2. for n odd. for 5 ::::: 2. Bonus: Alcuin's Sequence Since Alcuin's sequence has a rational generating function. 0. that is. So.3).3. for n even. Here. We say that the period mod 2 is 24. °: : 3. We aren't claiming that a triangle with negative perimeter is meaningful. This can be represented as t(n) = {n 2 /48}. 0. 0. some vertex beats all of them. only that the sequence has strange symmetry. 0. {x} is the nearest integer to x. 0. The initial values. Moreover. 1. 0. for n even. 1. You can prove this directly from the definition of t (n) or from the formula for t (n). It is a zigzag sequence (its values alternately rise and fall). For example. 1. n:::: 9. we obtain the formula t(n) n 2 /48 + (c .
The vertices are labeled 0 through 7. Vertex i is directed to vertex j if i .j is a square modulo 7. (±2)2 == 4 (mod 7). and independently of all the other edges. Instead. THEOREM (Paul Erdos). Assume that the edges of the tournament on n vertices are directed one way or the other at random. so that if i . For some integer n.i is a nonsquare. and (±3f == 9 == 2 (mod 7). In order for event As to occur. Hence Since probabilities are subadditive (the probability of a union is at most equal to the sum of the probabilities of the individual events). since the directions of the edges can be given by a simple rule using modulo 7 arithmetic.j is a square. say. We call such a tournament a "random tournament. we have . Property 10. (±If == I (mod 7). 2 3 o 4 5 Bonus: The Probabilistic Method It's not nearly as easy to find a tournament with. Let k be a given positive integer and n be an integer that we will determine later. we give an existence argument to show that given an arbitrary integer k there exists a tournament with Property k (without constructing it). there exists a tournament on n vertices with Property k. It is called a quadratic residue tournament. with equal probability." For every subset S of k vertices. then j . Observe that a nonzero element x is a square modulo 7 if and only if xis not a nonsquare modulo 7. The squares modulo 7 are 0 2 == 0 (mod 7).168 3 Advanced Problems Solution The following diagram shows a tournament with Property 2. let As be the event that there is no vertex that beats all the vertices of S.k vertices in the complement of S may be directed to all vertices of S. Let k be a positive integer. We employ a probabilistic approach. none of the n .
Therefore. you might want to try solving the above specimen. But this probability is equal to the number of tournaments with Property k divided by the total number of tournaments (on n vertices). for n = 102653. and 3 x 3 box contains every digit from I to 9.3. Sudoku Solving 1 6 5 2 5 6 2 I 8 1 3 8 7 8 4 2 7 5 3 2 5 5 9 3 8 6 2 7 4 2 6 5 Sudoku is a Japanese word meaning "single number. in a Japanese book shop. The expression on the right is the product of two terms: (Z) and k is an exponential As k is fixed." The puzzle was rediscovered in 1997 by Wayne GOUld.2. which first published it in 2004. Gould gave the puzzle to The Times newspaper in Britain. By taking complements. As n tends to infinity. the upper bound tends to 0 and at some point must be less than 1. The tremendous popUlarity of Sudoku internationally has led to it being called "the Rubik's cube of the 21 st century. called Sudoku. If you are not familiar with the puzzle. Hence. column. the exponential function dominates and the product of the two terms tends to O." Besides being fun to figure out. (Z) is a polynomial in n (of degree k). there exists a tournament with Property k. since (~)(l_TIO)nlO < 1. we deduce that there exists a tournament with Property lOon 102653 vertices. t (1 _ 2k(k. . Can you program a computer to solve Sudoku puzzles? 14Howard Garns created the puzzle in 1979 for Dell Pencil Puzzles & Word Games magazine. we see that for n sufficiently large. who saw a partly completed puzzle. Sudoku gives rise to some interesting mathematical questions (both solved and unsolved) [10)." The goal in a Sudoku puzzle l4 is to fill in the blank cells of a 9 x 9 grid so that every row.5 Combinatorics 169 Observe that Pr(Us As) is the probability that there does not exist a tournament with Property k . while (1 .k function in n (with base less than 1). The puzzle was called "Number Place. Following the method of the proof. a random tournament has Property k with positive probability.
. there are 81 . by Donald Knuth.b. X 2 . Thus. an exact cover problem is to find a collection of sets that "cover" each element in the base set exactly once. and g.e.g} X6 = {d. Is there a collection of the Xi whose union contains each element of S exactly once? Yes. j. in our example. e. Define the matrix so that its columns represent the elements of the base set and the rows represent the subsets.g} X 3 ={b.e. Each row has exactly four I 's. X 2 . X 4 . We call such a collection an exact cover.g} and the subsets XI = {c. e.j. the first. The binary matrix associated with our example is 000 I 0 100 100 I 000 I 0 o 0 0 000 o 0 000 0 000 The columns represent the elements a. c.c.c. d. In general. g}. y) is occupied . • xRy means that number x is in row y. and X 4 constitute such a collection. X s . What is an exact cover? Consider. corresponding to conditions that are met when a number is placed in the grid. using exact covers. the subsets X I.f} X 2 ={a.d. put a 0 in the position otherwise. We give a solution. Since the grid has 81 cells and there are 9 possible numbers to put in a cell. How do we convert the Sudoku problem into an exact cover problem? We form a 729 x 324 binary matrix that encodes all possible ways to put a number into the Sudoku grid. An exact cover problem can be given in terms of a binary matrix. Put a I in a given position if the corresponding element is in the subset.f} X4 = {b} Xs = {b. for example the set S = {a. second. X 3 . b. This accounts for the number of rows in our matrix. 9 = 729 possible ways to put a number in the grid. and X 6 • An exact cover problem in the context of a binary matrix is to find a set of rows that have exactly one I in each column. and the rows represent the subsets XI. and fourth rows constitute a solution.170 3 Advanced Problems Solution There may be as many different solutions as there are computer programmers.d. The conditions are of four types: • xOy means that cell (x.
c] = I. If this number is zero. Here is a depthfirst search algorithm that solves the Exact Cover Problem. The given numbers in a Sudoku puzzle are represented by given rows of the matrix. The program discovers this right away since there is no I in column 4 B I. ~ = 324 columns. If there is no solution. Exact Cover Algorithm Let AI be a binary matrix. column and block of the Sudoku grid and that each cell is occupied by a number. • xBy means that number x is in block y.3. Otherwise. The fact that there is exactly one I in each column of an exact cover is equivalent to the fact that there is exactly one i (where I ::: i ::: 9) in each row. the following puzzle isn't solvable because there is no way to put a 4 in the topleft block. Solving the Sudoku puzzle is equivalent to extending the set of given rows to an exact cover of the matrix. For each j such that AI(r. Repeat this algorithm recursively on the reduced matrix AI. jJ = I: Delete column j from AI. then that is also determined instantly. So we can solve a Sudoku puzzle by solving the exact cover problem that extends the given set of rows of the matrix. If AI is empty.jJ = I. A computer implementation of the algorithm solves every Sudoku problem instantly. Choose. then terminate unsuccessfully. all rows r such that AI(r. For instance. in turn. Include r in a partial solution. For each i such that AI[i. These conditions are represented by the 4 . then the problem is solved. choose a column c with the minimum number of I's .5 Combinatorics 171 • xCy means that number x is in column y . I 2 3 4 4 . delete row i from AI.
172
3 Advanced Problems
The algorithm has a nice symmetry in that the search is over all the digits that can fit in a cell and all the places a digit can fit in a row, column, or block. I'd like to end by relating that I once saw an advertisement for Sudoku books that said, "Don't worrythere's no math involved."
Bonus: Dancing links
The exact cover problems that represent Sudoku puzzles are not particularly large (they have dimensions 729 x 324) and are solved instantly by a computer implementing our Exact Cover Algorithm. However, larger exact cover problems might pose a difficulty in that our algorithm calls for a lot of searching for l's in the binary matrix. Knuth has suggested a method for efficiently implementing the algorithm (see wwwes fa eu 1 t Y . stanford. edu/ knuth/preprints. html). He calls the method Dancing Links because the data structures used are linked lists and these links execute a "dance" as the algorithm proceeds. In particular, the l's in the matrix are nodes in circular doublylinked lists, one such list for each column and one for each row. Each 1 is linked to its neighboring l's to the left and right, above and below, and there is "wraparound" at the borders of the matrix. In addition, each column is linked to a node called a column header, which keeps track of the number of l's in that column. As the algorithm proceeds, various rows and columns are eliminated or replaced. The linked list data structure makes it much easier to keep track of all of this.
The SET Game
The SET game lS consists of a deck of 81 cards, each displaying certain figures. The figures have four attributes: color, shape, number of objects, and shading. Each attribute has three possible values, as shown in the following table. attribute color shape number shading values green, purple, red oval, diamond, squiggle 1,2,3 solid, open, striped
For example, one of the cards looks like this:
(green)
15 The
SET game was created in 1991 by the geneticist Marsha Falco.
3.5 Combinatorics
173
A "set" consists of three cards that, in each attribute, have all the same value or all different values. For example, the cards with attributes {green, oval, 3, open}, {green, diamond, 2, open}, and {green, squiggle, 1, open} are a set. The goal in the game SET is to obtain a set. However, in this problem, we are interested in the minimum number of cards thatforce the existence of a set. We can think of the attributes as coordinates and let each coordinate take the possible values 0, 1, and 2 (to represent the three values for that attribute). Thus, the 81 (= 34 ) cards are (0,0,0,0), (0,0,0, 1), ... , (2,2,2,2). With this representation, a set consists of three ordered 4tuples (vectors) that sum to (0,0,0,0), where addition is carried out modulo 3. For example, the cards (0, 1, 1,0), (2,2, 1,0), and (1,0, 1,0) are a set. Notice that for any two cards, there is a unique third card that makes a set with them. The following 20 cards do not contain a set:
(0,0, 1, 1) (1,0,2,2) (0,1,2,1) (2,1,2,1) (1,2,2,0)
(1,0,0,0) (2,0,1,1) (0, 1, 1,2) (2,1,1,2) (1,2,0,2)
(1,0,2,0) (0,1,1,0) (2,1,1,0) (0,2,1,1) (1,2,2,2)
(1,0,0,2) (0,1,0,1) (2,1,0,1) (1,2,0,0) (2,2,1,1).
We can also represent these vectors geometrically, as in the following diagram.
EaE8Ea
83tE83
EaE8Ea
The rows of 3 x 3 grids represent the first coordinate and the columns of grids represent the second coordinate. In each 3 x 3 grid, the rows represent the third coordinate and the columns represent the fourth coordinate. The coordinates are numbered 0, 1, 2, from left to right, bottom to top. For example, the dot in the middle of the topright grid represents the card (2,2, 1, 1). The geometric representation gives a quick portrayal of 20 cards containing no set, as we notice that no three cards going either down, across, or diagonally completely agree or disagree in each coordinate. By inspection, we can see that if we add a 21 st card, then this collection will indeed contain a set. However, this is merely an example, and does not constitute a proof that every collection of 21 cards contains a set. The problem is to prove that every collection of 21 cards must contain a set. Can you do this, using both mathematics and computer programming?
Solution
We can't rely on a computer alone, for the number of collections of 21 cards is (~!) ~ 1.4 x 10 19 , too gigantic for any computer.
174
3 Advanced Problems
We need to make certain reductions first, before unleashing the power of a computer. Let's say that we have a collection of 21 cards (given as 4tuples). Without loss of generality, we may assume that the collection contains (0,0,0,0). This is because, for any 21subset, v I, V2, ••• , V21, we may take any vector, say, v I, and subtract it from each of the vectors in the set, giving us now (0, 0, 0, 0) as the first vector in the set. We are allowed to do this since, if WI, W2, and W3 is a set, then so is WI  VI, W2  VI, and W3  VI, as (WI  vt) + (W2  VI) + (W3  vt) = (WI + W2 + W3)  3vI = (0,0,0,0). Thus, the property of being a set is unaffected by translation. Furthermore, the set property is unaffected by multiplication by a nonsingular matrix (the proof is an exercise for the reader). Hence, we may assume that our collection contains the four standard basis vectors (1,0,0,0), (0, 1,0,0), (0,0, 1,0), and (0,0,0, I).
Note. We need to check that all 21 cards do not lie in a 3dimensional subspace, but this is easy to do. A 3dimensional subspace, say, the one consisting of all 4tuples with fourth coordinate 0, contains 27 vectors. Assuming that the collection contains (0,0,0,0) and three basis vectors, we can exclude (~) = 6 other vectors, namely, those that make sets with the first four vectors. But excluding 6 vectors leaves 21 vectors, so every other vector in the subspace must be in the collection. However, this allows for numerous sets, such as (1,2, 1,0), (1,0, 1,0), (I, I, 1,0).
Now we have five cards that are definitely in our collection, and we can exclude = 10 cards that are definitely not, namely, the ones that make sets with the five included cards. At this point, the size of the problem is
G)
_ ( 81  IS)  (66) "'"' 8.6xlO 14 . 215 16"'"
Although this number is large, we can tackle it (with a computer) by systematically putting in vectors and ruling out vectors. This verifies that every collection of 21 cards contains a set.
Bonus: A Combinatorial Problem
A neat problem generalizes our SET game problem and our earlier problem "Lots of Permutations." The (n, d) SET game consists of n d cards, each representing d characteristics with n choices for each characteristic. A set is a collection of n cards which, with respect to each characteristic, all agree or all disagree. The original SET game problem corresponds to n = 3, d = 4. Let I(n, d) be the minimum number of cards that force a set in the generalized SET game. Some values of this function, for small nand d, are 1(3, I) = 3, 1(3,2) = 5, 1(3,3) = 10,/(3,4) = 21. In general, we have (trivially) I(n, I) = n. We can also give the value of I(n, 2), for any n. PROPOSITION. For n ::: I, we have I(n, 2) = (n _1)2 + I. That is, if (n 1)2 + I cells of an n x n grid are filled, then one of the following patterns of filled cells results: n in a row, n in a column, or n with no two in the same row or column (a transversal). Furthermore, this conclusion is not guaranteed if (n  1)2 + I is replaced by (n  If.
3.5 Combinatorics
175
Let's prove this. If we fill all the cells except the last row and column, this accounts for (n  If cells and there is no filled row, column, or transversal. Now assume that we fill (n  1)2 + 1 cells and there is no completely filled row or column. We must show that there is a completely filled transversal. We will use an important theorem of combinatorics called Hall's Marriage Theorem. 16 HALL'S MARRIAGE THEOREM. Let S be a collection of subsets of an nelement set X. Suppose that, for I :::: k :::: n, the union of any k members of S has cardinality at least k. Then there exists, for each s E S, a distinct x E X such that XEs. Such a collection of x is called a system of distinct representatives. 17
Note. Of course, the conditions of the theorem are necessary for the conclusion. What is not obvious is that they are sufficient.
For a proof of Hall's Marriage Theorem, see [15]. Asanexample,letX = {1,2,3,4,5},andletsl = {l,2,3},S2 = {2,3,5},S3 = {4,5}, and S4 = {3, 5}. Then one system of distinct representatives (there is more than one in this case) is I E Sl, 2 E S2, 5 E S3, and 3 E S4. To continue with our proof, let X be the columns of the grid and S the collection of filled cells in each row. We will show that the hypothesis of Hall's Marriage Theorem is satisfied, and it will therefore follow that the grid contains a filled transversal. If the hypothesis fails for k = 1, then some row is empty. But then the (n  1)2 + I filled cells occur in n  1 rows, and it follows that one of these rows is complete, contradicting our assumption. Hence, the hypothesis is satisfied for k = 1. A similar argument shows that the hypothesis is satisfied for k = n. Suppose that the hypothesis fails for some k such that I < k < n. Then a union of some k rows contains filled cells in at most k I columns, accounting for at most k(k I) filled cells. But then the remaining n  k rows, which contain at most (n  k)(n  I) filled cells, must account for the rest. However, we can show that
(n k)(n 1)
+ k(k 1):::: (n
_1)2,
for this inequality is equivalent to our assumption that n ~ k + 1. The contradiction means that the hypothesis of Hall's Marriage Theorem is satisfied, and we have our desired conclusion. In general, the calculation of f(n, d) is an unsolved problem. In particular, no formula is known for f(n, 3).
Girth Five Graphs
The girth of a graph is the length of a smallest cycle in the graph. For example, the girth of the graph on the left is 5, as the graph is a 5cycle. The girth of the graph on the right is 3, as the graph contains a triangle.
16Hall's Marriage Theorem is credited to algebraist Philip Hall (19041982). 17The whimsical name of the theorem derives from thinking of the elements of X as men and the elements of S as lists of men whom various women would like to marry. The conclusion of the theorem is a satisfactory pairing of the men with the women.
and 57.1)/ = J. Solution Surprisingly. we observe that (A2)ij = L AikAkj k=l . the graph contains at least 1 + r + r(r . The critical observation is that A2 +A (r . the 5cycle pictured above satisfies the condition where r = 2.1 The vertices in the third column must be distinct (or else the graph would contain a 4cycle). an n x n matrix with n = r2 + 1. 7. every vertex is adjacent to r vertices. for some r.1) = r2 + 1 vertices. 3. Hence. only four values of r are possible: 2. Suppose that a graph is rregular. Note that A is a symmetric matrix. rl rl r. n = the number of neighbors common to the vertices viand vj . Define A = [aij j. and none of these vertices can be adjacent to each other (or else the graph would contain a triangle). The question is. where aij = 1 if vertices Vi and Vj are adjacent and 0 otherwise. what are the possible values of r such that an rregular graph of girth 5 contains exactly r2 + 1 vertices? For example. So we have the following picture.176 3 Advanced Problems A graph is rregular if every vertex is adjacent to exactly r vertices. The graph on the left is 2regular and the graph on the right is not regular. where / is the n x n identity matrix and J is the n x n matrix of all 1'so To prove this. How many vertices will the graph have? Well. How do we prove such a thing? The aha! idea is to introduce an adjacency matrix. and has girth 5.
Next. Simplifying our equation yields . we have J e = O. As these numbers must be integers. which agrees with the right side. Combining these last two equations together with the values of Al and A2. then (A2)ij = r.I)I)e = A2 e + Ae .(r . e. What can we say about the multiplicities of these eigenvalues? The eigenvalue r has multiplicity 1. and the left side of the identity to be proved counts r + 0 .J4r . say. the relation is true. respectively. One of the eigenvectors of A is the all I 's vector. then J4r . since neither AI or A2 can equal r (check). Then r = (s2 + 3)/4.5 Combinatorics 177 Now. with eigenvalue r. so the left side counts 0 + I . and A2. If i = j. Hence. Vi and Vj of the graph.3). we obtain Consider two cases. If ml .3) and A2 = t(1 + J4r . In fact. then Vi and Vj have exactly one common neighbor (why?). AI. Since the basis is orthogonal. Define Al = t(t' .I)e. If ml . there will be serious restrictions on the possible values of r. and hence r + mlAI + m2A2 = O. we investigate the eigenvalues of A. Suppose that A is an eigenvalue of another eigenvector of A. and so the left side counts I + 0 . This implies that Using the quadratic formula.3 is a rational number and hence an integer. which agrees with the right side.1)0 = I. which is the same as the right side counts. so the trace of A is 0. we find that I A = 2:(1 ± J4r .3. If i =1= j and Vi and V j are adjacent.(r 1)0 = I. it has n eigenvectors. Because A is a symmetric matrix. Denote this integer by s.1) = 1. then Vi and V j have no common neighbors (or else the graph would have a triangle).(r . If i =1= j and Vi and Vj are nonadjacent. Therefore 0= Je = (A2 +A (r . consider two vertices. A has an orthogonal basis of eigenvectors (this is known as the "spectral theorem").(r . Let m I and m2 be the multiplicity of Al and A2.3). Now we know that all possible eigenvalues of A are r.m2 = 0. then r = 2. Hence We also know from linear algebra that the sum of the eigenvalues of a matrix is equal to the trace of the matrix. All the diagonal elements of A are 0.m2 =1= 0.
1. A little experimentation yields a graph with r = 3. A vertex i in Pj is joined to vertex i + j k in Qb where the calculation is performed modulo 5..178 3 Advanced Problems It follows that s divides 15. and these are the vertices of our graph. with vertices numbered 0. 3. or 15. if we regard the vertices . Each vertex in one of the P cycles will be joined to exactly one vertex in each of the Q cycles. or 57. Let Qo.4. and hence s is 1. The P cycles and Q cycles have altogether 50 vertices. Q2. the seven vertices adjacent to any given vertex may be permuted arbitrarily. QI. 7. with vertices numbered 0. It has ten vertices and is called the Petersen graph. However. and P4 be 5cycles. What is the symmetry group of the Petersen graph? Unlabeled Graphs How many graphs are there on the vertex set {I. The existence of such a graph with r = 7 is shown in the Bonus. girth five graphs with r2 + 1 vertices exist for these values of r? Our 5cycle above is an example with r = 2. The automorphism group (the group of symmetries) of the HoffmanSingleton graph has order 252000 = 50· 7!. the symmetry group is transitive). which doesn't give a girth five graph. Once this operation is carried out. 1. and 3 (in cyclic order). For example. = 26 = 64 labeled graphs on 4 vertices. Such a graph would have 3250 vertices. 5. 2. Here is the recipe for how to join the vertices. 3. Each vertex of the graph may be moved to any vertex (that is to say. 3. Let Po. Bonus: The HoffmanSingleton Graph We will show how to make the HoffmanSingleton graph. P3. P2. and 4 (in cyclic order). 2. Remember that the graph is to be a 7regular graph with 50 vertices and girth 5. This result was proved in 1960 by Alan Hoffman and Robert Singleton.2. girth five graph with 3250 vertices exists. Q3. Altogether. It was discovered by Julius Petersen ( 18391920). Do rregular. Therefore. each vertex will be adjacent to 2 + 5 = 7 vertices. No one knows whether a 57regular. Thus. this accounts for 50· 7! symmetries. . r is 2 (from the first case). But s = 1 implies that r = 1. there are 2m m.. PI. . and Q4 be 5cycles. n }? There are 2 as there are (~) possible edges and each edge can be included or not included in the graph. 3.
the 12 labeled graphs below are all equivalent as unlabeled graphs. the graph is unlabeled). • • • • I: IIL LLlL Drs: IZJ ~ Let gn be the number of labeled graphs on n vertices and gn the number of unlabeled graphs on n vertices. As we have said. To test your understanding.5 Combinatorics 179 as indistinguishable (in other words. 334 I 2 I 4 2 lLlLlLlLlLlL lLlLlLlLlLlL 343 2 3 4 2 4 2 4 2 4 3 4 2 4 3 3 232232432 4 3 4 These 12 labeled graphs constitute an orbit. Determine a formula for gn. For example. then there are only 11 graphs on 4 vertices. . g n = 2(~). Here are the II unlabeled graphs of order 4. Solution The 64 labeled graphs on 4 vertices are partitioned into 11 sets of equivalent unlabeled graphs (the graphs pictured above). determine the size of the orbit corresponding to each of the 11 unlabeled graphs above. The sum of these orbit sizes will be 64.3.
2)(3.24)(14. 26 + 24 6.e.23. Then the number of orbits is given by I WI geG f L g.0). where Ci is the number of cycles oflength i. For example.24 + 3.18 is given by gn = I" I n.nk=l kCkq! ISGeorge P6ya (18871985) was a master problem solver. The permutation (abc)(de)(f)(ghi) is represented as (I. for example. by Burnside's lemma. 14. which is a nice example of doublecounting.:: n! . h(c) . We also represent a cycle type as a vector (Cl' C2. where c = (Cl' .22) = II .2. see [6]. Let's use Burnside's lemma to prove that there are II unlabeled graphs of order 4. and the number of fixed points. for I :::: i :::: n. i. as each cycle in a fixed point is a cycle of edges or nonedges.0. The number of fixed points of this permutation is 2 raised to the number of cycles. the number of non isomorphic graphs of order 4 is ~(l.23)(34).theset of unordered pairs of vertices. the number of permutations of each cycle types. Permutations of the same cycle type yield the same number of fixed points.22 + 6.thesetofverticesofthegraph. well known for his book How to Solve It [17]. For a proof of Burnside's lemma. due to George P61ya.and V(2) = {12. 1. ••• .0.180 3 Advanced Problems We need a formula for the number of orbits when a group (the group of permutations) acts on a set (the set of unordered pairs of vertices).3. Let a finite group G act on a finite set X. . where fg is the number of elements of X fixed by g. Let = {l. L h(c)2 C Q(C). The formula is given by Burnside's lemma.4}.24.0. the cycle type of the permutation (abc)(de)(f)(ghi) is given as I + 2 + 3 + 3.24 + 8. V cycle type of permutation of V 1+1+1+1 1+1+2 2+2 1+3 4 # of permutations of given cycle type I 6 3 8 6 cycle type of permutation of V(2) 1+1+1+1+1+1 1+1+2+2 1+1+2+2 3+3 2+4 #of fixed points 26 24 24 22 22 Thus.0. The following table lists the cycle type of permutations of V. The general formula. cn) is the cycle type of a permutation of V.. What is the permutation of V(2) given by. we find that the corresponding permutation of V(2) is (12)(13. 13. The cycle lengths of a permutation make up the cycle type of the permutation. BURNSIDE'S LEMMA.2. 34}..0. the permutation (1. . the cycle types of the corresponding permutations of V (2) .cn ).4) of V? Looking at what happens to each element of the unordered pairs. 24..
j fixed points is The case j = 2 yields the exponent q(c) = 1 + (n ~ 2) + I . .LkckLCk k = 2n ~Ck. We will show that the other terms are bounded above by expressions which. ::: gn. 1 The number of permutations with n . That is. n +2+2Iog2 n . Bonus: Asymmetric Graphs The typical unlabeled graph has no nontrivial symmetries and hence is an asymmetric graph.(r+s) ::: 2 ~ kCk + ~ 2. Assume that the permutation has n . ~2m n. We have q(c) ::: L k [~Ck + ~Ck(Ck k r<s 1)J + Lrnin(r. gn '" . (n . .)  n + 2.1 = (.) +L r<s gcd(r.j fixed points. the contribution is bounded by r asn ~ 00.s)crcs r<s 2 . The complications in the formula for gn melt away in the following proof of the upper bound. s)cscs k is the number of cycles in a corresponding permutation of V (2) • The first term of q(c) comes from two vertices in the same cycle of the permutation of V. The second term comes from two vertices in different cycles of the same length. upon division by 2m In!.2). which tends to 0 Upon dividing by 2 min!. where 0 ::: j ::: n.CrCs I" 2 k I = .. The case j = 0 gives the term 2m In!. gn n.3. and q(C) = L k l~J Ck + L k (C.5 Combinatorics 181 is the number of permutations of cycle type c. tend to 0 as n ~ 00. The third term comes from two vertices in different cycles of different lengths. I leave it to you to explain the trivial lower bound.
j /2 < O. the contribution is bounded by which tends . 2m In!.182 3 Advanced Problems ~ Now let's look at the case j 3. We obtain L:>k :snj +j/2=nj/2 k and q(c) Upon dividing by toO asn ~ 00. so that 1 .j/2). We conclude that 1 :s 2n (n  j/2) = (n) + 2n (1 . 2 1 2!n(1j/2)+j log2 n .
A Toolkit AM. n ) lin . n 1 1 HM=. ••• . Xn be positive real numbers. which is equal to the number of kelement subsets of an nelement set. geometric mean (GM).. The arithmetic mean (AM). The area of a circle of radius r is rr r2. Xn are defined as 1 n AM= n GM= ( LX. Area. . The expression ( n) . Let XI. The area of a square of side length s is s2. and harmonic mean (HM) of XI.=1 1=1 nx. The area of a parallelogram of base b and height h is bh. are equal. . 183 . HM and AMGMHM inequalities. GM.=1 L~ n These means satisfy the inequalities HM::::GM::::AM.k!(n n! k k)!' for 0 :::: k :::: n. with equality if and only if all the X. ••• . Binomial coefficient. The area of a triangle of base b and height his bh/2 (also see Heron's formula under the entry for Triangle).
n::: O. and hyperbolas.184 A Toolkit Another important binomial coefficient expression is (n + k 1 k1) ' which is equal to the number of distributions of n indistinguishable objects into k classes. nk... the equation of a conic section can be put into a simple form. A selection of objects from a set in which the order of the objects is unimportant. Let n = nln2 . Then x :s i :s k... n2. Binomial theorem.Xi i=1 k (mod n). solve the == L !!.. . . ni Combination.. The intersection of a plane with a double cone. The equation of a circle is The equation of a parabola is . x is unique modulo n In2 . The identity (x Letting x + yt = k=O t (~)xk ynk. After suitable translations and rotations. . == r2 Furthermore. nk are pairwise relatively prime positive integers and rl. Conic sections.. parabolas. ellipses. nk. The nondegenerate conic sections are circles. For I congruence (n/ni)xi == ri (mod ni). r2... then there exists an integer x satisfying the simultaneous congruences x == rl x (mod n. = y = 1. . (mod n2).. If n 1. We can find the value of x as follows. we obtain the identity Chinese remainder theorem.). The number of combinations of size k from a set of size n is given by the binomial coefficient (~). rk are any integers..
A realvalued function f is convex if f«(I . The determinant of a square matrix A detA = L(l)sgn(u) u = [a (i. A graph in which each edge {x. i. For n :::: I.. Determinant. 2.. The derivative of a realvalued function gives the rate of change of the function. the sign of a.A Toolkit The equation of an ellipse is 185 The equation of a hyperbola is Convex function. Euler's formula. Suppose that a connected planar graph with V vertices and E edges partitions the plane into F regions ("faces"). Directed graph.aU)). . let tP (n) be the number of integers between I and n that are relatively prime to n. LtP(d) din = n. Then V + F = E +2. An important rule of differentiation is the power rule: the derivative of the function f(x) = xn is f'(x) = nx n. j)In xn is given by n n i=1 a(i. n} and sgn(a). . Descartes' rule of signs. If the prime factorization of n is n= then np7 i=1 k i .A)f(x) + Af(y).A)X for all real x. Derivative. y} has a direction. . from x to y or from y to x. + AY) ::: (I . where the sum is over all permutations a of {I.. tP(n) The following fact is useful: = en (p/ k i=1 Pi' eI) . Euler's function. or less by an even number. is + I if a is an even permutation and I if a is an odd permutation.I .e. The number of positive roots of a polynomial is equal to the number of sign changes of its coefficients. y and 0 ::: A ::: l. The determinant of a matrix is nonzero if and only if the matrix is invertible.
+ and . The sequence Un} = {O.21. 13. the sequence {ClcJ>n + C2~n} satisfies the Fibonacci recurrence relation. If two sequences u and v satisfy the recurrence relation. Therefore Field. 1. x 2 x .34.I is called the characteristic polynomial of the recurrence relation. and In = Inl + In2. we deduce that and so the sequence satisfies the recurrence relation and the initial conditions. The polynomial x 2 . . A field F is a set (with at least two elements) on which are defined two binary operations.2. 1. CI U + C2V.8. Then and hence x2 = or X + I. then == 1 (mod p).. From the initial values. for n ::: 2. with CI and C2 constants. we find that the roots of the characteristic polynomial are 1+ v's cJ> = Hence. Fibonacci sequence. In order to find an explicit formula for the Fibonacci numbers. assume that there exists a value of x such that the sequence {xn} satisfies the recurrence relation. But there is only one sequence that does both.I = 0. F is an abelian group with respect to . such that the following conditions hold: +. the sequences A 2 ' cJ>=2· Iv's satisfy the recurrence relation. 1.. From the quadratic formula.} defined by 10 = 0.5. then so does any linear combination of them. If p is a prime number and p apI f a.186 A Toolkit Fermat's (little) theorem..3. Hence.x . II = I.
PI P2 ···Pk ' where the Pi are distinct primes and the ei are positive integers. Fundamental theorem of arithmetic. In a drawing of a graph. 3.. 4. a set of n vertices. Generating function. t><J1 • The degree of a vertex is the number of vertices adjacent to it. is a set of n vertices and all possible edges between vertices.. denoted K n . Every integer n > 1 has a unique (up to order of factors) prime factorization n . the generating function for the Fibonacci sequence is x + x 2 + 2x 3 + 3x 4 + 5x 5 + 8x 6 + 13x 7 + .. The complete graph on n vertices. _ el e2 ek For example. A finite field exists of any order pk./5)/2. I} with addition and multiplication modulo 2. 2. Golden ratio. the vertices have degrees I. . Z E F. 3. . These are the only possible orders of finite fields. + . In the above graph. The number ifJ = (1 Graph. The number of edges is mn. Vertices not joined by an edge are nonadjacent. is a set of m vertices. 4. 3. and all possible edges between vertices in different sets. 3. where p is a prime and k ::: I. (2) the set Q of rational numbers with the usual addition and subtraction. The complete bipartite graph on m. Examples: (I) the set R of real numbers with the usual addition and multiplication. X· (y + z) = X· Y + X· z.. (distributive law) for all x. This number has the property that ifJ2 = <p + 1. y. adjacent vertices may be joined by a straight or curved line and the lines may cross arbitrarily. A graph G consists of a set V of vertices and a set E of edges joining some pairs of vertices. Vertices joined by an edge are adjacent. The number of edges is (~). The picture below shows a graph with seven vertices and ten edges. F .{O} (where 0 is the additive identity) is an abelian group with respect to . denoted Km.. n vertices..n. (3) the set Z2 = {O.A Toolkit 187 2. The (ordinary) generating function of a sequence {an} is the power series ao + alX + a2x2 + a3x3 + a4x 4 + .
. (identity element) G contains an element e with the property that. each element of G permutes the elements of X. . . An indefinite integral is the antiderivative of a function. and (2) g(hx) = (gh)x. (2) the set of nonzero real numbers R \ {O} under multiplication. b) such that f(x) = y. where XI./.. (3) the set of invertible n x n matrices with real entries under matrix multiplication. otherwise. Let a and b be integers.. E 3. not both O.. Integral. for all x E X. . then C divides the plane into two components. bj. In a group action.. Examples: the groups (I) and (2) above are abelian and (3) is nonabelian. x * satisfying * (y * z) = (x * y) * Z. Given ~ABC (XI. b).. A definite integral can represent the area under a curve. G is nonabelian.. (inverse elements) for every x that x * XI = XI * X = e. An ordered ntuple Law of cosines. The greatest common divisor of a and b. Intermediate value theorem. Group. there exist integers x and y such that g = ax + by. A group G is a nonempty set on which is defined a binary operation the following three axioms: 1. . . Jordan curve theorem. is the greatest integer that divides both a and b. for all x G. . (associativity) for all x. for all g. Xn are integers. The order of a subgroup of a finite group divides the order of the group. Z E G. We say that G is abelian if x *y = y *x for all x. Lattice point. An important integration rule is the power rule: f xn dx = _l_xn+l n+l + en. then there exists a number x in (a. Let G be a group and X a nonempty set. where e is the identity element of G. written gcd(a.h E G and x E X. labeled as below. Group action. Lagrange's theorem..188 A Toolkit Greatest common divisor. y E G. G there exists an XI E G with the property Examples: (I) the set of integers Z under addition. x *e = e *x = x.xn ) E R n . y. Given integers a and b with greatest common divisor g. Then a group action of G on X is a function from G x X to X such that (1) ex = x. E 2. If C is a simple closed curve in the plane. 1. If f is a continuous realvalued function defined on the closed interval [a. and y is any number between f(a) and feb).
The set of natural numbers {I. and 14 are rational numbers.. 4/7. .. A real number is mtional if it is of the form p / q. Numbers. + ak = n. written Icm(a. 2. for 1 ~ i ~ k. 3. or if limx +a f(x) = ±oo and limx + a g(x) = ±oo.ABC labeled as above. ::: 0 and al + a2 + . Multinomial theorem.3. 1.} is denoted by Z. A real number that is not rational is called irmtional. Iflimx+a f(x) = oand limx+a g(x) = 0. The set of integers {. is the least positive integer that is a multiple of a and b.. while . Examples: 2/3. sin A a = sin B b = sinC c Least common multiple.I.. Suppose that f and g are differentiable functions and g' is nonzero on an interval containing a (except possibly ata). The least common multiple of a and b. The identity n ::: O. O. For example.. then lim f(x) g(x) = lim x+a x+a f'(x) g'(x) (ifthe second limit exists).} is denoted by N. Two integers a and b are congruent modulo n. and we write a == b == (mod n). and rr are irrational numbers. Let a and b be integers. b). . The expression where all a. Given t:. . which is equal to the number of permutations of n elements in which there are ai elements of type i. e. 3. The set of rational numbers is denoted by Q. 107 (mod 10). 2. . L'Hopital's rule. Modulo n... when n divides ab.A Toolkit 189 B A ~ ____________~C b Law ofsines..2. The set of real numbers is denoted by R. not both O.fi. 7 Multinomial coefficient. where p and q are integers and q oF o.
The power set of a set S.2)(6). 2 to 5. 4. For example.3)(5.r is a factor. 3. The identity Pascal's triangle.fi is algebraic and TC and e are transcendental. 5 to 2. and 6 to 6 is written in cycle form as (1.. Otherwise. The number of permutations of size k from a set ofsizen isn(nl)(n2)··· (nk+ 1). and 1999 are primes. 5. A complex number is algebraic if it is the root of a polynomial with integer coefficients. Examples: . Every polynomial of degree n has n roots in the field of complex numbers C. Pascal's identity. The cycle form of a permutation shows the image of each element and the resulting cycles. the permutation of {I. n is prime.190 A Toolkit The set of complex numbers is denoted by C. 3 to 1. Examples: 15. 17. then one of the classes must contain at least two of the objects. A selection of objects from a set in which the order of the objects is important. this number is given by the "factorial" n! = n(nI)(n2)··· 3·2·1. Ifk = n. 100.4. is the collection of all subsets of S. Here is a simple version: If n + 1 objects are in n classes. There are many versions of this useful combinatorial principle. If S has n elements. A polynomial of degree n is an expression of the form A root of a polynomial P(x) is a number r such that P(r) = O. Power set. denoted P(S). Pascal's identity is the basis for generating Pascal's triangle of binomial coefficients. 2 3 3 464 5 10 10 5 Permutation. Prime and composite numbers. 6} that sends 1 to 4. A simple relationship exists between the roots of a polynomial and its factors: r is a root if and only if x . Pigeonhole principle. and 2 100 are composite numbers. A natural number n ::: 2 is composite if n has positive factors other than 1 and n. 2.4 to 3. . 2. then P(S) has 2n elements. Polynomial. A number that is not algebraic is called transcendental.
k. . Suppose that A I. c. + alx + ao is a polynomial with integer coefficients.k = An are finite sets. c. A geometric series is one whose terms change by a fixed ratio. An arithmetic series is one whose terms increase by a constant amount. and d (in cyclic order) and diagonal lengths m and n is cyclic (the vertices of the quadrilateral lie on a circle) if and only if ac +bd = mn. The number of terms in the sum may be finite or infinite. define In. The side lengths of a triangle.A Toolkit 191 . an infinite arithmetic series is of the form a + (a + d) + (a + 2d) + (a + 3d) + . Quadratic formula. b... Thus..1 + . Series. k ::: n. The quadratic equation ax 2 + bx +c = 0 has solutions x = ~~ b ± Jb 2 2a  4ac Rational root theorem. where a is the first term and r is the common ratio. q) = 1). an infinite geometric series is of the form a + ar + ar2 + ar 3 + . satisfy the relation if and only if the triangle is a right triangle with right angle opposite the side of length c. .. k=1 The case n = 2 is the wellknown Venn diagram rule IA U BI = IAI + IBIIA n BI.. Principle of inclusion and exclusion. If P(x) = anx n + an_IX n. Ptolemy's theorem. a. For I < Then n IAI U··· U Ani = L(I)k+lln.. then p divides ao and q divides an. b. A series is a sum of a sequence of numbers. . where a is the first term and d is the common difference. Thus. and p/q is a rational root of P (with gcd(p. Pythagorean theorem. Stirling's approximation: .. A quadrilateral of side lengths a..
The area of a triangle is A = tah. The volume of a sphere of radius r is 47r r3 /3. In any triangle with side lengths a. 1. v E V such that.. y are joined by an arrow from x to y or from y to x. Volume. the following conditions hold: I· (VI + V2) = I· VI + I ..c). A complete directed graph. b. Vector space. the vectors can be pictured by arrows in R2 and R3./s(s  a)(s . + y.b)(s . The volume of a tetrahedron or cone of base area A and height h is Ah/3. V2.. v) = (II h)· v. and c. In these vector spaces. Tournament. y. where a is the length of one of the sides and h is the length of the altitude from the opposite vertex. The elements of V are called vectors and the elements of F are called scalars. where I is the multiplicative identity of F. The volume of a cylinder of radius r and height h is 7r r2 h. The triangle's incenter is the center of its inscribed circle. II· (12 . b. The orthocenter is the intersection of the three altitudes of the triangle (an altitude is a line passing through a vertex and perpendicular to the opposite side). It is the intersection of the three angle bisectors of the triangle. A vector space V over a field F is an additive abelian group together with a rule that assigns to every I E F and v E V an element I . one in which every pair of vertices x. The volume of a cube of side length s is s3. 4. c are the side lengths and s = t(a + b + c) is the semiperimeter. for all I. i. It is the intersection of the three medians ofthe triangle (a median is a line joining a vertex to the midpoint ofthe opposite side). I· v = v. 12 E F and v. The area is also given by Heron's formula: A = . the triangle inequality asserts that a < b + c. 3. It is the intersection of the perpendicular bisectors of the sides of the triangle. Examples: the vector space R2 over the field R. A triangle's circumcenter is the center of its circumscribed circle. and the vector space R3 over R. and x Ix + yl ::: Ixl + Iyl· Equality occurs if and only if the vectors are parallel (and the triangle degenerate). I . v . (II + h)· v = II . . where a.. respectively.192 A Toolkit Triangle. v + h· v. The centroid is the center of mass of the triangle. V2 E V. 2. the inequality becomes If the sides are given by vectors x.e.
13 p. Partitions. 3 p. 5 p.H list of Bonuses Cookie Jar Division Mediant Fractions Sum of an Arithmetic Progression Finding a Polynomial Curious Identities A Diophantine Equation Finding the Prime Factorization Ordered Digits in a Square The OnLine Encyclopedia oflnteger Sequences Clock Magic Centigrade to Fahrenheit Sum of a Geometric Series Power Means Distributions. II p. 20 p. 15 p. and Schur's Estimate A Vector Proof A OneTriangle Proof Another Memorable Triangle p. 6 p. 19 p. 9 p. 18 p. 21 p. 10 p. 7 p. 16 p. 12 p. 22 193 . 2 p.
62 p.42 p.67 p.29 p.27 p.57 p.34 p.52 p.194 B List of Bonuses A Squarable Lune Covering With Unit Squares Calculation by Geometric Series Symmetry Groups Irrationality of .46 p.31 p. 71 .38 p.45 p.37 p.64 p.54 p.58 p.35 p.23 p.26 p.54 p.33 p.47 p. 70 p.J2 Elementary Symmetric Polynomials Another Zigzag Path A Sum of Areas A Can of Minimum Surface Area The AMGM Inequality Convex Functions What About the Second Hand? Sums to Any Number Inside or Outside? Lagrange's Interpolation Formula Integer Solutions An Algebraic Proof The Genus of a Graph The Problem for Hyperbolas and Parabolas Isometries of the Plane A Fundamental Parallelogram Tiling With Triangles A Family of Triangle Pairs The WallaceBolyaiGerwien Theorem The Case of the Rotating Parallelogram Estimating the Harmonic Sum Another Quick Integral Probability that Two Numbers are Coprime Four Spherical Triangles p.27 p.50 p.61 p.44 p.69 p.
104 p.106 p.B list of Bonuses 195 Fermat's Last Theorem Irrationality of TC Average Number of Fixed Points of a Permutation Average Waiting Time A TwoUrn Problem Random Arcs on a Circle Average Number of Cycles in a Permutation Pell Equations Divisibility Rules The Folium of Descartes A Googol Ackermann's Function A Square Root Algorithm Powers of Fibonacci Numbers The Subcommittee Identity Fermat's (Little) Theorem Conway's LUX Method The Passage to Real Numbers An Instant Identity Packing 3D Animals Linear Elastic Collisions The Correct Number of Orders Partitioning Space Other Large Integers Finite Derivative and Integral Arbitrary Line Sums Integer Averages Variations on the Games A General Drawing Strategy p.116 .91 p.98 p.81 p.76 p.89 p.73 p.72 p.115 p.85 p.100 p.112 p. 111 p.87 p.80 p.109 p.102 p.108 p.77 p.96 p.lOl p.93 p.110 p.84 p.75 p.87 p.86 p.
130 p. 121 p. 178 p. 168 p. 139 p. 122 p. 124 p. 174 p. 164 p. 157 p. 142 p. 118 p. 155 p.196 B list of Bonuses A Finite Field Method Brouwer's FixedPoint Theorem Rational Generating Functions More Change for a Dollar A Generating Function for the Diagonal NonIntersecting Transformations Lattice Point Vertices Dilworth's Lemma The Entropy Function Channel Capacity The Hat Problem The Catalan Numbers Modulo 2 and 3 Flat Cyclotomic Polynomials A Tiling of the Hyperbolic Plane De Polignac's Formula Repeated Numbers in Pascal's Triangle Never a Prime Hilbert's Tenth Problem The Fundamental Theorem of Symmetric Polynomials Alcuin's Sequence The Probabilistic Method Dancing Links A Combinatorial Problem The HoffmanSingleton Graph Asymmetric Graphs p. 181 . 167 p. 145 p. 134 p. 132 p. 148 p. 154 p. 161 p. 125 p. 159 p. 137 p.l72 p.
Jones. 66(4):263265. J. 1973. 2002. and R. Poonen. Washington. The Hat Problem and Hamming Codes. [II] R. New York. W.. Problems and Solutions 19852000. Kedlaya.2001. Flat cyclotomic polynomials of order three. Gardner. Bachman.S. M. [4] G. Cairns. Wiley. [3] M. 13:8488. Florida. Bell. Ringel. Introduction to Combinatorics.1993. and Problems.A. Introduction to Number Theory. Bulletin of the London Mathematical Society. T. 197 . [8] Liangshin Hahn. 1996. Ram Murty. Simon and Schuster. 38:5360. [7] M. 2008. McIntyre. Sudoku squares and chromatic polynomials. [6] M. Mathematical Association of America. Mathematical Association of America. Mathematics Magazine. Boca Raton. Erickson and A. second edition. Honsberger. [9] N. Erickson. Vazzana. Vakil. Herzberg and M. C. [13] K. 54(6):708717. [10] A. Complex Numbers and Geometry. M. 2006. Academic Press. The Colossal Book of Mathematics: Classic Puzzles.S.A. Geometric proofs of some recent results of Yang Lu. Chapman & Hall/CRC Press. W. U. The William Lowell Putnam Mathematical Competition. Hartsfield and G. Norton & Company. [2] E. Men of Mathematics. Bernstein. 1994. Mathematical Gems I. first edition. B. [5] M. 1937. New York. Diophantine representation of the Fibonacci numbers. Notices of the American Mathematical Society. D. New York.. Fibonacci Quarterly. and J. Mathematical Association of America. Focus.2007.. Strantzen. 1975. Paradoxes. [12] James P. Pearls in Graph Theory: A Comprehensive Introduction. New York. 1994. U.Bibliography [1] G. 21(8):46. 2001.
Cambridge. [21] I. P.A. Leung. Allyn and Bacon. [18] J. 1962. Yaglom. A Course in Combinatorics. Cambridge University Press. Doubleday. Cambridge University Press. U.S. M. Enumerative Combinatorics. New York. first edition. Boston. V. Hilbert's Tenth Problem. Wilson. 1999. [17] G. How to Solve It: A New Aspect of Mathematical Method. 1973. American Mathematical Monthly. [20] R. MA. M. Matiyasevich. On the cyclotomic polynomial1Jpq(x). 1999. [16] Y.A. [19] R. U. Stanley. second edition. [15] J. MIT Press. [22] I. Enumerative Combinatorics. Stanley. Mathematical Association of America.. Cambridge University Press. New York. New York. 1993. volume I. Rotman.. H. volume 2. P6lya.S. Y. 1968.1957. 1992. van Lint and R. M. Geometric Transformations ll. Lam and K. The Theory of Groups: An Introduction. 1996. Mathematical Association of America. Yaglom. H. Geometric Transformations I.198 Bibliography [14] T. Cambridge. . P. 103(7):565567.
130 binary matrix. I modular. 84 Brouwer's fixedpoint theorem. 94.69. 184 bits of information. 80 alternating group. 166. 192 channel binary symmetric. vii Aha! Insight. 19. 86 animals. 1. 20. 79 Banach.19. 183 of circle. 18. 76. 39 celestial mechanics. 155 baseb representation. 140 capacity function. Stefan. 168 arithmetic mean.20. 165 Alcuin's sequence. 136 binomial random variable. 85 Bell. 79 barycentric coordinates. E. 87 Ackermann. 137 Bonaparte.84 algorithm depthfirst search. 121 Burnside's lemma.26. 137 Boardman. 72 of equilateral triangle.62. 73 area. 171 gobbling. 148 Banach's matchbox problem. 49 Brahmagupta. 192 arithmetic. 85 base2 representation.68. 7 Boltzmann. 156. 14 centroid. Giovanni Domenico. 10 I annulus. 154. 156 Catalan number.155. 121 Brouwer. 152 Bachman. 133 of quadrilateral. 5. 68 automorphism group. 159 asymptotic. R.183 binomial distribution. 19 of triangle. 37 arithmetic progression. 167 algebra. Eugene Charies.Index Ackermann's function. 170 binomial coefficient. 139 Cassini's identity. 28 AMGMHM inequalities. 143 Cauchy. 139 199 . vii Alcuin. 84 analytic geometry. 133. Luitzen Egbertus Jan. 161 Cassini. E. Anders. Augustin Louis. 121 baseIO representation. 18 arithmetic meangeometric mean inequality. Ludwig. Gennady. 127 anti derivative. 107.. 143 Catalan. 5 Beriekamp. David. Michael.. 84 Brahmasphutasiddhanta. Napoleon. 165. III capacity. 88 Aha! Gotcha. T. 135 binomial theorem. 15 Centigrade. 46. 68 arc length. Wilhelm. 180 calculus. 36 Callan. 137. 46 Celsius. 183 analysis.
58 Euclidean space. 135 combination. straightedge and compass. 72 entropy function.41 coefficient of growth. 192 Damiano. 191 Erd6sSelfridge theorem. 98 counter. 130 cycle type. 162 degree. 113 exact cover.175 complete bipartite graph. 190 Fahrenheit. 139 characteristic polynomial. 110 Descartes' rule of signs. 159.80. 140 Euclidean plane. 172 de Polignac's formula. 192 classical mechanics. 161 quadratic. 163. 183 ci~umference of. 185 Descartes. 66. 53. 133. 27 volume of. Henri.72 discriminant.56. 102 symmetry group of. 31. 134 Diophantine equation. 19. 161 Diophantus. 75. 74. 151 Dancing Links.23. 115 Dudeney. 94. 20 construction. 143. 35 volume of. 86 determinant.185 Euler.138 unbiased. 184 distribution problem. 192 congruence. 12 draw game. 184. 137. 54 Euler's formula. 71. 81 expected value. 116 Erd6s. 170 existence argument. 148 cylinder. 160. 151 Chinese remainder theorem. George Paul. 93. P. 184 area of. 110 covering system. 168 expectation. 74 exponential function. 58 conservation of momentum and energy. 53 disk. John H. 44. 170 exact cover problem. 146 flat. 46 clock.53. 93 cube. 190 combinatorics. 13. 136 equation Diophantine. Daniel. R. 134 Dilworth. 4 elementary symmetric polynomial. 54. 168 errorcorrecting code. 72. 118 complex number. 62 "duplication method". 156. 85 digit. 158 Csicsery. II. 69 Even Steven. 9. 108 Dilworth's Lemma. 185 finite. 127 derivative. 110 derivative operator. 142 Conway. 104 constant of proportionality.25. 146.. 15 Index . 155 De Polignac. 139 factorial. 102 chess. 112. 187 complete residue system. 186 checkerboard. 84. 127 Delannoy. Rene. Pedro. Alphonse. 51 complete graph. 9. 75 difference of squares. 155 decision procedure.33. 184 elliptic curve.93. 106 divisibility rule. 124. 172 data structure. 192 curve. 185 Euler's function. Leonhard. 72 ci~umcenter. 23 convergence of series. 64 volume of. 185 dice. 184 ci~le. 139 coin. 17 convex function. 187 Delannoy path. 16 cone. 38. 184 conjugation. 158 conic sections. 84. 30 ellipse. 51 composite number. 140 channel capacity. 180 cyclotomic polynomial.200 capacity of. 116. 85 divisor. 121 distribution. Henry Ernst. 33. 14 Fahrenheit. 123 biased. 70.. 85 computer science. Paul. unit.
175 Harary. 72 Fibonacci number. 72 Fermat. 67 harmonic sum.186 The Fibonacci Quarterly. 185 Gray code. 169 Gauss. 188 group presentation. 172 Fano. 71 Gobel. Gino. 50 Hilbert's Tenth Problem. 113 SET. I. 192 hexagon. 102 harmonic mean.3 function. 54 globe. 188 group.. 178 Honsberger. 161. 102 GangoIli. 122. 153 symmetric. Frank. 102. 38 doubling. II Gardner. 120 Falco.180 Folium of Descartes. 122. 87 linear. 149 of symmetries. 38 primitive recursive. 187 fundamental theorem of symmetric polynomials.. 59. 154 presentation. 188 alternating. 164 game. Howard. Carl Friedrich. Ross. Anil.28. 167 cycle of.121. 125. Frits. 122. 188 abelian. 96. 178 regular.75. 162 Hippocrates of Chios. E. 18 harmonic series. 151 matrix. 54. 165. 6 Fishburn. 175 Petersen. 185 convex.187 Golomb.87 Gould. 134 fixed point. 1I8. 23 Hoffman. N. 102 googol. 59 Hahn. 87 exponential. 178 general linear. 95. vii. 16. 65. 67. 160 Heron's formula. 148. Peter. 126. 63. 110 Gray. 115 game theory. 100. 162 Hilbert's Third Problem. 88 sine. 107 Horace. Philip. 113. 79 fundamental theorem of arithmetic. Frank. 1I6 tictactoe. 175 girth of.130. 162 23 problems. Alan. 158. 88 rational. 112 glidereflection. 63 Hilbert. 138 Even Steven. 28 triangle. Marsha. Wayne. 51 Hall's Marriage Theorem.I72 taking. 175 Hall. 176 graph theory. 186 Fermat's Last Theorem. A. 151 Farey sequences. 110 greatest common divisor. Paul. Pierre de. 32 geometric mean. 187 finite difference calculus. 52 geometric construction. Martin. 169 graph. 186 Fibonacci sequence. 3 Fermat's (little) theorem. 25 golden ratio. vii 201 . David. 187 algebraic. 60. 167 genus. directed. 112. 161. 187 asymmetric. 12. 2 mediant.Index fair division. 84 analytic. 123. Solomon. 12. 154 group action. 118. 69. 113 Oddball. 148 special linear. 156. 69 tower. 5 generating function. 158 recursive. 18 geometry. 86 Gilbert. 81 Hartung. 9. 42 Garns. 28 automorphism. 126 rational. 186 finite. 88 functional analysis. 130 Ginzburg. 181 complete. 180. Liangshin. 178. 86 fraction. 44. 22. 160 field.93 graph.
23 LUX method. 151 nonsingular. 48 Knuth. 188 interval. III rotation. University of. 192 Information Theory. 18 Jensen's. 156. 188 law of sines. 161. 23 AMGM. 134 irrational number. Wayne. 12. 183 geometric. perpendicular. 46 multinomial coefficient. 100 matches. 93 Niven.202 hyperbola. 184 hyperbolic plane. 38. 18. 18. 157 mean arithmetic. 170. 54. 2. 68 finite. 177 eigenvector of. 147 Mobius inversion. 132. 110 intermediate value theorem. 188 Kemnitz. 102 Mobius. 142 Joint Mathematics Meetings. 183 harmonic. 61. 136.54 isoperimetric inequality. 127 law of cosines. 46 Lagrange's theorem. 177 invertible. 162 lune. Donald. 154 hyperplane.189 Index Napoleon's theorem. 98 magic square. 190 Fibonacci.37 AMGMHM. 123 . Yuri.146 composite. Isaac. 32. 153 binary. Amfried. 64. 143 complex. 167 lines. 172 Kummer surface. 122. 38 mediant fractions. 9.118 linear elastic collision. 183 median. 9. 189 I'Hopital's rule. 74 incenter. 188 Lagrange. 29. 18. 47. Pierre Alphonse. 51. 183 inequality. James P. 36 Jensen's inequality. 3 Michigan. 31. 39 mathematical notation. 96 Martin. 108 identity operator.. 28 isometry. 189 multinomial theorem. 189 Lucas. Edouard. 188 lattice theory. 170 determinant of. 192 mediant fraction. 49 Kummer. 61 N is a Number: A Portrait of Paul Erdos (film). 72. Gary. 160 Jordan curve theorem. 110 integral operator. 143.189 line. 50 symmetric. 174 orthogonal. 44. 49. 95. 143 eigenvalue of. 3 triangle. 141. 59. 94. 176 matrix group. 147 modulo 2. 123 Lucas. 134 Laurent series. 149 McDaniel. Roger B.. 172 locus. JosephLouis. 79 mathematical induction. 32 Newton. 186 irrational. 5 Newton's identities. 53 Lucas number. 49 necklace. 2 integral. 155 Lagrange's interpolation formula. 110. 53 linked lists. 139 integer triangles. Ernst Eduard. 190 Catalan. 162 matrix. 127 Laurent. 28. 91. 130 number algebraic. 192 inequalities AMGMHM. 112. 56 permutation. 140 Jones.142. 96 Nelson. 69 Matiyasevich. 104 linear recurrence relation. 46 lattice point. II. 188 definite. 189 least common multiple. Ivan. 44. 73 nonselfintersecting. 45.
93 Riordan. 6. 126 Puiseux. 190 plane. 148 irreducible. 146 elementary symmetric. 134. 145 linear. 54 rotation matrix.. 62. 179 Oresme. 180 polygon. 46. 183 Varignon. 12. 168 probability. 130 polynomial. 57 salt water. 27 Oddball. III. 69. 81 Perrin's sequence. 67 orthocenter. 131 inRd. 129 selfintersecting. 187 power set.190 principle of inclusion and exclusion. 80. 54.159. 18 power series. John.John. 192 parabola.113 odometer. 64. 167 permutation. 158 P6lya. 32 Pell equation. 102 power mean. 83. 65 polyominoes. 84. 72 pigeonhole principle. George. 83. 75. 90. 186 square. 192 . 31 flat. 166 partial order. 191 quadratic residue tournament. 110 orbit.93. 100. 84 Pell. 190 Pascal's triangle. 36. Nicole. 12. 57. 162 Petersen.191 Puiseux's theorem. 131 203 pole. 157. 126. 46. 54 relativity theory. 70. 93 octahedron.143 shortest. 9. 3 scalar. 69 recurrence relation. 99. 57 parameterization. 23. R. 191 random variable. 191 quadratic formula.Index prime. 20.20 parallelogram law. 130 cyclic. 24. 129 period. 190 prime number. 19 Pascal's identity. 72 Ptolemy's theorem. 34. 81 cycle type of. 146 quintic. 20. 100 rectangle. 103 partition.61. 63. 161. 74. 10 parity. 159. 75 binomial. 46 points at unit distance. 70 proof by contradiction. 79 rational root theorem. 92 rotation. 88 reflection. 190 rational. 22. 135 random walk. 81. 109 operator derivative. 107 pointslope formula. 162 Perrin. 30. 191 probabilistic method. 19. 9 real numbers. 45. 126. 91. 48. 115 partial fractions. Victor. 130 pentagram. 10. 168 quadrilateral. 118 monic. 74 integral. 126 Pythagorean theorem. 132 transcendental. 81 random. 178 Jr. 122. 189 sequence. 190 path. 82 projection. 83 number theory. 69. 108. 62. 190 cyclotomic. 130 area of. 191 rational solution. 50 rotation operator. 167 recursion. 110 identity.84 pentagon. 129. 190 triangular. 134 particleparticle collisions. 184 parallelogram.12. 167 palindromic. 191 quadratic equation. II. Julius. 180 cycle notation. 10. 73 The Proof (film). 132.
62. 165. 192 sequence. 49 surface area. 60 spherical. 89 Stanley. 174 triangle. 23. Pierre.59. 93 Index tangent line. Richard. "centers" of. 61 perimeter of. 154 torus. 51 tournament. 116 serniperimeter.. 28. 2. 28 symmetric point. 49 quartic. 153 transversal. Issai. 62. 69 Singh. 70 volume of. 72 Singleton. 87 Sloane. 165.67. 53 TaniyamaShimura conjecture. 27 system of distinct representatives. 83. 60 isosceles. 58. 102. 62. W. Isaac Jacob. Robert.165. 29.. 154. II Sudoku. Emanuel. 191 arithmetic. 27. 60. 191 SET game. 20. 23. 60. 178. 8. 33. 62 tetrahedroid. 183 circumcircle of. George. 83 area of.68. 191 subcommittee identity. 49 Kummer. 167. 61 Varignon parallelogram. 192 triangular wave function. III Stevens. 191 geometric.192 triangle. 58. 49 tertrahedroid. 15 transformation isometry.20. 25. 172 Shannon's First Theorem. 137 simplex. 12. 3 Sinden. 125 tictactoe. 63 spectral theorem.169 sum harmonic. L. 167 Fibonacci. 131 volume of. Claude. Simon. 35 symmetric group. 181 circular. 178 Sirotta. 192 . 37. 192 area of. 143 train. A. 135. 12. 60 right. 69 surface. 32 symmetry. 49 tetrahedron. 8. W. 19 Schur. 26. 131 Simpson's Paradox. 54 orthogonal linear. 133 Schur's estimate. 55 similarity. 48 equilateral. 72 tessellation. Neil J. 16. 20 vector. 63 regular. 96 symmetry group. 154. 52 unit. 54 transvection. 93 subset. Franz. 154 triangle inequality. 120. 52 irrational. Milton. 131 translation. John. 71 triangle group. 26 square root. 156 Perrin's. 192 The OnLine Encyclopedia of Integer Sequences. 84 Twin Prime Conjecture. F. 192 spline method. 103 trigonometry.. 183 unit. 162 series. 192 altitude of. 120 Sperner. 80 Stirling's approximation.204 Schoenberg. 12 solid of revolution. 137 Shannon's Second Theorem.131 inradius of. 120 sphere. 140 Shannon. 133 square. 175 Szekeres. 192 Tower of Hanoi puzzle. 46. 19 Selfridge. 115 tie series. 127 Alcuin's. 130 sine curve. 78 tiling. 122 Vfinite. 177 Sperner's lemma. 67 infinite. 49. 20 serniperimeter of.35. 155 Van Schooten. 34. 20 Varignon.
174 Venn diagram. 76 WallaceBolyaiGerwien theorem.. A. 33 zigzag sequence.Index dot product. 72 William Lowell Putnam Mathematical Competition.. 64 of regular simplex. 50 Wiles. 167 Ziv. 27. 16 waiting time. 99. 133 of tetrahedron. 35. 141 Yaglom. 55 vector space. 63. 27 von Neumann. M. 62 wallpaper pattern.192 of cone. I. 191 volume. Andrew. John. 94. 112 205 . 192 basis for.
.
Introduction to Combinatorics (Wiley). He received his PhD at University of Michigan in 1987. PrenticeHall). Professor Erickson is a member of both the American Mathematical Society and the Mathematical Association of America. He has authored three mathematics textbooks: Introduction to Number Theory (with Anthony Vazzana. Chapman & Hall). and Principles of Mathematical Problem Solving (with Joe Flowers. 207 .About the Author Martin Erickson is Professor of Mathematics at Truman State University.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.