Linear Recurrence Equation   

Download Report

Transcript Linear Recurrence Equation   

Linear Recurrence Equation
Example. Fibonacci Sequence: fn= fn-1 +fn-2, with f0 = 0, f1 = 1
 f n  1 1  f n 
 f   1 0  f 
  n 1 
 n 1  
or
n 1
 f n  1 1  f1 
 f   1 0  f 
  0
 n 1  
Thus, computing fn is equivalent to computing
using parallel prefix computation.
1 1
1 0


n1
,
LU Decomposition of Tri-diagonal Matrix
d1 f1
e d f
2
2
A 2



 0  en
 1
 m
 2
f n 1  

 
dn  
mn
  u1




1  0
f1
u2



 fn 

u
 LU
u 1  d1
How to solve?
Special case of
rational fraction
ei  f i 1
ui  di 
u i 1
a i x i 1  bi
xi 
c i x i 1  d i
mi= ei / ui-1 (2 < i < n)
(2 < i < n)
xi=(a, b, c, d) • xi
(a, b, c, d)  (a’, b’, c’, d’) ?
ai 1 xi  2  bi 1
ci 1 xi  2  d i 1
ai 1 xi  2  bi 1
i ci 1 xi  2  d i 1
ai xi 1  bi
xi 

ci xi 1  d i c
ai
bi
di
ai ai 1 xi 2  ai bi 1  bi ci 1 xi 2  bi d i 1

ci ai 1 xi 2  ci bi 1  d i ci 1 xi 2  d i d i 1

ai ai 1  bi ci 1 xi 2  ai bi 1  bi d i 1 

ci ai 1  d i ci 1 xi 2  cibi 1  d i d i 1 
Or,
(a, b, c, d) • (a’, b’, c’, d’)
= (aa’+bc’, ab’+bd’, ca’+dc’, cb’+dd’)
“ • ” is associative.
Thus, we can compute the operation.
ui 
d i u i 1  eif i 1
u i 1