Vous êtes sur la page 1sur 32

January 2008

Awesome Sets
by Iurie Boreico, Ivan Borsenco, and Radu Sorici
In this fifth AMY Segment1 we will talk about sets. As you will see sets are
the structures that are very comfortable to use in many mathematical areas.
To simplify the understanding of the material we have divided the segment in
three chapters
Chapter 1. Basics of counting with sets
The basic principles: sum, product, function, bijection
Inclusion Exclusion Principle
Chapter 2. Sets and bounds: Pigeonhole extended
Ordered and partially ordered sets
Additive sets
Chapter 3. Sets and useful tricks.
Convex sets
Counting in two ways
Look for the matrix!
Every chapter contains a theoretical part which is presented together with the
examples. At the end of each chapter we give you a list of problems related to
the material discussed in it. We encourage you to spend time to think about
the given problems and send us your solutions, partial or complete. Good luck
and success in your challenges!

The authors

1
c

2008, AwesomeMath LLC. All Rights Reserved.

AMY 2007-2008

Awesome Sets

Chapter 1. Basics of counting with sets


The basic principles: sum, product, function, bijection
A set is simply a collection of objects. For example one can consider the
set of apples in a box, the set of services offered by your mobile operator, or
even the set of all molecules in the universe. Each set is uniquely determined
by its objects, which are called elements of a set. If an element x belongs to
a set S, we write x S. By definition, each element appears in a set exactly
once, or does not appear at all. For example, {1, 1, 2, 3} does not signify a
set, because 1 appears two times, whereas {1, 2, 3} defines a set (the sets in
which elements can appear with repetitions are called multisets, but we will not
consider them). One can even consider more complicated sets, which consist of
objects of different types, for example we have the set {1, {2, 3}, Harry}, which
consists of a number, a wizard, and a set. However in our presentation the
examples will all be homogeneous, containing only elements of the same type.
A basic set is the so-called empty-set, denoted as or {}. It is the set which
has no elements.
Sets can also interact with each other. The basic operations are union and
intersection. The union of some sets, as the name suggests, consists of all
elements that belong to at least one of some sets, whereas the intersection
contains
all elements that belongTto all the considered sets. Unions are denoted
S
by whereas intersections with . A set A is called a subset of another set B if
B contains all the elements of A. We use the notation A B for this situation.
Thus, the empty set is a subset of all the sets but its only subset is itself. If a
set contains n elements, it has 2n subsets.
From this basic definitions a lot more can arise. For example one can consider
the set difference A B or A \ B as the set of all elements belonging to A but
not to B. If we consider a framework where all sets are subsets of a general big
set X, then we can define the complement of a set A, denoted as A, as simply
X A. We have the De Morgan Laws, which are simple exercises for the reader:
Theorem 1.1. Let A and B be two subsets of the same set. Then
[
\
\
[
A B = A B and A B = A B.
In other words, union and intersection interchange under complementation.
Using two sets A, B we can also define the product A B, which is the set
of all pairs (a, b) such that a A, b B. The product can be defined similarly
for more than two sets.
A more complicated but very important concept is also the concept of function. A function f from set A to set B, also denoted f : A B, is a rule that
associates to each element x of A and element f (x) of B. The set of all values
2

AMY 2007-2008

Awesome Sets

f (x) is called the image of f , and is a subset of B. It is sometimes denoted


as Im(f ) or Im(A) or Imf (A). The function is called injective if to different
elements of A correspond different elements of B, surjective if the image is the
whole set B, and bijective if it is both injective and surjective. We can also say f
is an injection, surjection, respectively bijection. If f is a bijection, then to each
element y of B there corresponds a unique x = g(y) in A such that f (x) = y.
By definition, if f : A B is injective, then f is a bijection between A and the
image of f . It is easy to see that f (g(y)) = y, g(f (x)) = x, and the function g
is called the inverse of the function f , sometimes written f 1 . The converse is
also true: if there exists a function g : B A such that f (g(y)y, g(f (x)) = x
for any x A, y B, then f is a bijection (and g is too). If there is a bijection
from A to B, then we say that A and B are in bijection. It is also easy to see
that of f1 , f2 are bijections from A1 to B1 and A2 to B2 , then f that sends
(a1 , a2 ) to (f (a1 ), f (a2 )) is a bijection from A1 A2 to B1 B2 .
We will denote the number of elements of a finite set S by |S|. It is often
also called cardinality.
Exercise: Prove that |A| = n if and only there is a bijection from A to
{1, 2, . . . , n}.
Our basic problem is easy to state: given a set S of interest, what is |S|?
There are two basic rules that are useful in dealing with this problem. Using
these two rules, we can break down a complicated counting problem into simple
subproblems.
If A B = , then |A B| = |A| + |B|.
The second rule is expressed in terms of the Cartesian product A B =
{(a, b)|a A, b B}.
|A B| = |A| |B|
The Sum Rule generalizes to n sets: if A1 , A2 , . . . , An are pairwise disjoint sets,
then
|A1 A2 An | = |A1 | + |A2 | + + |An |.
The Product Rules generalizes to
|A1 A2 An | = |A1 | |A2 | |An |.
More generally still, if a collection of ntuples (a1 , a2 , . . . , an ) is formed by
a sequence of choices such that for any possible choice of (a1 , a2 , . . . , ak1 ),
the number of available choices for ak is Nk , independent of the choices made
thus far, then the total number of ntuples than can be formed is the product
N1 N2 Nn . The two rules can be easily proved using the previously stated
exercise, we leave this to the reader.
Our standard example of an nelement set, using the exercise, is {1, 2, . . . , n},
which we will denote by [n]. By the Product Rule, the number of permutations of
3

AMY 2007-2008

Awesome Sets

[n] is n(n1) 21 = n!. By the same argument, there are n(n1) (nk+1)
ktuples of elements from [n]. To count unordered selections (subsets), we divide by k! and get the familiar result that
 the number of kelement subsets
of [n] is n (n 1) (n k + 1)/k! = nk . The Product Rule is often used in
this way. On purpose, we first count a larger class of configurations, and then
compensate for the overcount by dividing by the appropriate factor.
Example 1.1. How many ways are there to distribute the elements of [n]
among k unlabeled boxes if a1 of the boxes contain just one element, a2 contain
two elements, and so on, and no box is empty?
Solution. Such an arrangement is called a partition of [n] into k blocks;
the ntuple (a1 , a2 , . . . , an ) specifies the type of the partition. Note that the
nonnegative integers a1 , a2 , . . . , an must satisfy a1 + 2a2 + + nan = n and
a1 + a2 + + an = k. In order to count the number of partitions of [n] of
the type (a1 , a2 , . . . , an ), imagine first a different situation in which the boxes
are labeled, and that a box containing j elements has j separate compartments where individual elements can be placed. In this case, there are n distinguished positions for the elements of [n] and thus n! possible arrangements.
Now we must compensate for the fact that the boxes are not labeled and do
not have such compartments. For each j, any permutation of the aj labeled
boxes containing j elements gives the same partition; hence we need to divide
by (1!)a1 (2!)a2 (n!)an because permutations of elements within a box gives
the same partition. Hence we arrive at the desired formula for the number of
partitions of the type (a1 , a2 , . . . , an ), namely
P (a1 , a2 , . . . , an ; n) =

n!
.
a1 !a2 ! an !(1!)a1 (2!)a2 (n!)an

The most natural and attractive way to solve a new counting problem is to show
it can be reduced to one we have already solved.
The following idea is very useful - the method of bijective function.
Theorem 1.2. Suppose there exists a bijection f : A B. Then |A| = |B|.
An argument showing that |A| = |B| by exhibiting such a function is called
a bijective or combinatorial proof. In practice, the proof that a given mapping
f is a bijection is often carried out by exhibiting the inverse function g = f 1 .
Several examples follow.
Example 1.2. Prove that the number of subsets of [2n] having the same
number of elements as odd elements is 2n
n .
Solution. Given X [2n] with k even elements and k odd elements replace
the k odd elements of X by then n k odd elements not in X to obtain f (X)
[2n] with k even elements and n k odd elements. Thus f maps the given
collection of subsets of [2n] to the collection of all nelement subsets of [2n]. It
is easy to see that f is a bijection, with f 1 (Y ) given by exchanging the odd
elements of Y for the odd elements of [2n] not in Y.
4

AMY 2007-2008

Awesome Sets

Example 1.3. Find the number of ktuples (S1 , S2 , . . . , Sk ) satisfying


S1 S2 Sk [n].
Solution. The desired number is (k + 1)n . To see this, we construct a
bijection that associates with each set the sequence (S1 , S2 , . . . , Sk ) satisfying
S1 S2 Sk [n]
a correspondence codeword (a1 , a2 , . . . , an ) in which each aj assumes one of
k + 1 possible values. To construct the codeword that goes with a given nested
sequence of sets, we proceed as follows. For each j between 1 and n, if j Sk
let aj be the index of the first set in the chain S1 , S2 , . . . , Sk that contains j. If
j
/ Sk , set aj = k + 1. To see that this mapping is a bijection, note that the
chain S1 , S2 , . . . , Sk is uniquely constructed from its codeword by setting
Sj = {j | aj i},

i = 1, 2, . . . , k.

Thus there are just as many chains as there are codewords, namely (k + 1)n .
A 0 1 string of length n is an ntuple (a1 , a2 , . . . , an ) in which each element
is either 0 or 1.
Example 1.4. Prove that the number of 0 1 strings of length n such that
n+1
exactly m of the zeroes are followed immediately by ones is 2m+1
.
Solution. Given a 0 1 string (a1 , a2 , . . . , an ) enlarge it to a string of
length n + 2 by adding a0 = 1 and an+1 = 0. Then associate with the enlarged
string a corresponding one (b1 , b2 , . . . , bn+1 ) by setting bi = 0 if ai = ai1 and
bi = 1 otherwise. It is easy to check that the mapping just defined is a bijection
from the set of 0 1 strings (a1 , a2 , . . . , an ) that have exactly m zeros that are
followed immediately by ones to the set of 0 1 strings (b1 , b2 , . . . , bn+1 ) that
n+1
have 2m + 1 ones. There are 2m+1
strings in the latter set, so the proof is
complete.
Example 1.5. How many A B sequences consisting of n A0 s and n B 0 s
have the property that, when read from left to right, the number of A0 s never
lags behind the number of B 0 s. (Think of an election in which the votes are
counted one at a time; at the end there is a tie, but the candidate A never trails
candidate B as the votes are counted.)
(Ballot Problem)
Solution. We will refer to the fact that A never trails B as the votes
are counted as ballot condition. Without the ballot condition, there are 2n
n
possible sequences. Of these sequences, certain ones are bad (A trails B at
some point.) In a bad sequence, there is a first time where the number of B 0 s
exceeds the numbers of A0 s. At this point, there is one more B than A, and
reversing all symbols up to that point gives a sequence with n+1 A0 s and n1
5

AMY 2007-2008

Awesome Sets

B 0 s. This reflection (exchanging A0 s and B 0 s) provides a bijection from the


set of bad sequences onto the set of all sequences with n + 1 A0 s and n 1 Bs.
2n
This shows the number of bad sequences is n+1,
so there are


 
 

2n
2n
2n
1

=
n+1 n
n
n+1

acceptable once. The number


Cn =

 
1
2n
n+1 n

is called the nth Catalan number. The first six Catalan numbers are C0 =
1, C1 = 1, C2 = 2, C3 = 5, C4 = 14, C5 = 42. Remember that Catalan numbers
show up in many important combinatorial problems.
Here is an example that may justify the definition of cardinality for infinite
sets.
Example 1.6. Assume the we have sets A and B, such that there exists
an injective function f from A to B and an injective function g from A to B.
Prove that these two sets are in bijection.
Solution. Let A1 be the image of f . Clearly A is in bijection with A1 , but
B may comprise some other elements. Say C = B \ B1 . The image of C under
g is C1 . The image of C1 under f is C2 , and notice that we have C2 , C are
disjoint because C2 A1 . Likewise we construct the sets C3 , C4 , . . . with the
properties that C2i+1 = g(C2i ), C2i = f (C2i1 ).
S S
S S
Consider sets A0 = C1 C3 . . ., B 0 = C C2 . . .. The sets A0 , B 0 are in
bijection as the pairs (C, C1 ), (C2 , C3 ), . . . are. The sets A \ A0 , B \ B 0 are also in
bijection, and the bijection is provided by f . If x in A \ A0 , then f (x) B \ B 0 ,
because if f (x) B 0 , then f (x) C2k . The latter implies x C2k1 , so x A0 ,
by injectivity of f . Moreover, f is a surjection: if y B \ B 0 , then as y 6 C,
there exists a unique x A such that f (x) = y and since y 6 C2k , x 6 C2k1 .
Hence x A \ A0 . This is the required bijection.
Remark. If the sets are finite, the problem is easy: if there is an injection
from A to B, then the cardinality of A is less than or equal to the cardinality
of B. Also, if there is an injection from B to A, then the cardinality of B is less
than or equal to the cardinality of A. Therefore the two cardinalities are equal
and we can construct a bijection. This argument fails in the infinite case, of
course. However, our problem justifies the abstract definition of cardinality,
applied for all kinds of sets. One says that a set A has greater cardinality than
B if there exists an injection from A to B, and the cardinalities are equal if
and only if the sets are in bijection. What our problems proved is the usual
ordering property: if the cardinality of a set is both greater and less than the
cardinality of another, then these two cardinalities are in fact equal.

AMY 2007-2008

Awesome Sets

The Inclusion-Exclusion Principle


When we have a problem with many intersections or unions of some sets an
idea comes handy:
Assume that we have the sets A1 , A2 , . . . , An . For a subset {i1 , i2 , . . . , ik } of
[n], we can form the set Mi1 ,i2 ,...,ik consisting of all elements that belong to each
of the sets Ai1 , Ai2 , . . . , Aik and to none of the other. It is often comfortable to
count these sets instead of the original ones. A simplification is also possible,
by setting Mk the set of elements that belong to exactly k of the sets. The
following very important principle can be proved using this method.
Theorem 2.1. If A1 , A2 , . . . , An are some sets, then
|A1

A2

...

An | =

n
X

|Ai |

i=1

|Ai

Aj | + . . . +

1i<jn

+ (1)k1

|Ai1

Ai2

...

Aik | + . . .

1i1 <i2 <...<ik n

+ (1)n1 |A1

...

An |

(The Inclusion-Exclusion Principle)


S
S
Proof. We know A1 A2 . . . An = M1 M2 . . . Mn . Thus, it is
enough to prove that each of the elements in Mk is counted exactly one in the
right-hand
, . . . , Ak . In
Pnside. Indeed, assume that x belongs to k sets,
P say A1 , A2T
the sum i=1 |Ai | it will appear k times, in the sum 1i<jn |Ai Aj | it will

appear k2 times, because the two numbers i, j must be taken from {1, 2, . . . , k},


and so on. So the element x will appear in k k2 + k3 . . .. We must prove


that this equals 1, which is equivalent to 1 k + k2 k3 . . . = 0. This is just
the binomial expansion of (1 1)k = 0.
Remark. The principle of Inclusion-Exclusion remains true if we replace
cardinality by any additive measure like the sum of elements in the set, the sum
of squares, area and so on, and the proof is the same. The following example
illustrates the principle of Inclusion-Exclusion for sum of squares instead of
cardinality.
S

n
1
Example 2.1. Let n = p
1 pn and let 0 < a1 < . . . < a(n) < n be all
coprime integers with n that are less than n. Prove that

a21 + a22 + . . . + a2(n) =


1
(n) 2n2 + (1)k p1 pk .
6

Solution. Consider a function f : A N, f (x) = x2 and let Ai = {a A |


pi | a}, 1 i k. Then
f (A) =

n
X
i=1

i2 =

n(n + 1)(2n + 1)
= n3 + n2 + n + ,
6
7

AMY 2007-2008

Awesome Sets

where = 13 , = 12 , = 16 , and = 0.
f (Ai ) = p2i + (2pi )2 + . . . +

n
pi
pi

2

"  
 2
 #
3
n
n
n
= p2i
+
+
.
pi
pi
pi

Analogously,
f (Ai Aj ) =

pi p2j

" 
3

2

#
n
n
n

, i 6= j
+
+
pi pj
pi pj
pi pj

Using the Inclusion-Exclusion Principle we get


a21 + a22 + . . . a2(n) = f (A) f (

k
[

Ai ) =

i=1

"  
 2
 #
3
n
n
n
= n3 + n2 + n
p2i c
+
+
+
p
p
p
i
i
i
i=1
" 
3

2

#
X
n
n
n
+
(pi pj )2
+
+
...
pi p j
pi p j
p i pj
1i<jk
" 
3

2

#
n
n
n
k
+ (1)
+
+
.
p1 p k
p1 pk
p1 p k
k
X

Observe that a21 + a22 + . . . + a2(n) is of the form 0 n3 + 0 n2 + 0 n, where

k
X
X
1
1
1
,
+
. . . + (1)k
0 = 1
p
p
p
p

1 pk
i<j i j
i=1 i

0 = 1

k
X

1+

i=1

0 = 1

k
X
i=1

1 . . . + (1)k ,

i<j

pi +

pi pj . . . + (1)k p1 pk ,

i<j

Thus





1
1
1
1
1 (n)
1
1
1
=
,
3
p1
p2
pn
3
n
1
0 = (1 1)k = 0,
2
1
(1)k
(n)
0 = (1 p1 )(1 p2 ) (1 pk ) =
(p1 pk )
,
6
6
n

0 =

and this gives us the desired result.


8

AMY 2007-2008

Awesome Sets

Here is a rather quaint application of the Inclusion-Exclusion Principle:


Example 2.2. How many 2008-digit numbers are there having no even digit
on an odd place? (Starting from the dominant digit)
Solution. There are 1004 odd positions in a 2008-digit number: 1, 3, . . . , 2007.
Let us denote by Ai the set of numbers having an even digit on place 2i 1.
What we seek are theSnumbers that do not belong to any of the Ai . Their total
number is 102008 | Ai |, as there are 102008 2008-digit numbers (we consider
that a number can start with the digit 0). But
[
X
X
\
| Ai | =
|Ai |
|Ai Aj | + . . . .
T
T
Let us evaluate what is the term |Ai1 Ai2 . . . Aik |. These are all numbers
which have an even digit on each of the k places 2i1 1, 2i2 1, . . . , 2ik 1.
As there are 5 even digits and 10 digits in total, we have 5 possibilities for
eachTof these T
place and 10 for each of the remaining 2008 k places. Hence
|Ai1 Ai2 . . . Aik | = 5k 102008k . Now, there are 1004 sets so i1 , i2 , . . . , ik can
be chosen in 1004
ways. Thus,
k
X

|Ai |

|Ai

Aj | + . . . =

1004
X

k1

(1)

k=1


1004 k 2008k
5 10
.
k

Therefore the answer to the problem is


1004
X

102008 (

(1)k1

k=1




1004
X
1004 k 2008k
1004 k 2008k
5 10
)=
(1)k
5 10
.
k
k
k=0

We recognize here the formula of Newton Binomial Expansion, the sum is just
1004

10

1004
X

k=0

(1)


1004 k 1004k
5 10
) = 101004 (10 5)1004 = 501004 .
k

Remark. A simpler and much more natural way is as follows: for each of the
1004 odd positions, we have only 5 admissible digits (odd), and all 10 digits are
allowed for the remaining 1004 positions, so the total number is 51004 101004 =
501004 . However, we have chosen the other solution to illustrate the method of
Inclusion-Exclusion.
Example 2.3 A permutation of a set S is called a derangement if it
does not have fixed points, i.e., if (x) 6= x for all x S. Find the number of
derangements of the set {1, 2, . . . , n}.
Solution. We count instead the permutations that are not derangements.
Denote by Ai the set of permutations with (i) = i. Because the elements
in Ai have the value at i already prescribed, it follows that |Ai | = (n 1)!.

AMY 2007-2008

Awesome Sets

10

And for the same reason, |Ai1 Ai2 Aik | = (n k)! for any distinct
i1 , . . . , ik , 1 k n. Applying the inclusion-exclusion principle, we find that
 
 
 
n
n
n
|A1 A2 An | =
(n 1)!
(n 2)! + + (1)n
1!.
1
2
n
The number of derangements is therefore
 
 
 
n
n
n n
n!
(n 1)! +
(n 2)! + + (1)
0!.
1
2
n
This number can also be written as


1
1
(1)n
n! 1 + +
,
1! 2!
n!
which is approximately equal to n!
e , when n goes to infinity.
In the end, we want to exemplify the method mentioned in the beginning of
the chapter by showing how it helps solve a difficult problem.
Example 2.4. We have n finite sets A1 , A2 , . . . , An such that the cardinality
of the intersection of any collection of them is even with the exception that the
cardinality of the intersection
S
S ofSall them is odd. Find the least possible number
of elements that A1 A2 . . . An can have.
S
S
S
Solution. Set Ai = (A1 A2 T
. . . AnT) \ Ai . For a partition into subsets
I, J of {1, 2, . . . , n} denote [I, J] = iI Ai jJ AJ .
Let us prove by induction on |I| that [I, J] has odd cardinality
for |I|S> 0.
S
S
By using the Inclusion-Exclusion Principle we deduce that |A1 A2 . . . An |
is odd while the unions of other
S collections of subsets have
S even cardinality. For
|I| = 1 we have S
[I, J] = Ai \ ( j6=i Aj ). If we set B = j6=i Aj , then |B| is even,
|Ai | is even |Ai B| is odd. Therefore
\
[
|[I, J]| = |A \ B| = |A| |A B| = |A| (|A| + |B| |A B|).
S
As |A|, |B| are even, while |A B| is odd, so we deduce [I, T
J] is odd. If |I| 2,
then we can assume n 1, n I. We set A0n1 = An1 An . It suffices to
apply the induction hypothesis for I 0 = I \ {n} and for A1 , A2 , . . . , An2 , A0n1 .
This yields the induction step.
As we can partition {1, 2, . . . , n} in 2n S
1 ways
6 0 and the sets
S with
S |I| =
[I, J] are clearly distinct, we deduce that |A1 A2 . . . An | 2n 1. It can
equal 2n 1. The example is inspired by the solution: If we let Ai be the number
of all numbers between 1 and 2n 1 whose ith binary digit is 1, then we can
see these sets satisfy the conditions and their union has cardinality 2n 1.

10

AMY 2007-2008

Awesome Sets

11

Chapter 2. Sets and bounds: Pigeonhole


extended
This chapter will deal with certain bounds on sets with certain properties.
Namely, we will prove that any sufficiently large set will exhibit a special property, or that if we pick up sufficiently many sets of a certain form we will reach
a special situation. This is somehow reminiscent of the Pigeonhole Principle,
as this results are of similar nature if we have enough objects of a certain
type, something nice happens. And indeed, the pigeonhole principle is used at
various moments in many of the problems of this nature.
As an example, we present the famous
Theorem 2.1. Let X be a set with n elements. The
 greatest number of
sets such that no set is included in the other one is b nn c .
2

(Sperners Theorem)
Solution. Let X = {x1 , x2 , . . . , xn } and let S be the set of sets from X
that are incomparable (one is not the subset of the other). Then for every
permutation of X we can have at most one set in S from
{(1)}, {(1), (2)}, ..., {(1), (2), ..., (n)}
If this set contain t elements, then for all permutations we meet count it t!(nt)!
times. Because in total there are n! permutations, we get
|S|
X

tk !(n tk )! n!.

k=1
n
i

Using simple combinatorial inequality

|S|
X
tk !(n tk )!
k=1

Thus |S|

n
bn
2c

n!

11

|S|
X
1
k=1

, and we are done.

n
bn
2c

n
tk

, we obtain

|S|

.

n
bn
2c

AMY 2007-2008

Awesome Sets

12

Ordered and partially ordered sets.


An important branch of combinatorics investigates the order relationships
that arise between objects. An example of such relationship may be the usual
ordering of real numbers, ordering of sets by inclusion or the positive integers
by divisibility. One of the fundamental theorems of this branch is Dilworths
Theorem.
Consider a set S and let us introduce a partial order on S. For each a and
b in S, we may either have a relationship between a and b, a b, or have none,
a 6 b, that is a and b are not comparable. The partial order relationship must
satisfy three conditions; it is
reflexive: for all a S we have a a.
anti-symmetric: for all a, b S, if a b, then b 6 a.
transitive: for all a, b, c S, a b and b c implies a c.
The set equipped with this relationship is called a poset (partial ordered
set). The following definitions are common for posets:
A chain is a sequence of pairwise comparable elements a1 a2 . . . an ,
a totally ordered subset.
An antichain is a sequence of pairwise incomparable elements a1 , a2 , . . . , an ,
in other words any two elements in the sequence are not related.
The partial order length L is the length of the longest chain. The partial
order width W is the length of the longest antichain.
Theorem 2.2. The width W of a poset S equals the minimum number of
chains needed to cover S, equivalently S is a disjoint union of W chains.
(Dilworths Theorem)
Proof. We prove by induction on |S| that we can cover it by k chains, where
k is the number of elements of the longest antichain. The fact that S cannot
be covered by less than k chains is clear, because otherwise by the Pigeonhole
Principle two of the elements of the longest antichain would belong to the same
chain, a contradiction. Now we prove that we can cover S by at most k chains.
In other words, we prove by induction on |S| that if from any k + 1 numbers we
have two comparable, then S may be covered by k chains.
The base case is clear. Now take a maximal element a (we mean an element
not smaller than any other element). By the induction hypothesis S \ {a} can
be partitioned into k chains C1 , C2 , . . . , Ck . Let xi be the smallest element of
Ci and yi be the largest element of Ci . If no element is comparable with a, then
we actually see that in S \ {a} there are no k pairwise incomparable elements,
otherwise adding a to them would produce k +1 pairwise incomparable elements
in S. It follows that we can partition S \ {a} into k 1 chains and add a as a
singleton to get a cover of S by k chains.

12

AMY 2007-2008

Awesome Sets

13

Assume there are some elements comparable with a, thus smaller than a. Let
zi be the largest element of chain Ci smaller than a (if it exists). We can assume
z1 , z2 , . . . , zm exist and zm+1 , . . . , zn do not exist. If zi = yi we can add a to Ci
and we are done. So assume zi < yi . Let us remove from C1 , C2 , . . . , Cm the
subchains Ci0 = xi . . . zi . There are no k pairwise incomparable elements between
the new chains C1 , C2 , . . . , Ck , otherwise adding a to them would produce k + 1
pairwise incomparable elements in S. Thus by the induction hypothesis new
chains can be partitioned into at most l k 1 chains D1 , D2 , . . . , Dl . Let qi
be the smallest element of Di . If qi are from distinct original chains Ci , then
we can fulfill the condition by the following reasoning: if qi Cj , then add Cj0
to the beginning of Di . We are left with at most (k l) of Ci0 then. If there is
no Ci0 left we add a as a singleton and get l + 1 k chains and we are done.
Otherwise we have at most (k l) + l = k chains and we can add a to one of
the Ci0 to get again at most k chains.
Thus what we are left to prove is that we can ensure that qi belong to different
chains Cj . Let us color elements in k colors such that element has color i if it
belonged to Ci . For a chain Di , denote its length by the number of times we
change the color when we pass the chain (i.e. 1122 has length 1, because we
change color one time from 1 to 2). Now assume that qk , ql belong to the same
Ci . Assume qk . . . rk and ql . . . rl are the longest consecutive subchains of Dk
and Dl that consist of elements of Ci (elements having the same color). We may
assume rk rl and then we can easily mix qk . . . rk and ql . . . rl into one subchain
that ends in rl (just sort them in increasing order). Thus we can move qk . . . rk
and ql . . . rl to Dl . The length of Dl is the same whereas the length of Dk
decreases or Dk can even disappear. Applying this transformations the sum of
lengths of Di decreases and we cannot perform this operation indefinitely. So
at one time we will ensure that the smallest elements of Dk belong to different
Ci , which finishes the proof.
Remark. In a similar way it can be proved that the length L of poset S
equals the minimum number of antichains needed to cover S, equivalently S is
a disjoint union of L antichains. The important result of Dilworths Theorem
which we would like to emphasize is |S| L W .
Example 2.1. Let n 1 be an integer and let X be a set of n2 + 1 positive
integers such that in any subset of X with n+1 elements there exist two elements
x 6= y such that x | y. Prove that there exist a subset {x1 , x2 , . . . , xn+1 } X
such that xi | xi+1 for all i = 1, 2, . . . , n.
(Romanian Team Selection Test, 2005)
Solution. Consider the poset such that a is related to b if and only if a
divides b. Using Dilworth Theorem we get that there is an antichain of size
n + 1 or a chain of size n + 1, otherwise |X| = n2 + 1 n n = n2 , contradiction.
There is no antichain of size n + 1, because we are told if we pick n + 1 elements
from X there exist two elements x 6= y such that x | y. Thus there is a chain of
size n + 1, and this chain gives us the desired set.
13

AMY 2007-2008

Awesome Sets

14

Example 2.2. There are mn + 1 different numbers in a row. Prove that


one can either select n + 1 numbers which form an increasing sequence if one
looks from left to right, or m + 1 numbers which for a decreasing sequence if
one looks from left to right.
Solution. The problem is a direct consequence of Dilworth Theorem: one
says that a, b are comparable if the number to the left is smaller than the number
on the right, then we need to find either a chain of length n + 1 or an antichain
of length m + 1. However, as we know the length of the longest chain times
the length of the longest antichain is at least mn + 1 the number of elements,
which finishes the problem. Another solution, which emulates the easier part
of the proof of Dilworth Theorem, that the length of the longest chain equals
the minimal number of antichains to cover S (which was not proved, left as an
exercise to the reader), is at follows:
For each number a, let us set the degree of a be the length of the longest
increasing sequence ending in a. It is clear that the largest degree is exactly the
length of the longest increasing sequence. Now any two elements of the same
degree are not comparable: if a < b, a is to the left of b and the degree of a is
k, then the degree of b is at least k + 1 as each increasing sequence ending in a
may be enlarged by adding b in the end. Therefore the set of elements of same
degree for an antichain, i.e. a decreasing sequence. It remains to see that if the
length of the longest chain is at most n, then there are at most n degrees so
one of the degrees will correspond at least m + 1 numbers, by the pigeonhole
principle.

14

AMY 2007-2008

Awesome Sets

15

Additive sets.
A whole class of problems in combinatorial number theory is concerned with
certain additive properties of sets. For example, one can investigate all sets
that if contain two elements a, b, then they contain the sum a + b (these sets
are called additive sets). Often, the problem is complicated by considering sets
in Zp , i.e. sets that contain only residues modulo p (0, 1, . . . , p 1) and the
addition is replaced by the addition of the residues (for example, in Zp we have
3 + (p 1) = p + 2 = 2, because p + 2 and 2 give the same residue modulo
p). This class of problems is quite hard and requires a good mastery of special
techniques.
First we would like to prove the famous Cauchy-Davenport Theorem.
Theorem 2.3. Let p be a prime number and A and B two nonempty subsets
of Zp . Then
|A + B| min{|A| + |B| 1, p},
where A + B is the set {a + b | a A, b B}.
(Cauchy-Davenport Theorem)
Proof. We prove the statement by induction on |A|, the case when |A| = 1
is clear. Also, we may assume that |A| > 1 and |B| < p. Because A has at least
two elements, by shifting it we may assume that A contains 0 and x 6= 0. Also,
because B is nonempty and B 6= Zp , there is an integer n such that nx B
but (n + 1)x does not belong to B. By shifting B this time we may suppose
that 0 B, but x is not in B. Thus, A B is a proper nonempty subset of A
and we may use induction hypothesis for it and A B. Because A + B contains
(A B) + (A B) and |A| + |B| = |A B| + |A B|, the conclusion follows.
We can apply k 1 times Cauchy-Davenport Theorem to obtain
|A1 + A2 + . . . + Ak | min{|A1 | + |A2 | + . . . + |Ak | (k 1), p}.
Alternative version. Let p be a prime and let 0 a1 < a2 < < am < p
and 0 b1 < b2 < < bn < p be arbitrary integers. Let k be the number of
distinct residues modulo p that ai + bj give when i runs from 1 to m and j runs
from 1 to n. Prove that
a) if m + n > p then k = p;
b) if m + n p then k m + n 1.
Solution. Written in a more symbolic way, the problem says that
|A + B| min(|A| + |B| 1, p),
if A, B Zp . Now we prove it by induction on min(|A|, |B|). Assume that
|A| |B|. If |B| = p or |A| = 1 the problem is clear (the case |A| = 1 is actually
the base case). Otherwise we prove that for some k, A + k is not contained in
15

AMY 2007-2008

Awesome Sets

16

T
B but |(A + k) B| > 0. Indeed, fix two elements a1 , a2 A. If x B implies
that x + a2 a1 B then we deduce x B, x + a2 a1 B, x + 2(a2 a1 ) B
and so on, concluding that B = Zp . Otherwise there exists x B such that
x + a2 a1 6 B. Then we can pick k = x a1 . Now as |(A + k)| = |A| and
|(A + k) +TB| = |A +
S B| we can suppose thatTk = 0. SThe key observation
is that S|A B| + |A B| = |A| + |B| and A B + A B A + B. Also
T
0 < |AS B| < |A|. Therefore we can apply the induction hypothesis to A B
and A B to verify the statement.
Remark. This theorem is much harder than its version for Z or R, stated
as follows: if finite sets sets A, B are subsets of R, then the set A + B has
cardinality at least |A| + |B| 1. This can be proved by showing a simple
example of |A| + |B| 1 different sums: if A = {a1 < a2 < . . . < am } and
B = {b1 < b2 < . . . < bn }, then we have m + n 1 different numbers in A + B:
a1 + b1 < a2 + b1 < . . . < am + b1 < am + b2 < am + b2 < . . . < am + bn . This
proof fails in the case of sets in Zp because even if a number is smaller than the
other, they can still be equal modulo p.
Another important and famous result is the following:
Theorem 2.4. From any 2n 1 integers we can choose n integers such that
their arithmetic mean is also an integer.
(Erd
os-Ginsburg-Ziv Theorem)
Proof. We prove the statement by induction on the number of divisors of
n. The induction step is not difficult to prove. If we have 2ab 1 numbers, then
we can select a numbers whose sum is divisible by a by induction hypothesis
for a. Of the remaining 2ab a 1 we can select one more group of a numbers
whose sum is divisible by a, and so on until we get 2b 1 of such groups. Index
these 2b 1 groups as 1, 2, . . . , 2b 1. Let the sum of elements of group i be axi .
From 2b 1 numbers x1 , . . . , x2b1 by the induction hypothesis we can select
b whose sum is divisible by b. Let them be xi1 , xi2 , . . . , xib . Then the groups
numbers i1 , i2 , . . . , ib satisfy the desired condition, because we have in total ab
initial numbers in them and their sum is divisible by ab.
The remaining part is the base case for n prime. It is enough to consider
2p 1 residues modulo p. Write 2p 1 numbers in increasing order
a1 a2 ... a2p1 ,
where 0 ai p 1. Let us split the first 2p 2 numbers into p 1 pairs
(a1 , ap ), (a2 , ap+1 ), . . . , (ap1 , a2p2 ).
If the numbers in a pair are equal, say ai = ap1+i , then we have have p
consecutive equal numbers ai , ai+1 , ..., ap1+i and summing them we obtain 0
modulo p. Otherwise we can apply Cauchy-Davenport Theorem to the sets
A1 = {a1 , ap }, A2 = {a2 , ap+1 }, ..., Ap1 = {ap1 , a2p2 } we get |A1 + A2 +
. . . + Ap1 | p. Therefore every residue modulo p can be represented as ai1 +
16

AMY 2007-2008

Awesome Sets

17

ai2 +...+aip1 , where ik {k, p1+k}. Particularly a2p1 can be represented


in such a way. Thus we have ai1 + ai2 + ... + aip1 + a2p1 0 modulo p.
Example 2.3. Let p be a prime number, p 6= 2, and m1 , m2 , . . . , mp positive
consecutive integers and is the permutation of the set {1, 2, ..., p}. Prove that
there exist numbers k, l {1, 2, ..., p}, k 6= l with the property
mk m(k) ml m(l) (mod p)
Solution. It is clear that numbers m1 , m2 , ..., mp give different residues
modulo p. Without loss of generality suppose m1 = 0, m2 = 1, . . . , mp = p 1.
Let be a permutation of the set {1, 2, . . . , p}. If m(1) = 0 then there exist
k {2, 3, . . . , p} such that m(k) = 0, thus m1 m(1) mk m(k) 0(mod p)
and the problem is solved in this case.
It follows that m1 = m(1) = 0, then using Wilson Theorem we get
m2 m3 mp = (p 1)! 1(mod p)
m(2) m(3) m(p) = (p 1)! 1(mod p).
Multiplying them
m2 m(2) m3 m(3) mp m(p) 1(mod p)
Suppose that numbers m2 m(2) , m3 m(3) , . . . , mp m(p) are different modulo p
and different from 0, then
m2 m(2) m3 m(3) mp m(p) 1(mod p),
a contradiction. Thus there exist k, l {2, 3, . . . , p}, k 6= l such that
mk m(k) ml m(l) (mod p),
and we are done.

17

AMY 2007-2008

Awesome Sets

18

Chapter 3. Sets and useful tricks


Convex sets
Mathematical competitions check your knowledge bringing problems from
various amount of topics. One of these topics, which is rare, but very useful and
related with sets, is convex sets. So let us introduce the concept of a convex
set which plays an important role in connecting geometry with combinatorics,
number theory and other areas of math.
Definition. In Euclidean space, an object is convex if for every pair of points
within the object, every point on the straight line segment that joins them is
also within the object. For example, a solid cube is convex, but anything that
is hollow or has a dent in it, is not convex.
Theorem 3.1. If F is a family of more than n bounded closed convex sets
in Euclidean n-space Rn , and if every n + 1 members of F have at least one
point in common, then all the members of F have at least one point in common.
(Hellys Theorem)
We will prove a plane version of the Hellys Theorem. Assume that we have
A1 , A2 , . . . , An , n 3, convex sets in the plane such that Ai Aj Ak 6= for
all i, j, k {1, 2, . . . , n}. Then A1 A2 . . . An 6= .
Proof. We use mathematical induction. For the base case n = 4 we denote
by B1 A2 A3 A4 , B2 A1 A3 A4 , B3 A1 A2 A4 , B4 A1 A2 A3 ,
where B1 , B2 , B3 , B4 are the points at the intersection of the corresponding sets.
Consider four possible cases.
1st case. All four points lie on a line. Then let P [B1 B2 ], where [XY ] is
a segment with endpoints in X and Y . Clearly, P A1 A2 A3 A4 .
2nd case. Without loss of generality B1 , B2 , B3 form a triangle and B4
[B2 B3 ]. Then B4 A1 A2 A3 A4 .
3rd case. B1 , B2 , B3 form a triangle and B4 lies inside the triangle B1 B2 B3 .
Because B1 , B2 , B3 A4 , it follows that 4B1 B2 B3 A4 . Thus B4 4B1 B2 B3
and therefore B4 A1 A2 A3 A4 .
4th case. B1 , B2 , B3 , B4 form a quadrilateral. Let P be the intersection of the
diagonals, without loss of generality P = B1 B3 B2 B4 . Because P B1 B3 and
P B2 B4 , we have P A2 A4 and P A1 A3 . Thus P A1 A2 A3 A4 .
The base case is proved. Assume that the statment is true for all k n. To
prove it for n + 1 denote by Bi = Ai An+1 for 1 i n. Using the base case
of the induction we have Ai Aj Ak An+1 6= . Thus Bi Bj Bk 6= .
Using the induction hypothesis we conclude that A1 A2 . . . An+1 6= , and
we are done.
18

AMY 2007-2008

Awesome Sets

19

Example 3.1. Any two of finite number of polygons have a common point.
Prove that there is a line which has a common point with all these polygons.
Solution. Take any line g in a plane, and project all polygons onto g. We
get several segments any two of which have a common point. Using Hellys
Theorem we get that there is a point P belonging to all segments. It is clear
that the perpendicular to g through P intersects all polygons.
We continue to discuss convex sets that exist in R2 . Recall that for two
vectors v, w R2 the two-dimensional lattice generated by v, w is the set of
points {nv + mw | m, n Z}. For example we can have the unit square lattice
generated by v = (1, 0) and
w = (0, 1) or the unit triangular lattice generated

by v = (1, 0) and w = ( 12 , 23 ). The determinant of the two-dimensional lattice


generated by v, w is |v w|, or the area of the parallelogram defined by vectors
v, w.
The next notion that can be intuitively easily understood is a notion of
centro-symmetric convex set.
Definition. A convex set K is centro-symmetric, also called centrally symmetric, if it has a center O that bisects every chord of K through O (i.e. it is
symmetric with respect to O).
Theorem 3.2. Given a two-dimensional lattice with determinant , every
convex centrally-symmetric figure with respect to the origin that does not
contain a lattice point other than the origin. Then has the area at most 4.
(Minkowskis Theorem)
Proof. Let the area of be A. For every vector u from the lattice consider
the translation u of by vector 2u. If for u1 6= u2 figures u1 and u2
intersect, then both of them contain point u1 + u2 which also belongs to the
lattice. Indeed, 2u1 u1 , 2u2 u2 , and because they intersect it follows
that u1 + u2 , the midpoint of the segment which connects translated centers
also belongs to the intersection, as is centrally-symmetric. For a positive
integer n consider kv+lw with 0 k, l < n. From the previous observation
we get these figures are pairwise disjoint. The total area of constructed figures
is n2 A. On the other hand, they lie within a parallelogram of area at most
4n2 + cn, where c is a constant depending on (draw a picture to see this).
Taking n , we obtain A 4.
Remark. The theorem is true for any dimension n, replacing the constant
4 by 2n , being the n-dimensional volume of the basic n-dimensional parallelepiped of the lattice.
Here is a very nice application of this theorem:
Example 3.2. Let n > 1 be a positive integer. Consider a closed disk D
1
with center in the origin and radius n. One draws a disk of radius r = n1
19

AMY 2007-2008

Awesome Sets

20

around every lattice point (i.e. point with integer coordinates) in the disk.
Prove that every line through the origin intersects the disk.
Solution. Assume, for the sake of contradiction, that there is a line d
through O that does not intersect any of the disks. Consider the strip S formed
by the two lines d1 , d2 parallel to d, at distance r form d. Then the strip S must
not contain any of the lattice points of D. If d1 , d2 intersect the circumference
of D in points A, B, C, D then the rectangle ABCD must not contain any of
the lattice points, hence it must have area at most 4 by Minkowski Theorem,
because ABCD is clearly convex and centro-symmetric, while the determinant
of the lattice of points with integer coordinates if 1.However, as AC = BD =
2n, BC = AD = 2r, we conclude that AB = BC = 4n2 4r2 . Thus the area
of ABCD is
p
1
4 n2 r2 r > 4(n 1)
= 4,
n1
a contradiction.

20

AMY 2007-2008

Awesome Sets

21

Counting in two ways


Many of the results in combinatorics are obtained by counting the number
of elements of a set in two different ways, and comparing the results of these
two calculations. Here is a very simple example:
Example 3.3. There are n kids who send each other gifts. It is known that
n 1 of the kids have received as many gifts as they have sent. Prove that the
n-th kid has has received as many gifts as has sent, too.
Solution. Let us number the kids 1, 2, . . . , n and let ai , bi be the number of
gifts the kid i has sent, respectively received. Let us count the total number of
sent gifts. From one side, it is a1 + a2 + . . . + an , because each gift has been sent
exactly once, and from the other side it is b1 +b2 +. . .+bn , because each gift has
been received exactly once. Therefore a1 + a2 + . . . + an = b1 + b2 + . . . + bn (this
is the conclusion obtained from counting the number of gifts in two different
ways!). As we know a1 = b1 , a2 = b2 , . . . , an1 = bn1 , we conclude that
an = bn , and this means that the n-th kid has received as many gifts as has
sent.
Counting in two ways is best illustrated with the help of a matrix: We can
sum the entries of a matrix by considering the row sums and summing these
altogether, or by summing the column sums. This should give the same result.
Often for better understanding it is good to use this method, placing some values
in a table and summing over rows and columns to deduce a useful relation, like
in the example below.
Example 3.4. Let A1 , . . . , Ak be subsets of {1, 2, . . . , n}, each of them with
at least n2 elements, and such that for every i 6= j we have |Ai Aj | n4 . Prove
that
k

[
k


n.
Ai

k+1
i=1
Sk
Solution. Let B = i=1 Ai and m = |B|. Denote B = {b1 , . . . , bm } and
let xi be the number of subsets Aj in which bi appears. Clearly we have that
xi 1, because B is the union of all those subsets. Consider an m k table,
in which the intersection of row i with column j contains 1 if bi A and 0
m
X
otherwise. The sum of all the numbers in our table is
xi (summing by rows)
1

and it equals the sum of |Aj | (summing by columns.) We thus have the equality
S=

m
X
i

xi =

k
X
1

|Aj |

nk
.
2

(1)

In our table, let us calculate the number


of pairs of 10 s situated on the same
P
row. Summing by columns, this is i<j |Ai Aj |, but summing by rows we get
21

AMY 2007-2008

m  
X
xi
1

Awesome Sets

22

x2i xi
. Therefore,
2
m

X x2 xi
k(k 1) n X
i

|Ai Aj | =
.
4
2
2
1
i<j
P 2
X
P
( xi )
S2
But
x2i
=
(where S =
xi ) and thus the above inequality
m
m
becomes
s2 mS
S
nk(k 1)

=
(S m).
8
2m
2m
But (1) tells us that S nk
2 n > m and we can bound S from below with
the value obtained from (1). Therefore we get the desired


nk(k 1)
nk nk

m m(k 1) nk 2m
8
4m 2
k
n.
m(k + 1) nk m
k+1
Finally, we present a very hard problem from the Chinese Olympiad:
Example 3.5. Let A be a set with |A| = n, and let A1 , A2 , . . . , An be
subsets of A with |Ai | 2, 1 i n. Suppose that for each 2element subset
of A0 of A, there is a unique i such that A0 Ai . Prove that Ai Aj 6= for all
1 i < j n.
Solution. By the given conditions, we have

n 
X
|Ai |
2

i=1

 
n
=
.
2

(1)

Let A = {x1 , x2 , . . . , xn }, and let di denote the number of subsets Aj , 1 j n,


such that xi Aj . Hence
n
X

di =

i=1

n
X

|Ai |.

(2)

i=1

(double-count the pairs (xi , Aj ) such that xi Aj over xi and over Aj to get
this identity) On the other hand,

n 
X
|di |
i=1

|Ai Aj |.

1i<jn

(this follows by counting the number of pairs (x, Ai , Aj ) such that x Ai , x Aj


Pn |di |
in two ways: summing over x gives us
and over Ai , Aj gives us
i=1
2

22

AMY 2007-2008

Awesome Sets

23

1i<jn |Ai Aj |). By the conditions of the problem |Ai Aj | 1. It suffices


to prove that |Ai Aj | = 1, or


n 
X
|di |
2

i=1

 
n
=
.
2

By (1) and (2) and by the definition of the binomial coefficient


suffices to prove
n
n
X
X
d2i =
|Ai |2 .
(3)
i=1

x
2

x2 x
2 ,

it

i=1

For each xi , we consider the sets Aj such that xi


/ Aj . Let Aj = {y1 , y2 , . . . , ys }
be one such set. Since each of the 2element sets {xi , y1 }, {xi , y2 }, . . ., {xi , ys }
is a subset of a distinct set Ak (as yi and yj cannot both be in another set
again), di |Aj |. It follows that
|Aj |
di
.

n di
n |Aj |
Summing up all of the above inequalities yields
n
X

di =

n
X
X
i=1 j|xi A
/ j

i=1

n
X

j=1 i|xi A
/ j

n
X

n
X
X
di

n di
i=1

j|xi A
/ j

|Aj |
n |Aj |

|Aj |
n |Aj |

|Aj |.

j=1

By (2), all the equalities hold in the above inequalities. Hence di = |Aj |. It
follows that
n
X

(n di )di =

i=1

n
X
X

di =

i=1 j|xi A
/ j

i=1 j|xi A
/ j

n
X
X

n
X
X

|Aj |

j=1 i|xi A
/ j

n
X

(n |Aj |)|Aj |.

j=1

implying (3), as desired.

23

|Aj |

AMY 2007-2008

Awesome Sets

24

Look for the matrix!

The next trick that helps to solve some problems with sets is connected with
linear algebra. The main idea of it is to consider an incident matrix A for the
given subsets, usually of the set {1, 2, . . . , n}. The next step is to explore A At .
As you will see from linear algebra, from properties of ranks, determinants and
linear independency the desired conclusion might follow. This is more advanced
than the other parts of the presentation: the reader should be very familiar with
linear algebra.
First of all let us prove a technical result as a lemma that is pretty helpful
to solve these problems.
Lemma. Let a1 , a2 , . . . , an , x be real numbers. Prove that


a1
x
x x

x


a2
x x

1
1
1

x
x
a3 x = x(a1 x) (an x)
+
+ +
.

x a1 x
an x



x
x
x an
In case of division by zero we will consider the following sum as the answer:
(a1 x) (an x) + x(a2 x) (an x) + + x(a1 x) (an1 x).
Solution.

a1
x
x

x
a
x
2

x
x
a
3



x
x
x

a1

x(a1 x)
1

= x(a1 x) 1


1


x a1
x x
x = x

an x

x a1 x a1
a2 x
0

0
a3 x

0
0

1
1
a2 x
0
0
a3 x

0
0

a1
x(a1 x)
1

a2 x
= x(a1 x)(a2 x) (an x) a31x


1
an x

24


x a1
0
0 =

an x


1
0
0

an x

1
1
0

1
0
1


1

0
0

1

AMY 2007-2008

Awesome Sets

a1
x(a1 x) +



= x(a1 x)(a2 x) (an x)


1
a2 x +
1
a2 x
1
a3 x

= x(a1 x)(a2 x) (an x)

a1
x(a1 x)

= x(a1 x)(a2 x) (an x)

1
x

25

1
an x

1
an x

1
a1 x

1
a2 x

+ +

1
a2 x

0
1
0

1
an x

+ +

0
0
1


0

0
0

1

1
an x

We present you a few examples to give you idea how the stated method can
be used.
Example 3.6. Let X be a set of n 3 elements, and let A1 , . . . , Am ,
be proper subsets of X such that every pair of elements of X is contained in
precisely one set Ai . Then m n holds.
Solution. For x X let rx , be the number of sets Ai containing x. Note
that 2 r < m by the assumptions. Now if x 6 Ai , then rx Ai , because the
Ai sets containing x and an element of Ai , must be distinct. Suppose m < n,
then m|Ai | < nrx , and thus m(n |Ai |) > n(m rx ) for x 6 Ai , and we find
1=

X 1
X
=
n

xX

xX Ai :x6Ai

X X
X 1
1
1
>
=
= 1,
n(m rx )
m(n |Ai |)
m
Ai x:x6Ai

Ai

which is absurd.
Alternative Solution. Let B be the incidence matrix of (X; A1 , . . . , Am , ),
that is, the rows in B are indexed by the elements of X, the columns by
A1 , . . . , Am , where
(
1 if x A
BxA =
0 if x 6 A
Consider the product BB T . For x 6= x0 we have (BBT )xx0 = 1, since x and x0
are contained in precisely one set Ai , hence


rx1
1
1
1

1 rx2
1
1

1 rx3
1 > 0.
det(BB T ) = 1



1
1
1 rxn
It follows that BB T is invertible having rank(BB T ) = n. Thus the rank of the
n m matrix B is at least n, and we conclude that indeed n < m, since the
rank cannot exceed the number of columns.
25

AMY 2007-2008

Awesome Sets

26

Example 3.7. Let A1 , A2 , . . . , An and B1 , B2 , ..., Bn be the subsets of the


set {1, 2, . . . , n}, such that for all i and j, Ai and Bj have exactly one common
element and for all nonempty subsets T of {1, 2, ..., n}, there exists i such that
the intersection of Ai and T has an odd number of elements. Prove or disprove
that B1 = B2 = . . . = Bn .
Solution. Consider the matrices aij = 1jAi and bij = 1iBj and observe
that the hypothesis says precisely that AB = R, where R is the matrix having
P everywhere 1. On the other hand, the hypothesis says that the system
j aij xj = 0 has no nontrivial solution in the field Z2 , thus A is invertible over
Z2 . But then B = A1 R and so all elements in any line of B are equal. But
this means precisely that B1 = B2 = . . . = Bn .

26

AMY 2007-2008

Awesome Sets

27

Easy Problems
E1. Mr. and Mrs. Zeta want to name their baby Zeta so that its monogram
(first, middle, and last initials) will be in alphabetical order with no letters
repeated. How many such monograms are possible?
E2. Find the number of all nonempty subsets of the set Sn = {1, 2, . . . , n} which
do not contain two consecutive integers. [Hint: Look for an Italian name!]
E3. How many triples of nonnegative integers (a, b, c) are there such that
0 a b c n?
E4. Let S be a set of 7 points such that, in any 3-subset of S, there are at least
two points with distance less than 1. Prove that there exists a 4-subset of
S which can be covered by a disk of radius 1.
E5. Seven kids write Christmas postcards to each other. Is it possible that
every kid sends one postcard and receives two, or sends two postcards and
receives one?
E6. For how many pairs of consecutive integers in the set
{1000, 1001, . . . , 2000}
is no carrying required when the two integers are added ?
E7. Let S be a set with six elements. In how many different ways can one
select two not necessarily distinct subsets of S so that the union the two
subsets is S? The order of selection does not matter; for example the
pair of subsets {a, c}, {b, c, d, e, f } represents the same selection as the pair
{b, c, d, e, f }, {a, c}.
E8. How many kelement subset of [n] contain no two consecutive integers?
E9. Let S be a set of n integers. Prove that S contains a subset such that sum
of its elements is divisible by n.
S S
E10. In how many ways can {1, 2, 3, . . . , n} be written as A B C, where A
B = B C = A C = ?
E11. Consider S = {1, 2, 3, 4, 5, 6, 7, 8, 9}. Prove that for any subset, A, of S,
at least one of the sets A and S\A contains three elements in arithmetic
progression.
E12. Fifty segments are given on a line. Prove that some eight of the segments
have a common point, or eight of the segments are pairwise disjoint.

27

AMY 2007-2008

Awesome Sets

28

E13. Let F be a set of subsets of the set {1, 2, . . . , n} such that


a) if A is an element of F, then A contains exactly three elements;
b) if A and B are two distinct elements in F, A and B share at most one
common element.
Let f (n) denote the maximum number of elements in F. Prove that
f (n)

n(n 1)
.
6

E14. Prove that from ten distinct two-digit numbers, one can always choose two
disjoint nonempty subsets, so that their elements have the same sum.
E15. Eleven teachers run a conference. Every hour, one or more teachers give a
one-hour presentations, while all of the other teachers observe the presentations. (If one chooses to observe a presentation, then he has to observe
it for the whole period.) Find the least amount of time during which it is
possible for each teacher to observe all other presentations at least once.
E16. The set {1, 2, . . . , 16} is partitioned into three sets. Prove that it is possible
to find numbers x, y, z (not necessarily distinct) in one of those sets such
that x + y = z.
E17. Let A be a set with n elements. Prove that
X
|Ai Aj | = n 4n1 .
Ai ,Aj A

E18. What is the greatest number of elements can have a subset A of a set
{1, 2, . . . , 2n} with the property for every two different elements x, y A
we have n - x + y.
E19. Prove that the number of binary sequences of length n that contain exactly
m pairs of consecutive equal numbers is equal to the number of binary
sequences of length n that contain exactly m pairs of consecutive different
numbers.
E20. Let n be an even integer. Let a1 , a2 , . . . , an and b1 , b2 , . . . , bn be permutations of the set {1, 2, . . . , n}. Prove that a1 + b1 , a2 + b2 , . . . , an + bn taken
modulo n cannot be a permutation of {1, 2, . . . , n}.

28

AMY 2007-2008

Awesome Sets

29

Medium Problems
M1. Let X be a nonempty set having n elements. Find the greatest number
of colors such that no matter we color each subset of X in one color there
will exist two distinct subsets A, B of X such that the sets A, B, A B,
A B have the same color.
M2. For {1, 2, . . . , n} and each of its nonempty subsets a unique alternating
sum is defined as follows: Arrange the numbers in the subset in decreasing
order and then, beginning with the largest, alternately add and subtract
successive numbers. (For example, the alternating sum for {1, 2, 4, 6, 9}) is
9 6 + 4 2 + 1 = 6 and for {5} is is simply 5.) Find the sum of all such
alternating sums for n = 7.
M3. Let d(n) denote the number of divisors of n. Prove that
2008
2008
X
X  2008 
.
d(i) =
i
i=1
i=1
S
M4. There are five regions in the plane, A1 , A2 , A3 , A4 , A5 such that Ai has
area at most 1, while each of the Ai has T
area at least 12 . Prove that there
are two distinct indices i, j such that Ai Aj has area at least 15 .
M5. Consider the set M = {1, 2, 3, . . . , 2008}. Prove that in any way we choose
the subset X with 15 elements of M there exist two disjoint subsets A and
B in X such that the sum of the members of A is equal to the sum of the
members of B.
M6. Let A and B be disjoint sets whose union is the set of positive integers.
Prove that for every positive integer n there exist distinct a, b > n such
that
{a, b, a + b} A
or
{a, b, a + b} B.
M7. There are n points in the plane such that any three of them can be covered
by a disk of radius 1. Prove that all of them can be covered by a disk of
radius 1.
M8. Given a set A with n2 elements, n 2, and F a family of subsets of A each
of which has n elements, suppose that any two sets of F have at most one
element in common. Prove that there are at most n2 + n sets in F.
P
T T
M9. Find the sum A,B,C |A B C|, where the sum is taken over all subsets
A, B, C of the set {1, 2, . . . , n}
M10. Prove that for every set X = {x1 , x2 , . . . , xn } of real numbers, there exist
a non-empty subset S of X and an integer m such that



X
1

s
.
m +

n+1
sS

29

AMY 2007-2008

Awesome Sets

30

M11. Find the number of nondecreasing functions f : [n] [n] that satisfy
f (k) k for k = 1, 2, . . . , n.
M12. Find all positive integers n such that the set
A = {1, 3, 5, . . . , 2n 1}
can be partitioned into 12 subsets, the sum of elements in each subset being
the same.
M13. We have n sets of even cardinality, such that the intersection of at least
two of these sets always has odd cardinality. Prove that their union has at
least n + 1 elements, and show an example that achieves the bound n + 1.
M14. The set {1, 2, 3, . . . , 2n} is divided into two disjoint subsets A and B such
that |A| = |B| = n. Let A = {a1 , a2 , . . . , an } and B = {b1 , b2 , . . . , bn }
such that a1 < a2 < . . . < an and b1 > b2 > . . . > bn . Prove that
|a1 b1 | + + |an bn | = n2 .
M15. A triple of different subsets Si , Sj , Sk of a set with n elements is called a
triangle. Define its perimeter by
|(Si Sj ) (Sj Sk ) (Sk Si )| .
Prove that the number of triangles with perimeter n is

1 n1
(2
1)(2n 1).
3

M16. Consider a set of n real numbers. One forms sums of three distinct
numbers from this set. Prove that one can obtain at least 3n 8 different
sums, and characterize all sets for which exactly 3n 8 distinct sums can
be obtained.
M17. Let n be an integer greater than 1 and let X be a set with n + 1 elements.
Let A1 , A2 , . . . , A2n+1 be subsets of X such that the union of any n has at
least n elements. Prove that among these 2n + 1 subsets there exist three
such that any two of them have a common element.
M18. Let A, B be finite sets of at integers, each containing at least two elements,
such that the set A + B has exactly |A| + |B| 1 elements. Prove that A
and B are arithmetic progressions with the same difference.
n

M19. Let n be a positive integer. Prove that the set {2, 3, . . . , 22 1} can be
partitioned into n subsets with the property that none of them contains
two elements such that one is an integer power of the other, but the set
n
{2, 3, . . . , 22 } cannot.
M20. Let X be a set with n elements and let A1 , A2 , . . . , Am be three element
subsets of X such that |Ai Aj | 1 for i 6= j. Prove that there exist a
subset A of X with at least 2n elements containing none of the Ai .

30

AMY 2007-2008

Awesome Sets

31

Hard Problems
H1. Let A be a nonempty set and let f : P(A) P(A) be an increasing function
on the set of subsets of A, meaning that
f (X) f (Y ) if X Y.
Prove that there exist T , a subset of A, such that f (T ) = T .
H2. Let X = {x1 , x2 , . . . , xn }, n 2 be a set of positive integers. Prove that
2n
subsets of X, whose sum of elements is equal
there exist no more than
n
to 1.
H3. Let T be the set of all positive integer divisors of 2004100 . What is the
largest possible number of elements that a subset S of T can have, if no
element of S is an integer multiple of any other element of S?
H4. The plane is covered with k halfplanes. Prove that we can choose three
halfplanes from those k such that they still will cover the entire space.
[Hint: Halfplanes are convex sets!]
H5. Let n be an odd integer greater than 1 and let c1 , c2 , . . . , cn be integers.
For
Pn each permutation a = (a1 , a2 , . . . , an ) of {1, 2, . . . , n} define S(a) =
i=1 ci ai . Prove that there exist permutations a 6= b of {1, 2, . . . , n} such
that
n! | S(a) S(b).
H6. Suppose we have some intervals on a real line, such that for any k of them
there are two whose intersection is non empty. Prove that there exist k 1
points in R such that any of these intervals contains one of these points.
[Hint: use Dilworth Theorem]
H7. Let Sa be the set of numbers of the form bnac for some positive integer
n. Prove that if a, b, c are positive real numbers, then the sets Sa , Sb , Sc
cannot be disjoint.
H8. The set {1, 2, . . . , 3n} is partitioned into three sets A, B, and C with each
set containing n numbers. Prove that it is always possible to choose one
number out of each set so that one of those numbers is the sum of the other
two.
H9. Let n 2 be a positive integer and let S be a set of 2n+1 elements. Let f be
a function from the set of two-element subsets of S to {0, 1, . . . , n 1}. Assume that for any elements x, y, z of S, one of f ({x, y}), f ({y, z}), f ({z, x})
is equal to the sum of the other two. Prove that there exist a, b, c in S such
that f ({a, b}), f ({b, c}), f ({c, a}) are all equal to 0.

31

AMY 2007-2008

Awesome Sets

32

H10. Let n 3 be an integer and X {1, 2, . . . , n3 } a set of 3n2 elements. Prove


that one can find nine distinct numbers a1 , a2 , . . . , a9 in X such that the
system
a1 x + a2 y + a3 z = 0
a4 x + a5 y + a6 z = 0
a7 x + a8 y + a9 z = 0
has a solution (x0 , y0 , z0 ) in nonzero integers.
H11. Let n 6=4 be a positive integer. Consider a set S {1, 2, . . . , n} with
|S| > n2 . Prove that there exist x, y, z S with x + y = 3z.
H12. Let P1 , . . . , Pn be distinct 2-element subsets of {1, 2, . . . , n} such that if
Pi Pj 6= 0; then {i, j} = Pk for some k. Prove that every one of the ai s
appears in exactly 2 of the Pj s.
H13. Find the number of even permutations of the set {1, 2, . . . , n} that do not
have fixed points.
H14. Let S be a set with 2008 elements, and let N be an integer with 0 N
22008 . Prove that it is possible to color every subset of S either black or
white so that the following conditions hold:
(a) the union of any two white subsets is white;
(b) the union of any two black subsets is black;
(c) there are exactly N white subsets.
H15. Find the number of subsets of {1, 2, . . . , 2000}, the sum of whose elements
is divisible by 5.
H16. Let n be an even integer and let A1 , A2 , . . . An be the subset with even
number of elements from the set {1, 2, . . . , n}. Prove that there exist i and
j such that |Ai Aj | is an even number.
H17. Let m and n be positive integers and S be a subset with (2m 1)n + 1
elements of the set {1, 2, 3, . . . , 2m n}. Prove that S contains m + 1 distinct
numbers a0 , a1 , . . . , am such that ak1 | ak for all k = 1, 2, . . . , m.
H18. Prove that the set of numbers {1, 2, 3, . . . , 2008} can be colored with two
colors such that any of its arithmetic progressions with 18 terms contains
both colors.
H19. Let A1 , A2 , . . . , An+1 be distinct subsets of the set {1, 2, . . . , n}, each of
which having exactly three elements. Prove that there are two distinct
subsets among them that have exactly one point in common.
H20. Let p > 2 be a prime number and A = {1, 2, . . . , 2p}. Find the number of
subsets of A, each having p elements and the sum of the elements divisible
by p.

32

Vous aimerez peut-être aussi