{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec12

# lec12 - CSE 20 Lecture 12 Analysis of Homogeneous Linear...

This preview shows pages 1–7. Sign up to view the full content.

1 CSE 20 Lecture 12: Analysis of Homogeneous Linear Recursion CK Cheng May 5, 2011

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 3. Analysis 3.1 Introduction 3.2 Homogeneous Linear Recursion 3.3 Pigeonhole Principle 3.4 Inclusion-Exclusion Principle
3 3.1 Introduction Derive the bound of functions or recursions Estimate CPU time and memory allocation Eg. PageRank calculation Allocation of memory,

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 3.1 Introduction Derive the bound of functions or recursions Estimate CPU time and memory allocation Example on Fibonacci Sequence: Estimate fn. Index: 0 1 2 3 4 5 6 7 8 9 fn: 0 1 1 2 3 4 5 8 13 21 34 1 1 5 1 1 5 ( ) ( ) 2 2 5 5 n n n f + - = - 0 0 0 1 1 5 1 1 5 ( ) ( ) 0 2 2 5 5 f + - = - = 1 1 1 5 1 1 5 ( ) ( ) 1 2 2 5 5 f + - = - =
5 Example: Fibonacci Sequence 0 1 2 3 4 5 6 7 8 9 0 1 1 2 3 5 8 13 21 34 1 1 5 1 1 5 ( ) ( ) 2 2 5 5 1 (1.618 0.618 ) 2.236 1 1.618 2.236 n n n n n n f + - = - - 9 9 1 1.618 33.98 2.236 f ≈ • =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 3.2 Homogeneous Linear Recursion (1) Arithmetic Recursion a, a+ d , a+ 2d , …, a+ kd (2) Geometric Recursion a, a r , a r2 , …, a rk (3) Linear Recursion an= e1an-1+e2an-2+…+ekan-k+ f(n)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 18

lec12 - CSE 20 Lecture 12 Analysis of Homogeneous Linear...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online