1 / 19

Homogeneous Linear Recurrences

Homogeneous Linear Recurrences. To solve such recurrences we must first know how to solve an easier type of recurrence relation:

regina
Download Presentation

Homogeneous Linear Recurrences

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence relation is said to be homogeneous if it is a linear combination of the previous terms of the recurrence without an additional function of n or a constant. • an = 2an-1 is homogeneous • an = 2an-1 + 2n-3 - an-3 is not. • bk= 2bk-1 - bk-2 + 4bk-3 + 2is not.

  2. Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence relation is said to be homogeneous if it is a linear combination of the previous terms of the recurrence without an additional function of n or a constant. • an = 2an-1 is homogeneous • an = 2an-1 + 2n-3 - an-3 is not. • bk= 2bk-1 - bk-2 + 4bk-3 + 2is not.

  3. First Order Homogenous Recurrences Quiz tomorrow from Solving Recurrence Relations Closed Form Solution: Characteristic equation General Solution: Using initial conditions:

  4. Solving Homogenous Recurrences Finding a closed form solution to a recurrence relation. Multiply both sides by Characteristic equation roots

  5. Example continued… The closed form solution is given by: Let be the solution. 1 Where constants A and B are to determined by employing initial conditions. Plug in n = 0 in equation 1 to obtain: Plug in n = 1 in equation 1 to obtain: Adding the two equation, we get

  6. Example continued… By substituting A = 3 and B = -2 in equation 1, we get the final solution in the closed form: Verification Test Data

  7. Example 2 The closed form solution is given by: Using initial conditions:

  8. Solution of Fibonacci Recurrence Solve the quadratic equation: r 2= r +1 r 2- r -1 = 0 to obtain r1 = (1+5)/2 r2 = (1-5)/2 General solution: an = A [(1+5)/2]n +B [(1-5)/2]n Characteristic equation

  9. Fibonacci Recurrence Use initial conditions a0= 0, a1= 1 to find A,B andobtain specific solution. 0=a0= A [(1+5)/2]0+B [(1-5)/2]0 = A +B That is A +B = 0 --- (1) 1=a1= A [(1+5)/2]1+B [(1-5)/2]1 =A(1+5)/2+B (1-5)/2 =(A+B )/2 + (A-B )5/2 That is (A+B )/2 + (A-B )5/2 = 1 or (A+B ) + (A-B )5 = 2 -- (2) First equation give B = -A. Plug into 2nd: A = 1/5, B = -1/5 Final answer:

  10. Case where the roots are identical Finding a closed form solution to a recurrence relation when the roots are identical. Test Data The closed form solution is given by:

  11. Where constants A and B are to determined by employing initial conditions. I Plug in k = 0 in equation 1 to obtain: Plug in k= 1 in equation 1 to obtain:

  12. A variation of the previous Example Finding a closed form solution to a recurrence relation when the roots are identical. Test Data The closed form solution is given by:

  13. Where constants A and B are to determined by employing initial conditions. I Plug in k = 0 in equation 1 to obtain: Plug in k= 1 in equation 1 to obtain:

  14. Relationship between Recurrence Relation and Sequences Finding sequences that satisfy a recurrence relation. The given recurrence is satisfied by the following sequences: b0, b1, b2, …. 1, (2)1, (2)2, (2)3 , … 1, (5)1, (5)2, (5)3 , … Characteristic equation Or 1, 2, 4, 8, … 1, 5, 25, 125, …

  15. Verification 1, 2, 4, 8, … 1, 5, 25, 125, …

  16. Practice Problem List first 5 terms of sequence generated by the recurrence. Solve the recurrence in the close form. Step 1: Write characteristic equation. Step 2: Find roots of the characteristic equation. Step 3: Write the general solution. Step 4: Find constants A and B using boundary conditions. Step 5: Substitute constants in the general solution.

  17. Solving Recurrences using Spreadsheet

  18. 3rd order Homogenous Recurrences Where A, B, and C are constants to be determined by using boundary conditions. Let r = 0 Characteristic equation (I) Let r = 1 Roots D = 1, D = 2, and D = 3 General Solution: (II)

  19. 3rd order Homogenous Recurrences Let r = 2 The solution is not complete. (III) We have to solve (I), (II), and (III) simultaneously for A, B, and C.

More Related