You are on page 1of 24

MATH 2345

Discrete Mathematics
July 17 2018
Babak Moazzez
Today we will study …

• Pigeonhole Principle
• Induction
• Recursions
Pigeonhole Principle
554 Chapter 9 Counting and Probability

9.4 The Pigeonhole Principle


Pigeonhole Principle The shrewd guess, the fertile hypothesis, the courageous leap to a tentative
conclusion—these are the most valuable coin of the thinker at work
— Jerome S. Bruner, 1960

The pigeonhole principle states that if n pigeons fly into m pigeonholes and n > m,
then at least one hole must contain two or more pigeons. This principle is illustrated in
• A function from one finite set to a smaller finite set cannot be
Figure 9.4.1 for n = 5 and m = 4. Illustration (a) shows the pigeons perched next to their
one-to-one: There must be a least two elements in the domain
holes, and (b) shows the correspondence from pigeons to pigeonholes. The pigeonhole
that have the same image in the co-domain.
principle is sometimes called the Dirichlet box principle because it was first stated for-
mally by J. P. G. L. Dirichlet (1805–1859).

Pigeons Pigeonholes
2 1 2 3

1 1

2
2
3
1 3 4 4 5 3
4

5 4

(a) (b)

Figure 9.4.1
13

If follows that the decimal digits obtained from the divisions between r j and rk−1 repeat
forever. In the case of 3/14, the repetition begins with r7 = 2 = r1 and the decimal

Generalized Pigeonhole Principle


expansion repeats the quotients obtained from the divisions from r1 through r6 forever:
3/14 = 0.2142857. ■
Note that since the decimal expansion of any rational number either terminates or
repeats, if a number has a decimal expansion that neither terminates nor repeats, then it
cannot be rational. Thus, for example, the following number cannot be rational:
0.01011011101111011111 . . . (where each string of 1’s is one longer than the previous
string).

• For any function f from a finite


Generalized Pigeonhole setPrinciple
X with n elements to a finite
set Y with m elementsAand forof the
generalization any positive
pigeonhole principle statesinteger k,intoifm pigeonholes
that if npigeons fly k < n/m,
then there is some y ∈orand,Ymore
such that y is the image of at least k + 1
for some positive integer k, k < n/m, then at least one pigeonhole contains k + 1
pigeons. This is illustrated in Figure 9.4.2 for m = 4, n = 9, and k = 2. Since
distinct elements of X 2example,
.< 9/4 =pigeonhole
2.25, at least one pigeonhole contains three (2 + 1) or more pigeons. (In this
3 contains three pigeons.)

Pigeons Pigeonholes
3 1 8 1 2 4

1
2 1
3
4 2
5
2 3 5 6 7 4 9 6 3
7
8 4
9

(a) ( b)
Figure 9.4.2

Generalized Pigeonhole Principle


For any function f from a finite set X with n elements to a finite set Y with m
Induction
Induction
5.2 Mathematical Induction I 245

• Any wholeEven
number of cents of at least 8¢ can be obtained using 3¢
more formally:

and 5¢ coins. More For formally:


all integers n ≥ 8, P(n) is true, where P(n) is the sentence
“n cents can be obtained using 3c/ and 5c/ coins.”
• For all integers n ≥that8,P(n)n iscents
You could check can
true for a few bevalues
particular obtained
of n, as is doneusing
in the table3¢ and 5¢
below.
coins.
Number of Cents How to Obtain It
8c/ 3c/ + 5c/
9c/ 3c/ + 3c/ + 3c/
10c/ 5c/ + 5c/
11c/ 3c/ + 3c/ + 5c/
12c/ 3c/ + 3c/ + 3c/ + 3c/
13c/ 3c/ + 5c/ + 5c/
14c/ 3c/ + 3c/ + 3c/ + 5c/
15c/ 5c/ + 5c/ + 5c/
16c/ 3c/ + 3c/ + 5c/ + 5c/
17c/ 3c/ + 3c/ + 3c/ + 3c/ + 5c/
14c/ 3c/ + 3c/ + 3c/ + 5c/
15c/ 5c/ + 5c/ + 5c/
16c/ 3c/ + 3c/ + 5c/ + 5c/
17c/ 3c/ + 3c/ + 3c/ + 3c/ + 5c/

Induction
The cases shown in the table provide inductive evidence to support the claim that
P(n) is true for general n. Indeed, P(n) is true for all n ≥ 8 if, and only if, it is possible
to continue filling in the table for arbitrarily large values of n.
The kth line of the table gives information about how to obtain kc/ using 3c/ and 5c/
coins. To continue the table to the next row, directions must be given for how to obtain
(k + 1)c/ using 3c/ and 5c/ coins. The secret is to observe first that if kc/ can be obtained
using at least one 5c/ coin, then (k + 1)c/ can be obtained by replacing the 5c/ coin by two
246 Chapter 5 Sequences, Mathematical Induction, and Recursion
3c/ coins, as shown in Figure 5.2.1.

k¢ (k + 1)¢ k¢ (k + 1)¢

Replace a 5¢ coin by
two 3¢ coins. Replace three 3¢ coins
by two 5¢ coins.

3¢ 3¢
3¢ 3¢ 5¢ 5¢

Remove Add Remove Add


Figure 5.2.1 Figure 5.2.2

If, on the other hand, kc/ is obtained without using a 5c/ coin, then 3c/ coins are used
exclusively. And since the total is at least 8c/, three or more 3c/ coins must be included.
Principle of Mathematical Induction
Three of the 3c/ coins can be replaced by two 5c/ coins to obtain a total of (k + 1)c/, as
shown in Figure 5.2.2. Let P(n) be a property that is defined for integers n, and let a be a fixed integer.
The structure of the argument above can be summarized as follows: To show Suppose
that the following two statements are true:
Replace three 3¢ coins
by two 5¢ coins.

3¢ 3¢

Induction 3¢
5¢ 5¢

Remove Add
Figure 5.2.2

Principle of Mathematical Induction


Let P(n) be a property that is defined for integers n, and let a be a fixed integer.
Suppose the following two statements are true:
1. P(a) is true.
2. For all integers k ≥ a, if P(k) is true then P(k + 1) is true.
Then the statement
for all integers n ≥ a, P(n)
is true.

The first known use of mathematical induction occurs in the work of the Italian sci-
entist Francesco Maurolico in 1575. In the seventeenth century both Pierre de Fermat
and Blaise Pascal used the technique, Fermat calling it the “method of infinite descent.”
In 1883 Augustus De Morgan (best known for De Morgan’s laws) described the process
carefully and gave it the name mathematical induction.
theorem. It is equivalent to the following property of the integers, which is easy to accept
on intuitive grounds:
Suppose S is any set of integers satisfying (1) a ∈ S, and (2) for all
integers k ≥ a, if k ∈ S then k + 1 ∈ S. Then S must contain every integer

Induction greater than or equal to a.


To understand the equivalence of this formulation and the one given earlier, just let S be
the set of all integers for which P(n) is true.
Proving a statement by mathematical induction is a two-step process. The first step is
called the basis step, and the second step is called the inductive step.

Method of Proof by Mathematical Induction


Consider a statement of the form, “For all integers n ≥ a, a property P(n) is true.”
To prove such a statement, perform the following two steps:
Step 1 (basis step): Show that P(a) is true.
Step 2 (inductive step): Show that for all integers k ≥ a, if P(k) is true then
P(k + 1) is true. To perform this step,
suppose that P(k) is true, where k is any
particular but arbitrarily chosen integer with k ≥ a.
[This supposition is called the inductive hypothesis.]
Then
show that P(k + 1) is true.

Here is a formal version of the proof about coins previously developed informally.
Proposition5.2.1
Proposition 5.2.1
For all
For integersn n≥ ≥
allintegers 8, 8, / can
nc/ nc
can be obtained
be obtained usingusing 3c/5cand
3c/ and 5c/ coins.
/ coins.

Proof
Proof(by
(bymathematical
mathematicalinduction):
induction):
Let
Let the
theproperty
propertyP(n)
P(n)be be
thethe
sentence
sentence
nc/ can be obtained using 3c/ and 5c/ coins. ← P(n)
nc/ can be obtained using 3c/ and 5c/ coins. ← P(n)
Show that P(8) is true:
Show
P(8) isthat
true P(8) is true:
because 8c/ can be obtained using one 3c/ coin and one 5c/ coin.
P(8) is true because 8c can be obtained using one 3c coin and one 5c coin.
Show that for all integers/ k ≥ 8, if P(k) is true then P(k+1) / is also true: /
Show that
[Suppose thatfor allisintegers
P(k) true for a kparticular
≥ 8, if P(k) is true then
but arbitrarily P(k+1)
chosen integerisk also true:is:]
≥ 8. That
[Supposethat
Suppose thatk P(k)
is anyisinteger
true for a particular
with k ≥ 8 suchbut arbitrarily chosen integer k ≥ 8. That is:]
that
Suppose thatkc is any
k can integer with
be obtained ≥and
usingk3c 8 such that
5c coins.
/ / / ← P(k)
inductive hypothesis
kc/ can be obtained using 3c/ and 5c/ coins. ← P(k)
[We must show that P(k + 1) is true. That is:] We must show that inductive hypothesis

[We must show that


(k + 1)c P(k
/ can be+obtained
1) is true. That
using 3c/ is:] We
and 5c must show
/ coins. ← P(k that
+ 1)

Chapter 5 CaseInduction,
Sequences, Mathematical 1 (There isRecursion
+
(kand a 5/ ccan
1)c / coin
beamong those
obtained used
using 3c/toand
make up the kc
5c/ coins. ←/.): In+this
P(k 1) case
replace the 5c/ coin by two 3c/ coins; the result will be (k + 1)c/.
Case 1 (There is a 5 c/ coin among those used to make up the kc/.): In this case
Case 2 (There is not a 5 c/ coin among those used to make up thecontinued kc/.): In thison page case,248
replacekthe
because ≥ 8, 5c/atcoin
leastby threetwo 3c/3c / coins;
coins mustthe have result
been willused.be So(k + 1)c/three
remove . 3c coins
/
and replace them by two 5c/ coins; the result will be (k + 1)c/. continued on page 248
Thus in either case (k + 1)c/ can be obtained using 3c/ and 5c/ coins [as was to be
shown].
Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
med that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
[Since we have proved the basis step and the inductive step, we conclude that the propo-
rning. All Rights Reserved. May not be copied, sition is true.]
scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
shown].
[Since we have proved the basis step and the inductive step, we conclude that the propo-
sition is true.]

Induction
The following example shows how to use mathematical induction to prove a formula
for the sum of the first n integers.

xample 5.2.1 Sum of the First n Integers


Use mathematical induction to prove that

n(n + 1)
1 + 2 + ··· + n = for all integers n ≥ 1.
2
Solution To construct a proof by induction, you must first identify the property P(n). In
this case, P(n) is the equation

n(n + 1)
1 + 2 + ··· + n = . ← the property (P(n))
2

[To see that P(n) is a sentence, note that its subject is “the sum of the integers from 1
Exercise Set 5.2
1. Use mathematical induction (and the proof of Proposi- Proof: Let the property
Induction
tion 5.2.1 as a model) to show that any amount of money
of at least 14c/ can be made up using 3c/ and 8c/ coins. 1+3+5+

2. Use mathematical induction to show that any postage of at Show that P(1) is true
least 12c/ can be obtained using 3c/ and 7c/ stamps. that when 1 is substitu
equals the right-hand s
3. For each positive integer n, let P(n) be the formula side is the sum of all t
2 2 2 n(n + 1)(2n + 1) which is the sum of the
1 + 2 + ··· + n = .
6 just 1. The right-hand s
a. Write P(1). Is P(1) true? P(1) is true.
b. Write P(k). Show that for all inte
c. Write P(k + 1).
P(k + 1) is true: Let k
d. In a proof by mathematical induction that the formula
holds for all integers n ≥ 1, what must be shown in the [Suppose P(k) is tru
inductive step?
Suppose 1 + 3 + 5 + ·
4. For each integer n with n ≥ 2, let P(n) be the formula
n−1
! n(n − 1)(n + 1) [We must show that
i(i + 1) = .
Recursion
each later term in the sequence by reference to earlier terms and also one or more initial
values for the sequence.
Sometimes it is very difficult or impossible to find an explicit formula for a sequence,
but it is possible to define the sequence using recursion. Note that defining sequences
Recursion
recursively is similar to proving theorems by mathematical induction. The recurrence
relation is like the inductive step and the initial conditions are like the basis step. Indeed,
the fact that sequences can be defined recursively is equivalent to the fact that mathemat-
ical induction works as a method of proof.

• Definition
A recurrence relation for a sequence a0 , a1 , a2 , . . . is a formula that relates each
term ak to certain of its predecessors ak−1 , ak−2 , . . . , ak−i , where i is an integer with
k − i ≥ 0. The initial conditions for such a recurrence relation specify the values
of a0 , a1 , a2 , . . . , ai−1 , if i is a fixed integer, or a0 , a1 , . . . , am , where m is an integer
with m ≥ 0, if i depends on k.

ple 5.6.1 Computing Terms of a Recursively Defined Sequence


Define a sequence c0 , c1 , c2 , . . . recursively as follows: For all integers k ≥ 2,
Recursion

The puzzle consisted of eight disks of wood with holes in their centers, which were piled in order of
decreasing size on one pole in a row of three. Those who played the game were supposed to move all
the disks one by one from one pole to another, never placing a larger disk on top of a smaller one. The
puzzle offered a prize of ten thousand francs (about $34,000 US today) to anyone who could move a
tower of 64 disks by hand while following the rules of the game. Assuming that you transferred the
hapter 5 Sequences,
disks as Mathematical
efficientlyInduction, and Recursion
as possible, how many moves would be required to win the prize?

64
golden
disks

A B C
Figure 5.6.2
Tower of k – 1
disks
Bottom
disk

Recursion
A B C
5.6 Defining Sequences Recursively 295 Position after Transferring k – 1 Disks from A to B
(b)

Tower of Tower of k – 1
k disks disks
Bottom
disk

A B C A B C
Initial Position Position after Moving the Bottom Disk from A to C
(a) (c)

Tower of k – 1 Tower of
disks k disks
Bottom
disk

A B C A B C
Position after Transferring k – 1 Disks from A to B Position after Transferring k – 1 Disks from B to C
(b) (d)
Recursion
5.7 Solving Recurrence Relations by Iteration 307

• Definition
A sequence a0 , a1 , a2 , . . . is called an arithmetic sequence if, and only if, there is
a constant d such that
ak = ak−1 + d for all integers k ≥ 1.
It follows that,
an = a0 + dn for all integers n ≥ 0.

ample 5.7.2 An Arithmetic Sequence


Under the force of gravity, an object falling in a vacuum falls about 9.8 meters per second
(m/sec) faster each second than it fell the second before. Thus, neglecting air resistance,
a skydiver’s speed upon leaving an airplane is approximately 9.8 m/sec one second after
departure, 9.8 + 9.8 = 19.6 m/sec two seconds after departure, and so forth. If air resis-
Recursion
In the exercises at the end of this section, you are asked to prove that this formula is
correct. ■

• Definition
A sequence a0 , a1 , a2 , . . . is called a geometric sequence if, and only if, there is a
constant r such that
ak = rak−1 for all integers k ≥ 1.
It follows that,
an = a0r ′′ for all integers n ≥ 0.

e 5.7.4 A Geometric Sequence


As shown in Example 5.6.7, if a bank pays interest at a rate of 4% per year compounded
annually and An denotes the amount in the account at the end of year n , then Ak =
(1.04)Ak−1 , for all integers k ≥ 1, assuming no deposits or withdrawals during the year.
Genius is 1% inspiration and 99% perspiration. — Thomas Alva Edison, 1932

In section 5.7 we discussed finding explicit formulas for recursively defined sequences
using iteration. This is a basic technique that does not require any special tools beyond
Recursion
the ability to discern patterns. In many cases, however, a pattern is not readily discernible
and other methods must be used. A variety of techniques are available for finding explicit
formulas for special classes of recursively defined sequences. The method explained in
this section is one that works for the Fibonacci and other similarly defined sequences.

• Definition
A second-order linear homogeneous recurrence relation with constant coeffi-
cients is a recurrence relation of the form
ak = Aak−1 + Bak−2 for all integers k ≥ some fixed integer,
where A and B are fixed real numbers with B ̸ = 0.

“Second-order” refers to the fact that the expression for ak contains the two previous
terms ak−1 and ak−2 , “linear” to the fact that ak−1 and ak−2 appear in separate terms and
to the first power, “homogeneous” to the fact that the total degree of each term is the same
(thus there is no constant term), and “constant coefficients” to the fact that A and B are
fixed real numbers that do not depend on k.
“Second-order” refers to the fact that the expression for ak contains the two previous
terms ak−1 and ak−2 , “linear” to the fact that ak−1 and ak−2 appear in separate terms and
to the first power, “homogeneous” to the fact that the total degree of each term is the same
Recursion
(thus there is no constant term), and “constant coefficients” to the fact that A and B are
fixed real numbers that do not depend on k.

ple 5.8.1 Second-Order Linear Homogeneous Recurrence Relations with Constant


Coefficients
State whether each of the following is a second-order linear homogeneous recurrence
relation with constant coefficients:
a. ak = 3ak−1 + 2ak−2 b. b k = b k−1 + b k−2 + b k−3
c. ck = 12 ck−1 − 37 ck−2 2
d. dk = dk−1 + dk−1 ·dk−2
e. ek = 2ek−2 f. f k = 2 f k−1 + 1
g. g k = g k−1 + g k−2 h. h k = (−1)h k−1 + (k − 1)h k−2
Solution
a. Yes; A = 3 and B = 2
b. No; not second-order
1 3
Recursion
5.8 Second-Order Linear Homogeneous Recurrence Relations with Constant Coefficients 319

• Definition
Given a second-order linear homogeneous recurrence relation with constant coeffi-
cients:
ak = Aak−1 + Bak−2 for all integers k ≥ 2, 5.8.1

the characteristic equation of the relation is


t 2 − At − B = 0. 5.8.2

2 Using the Characteristic Equation to Find Solutions to a Recurrence Relation


Consider the recurrence relation that specifies that the kth term of a sequence equals the
The techniques of Examples 5.8.2 and 5.8.3 can be used to find an explicit formula for
any sequence that satisfies a second-order linear homogeneous recurrence relation with
Recursion
constant coefficients for which the characteristic equation has distinct roots, provided that
the first two terms of the sequence are known. This is made precise in the next theorem.

Theorem 5.8.3 Distinct-Roots Theorem


Suppose a sequence a0 , a1 , a2 , . . . satisfies a recurrence relation
ak = Aak−1 + Bak−2 5.8.1

for some real numbers A and B with B ̸ = 0 and all integers k ≥ 2. If the character-
istic equation
t 2 − At − B = 0 5.8.2

has two distinct roots r and s, then a0 , a1 , a2 , . . . is given by the explicit formula
an = Cr n + Ds n ,
where C and D are the numbers whose values are determined by the values a0 and a1 .

Note: To say “C and D are determined by the values of a0 and a1 ” means that C and D
how to find an explicit formula for any recursively defined sequence satisfying a second-
order linear homogeneous recurrence relation with constant coefficients for which the
characteristic equation has just one root. Taken together, the distinct-roots and single-root
theorems cover all second-order linear homogeneous recurrence relations with constant
Recursion
coefficients. The proof of the single-root theorem is very similar to that of the distinct-
roots theorem and is left as an exercise.

Theorem 5.8.5 Single-Root Theorem


Suppose a sequence a 0 , a 1 , a 2 , . . . satisfies a recurrence relation
a k = Aa k−1 + Ba k−2
for some real numbers A and B with B ̸= 0 and for all integers k ≥ 2. If the char-
acteristic equation t 2 − At − B = 0 has a single (real) root r , then a 0 , a 1 , a 2 , . . . is
given by the explicit formula
a n = Cr n + Dnr n ,
where C and D are the real numbers whose values are determined by the values of
a 0 and any other known value of the sequence.

You might also like