Mth401 Unit 2 All
Mth401 Unit 2 All
Mth401 Unit 2 All
Recurrence Relation
P
U
Many counting problems cannot be solved easily using the simple
counting techniques
L How many bit strings of length n do not contain two consecutive zeros?
P
U
L
P
U
L
P
U
L
P
U
Recurrence relations play important roles in the study of algorithms.
L
P
U
L
P
U
L
P
U
UNIT 2 Page 1
L
P A pair of rabbits does not breed until they are 2 months old. After
U
they are 2 months old, each pair of rabbits produces another Links
pair each month
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 2
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U Solving Linear Recurrence Relations
A linear homogeneous recurrence relation of degree k with constant
coefficients is a recurrence relation of the form
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 3
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 4
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U Solution of Linear Homogeneous
Recurrence Relations with CC
L Solution of Linear Non-homogeneous
P Recurrence Relations with CC
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 5
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 6
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 7
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
Solve an=2an-1 a
-- 2 n-2
L
P
U
L
P
U
L
P
U
L
P
U
L
Exercises:
P
U
1.Determine which of these are linear homogeneous recurrence relations
with constant coefficients. Also, find the degree of those that are.
UNIT 2 Page 8
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
Solution of Linear Non-homogeneous Recurrence Relations
with Constant Coefficients
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 9
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 10
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 11
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 12
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 13
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 14
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
L
P
U
UNIT 2 Page 15
L
P
U
UNIT 2 Page 16