Beruflich Dokumente
Kultur Dokumente
Chapter 2 Counting
1 / 127
Overview
1
Geometric series
Arithmetic series
Sets
Union, intersection & complement
Principle of inclusion & exclusion
Examples
Counting principles
Addition principle
Multiplication rinciple
Pigeonhole Principle
Chapter 2 Counting
2 / 127
Geometric series
Chapter 2 Counting
3 / 127
Geometric series
Theorem
The value of a geometric series is given by the formula
a + ar + ar 2 + ar 3 + + ar n =
Chapter 2 Counting
a(r n+1 1)
.
r 1
4 / 127
Proof. Let
Sn = a + ar + ar 2 + ar 3 + + ar n .
(1)
rSn = ar + ar 2 + ar 3 + ar 4 + + ar n+1 .
(2)
Then,
Chapter 2 Counting
5 / 127
Geometric series
Example (Tower of Hanoi)
There are three vertical poles A, B, C . Five circular slabs of different radii
and each with a hole in the centre rest on top of each other as shown in
the figure below. What is the minimum number of steps needed to
transfer all the slabs to pole B if at each step no slab is allowed to rest on
top of a smaller slab in the same pole?
Chapter 2 Counting
6 / 127
Geometric series
Solution.
Suppose there are only 2 slabs.
We need minimum number of 3 steps:
Move the top (smallest) slab to pole C ;
Move the bottom (larger) slap to pole B;
Move the smaller slab from pole C to pole B.
Let an be the minimum number of steps required to move a tower of n
slabs. Then
a2 = 3.
Chapter 2 Counting
7 / 127
Geometric series
Chapter 2 Counting
8 / 127
Geometric series
Chapter 2 Counting
9 / 127
Geometric series
In our case, n = 5, so
a5 = 1 + 2a4
= 1 + 2(1 + 2a3 )
= 1 + 2 + 22 a3
= 1 + 2 + 22 (1 + 2a2 )
= 1 + 2 + 2 2 + 2 3 a2
= 1 + 2 + 22 + 23 (1 + 2a1 )
= 1 + 2 + 22 + 2 3 + 2 4
1(25 1)
=
21
= 31.
Chapter 2 Counting
10 / 127
Arithmetic series
Chapter 2 Counting
11 / 127
Arithmetic series
T1 = 1
T2 = 1 + 2 = 3
T3 = 1 + 2 + 3 = 6
T4 = 1 + 2 + 3 + 4 = 10
Chapter 2 Counting
12 / 127
Arithmetic series
Theorem
The triangular number Tn is given by
1
Tn = 1 + 2 + 3 + + n = n(n + 1).
2
Chapter 2 Counting
13 / 127
Arithmetic series
Proof.
We rearrange the terms:
Tn = 1 + 2
+ + n 1 + n
Tn = n + n 1 + + 2
+1
Adding them:
2Tn = n(n + 1)
n(n + 1)
Tn =
2
Chapter 2 Counting
14 / 127
Arithmetic series
The number a is called the first term and the number d is called the
common difference of the arithmetic series.
The triangular number Tn is the arithmetic series with
a = d = 1.
Chapter 2 Counting
15 / 127
Arithmetic series
Theorem
The sum of an arithmetic series is given by
a + (a + d) + (a + 2d) + + (a + nd) =
Chapter 2 Counting
(n + 1)(2a + dn)
.
2
16 / 127
Arithmetic series
Proof.
a + (a + d) + (a + 2d) + + (a + nd)
= (a + + a) + d(1 + 2 + + n)
= (n + 1)a + dTn
n(n + 1)
= (n + 1)a + d
2
(n + 1)(2a + dn)
=
2
Chapter 2 Counting
17 / 127
Arithmetic series
Proof.
Alternatively, we rearrange the terms:
An =
(a)
(a + d)
+ + (a + nd)
An = (a + nd) + (a + (n 1)d) + +
Adding them:
Chapter 2 Counting
18 / 127
Arithmetic series
Example
1 + 3 + 5 + + (2n 1) = n2 .
1 + 4 + 7 + + (3n 2) = 12 n(3n 1).
Chapter 2 Counting
19 / 127
Arithmetic series
Example
Draw n lines in the plane.This will form a number of mutually
non-overlapping region in the plane. What is the maximum number of
such regions that can be formed?
Chapter 2 Counting
20 / 127
Solution.
n
= 0 1 2 3 4 ...
Regions = 1 2 4 7 11 . . .
Plus
1 2 3 4 ...
Chapter 2 Counting
n
?
n
21 / 127
Here is an explanation.
Say when you have 2 lines and want to add a third line. This new third
line intersects the existing lines and is divided into 3 segments. Each
segment slices an existing region into 2 and thus we get 3 addition regions.
Now if you n 1 lines and you want to add the nth line. This new line is
divided into n segments and thus we have n additional regions.
Chapter 2 Counting
22 / 127
1 + 1 + 2 + 3 + 4 + + n = 1 + (1 + 2 + + n)
1
= 1 + n(n + 1)
2
1 2
=
(n + n + 2).
2
Chapter 2 Counting
23 / 127
Sets
Chapter 2 Counting
24 / 127
Sets
The items in a set are often referred to as elements or members of the
set.
Sets are often denoted by uppercase letters like A, B, C etc.
25 / 127
Sets
Chapter 2 Counting
26 / 127
Sets
Definition (Union)
The union of sets A and B is the set whose elements are precisely those
belong to A or B. Symbolically, we denote the union by A B:
A B = {x : x A or x B}.
We can perform the union operation repeatedly to obtain A B C , etc.
Chapter 2 Counting
27 / 127
Sets
Example
If A = {a, b, c} and B = {b, c, d, e}, then
A B = {a, b, c, d, e}.
Chapter 2 Counting
28 / 127
Sets
Definition (Intersection)
The intersection of sets A and B is the set whose elements are precisely
those belong to A and B. Symbolically, we denote the intersection by
A B:
A B = {x : x A and x B}.
We can perform the intersection operation repeatedly to obtain A B C
etc.
Chapter 2 Counting
29 / 127
Sets
Definition
We say that the sets A and B are disjoint if
A B = .
Chapter 2 Counting
30 / 127
Sets
We can use Venn diagrams to visualise the union and intersection of sets:
Chapter 2 Counting
31 / 127
Sets
(Distributive law)
A A = A, A A = A (Idempotent laws)
A = A, A =
Chapter 2 Counting
32 / 127
Sets
Example
Give examples of sets A, B, C such that
(A B) C 6= A (B C ).
Solution. Take
A = {1, 2, 3}, B = {2, 5}, C = {3, 5}.
Then
(A B) C = {3, 5}.
A (B C ) = {1, 2, 3, 5}.
Chapter 2 Counting
33 / 127
Sets
Definition (Subset)
If every element of A is also an element of B, then we say that A is a
subset of B.
Symbolically, we write
A B.
Chapter 2 Counting
34 / 127
Sets
A.
For sets A, B,
A A B, A B A.
If A B, then
A B = B, A B = A.
Chapter 2 Counting
35 / 127
Sets
Definition (Complement)
Suppose S is the given universal set, and A S. Then the complement
of A, denoted by Ac , is the set consisting of all the elements of S which
are not in A. That is
Ac = {x S : x 6 A}.
By definition,
A Ac = S, A Ac = .
Chapter 2 Counting
36 / 127
Sets
Chapter 2 Counting
37 / 127
Chapter 2 Counting
38 / 127
Example
At Dunman High School there are
28 students in algebra class,
30 students in biology class, and
8 students in both classes. How many students are in either algebra
or biology class?
Chapter 2 Counting
39 / 127
Solution. Let
A = set of students in algebra class
B = set of students in biology class
Then
|A B| = |A| + |B| |A B| = 28 + 30 8 = 50.
Chapter 2 Counting
40 / 127
Chapter 2 Counting
41 / 127
Proof.
|A B C | = |(A B) C |
= |A B| + |C | |(A B) C |
Chapter 2 Counting
(3)
42 / 127
|A B| = |A| + |B| |A B|
(4)
|(A B) C | = |(A C ) (B C )|
= |A C | + |B C | |(A C ) (B C )|
= |A C | + |B C | |(A B C |
(5)
Chapter 2 Counting
43 / 127
Chapter 2 Counting
44 / 127
Solution. Let
A = set of students in algebra class
B = set of students in biology class
C = set of students in chemistry class
Then
|A B C | = 55
|A| = 28, |B| = 30, |C | = 24
|A B| = 8, |B C | = 16, |A C | = 5.
Chapter 2 Counting
45 / 127
|A B C | = |A| + |B| + |C | |A B| |A C | |B C | + |A B C |.
|A B C | = |A B C | |A| |B| |C |
+|A B| + |A C | + |B C |
= 55 28 30 24 + 8 + 16 + 5
= 2.
There are 2 students who attend all three classes.
Chapter 2 Counting
46 / 127
|A B C D| =
|A| + |B| + |C | + |D|
|A B| |A C | |A D| |B C | |B D| |C D|
+|A B C | + |A B D| + |A C D| + |B C D|
|A B C D|.
Chapter 2 Counting
47 / 127
Solution.
By PIE for 2 sets,
|(A B C ) D| = |A B C | + |D| |(A B C ) D|
Chapter 2 Counting
48 / 127
Chapter 2 Counting
49 / 127
PIE: Examples
Example
A pavement was tiled by 80 parallel slabs of tiles. A cat walked along the
pavement and at every fifth tile other than the first) i.e. at tiles numbered
5, 10, 15, ..., it relieved itself.
A while later, another cat came along and did the same thing but only at
every seventh tile (other than the first), i.e. at tiles numbered 7, 14, 21, ...
Later a boy strolled along the pavement, each step covering the
odd-numbered tiles.
How many of the tiles covered by his steps will not have been soiled by
any of the two cats?
Chapter 2 Counting
50 / 127
PIE: Examples
Chapter 2 Counting
51 / 127
PIE: Examples
Take X = B C . Then
|D (B C )c | = |D| |D (B C )|.
Next, determine |D| and |D (B C )|.
Chapter 2 Counting
52 / 127
PIE: Examples
Clearly, |D| = 40.
Chapter 2 Counting
53 / 127
PIE: Examples
Finally,
|D (B C )c | = |D| |D (B C )|
= 40 13
= 27.
Chapter 2 Counting
54 / 127
Addition principle
Chapter 2 Counting
55 / 127
Addition principle
Chapter 2 Counting
56 / 127
Addition principle
Example
Given three sets
A = {a, m, r }
B = {b, d, i, l, u}
C = {c, e, n, t}
How many ways are there to choose one letter from among the set A, B
or C ?
Solution. The three sets are pairwise/mutually disjoint. By the addition
principle, the number of ways is
3 + 5 + 4 = 12.
Chapter 2 Counting
57 / 127
Addition principle
Example
Here are two sets of positive integers:
A = {2, 3, 5, 7, 11, 13}
B = {2, 4, 6, 8, 10, 12}
How many ways are there to choose one integer from A B?
The two sets are NOT disjoint. What modification can we make to the
addition principle to accommodate this case?
Chapter 2 Counting
58 / 127
Multiplication principle
Chapter 2 Counting
59 / 127
Multiplication principle
Chapter 2 Counting
60 / 127
Multiplication principle
Example
If a word is defined as a juxtaposition of letters, how many
(i) 2-letter words
(ii) 3-letter words
(iii) k-letter words
can be formed from the English alphabet?
Chapter 2 Counting
61 / 127
Multiplication principle
Solution. Suppose we wish to form a k-letter word, where k 1. There
are
26 ways to choose the 1st letter;
26 ways to choose the 2nd letter;
..
.
26 ways to choose the k-th letter.
Each steps above are independent of each other. By the multiplication
principle, the total number of ways is
26
26} = 26k .
| {z
k times
Chapter 2 Counting
62 / 127
Arrangements in a row
Example
In how many ways can n different objects be arranged in a row?
Solution. We choose objects to place in a row one by one from left to
right:
There are n ways for the first position;
There are n 1 ways for the 2nd position;
..
.
There are 2 ways for the n 1-th position;
There is 1 way for the n-th position.
By multiplication principle, the number of ways is
n! = n (n 1) 2 1.
Chapter 2 Counting
63 / 127
Arrangements in a row
Example
In how many ways can you form a row of 3 different objects from 8
different objects?
Solution. There are
8 choices for the 1st position;
7 choices for the 2nd position;
6 choices for the 3rd position.
The number of ways is
8 7 6 = 336.
Chapter 2 Counting
64 / 127
Arrangements in row
Theorem
Let n Pk be the number of ways of arranging in a row k different objects
taken from n different objects. Then
n
Pk =
n!
.
(n k)!
Chapter 2 Counting
65 / 127
Arrangements in a row
Example
In how many ways can you arrange 3 red, 4 green and 5 blue beads in a
row?
Solution. If all the beads were different, then the number of ways is
(3 + 4 + 5)! = 12!.
Imagine we have such an arrangement.
Crucial observation: Permuting the beads of the same colour will yield
the same arrangement!
Chapter 2 Counting
66 / 127
Arrangements in a row
Chapter 2 Counting
67 / 127
Arrangements in a row
Theorem
The number of ways of arranging in a row n1 identical objects of Type 1,
n2 identical objects of Type 2, ..., nk identical objects of Type k is equal to
(n1 + n2 + + nk )!
.
n1 !n2 ! nk !
Chapter 2 Counting
68 / 127
Circular arrangements
Example
In how many ways can you arrange n different objects in a circle?
Solution.
A circular arrangement is considered the same after rotating it.
Chapter 2 Counting
69 / 127
Circular arrangements
Chapter 2 Counting
70 / 127
Circular arrangements
Chapter 2 Counting
71 / 127
Circular arrangements
There are
(n 1) ways to choose the object next (in clockwise direction) to A1 .
(n 2) ways to choose the next object (in clockwise direction).
..
.
2 ways to choose the second last object.
1 way to choose the last object.
Therefore, the total number of ways is
(n 1)! = (n 1) (n 2) 2 1.
Chapter 2 Counting
72 / 127
Circular arrangements
Chapter 2 Counting
73 / 127
Circular arrangements
Example
Find the number of ways, without removing any empty seat, that 9 guests
can be seated at a round table with exactly 10 seats?
Solution. The empty seat could be used as the reference object. Then
the number of ways is just
(10 1)! = 9!.
Chapter 2 Counting
74 / 127
Circular arrangements
Example
Find the number of ways, without removing any empty seat, that 8 guests
can be seated at a round table with exactly 10 seats?
Solution. Just imagine, in addition to the existing guests, we have two
different ghosts who will occupy the empty seats. Then the the number of
seatings is
(10 1)! = 9!.
Chapter 2 Counting
75 / 127
Circular arrangements
Now, let us identify the two ghosts. If there were not identical, there are
exactly two circular arrangements with the same positions for these
ghosts! But we want to identify these ghosts as identical since they
correspond to empty seats.
Chapter 2 Counting
76 / 127
Circular arrangements
Chapter 2 Counting
77 / 127
Combinations
Chapter 2 Counting
78 / 127
Theorem
Let n Ck denote the number of ways of choosing k objects from a set of n
different objects. Then
n!
n
Ck =
.
k!(n k)!
Chapter 2 Counting
79 / 127
Combinations
Ck k! = n Pk
Thus,
n
Ck =
nP
k!
n!
.
k!(n k)!
Chapter 2 Counting
80 / 127
Combinations
Chapter 2 Counting
81 / 127
Combinations
The numbers kn also called binomial coefficients since they appear in
the binomial expansion of (1 + x)n :
(1 + x)2 = 1 + 2x + x 2
(1 + x)3 = 1 + 3x + 3x 2 + x 3
(1 + x)4 = 1 + 4x + 6x 2 + 6x 3 + x 4
..
.
n
n
n 2
n n
n
(1 + x) =
+
x+
x + +
x
0
1
2
n
Chapter 2 Counting
82 / 127
Combinations
n
k
n
0
n
n
nk
n
1
=1
n
n
2
+ +
n
n
= 2n
Chapter 2 Counting
83 / 127
Combinations
Example
How many different 5-member subcommittees can be formed from a
9-member specified committee if the President and Vice-President do not
serve on the same subcommittee?
Solution. There are 3 types of subcommittees:
Type 1: containing President but not Vice President
Type 2: containing Vice President but not President
Type 3: not containing President and Vice President
Chapter 2 Counting
84 / 127
There are
7
4 different subcommittees of Type 1.
7
4 different subcommittees of Type 2.
7
5 different subcommittees of Type 3.
By addition principle, the total number is
7
7
7
+
+
= 91.
4
4
5
Chapter 2 Counting
85 / 127
Combinations
Example
An LCD display consists of 10 rows and 10 columns of squares which may
be lighted up.
How many different patterns of lighted display can be obtained if 30
squares are lighted up?
How many of these have at least one lighted square touching the border of
the display?
Chapter 2 Counting
86 / 127
Combinations
Chapter 2 Counting
87 / 127
Combinations
Suppose none of the 30 squares touch the border. The number of these is
88
64
=
.
30
30
Those have at least one lighted square touching the border is
100
64
.
30
30
Chapter 2 Counting
88 / 127
Rectangular grid
Example
If you are allowed to go east or north, how many ways can you go from A
to B in the following figure:
Chapter 2 Counting
89 / 127
Rectangular grid
A possible route is given in the following figure in red colour:
90 / 127
Rectangular grid
The 01-string corresponds to the path is
0 1 0 0 1 0 1 0 0.
The length of this 01-string is always 9, which is the sum of the
dimensions of the grid.
The dimension of the grid here is 3 6. For this grid, the corresponding
01-string always have
Six 0s
Three 1s
91 / 127
Rectangular grid
Chapter 2 Counting
92 / 127
Rectangular grid
We label each intersection point on a rectangular grid using coordinate
(i, j) such that i increases from left to right, and j increases from bottom
to top.
The bottom left point is labelled by (0, 0).
Chapter 2 Counting
93 / 127
Rectangular grid
Theorem
On a rectangular grid, the number of routes from (0, 0) to (i, j) moving
easterly or northerly without back-tracking is
(i + j)!
i +j
i +j
=
=
.
i!j!
i
j
Chapter 2 Counting
94 / 127
Rectangular grid
More generally,
Theorem
On a rectangular grid, the number of routes from (i, j) to (k, l), where
i k and j l, moving easterly or northerly without back-tracking is
k +l i j
k +l i j
((k i) + (l j))!
=
=
.
k i
l j
(k i)!(l j)!
Chapter 2 Counting
95 / 127
Rectangular grid
Example
How many possible bus routes (moving easterly or northerly without
back-tracking) are there from (0, 0) to (8, 8) that pass through (3, 3) or
(5, 5)?
Chapter 2 Counting
96 / 127
Rectangular grid
Solution. Let
A = set of routes from (0, 0) to (8, 8) and passing through (3, 3).
Chapter 2 Counting
97 / 127
Rectangular grid
6
10
|A| =
= 5040
3
5
10
6
|B| =
= 5040
5
3
6
4
6
|A B| =
= 2400.
3
2
3
Chapter 2 Counting
98 / 127
Rectangular grid
By PIE,
|A B| = |A| + |B| |A C |
= 5040 + 5040 2400
= 7680.
Chapter 2 Counting
99 / 127
Rectangular grid
Example
How many possible bus routes (moving easterly or northerly without
back-tracking) are there from (0, 0) to (7, 8) that does not pass through
any of the points (3, 3) or (5, 5)?
Chapter 2 Counting
100 / 127
Rectangular grid
Solution.
A = set of routes from (0, 0) to (7, 8) and passing through (3, 3).
B = set of routes from (0, 0) to (7, 8) and passing through (5, 5).
Chapter 2 Counting
101 / 127
|X | =
|A| =
|B| =
|A B| =
15
= 6435
7
6
9
= 2520
3
4
10
5
= 2520
2
5
6
4
5
= 1200
3
2
2
|X | |A B| = |X | |A| |B| + |A B|
= 2595.
Chapter 2 Counting
102 / 127
Pigeonhole Principle
Example
If 3 objects are distributed among 2 pigeon-holes, then there is at least one
pigeon hole that will contain at least two of the distributed objects.
Chapter 2 Counting
103 / 127
Pigeonhole Principle
Chapter 2 Counting
104 / 127
Pigeonhole Principle
Chapter 2 Counting
105 / 127
Pigeonhole Principle
Example
Jacky takes lunch at the same cafeteria five days a week (Monday to
Friday).
There are 16 different food-stalls.
Within how many weeks will it be certain that Jacky will take his lunch at
least twice from the same food-stall?
Distributed objects
Pigeon-holes
days
food-stalls
Chapter 2 Counting
106 / 127
Pigeonhole Principle
By PHP, a minimum of 17 days guarantees that Jack will order from the
same food-stall on at least two days.
Thus within 4 weeks, it is certain that he will take his lunch at least twice
from the same food-stall.
Chapter 2 Counting
107 / 127
Pigeonhole Principle
Example
If you are at a reception attended by more than 366 guests, you can be
sure that there will be at least two persons with the same birthday.
Distributed objects
Pigeon-holes
guests
birthdays
Chapter 2 Counting
108 / 127
Pigeonhole Principle
Example
A fitness club classifies its members according to the following
characteristics: gender, age, height and weight, for which there are 2, 8, 5
and 5 classes respectively.
If the club has more than 400 members, then there will be at least 2
members with exactly the same characteristics.
Distributed objects
Pigeon-holes
members
characteristics
109 / 127
Pigeonhole Principle
Example
A dating agency requires each of its clients to answer a questionnaire
consisting of 10 questions with yes/no options only.
There are 525 male and 500 female clients.
Are the following statements true?
(i) There will be two questionnaires forms with identical answers.
(ii) There will be one male and one female whose questionnaires answers
are identical.
Chapter 2 Counting
110 / 127
Pigeonhole Principle
Solution.
(i) Yes
(ii)
Distributed objects
Pigeon-holes
No.
It is possible that the identical answers come from both male or both
female clients.
Chapter 2 Counting
111 / 127
Pigeonhole Principle
Chapter 2 Counting
112 / 127
Pigeonhole Principle
Proof.
Let k = dm/ne. Then k 1 < m/n k or nk n < m < nk.
If every pigeon-hole contains less than k objects, then the total number of
objects
m (k 1) + (k 1) + + (k 1) = nk n.
{z
}
|
n
Chapter 2 Counting
113 / 127
Pigeonhole Principle
Example
The members of a youth club are grouped into age groups according to x:
16 x < 17, 17 x < 18 x < 19, . . . , 29 x < 30.
If the club has 300 members, then by extended PHP, there is at least one
group which has at least
b300/14c + 1 = 22
members.
Chapter 2 Counting
114 / 127
Pigeonhole Principle
Example
Suppose that Singapore is a rhombic-shaped island with the lengths of the
diagonals in the ratio of 2 to 1 (see figure below), and with an area of 680
sq km.
Partition the island into N 2 equal rhombic regions by drawing lines parallel
to the sides of the rhombus respectively in such a way that each side of
the rhombus is divided into N equal segments.
Assume that there are 3.5 million residents in Singapore. Let N = 10.
(i) There is at least one rhombic region with population density of at
least 35000/6.8 residents per sq km.
(ii) In a gathering of more than 100 residents, there will be at least two
persons who stay within 5.2km of each other.
Chapter 2 Counting
115 / 127
Pigeonhole Principle
Let x (in km) be the length of the shorter diagonal of a rhombic region.
Then
N 2 x 2 = 680.
Chapter 2 Counting
116 / 127
Pigeonhole Principle
(i)
Distributed objects
Pigeon-holes
Chapter 2 Counting
117 / 127
Pigeonhole Principle
Chapter 2 Counting
118 / 127
Pigeonhole Principle
(ii) By PHP, in a gathering of more than 100 residents, there will at least
two persons who reside in the same region.
The longest diagonal of the region is
Chapter 2 Counting
119 / 127
Example
In any group of n people there are at least two persons having the same
number friends. (It is assumed that if a person x is a friend of y then y is
also a friend of x.)
Chapter 2 Counting
120 / 127
Proof.
The number of friends of a person x is an integer k with 0 k n 1.
If there is a person y whose number of friends is n 1, then everyone is a
friend of y , that is, no one has 0 friend.
This means that 0 and n 1 can not be simultaneously the numbers of
friends of some people in the group. The pigeonhole principle tells us that
there are at least two people having the same number of friends.
Chapter 2 Counting
121 / 127
Pigeonhole Principle
Example
Among three given integers, there must be two of them whose sum is even.
Distributed objects
Pigeon-holes
By PHP, there will be two integers with the same parity, and so their sum
must be even.
Chapter 2 Counting
122 / 127
Pigeonhole Principle
Example
Classes are conducted from 8 : 00 am to 5 : 00 pm from Monday to Friday
in one-hour time slots.
You have 25 hours of classes each week.
Which of the following statements is true?
(a) There is one day during which you have at least 5 hours of classes.
(b) There is one day during which you have at least 6 hours of classes.
(c) There are at least 2 days in which you have classes with a common
time slot.
(d) There are at least 3 days in which you have classes with a common
time slot.
Chapter 2 Counting
123 / 127
Pigeonhole Principle
Solution.
Distributed objects
Pigeon-holes
classes (25)
days (5)
(a) True.
(b) False.
Chapter 2 Counting
124 / 127
Pigeonhole Principle
Distributed objects
Pigeon-holes
classes (25)
Chapter 2 Counting
125 / 127
Pigeonhole Principle
Example
Prove that if seven distinct numbers are selected from {1, 2, . . . , 11}, then
some two of these numbers sum to 12.
Solution. Let
A1 = {1, 11}, B = {2, 10}, C = {3, 9}, D = {4, 8},
E = {5, 7}, F = {6}.
Chapter 2 Counting
126 / 127
Pigeonhole Principle
Distributed objects
Pigeon-holes
the sets A, B, C , D, E , F
By PHP, two of the seven selected numbers must come from the same set.
This set cannot be F ; so it must be one of the sets A, B, C , D, E . In all
cases, these two numbers sum to 12.
Chapter 2 Counting
127 / 127