250 likes | 253 Vues
Chapter 3. G rowth of Functions Lee, Hsiu-Hui Ack: This presentation is based on the lecture slides from Hsu, Lih-Hsing, as well as various materials from the web. 3.1 Asymptotic notation. Θ -notation. g ( n ) is an asymptotic tight bound for f ( n ). ``= ’’ abuse.
E N D
Chapter 3 Growth of Functions Lee, Hsiu-Hui Ack: This presentation is based on the lecture slides from Hsu, Lih-Hsing, as well as various materials from the web.
3.1 Asymptotic notation • Θ-notation g(n) is an asymptotic tight bound for f(n). • ``=’’ abuse Hsiu-Hui Lee
The definition of requires that every member be asymptotically nonnegative. Hsiu-Hui Lee
EXAMPLE: Hsiu-Hui Lee
In general, Why ? Hsiu-Hui Lee
O-notation (big –oh; Asymptotic Upper Bound) EXAMPLE: 2n2= O(n3) Hsiu-Hui Lee
Ω-notation (big –omega; Asymptotic Lower Bound) EXAMPLE: Hsiu-Hui Lee
Theorem 3.1 • For any two functions f(n) and g(n), if and only if and . Hsiu-Hui Lee
O-notation (little-oh) • An upper bound that is notasymptotically tight . Hsiu-Hui Lee
ω-notation (little-omega) • An lower bound that is notasymptotically tight . Hsiu-Hui Lee
Relational properties • Transitivity • Reflexivity • Symmetry Hsiu-Hui Lee
Transpose symmetry Hsiu-Hui Lee
Trichotomy • Although any two real numbers can be compared, not all functions are asymptotically comparable. • a < b, a = b, or a > b. • It may be the case that neither nor holds. • e.g., are not comparable Hsiu-Hui Lee
3.2 Standard notations and common functions • Monotonicity: • A function f is monotonically increasing if m n implies f(m) f(n). • A function f is monotonically decreasing if m n implies f(m) f(n). • A function f is strictly increasing if m < n implies f(m) < f(n). • A function f is strictly decreasing if m > n implies f(m) > f(n). Hsiu-Hui Lee
Floor and ceiling Hsiu-Hui Lee
Modular arithmetic • For any integer a and any positive integer n, the value a mod n is the remainder (or residue) of the quotient a/n : a mod n =a -a/nn. • If (a mod n) = (b mod n). We write a b (mod n) and say that a is equivalent to b, modulo n. • We write a ≢b (mod n) if a is not equivalent to b modulo n. Hsiu-Hui Lee
Polynomials • Polynomial in n of degree d ≧ 0 • If a≧ 0, is monotonically increasing. • If a≦0, is monotonically decreasing. • A function is polynomial bounded if for some constant k . Hsiu-Hui Lee
Exponentials • Any positive exponential function with a base greater than 1 grows faster than any polynomial function. Hsiu-Hui Lee
Logarithms • A function f(n) is polylogarithmically bounded if • for any constant a > 0. Any positive polynomial function grows faster than any polylogarithmic function. Hsiu-Hui Lee
Factorials • Stirling’s approximation where Hsiu-Hui Lee
Function iteration For example, if , then Hsiu-Hui Lee
The iterative logarithm function Hsiu-Hui Lee
Since the number of atoms in the observable universe is estimated to be about , which is much less than , we rarely encounter a value of n such that . Hsiu-Hui Lee
Fibonacci numbers Hsiu-Hui Lee
Homework-1 • Problem 3-1, 3-2 • Due: 10/5/2007 Hsiu-Hui Lee