0% found this document useful (0 votes)
10 views6 pages

Slides 0

The document discusses growth of functions and big-oh notation. It defines asymptotic dominance and what it means for one function to be big-oh of another. It provides examples like polynomials being big-oh of exponentials and proofs that certain functions like n! are big-oh of 2^n. Witnesses are introduced as values used in proofs of asymptotic dominance.

Uploaded by

Priyank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Slides 0

The document discusses growth of functions and big-oh notation. It defines asymptotic dominance and what it means for one function to be big-oh of another. It provides examples like polynomials being big-oh of exponentials and proofs that certain functions like n! are big-oh of 2^n. Witnesses are introduced as values used in proofs of asymptotic dominance.

Uploaded by

Priyank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Section 2.2 Growth of Functions 2.2.

2.2 GROWTH OF FUNCTIONS

def: Let f and g be functions R → R. Then


f is asymptotically dominated by g if
(∃K ∈ R)(∀x > K)[f (x) ≤ g(x)]
notation: f  g.
Remark: This means that eventually, there is
an location x = K, after which the graph of the
function g lies above the graph of the function f .

BIG OH CLASSES
def: Let f and g be functions R → R. Then
f is in the class O(g) (“big-oh of g”) if
(∃C ∈ R)[f  Cg]
notation: f ∈ O(g).
disambiguation: Properly understood, O(g) is
the class of all functions that are asymptotically
dominated by any multiple of g.

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.
Chapter 2 ALGORITHMS and INTEGERS 2.2.2

terminology note: The phrase “f is big-oh


of g” makes sense if one imagines either that the
word “in” preceded the word “big-oh”, or that
“big-oh of g” is an adjective.
Example 2.2.1: 4n2 + 21n + 100 ∈ O(n2 )
Proof: First suppose that n ≥ 0. Then

4n2 + 21n + 100 ≤ 4n2 + 24n + 100


≤ 4(n2 + 6n + 25)
≤ 8n2 which holds whenever

n2 ≥ 6n + 25, which holds whenever


n2 − 6n + 9 ≥ 34, which holds whenever

n − 3 ≥ 34, which holds whenever
n ≥ 9. Thus,
(∀n ≥ 9)[4n2 + 21n + 100 ≤ 8n2 ].
Remark: We notice that n2 itself is asymptot-
ically dominated by 4n2 + 21n + 100. However,
we proved that 4n2 + 21n + 100 is asymptotically
dominated by 8n2 , a multiple of n2 .

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.
Section 2.2 Growth of Functions 2.2.3

WITNESSES
This operational definition of membership in a
big-oh class makes the definition of asymptotic
dominance explicit.
def: Let f and g be functions R → R. Then
f is in the class O(g) (“big-oh of g”) if
(∃C ∈ R)(∃K ∈ R)(∀x > K)[Cg(x) ≥ f (x)]
def: In the definition above, a multiplier C and
a location K on the x-axis after which Cg(x)
dominates f (x) are called the witnesses to the
relationship f ∈ O(g).
Example 2.2.1, continued: The values C = 8
and M = 9 are witnesses to the relationship
4n2 + 21n + 100 ∈ O(n2 ).
Larger values of C and K could also serve as
witnesses. However, a value of C less than or
equal to 4 could not be a witness.
CLASSROOM EXERCISE
If one chooses the witness C = 5, then K = 30
could be a co-witness, but K = 9 could not.

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.
Chapter 2 ALGORITHMS and INTEGERS 2.2.4

Lemma 2.2.1. (x + 1)n ∈ O(xn ).


Proof: Let C be the largest coefficient in the
(binomial) expansion of (x + 1)n , which has n + 1
terms. Then (x + 1)n ≤ C(n + 1)xn . ♦

Example 2.2.2: The proof of Lemma 2.2.1


uses the witnesses
 
n
C= n and K = 0
b2c

Theorem 2.2.2. Let p(x) be a polynomial of


degree n. Then p(x) ∈ O(xn ).
Proof: Informally, just generalize Example
2.2.1. Formally, just apply Lemma 2.2.1. ♦

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.
Section 2.2 Growth of Functions 2.2.5

Example 2.2.3: 100n5 ∈ O(en ). Observing


that n = eln n inspires what follows.
Proof: Taking the upper Riemann R n dx sum with
unit-sized intervals for ln x = 1 x implies for
n > 1 that
1 1 1
ln(n) < + + · · · +
1 2
 n
1 1 1 1
≤ + ··· + + + ··· +
1 5 6 n
 
1 1 1 1
≤ + ··· + + + ··· +
1 5 6 6
n−5
≤5+
6
Therefore, 6 ln n ≤ n + 25, and accordingly,
100n5 = 100 · e5 ln n < 100 · en+25 < e32 · en ♦
We have used the witnesses C = e32 and K = 0.

Theorem 2.2.3. Powers dominate logs.


Proof: See Example 2.2.3. ♦

Theorem 2.2.4. Exponentials dominate polyno-


mials.
Proof: See Example 2.2.3. ♦

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.
Chapter 2 ALGORITHMS and INTEGERS 2.2.6

Example 2.2.4: 2n ∈ O(n!).


Proof:
n times n−1 times
z }| { z }| {
2 · 2···2 = 2 · 1 · 2 · 2···2
≤ 2 · 1 · 2 · 3 · · · n = 2n!

We have used the witnesses C = 2 and K = 0.

BIG-THETA CLASSES
def: Let f and g be functions R → R. Then
f is in the class Θ(g) (“big-theta of g”)
if f ∈ O(g) and g ∈ O(f ).

Coursenotes by Prof. Jonathan L. Gross for use with Rosen: Discrete Math and Its Applic., 5th Ed.

You might also like