









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Solving Recurrence Relations, Homogeneous Recurrence Relation, Constant Coefficients, Nonlinear Function, Initial Conditions, Parameterized Form, Bank Problem, Impose Initial Value, Multiplicative Constants
Typology: Slides
1 / 16
This page cannot be seen from the preview
Don't miss anything!
Recurrence Relations can take many forms, and most forms are hard, if not impossible to solve. There are however a certain subset that can be solved explicitly. They are of the form:
This is a linear, homogeneous recurrence relation of degree k with constant coefficients -linear because we don’t have terms: with F(.) a nonlinear function. -homogeneous because we don’t have terms:. -degree k, because it depends on k terms in the past a(n-1) ... a(n-k).
G n ( ) n k n k a c a − =
The trick in many of these cases is to try out a parameterized form of a solution and solve for the remaining parameters (educated guess, ansatz). In the case of linear equation we have already seen the solution to the bank problem: B(n) = c B(n-1) = c^2 B(n-2) = c^3B(n-3) Now we can guess a solution: B(n) = d r^n stick into the equation: d r^n=d c r^(n-1) r=c B(n) = d c^n This is a solution for all values of `d’. Now impose initial value: B(0) = 1 d c^0 = 1 d=1 final solution B(n) = c^n (unique)
-For higher degree RR the idea is exactly the same: try a solution of the d r^n. Let’s try second degree: Fibonacci RR: F(n) = F(n-1) + F(n-2). d r^n = d r^(n-1) + d r^(n-2) multiplicative constants can never be determined by the RR (they will be determined by the initial conditions). r^n = r^(n-1) + r^(n-2) r^2 = r + 1 r^2-r-1=0 Two solutions! In fact any linear combination will be a solution: F(n) = d1 r1^n + d2 r2^n (try it by inserting this solution in the RR). d1 and d2 are free, but should be determined by the initial values: F(0)=0 d1 + d2 = 0; F(1) = 1 d1 r1 + d2 r2 = 1. This represents 2 linear equations with 2 unknowns: solve to find: d1 = 1/sqrt(5) d2 = -1/sqrt(5). Now the solution is unique. 1,
Overview first and second degree
Theorem: c1,...,ck real numbers with ck NOT 0. Suppose the characteristic equation: has k distinct roots r1,...,rk. Then the sequence {an} is a solution of the recurrence relation: if and only if for n=0,1,2,3,... and arbitrary constants d1,...,dk we have: if we have t distinct roots, each with multiplicity m1,...mt then the sequence {an} will be a solution iff 1 1 ...^0 k k r c r ck − − − − = an = c a 1 n (^) − 1 + ...+c ak n −k 1 1 ... n n n k k a = d r + +d r 1 2 1 1 1,0 1,1 1, 1 1 2 1 2,0 2,1 2, 1 2 1 ,0 ,1 , 1 ( ... ) ( ... ) ..... ( ... ) t m n n m m n m mt n t t t m t a d d n d n r d d n d n r d d n d n r − − − − − − = + + +
For every distinct root we have an arbitrary polynomial of degree m(t)-1 in front.
a[n]=-3a[n-1]-3a[n-2]-a[n-3] a[0]=1, a[1]=-2, a[2]=- Insert r^n into RR: r^3 + 3r^2 + 3r + 1 = 0 (r+1)^3= General solution: a[n] = (d1+d2 n + d3 n^2) (-1)^n Initial conditions: d1 = 1 (d1+d2+d3) x (-1) = - (d1+4d2+9d3) x 1 = - d1=1, d2=3,d3=- Final solution: a[n]=(1+3n-2n^2) x (-1)^n
1 1
n n k n k
− −
Linear, inhomogeneous RR of degree k with constant coefficients Again, in general this is a hard problem, but for certain cases we can guess a particular solution to the full equation. Once we have one solution, we can immediately write down the general solution according to: Theorem: If {bn} is a particular solution to the inhomogeneous RR, and {an} is the general solution to the associated homogeneous RR, then the general solution to the inhomogeneous RR is given by: {gn} with gn = an+bn. Proof: Show that gn-bn must be a solution to the homogeneous RR, which we know: in full generality {an}. Thus gn = an+bn
Example: a[n]=5a[n-1]-6a[n-2] + 7^n Now try bn = d 7^n as a solution: Insert in the equation: d 7^n = 5 d 7^(n-1) – 6 d 7^(n-2) + 7^n 7^2 d – 5x7d + 6d - 7^2 = 0 d = 49/ General form for solution: gn = d1 r1^n + d2 r2^n + 49/20 7^n Now solve homogeneous equation to get: r1 = 3, r2=2, d1,d2 arbitrary because we didn’t specify initial conditions.
Theorem: If we have a inhomogeneous RR of the form: where: then a) if s is not a root of the characteristic equation of the associated homogeneous equation then there exists a particular solution of the form: b) If s is a root with multiplicity m then the following solution exists:
0 1 ( ) ( ... ) t n t F n = b + b n + + b n ×s 1 1
n n k n k
− −
0 1 ( ) t n n t b = p + p n + p n s 0 1 ( ) m t n n t b = n p + p n + p n s
a[n]=6a[n-1]-9a[n-2] + (n^2+1) 3^n a[0]=1, a[1]=2;