1 / 12

Algorithms CSCI 235 , Fall 2019 Lecture 3 Asymptotic Analysis

Algorithms CSCI 235 , Fall 2019 Lecture 3 Asymptotic Analysis. O notation--No faster than. We use:. to mean:. Roughly: f(n) is at most as big as g(n) or: f <= g. Examples. True or false? 23n 2 + 17n - 12 = O(n 2 ) b) n 3 = O(n 2 ). Strictly less than. if.

waynemartin
Télécharger la présentation

Algorithms CSCI 235 , Fall 2019 Lecture 3 Asymptotic Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AlgorithmsCSCI 235, Fall2019Lecture 3Asymptotic 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

  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

  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

More Related