This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: RECURRENCE EQUATION We solve recurrence equations often in analyzing complexity of algorithms, circuits, and such other cases. A homogeneous recurrence equation is written as: a t n + a 1 t n1 + . . . . + a k t nk = 0. Solution technique: Step 1 : Set up a corresponding Characteristic Equation: a x n + a 1 x (n1) + . + a k x (nk) = 0, x (nk) [a x k + a 1 x (k1) + +a k ] = 0, a x k + a 1 x k1 + . . . . + a k = 0 [ for x =/= 0] Step 2 : Solve the characteristic equation as a polynomial equation. Say, the real roots are r 1 , r 2, . . . . , r k . Note, there are k solutions for kth order polynomial equation. Step 3 : The general solution for the original recurrence equation is: t n = i=1 k c i r i n Step 4 : Using initial conditions (if available) solve for the coefficients in above equation in order to find the particular solution . Example 1 : t n 3t n1 4t n2 = 0, for n >= 2. {Initial condition: t0=0, t1=1} Characteristic equation: x n 3x (n1) 4x (n2)...
View Full
Document
 Spring '12
 Dmitra
 Algorithms

Click to edit the document details