0% found this document useful (0 votes)
2 views

Modelling Problems

The document discusses applications of recurrence relations through two classic problems: the Fibonacci sequence related to rabbit populations and the Tower of Hanoi puzzle. It establishes the recurrence relation for rabbit pairs as fn = fn−1 + fn−2 with initial conditions f1 = 1 and f2 = 1, leading to the Fibonacci numbers. For the Tower of Hanoi, it derives the relation Hn = 2Hn−1 + 1 with initial condition H1 = 1, ultimately showing that Hn = 2n - 1.

Uploaded by

ameenasaja919
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Modelling Problems

The document discusses applications of recurrence relations through two classic problems: the Fibonacci sequence related to rabbit populations and the Tower of Hanoi puzzle. It establishes the recurrence relation for rabbit pairs as fn = fn−1 + fn−2 with initial conditions f1 = 1 and f2 = 1, leading to the Fibonacci numbers. For the Tower of Hanoi, it derives the relation Hn = 2Hn−1 + 1 with initial condition H1 = 1, ultimately showing that Hn = 2n - 1.

Uploaded by

ameenasaja919
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Applications of Recurrence Relations

Rabbits and the Fibonacci Numbers


Consider this problem, which was originally posed by Leonardo Pisano, also known as Fibonacci, in the
thirteenth century in his book Liber Abaci. A young pair of rabbits (one of each sex) is placed on an island.
A pair of rabbits does not breed until they are 2 months old. After they are 2 months old, each pair of
rabbits produces another pair each month, as shown in Figure 1. Find a recurrence relation for the number

of pairs of rabbits on the island after n months, assuming that no rabbits ever die.

Solution: Denote by fn the number of pairs of rabbits after n months. We will show that fn , for
n = 1, 2, 3, . . ., are the terms of the Fibonacci sequence.

The rabbit population can be modeled using a recurrence relation. At the end of the first month, the
number of pairs of rabbits on the island is f1 = 1. Because this pair does not breed during the second month,
f2 = 1 as well.

To find the number of pairs after n months, add the number of pairs on the island the previous month,
fn−1 , and the number of newborn pairs, which equals fn−2 , because each newborn pair comes from a pair
at least 2 months old.
Consequently, the sequence {fn } satisfies the recurrence relation:

fn = fn−1 + fn−2 , forn ≥ 3

together with the initial conditions f1 = 1 and f2 = 1.


Because this recurrence relation and the initial conditions uniquely determine this sequence, the number
of pairs of rabbits on the island after n months is given by the nth Fibonacci number.

1
Tower of Hanoi
A popular puzzle of the late nineteenth century, invented by the French mathematician Édouard Lucas,
called the Tower of Hanoi, consists of three pegs mounted on a board together with disks of different sizes.
Initially, these disks are placed on the first peg in order of size, with the largest on the bottom (as shown in
Figure 2).

The rules of the puzzle allow disks to be moved one at a time from one peg to another as long as a disk
is never placed on top of a smaller disk. The goal of the puzzle is to have all the disks on the second peg in
order of size, with the largest on the bottom. Let Hn denote the number of moves needed to solve the Tower
of Hanoi problem with n disks. Set up a recurrence relation for the sequence {Hn }. Schemes for efficiently
backing up computer files on multiple tapes or other media are based on the moves used to solve the Tower
of Hanoi puzzle.

Solution: Begin with n disks on peg 1. We can transfer the top n − 1 disks, following the rules of the puzzle,
to peg 3 using Hn−1 moves (see Figure 3 for an illustration of the pegs and disks at this point). We keep
the largest disk fixed during these moves.

Then, we use one move to transfer the largest disk to the second peg. We can transfer the n − 1 disks
on peg 3 to peg 2 using Hn−1 additional moves, placing them on top of the largest disk, which always stays

2
fixed on the bottom of peg 2.

Moreover, it is easy to see that the puzzle cannot be solved using fewer steps. This shows that:

Hn = 2Hn−1 + 1.

The initial condition is H1 = 1, because one disk can be transferred from peg 1 to peg 2, according to the
rules of the puzzle, in one move.

We use the recurrence relation repeatedly to express Hn in terms of previous terms of the sequence:

Hn = 2Hn−1 + 1
= 2(2Hn−2 + 1) + 1 = 22 Hn−2 + 2 + 1
= 22 (2Hn−3 + 1) + 2 + 1 = 23 Hn−3 + 22 + 2 + 1
..
.
= 2n−1 H1 + 2n−2 + 2n−3 + · · · + 2 + 1.

Using the initial condition H1 = 1:

Hn = 2n−1 + 2n−2 + · · · + 2 + 1
= 2n − 1.

You might also like