You are on page 1of 7

MT2504 Combinatorics & Probability

Louis Theran
Week 2: The pigeonhole principle, double counting,
graphs

1. Main questions
These questions hit a selection of topics and are interesting. If there
are no requests, we will start with these in examples class, so try them
first.
You don’t need to hand anything in.
A 1. Suppose that we have a number of subsets of the set {1, . . . , 8}, and that
they satisfy both of the following properties:
• each subset has precisely four elements; and
• each element of {1, . . . , 8} belongs to exactly three subsets.
(a) How many subsets are there?
(b) Write down a collection of subsets which satisfies the conditions.
(c) Is it possible to find a collection of 3-element subsets of {1, . . . , 8} such
that every element belongs to exactly five subsets?
(a) Let A1 , . . . , Ak be the sets. Let us count the set S of ‘‘incidences’’
(x, Ai ) with x ∈ Ai in two ways. For each 1 ≤ x ≤ 8, we have rx (x) =
3 by the given information. For each Ai we have ry (Ai ) = |Ai | =
4. Hence 24 = 4k or k = 6.
(b) Here is one way

{{1, 2, 3, 4}, {1, 2, 5, 6}, {1, 2, 7, 8}, {3, 4, 5, 6}, {3, 4, 7, 8}, {5, 6, 7, 8}}.

There are others (a nicer one is the faces of the cube).


(c) No. Counting incidences like in (a) would give us ‘‘40 = 3k’’,
but k has to be an integer.

A 2. (a) 10 points are placed in a square with side length 1. Show that for
any
√ such set of 10 points, at least one pair of points is distance at most
2/3 apart.
(Hint: divide the square into a 3 × 3 grid and use the pigeonhole prin-
ciple.)
(b) Find an upper bound on the number n such that for any set of n points
in the square of side length one, at least 10 of the points lie inside a
circle of radius 1/10.
(a) Divide the square into a 3×3 grid. Now we have 9 smaller squares
of side length 1/3. If two points are in the same small square,

elementary geometry says they are within 2/3 of each
√ other. The
diagonal of a square of side length 1/3 has length 2/3, and this
is the diameter of a circle containing the vertices the square.
The Pigeonhole Principle says this has to happen, since there are
10 > 9 points and 9 squares.
(Comment: when we formulated the PHP, we didn’t insist that the
pigeons be in only one hole. This is an example of where that’s
useful: points on the shared boundary of a square make our job easier.)
(b) A number that works is 577. I didn’t optimize it, so you might
have a smaller number. The question only asks for ‘‘an’’ upper bound.
Here is the idea. We don’t know anything about the points other
than that there’s a lot of them. Trying to find the ‘‘right’’ circle
for every point set seems quite difficult. So we will instead turn
things around and find a fixed collection of N circles of radius
1/10 that cover the square, and then just ask for n = 9N +1. The
PHP finishes. Now the task is to find N .
2
Let us divide the square into a k×k√grid. Each of the √ k smaller
squares
√ is in a circle of diameter 2/k, or radius 1/ 2k. Since
8 2 > 10, we can take k = 8. √
We have covered the unit square with N = 64 circles of radius 1/(8 2) <
1/10. If we have n = 9 · 64 + 1 = 577 points in the unit square,
the PHP says that at least one of these circles has 10 of the points
in it.
(If√we are very picky, one last thing to do is expand our radius
1/8 2 circles to have radius 1/10. This doesn’t change the analysis
above.)

A 3. Let V be a set of size nr that is partitioned into r sets Vi of size n. Define


Tn,r to be the graph with vertices V and edges between ever pair of vertices
not in a common Vi ; i.e,
{x, y} is an edge ⇐⇒ x ∈ Vi , y ∈ Vj and i 6= j
(a) Draw a picture of T2,2 and T3,2 .
(b) How many edges does Tn,r have?
(c) Show that among any r + 1 vertices, at least one pair of them is not
connected by an edge in Tn,r) .
(a) TBD.
(b) Every vertex has degree n(r−1), since it is connected to every
vertex except the n in its part. There are nr vertices, so by handshaking
2
the number of edges is 21 n2 r(r − 1) = (nr)
2
(1 − 1/r).
(Comment: handshaking is especially useful when all the vertices
have the same degree, which is what happened here.)
(c) By the PHP, at least two of the vertices are in the same Vi .
These won’t be connected by an edge.

A 4. (a) Construct a graph with 5 vertices and 6 edges that is triangle free.
(b) Does there exist a graph with 5 vertices and 7 edges that is triangle free?
(a) Take V = {1, 2, 3, 4, 5} and

E = {{1, 2}, {2, 3}, {3, 4}, {1, 4}, {1, 5}, {3, 5}}

You can see that it has no triangle by a case analysis.


(b) No. 7 > 52 /4. Mantel’s Theorem tells us that we can’t have
this many edges in a triangle free graph.

A 5. Is it possible to relabel the vertices of the graph on the right so that it


becomes the same as the one on the left?
No. One is triangle free and the other isn’t.

2. More questions
These questions develop the content from this week further. Try them if you’ve
finished the other ones and use them to revise.
Questions about graphs

B 1. Show that every graph has two vertices of the same degree.
Answer 1: We did this in the notes using the PHP when we called
graphs ‘‘knowing people’’.
Answer 2: Suppose that a graph G has n vertices v1 , . . . , vn , and that
their degrees are all different. Then the degrees must be 0, 1, . . . , n−
1 in some order. Without loss of generality, assume that v1 has
degree 0 and vn has degree n − 1. Since V1 has degree 0, {v1 , vn }
is not an edge. But this contradicts the assumption that vn has
degree n − 1.

B 2. The complement of a graph G = (V, E) is the graph with vertex set V


and an edge {x, y} ⇐ {x, y} ∈
/ E.
(a) If G has n vertices and m edges, how many edges does its complement
have?
(b) Describe the complement of the complete bipartite graph K5,5 .
(c) If a graph G has n vertices, how many edges must it have to ensure that,
among any three vertice x, y, z, at least two are connected by an edge?
(a) Let G have n vertices. Then the complement of G has the edges
E(Kn )\E. Since Kn has n(n−1)/2 (for later n2 ) edges, the complement
has n(n − 1)/2 − |E| edges.
(b) This is two copies of K5 that don’t share any vertices.
(c) This is the same as saying that the complement is triangle free.
By Mantel’s Theorem, the complement has at most n2 /4 edges. Hence
G has at least n(n − 1)/2 − n2 /4 edges.

B 3. Suppose that G = (V, E) is a bipartite graph with V paritioned into A


and B. Show that that the number of edges m in G is
X X
m= δ(A) = δ(b)
a∈A b∈B

Because a is bipartite, every edge {x, y} has one endpoint in A and


the other in B. Let us write edges as {a, b} with the natural identification.
There are two natural ways to proceed from here.
Answer 1: use handshaking as is
We have ! !
X X X
0= (1 − 1) = δ(a) − δ(b)
{a,b}∈E a∈A b∈B

By handshaking,
! !
X X X
2m = δ(x) = δ(a) + δ(b)
x∈V a∈A b∈B

Since the two sums on the right are equal, they must both be m.
Answer 2: adapt the proof of handshaking
Every edge has exactly one endpoint in a. Hence
X X
m= |{y : {x, y} is an edge}| = δ(a)
x∈A a∈A

For B this is similar.

Questions about the PHP

C 1. Suppose that G is a graph with 2504 vertices and the property that among
any three vertices, at least one pair of them is connected by an edge. Show
that there is a vertex of degree at least 1251.
Answer 1: If every edge is present, then every vertex has degree
2503 and there is nothing to do. Otherwise, let x and y be vertices
that do not make an edge. Each of the remaining 2502 vertices is
connected to at least one of x and y. One of these is then connected
to at least 1251 by the PHP.
Answer 2: You can also do this using a previous exercise to show
that this graph has a lot of edges and then use handshaking. (The
algebra is a little messier.)

C 2. Suppose that there are 1413 points in the plane so that among any three,
at least one pair of them is at distance at most one from each other. Show
that at least 707 of these points lie in a circle of radius one.
This is, essentially, the same problem as the previous exercise.
Let’s imagine that there are n points x1 , . . . , xn with the given property.
Make a graph with an edge {xi , xj } iff d(xi , xj ) ≤ 1 (here d is the
Euclidean distance).
We can apply the previous exercise to this graph to conclude that
some vertex xi has degree at least
 
n−2
∆(n) =
2
Then xi and all its neighboring vertices are inside the circle of
radius one around xi . For n = 1413, ∆(n) + 1 = 707.

C 3. Suppose that there are 1413 cities, each pair at a distinct distance from
the others. From each city, a tourist visits the most distant city from their
own. Show that some city is unvisited.
(Hint: try this for 3 cities first.)
Following the hint, we start with three cities C1 , C2 , C3 . We may
as well assume that C1 and C2 are farthest apart. Then the tourist
from C1 visits C2 and vice versa. Hence noody visits C3 .
Let’s use this as the basis of an induction to show the statement
for all odd numbers. We have cities C1 , . . . , C2n+1 where all the distances
are distinct. As before, we assume that the maximium over all distance
is between C1 and C2 , so that the tourist from C1 visits C2 and
vice versa. There are now two things that can happen:
(A) If the tourist from some Cj with j ≥ 3 visits C1 or C2 , then
the remaining 2n − 1 cities are visited by 2n − 2 tourists. One
of them must be unvisited.
(B) None of the other tourists visit C1 or C2 . In this case, we
have 2n − 1 cities all at distinct distances whose tourists vist
each other. By the IH, one of these is unvisited.
The two cases close the induction. Since 1413 is odd, we are done.

Questions about double counting


D 1. In a student club, with 30 members, every commitee has three members
and every member is on three committees. How many committees are there?
30. This is easy.

D 2. There are 1413 boys and 1413 girls studying in the faculty of science.
Each student joins at most 64 clubs and every boy and girl are in at most
one student society together.
Must there be a club with at least 9 boys and at least 9 girls in it?
Yes. Let us consider the set of triples
S = {(b, g, s) : boy b and girl g are in soc. s}
Since fixing b and g determines zero or one s, we have |S| ≤ 14132 .
Now, assume for a contradiction, that every society has at most 8
boys. Then the total number of (b, s) pairs where boy b is in society
s is at most 1413 · 64 · 8. A similar argument works for girls.
Since fixing b and s determines g for any (b, g, s) ∈ S, we get
14132 ≤ |S| ≤ 2 · 1413 · 64 · 8 = 1413 · 1024
This is a contradiction, so there must be a society with at least
9 boys and 9 girls.

D 3. Let a1 , . . . , an be distinct numbers. For indices 1 ≤ i1 < i2 < · · · < ik ≤ n,


the subsequence ai1 , ai2 , . . . , aik is called increasing if ai1 < ai2 < · · · < aik
and otherwise decreasing if ai1 > ai2 > · · · > aik .
For each 1 ≤ j ≤ n let uj be the length of the longest increasing subsequence
ending at aj (i.e., ik = j). Let `i be the length of the longest descreasing
subsequence ending at j.
(a) For the sequence a1 = 7, a2 = 8, a3 = 9, a4 = 4, a5 = 5, a6 = 6, a7 =
1, a8 = 2, a9 = 3, compute the pairs (uj , `j ) for 1 ≤ j ≤ 9.
(b) Show that the pairs (uj , `j ) are all different.

(c) Show that there is always either√an increasing subsequence of length n
or a descreasing one of length n.
[ This is a hard problem. ]
(a) In order they are (1, 1), (2, 1), (3, 1), (1, 2), (2, 2), (3, 2), (1, 3), (2, 3), (3, 3).
(b) Let j < m. If aj > am , then any decreasing sequence ending
at aj can be extended to one that one longer and ends at am , so `j <
`m . Otherwise an increasing sequence ending at aj can be extended
to a longer one ending at am so uj < um . Either way, the pairs
(uj , `j ) and (um , `m ) can’t be the same.
(c) Let P ⊆ {1, . . . , n} be the collection of the uj from (b) and Q
be the set of `j .
The largest numbers p and q appearing in P and Q are the lengths
of the longest inceasing and decreasing subsequences.
Certainly |P | ≤ p and |Q| ≤ q.
The set S of pairs from B is √ a subset of P ×Q. Hence n ≤ |P ||Q| ≤

pq. By AM-GM p√+ q ≥ 2 pq ≥ 2 n. It follows that one of p and
q is at least n.
Comment: the example in (a) is as badly as we can do, since S =
P × Q.

D 4. Let X be a set of size n and H = {A1 , . . . , Am } be a set of subsets of size


∈ X, define γ(x) to be the number of 1 ≤ j ≤ m so that x ∈ Aj .
k. For x P
What is x∈X γ(x)?
It is km. The proof is nearly identical to that of the handshaking
lemma. Look at pairs (x, Aj ) where x ∈ Aj . Each Aj contributes
k and each x contributes γ(x). We get
X
γ(x) = k|H| = km
x∈X

You might also like