1 / 14

Comparing Functions

Comparing Functions. Notes on Notation. N = {0,1,2,3, ... } N + = {1,2,3,4, ... } R = Set of Reals R + = Set of Positive Reals R * = R + U {0}. Comparing f ( n ) and g ( n ). Let f be a function from N to R .

Leo
Download Presentation

Comparing Functions

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. Comparing Functions

  2. Notes on Notation N = {0,1,2,3, ... } N+ = {1,2,3,4, ... } R = Set of Reals R+ = Set of Positive Reals R* = R+ U {0}

  3. Comparing f(n) and g(n) Let f be a function from N to R. O(f) (Big O of f) is the set of all functions g from N to R such that: 1. There exists a real number c>0 2. AND there exists an n0 in N Such that: g(n) £ cf(n) whenever n ³ n0

  4. Notation and Pronunciation ProperNotation: g ÎO(f) “g is oh of f” Also Seen: g = O(f)

  5. Big Omega Let f be a function from N to R. W(f) (Big W of f) is the set of all functions g from N to R such that: 1. There exists a real number c>0 2. AND there exists an n0 in N Such that: g(n) ³ cf(n) whenever n ³ n0

  6. Big Theta Q(f) = O(f) ÇW(f) “g is of Order f” “g is Order f” g ÎQ(f)

  7. Little o and Little Omega o(f) = O(f) - Q(f) w(f) = W(f) - Q(f)

  8. English Interpretations • O(f) - Functions that grow no faster than f • W(f) - Functions that grow no slower than f • Q(f) - Functions that grow at the same rate as f • o(f) - Functions that grow slower than f • w(f) - Functions that grow faster than f

  9. Limit Formulas if for some if or

  10. More Limit Formulas if for some if

  11. The Last Limit Formula if

  12. Properties • Transitivity • if f Î O(g) and g Î O(h) then f Î O(h) • Same holds for Q , W, o, and w • Anti Symmetry (Sort of ...) • f Î O(g) if and only if g ÎW(f) • May replace O with o and W with w

  13. Some More Properties • Symmetry • if f ÎQ(f), then g ÎQ(f) • Reflexivity • f Î O(f) • Also true for Q and W • Not True for o and w

  14. And Even More Properties • Big Theta is an equivalence relation • f R g if and only if f ÎQ(g) • O(f+g) = O(max(f,g)) • Also true for Q and W

More Related