0 Up votes0 Down votes

45 views12 pagesApr 03, 2017

© © All Rights Reserved

DOCX, PDF, TXT or read online from Scribd

© All Rights Reserved

45 views

© All Rights Reserved

- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
- Hidden Figures Young Readers' Edition
- The Law of Explosive Growth: Lesson 20 from The 21 Irrefutable Laws of Leadership
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- The Wright Brothers
- The Power of Discipline: 7 Ways it Can Change Your Life
- The Other Einstein: A Novel
- The Kiss Quotient: A Novel
- State of Fear
- State of Fear
- The 10X Rule: The Only Difference Between Success and Failure
- Being Wrong: Adventures in the Margin of Error
- Algorithms to Live By: The Computer Science of Human Decisions
- The Black Swan
- Prince Caspian
- The Art of Thinking Clearly
- A Mind for Numbers: How to Excel at Math and Science Even If You Flunked Algebra
- The Last Battle
- The 6th Extinction
- HBR's 10 Must Reads on Strategy (including featured article "What Is Strategy?" by Michael E. Porter)

You are on page 1of 12

recurrence equation.

With a little experience and intention, most recurrence can be solved by

intelligent guesswork.

However, there exists a powerful technique that can be used to solve certain

classes of recurrence almost automatically.

This is a main topic of this section the technique of the characteristic

equation.

1. Calculate the first few values of the recurrence

2. Look for regularity.

3. Guess a suitable general form.

4. And finally prove by mathematical induction(perhaps constructive induction).

Consider the following recurrence,

0 if n=0

T(n) = 3T(n 2)+n otherwise

It is tempting to restrict n to being ever since in that case n2 = n/2, but

recursively dividing an even no. by 2, may produce an odd no. larger than 1.

Therefore, it is a better idea to restrict n to being an exact power of 2.

First, we tabulate the value of the recurrence on the first few powers of 2.

= 3 * 65 +16

= 211.

Instead of writing T(2) = 5, it is more useful to write T(2) = 3 * 1 +2.

Then,

T(A) = 3 * T(2) +4

= 3 * (3 * 1 +2) +4

= (32 * 1) + (3 * 2) +4

* We continue in this way, writing n as an explicit power of 2

Let Sn be the sum of the first n terms of the geometric series a, ar, ar2.Then

Sn = a(1-rn)/(1-r), except in the special case when r = 1; when Sn = an.

* It is easy to check this formula against our earlier tabulation.

2. Homogenous Recurrences :

* We begin our study of the technique of the characteristic equation with the

resolution of homogenous linear recurrences with constant co-efficient, i.e the

recurrences of the form,

a0tn + a1tn-1 + .. + aktn-k = 0 where the ti are the values we are looking for.

determine the sequence.

* The initial condition will be considered later.

* The equation typically has infinitely many solution.

* The recurrence is,

linear because it does not contain terms of the form t n-i, t n-j, t2 n-i, and

soon.

With constant co-efficient because the ai are constants

* Consider for instance our non familiar recurrence for the Fibonacci sequence,

fn = f n-1 + f n-2

* This recurrence easily fits the mould of equation after obvious rewriting.

fn f n-1 f n-2 = 0

with constant co-efficient with k=2,a0=1&a1=a2 = -1.

k

So ai f n-i = 0 & similarly for gn & fn

i=0

We set tn = C fn + d gn for arbitrary constants C & d, then tn is also a solution to

equation.

= C(a0 fn + a1 fn-1 + + ak fn-k)+

d(a0 gn + a1 gn-1 + + ak gn-k)

=C*0+d*0

= 0.

n if n=0 or n=1

fn =

f n-1 + f n-2 otherwise

,

fn f n-1 f n-2 = 0.

The characteristic polynomial is,

x2 x 1 = 0.

-(-1) ((-1)2 + 4)

x = ------------------------

2

1 (1 + 4)

= ----------------

2

1 5

= ----------

2

1+5 1 - 5

r1 = --------- and r2 = ---------

2 2

The general solution is,

fn = C1r1n + C2r2n

when n=0, f0 = C1 + C2 = 0

when n=1, f1 = C1r1 + C2r2 = 1

C1 + C2 = 0 (1)

C1r1 + C2r2 = 1 (2)

C1 = -C2

Substitute C1 in equation(2)

-C2r1 + C2r2 = 1

C2[r2 r1] = 1

1 - 5 1 - 5

C2 --------- - --------- = 1

2 2

1 5 1 5

C2 --------------------- = 1

2

-C2 * 25

-------------- = 1

2

5C2 = 1

C1 = 1/5 C2 = -1/5

Thus,

1 1 + 5 n -1 1 - 5 n

fn = ---- --------- + ---- --------

5 2 5 2

1 1 + 5n 1 5 n

= ---- --------- - ---------

5 2 2

3. Inhomogeneous recurrence :

difficult

when the recurrence is not homogeneous, that is when the linear combination is

not

equal to zero.

a0tn + a1 t n-1 + + ak t n-k = bn p(n)

* The left hand side is the same as before,(homogeneous) but on the right-hand

side

we have bnp(n), where,

b is a constant

p(n) is a polynomial in n of degree d.

4. Change of variables:

* It is sometimes possible to solve more complicated recurrences by making a

change of variable.

* In the following example, we write T(n) for the term of a general recurrences,

and ti for the term of a new recurrence obtained from the first by a change of

variable.

Example: (1)

Consider the recurrence,

1 , if n=1

T(n) =

3T(n/2) + n , if n is a power of 2, n>1

section, but only for the case when n is a power of 2

1

T(n) =

3T(n/2) + n

* We replace n by 2i.

* This is achieved by introducing new recurrence ti, define by ti = T(2i)

* This transformation is useful because n/2 becomes (2i)/2 = 2 i-1

* In other words, our original recurrence in which T(n) is defined as a function of

the type of recurrence we have learned to solve.

ti = 3t i-1 + 2i

ti 3t i-1 = 2i (A)

In this case,

b = 2, p(n) = 1, degree = 0

(x 3)(x 2) = 0

The general equation,

tn = C1 r1i + C2 r2i

sub. r1 & r2: tn = 3nC1 + C2 2n

tn = C1 3i + C2 2i

We use the fact that, T(2i) = ti & thus T(n) = tlogn when n= 2i to obtain,

T(n) = C1 . nlog23 + C2.n [i = logn]

T(n) = O(n log3) n is a power of 2

Example: (2)

Consider the recurrence,

T(n) = 4T(n/2) + n2 (A)

Where n is a power of 2, n 2.

ti = T(2i) = 4T(2 i-1) + (2i)2

ti = 4t i-1 + 4i

ti 4t i-1 = 4i

In this eqn,

b = 4, P(n) = 1, degree = 0

(x 4)(x 4) = 0

ti = C14i + C24i.i [since i = logn]

= C1 4 log n + C2. 4 logn . logn [since 2i = n]

= C1 . n log 4 + C2. n log4.n log1

EXAMPLE : 3

When n is a power of 2, n 2

ti 2t i-1 = i. 2i

In this case,

b = 2, P(n) = i, degree = 1

(x 2)(x 2)2 = 0

= nC1 + nC2 + nC3(log n22n)

tn = O(n.log22n)

Example: 4

T(n) = 2, n=1

5T(n/4) + Cn2 , n>1

= 5T 4 i-1 + C. 16i

= 5t i-1 + C.16i

ti 5t i-1 = C. 16i

In this case,

b = 16, P(n) = 1, degree = 0

(x 5)(x 16) = 0

ti = C1.5i + C2.16i

= C1.5i + C2.(42)i

tn = O(n2)

Example(1) :

tn 2t n-1 = 3n (A)

(x 2)(x 3) = 0

The general solution,

tn = C1r1n + C2r2n

tn = C12n + C23n (1)

when n=1, 2C1 + 3C2 = t1 (3)

t1 2t0 = 3

t1 = 3 + 2t0

substitute t1 in eqn(3),

2C1 + 3C2 = (3 + 2t0)

-------------------------------

-C2 = -3

C2 = 3

Sub C2 = 3 in eqn (2)

C1 + C2 = t0

C1 + 3 = t0

C1 = t0 3

Therefore tn = (t0-3)2n + 3. 3n

= Max[O[(t0 3) 2n], O[3.3n]]

= O[3n]

Example :(2)

This is Inhomogeneous

In this case, b=3, p(n) = n+5, degree = 1

So, the characteristic polynomial is, (x-2)(x-3)2 = 0

The roots are,

r1 = 2, r2 = 3, r3 = 3

tn = C1r1n + C2r2n + C3nr3n (1)

when n=0, t0 = C1 + C2 (2)

when n=1, t1 = 2C1 + 3C2 + 3C3 (3)

t1 2t0 = 6 . 3

t1 2t0 = 18

t1 = 18 + 2t0

C1 + C2 + = t0 (2)

t2 2t1 = 7. 9

t2 = 63 + 2t1

= 63 + 2[18 + 2t0]

t2 = 63 + 36 +4t0

t2 = 99 +4t0

sub. t2 value in eqn(3),

4C1 +9C2 + 18C3 = 99 + 4t0 (5)

n=0, C1 + C2 = t0 (2)

n=1, 2C1 + 3C2 + 3C3 = 18 + 2t0 (4)

n=2, 4C1 + 9C2 + 18C3 = 99 + 4t0 (5)

(5) 4C1 + 9C2 + 18C3 = 99 + 4t0 (5)

------------------------------------------------

8C1 + 9C2 = 9 + 8t0 (6)

(6) 8C1 + 9C2 = 9 +8t0 (6)

--------------------------

-C2 = -9

C2 = 9

Sub, C2 = 9 in eqn(2)

C1 + C2 = t0

C1 + 9 = t0

C1 = t0-9

Sub C1 & C2 in eqn (4)

2C1 + 3C2 + 3C3 = 18 + 2t0

2(t0-9) + 3(9) + 3C3 = 18 + 2t0

2t0 18 + 27 + 3C3 = 18 + 2t0

2t0 + 9 + 3C3 = 18 + 2t0

3C3 = 18 9 + 2t0 2t0

3C3 = 9

C3 = 9/3

C3 = 3

= (t0 9)2n + 9.3n + 3.n.3n

= Max[O[(t0-9),2n], O[9.3n], O[3.n.3n]]

= Max[O(2n), O(3n), O(n3n)]

tn = O[n3n]

- page 65Uploaded byanon-115473
- Laplace Transform ExampleUploaded byElliot Kim
- Syllabus Sem 2 Autonomous GTU CollegeUploaded byDevam Narkar
- MECH466_L3_ODESolutionUploaded byAnonymous WkbmWCa8M
- equation.docxUploaded byJef Frey
- G7_Pre-Test Math.docxUploaded bynancy cruz
- 2-2nd Order Linear ODEUploaded byShinta Arvinda P. Wulandari
- Math 230 Sec 1.1Uploaded byTrav Black
- 6-18_Stations_ Equations_qr.docxUploaded byMajid Khan
- Ode NumerikUploaded byDini Aryanti
- Soal UAS Tipe 01Uploaded byabiyyah
- Ode SystemsUploaded byAnonymous 2rvK93
- DE Open Class SearchUploaded byGraceKolczynski
- Sequences and SeriesUploaded byjubykins
- lecturer science1.pdfUploaded byAijaz Zende
- ODEsheet.pdfUploaded byCobos88
- CSE 1243 - Labsheet 2 - Imperative Programming - PythonUploaded byPriyam Ramsokul
- Chapter 3 Laplace Transform W8Uploaded byMohamad Shahrom
- Assignment on Monotonic and ConvergencesUploaded byas_5k
- Java ContestUploaded bysasank_chundi
- Differential Equations for EngineersUploaded byCarlos DuqueDaza
- Various patterns and anomalous behaviors from the sine functionUploaded byAlexandre Bali
- ch02.pdfUploaded byQiaoXingLiu
- IndexUploaded byCharlie Pinedo
- Numerical MethodsUploaded byIfiokobong Akpan
- 2011 PutnamUploaded bySubhajit Das
- 13-4Uploaded byksr131
- DAA Recursion (1)Uploaded byTalha Khalid
- B.Sc_MATHS.pdfUploaded byLakshman
- Seq145Uploaded byAnonymous sZLcBAg

- introduction to big dataUploaded byJyotsna Suraydevara
- Advanced Java Programming QBUploaded byJyotsna Suraydevara
- Important Questions JavaUploaded byJyotsna Suraydevara
- JEE Questions TrigonometryUploaded byJyotsna Suraydevara
- ResPaper ICSE Notes 2016 Computer Applications of All Chapters Vibgyor High School Marathahalli BangaloreUploaded byJyotsna Suraydevara
- JEE(Main)-2016-Paper-with-Solution.pdfUploaded bySwapnil Tripathi
- Data StructureUploaded byJyotsna Suraydevara
- Java BeansUploaded byDarsh Kotecha
- Unix Programming RecordUploaded byJyotsna Suraydevara
- 5 MinimizeUploaded byJyotsna Suraydevara
- Mathematical InductionUploaded byJyotsna Suraydevara
- Discrete Maths QBUploaded byJyotsna Suraydevara
- SOLVING RECURRENCES.docxUploaded byJyotsna Suraydevara
- Basic Computer (1)Uploaded byJyotsna Suraydevara
- Integer and Real Data Representation SummaryUploaded byJyotsna Suraydevara
- Draw the E R Diagrams OnUploaded byJyotsna Suraydevara
- Comp. Sc. EnggUploaded byVinay Kandula
- C Data TypesUploaded byJyotsna Suraydevara

- Tschumi, Bernard - Themes From Manhattan TranscriptsUploaded byhendo_s
- MA 105 2016Uploaded bySurya Prakash
- 1988 Paper Sutton TdlearningUploaded bySoyelquesoy Soyelquesoy
- Schinner-2007-The Voynich Manuscript Evidence of the Hoax Hypothesis-000Uploaded bybobster124u
- ALL ABOUT IMPORTS AND EXPORTS DETAILSUploaded byAyan Chakraborty
- Desel, Esparza - Free Choice Petri Nets(1)Uploaded byMadalina Fron
- Formulaic Sequences in Action - An IntroductionUploaded byNhuQuynhDo
- Ovm2uvm MigrationUploaded byBrahmam Madamanchi
- SEC-EEE-305-lec-2Uploaded byShahadat Hussain Parvez
- JAVA LAB SYLLABUSUploaded bypriya141ch
- ArgentinaUploaded byNicoleta Agenna
- Aptitude TestsUploaded byBannimangala Rajiv
- Diskret_ch2Uploaded byRusdy Saja
- Binet's formula via Generating functionUploaded byMiliyon Tilahun
- The Linear Matching Method for Limit Loads and Shakedown Analysis of Portal FramesUploaded bySEP-Publisher
- Summ Ability of Positive Sequences and Sub SequencesUploaded byJose Luis Perez De La Nova
- egaUploaded byZiyvo
- bin explanationUploaded byRAMAKRISHNA.G
- Boolean Algebra and the Yi Jing.pdfUploaded bySelly Yunita
- Some analysis, analysis and analysis.Uploaded byTytus Metrycki
- 1. Introduction (1).docxUploaded bymuwaffiqa 24
- M401-notes1Uploaded byUmer Saeed
- mcmcUploaded bygradstud_nyc2225
- VTESTstudio ConceptManual EnUploaded byAntonio li causi
- Word Processor Data StrUploaded byArpit Tyagi
- Whats_New_V14_1.pdfUploaded byHanifa Kusumaningrum
- Week 2 - 3 Night High 1Uploaded byKenjie Gomez Eneran
- 10th Mathematics Matriculation LevelUploaded bybresks
- MathematicsUploaded byShivantha Hettiarachchi
- 20130618 Musa-Ada Lte Pci Rsi Planning NewUploaded bypawan

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.