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

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

View Full Document Right Arrow Icon
1 CSE 20 Lecture 12: Analysis of Homogeneous Linear Recursion CK Cheng May 5, 2011
Background image of page 1

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

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

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

View Full DocumentRight Arrow Icon
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 + - = - =
Background image of page 4
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 ≈ • =
Background image of page 5

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

View Full DocumentRight Arrow Icon
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)
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/11/2011 for the course CSE 20 taught by Professor Foster during the Fall '08 term at UCSD.

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 Right Arrow Icon
Ask a homework question - tutors are online