Chapter 5-3
Chapter 5-3
R E C U R R E N C E R E L AT I O N S
VARIATIONS ON SOLVING RECURRENCE
RELATIONS WITH CONSTANT COEFFICIENTS
• So the solution is
an = R(2n) + S(4n) + 1
• You have to go through this entire process every time
• Since 1 is not a root of the characteristic equation, the particular solution has the form
an = D1n2 + D2n + D3
• Notice that
an-1 = D1(n-1)2 + D2(n-1) + D3
an-2 = D1(n-2)2 + D2(n-2) + D3
• We have
D1n2 + D2n + D3 = 2[D1(n-1)2 + D2(n-1) + D3] + 8[D1(n-2)2 + D2(n-2) + D3] + 81n2
• Expanding powers of n gives
D1n2 + D2n + D3 = 2D1(n2-2n+1) + 2D1D2(n-1) + 2D1D3 + 8D1(n2-4n+4) + D2(n-2) + D3 + 81n2
• Distributing and grouping based on powers of n gives
(–9D1 – 81)n2 + (36D1 – 9D2)n + (34D1 + 18D2 – 9D3) = 0
• Since this must be true for all n, we have three separate equations
(–9D1 – 81) = 0
(36D1 – 9D2) = 0
(34D1 + 18D2 – 9D3) = 0
FINISHING THE PROBLEM
• an = 4an-1 – 3an-2 + 20
• The homogeneous version of the problem is?
• The characteristic equation is?
• The roots of the characteristic equation are?
• The solution to the homogeneous equation is?
• See if you can also determine what f(n) is
• Now, we take the Undecider, use it as input to itself, and give this to the Halting Decider
• p. 244, #41-47