ONotation - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

ONotation

Description:

1. O-Notation. Definition: Let f and g be real-valued functions defined on the same set of real ... Example: Let f(x) =3x5 2x3 4. S be the set of all integral ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 7
Provided by: vard
Category:
Tags: let | onotation

less

Transcript and Presenter's Notes

Title: ONotation


1
O-Notation
  • Definition Let f and g be real-valued functions
    defined on the same set of real numbers.
  • Then f is of order g, written f(x) is O(g(x)),
  • iff ? M?R and x0?R such that
  • f(x) ? Mg(x) , whenever xgtx0 .
  • f(x) is O(g(x)) is also read
  • g is a big-oh approximation for f .
  • Example 2x3 ? 5x for xgt1.
  • Thus, 2x3 is O(x) .

2
Orders of Power Functions
  • If xgt1
  • then x lt x2 , x2 lt x3, , xk lt xk1
  • for any k1 .
  • Thus, by transitivity of lt ,
  • if xgt1 and rlts,
  • then xr lt xs .
  • Proposition For any rational numbers r and s,
  • if rlts,
  • then xr is O(xs) .
  • Examples x7 is O(x11) x4/3 is O(x3/2).

3
Orders of General Polynomial Functions
  • Theorem (On Polynomial Orders)
  • If a0, a1, a2, , an are real numbers and an?0,
  • then anxn an-1xn-1a1xa0 is O(xm)
  • for all m n.
  • Example 4x7 - 15x5 6x2 - 3x 5 is O(x7) .

4
Orders for Functions of Integer Variables
  • Example Show that
  • 135(2n1) is O(n2) .
  • Solution 135(2n1)
  • (01)(21)(41)(2n1)
  • (0242n) (n1)
  • 2(12n) (n1)
  • 2n(n1)/2 (n1)
  • (n2n) (n1)
  • n22n1
  • which is O(n2) by the theorem on
  • polynomial orders

5
Best Big-Oh Approximations
  • Definition
  • Suppose f is a function defined on R
  • S is a set of functions defined on R.
  • Then function g?S is
  • a best big-oh approximation for f in S iff
  • 1. f(x) is O(g(x))
  • 2. for any h?S, if f(x) is O(h(x))
  • then g(x) is also O(h(x)) .
  • In other words,
  • g is the smallest function in S that is an
    order of f.
  • Example Let f(x) 3x52x34
  • S be the set of all integral power
    functions xk, k?Z .
  • Then g(x)x5 is a best big-oh
    approximation for f in S

6
Big-Oh Approximations on Rational Power
Functions
  • Proposition If a0, a1, , an are real numbers
    and an?0,
  • and r0, r1, , rn are rational numbers with r0
    lt r1 lt lt rn ,
  • then
  • Example Find a best big-oh approximation from
    the set of all rational power functions for
  • Solution
  • Then, by the proposition,
  • g(x)x3/2 is a best approximation for f(x).
Write a Comment
User Comments (0)
About PowerShow.com