x - North Carolina Central University

advertisement
Spring 2016
COMP 2300
Discrete Structures for Computation
Chapter 11.2
O ,   and   Notations
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
1
O -Notation
(Big O)
• Suppose f and g are two real-valued functions of a real
variable x.
• If, for sufficiently large value of x, the value of |f| are less
than those of a multiple of |g|, then f is of order at most g,
or f(x) is O(g(x)).
• f is order at least g, written f(x) is O(g(x)), if and only if,
there exist a positive real number B and a non negative
real number b such that | f ( x) | B | g ( x) | for all real
number x > b.
B|g|
|f |
b
Spring 2016 COMP 2300
Donghyun (David) Kim
x
2
Department of Mathematics and Physics
North Carolina Central University
 -Notation
(Big Omega)
• Suppose f and g are two real-valued functions of a real
variable x.
• If, for sufficiently large value of x, the value of |f| are
greater than those of a multiple of |g|, then f is of order at
least g, or f(x) is  (g(x)).
• f is order at least g, written f(x) is  (g(x)), if and only if,
there exist a positive real number B and a non negative
real number b such that A | g ( x) || f ( x) | for all real
number x > a.
|f |
A| g |
a
Spring 2016 COMP 2300
Donghyun (David) Kim
x
3
Department of Mathematics and Physics
North Carolina Central University
 -Notation
(Big Theta)
• Suppose f and g are two real-valued functions of a real
variable x.
• If, for sufficiently large value of x, the value of |f| are
bounded both above and below by those of multiples of
|g|, then f is of order g, or f(x) is  (g(x)).
• f is order at least g, written f(x) is  (g(x)), if and only if,
there exist a positive real number B and a non negative
real number k such that A | g ( x) || f ( x) | B | g ( x) |
for all real number x > k.
B|g|
|f |
A| g |
k
Spring 2016 COMP 2300
Donghyun (David) Kim
x
4
Department of Mathematics and Physics
North Carolina Central University
Translating to Notations
• Use - notation to express the statement.
• 10 | x6 || 17 x6  45 x3  2 x  8 | 30 | x6 | for all real number x > 2.
• 17 x 6  45 x 3  2 x  8 is ( x6 ) .
• Use  and O notations to express the statements.
• 15 | x || 15
• | 15
• | 15
| for all real numbers x > 0.
x ( 2 x 9 )
| is ( x6 ) .
x 1
x ( 2 x 9 )
x 1
• | 15
x ( 2 x 9 )
x 1
| 45 | x |
x ( 2 x 9 )
x 1
for all real numbers x > 7.
| is O ( x ).
5
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Properties of Notations
• Let f and g be real-valued functions defined on the
same set of nonnegative real numbers.
1. f(x) is Ω(g(x)) and f (x) is O(g(x)) if, and only if f(x) is
Θ(g(x)).
2. f(x) is Ω(g(x)) if, and only if, g(x) is O(f(x)).
3. If f(x) is O(g(x)) and g(x) is O(h(x)), then f(x) is O(h(x)).
6
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Order of Power Functions
• If 1 < x, then x  x2  x3  x 4.
• In general, for any rational number r and s,
if x > 1 and r < s, then x r  x s.
• For any rational number r and s,
r
If r < s, then x is O( x s ).
7
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Polynomial Inequality
• Show that for any real number x,
if x > 1, then 3 x 2  2 x  7  12 x 3.
• 1  x  x2  x3
7  7 x3
2 x  2 x3
3 x2  3 x3
7  2 x  3 x 2  12 x 3
8
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Using the Definitions to Show That a Polynomial
Function Coefficients Has a Certain Order
• Use the definitions of big-Omega, bit-O, and big-Theta
to show that 2 x 4  3 x 3  5 is ( x 4 ).
• We must show that
• 2 x 4  3 x 3  5 is O( x 4 ) .
• 2 x 4  3 x 3  5 is ( x 4 ).
9
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
A Big-O Approximation for a Polynomial
with Some Negative Coefficients
• Use the definition of O-notation to show that
3 x 3  1000 x  200 is O( x 3 ).
• Show that 3 x 3  1000 x  200 is O( x s ) for all integers
s > 3.
10
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
A Big-Omega Approximation for a Polynomial
with Some Negative Coefficients
• Use the definition of Ω-notation to show that
3 x 3  1000 x  200 is ( x3 ).
r
• Show that 3 x 3  1000 x  200 is ( x ) for all integers
r < 3.
11
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Theorem 11.2.2
On Polynomial Orders
• Suppose a0 , a1, a2 ,, an are real numbers and an  0 .
n
n 2
1. an x  an 2 x
   a1x  a0 is O( x s )for all integers s  n.
2. an x n  an 2 x n 2    a1x  a0 is ( x r )for all integers r  n.
3. an x n  an 2 x n 2    a1x  a0 is ( x n ).
• Use the theorem on polynomial order to find orders for the
functions given by the following formulas.
• f ( x)  7 x  5 x  x  4 , for all real numbers x.
( x 1)( x 1)
• g ( x) 
, for all real numbers x.
4
5
3
• What is order of the sum of the first n integers?
1 2    n  (n2 ).
Spring 2016 COMP 2300
Donghyun (David) Kim
12
Department of Mathematics and Physics
North Carolina Central University
Theorem 11.2.3 Limitation on
Orders of Polynomial Functions
• Let n be a positive integer, and let a0 , a1, a2 ,, an be
real numbers with an  0 . If m is any integer with
m < n, then
an x n  an 2 x n 2    a1x  a0 is not O( x m )
and
an x n  an 2 x n 2    a1x  a0 is not ( x m ).
13
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Extension to Functions Composed
of Rational Power Functions
• What is the order of
( x3 / 2  3 )( x  2 )2 x7 / 2  4 x5 / 2  4 x3 / 2  3 x2 12 x  12

?
1/ 2
1/ 2
1/ 2
x (2 x  1)
2x  x
14
Spring 2016 COMP 2300
Donghyun (David) Kim
Department of Mathematics and Physics
North Carolina Central University
Download