1 / 7

Department of Computer and Information Science, School of Science, IUPUI

Department of Computer and Information Science, School of Science, IUPUI. CSCI 240. Analysis of Algorithms Big-Omega and Big-Theta. Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu. Big-Omega and Big-Theta Defined.

pnicholas
Download Presentation

Department of Computer and Information Science, School of Science, IUPUI

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. Department of Computer and Information Science,School of Science, IUPUI CSCI 240 Analysis of Algorithms Big-Omega and Big-Theta Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu

  2. Big-Omega and Big-Theta Defined • If f = W(g), then f is at least as big as g (or g is a lower bound for f) e.g. f(n) = n3 and g(n) = n2 • If f = (g), f=O(g) and f = W (g) (or g is both an upper and lower bound. It is a “tight” fit) e.g. f(n) = n3+ n2and g(n) = n3

  3. Big-Omega Example • Example: n 1/2 = W( lg n) . Use the definition with c = 1 and n0 = 16. Checks OK. Let n > 16: n 1/2> (1) lg n if and only if n > ( lg n )2 by squaring both sides. This is an example of polynomial vs. log.

  4. Big-Theta Asymptotic Tight Bound • Theta means that f is bounded above and below by g; BigTheta implies the "best fit". • f(n) does not have to be linear itself in order to be of linear growth; it just has to be between two linear functions. • We will use Theta whenever we have enough information to show that the f(n) is both an upper and lower bound. Theta is a “stronger” statement than Big-Oh or Big-Omega.

  5. Big-Theta Example • Example: f(n) = n2 - 5n + 13. • The constant 13 doesn't change as n grows, so it is not crucial. The low order term, -5n, doesn't have much effect on f compared to the quadratic term, n2. • Q: What does it mean to say f(n) = Q(g(n)) ? • A: Intuitively, it means that function f is the same order of magnitude as g.

  6. Big-Theta Example (cont.) • Q: What does it mean to say f1(n) = Q(1)? • A: f1(n) = Q(1) means after a few n, f1 is bounded above & below by a constant. • Q: What does it mean to say f2(n) = Q(n lg n)? • A: f2(n) = Q(n lg n) means that after a few n, f2 is bounded above and below by a constant times nlg n. In other words, f2 is the same order of magnitude as nlg n. • More generally, f(n) = Q(g(n)) means that f(n) is a member of Q(g(n)) where Q(g(n)) is a set of functions of the same order of magnitude.

  7. Acknowledgements • Philadephia University, Jordan • Nilagupta, Pradondet

More Related