CS 310 Unit 2 Asymptotic Notation and Recurrences

CS 310 Unit 2 Asymptotic Notation and Recurrences - CS 310...

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

View Full Document Right Arrow Icon
CS 310 Unit 2 Asymptotic Notation and Recurrences Furman Haddix Ph.D. Assistant Professor Minnesota State University, Mankato
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 310 Unit 2 Asymptotic Notation and Recurrences Objectives Asymptotic Notation O(n) – “Big Oh” (or “Oh”) of n (n) – Omega (or “Big Omega”) of n Θ (n) – Theta of n o(n) – Little oh of n ϖ (n) – Little omega of n Recurrence Relations Why Recurrence? Why Recursion? Solving Recurrence Relations Substitution method Recursion-tree method Text, Chapters 3 and 4
Background image of page 2
Asymptotic Notation Asymptotic Notation is used to describe the relationship between two functions which “approach” each other as n becomes very large. Although the absolute differences may increase (or decrease), the relative differences are diminishing for n sufficiently large. In asymptotic notation, low-order terms and constant coefficients are abstracted away In asymptotic notation, one cannot abstract away secondary variables, however.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Graph of 3n 3 + 90n 2 –5n+ 6046 vs. Θ ( n 3 ) Limits 0 5000000 10000000 15000000 20000000 25000000 30000000 35000000 10 20 30 40 50 60 70 80 90 100 110 120 3nnn T(n) 4nnn 18nnn
Background image of page 4
Graph of ( 3n 3 + 90n 2 –5n+ 6046 / 3 n 3 ) 0 1 2 3 4 5 6 7 10 20 30 40 50 60 70 80 90 120 130 140 150 160 170 180 190 1 T(n) Graph is of f(n)/cg(n), where f(n) = Θ (g(n)) and c = 3 Recall that g(n) = n 3 {T(n) = Θ (n 3 )}
Background image of page 5

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

View Full DocumentRight Arrow Icon
O(n) – “Big Oh” (or “Oh”) of n O(n) provides an upper limit on the size of T(n) as n increases. O(n) is sometimes referred to as order of magnitude. f(n) = O(g(n)), if there exist constants c > 0, n 0 > 0, such that 0 f(n) cg(n) for all n n 0 . Example: T(n) = n 2 + 2n 2 + 100 n There are several valid assertions that we could make. T(n) = O(n 3 ) T(n) = O(n 2 ) Which is the most useful? This illustrates the difference between a “tight” limit and a “loose” limit.
Background image of page 6
Graph of 3n 2 + 100n +1000 vs. O () Limits 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4nn T(n) nnn n 3 works for c = 1 and n 0 = 7 n 2 works for c = 4 and n 0 = 17
Background image of page 7

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

View Full DocumentRight Arrow Icon
(n) – Omega (or “Big Omega”) of
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CS 310 taught by Professor Furmanhaddix during the Spring '08 term at Minnesota State University, Mankato.

Page1 / 23

CS 310 Unit 2 Asymptotic Notation and Recurrences - CS 310...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online