0% found this document useful (0 votes)
21 views77 pages

Titu Andreescu 102 Combinatorics Advanced

The document presents a series of advanced mathematical problems, each requiring unique problem-solving skills and logical reasoning. Topics include tournament scoring, permutations, sequences, combinatorial patterns, and properties of integers. The problems challenge the reader to apply mathematical concepts to derive solutions and proofs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views77 pages

Titu Andreescu 102 Combinatorics Advanced

The document presents a series of advanced mathematical problems, each requiring unique problem-solving skills and logical reasoning. Topics include tournament scoring, permutations, sequences, combinatorial patterns, and properties of integers. The problems challenge the reader to apply mathematical concepts to derive solutions and proofs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

12 Advanced Problems

1. In a tournam ent eaeh player played exactly one game against


eaeh of the other players. In eaeh game the winner was awarded
1 point, the loser got 0 points, and eaeh of the two players earned
1/2 point if the game was a tie. After the eompletion of the
tournam ent, it was found th a t exactly h alf of the points earned
by eaeh player were earned in games against the ten players with
the least number of points. (In partieular, eaeh of the ten lowest
seoring players earned half of her/his points against the other
nine of the ten). W h a t was the total number of players in the
tournam ent?
2. Let n be an odd integer greater than 1. Find the number of
perm utations p of the set { 1 , 2 , . . ., n } for whieh

- 1
|p(l) - 1| + \p{2) - 2| + •••+ |p( n ) n\ =

3. In a sequence of eoin tosses one ean keep a reeord of the


number of instanees when a tail is im m ediately followed by
a head, a head is im mediately followed by a head, ete. We
denote these by T H , H H , ete. For example, in the sequence
H H T T H H H H T H H T T T T of 15 eoin tosses we observe th at
there are five H H , three F fT , two T H , and four T T subse-
quences. How m any different sequences of 15 eoin tosses will
eontain exactly two H H , three H T , four T H and five T T
subsequences?
4. Let A = ( a i , ö 2 , . . ., ct2 0 0 i) be a sequence of positive integers.
Let m be the number of 3-element subsequences (a*, a j , a^) with
1 < i < j < k < 2 0 0 1 , sueh th at a j = а г- + 1 and a^ = a j + 1 .
Çonsidering all sueh sequences A, hnd the greatest value of m.
5. Twenty-three people of positive integral weights deeide to play
football. Th ey seleet one person as referee and then split up into
two 11-person team s of equal to tal weights. It turns out th a t no
m a tter who is referee this ean always be done. Prove th a t all 23
people have equal weights.
6 . Determine the smallest integer n, n > 4, for whieh one ean ehoose
four different numbers a , b , c , d from any n distinet integers sueh
th at a + 6 — e — d i s divisible by 2 0 .
7. A m ail earrier delivers m ail to the nineteen houses on the east
side of E lm Street. T h e earrier notes th a t no two adjaeent houses
Advanced Problems 13

ever get m ail on the same day, but th at there are never more than
two houses in a row th a t get no mail on the same day. How many
different patterns of m ail delivery are possible?
8 . For i = 1, 2, . . ., 11, let М г- be a set of five elements, and assume
th at for every 1 < i < j < 11, Mj П M j ф 0. Let m be the largest
number for whieh there exist M q , . . ., M Jm among the ehosen
sets with n^= 1 M jfe ф 0. Find the m inim um value of m over all
possible initial ehoiees of М г.
9. Define a d o m m o to be an ordered pair of d istinet positive integers.
A p r o p e r se q u e n c e of dominos is a list of distinet dominos in whieh
the first eoordinate of eaeh pair after the first equals the seeond
eoordinate of the im m ediately preeeding pair, and in whieh ( i , j )
and ( j, i) do not both appear for any i and j . Let D 4 0 be the
set of all dominos whose eoordinates are no larger than 40. Find
the length of the longest proper sequence of dominos th a t ean be
formed using the dominos of D 4 0 .
10. Find the number of subsets of {1 , . . ., 2000 }, the sum of whose
elements is divisible by 5.
11. Let X be a finite set of positive integers and A a subset of X .
Prove th a t there exists a subset B of X sueh th at A equals the
set of elements of X whieh divide an odd number of elements of
B.
12. A staek of 2000 eards is labeled with the integers from 1 to 2000,
with different integers on different eards. T h e eards in the staek
are not in numerieal order. T h e top eard is removed from the
staek and plaeed on the table, and the next eard in the staek is
moved to the b o tto m of the staek. T h e new top eard is removed
from the staek and plaeed on the table, to the right of the eard
already there, and the next eard in the staek is moved to the
b o tto m of the staek. T h is proeess— plaeing the top eard to the
right of the eards already on the table and moving the next eard
in the staek to the b o tto m of the staek— is repeated until all eards
are on the table. It is found th a t, reading left to right, the labels
on the eards are now in aseending order: 1 , 2 , 3 , . . . , 1999, 2000.
In the original staek of eards, how m any eards were above the
eard labeled 1999?
13. Form a 2000 x 2002 sereen with unit sereens. Initially, there are
more than 1999 x 2001 unit sereens whieh are on. In any 2 x 2
14 Advanced Problems

sereen, as soon as there are 3 unit sereens whieh are o f f ’ the 4 th


sereen turns off automatieally. Prove th at the whole sereen ean
never be totally off.
14. In an offfee, at various times during the day, the boss gives the
seeretary a letter to type, eaeh tim e putting the letter on top
of the pile in the secretary’s in-box. W hen there is time, the
seeretary takes the top letter off the pile and types it. There
are nine letters to be typed during the day, and the boss delivers
them in the order 1, 2, 3, 4, 5, 6, 7, 8, 9. W hile leaving for luneh,
the seeretary tells a eolleague th a t letter 8 has already been
typed, but says nothing else about the m orning’s typing. The
eolleague wonders whieh of the nine letters remain to be typed
after luneh and in what order they will be typed. Based upon the
above inform ation, how m any sueh afte r-lu n e h typing o r d e r s are
possible? (T h a t there are no letters left to be typed is one of the
possibilities.)
15. Let n be a positive integer. Prove th at

16. Let m and n be positive integers. Suppose th at a given reetangle


ean be tiled by a eom bination of horizontal 1 x m strips and
vertical n x 1 strips. Prove th a t it ean be tiled using only one of
the two types.
17. Given an initial sequence a i, ö 2 , ••• , a n of real numbers, we
perform a series of steps. At eaeh step, we replaee the eurrent
sequence aq, x%, . . . , x n with |aq — a |, \x2 — a|, . . . , \xn — a\ for
some a. For eaeh step, the value of a ean be different.
(a) Prove th a t it is always possible to obtain the null sequence
eonsisting of all 0 ’s.
(b) Determine with proof the m inim um number of steps required,
regardless of initial sequence, to obtain the null sequence.
18. T h e sequence { a n } n> 1 satisfies the eonditions a i = 0, a 2 = 1,

n
2
Advanced Problems 15

n > 3. Determine the explicit form of

a n-1 + 3 a n —2

ai .

19. For a set A, let \A\ and s(A ) denote the number of the elements
in A and the sum of elements in A, respectively. (If A = 0, then
|A| = s(A) = 0.) Let S be a set of positive integers sueh th at
(a) there are two numbers x , y E S with gcd(a?, y) = 1;
(b) for any two numbers x , y E S, x + y E S .
Let T be the set of all positive integers not in S. Prove th at
s ( T ) < \T\2 < oo.
20. In a forest eaeh of 9 animals lives in its own cave, and there
is exactly one separate path between any two of these caves.
Before the eleetion for Forest Gum p, King of the Forest, some of
the animals make an eleetion eampaign. Eaeh eampaign-making
anim al— TÇC (Forest Gum p eandidate)— visits eaeh of the other
caves exactly onee, uses only the paths for moving from cave to
cave, never turns from one path to another between the caves,
and returns to its own cave at the end of the eampaign. It is also
known th at no path between two caves is used by more than one
TÇC. Find the m axim um possible number of T Ç C Js.
21. For a sequence A i , . . ., A n of subsets of {1 , . . ., n ] and a permu-
tation T r o f j S ^ l l j . - . j n j j W e define the diagonal set

D n { A i , A 2 , . . . , A n ) — {г E S |i ÇjL

W h a t is the m axim u m possible number of distinet sets whieh ean


oeeur as diagonal sets for a single ehoiee o f A\, . . . , A n ?
22. A subset M of {1 , 2, 3, . . ., 15 } does not eontain three elements
whose produet is a perfeet square. Determ ine the m axim um
number of elements in M .
23. Find all finite sequences (a?o, x\, . . ., x n ) sueh th a t for every j ,
0 < j < n, x j equals the number of times j appears in the
sequence.
24. Determ ine if it is possible to partition the set of positive integers
into sets A and B sueh th at A does not eontain any 3-element
16 Advanced Problems

arithm etie sequence and B does not eontain any infinite arith-
metie sequence.
25. Çonsider the set T 5 of 5-digit positive integers whose deeimal
representations are perm utations of the digits 1, 2, 3, 4, 5.
Determ ine if it is possible to partition T 5 into sets A and B sueh
th at the sum of the squares of the elements in A is equal to the
eorresponding sum for B .
26. Let n b e a positive integer. Find the number of polynomials P ( x )
with eoeffieients in {0 , 1 , 2 , 3 } sueh th at T ( 2 ) = n.
27. Let n and k be positive integers sueh th a t < k < |u. Find
the least number m for whieh it is possible to plaee eaeh of m
pawns on a square of an n x n ehessboard so th at no eolumn or
row eontains a bloek of k adjaeent unoeeupied squares.
28. In a soeeer tournam ent, eaeh team plays eaeh other team exactly
onee and receives 3 points for a win, 1 point for a draw, and
0 points for a loss. After the tournament, it is observed th at
there is a team whieh has b oth earned the most to tal points and
won the f e w e s t games. Find the smallest number of team s in the
tournament for whieh this is possible.
29. Let cq, . . . , a n be the ürst row of a triangular array with a* E
{0 , 1 }. Fill in the seeond row b 1 , . . . , 6 n - 1 aeeording to the rule
bk = 1 if etk ф a k + 1 ) — 0 if a k — a k + 1 - Fill in the remaining
rows similarly. Determ ine with proof the m axim um possible
number of l ’s in the resulting array.
30. There are 10 eities in the Fatlan d. Two airlines eontrol all of
the lLights between the eities. Eaeh pair of eities is eonneeted by
exactly one ffight (in both direetions). Prove th at one airline ean
provide two traveling eyeles with eaeh eyele passing through an
odd number of eities and with no eommon eities shared by the
two eyeles.
31. Suppose th a t eaeh positive integer not greater than n ( n 2 — 2n +
3)/2, n > 2, is eolored one of two eolors (red or blue). Show th at
there must be a m onoehrom atie n-term sequence a\ < a -2 < * ••<
a n satisfying

a 2 - (ii < a 3 - a 2 < •••< a n - an _ b

32. The set { 1 , 2 , . . . , 3n } is partitioned into three sets A, B , and C


Advanced Problems 17

with eaeh set eontaining n numbers. Determine with proof if it


is always possible to ehoose one number out of eaeh set so th at
one of these numbers is the sum of the other two.
33. Assume th a t eaeh of the 30 M O Ppers has exactly one favorite
ehess variant and exactly one favorite elassieal inequality. Eaeh
M O Pper lists this inform ation on a survey. Among the survey
responses, there are exactly 20 different favorite ehess variants
and exactly 10 different favorite inequalities. Let n be the number
of M O Ppers M sueh th a t the number of M O Ppers who listed M Js
favorite inequality is greater than the number of M O Ppers who
listed M Js favorite ehess variant. Prove th a t n > 11.
34. Startin g from a triple (a, 6, e) of nonnegative integers, a m o v e
eonsists of ehoosing two of them , say x and y , and replaeing one
of them by either x + y or \x — y\. For example, one ean go from
(3, 5, 7) to (3, 5, 4) in one move. Prove th at there exists a eonstant
r > 0 sueh th at whenever a , b , c , n are positive integers with
a, b, e < 2n , there is a sequence of at most r n moves transforming
(a , b, e) into ( a' , b', e') with a'b'c' = 0.
35. A reetangular array of numbers is given. In eaeh row and eaeh
eolumn, the sum of all the numbers is an integer. Prove th a t eaeh
nonintegral number x in the array ean be ehanged into either
\x] or [a?J so th at the row-sums and the eolumn-sums remain
unehanged. (Note th at [ж] is the least integer greater than or
equal to x, while [a?J is the greatest integer less than or equal to
x.
36. A ňnite set of (distinet) positive integers is ealled a D S - s e t if eaeh
of the integers divides the sum of them all. Prove th a t every finite
set of positive integers is a subset of some DS-set.
37. Twelve musieians M\, M^, ••• , M \2 gather at a week-long eham-
ber musie festival. Eaeh day, there is one seheduled eoneert and
some of the musieians play while the others listen as members
of the audienee. For i = 1, 2, . . . , 12, let A be the number of
eoneerts in whieh musieian М г plays, and let t = N + ^ 2 + ' •' + N 2 -
Determine the m inim um value of t sueh th a t it is possible for eaeh
musieian to listen, as a m em ber of the audienee, to all the other
musieians.
38. An m x n array is filled with the numbers { 1 , 2 ,. . . n } , eaeh used
exactly m times. Show th a t one ean always permute the numbers
18 Advanced Problems

within eolumns to arrange th at eaeh row eontains every number


{ 1 , 2 , . . ., n } exactly onee.
39. Let set U = { l , 2 , . . . , n } , where n > 3. A subset S of U is said to
be s p h t by an arrangement of the elements of U if an element not
in S oeeurs in the arrangement somewhere between two elements
of S. For example, 13542 splits {1 , 2 , 3 } but not { 3, 4, 5 }. Prove
th a t for any n — 2 subsets of U , eaeh eontaining at least 2 and at
most n — 1 elements, there is an arrangement of the the elements
of U whieh splits all of them .
40. A pile of n pebbles is plaeed in a vertical eolumn. T h is eonfig-
uration is modified aeeording to the following rules. A pebble
ean be moved if it is at the top of a eolumn whieh eontains at
least two more pebbles than the eolumn im m ediately to its right.
(If there are no pebbles to the right, think of this as a eolumn
with 0 pebbles.) At eaeh stage, ehoose a pebble from among
those th at ean be moved (if there are any) and plaee it at the
top of the eolumn to its right. If no pebbles ean be moved, the
eonhguration is ealled a fin a l eonfiguration. For eaeh n, show
th at, no m atte r what ehoiees are made at eaeh stage, the hnal
eonhguration obtained is unique. Deseribe th at eonhguration in
terms of n.
41. Let B n be the set of all binary strings of length n. Given two
strings (а*)”=1 and (6f)™= 1 , dehne the distanee between the strings
as
П

k- 1

Let C n be a subset of B n . T h e set C n is ealled a p e r f e e t


e r r o r e o r r e e t m g eo de ( Р Е С С ) o f length n a n d t o l e r a n e e m if for
eaeh string (6f) in B n there is a unique string (ef) in C n with
d((bi), (с*-)) < m . Prove th at there is no Р Е С С of length 90 and
toleranee 2.
42. Determine if it is possible to arrange the numbers l , l , 2 , 2 , . . . , n ,
n sueh th a t there are j numbers between two j ’s, 1 < j < n, when
n = 2000, n = 2001, and n = 2002. (For example, for n = 4,
41312432 is sueh an arrangement.)
43. Let k , m , n be integers sueh th at l < n < m — 1 < k. Determine
the m axim um size of a subset S of the set { 1 , 2 , . . ., k } sueh th at
Advanced Problems 19

no n distinet elements of S add up to m.


44. A nondeereasing sequence s o , s i , . . . of nonnegative integers is
said to be su p erad d itiv e if Sj+j > Sj + sj for all nonnegative
integers i , j . Suppose { s n } and {^n} are tw° superadditive
sequences, and let { n n} be the nondeereasing sequence with the
property th a t eaeh integer appears in { u n } as many times as in
{ s n } and { t n } eombined. Show th at { u n } is also superadditive.
45. T h e numbers from 1 to n 2, n > 2, are randomly arranged in the
eells of an n x n unit square grid. For any pair of numbers situated
on the same row or on the same eolumn, the ratio of the greater
number to the smaller one is ealeulated. T h e e h a r a e t e n s t i e of
the arrangement is the smallest of these n 2 {n — 1) fraetions.
Determine the largest possible value of the eharaeteristie.
46. For a set S, let |S\ denote the number of elements in S. Let A be
a set with \A\ = n, and let A\, A^, . . ., A n be subsets of A with
\Aj\ > 2, 1 < i < n. Suppose th at for eaeh 2-element subset A' of
A, there is a unique i sueh th at A' C Aj . Prove th at Aj П A j ф 0
for all 1 < i < j < n.
47. Suppose th at r\, . . . , r n are real numbers. Prove th a t there exists
a set S C { 1 , 2 , . . ., n } sueh th at

1 < \ S n { * , 2 + 1, г + 2 } | < 2

for 1 < i < n — 2, and

i GS i- 1

48. Let n , k , m be positive integers with n > 2k. Let S be a nonempty


set of &-element subsets of { l , . . . , n } with the property th at
every {k + l)-elem en t subset of { l , . . . , n } eontains exactly m

49. A set T is ealled even if it has an even number of elements. Let n


be a positive even integer, and let S\, S^, . . ., S n be even subsets
of the set S = {1,2, ... ,n }. Prove th at there exist i and j ,
1 < i < j < n, sueh th a t Sj П Sj is even.
50. Let A\, A^, .. ., B\, B^, .. . be sets sueh th at A 1 = 0, B\ = { 0 }

A.n_(_1 — { x + 1 |x C B n } , B n+i — A n U B n An П B n,
for all p o sitiv e in teg ers n . D e te r m in e all th e p o sitiv e in tegers n
sueh t h a t B n = { 0 } .

[Iran 1999] S u p p o se t h a t S = { 1 , 2, . . . , n } an d t h a t A\, A ^ , . . .,


A k are su b se ts o f S sueh t h a t for every 1 < < k , we
have

| 4 U 4 U d i 3 U d i 4| < n - 2 .

P ro v e t h a t k < 2 n ~ 2 .
Solutions to Advanced
Problems
Solutions to Advanced Problems 61

1. [AIME 1985] In a tournament eaeh playerplayed exactly one


game against eaeh of the other players. In eaeh game the winner
was awarded 1 point, the loser got 0 points, and eaeh of the
two players earned 1/2 point if the game was a tie. After the
eompletion of the tournament, it was found that exactly half of
the points earned by eaeh player were earned in games against
the ten players with the least number of points. (In partieular,
eaeh of the ten lowest seoring players earned half of her/his points
against the other nine of the ten). What was the total number of
players in the tournament?

Solution: Assume that a total of n players partieipated in


the tournament. We will obtain two expressions in n: one by
eonsidering the total number of points gathered by all of the
players, and one by eonsidering the number of points gathered
by the losers ( 10 lowest seoring eontestants) and those gathered
by the winners (other n — 10 eontestants) separately. To obtain
the desired expressions, we will use that faet that if k players
played against one another, then they played a total of k(k —1 ) / 2
games, resulting in a total of k(k —1 ) / 2 points to be shared among
them. In view of the last observation, the n players gathered a
total of n(n —1)/2 points in the tournament. Similarly, the losers
had 10 •9/2 or 45 points in games among themselves; sinee this
aeeounts for half of their points, they must have had a total of 90
points. In games among themselves the n — 10 winners similarly
gathered (n — 1 0 ) (n — 1 1 ) / 2 points; this also aeeounts for only
half of their total number of points (the other half eoming from
games against the losers), so their total was (n — 1 0 ) (n — 1 1 )
points. Thus we have the equation

n(n - 1)/2 = 90 + (n - 10)(n - 11),

whieh is equivalent to

n 2 — 41 n + 400 = 0.

Sinee the left member of this equation may be faetored as (n —


16) (n — 25), it follows that n — 16 or 25. We diseard the ňrst
of these in view of the following observation: if there were only
16 players in the tournament, then there would have been only 6
winners, and the total of their points would have been 30 points,
62 Solutions to Advanced Problems

resulting in an average of 5 points for eaeh of them. This is less


than the 90/10 or 9 points gathered, on the average, by eaeh of
the losers! Therefore, n = 25; i.e., there were 25 players in the
tournament.
Finally we show that sueh a tournament exists. Sinee n =
25, we have 15 winners and 10 losers. Every game that the
winners play among themselves results in a tie, giving eaeh winner
(15 — 1)/2 = 7 points from games played with other winners.
Likewise, all the games played among the losers result in ties,
giving eaeh of the 10 losers 4.5 points. For the ten games played
by eaeh winner against the losers, six are wins, two are losses,
and two are ties, giving the winners another 7 points from games
played with losers. This gives eaeh loser three wins, nine losses,
and three ties in games against winners, adding up to 4.5 more
points. Thus eaeh of the 25 players receives exactly half of his/her
points in games against the losers, whieh is what we want.
2. [USAMO 1999 submission, Titu Andreeseu] Let n be an odd
integer greater than 1. Find the number of permutations p of
the set { 1 , 2 , . . . , « } for whieh
n - 1
b (l) — 1 14- |p(2 ) - 2 |+ ----- 1- Ip(n) - n\ =

Solution: We have

|p(l) — 1| -F |p(2) - 2| + -----1- |p(n) - n\

= ±1 ± 1 + 2 + 2 ± ---± n± n.

The maximum of |p(l) —1| + |p(2)—2| + •••+ \p(n)—n\ is


Solutions to Advanced Problems 63

and
n + 3' 'n + 5 72+1
P ,P ,p(n) ^ ^ 1, 2 ,

n —1 n+ 1 n+ 3
,77 {*}

and
77—1
•••>P(n ) f = 1

if k > . There are

n —1 72+1 72—1 77 — 1
+ — 77

sueh permutations.
3. [AIME 1986] In a sequence of eoin tosses one ean keep a reeord
of the number of instanees when a tail is immediately followed
by a head, a head is immediately followed by a head, ete. We
denote these by T H , H H , ete. For example, in the sequence
H H T T H H H H T H H T T T T of 15 eoin tosses we observe that
there are hve H H , three H T , two T H , and four T T subse-
quences. How many different sequences of 15 eoin tosses will
eontain exactly two H H , three H T , four T H and five T T
subsequences?

Solution: Think of sueh sequences of eoin tosses as progressions


of bloeks of T ’s and H’s, to be denoted by {T } and { # } , respee-
tively. Next note that eaeh H T and T H subsequence signifies a
transition from { H } to {T } and from {T } to { H } , respectively.
Sinee there should be three of the first kind and four of the seeond
kind in eaeh of the sequences of 15 eoin tosses, one may eonelude
that eaeh sueh sequence is of the form

( 1)

Our next eoneern is the plaeement of T ’ s and H ’s in their


respective bloeks, so as to assure that eaeh sequence will have
two H H and five TT subsequences. To this end, we will assume
that eaeh bloek in (1) initially eontains only one member. Then,
64 Solutions to Advanced Problems

to satisfy the eonditions of the problem, it will suffiee to plaee 2


more H’s into the { Н } ’э and 5 more T ’s into the { T } ’s. Thus, to
solve the problem, we must eount the number of ways this ean
be aeeomplished.
Reeall that the number of ways to put p indistinguishable
balls (the extra H’s and T ’s in our ease) into q distinguishable
boxes (the { H } ’s and { T } ’s, distinguished by their order in the
sequence) is given by the formula (p+^-1). (Students who are not
familiar with this faet should verify it.) In our ease, it implies
that the 2 H’s ean be plaeed in the 4 {-ff}’s in (2+(]-1) or 10 ways,
and the 5 T ’s ean be plaeed in the 4 { T } ’s in ( 5+g-1) or 56 ways.
The desired answer is the produet, 560, of these numbers.
4. [IMO Shortlist 2001] Let A = (öi, 0 2 , . . ., 02001) be a sequence of
positive integers. Let m be the number of 3-element subsequences
(üi, eij, a*;) with 1 < i < j < k < 2 0 0 1 , sueh that aj = a, + 1 and
ak — aj + 1. Çonsidering all sueh sequences A, find the greatest
value of m.

Solution: Çonsider the following two operations on the se-


quence A:
( 1 ) и cq > Gp+i, transpose these terms to obtain the new
sequence
(ai, 0 2 , . . . , ai+i, а^, . . . , 02001)-
(2) If = Oj + 1 + d, where d > 0 , inerease ai, . . . , a* by d to
obtain the new sequence
(ai+d, a2 +d, . . . , ai+d, ai+1, . . . , a 2ooi)-
It is elear that performing operation (1) eannot reduee m. By
applying ( 1 ) repeatedly, the sequence ean be rearranged to be
nondeereasing. Thus we may assume that our sequence for
whieh m is maximal is nondeereasing. Next, note that if A is
nondeereasing, then performing operation (2 ) eannot reduee the
value of m. It follows that any A with maximum m is of the form

( a, . . . , a, a+l, . . . , a+l, . . . , a + s - 1 , . . . , a + s - 1 )
4, 4,

where t\, . . . , t s are the number of terms in eaeh subsequence,


Solutions to Advanced Problems 65

and s > 3. For sueh a sequence A,

m- + t 2 t 3 t 4 H------- b t s— s—A s ■ (*)


It remains to find the best ehoiee of s and the best partition of
2001 into positive integers t 1 , . . . , t s .
The maximum value of m oeeurs when s = 3 or s — 4. If s > 4
then we may inerease the value given by (*) by using a partition
of 2 001 into s — 1 parts, namely

f 21 ts, (П + M), •••, t s.


Note that when s = 4 this modifieation does not ehange the value
given by (*). Henee the maximum value m ean be obtained with
s — 3. In this ease, m = t^t^t^ is largest when t\ = t 2 —^з —
2001/3 = 667.Thus the maximum value of m is 6673. This
maximum value is attained when s = 4 as well, in this ease for
sequences with 1 1 = a , t 2 = t% = 667, and t^ = 667 — a, where
1 < a < 666.
5. [USAMO 1989 submission, Paul Zeitz] Twenty-three people of
positive integral weights deeide to play football. They seleet one
person as referee and then split up into two 11 -person teams of
equal total weights. It turns out that no matter who is referee
this ean always be done. Prove that all 23 people have equal
weights.

Solution: Assume on the eontrary that there is a set of 23 not


all equal integer weights satisfying the eonditions of the problem.
Then among sueh sets there is a set A = (a\, a2, ■■•, a23) with
the smallest total weight w = a\ + 02 + •••+ ° 23 - If ai is the
referee, then w — аг= 2 si, where is the total weight ofeaeh
team. Непсе аг = w (mod 2 ), that is, аг’s have the same parity.
If the a*’s are all even, we ean replaee A by
al a2 a 23

a set of less total weight that satisfies the eonditions of the


problem. And sinee the аг’э are not all equal, the аг/ 2’s are
not all equal. This eontradiets the faet that A is sueh a set with
minimum total weight.
If the aj-’s are all odd, we ean use A " = ((ai + 1 ) / 2 ,(а 2 +
1 )/ 2 , . . ., (а 2з + 1 )/ 2 ) to lead to a similar eontradietion.
66 Solutions to Advanced Problems

Henee our assumption was wrong and all 23 people must have
equal weights.
6. [IMO Shortlist 1998] Determine the smallest integer n, n > 4, for
whieh one ean ehoose four different numbers a ,b ,c ,d from any n
distinet integers sueh that a + b —e — d is divisible by 2 0 .

Solution: We first eonsider only sets of integers with distinet


residues modulo 20. For sueh a set of k elements, there are a total
of k(k — 1)/2 pairs. Therefore, if k(k — 1)/2 > 20 (i.e., k > 7),
then there exist two pairs of numbers (a, b) and (e, d) sueh that
a + b = e + d (mod 2 0 ) and a ,b ,c,d are all distinet.
In general, let us eonsider a set of 9 distinet integers. If there
are seven of them that have distinet residues modulo 2 0 , we are
done by the above argument. Suppose that there are at most 6
distinet residues modulo 20 in this set, i.e., at least 3 residues have
to be repeated. Then either there are 4 numbers (a, b, e, d)with
a = b = e = d (mod 2 0 ) or there are 2 pairs of numbers (a, e)
and (b, d) with a = e and b = d (mod 20). In either ease, we ean
find a desired quadruple (a, b, e, d).
It is not diffieult to find a set of 8 numbers whieh does not have
the property we want:

{ 0, 20. 40, 1, 2, 4, 7, 12 },

Residues of these numbers modulo 20 are 0, 0, 0, 1, 2, 4, 7,


12, respectively. These residues have the property that eaeh
nonzero residue is greater than the sum of any two smaller ones,
and the sum of any two is less than 20. Let a ,b ,c,d be the
respective residues of 4 distinet numbers of this set. Without
loss of generality, we may assume that a is the largest (as a is
interehangeable with b and ean interehange with either e or d by
multiplieation by —1 , whieh does not effeet its divisibility by 2 0 ).
Thus a is a nonzero residue and

0 < a —e —d < a + b —e —d < a + b< 2 0 .

Henee a + b —e — d is not divisible by 20.


Therefore the desired minimum value of n is 9.
7. [AIME 2001] A mail earrier delivers mail to the nineteen houses
on the east side of Elm Street. The earrier notes that no two
Solutions to Advanced Problems 67

adjaeent houses ever get mail on the same day, but that there are
never more than two houses in a row that get no mail on the same
day. How many different patterns of mail delivery are possible?

F ir s t Solution: The ňrst eondition implies that at most ten


houses get mail in one day, while the seeond eondition implies that
at least six houses get mail. If six houses get mail, they must be
separated from eaeh other by a total of at least five houses that
do not get mail. The other eight houses that do not get mail
must be distributed in the seven spaees on the sides of the six
houses that do get mail. This ean be done in 7 ways: put two
at eaeh end of the street and distribute the other four in (^) = 5
ways, or put one in eaeh of the seven spaees and an extra one at
one end of the street or the other. If seven houses get mail, they
ereate eight spaees, six of whieh must eontain at least one house
that does not get mail. The remaining six houses that do not get
mail ean be distributed among these eight spaees in 113 ways:
six of the eight spaees ean be seleeted to receive a single house in
(g) = 28 ways; two houses ean be plaeed at eaeh end of the street
and two intermediate spaees be seleeted in (®) = 15 ways; and
two houses ean be plaeed at one end of the street and four spaees
seleeted for a single house in 2(J) = 70 ways. Similar reasoning
shows that there are Q + 1 + 2 ( 2) = 183 patterns when eight
houses get mail, and 2 + (^0) = 47 patterns when nine houses get
mail. When ten houses get mail, there is only one pattern, and
thus the total number of patterns is 7 + 113 + 183 + 4 7 + 1 = 351.

Seeond Solution: Çonsider n-digit strings of zeros and ones,


whieh represent no mail and mail, respectively. Sueh a sequence is
ealled aeeeptable if it eontains no oeeurrenees of 11 or 000. Let f n
be the number of aeeeptable n-digit strings, let an be the number
of aeeeptable n-digit strings in whieh 00 follows the leftmost 1 ,
and let bn be the number of aeeeptable n-digit strings in whieh
01 follows the leftmost 1. Notiee that f n = an + bn for n > 5.
Deleting the leftmost oeeurrenee of 100 shows that an = / n_ 3 ,
and deleting 10 from the leftmost oeeurrenee of 101 shows that
bn = fn —2 • It follows that f n = f n_ 2 + f n- 3 for n > 5. It is
straightforward to verify the values / 1 = 2, / 2 = 3, / 3 = 4, and
/ 4 = 7. Then the reeursion ean be used to find that / 19 = 351.
68 Solutions to Advanced Problems

8. [Çhina 1996] For i = 1, 2, . . ., 11, let M* be a set of five elements,


and assume that for every 1 < i < j < 11, Мг- П Mj ф 0. Let m
be the largest number for whieh there exist Мг1, . . ., MJm among
the ehosen sets with Г\™=1 М { к ф 0. Find the minimum value of
m over all possible initial ehoiees of Мг-.

Solution: The minimum value of m is 4.


We first show that m > 4. Let X — Uj=1 M i, and for eaeh
x E X , let n(x) denote the number of i ’s sueh that x E Mj,
1 < i < 11. Then m = max { n ( x ) , Note that

n(x) = 55.
x£X
Sinee Мг П Mj ф 0, there are (^1) = 55 nonempty interseetions.
On the other hand, eaeh element x appears in (n interseetions.
Therefore,

It follows that
n ( x ) ( n ( x ) - 1 ) ^ 55
x£X ^
implying that
m —1 ^\
— — 2^ > 55.
x£X
Flenee ^1" 1 > 1, or m > 3. Ifm = 3, then all equalities hold; more
preeisely, n(x) = m = 3 for all an But sinee n(x ) — 55 and
55 is not divisible by 3, n(x) eannot always equal 3. Therefore
m > 4.
Now we prove that m = 4 ean be obtained. We eonsider the
following 4 x 4 array:
a b e d
e / g h
1 2 3 4
5 6 7 8

It is not diffieult to see that the sets Mi = {a , b, e, d, 77},


M 2 = {e, f , g, h, H }, M3 = { 1 , 2 , 3 , 4 , Я } , M4 = { 5 , 6 , 7 , 8 , Я }
Solutions to Advanced Problems 69

(we eall them horizontal sets); M5 = {a, e, 1 ,5, V }, Mq =


{ b ,f , 2, 6, У} , M 7 = {e, g , 3 , 7 , V } , M8 = {d, Л, 4, 8 , E ) (we eall
them vertical sets); M9 = {a, f, 3, 8 , D }, Мю = { 6 , </, 4, 5, D },
Mn = {e, h , l , Q , D } (we eall them diagonal sets); satisfy the
eonditions of the problem with m = 4.
[AIME 1998] Dehne a domino to be an ordered pair of distmet
positive integers. A proper sequence of dominos is a list of distinet
dominos in whieh the ürst eoordinate of eaeh pair after the hrst
equals the seeond eoordinate of the immediately preeeding pair,
and in whieh ( i ,j ) and (j,i) do not both appear for any i and
j . Let D40 be the set of all dominos whose eoordinates are no
larger than 40. Find the length of the longest proper sequence of
dominos that ean be formed using the dominos of D 4 0 .

First Solution: Let A n = { 1, 2, 3, . . . ,n } and Dn be the set


of dominos that ean be formed using integers in A n. Eaeh k in
A n appears in 2(n —1) dominos in Dn; henee it appears at most
n — 1 times in a proper sequence from Dn. Except possibly for
the integers i and j that begin and end a proper sequence, every
integer appears an even number of times in the sequence. Thus,
if n is even, every integer other than i and j appears in at most
n —2 dominos. This gives an upper bound of
1 r/ ,9 , , n n 2 —2 n + 2
- [ ( n - 2 ) + 2 ( n - l ) ] = ---------------

dominos in the longest proper sequence in Dn. This bound is in


faet attained for every even n. It is easy to verify this for n — 2, so
assume inductively that a sequence of this length has been found
for a partieular value of n. Without loss of generality, assume
i = 1 and j = 2 , and let pX p + 2 denote a four-domino sequence
of the form (p, n + l)(n + 1,p + l)(p + 1, n + 2)(n + 2,p + 2). By
appending

2A 4 , 4 X 6 , ... , n-^A-n , (n,n + l)(n + 1 , 1 )( 1 , n + 2 )(n + 2 , 2 )

to the given proper sequence, a proper sequence of length


n 2 —2 n + 2 л n —2 л n 2 + ‘žn + 2
---------------- + 4 + 4 =----------------
2 2 2
_ (n + 2) 2 - 2 (n + 2 ) + 2
70 Solutions to Advanced Problems

is obtained that starts at %— 1 and ends at j = 2. This eompletes


the inductive proof. In partieular, the longest proper sequence
when n — 40 is 761.

Seeond Solution: A proper sequence ean be represented by


writing the eommon eoordinates of adjaeent ordered pairs onee.
For example, represent (4, 7), (7, 3), (3, 5) as 4, 7, 3, 5. Label the
vertices of a regular n-gon 1, 2, 3, . . . ,n. Eaeh domino is thereby
represented by a direeted segment from one vertex of the n-gon
to another, and a proper sequence is represented as a path that
retraees no segment. Eaeh time sueh a path reaehes a non-
terminal vertex, it must leave it. Thus, when n is even, it is
not possible for sueh a path to traee every segment, for an odd
number of segments emanate from eaeh vertex. By removing
\(n — 2 ) suitable segments, however, it ean be arranged that
n —2 segments will emanate from n —2 of the vertices, and that
an odd number of segments will emanate from exactly two of
the vertices. In this situation, a path ean be found that traees
every remaining segment exactly onee, starting at one of the two
exceptional vertices and hnishing at the other. This path will
have length (™) — \ ( n ~ 2), whieh is 761 when n — 40.

N ote: When n is odd, a proper sequence of length (”) ean


be found using the dominos of D n. In this ease, the seeond
eoordinate of the hnal domino equals the hrst eoordinate of the
hrst domino. In the language of graph theory, this is an example
of an Eulerian eireuit.
10. [High-Sehool Mathematies, 1994/1, Qihong Xie] Find the number
of subsets of { 1 , . . ., 2 0 0 0 }, the sum of whose elements is divisible
by 5.

Solution: The answer is |(2 2000 + 2402).


Çonsider the polynomial

f ( x ) — (1 + ж) ( 1 + X2) ■■•(1 + ж2000).

Then there is a bijeetion between eaeh subset {a\, a^, ■■■,am }


of {1, 2, . . ., 2000 } and the term x aix a 2 ■■■x a™. Henee we are
looking for the sum of eoefheients of terms x 5k in f ( x ) , k a positive
integer. Let S denote that sum.
Solutions to Advanced Problems 71

Let / — e27r®/5 be a 5th root of unity. Then / 5 = 1 and


1 + ( + C2 + = 0- Henee

■ S ^ £/(?)■
j' = i

Note that ^2, ^4, ^5 = 1 are the roots of g(x) = ж5 —1, that
is

0 (ж) = X5 - 1 = (ж - £)(ж - ^2)(ж - £3)(ж - ( 4)(х - / 5).

It follows that

9 ( ~ 1) = - 2 = ( - 1 - 0 ( - 1 - - Л ( - 1 - С4 ) ( - 1 - е 5 )-

Therefore

( i + 0 ( i + e 2) ( i + e 3 ) ( i + e 4 ) ( i + e 5) = 2

and /(£) = 2400. Likewise, / ( / J ) = 2400 for j = 2,3,4. Finally,


we ealeulate /(^5) = /(1) = 22000. We obtain

5- = I (4 . 2400 + 2 2000) = - (2402 + 2 2000) .


5 5
11. [MOSP 1999] Let X be a hnite set of positive integers and A a
subset of X . Prove that there exists a subset B of X sueh that
A equals the set of elements of X whieh divide an odd number of
elements of B.

Solution: We eonstruet B in stages. Set B = 0 and eonsider


every number in X , starting with the largest and going down.
For eaeh element x E X , see whether it divides the eorreet parity
of elements in B. (That is, if x 6 A, x divides an odd number of
elements in B , if х X —A, x divides an even number of elements
in B.) If it does not, add it to B. Thus the hrst element added
to B is the largest element of A. Now, this proeedure will not
ehange the divisibility eondition for any element greater than x,
and will fulhll the eondition for x. Thus when all elements of X
have been examined, the divisibility eonditions will be satished
by all elements of X , and B will be as desired.
12. [AIME 2000] A staek of 2000 eards is labeled with the integers
from 1 to 2000, with different integers on different eards. The
eards in the staek are not in numerieal order. The top eard is
72 Solutions to Advanced Problems

removed from the staek and plaeed on the table, and the next
eard in the staek is moved to the bottom of the staek. The new
top eard is removed from the staek and plaeed on the table, to
the right of the eard already there, and the next eard in the
staek is moved to the bottom of the staek. This proeess— plaeing
the top eard to the right of the eards already on the table and
moving the next eard in the staek to the bottom of the staek— is
repeated until all eards are on the table. It is found that, reading
left to right, the labels on the eards are now in aseending order:
1, 2, 3, . . . , 1999, 2000. In the original staek of eards, how many
eards were above the eard labeled 1999?

F irs t Solution: Run the proeess baekwards. Start by pieking


up the eard labeled 2000. Next, piek up the eard labeled 1999,
plaee it on top of the staek, and bring the bottom eard to the top
of the staek. Next piek up the eard labeled 1998, plaee it on top
of the staek, and bring the bottom eard to the top of the staek.
The eard labeled 1999 is now at the top of a three-eard staek.
Note that the top eard of an m-eard staek will beeome the top
eard of a 2 m-card staek after m more eards have been pieked up
(and m eards have been moved from the bottom of the staek to
the top). It follows by induetion that the eard labeled 1999 is the
top eard when the number of eards in the staek is 3 •2k for any
nonnegative integer k that satisfies 3 •2k < 2000. In partieular,
the last time that this happens is just after 3-2 9 = 1536 eards have
been pieked up. The eards remaining on the table are labeled 1
through 464. After eaeh of the eards labeled 464, 463, . . . , 2 is
pieked up and plaeed on top of the staek, another eard is brought
from the bottom of the staek to the top. Finally, the eard labeled
1 is plaeed on top of the staek and the staek is in its original state.
This puts 2 •4 6 3 + 1 = 927 eards on top of the eard labeled 1999.

Seeond Solution: Beeause the proeess eauses the eards on


the table to appear in aseending order, the eard labeled 1999 is
next-to-last plaeed on the table. To keep traek of that eard, first
notiee that, when a staek of 2 m eards is dealt in this way, the
next-to-last eard plaeed on the table begins at position 2 m_1 in
the staek; then apply the proeess to a staek of 2 11 = 2048 eards.
After 48 of the eards have been plaeed on the table and 48 more
Solutions to Advanced Problems 73

eards have been moved from the top of the staek to the bottom, a
2000-eard staek remains. Remove the eards that are on the table.
The next-to-last eard that will be plaeed on the table from the
2000-eard staek is the eard that began at position 1024 in the
2048-eard staek. The position of that eard in the 2000-eard staek
is 1024 — (48 + 48) = 928, so the number of eards above it is 927.
13. Form a 2000 x 2002 sereen with unit sereens. Initially, there are
more than 1999 x 2001 unit sereens whieh are on. In any 2 x 2
sereen, as soon as there are 3 unit sereens whieh are off, the 4th
sereen turns off automatieally. Prove that the whole sereen ean
never be totally off.

Solution: For a sereen to turn off, it has to be the 4th sereen of


a 2 X 2 sereen with the other 3 sereens off. Conversely, eaeh 2 x 2
subsereen ean be used only onee to turn off a sereen. Sinee there
are 1999 x 2001 2 x 2 subsereens, at most 1999 x 2001 sereens ean
be turned off. Henee the whole sereen ean never be totally off.
14. [AIME 1988] In an offiee, at various times during the day, the
boss gives the seeretary a letter to type, eaeh time putting the
letter on top of the pile in the secretary’s in-box. When there is
time, the seeretary takes the top letter off the pile and types it.
There are nine letters to be typed during the day, and the boss
delivers them in the order 1,2, 3,4, 5, 6 , 7, 8 , 9. While leaving for
luneh, the seeretary tells a eolleague that letter 8 has already
been typed, but says nothing else about the morning’s typing.
The eolleague wonders whieh of the nine letters remain to be
typed after luneh and in what order they will be typed. Based
upon the above information, how many sueh after-luneh typmg
orders are possible? (That there are no letters left to be typed is
one of the possibilities.)

Solution: At any given time, the letters in the box are in


deereasing order from top to bottom. Thus the sequence of letters
in the box is uniquely determined by the set of letters in the box.
We have two eases: letter 9 arrived before luneh or it did not.
• Çase 1: Sinee letter 9 arrived before luneh, no further letters
will arrive, and the number of possible orders is simply the
number of subsets o f T = 1 , 2 , . . . , 6 , 7 , 9 whieh might still
74 Solutions to Advanced Problems

be in the box. In faet, eaeh subset of T is possible, beeause


the seeretary might have typed letters not in the subset as
soon as they arrived and not typed any others. Sinee T has 8
elements, it has 28 = 256 subsets (ineluding the empty set).
• Çase 2: Sinee letter 9 didn’t arrive before luneh, the ques-
tion is: where ean it be inserted in the typing order? Any
position is possible for eaeh subset of U = { 1 , 2 , . . . , 6, 7}
whieh might have been left in the box during luneh (in
deseending order). For instanee, if the letters in the box
during luneh are 6, 3, 2 then the typing order 6 , 3, 9, 2 would
oeeur if the boss would deliver letter 9 just after letter 3 was
typed. There would seem to be k + 1 plaees at whieh letter
9 eould be inserted into a sequence of k letters. However, if
letter 9 is inserted at the beginning of the sequence (i.e. at
the top of the pile, so it arrives before any after-luneh typing
is done), then we are duplieating an ordering from Çase 1 .
Thus, if k letters are in the basket after returning from luneh,
there are k plaees to insert letter 9 (without duplieating Çase
1 orderings). Thus we obtain

new orderings in Çase 2 .


Çombining these eases gives 256 + 448 = 704 possible typing
orders.
15. [Çhina 1994, Wushang Shu] Let n be a positive integer. Prove
that

2n + 1
n

F irst Solution: (By Çhenehang Zhu) For a polynomial p(x),


let [xn](p(x)) be the eoeffieient of the term x n in p(x). Çonsider
the polynomial p(x) = (x + l ) 2n. It is easy to see that
76 Solutions to Advanced Problems

as desired.

Seeond Solution: (By Jian Gu) We eonsider a eombinatorial


model. There are 2n students, n boys and n girls, in a elass with
their teaeher T . Let g i , д%, ■■■,gn denote all the girls, and let
b i , 62 , •••, bn denote all the boys. For 1 < i < n, students ($г-, bf)
are paired. The elass has n tiekets to an exciting soeeer game.
We eonsider the number of ways to find n people to go to the
game. The obvious answer is

( 2 ” „+ 1 >

On the other hand, we also ean ealeulate this number in the


following way. For any fixed integer k, 1 < k < n, we find k pairs
from the n pairs of students and give eaeh pair f tieket. There
are (JJ)2 * ways to find k pairs and piek one student from eaeh
pair to go the game. We have n — k tiekets left and n — k pairs
of student left. We piek |_yyj pairs and give eaeh of those pairs
2 tiekets. There are
f n —k \
W F

ways to do so. Now we have already assigned S = k + 2 |_yyj


tiekets. If n — k is odd, S — n — 1 and we assign the last tieket
to the teaeher T; if n —k is even, S = n and we have assigned all
the tiekets already. It is not diffieult to see that as k takes all the
values from 1 to n, we obtain all possible ways of assigning the n
tiekets. Therefore, there are

t T H u r f i i )

ways to find n people to go the game. Henee

V^2 n ~k \ _ f'2n + Л
t , \ k J \ [ ( n - k ) l 2 \J \ n ) ’

as desired.
16. [Bay Area Math Çirele 1999] Let m and n be positive integers.
Suppose that a given reetangle ean be tiled by a eombination of
horizontal 1 x m strips and vertical n x 1 strips. Prove that it
ean be tiled using only one of the two types.
Solutions to Advanced Problems 77

Solution: Assume that the dimensions of the reetangle are


a X b. It is elear that both a and b are positive integers. We want
to show that either a is divisible by m or b is divisible by n. Let
C = eis 2 n/m and £ — eis ‘ž tt/u be the mth and nth roots of unity,
respectively. Divide the reetangle into ab unit squares, and write
the number (/Х£У in the square in the x th eolumn and yth row.
For eaeh vertical strip, the sum of the numbers written in it is

e - i
c e ( i + ^ + ç 2 + - - - + r _1) = c e = 0 .
€ - 1
Likewise the sum of the numbers in any horizontal strip is also
0. Sinee the reetangle is tiled by these strips, the sum of all the
numbers in the reetangle is 0. But this sum is equal to

C“ - 1 У - 1
(C + C' + '-- + C“)K + r + - - + П =
C -i e- i
Therefore we must have (/a = 1 or £b = 1, implying m |a or n \ b,
respectively.
17. Given an initial sequence ai, « 2 , •••, «n of real numbers, we
perform a series of steps. At eaeh step, we replaee the eurrent
sequence x\, xş, •••, x n with \x\ — a\, \x^ — a\, . . . , \xn — a\ for
some a. For eaeh step, the value of a ean be dilferent.
(a) Prove that it is always possible to obtain the null sequence
eonsisting of all 0 ’s.
(b) Determine with proof the minimumnumber of steps required,
regardless of initial sequence, to obtain the null sequence.

Solution: First we show that n steps are enough to obtain the


null sequence. Let (<,(fc) J k) ,+) ) denote the sequence after
the &th step, and let be the value of the number a ehosen to
be subtraeted in the kth step. We set a^1) = ai+a2, Henee

,(i) _ „(i) _ \ai — a2 .

We then take a(+ = to obtain

,(!) (i)
,(2 ) _ J 2) , ( 2) lai —аз
«1 = «2 = °3 =
78 Solutions to Advanced Problems

and so on. At the kth step, we take a(fe) = —----- »afc+1— to obtain

(fe-i) (fe-i
(.k) (fe) (fc) 4 - öfe+i
a\ ' = a\ — = afc+i =

In this way, we obtain a sequence a(n aj,” . . ., ai” Х) with


a(n Х) = aj,” Х) = •••= ai” ^ after n —1 steps. At the nth step
we take a(n) = a(n x) to obtain the null sequence.
Now we prove that n steps are neeessary for the initial sequence
1, 2!, 3!, . . . , n! by induetion on n. The base ease n = I is trivial.
Assume that our statement is true for some positive inte-
ger k, that is, we need at least k steps to turn the sequence
1,2!,3!, ...,&! into the null sequence. We show that we need at
least k + 1 steps to turn the sequence 1 , 2 !, ...,(/? + 1 )! into the
null sequence.
The key observation is that if m is the minimum number of
steps required to turn the sequence ai , a 2 , . . . , a„ into the null
sequence, then

m (fe-i) < a(k) < M(fe-i)

for 1 < k < m, where

m ^ -1) = т Ь { а ^ - 1}, a ^ , . . . , a ^ 1) }

and

M (fe x) = m ax{af ai^ }•

Indeed, if a(fe) < m(fe_1), then for all i,

a\k+1) = |a(fe) - a(fe+1)|


= ||a (fe- i ) _ a (0 | _ a 0 +i)|

= |a(fe_1) - a(fe) - a(fe+1)|


= l a j * - 1) _ (a (*) + a (*+1))|.

We ean set the value of a at the kth step to a(fe) + a (fe+1) to save a
step, whieh eontradiets the faet that m is the minimum number
of steps needed. On the other hand, if a(fe) > M(fe х), then for
Solutions to Advanced Problems 79

all i,

We ean set the value of a at the kth step to to save a


step, whieh eontradiets the faet that m is the minimum number
of steps needed.
It follows from the above argument that > •••>
M^m\ and henee < M ^ for all k. Note also that sinee
is always nonnegative, a ^ > 0 for all k.
We are now ready to prove our inductive step. We approaeh
indireetly by assuming that it is possible to turn the sequence
1, 2!, . . . , ( / ? + 1)! into the null sequence in k steps. Then the sub-
sequence 1 , 2 !, . . . , /?! has also been turned into the null sequence.
By the induetion hypothesis, k is the minimum number of steps
needed to turn the sequence 1 , 2 !, . . . , /?! into the null sequence.
By our observation above, we eonelude that 0 < a^ < k\ for
1 < i < k. But then

+ 1 = l l " - P + l ) ! - a (1)| - a + -------


••— a

= (* + 1)! - (o*11 + o<2> + ■■• + o « )


> (Z? + 1 )! — /?•/?!> 0 ,

• • (k) • •
whieh eontradiets the faet that — 0 as it is part of the null
sequence. Therefore our assumption was wrong and we need at
least k + 1 steps to turn the sequence 1 , 2 ! , . . . , (/ ? + 1 )! into the
null sequence. Our induetion is thus eomplete.
18. [Çhina 2000, Yuming Huang] The sequence {a „ }„ > i satisfies the
eonditions ai — 0 , 02 — 1 ,
80 Solutions to Advanced Problems

n > 3. Determine the explicit form of

an —2

F irs t Solution: It is straightforward to show by induetion that

an = nan_i + ( - 1 )",

whieh implies that

an — n

or

Therefore, by Bernoulli-Eulebs famous formula of misaddressed


letters, an is the number of derangements of ( 1 , 2 , . . . , n ) , i.e., the
number of permutations of this n-tuple with no fixed points.
Then f n ean be interpreted as follows: For eaeh non-identity
permutation of ( 1 , 2 , ,n ) , gain one mark; then gain one mark
for eaeh fixed point of the permutation. Then / n is the total mark
seored by all the non-identity permutations.
On the other hand, the total mark ean also be ealeulated as a
sum of the marks of eaeh element gained in all the nonOidentity
permutations. There are n! — 1 non-identity permutations and
eaeh number is ňxed in {n —1 )! —1 non-identity permutations for
a total of

f n = n\ — 1 + n((n — 1 )! — 1 ) = 2 •n\ — n — 1

marks.

Seeond Solution: We present another method proving that


an is the number of derangements of (1, 2, . .., n). We have

an = na n - 1 + (—l ) n = an_i + (n — l ) an_i + ( —\ ) n

[(n - l ) a „ _ 2 + ( - l ) " " 1] + (n - l)a„_! + (-1)"

(n - l ) ( a „ _ i + a „ _ 2).
Solutions to Advanced Problems 81

Now let bn be the number of derangements of (1, 2, . . ., n). In a


derangement, either
(a) 1 maps to k and k maps to 1 for some k ф 1. Then there are
(n — 1 ) possible values for k and for eaeh k there are 6n_ 2
derangements of the other n — 2 elements. Henee there are
(n — l ) 6n_2 sueh derangements.
(b) 1 maps to k and k maps to m for some k ,m ф 1. Note that
k ф m. Then this is simply a derangement of (2, ,k —
1,1, A?+ 1, . . . n) with 1 mapping to m. Again there are n — 1
possible values for k and for eaeh k there are 6n_i derange-
ments. Henee there are (n — l ) 6n_i sueh derangements.
Therefore bn — (n — l) ( 6n_i + 6n_ 2 ). Sinee a\ — b\ — 0 and
a 2 = 62 = 1 , <+ = bn, as elaimed.
19. [USAMO 2000 submission, Riehard Stong] For a set A, let \A\
and s(A) denote the number of the elements in A and the sum of
elements in A, respectively. (If A = 0, then |A| = s(T) = 0.) Let
S be a set of positive integers sueh that
(a) there are two numbers x , y £ S with gcd(;c, y) — 1;
(b) for any two numbers x , y £ S, x + y £ S .
Let T be the set of all positive integers not in S. Prove that
s(T) < \T \2 < 0 0 .

Solution: First we show that for all n > xy, n £ S. It


suffiees to show that there exist nonnegative integers a,b sueh
that ax + by = n. Sinee x and y are relatively prime, there
exists b, 0 < b < x, satisfying by = n (mod x). Now we ean take
a = — — , whieh is positive by the assumption n > xy. Thus,
\T\ <
Sort the elements of T in inereasing order so t\ < t 2 < •••<
t\T\- Sinee ti ^ S, at least one of m and +■ — m is not in S for
eaeh 1 < m < [+/2]. Sinee there are only i — 1 positive integers
less than +■ and not in S, we have

or t{ < 2i — 1. Summing over i ’s gives

t l + t 2 + ' ' ' + t\T\ < |^1 2 1


82 Solutions to Advanced Problems

as desired.
20. In a forest eaeh of 9 animals lives in its own cave, and there
is exactly one separate path between any two of these caves.
Before the eleetion for Forest Gump, King of the Forest, some of
the animals make an eleetion eampaign. Eaeh eampaign-making
animal— TQC (Forest Gump eandidate)— visits eaeh of the other
caves exactly onee, uses only the paths for moving from cave to
cave, never turns from one path to another between the caves,
and returns to its own cave at the end of the eampaign. It is also
known that no path between two caves is used by more than one
TQC. Find the maximum possible number of T Q C s.

Solution: We translate this problem into the language of graph


theory. Let eaeh cave represent a vertex, and eaeh path between
a pair of caves represent the edge eonneeting the two vertices. We
obtain a eomplete graph Kg. We are looking for the maximum
number of Hamiltonian eyeles without eommon edges in this
eomplete graph Kg. (It is not hard to see that the number of
Hamiltonian eyeles is less than the number of vertices. Henee we
ean always piek a distinet TQC for eaeh Hamiltonian eyele.)
The general result is that there are [(n — 1)/2J disjoint Hamil-
tonian eyeles in a eomplete graph K n . Sinee there are n(n —1)/ 2
edges in K n and eaeh Hamiltonian eyele has n edges, there are
at most [(u — 1)/ 2 J Hamiltonian eyeles in K n . We eonsider the
following eases.
• Çase 1: n is odd. We assume that n = 2k + 1 for some
positive integer k (as n — 1 is meaningless). We evenly
arrange vertices P i , . . ., P-zk around a eirele in eloekwise
order and plaee vertex Pq at the eenter of the eirele. The first
Hamiltonian eyele is

(Pa, P i, P 2, P 2 k , Р з , Р зк -1, P$, Р 2 к - 2 , Р ъ , •• •,

Р к - 1 , Р к + 3 , Рк, Рк + 2, Рк + 1, P q)-

We ean then rotate this eyele eloekwise by angles of тг/к,


‘ž ir/k, . . ., (k — 1 )tt/k to obtain k — 1 more eyeles for a total
of k — [(n — 1 ) / 2 J eyeles.
• Ca.se 2 : n is even. We assume that n = 2k + 2 for some
positive integer k. We evenly arrange vertices P\, P 2, . . ., P 2 ^
Solutions to Advanced Problems 83

around a eirele in eloekwise order and plaee vertex Pq at the


eenter of the eirele. We then plaee vertex P 2 k+i somewhere
inside the eirele. For eaeh Hamiltonian eyele in ease 1, we
put P 2 k +i right in the middle of that path to obtain the
k = |_(n — 1 ) / 2 J eyeles.
For our problem, n = 9. Henee there are |_(n — 1)/ 2 J = 4
Hamiltonian eyeles and thus a maximum of 4 P Q C ’s.
21. [USA 1998, Franz Rothe] For a sequence A \, . . . , A n of subsets of
{ 1 , . . ., n ) and a permutation 7t of S = {1, . . ., n), we dehne the
diagonal set

D-niAi, A 2 , . . . , A n) = { i G S |i ф A n^ } .

What is the maximum possible number of distinet sets whieh ean


oeeur as diagonal sets for a single ehoiee of A \, . . ., A n?

Solution: The answer is 2n — n.


We elaim that D n( A i , A 2 , . . ., A n) ф A{ for all i. It is elear
that Dk 0 (A\, A 2 , . . ., A n) ф Ai, where 7Го(г) = i. Henee

D K ( A i , A 2 , . . . , A n) — D no (Att(i) , Ая-(2 ); •••; Dn(n)) ф A n^ .

ButT^(2) , . . ., А п^пф = { A 1} A 2, . . ., A n}, from whieh


our elaim follows.
There are 2n different subsets. Excluding the n original sets
leaves at most 2n — n possible sets as diagonal sets. Indeed, this
number is obtainable. Let Ai — {г} for 1 < i < n. Then

D no (A \ , A 2, . . . , A n) = 0

and

D i r ( A i , A 2, . . . , A n) = {*' e S |i £ А п({ф = {г e S \ i ф 7т(*')}.

By appropriate ehoiee of the permutation 7 Г , eaeh subset of S with


at least two elements ean be ereated as a D K. Henee the empty
set and all subsets of S with at least two elements are exactly the
possible diagonal sets, for a total of 2 n — n possibilities.
22. [IMO Shortlist 1994] A subset M of {1, 2, 3 , . . . , 15 } does not eon-
tain three elements whose produet is a perfeet square. Determine
the maximum number of elements in M .
84 Solutions to Advanced Problems

Solution: For a set M , let \M\ denote the number of elements


in M . We say set M is good if it is a subset of S = {1, 2, 3, . . . , 15 }
and it does not eontain three elements whose produet is a perfeet
square. We want to hnd the maximum value of \M\, where M is
good. Let m denote this maximum. We eall a triple of numbers
(г, j , k } , 1 < i < j < k < 15 bad if i j k is a perfeet square.
First we show that m < 11. Sinee there are disjoint bad triples
B\ = { 1 , 4 , 9 } , B 2 = { 2 , 6 , 1 2 } , B 3 = { 3 , 5 , 1 5 } , B 4 = { 7 , 8 , 1 4 } ,
if \M\ = 12, all three numbers in at least one of these triples are
in M . Flenee M is not good if \M\ > 12 and we eonelude that
m < 11.
If m = 11, then let M be a good set with \M\ = 11. Then
M = S — {cq , a2, с*з, a4 }, where a* £ Bi for i = 1, 2, 3, 4.Henee
10 e M . Sinee 10 G M and B x = { 1 , 4 , 9 } , B 4 = { 7 , 8 , 1 4 } ,
B$ — {2, 5, 10 }, Bç — { 6, 15, 10 } are bad triples with 10 as the
only repeated element, M = S — {b\, b4, 65 , bç }, where bi 6 B \,
b4 G B 4, 65 G {2, 5 }, and bç 6 { 6 , 15 }. Therefore {3, 12 } C M .
Then 1, 4, 9 are not in M . Sinee there are still two disjoint bad
triples {2, 3 , 6 } and {7, 8 , 14 }, we need to delete at least two more
numbers to make M good. Henee \M\ < 10, whieh eontradiets
the assumption that \M\ = 11. Henee our assumption was wrong
and m < 1 0 .
It is not diffieult to eheek that the set {1, 4, 5, 6 , 7, 10, 11, 12, 13,
1 4 } satisfies the eonditions of the problem. Henee 10 is the
maximum number of elements in M .
23. [IMO Shortlist 2001] Find allfmite sequences {xç, x\, . . ., x n) sueh
that for every j , 0 < j < n, Xj equals the number of times j
appears in the sequence.

Solution: Let [xç, x\, . . . , x n) be any sueh sequence. Sinee eaeh


X j is the number of times j appears, the terms of the sequence

are nonnegative integers. Note that xq > 0 sinee xq = 0 is a


eontradietion. Let m denote the number of positive terms among
X \, x 2, . . . , x n . Sinee xq = p > 1 implies xp > 1, we see that
m > 1 . Observe that Х^Г- i жг- = m + 1 sinee the sum on the left
eounts the total number of positive terms of the sequence, and
XQ > 0. (Note: For every j > 0 that appears as some х^, the
sequence is long enough to inelude a term x j to eount it, beeause
Solutions to Advanced Problems 85

the sequence eontains j values of i and at least one other value,


the value j itself if i ф j and the value 0 if i = j .) Sinee the
sum has exactly m positive terms, m —f of its terms equal 1 , one
term equals 2, and the remainder are 0. Therefore only xq ean
exceed 2 , so for j > 2 the possibility that Xj > 0 arises only in
ease j = xq. In partieular, m < 3. Henee there are three eases
to eonsider. In eaeh ease, bear in mind that m — 1 of the terms
x i , a?2 , •••, x n equal 1 , one term equals 2 , and the the others are
0 .

(i) m = 1. We have = 2 sinee x\ = 2 is impossible. Thus


xq = 2 and the final sequence is ( 2 , 0 , 2 , 0 ).

(ii) m = 2. Either x\ = 2 or = 2. The first possibility leads


to ( 1 , 2 , 1 0 and the seeond one gives (2 , 1 2 , 0 0
, ) , , ) .

(iii) m = 3. In this ease, xp > 0 for some p > 3. Thus


x 0 = p and xp = 1. Then x\ = 1 is eontradietory, so
x\ = 2 , X2 = 1 , and we have aeeounted for all of the
positive terms of the sequence. The resulting sequence is
(p, 2 , 1 , ( ^ ^ O , 1 , 0 , 0 , 0 ).
p—3
In summary, there are three speeial solutions and one infinite
family:

(2 , 0 , 2 , 0 ), ( 1 , 2 , 1 , 0 ), (2 , 1 , 2 , 0 , 0 ), (p, 2 , 1 , 0 _ _ A 1 , 0 , 0 , 0 ),
p—3

for p > 3.

N ote: If one eonsiders the null set to be a sequence, then it too


is a solution.
An expanded version of the problem allows for infinite se-
quences, and sueh solutions exist. One simple eonstruetion starts
with a finite solution (xq,x\, . .. , x n), sets xn+\ = n + 1 and
eontinues as shown:

(xq,X\, . . . , x n, n + 1 , n + 1 , . .. , n + 1 ,
4---------------v '
xn+i —n+ 1 terms
n 2, n 2 , . . . ,n-\- 2 , . . .).
4---------------V---------------"
x n + 2 terms
86 Solutions to Advanced Problems

For example,

( 1, 2 , 1, 0 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 8 , 8 , 8 , 8 , 8 , . . . ) .
24. Determine if it is possible to partition the set of positive integers
into sets Л and B sueh that A does not eontain any 3-element
arithmetie sequence and B does not eontain any infinite arith-
metie sequence.

Solution: Eaeh infinite arithmetie sequence is determined by its


first term and its eommon differenee, i.e., we ean write an infinite
arithmetie sequence a, a + d, a + 2d, . . . as (a, d). Therefore we ean
define a bijeetion between the set of positive infinite arithmetie
sequences and S, the set of all the lattiee points in the first
quadrant (not ineluding the axes) of the eoordinate plane. Note
that the set S is eountable as it ean be eounted by the sum of its
eoordinates:

{ ( 1 , 1) ; ( 1, 2 ) , ( 2 , 1) ; ( 1 , 3) , ( 2 , 2 ) , ( 3 , 1);
We build set A inductively. At step 1 , we put a\ = 1 in set A
(this breaks the infinite arithmetie sequence ( 1 , 1 )); at step 2 , we
piek a number larger than 2 ai = 2 from the sequence ( 1 , 2 )
and put it in A (this breaks the sequence ( 1 , 2 )); at step 3, we
piek a number that is larger than 2 a 2 from the sequence ( 2 , 1 )
and put it in A ; . . . ; at the ith step, i > 3, we piek a number that
is larger than 2 а г-_1 from the ith sequence from S (note that S is
eountable so sueh an ordering exists) and put it in A , and so on.
All the numbers that are not in A form set B.
By this eonstruetion, it is elear that every infinite sequence has
been broken, so set B eontains no infinite arithmetie sequence.
On the other hand, the elements in A ean arranged in inereasing
order а ! , а 2 , аз, . . . with аг+ 1 > 2аг. It follows that any three
terms ai < aj < eannot form an arithmetie sequence as
2 aj < aj + 1 < а^ < ak + аг.
Therefore it is possible to partition the set of positive integers
into sets A and B sueh that A does not eontain any 3-element
arithmetie sequence and B does not eontain any infinite arith-
metie sequence.
25. [USSR 1989] Çonsider the set T5 of 5-digit positive integers whose
deeimal representations are permutations of the digits 1, 2, 3, 4,
Solutions to Advanced Problems 87

5. Determine if it is possible to partition T5 into sets A and B


sueh that the sum of the squares of the elements in A is equal to
the eorresponding sum for B .

Solution: We begin by making the following key observation.


L em m a. Suppose a 1 , 0 2 , . . . , 0 5 is a permutation of the
digits 1, 2; 3, 4? 5. Then the sum of the squares of the 5-digit
number ( 0 ^0 2 0 3 0 4 0 5 ) and its four eyelie permutations is equal to
the sum of the squares of the reuerse number ( 0 5 0 4 0 3 0 2 0 1 ) and
its four eyelie permutations. That is, we have

5 5
О г’_|_1 О г’_|_2Ог'_|_зОг'_|_4) — ( 0 j ’_| _40j_|_30j’_|_20j_|_i f l j ) ,

i= 1 i=1

where ог-+ 5 = ог.


Proof: We convert eaeh deeimal representation (<7 ic?2 ^3 ^4 ^5 )
to ^ 1CPdj and expand the squares. The expansion ereates square
terms of the form IO2 3 d“j and eross terms of the form 2-103 +kdjdk.
Now we eonsider the square terms and eross terms that oeeur on
eaeh side of the equality we want to prove. It is easy to see that
the same square terms oeeur on both sides, sinee eaeh digit oeeurs
exactly onee in eaeh of the ones, tens, hundreds, thousands, and
ten-thousands plaees. We elaim that the two sides have identieal
eross terms, too. Indeed, eaeh eross term 2 •10J +ÄOjOfe that arises
from 10 J Oj and 1 0 ка^ on the left side also arises from 1 0 kaj
and 1 0 3 on the right, beeause the right side eontains all of
the reversed numbers. ■
We now divide the 120 numbers in T5 into 24 groups that eaeh
eontain 5 numbers that are eyelie permutations of eaeh other. We
put all permutations in whieh the numbers 1, 2, 3 oeeur eyelieally
in that order in A, and the rest (in whieh the order is 1,3, 2) in
B . Now eaeh group of 5 numbers in A has a eorresponding group
in B that we ean apply the lemmato, and this shows that A and
B have equal sums of squares.
26. [Çhina 1996] Let n be a positive integer. Find the number
of polynomials P ( x ) with eoeffieients in { 0, 1, 2 , 3 } sueh that
T (2) = n.
88 Solutions to Advanced Problems

F irst Solution: Let S = { 0 , 1, 2, 3 }, and let

P ( x ) = amx m + am_ i x m_1 H b a^x + a0,

where аг- E S. Then P ( 2) = 2mam + 2m_1 am_i + ••*+ 2ai + a0.


We are trying to find the number of sequences (ao, ai, . . .) with
eaeh E S sueh that
OO
ao + 2 ai + 4a2 + •••= ^ ^2 аг = n .
i- 0

We eonsider the generating funetion

f(x) = (1 + X + X2 + £ 3 )(1 + Ж2 + Ж4 + X6)

(l + x4 + xs + x 12) . . . ,

where 1 + x + x 2 + x 3 representsthe different ehoiees for ао, 1 +


x 2 + ж4 + ж6represents the different ehoieesfor ai, 1 + ж4 + ж8 + ж12
represents the different ehoiees for a^, and so on. It sufhees to
hnd the eoefheient of term x n in f ( x ) . Note that

x4 — 1 x8 — 1 x 16 — 1 x 64 — 1
X —1 X2 — 1 X4 — 1 X8 — 1
1
(x — l ) ( x 2 — 1 ) ’
as eaeh term in the numerator oeeurs in the denominator of the
fraetion two terms away. By partial fraetions, we obtain
1 1 1
f { x ) = 4(x + 1) 4(x - 1) 2(x - l ) 2
1
~ 2 + 1 = -l ( ( x - l ) - 2
4(x2 — 1) 2(x — l ) 2 2 \ ; 1 x*
Expanding the two funetions in the last equation, we hnd that

№ = \ 1 - Ix + x 2 —■

+ (l + x 2 + x 4 + ■■•)

Sinee
- 2 \ _ (—2 ) (—3) •••( —2 — n + 1 )
= ( - ! ) " ( « + 1),
n n\
Solutions to Advanced Problems 89

we obtain

f ( x ) — —[(1 + 2 x + Зж2 + •••) + (1 + ж2 + ж4 + ■■■)]


Z
— 1 + x + 2 x 2 + 2 x 3 + Зж4 + Зж5 + •••

= Ž ( [ Ş j + 1K
m—0
Thus, the eoeffieient of x n is [n/2j +1, that is, there are [n/2j +1
polynomials satisfying the eonditions of the problem.

Seeond Solution: We will solve a more general problem: Let


m and n be positive integers with m > 2. Find the number of
polynomials P ( x ) with eoeffieients in { 0 , 1 , 2 , . . . , m 2 — 1 } sueh
that P (m ) — n. We eall sueh polynomials good.
Let P ( x ) = J2T=o akXk, where E {0, 1 , 2 , . . . , m2 — 1 } for
k — 0 , 1 , 2 , . . . . Then eaeh ean be written in the form of
h^m + c&, where &&, (+ G { 0 , l , 2 , . . . , m — 1} . Henee
OO OO OO
n = P (m ) = bi~mk + 1 + Ckmk = mt + <+mfc,
k=0 k= 0 k=0

where t = bkxnk . For eaeh t, 0 < t < [ n/ mj, there is a


unique way to write t = JTJJjJLg b^mk with E {0, 1, 2, . . ., m —1 }
(that is, express t in base m) and there is a unique way to write n —
mt = с^тк with E {0, 1, 2, . . ., m — 1 } (that is, express
n — mt in base m). Henee we have a a bijeetion between the
set { 0 , 1 , . . . , [гг/ mj } and the set of good polynomials. Therefore
there are [n/mj + 1 good polynomials.
For our problem, we have m = 2 and thus there are [n/2j + 1
polynomials satisfying the eonditions of the problem.
27. [IMO Shortlist 2000] Let n and k be positive integers sueh that
+n < k < Find the least number m for whieh it is possible
to plaee eaeh of m pawns on a square of an n X n ehessboard so
that no eolumn or row eontains a bloek of k adjaeent unoeeupied
squares.

Solution: Çall a plaeement of pawns on the board good if there


is no k X 1 (or 1 X k) bloek of unoeeupied squares. Label the rows
and the eolumns 0 through n — 1 .
90 Solutions to Advanced Problems

A standard good plaeement is obtained by putting pawns on


squares ( i , j ) (ith row and j th eolumn) sueh that i + j + 1 is
divisible by k. Sinee n < clk , the sum i + j has to be equal to
k — 1 , 2 k — 1 , or — 1 , so the pattern is eomposed of at most
three oblique lines. Sinee 3A; < 2n, these three lines eonsist of k
squares, 2n —2k squares, and 2n —3k squares, respectively. This
gives a total of 4 (n — k) oeeupied squares.
We now show that this is aetually the least possible number
of pawns in a good plaeement. Suppose that we have a good
plaeement of m pawns. Partition the board into nine reetangular
regions

A B e
D E F
G H I

so that the eorner regions A, C , G, I are (n —k) X (n —k ) squares,


eaeh of regions B and H has n — k rows and 2k — n eolumns,
and eaeh of regions D and F has 2k —n rows and n —k eolumns.
(This is possible sinee 2k — n > 0.)
Observe that we ean eut the region A U B into (n — k) 1 X k
reetangular strips. Similarly, we ean obtain n —k horizontal strips
from B U C, G U H , and H U I . We ean likewise obtain 4 (n — k)
vertical strips, for a total of 8 (n —k) strips. By the eonditions of
the problem, eaeh strip must eontain at least one pawn. On the
other hand, eaeh pawn belongs to no more than two of the strips
in our eonstruetion. Henee there are at least 4 (n — k) pawns.
28. [Çhina 1996] In a soeeer tournament, eaeh team plays eaeh other
team exactly onee and receives 3 points for a win, 1 point for a
draw, and 0 points for a loss. After the tournament, it is observed
that there is a team whieh has both earned the most total points
and won the fewest games. Find the smallest number of teams
in the tournament for whieh this is possible.

Solution: We eall this speeial team W. Suppose that there are


n teams in the tournament. There are (”) = n(n — 1)/ 2 games
played for a total of at least n(n — 1) points. Thus the average
points earned per team is at least n — 1. Sinee W played n — 1
games and its seore must be higher than the average, W won
at least 1 game. Eaeh of the other teams has to win at least 2
Solutions to Advanced Problems 91

games for a total of at least 6 points; henee W has to tie at least


4 games (for a total of at least 7 points). But if team A tied its
game against team W , team A has 7 points. Henee team W has
to tie at least 5 games. Therefore, n > 7.
If n = 7, then team W won 1 game and tied 5 games for a total
of 8 points. So eaeh other team won exactly 2 games and tied at
most 1 game. Henee eaeh other team must lose at least 3 games.
Then there are at least 6 x 3 = 1 8 losses but only 1 + 6 x 2 = 1 3
wins, whieh is impossible. Henee n > 8 .
We now give an example that shows that it is possible to
have an 8 -team tournament that satishes the eonditions of the
problem. Let W, A \ , A 2, . . ., A^ be the 8 teams. Team W
won games against A\ and A 2, and tied the other games for
a total of 11 points. For 1 < % < 7, team A{ won its games
against teams A i+ \ , Нг-_|_2 , ^*+з and l°st its games against teams
A { +4 , Ai+$, A i +Q, where A^+r — Thus teams A\ and A 2
eaeh have 3 wins and 4 losses for a total of 9 points, and teams
As, A 4 , . . .H 7 eaeh have 3 wins, 3 losses, and 1 tie for a total of
10 points.
Thus the desired minimum is 8 .
29. Let a\, . . . , a n be the hrst row of a triangular array with щ £
{0, 1}. Fill in the seeond row b\, . . . , fen_i aeeording to the rule
Ък = 1 if etk ф a,k-|-i, = 0 if = afe+i- FiH in the remaining
rows similarly. Determine with proof the maximum possible
number of l ’s in the resulting array.

Solution: Let x n denote the desired maximum number for an


array with n rows. One ean eheek that x\ = 1, x 2 = 2, Х3 = 4.
Now we shall relate х п+з to x n . Çonsider the top three rows of
an (n + 3)-row triangle: ab . . ., an+3; b\, . . ., bn+2; cn+ 1.
Get your pebbles ready.
If at least one of a,k,bk,Ck is 0, then plaee a pebble over eolumn
k eorresponding to that 0. If а^Ь^с^ — 1, then а^+\ — bk + 1 = 0;
plaee a pebble over eolumn к eorresponding to а^+ 1 and another
over eolumn k + 1 eorresponding to ž++ i- Starting with k = 1,
run the above proeess repeatedly, eaeh time letting к jump to the
next pebbleless eolumn. By the end, eolumns 1 through u + 1 will
all have pebbles over them. If eolumn n + 2 does not yet have
a pebble over it, then none of the pebbles that have been plaeed
92 Solutions to Advanced Problems

eorresponds to a&_1-2 , ^ + 2 , or °A:+3 , but sinee there must be at


least one 0 among those three numbers, we may plaee another
pebble eorresponding to it.
Sinee eaeh of our n + 2 pebbles eorresponds to a 0, there
are at least (n + 2 ) 0 ’s in the top three rows of our triangle.
Consequently, there ean be at most (2гг + 4) l ’s there, so а?п_|_з <
x n + 2n + 4. One ean show by induetion that
n2 + n + 1
xn <

Furthermore, this bound is attainable, as is demonstrated by the


following pattern:
1 1 0 1 1 0 1 1 0
0 1 1 0 1 1 0 1
1 0 1 1 0 11

1 1 0 1 1 0
0 1 1 0 1
1 0 11

1 1 0
0 1
1

Eaeh row’s numbers repeat in bloeks of three. From the bottom


row up, the numbers of l ’s in eaeh row are 1, 1, 2, 3, 3, 4, 5, 5,
6, ... .
30. There are 10 eities in the Fatland. Two airlines eontrol all of
the flights between the eities. Eaeh pair of eities is eonneeted by
exactly one flight (in both direetions). Prove that one airline ean
provide two traveling eyeles with eaeh eyele passing through an
odd number of eities and with no eommon eities shared by the
two eyeles.

Solution: Let eaeh eity be a vertex, and eaeh flight between


eaeh pair of eities be an edge between the eorresponding vertices.
We eolor an edge blue if it is from one airline and red otherwise.
This gives us a 2-eolored eomplete graph K \ q. In the language of
graph theory, we must show that in a 2 -eolored eomplete graph
Solutions to Advanced Problems 93

K \ q there are two monoehromatie non-interseeting odd eyeles.


We start with a well known result in graph theory.
L em m a 1. I f the edges of a eomplete graph K ç are eolored
m 2 eolors, the graph eontains a monoehromatie triangle.
Proof: There is a proof using simple arguments involving the
Pigeonhole Prineiple. But we present a eool proof. We show that
indeed there are two monoehromatie triangles. Let v\, v%, . . ., vç
be the vertices of K ç . If a pair of edges ViVj and ViVk are of the
same eolor, then we eall angle VjV{Vk monoehromatie. Let + and
bi be the respective numbers of red and blue edges emanating
from Vi. Then гг- + 6г- = 5 for all i and there are

monoehromatie angles. On the other hand, in eaeh monoehro-


matie triangle, there are three monoehromatie angles, while in
eaeh other triangle, there is one monoehromatie angle. Let m
be the number of monoehromatie triangles. Sinee there are a
total of = 20 triangles, there are 3m + (20 — m) = 20 + 2m
monoehromatie angles. Therefore, 20 + 2m > 24 or m > 2, as
desired. ■
Lem m a 2. I f the edges of a eomplete graph K§ are eolored m
2 eolors and the graph does not eontain a monoehromatie triangle,
then it eonsists of two length-5 monoehromatie eyeles.
Proof: Let v\,V 2 , . . . , v ç be the vertices of K$. If three
of the edges v±V2 , г>]+з, •••, v\v$ are the same eolor, then we
have a monoehromatie triangle. Indeed, we may assume that
^1^2 ) V\V3 , v\Vq. are red; then if any of v^vq, v%v^, v^v^ are red,
we are done. Otherwise, is a blue triangle, and we are
also done. (This argument ean be easily extended to prove the
existence of a monoehromatie triangle in a 2-eolored K ç.) Sinee
there are no monoehromatie triangles in our K$, there are two
red edges and two blue edges from eaeh vertex. If we only look at
the red edges, we have a subgraph of 5 vertices with eaeh vertex
having degree 2. Henee this subgraph is either a eyele or ean be
deeomposed into a few non-interseeting eyeles. But sinee there
are only 5 vertices, it eannot have two eyeles. Henee we must
have a red eyele of length 5. In exactly the same way, we ean
prove that we must have a blue eyele of length 5. ■
94 Solutions to Advanced Problems

Now we are ready to prove our main result. Let v\, г?2 , . . ., v \ q
be the vertices of our 2 -eolored (red and blue) eomplete graph
K\q. By Lemma 1, there is a monoehromatie triangle in
K\q. Without loss of generality, say it is v i v 2vq. By Lemma
1 again, there is a monoehromatie triangle in the subgraph
K\q —{ v i , У2 , У з } . Without loss of generality, assume it is ^4 ^5 vq.
If г>1г>2гз and ^4 ^51^6 are of the same eolor, we are done. If not,
assume that г ^ г з is blue and г^г^гб is red. Çonsider the edges
vi vj i 1 £ г ^ 3 and 4 < j < 6 . By the Pigeonhole Prineiple, ňve
of them are of the same eolor; without loss of generality, assume
they are blue. Henee there is some j 0 , 4 < j 0 < 6 , sueh that two
of the edges Vj0vi, Vj0V2 , Vj0vs are blue. Therefore we have one
blue triangle and a red triangle with exactly one eommon vertex
V3o■
For simplieity, we relabel the points so that г ^ г з is blue and
^3 ^4^5 is red. Çonsider the subgraph K \ q — {г^, v2, ■■■, vs }. If
it has a monoehromatie triangle, we are done as we ean piek one
of the triangles v\v2vs and гзг 4^5 to mateh the eolor of this new
triangle. Therefore one airline ean provide two traveling eyeles of
three eities with no eities in eommon. If not, by Lemma 2, we have
a red length-5 eyele and a blue length-5 eyele. Therefore eaeh
airline ean provide a traveling eyele of three eities and traveling
eyele of five eities with no eommon eities.
31. [MOSP 1997] Suppose that eaeh positive integer not greater than
n (n 2 — 2n + 3)/ 2 , n > 2 , is eolored one of two eolors (red
or blue). Show that there must be a monoehromatie n-term
sequence ai < a2 < •••< an satisfying

a2 - ai < a3 - a2 < •••< an - an_ b

Solution: Çall a sequence a i , a2, . . ., an sueh that

a2 — ai < 03 — a2 < •••< an — an_ 1 < m

an n-term m-sequence. Note that

We shall prove that if the integers are eolored red and blue, the
first sn integers eontain a monoehromatie n-term 3 ( 2)-sequence.
Solutions to Advanced Problems 95

We induet on n. The base ease n = 2 is trivial.


Assume without loss of generality that there is a red n-term
3 (!])-sequence a i,a 2 , . . . ,a n with an < sn . Note that

®n+ l $n
n n
+
< ” ‘) y t v c ; r . 1 ,

■ Ч У Ч + '
Çonsider the list of n + 1 numbers
n n
+ 1, . . ., an + 3 n

< Sn + З Г + r j + 1 = s„+1.

If all of them are blue, then we have a blue (n + l)-term l-sequence


and we are done. Otherwise, one of them, say (a + 3 ( 2 ) + k),
0 < k < n, is red. Let an+ 1 = a + 3(”) + k. Then

^n+ l Cln — 3 - * ( + ‘ s + r

and again we have a n + 1-term З ^ ]}1) sequence. This eompletes


the induetion and our proof.
32. [C. J. Smyth] The set { 1 , 2 , . . . , 3n) is partitioned into three sets
A, B , and C with eaeh set eontaining n numbers. Determine with
proof if it is always possible to ehoose one number out of eaeh set
so that one of these numbers is the sum of the other two.

Solution: (V. Alexeev) Suppose that { l , 2 , . . . , 3 n } is parti-


tioned into three sets A , B , and C , eaeh set eontaining n numbers.
For brevity, we shall eall a triple (a, b, e) good if a <E A ,b <E B , e <E
C and one of the numbers a, b, e is the sum of the remaining two.
Without loss of generality, we may assume that 1 E A and, if
k is the smallest number not in A, that k 6 B . Assuming that
there are no good triples, we elaim

If x E C , then x — 1 6 A. ( 1)
Then a eontradietion will follow immediately from (1). Indeed,
if C — { e i , С2 , . . ., cn}, then A eontains the numbers c\ — l , e^ —
96 Solutions to Advanced Problems

1, . . . , c n — 1, all of whieh are greater than 1 beeause 2 (jL C . But


1 E A , so A would have at least n + 1 elements.
Now we prove our elaim. Assume it is not true. Then there
is a number х E C sueh that x — l A . Çlearly x — 1 B
sinee otherwise ( l , x — l , x ) is good. Now, based on the faet
that x E C and x — 1 E C , we will prove that x — k E C and
x — k — 1 E C . (Reeall that k is the smallest element not in A.)
Indeed, if x —k E A, then (x — k, k, x) is good; if x — k E B , then
(k — 1, x —k, x — 1) is good. Similarly, the relations x —k — 1 E A
and x — k — 1 E B yield the good triples (x — k — 1, k, x — 1) and
(1 , x — k — 1, x — k), respectively. We ean repeat this argument,
eoneluding that all numbers x — ik and x — ik — 1 are in C , for
i — 0 , 1 , 2 , . . . , provided that they are positive. But x — ik must
be one of the numbers 1,2, . . . , k for some i. Henee it will be an
element of either A B , a eontradietion. Therefore x — 1 E A,
proving (1), and we are done.
33. [MOSP 2002] Assume that eaeh of the 30 MOPpers has exactly
one favorite ehess variant and exactly one favorite elassieal in-
equality. Eaeh MOPper lists this information on a survey. Among
the survey responses, there are exactly 20 different favorite ehess
variants and exactly 10 different favorite inequalities. Let n be
the number of MOPpers M sueh that the number of MOPpers
who listed M ’s favorite inequality is greater than the number
of MOPpers who listed M ’s favorite ehess variant. Prove that
n > 11.

Solution: Let c\, e^, . . ., С20 denote the 20 different favorite


ehess variants, and let e \, e^, • ••, eio denote the 10 different
favorite inequalities. Let set Si, 1 < i < 20, denote the set of
all MOPpers who ehose e* as their favorite ehess variant, and let
set T j , 1 < j < 10, denote the set of all MOPpers who ehose ej
as their favorite inequality.
For a set X , let |X| denote the number of elements in X . Eaeh
MOPper M is assigned a pair of values ( х м , У м ) as follows: if
M E Si, then x m — l/|Si|, and if M E T j , then ум — 1/|7}|. We
eall this pair of values the eoordinates of M . We are looking for
all the MOPpers M sueh that х м > Ум ■
Summing up all the ж-eoordinates over all MOPpers yields 20,
and summing up all the y-eoordinates over all MOPpers yields
Solutions to Advanced Problems 97

10. Henee

— У м ) = 10.
м
Note that for eaeh M , х м — Ум < ^м < 1- Therefore there are
at least 11 terms in the above summation that are positive, i.e.,
there are at least 11 MOPpers M with х м > У м , whieh is what
we wanted to prove.
34. [USAMO 1999 submission, Bjorn Poonen] Starting from a triple
(a, b, e) of nonnegative integers, a move eonsists of ehoosing two
of them, say x and y, and replaeing one of them by either x + y
or \x — y |. For example, one ean go from (3, 5, 7) to (3, 5, 4)
in one move. Prove that there exists a eonstant r > 0 sueh that
whenever a , b , c , n are positive integers with a,b ,c < 2n, there is a
sequence of at most rn moves transforming (a, b, e) into (a', b', e')
with a'b'c' = 0.

Solution: We will use strong induetion on n to show that


r = 12 works. The base ease is trivial, as is the ease abe = 0.
For the induetion step, we assume without loss of generality that
a < b < e. Using two moves if neeessary to replaee a by e —a and
b by e —b, we may instead assume that 1 < a < b < e / 2. Let m be
the integer sueh that 2m_1 < b < 2m. Sinee 1 < b < e/2 < 2n_1,
we have 1 < m < n — 1. Define a sequence xo = a ,x \ — b, and
x k = x k~i + x k —2 for k > 2.
L em m a. Every integer y > b ean be expressed in the form

where 0 < e < b, i\ < U < •••< ii, and x^t < y < Xit+i.
Proof: Sinee х^ are inereasing, there is a unique i > 1 for
whieh Xi < y < х^+1 . We use strong induetion on i. If y —х^ < b,
we let e = y — Xi and we are done. Otherwise x\ = b < y — X{ <
Xi+i — х^ = X i- i. Thus there is a unique j > 1 sueh that
х^ < y — Xi < Xj +1 , and j < i, so we hnish by applying the
inductive hypothesis to y — X{. u
Write e = e + +'i + •••+ Xit , where 0 < e < b and 0 < ii <
•* •< ii. Sinee x k+2 = x k+i + x k = 2xk + x k~i > 2xk for k > 1,
we have

*2»-2m+3 > 2 " - ”l+U i > 2


98 Solutions to Advanced Problems

so i'i < i'2 < ■■■< 4 < 2гг — 2ш + 3.


Using 2n — 2m + 1 addition moves we ean ehange (a,b,c) =
(a?o,a?i,c) into ( x 2 , x i , c ) , then into ( х 2 , х з ,c), and so on, until
we reaeh the triple ( x 2n- 2 m+2 , x 2n- 2m+i, e). Along the way,
we intersperse at most 2n — 2m + 2 moves between these, to
subtraet from e the a?*. in the representation of e as they are
produeed in the ňrst two eoordinates. Thus we will eventually
reduee e to e. Now we ean perform 2n — 2m + 1 subtraetion
moves to ehange the triple ( x 2n- 2 m+2 , ^2 n - 2 m + i c ) baek to the
triple ( x 2n~2m, x 2n~2m+i, e), and so on, undoing the previous
operations on the hrst two eoordinates, until we end up with
the triple (a, b, e).
Reaehing (a, b, e) required at most

2 + (2n—2m + l) + (2n—2m +2) + (2n—2 m + l) = 6 n — 6m + 6

moves. Afterward, sinee a,b,e < 2m, we ean transform (a,b,e)


into a triple with a zero in at most 12m more moves, by the
inductive hypothesis. Thus we have a total of at most (6n —
6m + 6) + 12m = 6n + 6m + 6 < 12n moves, sinee m < n — 1.
35. [IMO Shortlist 1998] A reetangular array of numbers is given.
In eaeh row and eaeh eolumn, the sum of all the numbers is
an integer. Prove that eaeh nonintegral number x in the array
ean be ehanged into either [ж] or [x\ so that the row-sums and
the eolumn-sums remain unehanged. (Note that \x\ is the least
integer greater than or equal to x, while [a?J is the greatest integer
less than or equal to x.)

Solution: First, we replaee all entries by [a?J, and mark eaeh


ehange with a — sign (so if x is an integer, there is no mark). Then
we restore the eolumn-sums by ehanging, eolumn by eolumn, the
roundings of eertain numbers, ehosen arbitrarily, and ehanging
their markings to + ’s.
We then restore the row-sums without disturbing the eolumn-
sums. Denote by s the sum of the absolute values of the ehanges
in the row-sums. It is neeessarily an even integer (as the sum of
all the numbers is preserved), and we want it to be 0. If s > 0,
we will deerease it by 2 at a time.
We say row S is aeeessible from row R if there exists a eolumn
C sueh that R П C is marked with a + and S П C is marked with
Solutions to Advanced Problems 99

a —. We may assume that the first row-sum is too high. Then


it eontains a + . Sinee eolumn-sums are restored, there is a —
in the same eolumn as the + (otherwise all of the marks in the
eolumn would be + ’s, and the eolumn-sum would be too high).
We may assume that the seeond row is aeeessible from the ňrst
row. If its row-sum is too low, we interehange the + and the —
on the aeeess-eolumn along with the roundings whieh define the
markings. This will deerease s by 2. If the seeond-row sum is
not too low, then it must eontain a + , and some row is aeeessible
from it. If we eventually reaeh a row whose sum is too low, a
ehain of interehanges along the aeeess-eolumns will deerease s by
2. We elaim this happens.
Denote by A the union of all rows aeeessible from the first row,
direetly or indireetly, and ineluding itself. Denote by B the union
of all other rows. Let C be any eolumn. If A П C eontains no
+ ’s, then the sum of its entries has not inereased from its original
value. If A П C eontains at least one + , then B П C eontains no
—’s, as otherwise some rows in B would have been aeeessible and
should belong to A. Henee the sum of the entries of B П C has
not deereased, so that the sum of the entries of A П C has not
inereased in this ease, as well. Sinee C is arbitrary, we eonelude
that the sum of the entries of A has not inereased. Sinee the
first row-sum is too high, some row sum in A must be too low,
justifying the elaim.
36. [USAMO 1997 submission] A finite set of (distinet) positive
integers is ealled a DS-set if eaeh of the integers divides the sum
of them all. Prove that every finite set of positive integers is a
subset of some DS-set.

F ir s t Solution: We induet on the number of terms in our set


that do not divide the sum of the elements of the set. For 0 terms,
it is obvious that we have a DS-set.
Let E s be the sum of the elements of set S and let s E S be
sueh that s / S s- Suppose that s = 2km, where 2 / m.
(i) Step 1: Add the following elements to S: S s , 2Ts, 4 S s,
. . . , 2fc_1Ss- The new set T has sum Ey = 2kJ^s- Henee all
of the new elements divide E t , as do all of the old elements
that divided E s- Note also that the elements of T are still
100 Solutions to Advanced Problems

distinet.
(ii) Step 2: If m = 1 we may skip this step. Otherwise,
reeall that by Euler’s extension of Fermafs Little Theorem,
2 ф(т) = ү (mod m). Let r = ф{т). Now we add to T the
elements 2 S t , T T t , . . . , 2r_1E T , as well as (2r —1) Et , 2(2r —
1)ST , 4(2r - 1)ET , .. •, 2r_2(2r - 1)ET . The new set U thus
formed has sum E u = 2r_1(2r — 1)ET - Thus all of the
elements we added divide E u, as do all of the elements of
T that divided E T - Furthermore, m |E j j ■
After performing these two steps, we have s |S u ■Furthermore,
all of the elements that originally divided E s still divide E[/, and
all of the elements that we added also divide E jj ■ Henee if we
had n elements of S whieh did not divide E s, we now have at
most n — 1 elements of T whieh do not divide E T .
Thus, if we ean eonstruet a DS-set eontaining any subset with
n elements not dividing the sum, then we ean eonstruet a DS-set
eontaining as a subset any set with n + 1 elements not dividing
the sum. By induetion, we are done.

Seeond Solution: (By Po-Ru Loh) For any n > 2, we exhibit a


DS-set that eontains the numbers 1 , 2 , . . . ,n. Sinee for any finite
set S of positive integers we ean ehoose n large enough that S C
{ 1 , 2 , . . . , n}, this will suffiee. First we put in our set the numbers
1 , 2 , . . . ,n and n(n + l)/2. This will bring the sum up to n(n + l).
Now we add the numbers (n —j ) (n —j + 2) (n —j + 3) * ••(n) (n + 1)
for j = 2,3, . . . , n — 1. Thus the overall sum is
П—1
n(n + 1) + ^^(и —j ) { n —j + 2) •••(n + 1)
3= 2
n —1
= n(n + 1) + y ^ [(n - j + l)(n - j + 2) •••(n + 1) -
3=2

(n - j + 2)(n - j + 3) •••(n + 1)]

= n(n + 1) + (n + 1)! — n(n + 1)

= (n + 1)!,

sinee the sum teleseopes. It is elear that the elements of our set
are distinet and divide (n + 1)!, so the proof is eomplete.
Solutions to Advanced Problems 101

37. [Çhina 1994, Çhengzhang Li] Twelve musieians M \ , M 2 , ■■■, M 12


gather at a week-long ehamber musie festival. Eaeh day, there is
one seheduled eoneert and some of the musieians play while the
others listen as members of the audienee. For i = 1, 2 , . . . , 12, let
ti be the number of eoneerts in whieh musieian plays, and let
t = t\ + + •••+ t\2- Determine the minimum value of t sueh
that it is possible for eaeh musieian to listen, as a member of the
audienee, to all the other musieians.

Solution: The eondition of the problem is the following:


If a musieian is not performing on a given day, he observes the
eoneert as a member of the audienee. If a musieian is performing
on a given day, he eannot observe other musieians’ performanees
on that day. Eaeh musieian is required to observe at least one of
eaeh of the other musieians’ performanees. (*)
• Obsewation 1. To achieve (*), any three musieians must
perform in at least 3 eoneerts. Indeed, if they only perform in 2
eoneerts, by the Pigeonhole Prineiple, two of them perform in 1
eoneert. So they ean not observe eaeh other on that day. This
means they have to observe eaeh other in the other eoneert,
whieh is impossible.
• Obsewation 2. To achieve (*), any 7 or more musieians must
perform in at least 4 eoneerts. Indeed, if they only perform
in 3 eoneerts, by the Pigeonhole Prineiple, there are at least 3
musieians performing in 1 eoneert, so they eannot observe eaeh
other in that eoneert. Then they have to observe eaeh other in
the other 2 eoneerts, whieh is impossible by observation 1.
• Obsewation 3. To achieve (*), any 9 musieians must perform
in at least 5 eoneerts. Indeed, if they only perform in 4
eoneerts, then eaeh of them ean perform in at most 3 eoneerts,
as otherwise he eannot listen to the other 8 musieians. Note
that if one of them only performs in 1 eoneert, then all 8 other
musieians must observe that eoneert. Then these 8 musieians
only have 3 eoneerts to observe eaeh other, whieh is impossible
by observation 2. Also note that if one of them performs in 3
eoneerts, then he ean only listen in the fourth eoneert; henee
all the other 8 musieians must perform in that eoneert. This
again leads to the situation that the other 8 musieians have
102 Solutions to Advanced Problems

to observe eaeh other in 3 eoneerts, whieh is impossible by


observation 2. Therefore eaeh of the 9 musieians performs in
2 eoneerts. There are Q) = 6 ways to ehoose 2 eoneerts to
perform. By the Pigeonhole Prineiple, there are two musieians
who have the same performing dates so they eannot observe
eaeh other, whieh violates (*).
We assume that there are k musieians who eaeh perform in only
1 eoneert. These k musieians must perform in different eoneerts as
otherwise they eannot observe eaeh other. Henee 0 < k < 7. Note
that all of these k eoneerts must be solo eoneerts. The remaining
12 —k musieians eaeh perform in at least 2 eoneerts, and they must
observe eaeh other in the 7 —k eoneerts left. It is easy to see that
it is impossible for k — 7 or 6. If & = 5, 7 musieians must observe
eaeh other in 2 eoneerts, whieh is impossible by observation 2;
if k = 4, 8 musieians must observe eaeh other in 3 eoneerts,
whieh is impossible by observation 2; and if k = 3, 9 musieians
must observe eaeh other in 4 eoneerts, whieh is impossible by
observation 3. Henee k < 2, so t > k + 2(12 — k) > 22.
Finally we give an example that shows that t = 22 is indeed
achievable. Let musieians M \ and M 2 give solo performanees on
days 1 and 2. Eaeh of the other 10 musieians will perform twiee.
There are 5 remaining days and henee (®) = 1 0 ways to seleet two
days on whieh to perform. Thus letting eaeh musieian perform
on a different pair of days eompletes the example.
38. [USAMO 1999 submission, Riehard Stong] An m x n array is
hlled with the numbers {1 , 2, . . . n}, eaeh used exactly m times.
Show that one ean always permute the numbers within eolumns to
arrange that eaeh row eontains every number {1 , 2, . . ., n } exactly
onee.

Solution: It suffiees to show that we ean permute the numbers


within eolumns to arrange that the top row eontains every number
1,2, . . . , n exactly onee; the result then follows by induetion on
the number of rows. For this we apply the Marriage Lemma. For
the boys take the eolumns, and for the girls take the numbers
{ 1 , 2 , . . . , « } . Say a boy (eolumn) likes a girl (number) if that
number oeeurs in the eolumn. For eaeh set of k eolumns, there
are a total of km numbers in those eolumns. Therefore there
Solutions to Advanced Problems 103

must be at least k different numbers among them. Thus there


is a marriage of the eolumns and the numbers they eontain.
Permuting these numbers to the tops of their respective eolumns
makes the ňrst row have all n numbers.
39. [IMO Shortlist 1998] Let set U — {1, 2 , . . . , n }, where n > 3.
A subset S of U is said to be split by an arrangement of the
elements of U if an element not in S oeeurs in the arrangement
somewhere between two elements of S. For example, 13542 splits
{ 1 , 2 , 3 } but not { 3, 4, 5 }. Prove that for any n — 2 subsets of U ,
eaeh eontaining at least 2 and at most n —1 elements, there is an
arrangement of the the elements of U whieh splits all of them.

Solution: We induet on n. For n = 3, the family eonsists of a


single 2-element subset { i , j }, whieh is split by the permutation
(i , k , j ), where k is the third element of U.
We now assume that the result holds for some positive integer
n > 3, and \et U = { l , 2 , . . . , n + l } . We are given a family T of
n — 1 subsets, eaeh eontaining at least 2 and at most n elements.
We have the following key observation.
L em m a. There is an element of U whieh is eontained in
all n-element subsets of T , but m at most one of its 2-element
subsets.
Proof: Suppose that T eontains k 2-element subsets and £
n-element subsets. Then k + £ < n — 1. At most k elements of
U ean appear two or more times in the 2-element subsets. Henee
the number of elements whieh appear at most onee among them
is at least (n + 1) — k > (n + 1) — (n — 1 — £) = £ + 2. Sinee
there are only £ elements whieh are not eontained in some of the
£ n-element subsets, one of these £ + 2 elements will satisfy the
desired eonditions. ■
Now we prove our main result. Without loss of generality, we
may assume the number n + 1 is an element of U satisfying the
property of the lemma. When it is removed, all n-element subsets
in T beeome (n — l)-element subsets of {1, 2, . .. , n }, while at
most one of the 2-element subsets of T beeomes a singleton.
If we have sueh a subset { г } , then the induetion hypothesis
guarantees the existence of a permutation 7Г of {1, 2, . . .n } that
splits all the other n —2 subsets (with n + 1 taken out). By adding
n + 1 to 7Г anywhere away from i , we have a permutation whieh
104 Solutions to Advanced Problems

splits all n — 1 subsets in T . (Note that all of the other subsets


that eontain n + 1 whieh were already split before adding n + 1
remain split.)
If we do not have sueh a singleton subset, ehoose any subset S
among the n — 1 subsets. By the induetion hypothesis, we have a
permutation 7tof { 1, 2, . . . , « } whieh splits all of the other n — 2
subsets. If n + 1 S , by adding n + 1 to 7Г between two elements
of S, we have a permutation whieh splits all n — 1 subsets in T .
Otherwise, if n + 1 E S , if 7Г does not already split S, we may
add n + 1 on either the left or right end of 7Г to split S . This
eompletes our induetion.

N ote: If T eontains n — 2 subsets eaeh of whieh eontains at


least 3 and at most n — 2 elements, we have a mueh simpler
approaeh. For any /г-element subset S of U , there are k\(n —k + 1)!
permutations of U whieh do not split S ; there are k\ ways to
permute the elements of S and there are (n — k + 1)! ways to
permute the n — k elements not in S and one big bloek of all the
elements in S. The maximum value of k\(n —/? + l), 3 < k < n —2,
is 3!(n — 2)!. So the total number of permutations whieh do not
split some of the subsets in T is at most (n — 2)3! (n — 2)!, whieh
is less than n\, the total number of all permutations. Henee there
is a permutation that splits all subsets in T .
40. [New York State Math League 2001/IMO Shortlist 2001] A pile
of n pebbles is plaeed in a vertical eolumn. This eonfiguration is
modified aeeording to the following rules. A pebble ean be moved
if it is at the top of a eolumn whieh eontains at least two more
pebbles than the eolumn immediately to its right. (If there are no
pebbles to the right, think of this as a eolumn with 0 pebbles.)
At eaeh stage, ehoose a pebble from among those that ean be
moved (if there are any) and plaee it at the top of the eolumn to
its right. If no pebbles ean be moved, the eonfiguration is ealled
a final eonfiguration. For eaeh n, show that, no matter what
ehoiees are made at eaeh stage, the final eonfiguration obtained
is unique. Deseribe that eonhguration in terms of n.

F ir s t Solution: At any stage, let pi be the number of pebbles


in eolumn 7 for i — 1 , 2 , . . . , where eolumn 1 denotes the leftmost
eolumn. We will show that in the final eonfiguration, for all i for
Solutions to Advanced Problems 105

whieh pi > 0 we have pi = Pi+i + 1, except that for at most one


г*, р^* = j9j*_|_i. Therefore, the eonfiguration looks like the figure
shown below, where there are e nonempty eolumns and there are
from 1 to e pebbles in the last diagonal row of the triangular
eonfiguration. In partieular, let t^ = 1 + 2 + •••+ k = k{k-\-1)/2
be the Mh triangular number. Then e is the unique integer for
whieh t c_i < n < t c. Let s = n —tc_ \ . Then there are s pebbles
in the rightmost diagonal, and so the two eolumns with the same
height are eolumns e — s and e—s+1 (except if s = e, in whieh
ease no nonempty eolumns have equal height).

Final Çonfiguration for n = 12

Another way to say this is

f e —i if i < e — s, .
Pi = 1f e — z +. ±l 1 rii г :> e — s. i

To prove this elaim, we show that


(a) At any stage of the proeess, p\ > p^ > •••.
(b) At any stage, it is not possible for there to be i < j for whieh
,
Pi = p i + 1 p j = p j + 1 > 0, andp i + 1 -
pj < j - i - 1 (that is,
the average deerease per eolumn from eolumn i + 1 to eolumn
j is 1 or less).
(e) At any final eonfiguration, pi — pi-|_i = 0 or 1, with at most one
i for whieh pi > 0 and pi —Pi+i = 0.
106 Solutions to Advanced Problems

In the proofs of (a)-(c), we use the following terminology. Let a


k-switeh be the movement of one pebble from eolumn k to eolumn
k + 1, and for any eolumn i let a drop be the quantity pi —Pi+\.
To prove (a), suppose a sequence of valid moves resulted in
Pi < Pi+i for the first time at some stage j . Then the move
leading to this stage must have been an г-switeh, but this would
eontradiet the eondition that eolumn i have at least 2 more
pebbles than eolumn г+ l to allow switehes.
To prove (b), if sueh a eonhguration were obtainable, there
would be a minimum value of j — i over all sueh obtainable
eonfigurations, and we now show that there is no minimum.
Suppose p i , p 2 , . . . was sueh a minimal eonfiguration. It eannot
be that j — i + 1, for what would eolumns г, г+1, г+2 look like
just before the move that made the heights equal? The move
must have been a &-switch for i — 1 < /? < г + 2, but if so the
eonfiguration before the switeh was impossible (not deereasing).
Now suppose j > г+ l . Çonsider the first eonfiguration C in the
sequence for whieh eolumns i, г + 1, j , j -\-1 are at their final heights.
Note that from Pi+i to pj the eolumns deerease by exactly one
eaeh time in C , beeause if there was a drop of 2 or more at some
point, there would have to be another drop of 0 in this interval
to obtain an average of 1 or less, and thus j — i is not minimal.
The move leading to C was either an г-switeh or a j-switeh. If
it was the former, at the previous stage eolumns i + 1 and i + 2
had the same height, violating the minimality of j — i. A similar
eontradietion arises if the move was a j-switeh.
Finally, to prove (e), if any drop is 2 or more, the eonfiguration
is not final. However, if all drops are 0 or 1, and there were
two drops of 0 between nonempty eolumns (say between i and
г+ l and between j and i + 1 ) , then (b) would be violated. Thus
a final eonfiguration that satisfies (b) also satisfies (e). It now
follows easily that the only possible final eonfiguration is the one
deseribed earlier.

Seeond Solution: At eaeh stage, let e be the rightmost


nonempty eolumn. In eonditions (a)-(e) in the previous solution,
replaee (b) by (br), where
(b') All eonfigurations obtainable from the initial eonfiguration
Solutions to Advanced Problems 107

satisfy

Pi —pj > j — i — 1 for all i < j < c + 1. (2)

(The restrietion to j < c + 1, whieh eauses eertain eomplieations,


is neeessary for (2) to be true.) Faet (e), and thus the answer,
follows as easily from (br) as from (b). We prove (W) by induetion
as follows.
Çondition (2) is immediate for the initial eonfiguration: Sinee
e — 1, the only ease is p\ —p 2 = n > 2—1—1. Now suppose some
eonfiguration p i , P 2 , ■■■with final nonempty eolumn cp satisfies
(2), and a new eonfiguration q\, q^, . . . is obtained from it by a
&-switch. Thus qk = pk - 1, qk +1 = pk +1 + 1, and дг- = pi for all
other i. Let the new eonfiguration have cq nonempty eolumns.
Note that cq = cp unless k = cp.
For any i < j < cq + 1 we now show that qi — qj > j — i — 1.
The only eases to eonsider are those where qi —qj < pi —p j , that
is, those where i = k or j = k + 1; and those where pi —pj was
not restrieted, beeause j was greater than cp + 1 (ease 4 below).
There are four sueh eases.
Çase 1. If (i , j ) = (k, k + 1), then qi — qj > 0 = j — i — 1.
Çase 2. If i = k and j > k + 1, apply (2) to ( i + l , j ) to obtain

qi ~ qj > qi+1 - qj = Pi +1 - Pj + 1 > j - (i+1) - 1 + 1 = j - i - 1.

Çase 3. If j = k + 1 and i < k, then applying (2) to ( i , j —1),

Qi-Qj > Q i- Q j- 1 = P i - P j - 1 + 1 > ( j - 1 ) - i - 1 + 1 = j - i - 1 .


Çase j . We have j = cp + 2= k + 2, pk +1 = 0 and pk > 2. If
i = k or k+1, then qi — qj = q^ > 1 > j — i — 1. If i < k, then

Qi - q j = P i — 0 > P i - P k + 2 > ( i — k — l) + 2 = i —j - l .

This eoneludes the inductive step and (b') is proved.


41. Let B n be the set of all binary strings of length n. Given two
strings (<+•)”_ -^and (Ьг)"=1, dehne the distanee between the strings
as
П
d( (+ ), (bi)) = ^ 2 \ai ~ bi\'
к- 1
Let C n be a subset of B n . The set C n is ealled a perfeet
error eorreeting eode ( Р Е С С ) of length n and toleranee m if for
108 Solutions to Advanced Problems

eaeh string ( 6*) in B n there is a unique string (e*) in Cn with


(сг)) < m. Prove that there is no РЕСС of length 90 and
toleranee 2 .

Solution: Suppose C is a РЕСС of length 90 and toleranee 2.


Without loss of generality, assume (0, 0, . . ., 0) G C . Dehne the
weight of a string (a*) as There is no string (сг) of weight
1, 2, 3, or 4 in (7, or else there would exist some string (6г) within
2 of both (0, . . ., 0) and (сг). Let be the number of strings of
weight k in C.
There are (93°) strings of weight 3, and eaeh must be within
distanee 2 of exactly one string in C of weight 5. Eaeh string of
weight 5 is within 2 of (3) strings of weight 3. Therefore,

« 5 , so П5 = 11748.

There are (94°) strings of weight 4, and eaeh must be within


distanee 2 of exactly one string in C of weight 5 or 6 . Eaeh string
of weight 5 is 1 away from exactly (4) strings of weight 4 and 2
away from no strings of weight 4. Eaeh string of weight 6 is 2
away from exactly (4) strings of weight 4. Henee,

n5 + n6, so uq — 116430.

Eaeh of the (95°) strings of weight 5 is within 2 of exactly one


string in C of weight 5, 6 , or 7. A string in C of weight 5 is within
2 of itself and 85 (4) other strings of weight 5. A string of weight
6 is 1 away from exactly (5) strings of weight 5 and 2 away from
no strings of weight 5. A string of weight 7 is within 2 of (5)
strings of weight 5. Thus,

(l + 8 5 (3 ) ” 5 + (5) n6 + ( l ) n 7, so n7 1806954f,

whieh is impossible. Therefore, there is no РЕСС of length 90


and toleranee 2 .
42. Determine if it is possible to arrange the numbers l , l , 2 , 2 , . . . , n ,
n sueh that there are j numbers between two s, 1 < j < n , when
n = 2000, n = 2001, and n = 2002. (For example, for n = 4,
41312432 is sueh an arrangement.)
Solutions to Advanced Problems 109

Solution: We say a permutation is good if it satisfies the


above eonditions. In general, there is a good permutation of the
numbers l , l , 2 , 2 , . . . , u , n i f and only if n = Ak or Ak —1 for some
positive integer k.
First we show that there is no good permutation of the numbers
1,1, 2, 2 , . . . , n, n if n = 1 or 2 modulo 4. We approaeh indireetly
by assuming that a good permutation a\, а%, . . ., a^n exists. For
eaeh number k, let ( i k , j k ) , ik < jk, denote the positions of the
two oeeurrenees of k. Then

П П
^ J ik + 'У J jk — 1 + 2 + •••+ 2n — n(2n + 1) — S i ,
k =1 k=1

whieh is odd if n = 1 (mod 4) and even if n = 2 (mod 4). On the


other hand, jk — ik — k + 1, so

- £ . • * = 2 + 3 + - . + (n + l) = ! ^ ± ® ) = S 2l
k=1 k=1

whieh is even if n = 1 (mod 4) and odd if n = 2 (mod 4). We


obtain 2 'Yj/k=\jk — S\ S^, an even number equal to an odd
number, whieh is impossible.
(We ean also use the following approaeh: Eaeh pair of even
numbers 2k and 2k (2 < 2k < n) takes one odd position and one
even position, and eaeh pair of odd numbers 2& — 1 and 2 ^ — 1
(1 < 2k — 1 < n) takes either two odd positions or two even
positions. The odd numbers will therefore take an even number
of even positions. Say that number is 2m. Sinee there are [n/2j
pairs of even numbers 2k and 2k, even numbers will take [n/2j
even positions. Henee [n/2j + 2m = n, implying that |_n/2 j = n
(mod 2), whieh is not true for n = 1 or 2 modulo 4.)
Now we show that there are good permutations for n = 0 or
3 modulo 4. If n — 3, we have (2, 3, 1, 2, 1, 3); if n = 4, we have
110 Solutions to Advanced Problems

(2, 3, 4, 2,1, 3, 1, 4); if n = 4m — 1 with m > 2, we have

[(4m —4, 4m — 6 , , 2m); 4m — 2; (2m — 3, 2m — 5,

4m — 1; (1, 3 , . . . , 2m — 3); (2m, 2m + 2 , . . . , 4m —4);

2m — 1; (4m — 3, 4m — 5, . . . , 2m + 1); 4m — 2;

(2m — 2, 2m — 4 , . . . , 2); 2m — 1; 4m — 1;

( 2 , 4 , . . . , 2m — 2); (2m + 1, 2m + 3 , . . . , 4m — 3)];

if n = 4m with m > 2, we have

[(4m — 2, 4m —4, . . . , 2m); 4m — 1; (2m — 3, 2m — 5,

4m; ( 1 , 3 , . . . , 2m — 3); (2m, 2m + 2 , . . . , 4m — 2);

2m — 1; (4m — 3, 4m — 5, . . . , 2m + 1); 4m — 1;

(2m — 2, 2m — 4 , . . . , 2); 2m — 1; 4m;

( 2 , 4 , . . . , 2m — 2); (2m + 1, 2m + 3, . . ., 4m — 3)].

N ote: This problem is ealled the Langford problem. It is elosely


related to the following problems:
• Langford Determine if it is possible to partition the set

{1,2,...,24}

into k pairs of numbers (ai, bi), (ü 2 , b^), •••, (ak , bk) sueh that
bi — а^ = i + 1 for 1 < i < k.
• Skolem Determine if it is possible to partition the set

{ 1, 2 , . . . , 2 4 }

into k pairs of numbers (ai, bi), (a^, b^), . . ., (ak , bk) sueh that
bi — щ = i for 1 < i < k.
• Skolem Determine if it is possible to partition the set

{2,3,...,24}

into a singleton and k — 1 pairs of numbers(a\,b\), ( 0 2 , 62 ),


•••, (ak , bk) sueh that bi — a* = i for 1 < i < k.
Solutions to Advanced Problems 111

43. [IMO Shortlist 1996] Let k , m , n be integers sueh that 1 < n <
m —1 < k. Determine the maximum size of a subset S of the set
{1, 2 , . . . , k } sueh that no n distinet elements of S add up to m.

Solution: If m < n(n + l)/2, then the problem is trivial: the


set { 1 , 2 , . . . , k } itself satisfies the stated property, so the required
maximum eardinality is Лт. In the analysis eondueted below, we
assume that m > n(n + 1)/ 2 .
It is not diffieult to find a lower bound on the required maxi-
mum. Let r be the largest integer sueh that

+ (r + 1) + h (r + n - 1) < m,

or nr + n(n — l ) / 2 < m. It is elear that no n elements from


{ r + l , r + 2, .. ., k } ean add up to m. Solving the inequality
yields
m n —1
n
implying that a lower bound for the required maximum is the
quantity
m n —1
k-
n
We now show that this lower bound is in faet the answer we need.
To do this, it suffiees to show that if S is a subset o f { l , 2 ,
and no n elements of S add up to m, then
m n 1
151 < k (*)
n
We induet on n. Note that 2 < n < m — 1. For the base ease
n= 2, no two elements of S ean add up to m, so for eaeh i with
1< 2i < m — 1, at most one out of the pair of numbers (г, m —г)
ean be in S. It follows that
m —1
|5| < k -

in agreement with (*).


Let n > 2. We assume the result for n — 1 and prove it for n.
Let S be a subset of {1, 2, . . . , & } having the stated property, and
let x be the least element of S. If we have nx + n(n — 1)/ 2 > m,
112 Solutions to Advanced Problems

then

S C { r + 1, r + 2, . . . , k }

with r delined as above, and there is nothing to prove. We may


therefore assume that nx + n{n — 1)/ 2 < m.
The desired property implies that +1 — S — { x } is a subset of
{ x + 1 , x + 2, . . ., k } sueh that no n — 1 elements of S 1 add up
to m — x. Let +2 = {s — x \ x 6 S\ }. Then S 2 is a subset of
{1,2, ,k — x } sueh that no n — 1 distinet elements of S 2 add
up to m — nx. To invoke the induetion hypothesis, we need to
show that

n — l < m — nx — 1 < k — x .

The ňrst inequality is equivalent to m —nx > n, and this holds as


we have already assumed that m —nx > n{n — 1)/ 2 . The seeond
inequality is trivial as m — 1 < k. By the induetion hypothesis,
we obtain

m —x n
= k
n —1 2
mn — nx 1 n —1
= k—
n(n — 1) 2 2
The inequality nx + n(n — l ) / 2 < m implies that mn — nx >
(n — 1)m + n(n — 1)/ 2 . It follows that

m n —1

whieh is (*). This eompletes the induetion.


44. [USAMO 1998 submission, Kiran Kedlaya] A nondeereasing se-
quence so, s i , . . . of nonnegative integers is said to be superaddi-
twe if Si+j > Si + sj for all nonnegative integers i , j . Suppose
{s n} and { t n} are two superadditive sequences, and let { un} be
the nondeereasing sequence with the property that eaeh integer
appears in { un} as many times as in {s n} and { t n} eombined.
Show that { u n} is also superadditive.
Solutions to Advanced Problems 113

Solution: Given a sequence { a n}, define the dual sequence


{<Sn} so that S n equals the smallest integer k sueh that > n.
The key observation is that {s n} is superadditive if and only if
{ S n} is subadditwe, that is, Si+j < Si -\-Sj. Indeed, assume that
{s n} is superadditive. Then

s S i + S j > S,s, + s S j > i + j,

and so by the definition of S , Si+j < Si + S j ; the reverse


implieation is proved similarly.
Now simply note that if { S n} and { T n } are dual sequences
°f { sn} an(f { t n}, respectively, then the dual sequence of {wn} is
{ S n+ T n }. Sinee {S ^ } and { T n} are subadditive, elearly { S n + T n}
is as well, and so { un} is superadditive, as desired.
45. [IMO Shortlist 1999] The numbers from 1 to n2, n > 2, are
randomly arranged in the eells of an n X n unit square grid. For
any pair of numbers situated on the same row or on the same
eolumn, the ratio of the greater number to the smaller one is
ealeulated. The eharaeteristie of the arrangement is the smallest
of these n 2(n — 1) fraetions. Determine the largest possible value
of the eharaeteristie.

Solution: We first show that for any arrangement A its


eharaeteristie C ( A ) is less than or equal to (n + 1)/n. If two
numbers in the set G = { n 2 — n + 1, n2 — n + 2, n‘ } lie on
the same row or eolumn, then

n n+ 1
C(A) < <
n+ 1 n
If the numbers in G are in different rows and eolumns, then two
of them are on the same row or eolumn as the number n2 —n, so
we have

n —1 n+ 1
C(A ) <
n —n n
Now we show that the arrangement

i + n(j 1) if i < j ,
aij —
i + n(n — i + j — 1) if i > j ,
114 Solutions to Advanced Problems

that is,

1 + (n — 1)n 1 1 + (n — 2 )n
2 + (n — 2 )n 2 + (n — 1)n 2 + (n — 3)n

eo

eo

eo
3 + (n — 2) n

1
+

+
(n — 2) + 2 n (n — 2) + 3n (n — 2) + n
(n — 1) + n (гг — 1) + n —1
n n+n n + (n — l) n

has eharaeteristie (n + 1)/n. Indeed,


• The differenee between any two numbers lying on the same row
is a multiple of n; therefore,

aik aik aik П,2 n+ 1


> > >
Çlij dik — hn a,ik — n n* — n n
• On the first eolumn we have the arithmetie progression

n < (n — 1) + n < (n — 2) + 2n <

< 2 + (n — 2)n < 1 + (n — 1)n,

implying
ац 1 + (n - l)n n —n + 1 n+ 1
aki 2 + (n — 2 )n n2 — 2n + 2 n
with equality if n = 2;
• The j th eolumn, 2 < j < n, eontains the two arithmetie
progressions:

j ~ 1, (j ~ 2) + n, ( j - 3) + 2 n , . . .,1 + (j - 2)n;

« + (j - l)ra, (n - 1) + j n , . . ., j + (n - l)ra,

implying
aij j + ( n - 1) n n+ 1
> >
akj ~ (j + 1) + (n — 2)tt n
with equality for j = n — 1.
46. [Çhina 1999, Hongbin Yu] For a set 51, let |5| denote the number of
elements in S. Let A be a set with |ff| = n, and let A\, A 2 , .. .,
be subsets of A with \Ai \ > 2, 1 < i < n. Suppose that for eaeh
116 Solutions to Advanced Problems

Summing up all the above inequalities yields

V li; = V V —
ds
> V У'
1-4,, 4 ,
^ ^ n —di ~ ^ ^ n — \Aj
i= 1 i= lj\ x ig A j i= lj\ x ig A j

1-4,

П- |Aj|

= E i m
j =i
By (2), all the equalities hold in the above inequalities. Henee
dj — |Aj|. It follows that
П П П
- di)dj = Y di = Y Y
i —1 i —1 j | *= 1 j |

n
=£ lAil
i =l i |
n
= E ( " - i^ di ^ i
i=i
implying (3), as desired.
47. [Iran 1999] Suppose that r\, . . ., rn are real numbers. Prove that
there exists a set S C {1, 2, .. ., n) sueh that

1 < |5n{i, * + l, i + 2}| < 2,

for 1 < i < n —2, and

1
Y n r,: .
i£S i=1

Solution: Let s = Х2Г=1 lr*l апс^f°r г = 1, 2, define

Sj — rj
'J and tj = ri-
r j T 0 , J = 1 ( mo d 3) r i < 0 j = * ( m o d 3)

Then we have s = «i + «2 + —fi —t^ —t^, or

2 s — ( §i + § 2 ) + ( s 2 + 5з) + ( s 3 + s l )

— ( fl + ^2 ) — (f 2 + *з) — (<3 + f l ) -
Solutions to Advanced Problems 117

Therefore there are i\ =/= + sueh that either + s,-2 > | or


Тч +7j 2 + —| or both. Without loss of generality, we assume that
+'i + s *2 + § and l+y+s^l > 17г-x+ 7г-2 1. Thus +Sf2 +2*^+ tf 2 > 0.
We have
g
(+ ! + Si2 + + i) + (s*! + Sj2 + ti 2) > S i ± + Si 2 > —.

Therefore at least one of +Sj-2 + + x and s^ + s *-2 + 7 4-2 is greater


than or equal to | and we are done.

N ote: By setting r\ — = Г3 = 1 and Г4 = Г5 = rç = —1, it is


easy to prove that Ь is the best value for the bound.
48. [USAMO 1999 submission, Kiran Kedlaya] Let n, k, m be positive
integers with n > 2k. Let S be a nonempty set of &-element
subsets of { 1 , . . ., n ) with the property that every {k + l)-element
subset of {1, . . ., n ) eontains exactly m elements of S. Prove that
S must eontain every fc-element subset of { 1 , . . ., n).

Solution: We ňrst eount pairs of {U, V), where U 6 S and V


is a {k + l)-element subset of { 1 , 2 , . . ., n } eontaining U , in two
different ways. By assumption, if we sort the pairs by V , we find
there are m^^- J of them. On the other hand, if we sort by U ,
we find there are {n — ArJI+ l pairs. We eonelude

m n m
\S\ = n k \k + 1 / k + 1 \k,

We next eount triples { U , V , W ) , where U is a {k + l)-element


subset of { 1 , 2 , . . . , n ) and V and W are distinet elements of
S eontained in U . If we sort the triples by U, we see that by
assumption the number of triples is

^ n \ m{m — l ) { n — k){n — k + 1 )
m(m — 1 )
ф + l) k{k + 1 )

On the other hand, we ean also sort the triples by V(1W , whieh is
always a set of k — 1 elements. For eaeh (k —l)-element subset J
of { 1 , 2 , . . ., n ) , let s j be the number of elements of S eontaining
it. Eaeh J is V П W for exactly s j { s j —1) triples, so we eonelude

m(m — 1 ){n —k){n — k + 1 ) / n


k { k + 1) \k- J = ^ 2 sä s j - ^ )-
118 Solutions to Advanced Problems

The funetion f ( x ) — x 2 is convex, and


mk m(n — k + 1 )
k+ 1 k+ 1

Henee
m(m — l)(n — k)(n — k -\- 1 )
*(* + 1)
m2(n — k + l ) 2 m(n —k + 1 )
- (^ + l ) 2 &+ 1
or
(m — 1 )(n — &) m(n —k + 1 )
k ~ k+ 1
Henee

m(n —2k) > (& + l)(n — 2 Ar).

Sinee we assume that n > 2k, we eonelude that m > /? + 1,

Note: The result is a speeial ease of a theorem of Liningston


and Kantor, but with a different proof. The eondition n >
2k is dehnitely neeessary, or else balaneed bloek designs would
not exist. Çomplementing the sets of sueh a design gives a
counterexample.
49. [Çhina 1999, Zhenhua Qu] A set T is ealled even if it has an even
number of elements. Let n be a positive even integer, and let
S i , S 2 , •••, S n be even subsets of the set S — {1, 2, . . ., n}. Prove
that there exist i and j , 1 < i < j < n, sueh that Si П Sj is even.

First Solution: For a pair of sets A and B, we introduee their


symmetrie differenee

A A B = (A - B ) U (B - Ä)

that is, A A B = (A U B ) — (A П B ) . For eaeh subset A C T , we


dehne its mdex funetion фд : T —У{0, 1 } as
Solutions to Advanced Problems 119

We have the following properties of the symmetrie differenee


operation:
(a) A A A = 0 and АД0 = A ;
(b) A A B = B A A ]
(e) ( A A B ) A C = A A ( B A Ç ) ]
(d) if both A and B are even sets, A A B is also even;
(e) a £ A \ A A 2 A ■■■A A r (r a positive integer) if and only if x
belongs to an odd number of sets A \, A 2 , . . ., A r .
The proofs of properties (a), (b), (e), (d) are rather straightfor-
ward. We prove property (e) by induetion on r. The base eases
r = 1 and r = 2 are trivial. Assume the property is true for r,
r > 2, for the subsets A \, A 2 , . . ., A r . We eonsider

X = A \ A A 2 A •••A r A A r+1 = Х ^ А А г+1,

where X \ = A \ A A 2 A - - - A r . Then x G X if and only if x


belongs to either X \ — A r + 1 or A r + 1 — X . If x £ X \ — A r+1 ,
x (jt A r+\ and x G X \ that is, x belongs to an odd number of
sets A\, A 2 , . . . , A r , A r+\ by the induetion hypothesis. If x £
A r+1 — X , then x £ A r+1 and x belongs to an even number
of sets A \ , A ^ ,. . ., A r , so x belongs to an odd number of sets
A^, A 2 , . . . , A r , A r+1. Our induetion is eomplete.
Now we are ready to prove our main result. Let n = 2m, and
let

S = { S u S 2 , . . . , S 2m}.

We have the following lemma.


L em m a. There exist an even number of sets Si with their
symmetrie differenee equal to either 0 or S.
Proof: We eonsider all possible symmetrie differenees

S h A S i2A - - - A S i 2j

where j > 1. If some of these differenee are equal to either 0


or S, we are done; if not, note that there are 22m_1 — 1 sueh
differenees and eaeh of these is an even subset of S (by property
(d)). Also note that there are 22m_1 — 2 distinet even subset
of S not ineluding 0 and S. By the Pigeonhole Prineiple, two
of these differenees are the same. Without loss of generality (by
120 Solutions to Advanced Problems

properties (b) and (c)), we may assume

Ti = A S 2A ■■■A S k A S k + i A ■■■A S 2i

= S k+1A ■- . A S n A S w A S i j - k = T 2

By properties (a) and (b), we obtain

0 = Ti A T2

= S i A S 2A ■. . A S kA S 2i+1A ■••A S 2j- k.

Henee 0 is the symmetrie differenee of k + (2j —k —2i) = 2(j —i)


sets. ■
By the lemma, we may assume that there is an even number
2i sueh that

S 1A S 2 - - - A S 2i = 0 or S.

We eonsider these two eases separately.


• Çase 1. We assume that

S i A S 2 ■■■A S 2i = 0.

By property (e), eaeh element s of S belongs to an even number


of sets S i, S 2, . . ., S 2i. We ealeulate
2i 2i f

rl = 1^1 П SkI = ^Sk(si)


k —2 k —2 \ s i £S i

For s 1 G S\, s 1 belongs to an odd number of sets S 2, . . . , S 2i,


i.e.,
2i
= l (mod 2).
k=2
Therefore,

ri =E ( S ^(si)) = £ ( E ^ ( si)) '


k —2 / Si£$i \k —2 /

Sinee +1 is an even set, ri is even. Therefore, at least one of


the 2z — 1 numbers j+i П S k \, 2 < k < 2i, must be even, as
desired.
• Çase 2. We assume that

S 1A S 2 - - - A S 2i = S.
Solutions to Advanced Problems 121

By property (e), eaeh element s of S belongs to an odd number


of sets S i , S 2 , ■■■, Sşi- We ealeulate
2i 2i

r1 - I51! r)Sk\= E V>sfc(si)


k= 2 k= 2 \s i £ 5 i

For si £ S i, si belongs to an odd number of sets S 2 , . . . , S^i,


l . e.

2i

X ^ 5*(si) = ° (niod 2).


k= 2

Therefore

Sinee r\ is the sum of even numbers, r\ is even. Therefore, at


least one of the 2i — 1 numbers |Si П Sk |, 2 < k < 2i, must be
even, as desired.

Seeond Solution: (By Tiankai Liu) Assign to eaeh S) an


n-dimensional vector аг, where the j th eoordinate of аг is 1 if Si
eontains j and 0 if not. Then the faet that Si is even translates
into аг •аг = 0 (mod 2).
For the sake of eontradietion, assume аг •aj = 1 (mod 2) for
all i ф j , that is, Si and S j have odd interseetion for all i ф j .
Suppose there exists a nonempty subset X o f { l , 2 , 3 , . . . , n } for
whieh

^2 ax = (0, 0, 0, .. . , 0) (mod 2).


x£X

Then, for any i G X , аг • a%= 0 (mod 2). On the other


hand,

x£X x £ ( X —i)

= a{ -
х £ ( X —i)

— |X| — 1 (mod 2).


122 Solutions to Advanced Problems

It follows that that \X\ is odd. So X is a proper subset of


{ 1 , 2 , . . . , n } , sinee n is even. But then, for any j ^ X , eij ■
^ х е х ax = ®(mod 2) implies that \X\ is even, a eontradietion.
Thus X does not exist.
Thus, for eaeh of the 2” subsets Y of {1, 2 , 3 , . . . , n}, ay
is different modulo 2. On the other hand, for eaeh sueh sum, the
sum of all the eoordinates of the vector must be even, as it was
formed by summing vectors eorresponding to even sets. Henee the
first n — 1 eoordinates of the vector determine the parity of the
last eoordinate. It follows that there are only 2n_1 possibilities,
modulo 2, for ay’ a eontradietion.
Thus, there exist i and j sueh that щ ■aj is even, and eorre-
spondingly the interseetion of S{ and S j is even.
50. Let A i , A 2 , . . . , B i , B 2 , . . . be sets sueh that A\ — 0, B\ = {0 },

A n4. 1 — {■£ T 1 |x £ B n }, В п+\ = A n U B n A n П B n,

for all positive integers n. Determine all the positive integers n


sueh that B n = {0 }.

F irst Solution: We show that B n = 0 if and only if n is a


power of 2.
First we introduee some notation. For a set S of integers, let
2S denote the set {2x \ x £ /S}, and let S + k denote the set
{x k \ x E S } for any integer k.
We now observe that 0 ^ A n for all n > 1. This is true for A\
by deňnition, and for the rest beeause A n+\ is formed by adding
1 to the elements of B n , all of whieh are nonnegative. It follows
by an easy induetion that 0 £ B n for all n > 1.
Next we prove by induetionthat the following four statements
are true for all n > 2:
(a) А 2 П- 1
II

(b) В 2 П- 1 — A 2n
(c) В 2 П = 2 B n ;
(d) 1 E B^n-i-
The base ease ean be verified by eomputing A 2 = { 1 } , B 2 =
{0}, = {1}, B 3 = { 0 , 1 } , H4 = { 1 , 2 } , and B 4 = { 0 } .
For the induetion step, assume that the statement holds for
n — 1; that is, assume that А 2 П- з = 2An-\ — 1, В^п-з =
Solutions to Advanced Problems 123

A 2n- 3 ^ B 2 n - 2 , B 2 n - 2 = 2 5 n_i, and 1 £ B 2n_ 3. Then statement


(a) immediately follows beeause

O2n—i = B 2n_ 2 + 1 = 2_S„_i + 1

= 2(An - l) + l = 2An - l ,

where we used the deňnition in steps 1 and 3 and the induetion


hypothesis in step 2.
Moving on to (b) and (e), we first need to obtain some infor-
mation about A 2n- 2:

A 2n—2 = В 2п—з + 1 = (Л 2П- 3 U B 2n_ 2) + 1

= ((2An- i — 1) U 2 B rj_ i) + 1 = 2An- i U (25„_i + 1).

Using this, we ean eompute B 2n_ 1 . We know by assumption


that B 2n- 2 = 2 B n- i , and we have by deňnition that B 2n- 1 =
A 2n - 2 U B 2n _ 2 —A 2n _ 2 П B 2n _ 2 and B n = A n_ i U B „ _ i - A n _ 1 П
B n- 1 . Therefore,

B 2n—1 = 2Mn_i U (2S n_i + 1) U 2B n-\

— (2+ n_i U (2S n_i + 1)) П 2 B n- i

= (2Bn- i + 1) U 2An- i U 2 B n- i - 2An- i П 2 5 n_i

= ( 2Sn_i + 1) U (2An- i U 2 B n- i — 2An- i П 2 S n_i)

= (2Bn- i + 1) U 2B n ,

where we eould remove the set 2 B n-\ + 1 in the seeond step


beeause it eontainsonly odd elements, while 2 B n-\ eontains only
even elements. We saw above that A 2n- i = 2 B n-\ + 1, so we
have B 2n- i = A 2n- i U 2B n.
Now we are finally ready to prove (e), and from there (b). We
know by definition that B 2n eonsists of the numbers that are
either in A 2n- i or B 2n- i but not both. We just proved that
B 2n- i = A 2n —1 U 2B n, so B 2n eannot eontain any elements in
A 2n —1 • On the other hand, we also showed that M2n_i = 2A n —1,
so all the elements of A 2n- i are odd and they eannot eoineide with
the elements of 2B n . Therefore, B 2n is exactly 2B n, proving (e).
Statement (b) now follows immediately, simply by plugging in
B 2n = 2B n in the relation B 2n- i = A 2n- i U 2B n .
124 Solutions to Advanced Problems

We ean now prove (d) by looking baek at the aftermath. We


showed above that B 2n- i = (2f?n- i + 1) U 2B n . At the very
beginning we observed that 0 is an element of eaeh of the B ’s. It
follows that 1 is an element of 2f?„_i + 1, and henee of Bşn -i-
This proves (d).
At this point it is easy to eonelude that the integers n sueh
that B n — { 0 } are exactly the powers of 2. To show that the
powers of 2 have this property, only a trivial induetion using the
relation B 2n = 2B n is required. To show that no other numbers
do, observe that all ff’s with odd indiees eontain 1 by (d), and
another trivial induetion using the same relation suffiees.

Seeond Solution: Let gn be generating funetions dehned by


9i(s ) = g2(x) = 1, and gn+i ( x ) = gn(x) + xgn_ x(x). We elaim
that for eaeh i, i £ B n if and only if the eoeffieient of x %in gn (x)
is odd. To prove this, hrst dehne a eorresponding sequence of
generating funetions f n for A n by /i(a?) = 0, f n+i ( x ) = xgn (x).
We will show also that the / ’s represent the A ’s by the same
seheme. We do so by induetion. Çlearly, the representations
are eorreet for n = 1. Now we assume that they are eorreet for
some n > 1, and prove that they work for n + 1. The dehnition
f n+i ( x ) = xgn (x) is exactly the translation of the given dehnition
A n+1 = { x + 1 |x £ B n ). As for B n+1 , to keep with the given
B n+i = A nU B n- A nC]Bn , we ean ehoose gn+i ( x ) = gn ( x ) + f n (x).
For n > 2, we may then plug in f n (x) = xgn- i ( x ) to obtain
gn+i ( x ) = gn (x) + xgn- i ( x ) , as wanted.
We elaim that gn (x) = Y ^ =0 (n l k) x k satishes the above
reeursion. Indeed, by this dehnition,

It remains to show that all but the eonstant eoeffieient of gn (x)


are even if and only if n is a power of 2. First we prove the “if”
Solutions to Advanced Problems 125

portion. Let n = 2m. We must show that for all 0 < k < 2m_1,
/ 2 m - 1 - k \ _ (2m — 1 — Z)(2m — 2 — k) ■■■(2m — 2 /)
V / У Ar ■ ( ät — 1 ) - - - 1

is even. Both the numerator and the denominator eontain a


produet of k consecutive integers. Observe that sinee the produet
in the denominator starts at 1, for any integer a, the numerator
eontains at least as many multiples of a as the denominator.
In partieular, this holds for powers of 2. In faet, we ean even
show a bit more: if 2l is the highest power of 2 dividing k,
then the numerator eontains strietly more multiples of 2l+1 than
the denominator. The denominator elearly eontains [r^ryrj such
multiples. The numerator, however, eontains [rjryr] multiples,
2m — 2k being the smallest of them. Sinee 2l+1 does not divide
k by assumption, the numerator eontains one more multiple of
2l+1 than the denominator. Now, reeall that the highest power
of 2 that divides a produet is equal to the sum over the number
of multiples of 2J in the produet, j — 1 , 2 , . . . . Henee it follows
from the above diseussion that the required binomial eoeflieient
is indeed even.
Now we prove the other direetion: if n is not a power of 2,
then at least one of the binomial eoefReients other than the first
is odd. Let n = 2mp, where p > 1 is odd. Then eonsider the term
f n - 1 - 2m\ _ {n - 1 - 2m)(n - 2 - 2m) ■■■(n - 2m+1)
\ 2m / _ 1 •2 ••-2m ‘
Sinee 2m |n,

n — i — 2m = —i (mod 2m)

for all i. Thus, for all i < 2m, the faetor n — i — 2m in the
numerator has exactly the same number of faetors of 2 as the
faetor i in the denominator. The same is true for the last pair
of faetors, n — 2m+1 and 2m. Neither is divisible by 2m+1 while
-•ya 1 T \
both are divisible by 2m, so the binomial eoeffieient ( ~2~ ) is
indeed odd.
51. [Iran 1999] Suppose that S = {1, 2, . . ., n } and that A \ , A 2, . . .,
А^ are subsets of S sueh that for every 1 < * i< 2 < 3 < 4 < k, we
have

|Л\ U 4 u 4 u4|<n-2.
126 Solutions to Advanced Problems

P ro v e t h a t k < 2n~2.

S o lu tio n : For a set T , let |T | d e n o te t h e n u m b e r s o f e le m e n ts


in T . W e say a set T C S is 2-coverable if A C Aj U A j for som e
1 a n d j (n o t n eeessarily d is tin e t) . L et A C S b e a set sueh t h a t
A is n o t 2-coverable a n d \A\ is m in im a l.
Ç o n sid e r th e f a m ily o f sets S i = { A C \ A i,A r\ A 2 , ■■■, A П A k }.
Sinee A is n o t 2-coverable, if X E S i, t h e n A —X (jt S\. T h u s
|S i | < 2lAl - b
O n th e o th e r h a n d , let B — S — A a n d eon sid er th e fa m ily
o f sets S 2 = {B П Аг, В П A 2, .. . , B П A k }. W e e la im t h a t if
X E S 2 , t h e n B —X S 2 - S u p p o se on th e e o n tr a r y t h a t b o t h
X , B —X E S 2 for so m e X = B П A i a n d В —Х = B П Ag>. B y th e
d e fin itio n of A th e r e are Aj a n d A j sueh t h a t A^ U A j = A —{m }
for so m e i, j , a n d m . T h e n

\At U A v U A{ U A j |= n - 1,

a e o n tra d ie tio n . T h u s o u r a s s u m p tio n is false a n d |^ 2 1 < 2 ^ l _1 =


2n —|A \—1
Sinee every set Aj is u n iq u e ly d e te r m in e d by its in te rse e tio n
w ith sets A a n d B = S —A, it follows t h a t k < |T i| • IS 2 1 < 2n _ 2 .

You might also like