0% found this document useful (0 votes)
19 views21 pages

Recurrence Relation

The document discusses combinatorics, specifically the multinomial coefficient and its application in counting arrangements of objects with repetitions, illustrated through examples like the word 'ACCOUNTANT'. It also covers recurrence relations, defining sequences based on previous terms, and methods for solving linear recurrence relations with constant coefficients, including examples like the Fibonacci sequence. Additionally, it introduces techniques for finding particular solutions to non-homogeneous recurrence relations.

Uploaded by

riya2918ai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views21 pages

Recurrence Relation

The document discusses combinatorics, specifically the multinomial coefficient and its application in counting arrangements of objects with repetitions, illustrated through examples like the word 'ACCOUNTANT'. It also covers recurrence relations, defining sequences based on previous terms, and methods for solving linear recurrence relations with constant coefficients, including examples like the Fibonacci sequence. Additionally, it introduces techniques for finding particular solutions to non-homogeneous recurrence relations.

Uploaded by

riya2918ai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 21
COMBINATORICS Here ( n all possible ways to write na ice mime notes the number of distinguishable arrange nents of 1 Objects, in whieh ny objects of type Ley objects of type 2, 0.1 Objects OF type F Example 26, Find the number of arrangement of the teers in the word ACCOUNTANT Solution, ‘Total number of letters in the word ACCOUNTANT is 10, Out af wich © wecurs twice, C occurs twice, N occurs twice, T occurs twice and the rest are all different, Sitive some a the letters are repeated we need to apply multimonial th is } sans for sist tn called the inultiinenial coefficient and the atten Ie erver yhoo ny mye ‘eorem, Hence the number of arrangertrents 1 wie Sram = 226800 Like the term “binomial coefficient," the term “multinomial coefficient” comes from considering algebraic expressions. Given real numbers dy, tye ms dp consider the power ty a I = ye HM) ah He HY (UH oe #0 After performing this product but before collecting Hike terms, a typical term in this product has the form, wel" k ayNag" The coefficient of "a," .. wh? after colle terms is equal to the number of ways of picking m factors equal to aj, and n, factors equal to da, and so on, as we multiply the 1 copies of a + dy + .« + ay. This is precisely the multinomial coefficient n ny my oe My Example 27. What is the coefficient of yrcin(xneyt oh? Solution. This isthe same as how many ways one can choose x from three brackets, a y from two brackets and a z from two bracklets in the expansion. @weytDeryt (xt y4o) (9 factors} 9 9 i i =—=I5 ‘This can be done in ( > ) 312121 15120. 10.7( Recurrence Relation SEquence can be defined by giving a general formula for its nth term or by writing few of its terms, An alternative approach is to write the sequence by finding a relationship among its terme, Such a relationship is called a recurrence relation (sometimes called difference equation). For example, let us consider a sequence $= (34, 323% wnnsnin BY ssnenne) ‘This sequence can be defined by giving an explicit formula for its nth term ie. S = ( Sy } were &, = 3% Since the value of S, is three times the value ofS, forall n, once the value of S,..1 is known, the value of S, can be computed. The same sequence $ can be described by the relation S, = 3S)... 22 with the information $, ition : A recurrence relation for the sequence (S,} is an equation that relates S, in terms of cue or more of the previous terms of the sequence, namely Sp, Syp ..iuSy_4 fF all integer Scanned with CamScanner 340 DISCRETE MATHEMATICS. nZ ng, where ny is a non negative integer. The values Sy, ,-1 are explicitly given values and are not defined by recursive formula, They are called initial conditions or boundary conditions of the regurrence relation imple 28. The recurrence relatin of the sequence Ss {5, & 1, 14, 17 is S, = S,)+3.n22 with initial condition $, = 5. pple 29. The recurrence relation of the Fibonnaci Sequence of numbers, S = (1,1,2,3.5,8, 13. is S, = Spy +S,9 23 EA Note that the recurrence relation in example 29 requires only one inital condition S, = 5 to start up. The recurrence relation in example 30 expresses S, in terms of two previous Values and requires | _ two initial conditions S, = 1 and S, = 1 before all values of the recurrence are uniquely determined, A recurrence relation that defines a sequence can be directly converted to an algorithm to compute the sequence. >) Example 30, Find the first four terms of each of the following recurrence relation (@) a, = 2a, , + k, for all integers k > 2, a, = 1 (a, = a,_; + 3a,_, for all imegers k> 2, ag = 1, a, = 2. (© 4 =k (a_,P, for all integers k > I, ay = 1. Solution. (a) a =1 @, = 2a +2=2142=4 a, = 2a, +3=2443=11 a, = 2ay+4=2.1144=26 0) a =1 a, =2 = a +3a)=2431=5 a, = a, +3a,=543.2=11 © 1 a, = 1 (@yP=ll=l 2. (ay) a, = 3.(a,)? Example 31. Show that the sequence (2, 3,4,5, 24n, } for n 20 satisfies the recurrence relation a, =2a4_,-a_» k22. Solution. Let a, (nth term of the sequence) = 2+ a, = 2+k Gy) = 2+k-I)a1+k a _,=2+(k-2 =k Now 2a,_)- > = 214 H-k=2+k=qy % = 2a) 2 A reccurence relation for a particular sequence can be written more than one way. For example Scanned with CamScanner 343 COMBINATORICS Linear Ree clation with Constant Coefficients. ‘A linear recurrence relation with constant coefficients is of the form w We ea, | + eat, 9+ + C40, =f) Whitte 6,5 are cons a ; . jon is k, because a, can be expressed in terms ‘ants, )The order of the rel ; of preVToUs T terms ol — feral ie ie “order is the difference between the highest and lowest subscript of «,, ‘The degree of a relation is defined to be the highest power of dy. di Linear refer to the fact that every term containing an a, has exactly one such factor and t ‘occurs to the first power, The words constant coefficients mean each of the ¢;'s is a constant{ Fa) is identically zero c.. no terms occur that are not multiple of 4's, the relation is Known 2° “Homogeneous, oifervise itis non homogencous)A linear homogeneous recurrence relation wit |. Constant coefficients of degree & can also be writen a a, 18pay HC + oe FG #0 Example 35. (a) The recurrence relation a, = 24,,, @ linear homogeneous relation with constant coefficients of degree 1. (b) The recurrence relati na, 4 Oya : : 5 a ; t { is not a linear homogencous relation with constant coefficients as term such as d,_,4,.2 18 nO permitted. Each term is to be of the form ca, j (©) The recurrence relation a, ~ a, = 3 is not a linear homogencous relation with constant coefficients because the expression of the right hand side is not zero. 4.4 ’ (@) The recurrence relation a, Oy + Ay 2 is a linear homogeneous relation with constant coefficients of order 2. (saving Recurrence Relation") ‘Suppose we have a sequence that satisfies a certain recurrence relation and initial conditions. ‘An explicit formula which satisfy the recurrence relation with initial condition is called a solution / to the recurrence relation. ‘There are no general techniques that will enable one to solve all recurrence relations. There are, nevertheless, techniques that will enable us to solve linear recurrence relation with constant coefficients. (The three methods of solving recurrence relations are discussed here. 1. Meratfor 2. Characteristic roots and 3. Generating functions. Iteration Method: In this method the recurrence relation for a,, is used repeatedly to solve for a general expression for a, in terms of n, The mechanics of this method are described in terms of examples. Example 36. Solve the recurrence relation a, = 4) +2, n22 subject to initial condition a, = 3 Solution. We backtrack the value of a, by substituting the expression of a, . nt» Gy, and so on, until a pattern is clear. Given a, = a, 42 a Replacing n by n — 1 in (1), we obtain G4 = dy +2 From (1) 4, = G+ 2=(,9+2)4+2=4,,4+22 we Q) Replacing n by n — 2 in (1), we obtain yy = yg + 2 Scanned with CamScanner — nen bison E MATHEMATICS ne Be, from 2) 44 © iy yt DODD «aU, 442 Jn general a © ytkD Vor beans Mey AM N20 0,4 (nN 2094S), which ie an explicit formula, “ ‘ - ee More generally, if is a constant then one can solve My = 4444 (0), Sor n> J ina similar way Owen a, © 0d, 4 f(n) QB) fo, py = yy 6 flr) Fron 4) 4, = (Cd, Af I)) +S ln) = Cay 4 f(n-N4 fn) ve) Meplaing n by n~ 2 in 3), we obtain yy © Cy 4 f(n-2) From (4) 4, = Olea, s+ f(n~ 2) 4 firm M+ fn) wld, Fe? fin~24 fina fn) Jn yeneral, a, OF! fin hm I) 4 + of(n- 1+ f(n) For ken ay, = Cay JO) P2402) = Ca,4 DF) Jn Tower of Hanoi problem, we deduced the recurrence relation as a,= I4,,4+1 n>) ‘with the initial condition a= Using general formula, we get a, = 21, 14 20k BM Mrs 4 f(n—1) 4f(n) 4 2 = (2S — I= MA the solution 5 obtained as the sum of two part, the homogeneous solution, which satisfy the recurrence relation when the right hand of the relation is set to 0 ie.,f (n) = 0, and the particular solution, which satisfies the relation with f(n) on the right hand side. ‘The basic approach for solving homogeneous relation [f (n) = 0) is to Jook for solutions of the form a, = r*. Now a, = r* is a solutions of the recurrence relation Gy = Clg) # C1 + crs Cyl if and only if P= cls cyte + ogre Dividing both sides by r°~* P= ohh cyte or Pm cy! = et? = which is called the characteristic equation of the recurrence relation. The solutions of this ‘equation are called the characteristic roots of the recurrence relation. A characteristic equation of the Mth degree has & characteristic roots. Distinct roots: If the characteristics equation has distinct roots r,, ry form of the solutions for homogeneous equation is 4, = by! + byt by + + by where by, by b: ‘are constants which may be chosen to satisfy any initial conditions. Example 37. Solve a, = a, + 2a, n 2 2 with the initial conditions ay = 0, a, = 1. 7 Solution, The given recurrence relation 5 4, = @,44 2a,y ry then the general b, Scanned with CamScanner ue DISCRETE MATHEMATICS 2, L Solution. The given relation is ay ~ da, 4 + 4a, 0 Let risa solution of (1). ‘Then the characteris ‘Thus the general solut So, ay = 6) and a, Now ay = L gives by, and ay = 1 gives 2 (by + So, the general solution is is 2dr 4 =O which gives r= 2,2. by + nb,)2" = (L- Yann Example 40. Solve the recurrence relation _) + 2la,_5~ 1Ba,_, = 0 solution of the given equation. equation is r!—8P + 2Ir- 18 = 0 Solution, Let a, ‘The characterist te, M2? - 6+ 12r4 Or 18 = 0 or P(r-2)-6r(r-2)49(r-2) = 0 = or (r-2) (F-6r+9) = 0 or (r= 2) (r= 3)? = O which gives r= 2, 3,3 So the general solution is, a, = (by + by m3 + bo", Note : If the roots of the characteristic equation are complex then , need not be real. But we have considered only real valued sequence. So, we restrict our examples to lincar recurrence elation whose characteristic equations have only real roots. Non Homogencous Recurrence Re =: A second order non homogeneous linear recurrence relation with constant coefficients is of the form 4,294 Sty, + 60, = f(0) >) ‘The solution «, of the non homogeneous recurrence relation is the sum of a particular solution 4, and a solution of a,” of the associated linear homogeneous recurrence relation ie. a, = a,” + a,. There is no general method for finding the particular solution of a recurrence relation for J (n). However, for cértain types of functions f (1), the solution can be obtained by the method of inspection. This method for finding a particular solution is sometimes called the trial sequence method. Depending on certain forms of f (n), we consider a trial solution “containing a number of unknown constant coefficients which are to be determined by substitution in the recyrrebce rekatuib, The trial solutions to be used in each case are shown in the followin fable where A, Ay Ay... represent the unknown constant coefficients to be mined. f(n) Trial Function 47 (if b is not a root of characteristic equation) Ab Polynomial P (n) of degree m Ag+ Att Ag? + conn + Ag cP (n) Gif ¢ is not a root of characteristic (Ag+ Ain + Aye + equation FF (if b is a root of characteristic equation of multiplicity s) Ayn e"P (a) Gf c is a root of characteristic equation |i? (Ay + An + Ag+ ~ of multiplicity 1) AAI) Scanned with CamScanner tay, Tay -o OW fan Rearend cute Dinar hoomapenrence ereuerrenee relation with conttant eneffietents Lan a, = 6 1 8 eaten of (1) The charnetertatic equation fe 220 shee se re 2 abetinct real mete So the general solution is a KO eRe DT am Again a, = Oimplic: bob, = 0 Ando, = bamphee 2h by I ‘The solution of these two equations are b, = W/V and hb, == 17%. Hence the explicit solution ® piven by a, = amr aay- tr ‘Fxxampile 38, Solve she recurrence relation of the Fibonaci sequence of numbers f, = h it 22 with the umitial comdinod f, = I)fy = 1 rdoz.oe Sotution, Let. f, = 17 is a solution of the given equation, the characteristic eqqation is Faonted } re tS)? be r= 18 W572, r= (= V5)/2 are two distinct roots, So the general scalurtican ts Again a, © 1 implies by +b, = 1 a= 1 impties 41+ 45)/2+b,1-VS)/2=1 Solving these two equations we get C 1 mez ‘Thus the eth Fibonacci number is given explicitly by os (s8)-(55) 5 ee Biz 2 Multiple Roots: If the characteristic equation is (r - 1) (r — 3)' = 0, the root r= J is a repeated coat of mulipicity 3. When the repeated root occur, rule for non repeated root nec 19 be supplemented If r 4s 2 root of the characteristic equation of a given homogenous recurrence relation wit snuttiphoy a, then a, = PnP. wr, . ate sii solutions to the recurtence relation ‘Thus af the charactenstic solubon as ir ~ 1) (r ~ 3)° = 0, then 6 = Pe arc all solutions tw the conmmponding recurrence relation and homogeneous solution is dy = U2 toy + nly + bys Example 39, Solve the recurrence relation a, = 4a, wie ) ‘Scanned with CamScanner ¢ —_” COMBINATORICS a _IEF(H) isa Tina combination of these, the tial solution fs taken wx the sum of corresponding Wial functions with different unknown constant coetficients 14 he determined C (samt AL. Sofves thy 5 Sy gy 4 On, 8 2 with inital comaition dy» Land aye =F Solution, The asso cd) homiokencous recurience relation is yyy Say 4 Oa, 0 ve) Leta, = be a solution of (1). ‘ ‘The characteristic equation ix? Sr4 Ge O oe rm 32, So, the solution of (1) is a)! = Ca" 4 C2", “ ‘To find the particular solution of the given equation, let a,(” =A, Substituting in the given cvaton 2 ~SAt6=2=9 iN ‘ ae f= 1 which is « particular solution, Hence the general solution iva, = 4 a? | ® 1 ewedana Oo 1 To find Cy and C,, put n= 0 and a= Lin (2) dy = Cyt Ctl or, T= C)4+C,41 7 on C+, = 0 + @) Again, ay = 3C,42C) +1 or, =1 = 3C,42C)41 or, 3C, + 2 -2 1 @) Solving (3) and (4), we get C, = ~2and C, = 2.* Putting the values of C, and C, in (3), the required solution is. a, =~ 2.34 2.2"+ 1 Ive the following, 27 Ina 7 Yn FL Solution, Substituiing, y,, Example 4: sociated homogeneous recurrence relation, the characteristic equation is P= r-2 = 0 or, (r+ I (r-2) = 0 ‘This gives reared. . ‘The solution of the associated! homogencous Fecurrence relation is yy = CCl + C2" ! Let the particular solution of the given equation be +.” ) An Substituting in the given equa Ay + Ay (1 + 2) + Ay (tt 27 = [Ag + Ay (r+ 1) + AD (ne IP] = 2 (Ag + Ayn + Ay) = m of, (2 Ag + Ay + Ag) +E 28) + 2A) = 2Ay? =n? On comparing the coefficients Of like powers of 1, we have Ay + Ayu + Agi? (Since f (n) is polynomial of degrea 2 on, we have . = 2A, + Ay 4 3A, = 0 —, 2A, + 2A, = 0 yy 2A, = | 1G) From (3) A, = - 12 We have from (2) Ay = A) = 12 From (1) -2Ay~ 12-32 = 0 Aye -! Scanned with CamScanner A “ DISCRETE MATHEMATICS Therefore, particular solution of given recurrence relation is a, = = 1 ~ (1/2) n= (12) 2? Hence the general solution of the given recurrence relation is, a, = C)C1)"+ Cy. 2" 1 —ni2- (1/2) Example 43. Solve a, , ,-4a, ,, + 4a, = 2" Solution. Let a, = r* be a solution of the associated homogeneous recurrence relation -4a,,,+4a, = 0 Ins? On 42 The characteristic equation is P-4r+4 = 0 zs or (r-2F = 0 a BS has a single root 2 of multiplicity two. So the solution of associated homogeneous relation is a, = (C, + Cyn)2". To find the particular solution of the given relation, we note with multiplicity s = 2. So, the particular solution has the form a, given relation, we get Ag (n+ 2) 2°42 4 Ag (nt 1? 241 +4 Ag? 2" = 2" = 4Ay (n+ 2-8 Ay (n+ 1) +4 Agr 2 is a characteristic equation 2", Substituting in the = Ay = 18 Hence the general solution is a, = a +4,” (Cy + Cyn)2" + (1/8)? . 2", Exampie 44. What form does a particular solution of the linear homogeneous recurrenc relation a, , 7 ~ Ot, , 1 + 94, = f(n) have when f(n) = 3", f(n and f(n) Solution. Let, a, =r" be a solution of the associated homogeneous recurrence rel 6a, , +94, = 0 nea ‘The characteristic equation P-6r+9 = 0 or (r= 3 = has a single root 3 of multiplicity two. Thu tro = 3, the particular solution has the form Ag n?3". If f(n) = 03", the particular a has the form (Ag+ Ayn) 3% IES) =a (P+ 13", the’particular solution has the fon n? (Ag + Ayn + Apt)" Scanned with CamScanner 7 592 Disercte Mathematical Structures ‘The trial solutions corresponding to terms in f(r) to be used are depicted in the following table : Terms in fr) Trial Solution if B is a characteristic root of the| difference equation Gi) FP + Ry +t Fy (Pye + Pol Pye t Pra BY if Bis +F,_.)B" | not a characteristic root of the difference} ‘equation PO! Pitt Pot + Prt Pr 1 BY if B, is a characteristic root of multiplicity| @ Br Gil) FP + yah + m-1 (iv) sin (arr) oF cos (arr) + | Py cos (arr) +P, sin (ar) (%)__ B" sin (ar) or B cos (ar) BY (P, cos (cer) + Pa sin (r)] For the success of this method it is essential that no term of trial solution exists in homogeneous solution. If any term of trial solution exists in homogeneous solution then the whole trial solution is multiplied by some positive power of r which is just so large that no term of trial solution exists in homogeneous solution. Example 1. Find the particular solution of the following difference equation ,+5a,_+6q,_2=37.~ ea 1) Solution. Let the general form of the particular solution of difference squatig ( ay is “Py? + Pyr + P |e AckOnt Gan.) where Pj, Pp, and P, are constants to be determined. Substituting the expression in (2) into the LHS. of (1), we obtain = Pyr? + Por-+ P3+ SP, (r= 1)? + 5P_ (r— 1) + 5P3 +P (r— 2)? + 6P, (r—2) + 6P which on simplification gives 12P y= (34; — 12P2) r+ (29P, + 17P + 12P5). -) Comparing (3) with the R.H.S. of (1), we obtain the equations 12P,=3 34P, - 12P,=0 29P, - 17P, + 12P3=0. which yields 4d us =74'P3* 298 ‘Therefore, the particular solution of the difference equation (1) is oot 2447, , US, OP =P tag 28g “In general, when f(r) is of the form of a polynomial of degree t.in r “~ Fy Fy! + AF rt Pay sponding particular solution will be of the form Pil Pat Prt Pry ye Scanned with CamScanner Combinatorics 593 Example 2. Find the particular solution of the following difference equation + itt Seas + 60,040 37 2041, a Solution. The particular solution of the difference (1) is of the form, —< Nem al) = Pir +P, + Ayost Thus, (1) yields PerimerrtPy | Gat ON a?) + Sa?) + 6a?) =37-2r+1 en Py? + Por + Ps + SP; (7-1)? + SP2 (r—1) + 5P3 +6P, (7-2)?+ 6P, (r-2) + 6P3=37 -2r +1 which on simplification gives 12P 7? — (34P, - 12P,) r+ (29P) - 17P; + 12P3) = 37° -2r+ 1. ‘Comparing the two sides of (3), we obtain the equations 12P,=3 34P, - 12P,=3 29P, -17P, + 12P;=1 3) which yields 1p -B Ping Pam 24 ‘Therefore, the particular solution is o12,8,,0. oP =P +54" * a8 Example 3. Find the particular solution of the following difference equation : a,~24,_)+3d,_3= 1. om) ‘Therefore, the particular solution is a= 2 Example 4. Find the particular solution of the following difference equation : a, +5a,_\+64,_=42.4". » (1) Solution. Assume that the general form of the particular solution is pa’, (2) of (1), we obtain © Substituting the expression in (2) into the L.H. pats spa’~!+6P 4"? i 5,5)p4 Ee 21 py : 3 Pa --3) paring (3) with the RLHLS. of (1), we obtain A parndn dl or P=I6. fore, the particular solution is a =16.4", Scanned with CamScanner rf oy 594 © Discrete Mathematical Structures ———_ art In general, when f(r) is of the form B, the corresponding particular solution is of the | form PB’, if B is not a characteristic root of the difference equation. Also, when f(r) is of the form (Fl Fy et Rt Fy BO the comesponding particular solution is of the form (Pye + Pol "4+ Pr +P, 1) BY if B is not a characteristic root of the difference equation. ; Example 5. Find the particular solution of the following difference equation : @,+a,_)=3r2". (1) Solution. Clearly, 2 is not a characteristic root of the differerice equation (1). So, the general form of the particular solution is age am (Pyr+ Py) 2". { 2 (as (2) Substituing the expression in (2) into (1), we obiain (Pyr+ Py) 2’ + (Py (r= 1) + Py] >! = 372" j which on simplication gives prva's[ ait 3h, |p =3r2, --@) Comparing the two sides of (3), we obtain thé equations 3 Pi=3 ~t P+ 3 P2=0 2 which yield : Therefore, the particular solution is a =(ar+ a For the case when f(r) is of the form of the form PON P+ Py + + Pir, 1) B. Example 6. Find the particular solution of the following difference equation : 4 -Ta,_,=3,7", wl) Solution, Since 7 is a characteristic root of multiplicity 1, the general form of the Particular solution of the given difference (1) is Y | Prt, (2) Substituting the expression in (2) into (1), we obtain Pr IP (r-1) 7-123, 97 ie, PT =3.7 or Px3, ——— Then, the particular solution is a?) = 3,7. Example 7. Find the particular solution of the following difference equation : 4, 64,_\+9a,_ y= (r+ 1)3, (1) Scanned with CamScanner 595, — Combinatorics | Solution, Since 3 is a characteristic root of multiplicity 2, the general form of the Particular solution of the given difference is P(Pyr+P2) 3% +) Substituting the expression in (2) into (1), we obtain P (Pir Py) 6 (r= 1) (Py (r= 1) + Py} 3? +9 (r—2)? (P, (r-2)+ Pp) 37> [P, (7-2 (r= 1) + (23) + Pp (2-2 (F-17273 =F DI ((6r—6) P, +2P,) 3” =(r+ 1) 3" {6rP, + (— 6P, +2P2)} 3" =(r+1) 3". Comparing the two sides of (3), we obtain the equations 6rP, 3’ =r3" (-6P, +2P,) 3" =3" =(r+ 1)" +3) which yield 1 Page Paal. ‘Thus, the particular solution is a” = 7 ( is Example 8. Find the particular solution of the following difference equation : 4,-24,_ | +d,_9=5. Al) Solution. Since 1 is the characteristic root of the multiplicity 2 and 5 can be written as 5.1’, the general form of the particular solution is P?. Now substituting a” = P/? into (1), we obtain PP -2P (r-1)+P (r-2 =5 2P=5 or P=> : ‘Thus, the particular solution is of =3 7, Example 9. Find the particular solution of the following difference equation : a, —5a,_+60,_9=2" +r. eo) Solution. Since 2 is a characteristic root of the difference equation (1) and f{r) is of the form f, (1) +f (7) where f, (7) =2" and f; (1)=r is a polynomial in r of degree 1, it follows that the particular solutions corresponding to fj (r) must be of the form r PA) 2" and corresponding to fy (r) must be of the form PP)r+ PR), respectively. So, we assume that the general form: of the particular solution corresponding to fy=2!+ris ie, Pyr2!+ Port Ps (2) where P,, Po, P3 are constant to be determined. Substituting the expression in (2) into (1), 1» Pa we obtain = Pyr 2! + Port P3-5Py (r= 1) 277! = 5Py (r=) -5P3 + 6P; (r—2) 2°~? + 6P, (r—2) + 6Py=2' +r 3 i“ = 5 (r= 1) +6 (r—2)} + 2P,=2"+ ,-Sir-nsde-ahe +P, {r= 5 (r= 1) +6(r-2)} +2Py= 2" r Scanned with CamScanner 496 Discrete Mathematical Structures he -4y We (P= 7) Py Pye 2 br -4n, I+ AP) PA (= TP + OP3) 2! +r AB) Comparing both sides of (3), we obtain the equations al paar 2 ayer : = TP, + 2P3=0 which yield pat, pad Pye-d, Pegs Pye ‘Thus, the particular solution is aa roel threat § 5.13, TOTAL SOLUTIONS For a given k-th order difference equation, we must combine the homogeneous solution and the particular solution and determine the undetermined coefficients in the homogencous solution, The k undetermined coefficients Ay, Ay, ..., Ay in the homogeneous solution can be otermined by the boundary conditions dy, 4150p, 441» fOr any Foy Let the k-th order difference equation be Cott, + Cty. | + Coty 9 + oo + Cyl p =f). wl) Suppose the characteristic roots 01), Oy, .... 0% of the difference equation (1) are all distinct. Then the total solution of (1) is of the form 4, = AjOh + Aga) +... Apo +p (1) where p(r) is the particular solution. Thus, for r= ro, ro+1, ....r9+k—1, we have the system of linear equatic a= Ay ap Aga see ALO + p(T) aye =Aiaet + Anorp* +.. + Agate! + play + 1) on(2) tk 1 =Ayopttl +Asop thls... + Apatpt®=l + pry + k= 1) Solving these k linear equations we can obtain Ay, Az, Example, Consider the difference equation wid a,+5a,_\ +64,_.=42.4', 3) B.C. : a)=278 and a,=962. ‘The total solution of (3) is . 4, = Ay (~ 2)" + Ap (-3)"+ 16. 47, wf) Now we are given the boundary conditions a, =278 and Gy = 962. Therefore, (4) give the following equations: 278 =A, (2)? +43 (~ 3) + 16.42 278 = 4A + 9A2 +256 (5) Scanned with CamScanner Combinatorics = and 962 = Ay (-2)°+A3 (-3)* + 16.4% ie, 962 = — BA, ~ 27A2 + 1024, A) Solving (5) and (6), we obtain Ay=1, A2=2. ‘Thus, the total solution of the difference equation (3) is a, = (—2)' +2 (- 3)" +16.4". ___ Now there arises a natural question how we can be sure that solution of the k equations in (2) are always unique. It can be shown mathematically that this is indeed the case. ILLUSTRATIVE EXAMPLES Example 1. Solve the following recurrence relation 16a,—8a,_,*4;—2 Solution. The characteristic equation of the given recurrence relation is 1604 -8a+1=0 => (40-1)7=0 => -aatt 4 ‘Therefore, the required general solution is a, = (Ayr+ Ay) (i) 4 Example 2. Solve the recurrence relation a,—4a,_,+44,—2 ay=1 and a,=3. given that Solution. ‘The characteristic equation of the given recurrence relation is oc? —4a+4=0 => (a-2°=0 = o=2,2. Hence the general solution of the given recurrence relation is wl) a, = (Ayr Ay) 2 ‘The boundary conditions @y=1 and a; =3 yield 1=a9= (Ay 0442) 2, 324) =(4)-1 +Ay) 2! 1Shy BeAitAr ie, 1 = Azz" 42 Hence the required solution is a,=[5+ i or a,=(r+2)2~ 1. Example lation 3, Solve the recurrence rel 9a,— 64,1 +4,-2=0 i = =l. oe Biven that ap=0.and a1=" sation of the given recurence relation is Solution, The characteris ; 902- 60+ 1=0 - al Scanned with CamScanner 598 or relation, for r23, Discrete Mathematical Structures = => 1 (Ayr+ Ay) sy. The boundary conditions ay=0 and a,=1 yield O=a 1 1 (Ay 0+Ay), 1= ith t+49() O=Ay, 3=A,+Ay > Ay =3, AQ=0. Hence the required solution is o=x(3) Example 4. Solve the recurrence relation a,—4a,_,+6a,_9~-4a,_3+4,_4=0. Solution. The characteristic equation of the given recurrence relation is of — 402 + 60? - 4+ 1 =0 => (a-1) (8-30? +20-1)=0 => (@-1) (1-1) -20+1)=0 => (a-1)*=0 > Li Hence the required solution is ’ 4,=(AyP + Ag? + Agr + Ag) IP 4, = Ayr + Ag? + Agr + Ay. Example 5. Given that ag=1,a,=-2 and ay=1 satisfy the following recurrence 4,+3q,_)+3a,_»4a,_5=0. Determine a,, Solution. The characteristic equation of the given recurrence relation is 0} +30? +304+1=0 = (a+1=0 > »— 1-1. Since the characteristic root — 1 is of multiplicity 3, therefore, the general solution is 4,=(AyP + Agr +As) (- 1). Using the given boundary conditions ag= 1, a, V=aj=Ay = Ay=1 (Ay +AQ+As)(-1) = Ay +Ay+Ay=2 ce T= a2= (4A, +242 +43) (- 1)? = 4A, +2Ay+Ay= 1. ving these equations, we obtain A\=1,A,=2,A3= the required solution is 4,=(P +2r4 1) (1), 2 and ay =1, we have Scanned with CamScanner Combinatorics 599 Example 6. Solve the recurrence relation a, ~ 2a, _.+30,_3~4a,_ y+ 24,40 Solution, The characteristic equation of the given recurrence relation is at 2034307 -4a+2=0 GO = (a1) (8-02 +2a-2)=0 We => (c= 1) (e— 1) (2 +2) =0 zs = (a-17 @+2)=0 > al, 1 tiN2. ‘Thus, the homogeneous solution is a, = (Ayr+ Ag) 1" +p! (Ay cos r+ Ag sin 78), where p=Var+p?=Vor+2 =? and ont '(E)euw' (fur! Hence the required general solution is 7 (Ayr+ ay) +27? (+ cos + Aysin 3) 2 2 E; iple 7. Solve the recurrence relation : I eran smtrs20 ceca ea given that ay ay ‘equation of the given recurrence relation is 03-207 + 2a-1=0 = (3 - 0°) - (0? - a) + (a@- 1) =0 = o2 (0 = 1)-a@-1)+1(a-1)=0 => (@ -1)(@-a4+1)=0 = axl, Lens, oe Thus, the general solution of the given.recurrence relation is— a a, = Ay 1" +p” (Az cos 18 + As sin 78) mee OS and : O=ta (fe tan! (8)=% Recie Tr i > a, = Ay +Ay cos + Ag sin 5 Now, the boundary conditions ag=2, a, =1, and a)=1 yield 20924, +Ay > x 1a, =A, +Ap cos 5 rAssing 2= Lins y be, on 2n an 1=a)= = Ay +Az 083+ Ag sin ie 2=2A,— Ag +3 Ay. S\wles Scanned with CamScanner 600 Discrete Mathematical Structures Solving (2), (3) and (4), we get Ay =2, Ay=0, A Hence the required solution is a,=2-si w Example 8. Solve the difference equation a,—3a,_ 1+ 2a,4 9=2! 2, Solution. The characteristic equation of the given differencs equation is o—30+2=0 => (@-2)(a=1)=0 => a=2,1. ‘Thus, the general homogeneous solution is aA, 2+ Ay i ie,, a= Ay 2+ A, Here f(r) =2". Since 2 is a characteristic root of multiplicity 1, the general form of the particular solution is A= Prot -(l) Now, substituting the expresssion in (1) into the given difference equation, we obtain , af”) —30”) + 2a”), =2" ie, Pr2f=3P (r—1) 2" 4 2P (r- ny raat uy i 3P. eo. which yields P=2, Therefore, the particular solution is a) = pret Hence the-required total solution is a= al + ie, 4,5 Ay 2+ Ay tr 2etl { Example 9. Solve the difference equation a, 4a,_ -2=2% eet Solution. The characteristic simon of the given ne equation ig <— ~4a+4=0 ° > ee 2=0 = 22,2. Hence the general homogeneous solution is a) = (Arty) 2, Here fir) =2". Since 2 is a characteristic root plicit Ratio ae i root of multiplicity 2, the general form of the y= PP (l) Now substituting the expression in (1) into the Biven difference equation, we obtain af) — gal 1+4d?) y= 2° Scanned with CamScanner Combinaones ol PP af 4p (r= 192 2 4 AP (r= 2)? 20-7 = 2 = (Ayr Ay 247 27-|, Example 10, Solve the difference equation a, ~4a,_., +4a,_2= (r+ 2. Solution, The characteristic equation of the given difference equation is 40+ 4=0 = (a-2)?=0 = a= 2,2. Hence the homogeneous solution is af) = (Ayr+ Ay) 2 Here f(r) = (r+ 1) 2" Since 2 is a characteristic root of multiplicity 2, the general form of particular solution is a) =? (Pyr+ P2) 2”. en) Substituting (1) in the given difference equation we obtain a?) — 4a?) , + 4a” = (r+ 1) 27 jen P(Pyr +P.) 2-4 (r-WF Py (r= +P)! +4 (7-2)? (P (7-2) + Pp) 22 = (r+ 1) 2" ie, Pi (P-2 (r= 1 + (7-2) WH Py (P-2O— 1? + (297) P= (r+ P, (6r—6) 2" +2P2 2 =(r+ 1) 2" 6Pyr 2! + (- GP; + 2P2) 2 = (r+ 12 (2) Comparing both sides of (2), we obtain the equations Py r2%=r2! (C6P, +2P,) 2" =2" : which yield P\= ‘Thus, the particular solution is P=P(E4 te. Hence the required total solution is (04 0) (Ayr+ Ag) 24 (5+ the ie Example 11. Solve the difference equation 6a,~7a,_,—20a,_,=37-2r+8. Solution. ‘The characteristic equation of the given difference equation is 6a? - 74-200 Scanned with CamScanner iscrete Mathematical Structurgy wet (aa-5) (3044) =0 = $4 => a) 3 jon ts Therefore, the homogeneous solution i yee (f oen(gjea(e ‘east il equ i f the given difference Let the particular solution of en. . fon in the gi rence equation, We Substituting this expression in the given differ * Gal? — To, 200f) = 37 - 2r+ (eens =7[P, (r= 1)? + Py (r= 1) + Ps ie, 6 (P,P + Py + P3)—7L Me (r=2)2+ Py (7-2) + Ps] = 322g (-217-+94r— 87) P, + (- 21r+47) Pp —21P3 i —21P\r? + (94P, —21P2) r+ (- 87P) + 47P2 —21P3) = : Comparing both sides, we obtain the equations -21P; 94P, -21P, = ~87P, +47P,—21P, ation is which yield \ Padi Pys ‘Thus, the particular solution is 147” 3087 Hence the required total solution is a= a!) +0) jen =A, G)-a(-J-$ Example 12. Solve the difference eq jation a, “6 Solution. The characteristic equation of the given di . i T ~5a+6=0 = (a-2)(a=3)=0; e=2,3, ‘Thus, the general homogeneous Solution is of! = ,9" 4 Ag er ie is 7 tt a characteristic Toot of the difference equation, the f oe Now substituting the expression in (1) into the given gi Siven difference equation, we obtain aS 6g ” PSS norst *2SP~25B-¢ 6p =| 1) +6.P 5TH 1 Pal Scanned with CamScanner Combinatories 603 ‘Therefore, the particular solution is =2s, Hence the required total solution is 4a” ie, a, =A, +Ag3 +E. 5. Example 13. Solve the following difference equation dy 4~4a4 1+ 44,= 0. Solution. ‘The characteristic equation of the given difference equation is w-4a0+4=0 > (a-2)?=0; 2 52,2. Thus, the general homogeneous solution is al! = (Ayr Az) 2". Here flr) = is a polynomial in r of degree 2, so the particular solutio to fir) must be in the following form : a) = PyP + Por + P3 ly ‘Now, substituting the expression in (1) in the given difference equation, we obtain Pade), +44 =P {Py (F+2)2 + Pp (r-+2)4 Ps) — 4 (PL r+ P+ Py (r+ 1) + P3) 44 (PpP + Part Pg) =P n corresponding Comparing the common terms on both sides, we get P,=1,—4P; +P, =0, —2P) + P3=0 > Pi=1, Pp=4, P38. the particular solution is =P +4r+8. Hence the required total solution is anal) +a? a= (Ay tA 2 +P +4r +8. Example 14, Solve the following difference equation Oy gt apy jon of the given difference equation is ie, peas rte Solution. The characteristic equatic o?+2a+1=0 = (a+1)?=0; ¢ as-L-1 ‘Thus, the general homogeneous soltuion is all) = (Ayr+Ay) (1 Here flr) = r+2", so the particular solution can be taken as P, 2 + (Port Py). Thus, on 2 +(Pyr+ Ps) in the given difference equation, we obtain at! + (Py (r+ 1)+ Pal] +([P, 27+ (Pyrt Paar mn substituting a =P, [Py 2042 + (Pa (r+2) + Pa +2 IP Comparing the coefficients of common terms, we Bet Prado Prag and Pym P= a. 4 oil Scanned with CamScanner 604 Discrete Mathematical Structures the particular solution is aa dor aie 4 Hence the required total solution is a= all) +a?) rad ord iey ASA tAY CW ty. 45 r= 5 Example 15. Solve'the following difference equation : 4,4 64,44 +8a,=37 42-5. 37, Solution. ‘The characteristic equation of the given difference equation is o-6a+8=0 = (2-2) (4-4)=0; 0=2,4, ‘Thus af) = A\2 + Aya is the general homogeneous solution. Here fir)=377+2-5.3'. We consider its corresponding trial solution as (PP + Pyr+ P,) + P43". Since no term of the trial solution i is in the homogeneous solution, 80 that it is the appropriate solution. Now, substituting the expression a?) = (P+ Par Py) + Pa” (1) in the given difference equation, we obtain af) .- 6a?) +80” =32 42-5. 37 ie, Py (r-+2)"4 Py (r+2)+ Pat Pat? ~61P\ (r+ 1) + Py (r+ I) + Py + PtH +8[P\? + Port P3+Py3]=3742-5.3", ‘Comparing coefficients of common terms on both sides, we Be 3P, =3, 3P)~8P,=0, 3P;~4P,—2P, = 44 = Pia Ppa $s Pye, rye, the particular solution is a?) = Pedra tes, a 9 Hence the required total oe is a,=al 4g lec AeA tags Para Ba sy, Example 16, Solve she following difference equation : 9,45 ~ 3a, 42+ 34,4) —a,=24 (r+2), “Solution. ‘The characteristic equation of the given difference equation is 30? 430-120 (a~1)'=0, * OShhl Scanned with CamScanner

You might also like