Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithms CSCI 235, Spring 2019 Lecture 3 Asymptotic Analysis

Similar presentations


Presentation on theme: "Algorithms CSCI 235, Spring 2019 Lecture 3 Asymptotic Analysis"— Presentation transcript:

1 Algorithms CSCI 235, Spring 2019 Lecture 3 Asymptotic Analysis

2 O notation--No faster than...
We use: to mean: Roughly: f(n) is at most as big as g(n) or: f <= g 17

3 Examples True or false? 23n2 + 17n - 12 = O(n2) b) n3 = O(n2)

4 Strictly less than if Roughly: f(n) is way smaller than g(n)
or: f < g

5 Examples True or false? n2 = o(n3) b) 2n2 + 2n + 1 = o(n2)

6 W notation--No slower than...
Roughly: f(n) is at least as big as g(n) or: f >= g

7 Examples True or false? 23n2 + 17n -12 = W(n2) n3 = W(n2)

8 w notation: strictly greater than
if Roughly: f(n) is way bigger than g(n) or: f > g

9 Examples True or false? n3 = w(n2) n! = w(2n)

10 Q notation--Just right...
Roughly: f(n) is about the same as g(n) or: f = g 17

11 Examples True or false? 23n2 + 17n - 12 = Q(n2)

12 Summary Say that f is: Notation Approximately Loosely
little omega g f=w(g) f is way bigger than g f>g omega g f=W(g) f is at least as big as g f>=g theta g f=Q(g) f is about the same as g f=g oh g f=O(g) f is at most as big as g f<=g little oh g f=o(g) f is way smaller than g f<g


Download ppt "Algorithms CSCI 235, Spring 2019 Lecture 3 Asymptotic Analysis"

Similar presentations


Ads by Google