CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal...

36
(Chapter 9: Discrete Math) 9.01 CHAPTER 9: DISCRETE MATH Calculus tends to deal more with “continuous” mathematics than “discrete” mathematics. What is the difference? Analogies may help the most. Discrete is digital; continuous is analog. Discrete is a dripping faucet; continuous is running water. Discrete math tends to deal with things that you can “list,” even if the list is infinitely long. Math 245 is the Discrete Math course at Mesa. SECTION 9.1: SEQUENCES AND SERIES, and SECTION 9.6: COUNTING PRINCIPLES PART A: SEQUENCES An infinite sequence can usually be thought of as an ordered list of real numbers. It is often denoted by either: a 1 , a 2 , a 3 , or a 0 , a 1 , a 2 , (this is more common in Calculus) where each of the “ a i ”s represent real numbers called terms. If we’re lucky, there is a nice pattern to our sequence of numbers – a pattern that we can describe using simple mathematical expressions.

Transcript of CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal...

Page 1: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.01

CHAPTER 9: DISCRETE MATH

Calculus tends to deal more with “continuous” mathematics than “discrete” mathematics.What is the difference? Analogies may help the most. Discrete is digital; continuous is analog.Discrete is a dripping faucet; continuous is running water. Discrete math tends to deal withthings that you can “list,” even if the list is infinitely long. Math 245 is the Discrete Math courseat Mesa.

SECTION 9.1: SEQUENCES AND SERIES, andSECTION 9.6: COUNTING PRINCIPLES

PART A: SEQUENCES

An infinite sequence can usually be thought of as an ordered list of real numbers.It is often denoted by either:

a1, a

2, a

3, …

or

a0, a

1, a

2, … (this is more common in Calculus)

where each of the “ ai”s represent real numbers called terms.

If we’re lucky, there is a nice pattern to our sequence of numbers – a pattern that we candescribe using simple mathematical expressions.

Page 2: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.02

Example

Write the first three terms of the sequence with general nth term an

= n3 −1.

Assume that we begin with n = 1.

Solution

n = 1: a

1= 1( )3

−1= 0

n = 2 : a

2= 2( )3

−1= 7

n = 3: a

3= 3( )3

−1= 26

The first three terms are: 0, 7, and 26.

We may graph terms as the points n, a

n( ) , just as we used to graph points

x, f x( )( ) .

Technical Note: Observe that the graph of the sequence is a “discretized”version of the graph of

f x( ) = x3 −1, where the domain is the set of positive

integers. In this sense, sequences may be thought of as functions.

Page 3: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.03

PART B: SIGN ALTERNATORS

Alternating sequences have terms that alternate (i.e., consistently switch) betweenpositive and negative terms. They arise frequently in Calculus.

Example

Write the first four terms of the sequence where a

n= −1( )n

n .

Assume that we begin with n = 1.

Solution

n = 1: a

1= −1( )1 ⋅1= −1

n = 2 : a

2= −1( )2

⋅2 = 2

n = 3: a

3= −1( )3

⋅3= −3

n = 4 : a

4= −1( )4

⋅4 = 4

Recall that the parity of an integer is either “even” or “odd.”The parity of n here determines the sign of the term.

Example

How can we obtain an alternating sequence like the one above, but starting with apositive term? Let’s adjust our sign alternator.

Try: a

n= −1( )n+1

n , or a

n= −1( )n−1

n

In either case, we obtain: 1, −2 , 3, −4 , …

PART C: EVEN VS. ODD

2n yields even integers, where n ∈Z . 2n −1 and 2n +1 yield odd integers, where n ∈Z .

These are often used to describe sequences in Calculus.

Page 4: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.04

PART D: FACTORIALS

Do you see the n! button on your calculator? This is n factorial (not n excited). It is oftenused to describe sequences.

We define:

0!= 1

If n is a positive integer n ∈Z+( ) ,

n! = the product of the integers from 1 to n

If n is large: n!= 1( ) 2( ) 3( ) n( )

Equivalently: n!= n( ) n −1( ) n − 2( ) 2( ) 1( ) (Think: Countdown.)

Examples

0!= 1 1!= 1

2!= 2( ) 1( ) = 2

3!= 3( ) 2( ) 1( ) = 6

4!= 4( ) 3( ) 2( ) 1( ) = 24

There is a short cut: 4!= 4 ⋅3!

Factorial is at the same level as exponentiation in the order of operations;they both represent successive multiplications. Therefore, the factorialoperator (!) binds more tightly than the multiplication operator ⋅( ) , which is

lower in the order of operations. In this case, 4!= 4( ) ⋅ 3!( ) ; this may be

clearer.

In general, if n ∈Z+ : n!= n ⋅ n −1( )!, and 0!= 1

This is called a recursive definition of the factorial function, because itdescribes how previous values determine later values. In this case, we showhow we get from

n −1( )! to n!.

Page 5: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.05

Technical Note: Can we talk about 3.5!, say? The gamma function, which you may studyin Math 151: Calculus II at Mesa, is a continuous version of the factorial function.

PART E: FACTORIALS, COUNTING PRINCIPLES, AND SIMPLIFICATIONS(SECTION 9.6)

Example

How many ways are there to order a standard deck of 52 cards?

Solution

There are 52 possibilities for the first card.Once the first card is set, there are 51 possibilities for the second card.Once the first two cards are set, there are 50 possibilities for the third card.

And so on…

Once the first 51 cards are set, there is only 1 possibility left for the last card.

By the Fundamental Counting Principle described on p.663 of Larson, wemultiply together these numbers of possibilities.

The number of ways is:

52( ) 51( ) 50( ) 1( ) , better known as 52!, which is about 8 ×1067 .

That’s an 8 followed by 67 digits – literally astronomical!

n! grows in value very fast as n grows. Many calculators can’t evenhandle 100!.

In general:

The number of ways to order n distinct items is: n!

The different possible orders are called permutations.

Page 6: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.06

Example (An elaboration on Example 9 on p.668 in Larson.)

How many possible “hands” of five cards can be drawn from a deck of 52 cards?In other words, how many ways are there to choose five cards from a deck of 52?(The order among the five chosen cards does not matter.)

Solution

This number is denoted by 52C

5, or

52

5

⎛⎝⎜

⎞⎠⎟

, called “52 choose 5.”

This is the number of combinations of 52 (distinct) items taken 5 at a time.

It turns out that

52

5

⎛⎝⎜

⎞⎠⎟=

52!

5!47!. Why?

There are 52! ways to order the complete deck of 52 cards.Imagine a divider separating the first five cards from the last (other)47 cards. Let’s call the first five cards the “winners” and the last 47cards the “losers.” We do not care about the order among the fivewinners, so we divide by 5!. (The technical reason for this issomewhat subtle and may not be immediately clear.) Likewise, we donot care about the order among the 47 losers (though poker playersmay beg to differ), so we divide by 47!, also.

How can we simplify and compute

52!

5!47! so that a calculator can handle it

without a problem?

Good calculators should be able to handle this, but it is a good skill toknow how to cancel factors when there are factorials involved.

The idea here is to unravel one or more of the factorials so that we cancancel factorials.

52!

5!47!=

52 ⋅51⋅50 ⋅49 ⋅48 ⋅ 47!

5! 47!

= 2,598,960

By the way, there is about a 50-50 chance of getting at least a “pair.”

Page 7: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.07

Incidentally, we were guaranteed to get an integer because of thenature of the problem. This may not have been obvious from the formof the expression.

In general:

The number of ways to choose r distinct items from a set of n distinct items(if the order among the chosen items is irrelevant) is given by:

nC

r=

n

r

⎛⎝⎜

⎞⎠⎟=

n!

r ! n − r( )!

Think: The number of ways to choose r winners and, therefore, n − r losers.

These

n

r

⎛⎝⎜

⎞⎠⎟

numbers are called binomial coefficients for reasons we shall see in

Section 9.5.

See if you can find the n Cr button on your calculator.

What about n Pr?

You may also see this button on your calculator. It is the number of partialpermutations of 52 (distinct) items taken 5 at a time.

Let’s say we actually care about the order of the five chosen cards. The number ofsuch partial permutations is given by:

52!

47!=

52 ⋅51⋅50 ⋅49 ⋅48 ⋅ 47!

47!1

= 311,875,200

The idea is that we take the number of total permutations of the 52 cards (namely,52!), and we divide by 47!, because we do not care about the order among thelosers. This time, we do not divide by 5!, because we do care here about the orderamong the winners.

Page 8: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.08

PART F: RECURSIVELY DEFINED SEQUENCES

Recall the recursive definition of factorials: n!= n ⋅ n −1( )!

n ∈Z+( )

We should add that 0!= 1, because we need to know where to start.

Likewise, we can define sequences by describing how terms are “built upon” previousterms.

Perhaps the most famous recursively defined sequence is the Fibonacci sequence (namedafter Leonardo of Pisa, or “Fibonacci,” a famous Italian mathematician of the MiddleAges who has been credited with introducing Arabic numerals to the West), which isdescribed on p.616 in Larson. There are surprising applications of this sequence innature: sunflower petals, pine cone and seashell patterns, etc. You are virtually assured ofdealing with this sequence in a Discrete Math class. Finding the general n

th term

expression is a bit of a challenge! It turns out to be:

an=

1

5

1+ 5

2

⎝⎜

⎠⎟

n

−1− 5

2

⎝⎜

⎠⎟

n⎡

⎢⎢

⎥⎥

.

Yes, we get integers out of this thing! Technical details and other properties are availableat the URL:

http://mathworld.wolfram.com/FibonacciNumber.html

Example

Consider the sequence recursively defined by:

a1= 10

ak+1

= 2ak

k ∈Z+( )⎧⎨⎪

⎩⎪

Find the first three terms of this sequence, beginning with n = 1.

Solution

We essentially double one term in the sequence to obtain the next term.

a1= 10

a2= 2a

1= 2 10( ) = 20

a3= 2a

2= 2 20( ) = 40

Page 9: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.09

PART G: SUMMATION (SIGMA) NOTATION

Σ is the Greek letter known as uppercase sigma. (Lowercase sigma, σ , is famous fordenoting standard deviation in statistics.) Σ is a summation operator; we use it toefficiently indicate the addition of terms.

Example

Evaluate the sum

5i2 −1( )ai

i=0

3

∑ .

Terminology and Notation

Here, i serves as the index of summation. It does not matter if we use j, k,etc., as long as there are no conflicts with other notations, and we use thesenotations consistently. We can think of i as a dummy variable. It’s like yournew co-worker – if we replaced one dummy with another, nothing reallychanges. In Calculus, dummy variables are used in definite integration.

Here, 0 is the lower limit (of summation), and 3 is the upper limit.

Solution

We need to successively replace i with the integers from 0 through 3 andthen add the results.

ai

i=0

3

∑ = a0+ a

1+ a

2+ a

3

= 5 0( )2−1⎡

⎣⎢⎤⎦⎥

a0

+ 5 1( )2

−1⎡⎣⎢

⎤⎦⎥

a1

+ 5 2( )2

−1⎡⎣⎢

⎤⎦⎥

a2

+ 5 3( )2

−1⎡⎣⎢

⎤⎦⎥

a3

= −1+ 4 +19 + 44

= 66

Page 10: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.10

PART H: SERIES

A series arises when we take the sum of terms of a sequence.

The following is an example of a finite series:

a

kk=1

n

∑ = a1+ a

2+ a

3+…+ a

n

The following is an example of an infinite series:

a

kk=1

∑ = a1+ a

2+ a

3+…

In fact, the finite series above represents the nth partial sum of the infinite series

above; it represents the sum of the first n terms.

Page 11: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.11

SECTION 9.2: ARITHMETIC SEQUENCES and PARTIAL SUMS

PART A: WHAT IS AN ARITHMETIC SEQUENCE?

The following appears to be an example of an arithmetic (stress on the “me”) sequence:

a1= 2

a2= 5

a3= 8

a4= 11

We begin with 2. After that, we successively add 3 to obtain the other terms of the

sequence.

An arithmetic sequence is determined by:

• Its initial term

Here, it is a1, although, in other examples, it could be a

0 or something else.

Here, a

1= 2 .

• Its common difference

This is denoted by d . It is the number that is always added to a previous

term to obtain the following term. Here, d = 3.

Observe that: d = a

2a

1= a

3a

2= … = a

k+1a

kk Z

+( ) = …

The following information completely determines our sequence:

The sequence is arithmetic.

(Initial term) a

1= 2

(Common difference) d = 3

Page 12: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.12

In general, a recursive definition for an arithmetic sequence that begins with a

1 may be

given by:

a1 given

ak+1

= ak+ d k 1; "k is an integer" is implied( )

Example

The arithmetic sequence 25, 20, 15, 10, …

can be described by:

a1= 25

d = 5

Page 13: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.13

PART B : FORMULA FOR THE GENERAL nth

TERM OF AN

ARITHMETIC SEQUENCE

Let’s begin with a

1 and keep adding d until we obtain an expression for

a

n, where

n Z+.

a1= a

1

a2= a

1+ d

a3= a

1+ 2d

a4= a

1+ 3d

an= a

1+ n 1( )d

The general nth

term of an arithmetic sequence with initial term a

1 and

common difference d is given by:

a

n= a

1+ n 1( )d

Think: We take n 1 steps of size d to get from a1 to a

n.

Note: Observe that the expression for an is linear in n. This reflects the fact that

arithmetic sequences often arise from linear models.

Example

Find the 100th

term of the arithmetic sequence: 2, 5, 8, 11, …

(Assume that 2 is the “first term.”)

Solution

an= a

1+ n 1( )d

a100

= 2 + 100 1( ) 3( )= 2 + 99( ) 3( )= 299

Page 14: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.14

PART C : FORMULA FOR THE nth

PARTIAL SUM OF AN

ARITHMETIC SEQUENCE

The nth

partial sum of an arithmetic sequence with initial term a

1 and

common difference d is given by:

Sn= n

a1+ a

n

2

Think: The (cumulative) sum of the first n terms of an arithmetic sequence is given

by the number of terms involved times the average of the first and last terms.

Example

Find the 100th

partial sum of the arithmetic sequence: 2, 5, 8, 11, …

Solution

We found in the previous Example that: a

100= 299

Sn= n

a1+ a

n

2

S100

= 100( )2 + 299

2

= 100( )301

2

= 15,050

i.e., 2 + 5+ 8 + ...+ 299 = 15,050

This is much easier than doing things brute force on your calculator!

Read the Historical Note on p.628 in Larson for the story of how Gauss quickly

computed the sum of the first 100 positive integers,

k

k=1

100

= 1+ 2 + 3+ ...+100 . Use our

formula to confirm his result. Gauss’s trick is actually used in the proof of our formula;

see p.694 in Larson. We will touch on a related question in Section 9.4.

Page 15: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.15

SECTION 9.3: GEOMETRIC SEQUENCES, PARTIAL SUMS, and

SERIES

PART A: WHAT IS A GEOMETRIC SEQUENCE?

The following appears to be an example of a geometric sequence:

a1= 2

a2= 6

a3= 18

a4= 54

We begin with 2. After that, we successively multiply by 3 to obtain the other terms of

the sequence. Recall that, for an arithmetic sequence, we successively add.

A geometric sequence is determined by:

• Its initial term

Here, it is a

1, although, in other examples, it could be

a

0 or something else.

Here, a1= 2 .

• Its common ratio

This is denoted by r. It is the number that we always multiply the previous

term by to obtain the following term. Here, r = 3.

Observe that:

r =a

2

a1

=a

3

a2

= … =a

k+1

ak

k Z+( ) = …

The following information completely determines our sequence:

The sequence is geometric.

(Initial term) a

1= 2

(Common ratio) r = 3

Page 16: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.16

In general, a recursive definition for a geometric sequence that begins with a

1 may be

given by:

a1 given

ak+1

= ak

r k 1; "k is an integer" is implied( )

We assume a

10 and r 0 .

Example

The geometric sequence 2, 6, 18, 54, …

can be described by:

a1= 2

r = 3

Page 17: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.17

PART B : FORMULA FOR THE GENERAL nth

TERM OF A

GEOMETRIC SEQUENCE

Let’s begin with a

1 and keep multiplying by r until we obtain an expression for

a

n,

where n Z+.

a1= a

1

a2= a

1r

a3= a

1r

2

a4= a

1r

3

an= a

1r

n 1

The general nth

term of a geometric sequence with initial term a1 and

common ratio r is given by:

a

n= a

1r

n 1

Think: As with arithmetic sequences, we take n 1 steps to get from a1 to a

n.

Note: Observe that the expression for an is exponential in n. This reflects the fact

that geometric sequences often arise from exponential models, for example those

involving compound interest or population growth.

Page 18: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.18

Example

Find the 6th

term of the geometric sequence: 2, 1, 1

2, …

(Assume that 2 is the “first term.”)

Solution

Here, a

1= 2 and

r =1

2.

an= a

1r

n 1

a6= 2( )

1

2

6 1

= 2( )1

2

5

= 2( )1

32

=1

16

Observe that, as n , the terms of this sequence approach 0.

Assume a1

0 . Then,

a1

rn 1

0 as n( ) 1< r < 1( )i.e., r <1

Page 19: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.19

PART C : FORMULA FOR THE nth

PARTIAL SUM OF A

GEOMETRIC SEQUENCE

The nth

partial sum of a geometric sequence with initial term a

1 and common ratio r

(where r 1) is given by:

Sn=

a1

a1r

n

1 ror a

1

1 rn

1 r

You should get used to summation notation:

Remember that Sn for a sequence starting with a

1 is given by:

Sn= a

k

k=1

n

= a1+ a

2+…+ a

n

Because a

k= a

1r

k 1 for our geometric series:

Sn= a

1r

k 1

k=1

n

= a1+ a

1r

a2

+ a1r

2

a3

+ ... + a1r

n 1

an

=a

1a

1r

n

1 raccording to our theorem in the box above( )

Note: The book Concrete Mathematics by Graham, Knuth, and Patashnik

suggests a way to remember the numerator: “first in – first out.” This is

because a

1 is the “first” term included in the sum, while

a

1r

n is the first

term in the corresponding infinite geometric series that is excluded from the

sum.

Technical Note: The key is that

1+ r + r2+…+ r

n 1=

1 rn

1 r. You can see that this

is true by multiplying both sides by 1 r( ) . Also see the proof on p.694 of Larson.

Technical Note: If r = 1, then we are dealing with a constant sequence and

essentially a multiplication problem. For example, the 4th

partial sum of the series

7 + 7 + 7 + 7 + ... is 7 + 7 + 7 + 7 = 4( ) 7( ) = 28 . In general, the n

th partial sum of

the series a1+ a

1+ a

1+ ... is given by na

1.

Page 20: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.20

Example

Find the 6th

partial sum of the geometric sequence 2, 1, 1

2, …

Solution

Recall that a

1= 2 and r =

1

2 for this sequence.

We found in the previous Example that:

a6=

1

16

We will use our formula to evaluate:

S6= 2 1 +

1

2

1

4+

1

8

1

16

Using our formula directly:

Sn=

a1

a1r

n

1 ror a

1

1 rn

1 r

If we use the second version on the right …

Sn= a

1

1 rn

1 r

S6= 2

11

2

6

11

2

= 2

11

64

1+1

2

Page 21: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.21

= 2

63

64

3

2

= 2

2163

3264

21

31

= 221

3216

=21

16

We can also use the first version and the “first in – first out” idea:

S6= 2 1 +

1

2

1

4+

1

8

1

16

“First out” is:

a7=

1

32

Sn=

a1

a1r

n

1 r

S6=

21

32

11

2

=

63

32

3

2

64

32

1

32

=

2163

1632

21

31

=21

16

Page 22: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.22

PART D: INFINITE GEOMETRIC SERIES

An infinite series converges (i.e., has a sum) The Sn partial sums approach a

real number as n( ) , which is then called the sum of the series.

In other words, if

limn

Sn= S , where S is a real number, then S is the sum of the series.

Example

Consider the geometric series: 1

2+

1

4+

1

8+

1

16+ ...

Let’s take a look at the partial (cumulative) sums:

1

2

S1=

1

2

+1

4

S2=

3

4

+1

8

S3=

7

8

+1

16

S4=

15

16

+ ...

It appears that the partial sums are approaching 1. In fact, they are; we will

have a formula for this. This series has a sum, and it is 1.

The figure below may make you a believer:

Page 23: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.23

Example

The geometric series 2 + 6 +18 + 54 + ... has no sum, because:

limn

Sn=

Example

The geometric series 1 1+1 1+ ... has no sum, because the partial sums

do not approach a single real number. Observe:

1

S1=1

1

S2=0

+ 1

S3=1

1

S4=0

+ ...

An infinite geometric series converges 1< r < 1( )i.e., r <1

Take another look at the Examples of this Part.

It is true that an infinite geometric series converges Its terms approach 0.

Warning: However, this cannot be said about series in general. For example, the

famous harmonic series

1

kk=1

= 1+1

2+

1

3+… does not converge, even though the

terms of the series approach 0. In order for a series to converge, it is necessary but

not sufficient for the terms to approach 0.

No infinite arithmetic sequence (such as 2 + 5+ 8 +11+… ) can have a sum, unless

you include 0 + 0 + 0 + ... as an arithmetic sequence.

Page 24: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.24

The sum of a convergent infinite geometric series with initial term a

1 and

common ratio r , where

1< r < 1

i.e., r <1

, is given by:

S =a

1

1 r

Technical Note: This comes from our partial sum formula

Sn=

a1

a1r

n

1 r and the

fact that a1r

n0 as n 0( ) if

1< r < 1

i.e., r <1

.

Example

Write 0.81 as a nice (simplified) fraction of the form integer

integer.

Recall how the repeating bar works: 0.81= 0.81818181...

Note: In Arithmetic, you learned how to use long division to express a

“nice” fraction as a repeated decimal; remember that rational numbers can

always be expressed as either a terminating or a “nicely” repeating decimal.

Now, after all this time, you will learn how to do the reverse!

Solution

0.81 can be written as: 0.81+ 0.0081+ 0.000081+ ...

Observe that this is a geometric series with initial term a

1= 0.81 and

common ratio

r =0.0081

0.81=

1

100= 0.01; because

r < 1 , the series

converges.

The sum of the series is given by:

S =

a1

1 r=

0.81

1 0.01=

0.81

0.99=

81

99=

9

11

Page 25: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.25

Again, you should get used to summation notation:

S = a1r

k 1

k=1

= 0.81( ) 0.01( )k 1

k=1

=9

11

If you make the substitution i = k 1, the summation form can be

rewritten as:

S = 0.81( ) 0.01( )k 1

k=1

= 0.81( ) 0.01( )i

i=0

In Calculus, 0 is more common than 1 as a lower limit of summation.

Page 26: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.26

SECTION 9.4: MATHEMATICAL INDUCTION

What is the sum of the first n positive integers, where n ∈Z+ ? In other words, what is

1+ 2 + 3+ ...+ n ? According to our formula for the nth partial sum of an arithmetic sequence

(see Section 9.2), the answer is: S

n= n

1+ n

2

⎛⎝⎜

⎞⎠⎟=

n n +1( )2

Handshake Problem (Cool, but Optional)

There’s another way of seeing why this formula works out.

Imagine n +1 people walking into a room one-by-one. Whenever a person walks into aroom, he/she must shake hands exactly once with every other person who is currently inthe room, and those are the only handshakes they make. The first person who walks intothe room shakes nobody’s hand, the second person shakes the first person’s hand, thethird person shakes the first two people’s hands, and so on, until the last person shakesthe other n people’s hands. This means that every distinct pair of people eventually shakehands exactly once. The total number of handshakes then equals the number of distinctpairs of people that can be formed from a group of n +1 people.

We see that the number of handshakes equals both 1+ 2 + 3+ ...+ n and

n +1

2

⎛⎝⎜

⎞⎠⎟=

n +1( )!2! n +1( ) − 2( )! =

n +1( )!2! n −1( )! =

n +1( )n ⋅ n −1( )!2 ⋅ n −1( )!

=n n +1( )

2.

Therefore: 1+ 2 + 3+ ...+ n =

n n +1( )2

In this section, we will use mathematical induction to prove that: 1+ 2 + 3+ ...+ n =

n n +1( )2

Mathematical induction is used to prove conjectures, statements that we believe to be true butare as yet unproven. Unfortunately, the method of mathematical induction cannot give us a

formula such as 1+ 2 + 3+ ...+ n =

n n +1( )2

; we must first guess at such a formula by perhaps

working out a few cases and using trial-and-error. (For example, try out Problem #90 in Section9.2 on p.633 in Larson.) Induction is then used to verify our guess.

Page 27: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.27

Induction is commonly used in Discrete Math and in Linear Algebra. It is even used incontinuous mathematics; in Calculus, for example, induction is used to prove integrationformulas involving powers of (or products of powers of) trig functions.

The Domino Image

Visualize a half-line (or a “ray”) of infinitely many dominoes. When are we guaranteedthat all the dominoes will eventually fall? If we are guaranteed the following:

• The first domino falls.(This corresponds to the Basis Step.)

• The fall of one domino guarantees the fall of the next domino.(This corresponds to the Inductive Step.)

The Proof of Our Formula

Conjecture:

The following is true for all positive integers n i.e., ∀n ∈Z+( ) :

Pn, which states that:

1+ 2 + 3+ ...+ n =

n n +1( )2

Basis Step:

Verify that P1 is true. (i.e., Verify that Pn

is true for n = 1.)

1=1 1+1( )

2

1=1 2( )

21= 1

This demonstrates that P1 is true, because we have shown that P1

is

equivalent to the true statement 1= 1.

Page 28: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.28

Note: If we only had to prove Pn for all integers n such that n ≥ 7 , say, then we

would verify P7 as our Basis Step.

Inductive Step:

Let k be any fixed positive integer. (Some books use n; whatever you do, beconsistent throughout the problem!)

Assume that Pk is true. (This assumption is called the Inductive Hypothesis, which

we will abbreviate as I.H.)

Using the Domino Image: Assume that the kth domino has fallen.

Here, we assume: 1+ 2 + 3+ ...+ k =

k k +1( )2

Show that Pk+1 is then true.

Using the Domino Image: We must then show that the k +1( )st

domino must

then fall as a result.

Here, we must show that, as a result:

1+ 2 + 3+ ...+ k +1( ) = k +1( ) k +1( ) +1( )

2, or

k +1( ) k + 2( )2

This is somewhat similar to a verification problem in trig in that the right-hand side is something of a TARGET.

Page 29: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.29

1+ 2 + 3+ ...+ k +1( ) = 1+ 2 + 3+ ...+ kApply the I.H. to this. + k +1( )

=k k +1( )

2+ k +1( )

=k k +1( )

2+

2 k +1( )2

=k k +1( ) + 2 k +1( )

2

=k + 2( ) k +1( )

2from Factoring( )

=k +1( ) k + 2( )

2TARGET( )

Note: The argument above works even for k = 1, k = 2 , and k = 3, eventhough the first line may seem incompatible with those cases.

Conclusion

We may now write:

∴ Pn is true for all positive integers n.

or

Pn is true for all positive integers n. QED.

Note: QED stands for the Latin phrase Quod Erat Demonstrandum.It effectively means “that which was to have been proven.”

Read p.648 in Larson for formulas for sums of powers of the first n positive integers.

Challenge Problem

Use induction to prove that every amount of postage greater than or equal to 12 cents canbe formed by using just 4- and 5-cent stamps.

Page 30: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.30

SECTION 9.5: THE BINOMIAL THEOREM

PART A: INTRO

How do we expand a + b( )n

, where n is a nonnegative integer?

a + b( )0 = 1

a + b( )1 = a + b

a + b( )2 = a2 + 2ab+ b2

a + b( )3 = a + b( ) a + b( ) 2

Do first

= a3 + 3a2b + 3ab2 + b3

a + b( )10 = YUK!

Look for patterns

Take

a + b( )3 . Let’s look at the variable parts of the terms.

a + b( )3 = a3Startswitha3

+ 3a2b + 3ab2 + b3Endswithb3

At each step,

• the exponent on a

↓ by 1

• the exponent on b

↑ by 1

a0 = 1, b0 = 1, so they are “invisible.”

Each term has degree 3.

Page 31: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.31

In general,

a + b( )n = an +… + bnn+1( ) terms

(n is a whole number)

(# terms = power + 1)

What about the coefficients? They are given by …

PART B: PASCAL’S TRIANGLE

The ingredients:

“Tent” of “1”sAny other entry = sum of the two entries immediately above

Row n gives the coefficients for

a + b( )n .

a + b( )0 = 1

a + b( )1 = a + b

a + b( )2 = a2 + 2ab + b2

a + b( )3 = a3 + 3a2b+ 3ab2 + b3

a + b( )4 = a4 + 4a3b + 6a2b2 + 4ab3 + b4

(See my website for some magical properties of Pascal’s triangle!)

Page 32: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

(Chapter 9: Discrete Math) 9.32

PART C: EXPANDING POWERS OF GENERAL BINOMIALS

Example

Expand and simplify

3x − y( )3 using the Binomial Theorem.

Solution

We will use the template for

a + b⎡⎣ ⎤⎦3.

3x − y( )3

= 3xSuba= 3 x

+ −y( )Subb =−y

⎢ ⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥ ⎥

3

= a + b[ ]3

= a3 + 3a2b+ 3ab2 + b3

Sub back: a← 3x( ), b← −y( )= 3x( ) 3 + 3 3x( )2 −y( ) + 3 3x( ) −y( ) 2 + −y( )3

Simplify. First, do powers.= 27x3 + 3 9x2( ) −y( ) + 3 3x( ) y2( ) − y3

= 27x3 − 27x2y + 9xy2 − y3

Page 33: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

THE MAGIC OF PASCAL'S TRIANGLE

PASCAL'S TRIANGLE

This represents a way to write down the "early" binomial coefficients n

rÊËÁˆ¯̃

easily.

• Each row begins and ends with "1". (We have a "tent" of "1"s.)• Every other entry equals the sum of the two entries immediately above it.

Here it is:

1 Row 0: Contains 0

0ÊËÁˆ¯̃

1 1 Row 1: Contains 1

0

1

1ÊËÁˆ¯̃ÊËÁˆ¯̃

,

1 2 1 Row 2: Contains 2

0

2

1

2

2ÊËÁˆ¯̃ÊËÁˆ¯̃ÊËÁˆ¯̃

, ,

1 3 3 1 Row 3: Contains 3

0

3

1

3

2

3

3ÊËÁˆ¯̃ÊËÁˆ¯̃ÊËÁˆ¯̃ÊËÁˆ¯̃

, , ,

1 4 6 4 1 Row 4: Contains 4

0

4

1

4

2

4

3

4

4ÊËÁ

ˆ¯̃ÊËÁ

ˆ¯̃ÊËÁ

ˆ¯̃ÊËÁ

ˆ¯̃ÊËÁ

ˆ¯̃

, , , ,

etc. - The "histograms" of the rows approach a bell-shaped "normal" distribution!

We can observe some basic properties of binomial coefficients:

Symmetry about the center: n

r

n

n rÊËÁˆ¯̃=

-ÊËÁ

ˆ¯̃

(The process of choosing r winners is equivalent to the process ofchoosing n-r losers.)

The "tent" of "1"s: n n

n01

ÊËÁˆ¯̃= ÊËÁˆ¯̃=

The "inner tent" of natural numbers: n n

nn

1 1ÊËÁˆ¯̃=

-ÊËÁ

ˆ¯̃=

(There are n ways to get one winner and n-1 losers from a group of npeople.)

Page 34: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

THE PLINKO / PACHINKO APPROACH TO PASCAL'S TRIANGLE

In the game of Plinko on the CBS game show "The Price is Right", contestants wonmoney by standing over a board full of pins and dropping chips. The chips then fell intobins at the bottom of the board; each bin was labeled with a dollar amount that was addedto the contestant's winnings.

Now imagine a pinboard shaped like Pascal's triangle:

Player

1 � After pin is hit, the chip can move left or right.

1 1 � After a pin is hit, the chip can move left or right.

1 2 1 � After a pin is hit, the chip can move left or right.

1 3 3 1 � After a pin is hit, the chip can move left or right.

1 4 6 4 1� After a pin is hit, the chip can move left or right.

It turns out that the number of ways to hit a pin is equal to the number on the pin!

Example

There are 3 ways to hit the boldfaced pin labeled "3" above.

One way: LLR

1� Left (L) - first "drop"

1 1� Left (L) - second "drop"

1 2 1� Right (R) - third "drop"

1 3 3 1

1 4 6 4 1

A second way: LRL

1� Left (L)

1 1� Right (R)

1 2 1� Left (L)

1 3 3 1

1 4 6 4 1

Page 35: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

A third way: RLL

1� Right (R)

1 1� Left (L)

1 2 1� Left (L)

1 3 3 1

1 4 6 4 1

The only way to reach the "3" is if there are exactly one "R" and two "L"sin any order. How many ways are there to choose exactly one of the three

drops to be an "R"? 3

1ÊËÁˆ¯̃

, which the 3 represents!

Likewise, there are 6 ways to hit the "6" pin, because out of four drops, we

need exactly two of them to be "R"s. There are 4

26

ÊËÁˆ¯̃= ways to do this.

Remember the construction of Pascal's triangle:

• Each row begins and ends with "1". (We have a "tent" of "1"s.)• Every other entry equals the sum of the two entries immediately above it.

How does the Plinko model exhibit this?

Example

1

1 1

1 2 1

1 3 3 1

1 4 6 4 1

There is 1 way to hit the "1" (all "L"s).Then, you can move right to hit the "4".

There are 3 ways to hit the "3".Then, you can move left to hit the "4".

So, there are 4 total ways to hit the "4".

Note: If you go to a science museum that has a "Plinko-type" board with numerous ballsbeing dropped from the top-center, the bottom of the board should look like a bell curve!

Page 36: CHAPTER 9: DISCRETE MATH - kkuniyuk.comChapter 9: Discrete Math) 9.01 ... Calculus tends to deal more with “continuous” mathematics than “discrete ... This may not have been

EXPANDING POWERS OF BINOMIALS: THE BINOMIAL THEOREM(MATH 96)

Remember that Row n of Pascal's Triangle provides the coefficients for the expansion ofa b n+( ) :

a bna

na b

na b

n

nbn n n n n+( ) = Ê

ËÁˆ¯̃

+ ÊËÁˆ¯̃

+ ÊËÁˆ¯̃

+ + ÊËÁˆ¯̃

- -

0 1 21 2 2 ...

Example

(a+b)3 = 1 3 3 13 2 2 3a a b ab b+ + +

Here's why this expansion of a b+( )3 is correct:

You can start by writing down 8 terms, each corresponding to a sequence ofchoices.

a b a b a b a b

a b a b a b

+ + + +( ) ( ) ( ) ( )=3

Choose" " or " "

Choose" " or " "

Choose" " or " "

124 34 124 34 124 34

a b aaa

b

aab aba baab

abb bab bbab

bbb

a

a b

ab

b

+( ) = ¨ÊËÁˆ¯̃

ÏÌÔ

ÓÔ

+ + + ¨ÊËÁˆ¯̃

ÏÌÔ

ÓÔ

+ + + ¨ÊËÁˆ¯̃

ÏÌÔ

ÓÔ

+

3

3

3

3

2

2

3

{

1 2444 3444

1 2444 3444

3

0= 1 way to never

choose " "

3

1= 3 ways to choose " "

exactly once among the 3 factors

3

2= 3 ways to choose " "

exactly 2 times among the 3 factors

1123 ¨ÊËÁˆ¯̃

ÏÌÔ

ÓÔ

= + + +

3

3= 1 way to always

choose " "b

a a b ab b3 2 2 33 3

Notice that choosing the "a" or the "b" from each factor is analogous to dropping"left" or "right" at each step in our Plinko model!