Académique Documents
Professionnel Documents
Culture Documents
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
AMY 2007-2008
Awesome Sets
AMY 2007-2008
Awesome Sets
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
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
2n
2n
2n
1
=
n+1 n
n
n+1
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
A2
...
An | =
n
X
|Ai |
i=1
|Ai
Aj | + . . . +
1i<jn
+ (1)k1
|Ai1
Ai2
...
Aik | + . . .
+ (1)n1 |A1
...
An |
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
1
(n) 2n2 + (1)k p1 pk .
6
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
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
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 =
AMY 2007-2008
Awesome Sets
|Ai |
|Ai
Aj | + . . . =
1004
X
k1
(1)
k=1
1004 k 2008k
5 10
.
k
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
(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
|S|
X
tk !(n tk )!
k=1
Thus |S|
n
bn
2c
n!
11
|S|
X
1
k=1
n
bn
2c
n
tk
, we obtain
|S|
.
n
bn
2c
AMY 2007-2008
Awesome Sets
12
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
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
17
AMY 2007-2008
Awesome Sets
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
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
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)
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)
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
22
AMY 2007-2008
Awesome Sets
23
n
X
|di |
2
i=1
n
=
.
2
x
2
x2 x
2 ,
it
i=1
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
23
|Aj |
AMY 2007-2008
Awesome Sets
24
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
a1
x(a1 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
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
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
32