22.02.2014 Views

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Fibonacci Example: A young pair <strong>of</strong> rabbits (1 male, 1 female) arrive on a<br />

deserted island. They can breed after they are two months old and produce<br />

another pair. Thereafter each pair at least two months old can breed once a<br />

month. How many pairs f n <strong>of</strong> rabbits are there after n months.<br />

• n = 1: f 1 = 1 Initial<br />

• n = 2: f 2 = 1<br />

conditions<br />

• n > 2: f n = f n-1 + f n-2 Recurrence relation<br />

The n > 2 formula is true since each new pair comes from a pair at least 2<br />

months old.<br />

Example: For bit strings <strong>of</strong> length n < 3, find the recurrence relation and initial<br />

conditions for the number <strong>of</strong> bit strings that do not have two consecutive 0’s.<br />

• n = 1: a 1 = 2 Initial {0,1}<br />

• n = 2: a 2 = 3 conditions {01,10,11}<br />

• n > 2: a n = a n-1 + a n-2 Recurrence relation<br />

For n > 2, there are two cases: strings ending in 1 (thus, examine the n41 case)<br />

and strings ending in 10 (thus, examine the n42 case).<br />

127<br />

Definition: A linear homogeneous recurrence relation <strong>of</strong> degree k with constant<br />

coefficients is a recurrence relation <strong>of</strong> the form<br />

where {c i },R.<br />

a n = c 1 a n41 + c 2 a n42 + … + c k a n4k ,<br />

Motivation for study: This type <strong>of</strong> recurrence relation occurs <strong>of</strong>ten and can be<br />

systematically solved. Slightly more general ones can be, too. The solution<br />

methods are related to solving certain classes <strong>of</strong> ordinary differential equations.<br />

Notes:<br />

• Linear because the right hand side is a sum <strong>of</strong> previous terms.<br />

• Homogeneous because no terms occur that are not multiples <strong>of</strong> a j ’s.<br />

• Constant because no coefficient is a function.<br />

• Degree k because a n is defined in terms <strong>of</strong> the previous k sequential terms.<br />

128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!