+ All Categories
Home > Documents > Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Date post: 08-Nov-2014
Category:
Upload: michael-lin
View: 37 times
Download: 0 times
Share this document with a friend
Description:
qweqwe
11
Raffles Institutio H3 Mathematics Year 6 2012 ______________________ Chapter 6 Recurrence Relations Prerequisite Permutation and Combination Addition and Multiplication P Content 1. Introduction 2. More Problems 3. Exercise 1 Introduction Let’s begin our discussion with the Example 1 Figure 1 shows a 9-step staircase Suppose that each time, the boy e there for the boy to climb the stairc 1 3 2 on 9810 ______________________________ __________________________ Chapter 6 Rec Principles e following counting problem. . A boy wishes to climb the staircase up to th either climbs up one step or two steps. How m case to reach the highest step? Figure 1 4 5 6 7 8 __ _______________ currence Relations Page 1 of 11 he highest step. many ways are 9
Transcript
Page 1: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution

H3 Mathematics 9810

Year 6 2012

____________________________________________________

Chapter 6

Recurrence Relations Prerequisite

• Permutation and Combination

• Addition and Multiplication Principles Content 1. Introduction

2. More Problems

3. Exercise

1 Introduction

Let’s begin our discussion with the following counting problem.

Example 1

Figure 1 shows a 9-step staircase. A boy wishes to climb the staircase up Suppose that each time, the boy either climbs up one there for the boy to climb the staircase

1

3

2

Raffles Institution

H3 Mathematics 9810

____________________________________________________

________________________________________Chapter 6 Recurrence Relations

Addition and Multiplication Principles

Let’s begin our discussion with the following counting problem.

step staircase. A boy wishes to climb the staircase up to the highest step. e, the boy either climbs up one step or two steps. How many ways are

there for the boy to climb the staircase to reach the highest step?

Figure 1

4

5

6

7

8

____________________________________________________

________________________________________ Recurrence Relations

Page 1 of 11

the highest step. step or two steps. How many ways are

9

Page 2: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 2 of 11

After some thought, the techniques and principles that we have learnt in the previous chapters may not be of much help. Splitting into cases is tedious and so the Addition Principle will not be used. As there doesn’t seem to be any fixed set of stages from the ground to the ninth step, the Multiplication Principle can’t be used. No bijection is obvious and we cannot

easily find sets Ai, i = 1, 2, …, n such that A = 1 2 ... nA A A∪ ∪ ∪ or A = 1 2 ... nA A A∩ ∩ ∩ which

means the General Principle of Inclusion and Exclusion is not useful either.

Using a different approach, let us consider simpler cases to analyse the problem better.

When the staircase consists of 1, 2 or 3 steps, the ways of climbing the staircase is 1, 2 and 3 respectively. (See Figure 2)

(i) 1-step

(ii) 2-step

(iii) 3-step

Figure 2

Page 3: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 3 of 11

How about a 4-step staircase? The number of ways is now 5 and the 5 different ways are shown in Figure 3. Let us look at the 4-step case and analyse why we have 5 ways here. We begin by

asking “What can the boy do for his first move?” By assumption, he can cover 1 or 2 steps, so we now consider two cases: (i) Suppose the first move covers 1 step, then there are 3 steps left. How many ways are

there to climb the remaining 3 steps? Can we link it to the 3-step case? There are 3 ways to climb the 3-step staircase. Hence we will get 3 different ways to climb the 4-step staircase as shown in (1)-(3) of Figure 3

(ii) Suppose the first move is to cover 2 steps. Then there are 2 steps left. Since there are 2

ways to climb the 2-step staircase as shown in Figure 2, we will get 2 different ways to climb the 4-step staircase as shown in (4)-(5) of Figure 3.

Hence by applying AP, we will have 3 + 2, i.e. 5 different ways to climb the 4-step staircase. From the above analysis, we have learnt that the problem involving more steps can be

obtained from the solutions of similar problems involving less steps. If it works for ‘4-step’, can it work for any ‘n-step’?

Now, given any integer n ≥ 4, for convenience, let us denote by an, the number of ways to climb an n-step staircase. Thus, our previous records show that a1= 1, a2 = 2, a3 =3 and a4 = 5. Indeed, we have just witnessed that a4 = a3 + a2. Can we get a similar ‘equality’ for an?

(1)

(4)

(2) (3)

(5)

Figure 3

Page 4: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 4 of 11

Suppose the boy is to climb an n-step staircase. His first move can cover, by assumption, either 1 step or 2 steps. Consider two cases as follows: Case 1: The first move covers 1 step.

Then there are n −1 steps left. How many ways are there to climb these remaining n −1 steps?

By definition there are an − 1 ways. Case 2: The first move covers 2 steps.

Then there are n −2 steps left. How many ways are there to climb these remaining n −2 steps?

By definition there are an− 2 ways.

Combining the results of these two cases by applying AP, we conclude that an = an− 1 + an− 2 for

n ≥ 3. The original problem asks for the determination of a9 , we shall evaluate it using the above

result together with some initial values (for instance a1 = 1, a2 = 2, a3 = 3, a4 = 5). Applying our result successively, we have:

a5 = a4 +a3 = 5+3= 8, a6 = a5 +a4 = 8+5 = 13, a7 = a6 +a5 = 13+8 = 21, a8 = a7 +a6 = 21+13 = 34, a9 = a8 +a7 = 34+21 = 55. In this example, we obtain a sequence of numbers, namely, 1, 2, 3, 5, 8, 13, 21, 34, 55, …...

This sequence is known as the Fibonacci numbers, named after the Italian mathematician

Leonardo Fibonacci (1170-1250). This relation an = an−1 +an−2 is an example of a recurrence relation. 1.1 Definition

Given a sequence of numbers 1 2, ,..., ,...na a a , a recurrence relation is an equation

which expresses the nth term, an for a general n, in terms of some preceding terms in the sequence. To initiate the computation of the terms of a recurrence relation, we need to know the values of some initial terms of the sequence, which are known as the initial conditions of the recurrence relation.

For instance, a1 = 1 and a2 = 2 are the initial conditions of the abovementioned Fibonacci recurrence relation in Example 1.

Page 5: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 5 of 11

2 More Problems

Example 2 A tower of n circular discs of different sizes is stacked on one of the 3 given pegs in decreasing size from the bottom, as shown in Figure 4. The task is to transfer the entire tower to another peg by a sequence of moves under the following conditions: (i) each move carries exactly one disc, and (ii) no disc can be placed on top of a smaller one. What is the minimum number of moves required to accomplish the task?

Figure 4

For n ≥ 1, let bn denote the minimum number of moves needed to accomplish the task with n

discs. When n =1, it is clear that one move is enough, so b1=1. When n = 2, the following sequence of moves as shown in Figure 5 shows that 3 moves will complete the task. Thus b2 = 3.

Figure 5

(1)

(3)

(2)

(4)

Page 6: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 6 of 11

Consider the case when n = 3, the sequence of moves shown in Figure 6 shows that seven moves will do the job.

Figure 6

Is ‘7’ the minimum number of moves required? As shown in Figure 6, before the largest disc can be moved to another peg, we have to transfer the entire tower of two smaller discs to a peg. We know that this requires b2 moves. Next, we move the largest disc to the empty peg. Finally, we have to transfer the entire tower of two smaller discs and place it on the largest disc which requires another b2 moves. Thus we need b2 + 1 + b2, i.e. 2b2 + 1 moves to accomplish this task. This result shows that b3 = 7.

(1)

(3)

(2)

(4)

(5) (6)

(7) (8)

Page 7: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 7 of 11

Imagine now we have a tower n (≥3) discs stacked on one of the 3 pegs as shown in Figure 7, the task of transferring the entire tower of n discs to another peg can be done via the following steps:

1. Transfer the top n −1 discs to another peg. 2. Move the largest disc from the original peg to the only empty peg (see Figure 8).

3. Transfer the entire tower of n −1 smaller discs to the peg that the largest disc is currently placed.

The minimum number of moves for step 1, 2 and 3 are bn −1, 1 and bn −1 respectively. Hence the

minimum number of moves for the whole task is bn −1 + 1 + bn −1.

By the definition of bn, we have bn = 2 bn −1 + 1, 2n ≥ .

Figure 7

Figure 8

n

n − 1

Page 8: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 8 of 11

Figure 9

This problem described in Example 2 is known as the Tower of Hanoi which was first formulated and studied by Francois Edouard Anatole Lucas (1842-1891) in 1883. The recurrence relation can be solved as follows:

( ) ( )2

1 2 3

3 2

3

2 1 2 2 1 1 2 2 1 2 1

2 2 2 1

....

n nn n

n

b b bb

b

− − −

+ = + + = + + +

= + + +

=

=

3

3

1 2

1

1 2

1

=2 2 2 ... 2 1

=2 2 2 ... 2 1

2 1 2 1

2 1

n

n

n n

n n

nn

b

b

− −

− −

+ + + + +

+ + + + +

−= = −

In the following example 3, we will look at another counting problem about rabbits which can be found in the book entitled ‘Liber abbaci’ (Book of the Abacus) written by the Italian mathematician Leonardo Fibonacci (1170-1250).

Example 3

Beginning with a pair of new-born rabbits, and assuming that each pair gives birth to a new pair each month starting from the second month of its life, how many pairs will there be after one year?

Solution: Let Fn denote the number of pairs of rabbits at the end of the nth month.

n − 1

Page 9: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 9 of 11

Month

1st 2

nd 3

rd 4

th 5

th______

Fn = (no. of pairs of rabbits in the previous month) +( no. of pairs of newborn rabbits that were born from fertile rabbits that were alive 2 months ago)

= Fn−1 + Fn−2 for all n ≥3.

After 1 year, the number of pairs of rabbits is 12 144F = .

Note that in Example 1, our initial values are a1 = 1 and a2 = 2 while in Fibonacci’s counting problem about rabbits, we have F1 = F2 = 1.

Example 4

Suppose that a person deposits ten thousand dollars in a savings account at a bank yielding 5%

interest per year compounded annually. Find a recurrence relation for nP , the amount of money

in dollars in the account after n years and write down the initial conditions. Hence, find the amount of money in the account after 30 years.

Solution: Given P0 = 10 000, then P1 = P0+ 0.05 P0

=1.05P0

In general, Pn = n+

∈� with initial condition, P0 = 10 000

After 30 years, P30 = 1.05 P29 =1.05 (1.05 P28) = 1.052

P28

=1.052 (1.05 P27)

=… = 1.0530

P0 = 43219.42 (nearest cent) The amount of money in the account after 30 years is $43219.42 (nearest cent).

Month No. of pairs of rabbits

1 1 F1 =1

2 1 F2 =1 3 1+1 F3 = 2

4 1+1 +1

F4 = 3

5 1+1+1 +1+1

F5 = 5

Page 10: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 10 of 11

Example 5

A permutation naaa …21 of Nn is called a derangement (nothing is in its right place) of Nn if

iai ≠ for each ni ,,2,1 …= . Denoting the number of derangements of Nn by Dn, show that

( )( )211−−

+−= nnn DDnD .

Solution:

The first digit cannot be ‘1’, so there are n −1 choices for the first digit. Suppose the first digit is ‘2’.

Case 1: If ‘1’ is placed in the second position, the number of ways to arrange the remaining n −2 digits such that none is in its right place is given by . Case 2: If ‘1’ is not placed in the second position, then the number of ways to arrange 1, 3, 4, …, n such that none is in its right place is given by . Total number of derangements if the first digit is ‘2’ = .

A similar argument holds for the other n −2 cases.

By MP, Dn = (n −1)(Dn−1+Dn−2) , n ≥ 3 where D1 = , D2 = 3 Exercise

1. Kenny buys exactly one item from the following list each day: (Assume unlimited

supply) Scissors $1 Glue $1 Paper $2 Pens $2 Tape $2 File $4

Find a recurrence relation for nc , the number of different sequences by which Kenny

could spend exactly n dollars and write down the initial conditions.

2. A n×2 rectangle is to be paved by 21× identical blocks. Let na represent the number

of ways this can be done. Find a recurrence relation for na .

3. Find a recurrence relation with initial conditions for nb , the number of sequences in

which 10 cents, 20 cents and 50 cents could be inserted into a vending machine to purchase a drink costing 10n cents. How many sequences are there to purchase an 80 cents drink?

Page 11: Microsoft Word - 2012_Chap 6 Recurrence Relation_notes_student

Raffles Institution H3 Mathematics 9810 Year 6 2012 ____________________________________________________

_________________________________________ Chapter 6 Recurrence Relations

Page 11 of 11

4. Suppose that there is an unlimited supply of blue, green, red and yellow counters, which are indistinguishable except for colour. Find a recurrence relation for the number of ways

ns , to stack n counters such that a red counter and a green counter are not adjacent.

5. [2007/GCE A level/Qn9]

A team plays a series of games, each of which results in either a win (W), a draw(D) or a loss (L). (i) For a team which never has the same result in two successive games, how many

possible sequences of Ws, Ds and Ls are there in a series of n games? [2] (ii) Let Sn denote the number of possible sequences for a team which never loses two

successive games in a series of n games.

(a) Explain why, for n≥3, 1 22 2n n nS S S− −

= + . [4]

(b) Hence find 5S . [2]

(c) Prove that 2nS and 2 1nS+

are both divisible by 2n . [6]

6 [2011/RI/H3/Prelim/7a]

A k-digit ternary sequence is a sequence 1 2 3... ,k

a a a a where i

a = 0, 1 or 2 for eac

1, 2, ..., ,i k= where k+

∈� .

Let nx be the number of n-digit ternary sequences that do not contain “01” and n

y be the

number of n-digit ternary sequences that do not begin with “1” and do not contain “01”,

where and 2n n+

∈ ≥� .

(i) State the values of 2x and 3x . [2]

(ii) Explain, for 3n ≥ , why

(a) 1 12n n n

x x y− −

= + and

(b) 1n n nx x y

−= + .

Hence, find a recurrence relation for 1nx

+ in terms of n

x and 1nx

− for 3n ≥ . [5]

7 [2010/RI/H3/Prelim/8]

Square tiles are laid out in a row to form a walkway. Each tile is coloured either yellow, red or blue. There are a large number of identical tiles of each colour.

(i) Find the number of ways to lay out a row of n tiles, (a) if there are no restrictions, [1]

(b) so that there are exactly two red tiles among the n tiles, where n ≥ 5, with three tiles separating both red tiles. [2]

(ii) Let nx be the number of ways to lay out n tiles so that there are two red ones

that are adjacent.

(a) Explain why ( ) 21 22 3n

n n nx x x−

− −= + + for 4n ≥ .Hence find 5x . [6]

(b) Show that 3n nx x −− is divisible by 3 for n ≥ 5. [3]

(iii) Let ny be the number of ways to lay out n tiles so that there are three red ones

that are adjacent. Find a recurrence relation for ny for 6n ≥ . [2]

End of Chapter


Recommended