Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 3: Growth of Functions Ming-Te Chi

Similar presentations


Presentation on theme: "Ch 3: Growth of Functions Ming-Te Chi"— Presentation transcript:

1 Ch 3: Growth of Functions Ming-Te Chi
Algorithms Ch 3: Growth of Functions Ming-Te Chi Ch3 Growth of Functions

2 3.1 Asymptotic notation A way to describe behavior of function in the limit. Ch3 Growth of Functions

3 asymptotically tight bound
 g(n) is an asymptotic tight bound for f(n). "=" abuse equality. “is a member of” All ci and n0 are positive numbers. Ch3 Growth of Functions

4 The definition of required every member of be asymptotically nonnegative.
Ch3 Growth of Functions

5 Example: Ch3 Growth of Functions

6 In general, if Ch3 Growth of Functions

7 asymptotic upper bound
Ch3 Growth of Functions

8 asymptotic lower bound
Ch3 Growth of Functions

9 Theorem 3.1. For any two functions f(n) and g(n), if and only if and .
Ch3 Growth of Functions

10 Remarks: is read as “little-oh of g of n”
The asymptotic upper bound by O-notation may or may not be asymptotically tight. The bound 2n2 = O(n2) is asymptotically tight but the bound 2n = O(n2) is not. The o-notation is used to denote an upper bound that is not asymptotically tight. is read as “little-oh of g of n” Ch3 Growth of Functions

11 o-notation Ch3 Growth of Functions

12 ω-notation Ch3 Growth of Functions

13 Difference between big-oh and little-oh? Etc.
5 asymptotic notations Difference between big-oh and little-oh? Etc. Ch3 Growth of Functions

14 Properties: Transitivity Reflexivity Symmetry Ch3 Growth of Functions

15 Transpose symmetry Ch3 Growth of Functions

16 Trichotomy (三一律) a < b, a = b, or a > b. (only one condition holds for all real number a & b) Not all functions are asymptotically comparable. (For two functions f and g, it may be the case that neither nor e.g., can not be compared using the asymptotic notation. Since oscillates between 0 and 2. Ch3 Growth of Functions

17 2.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). Ch3 Growth of Functions

18 Floor and ceiling Ch3 Growth of Functions

19 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/n. 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. Ch3 Growth of Functions

20 Polynomials v.s. Exponentials
Polynomial in n of degree d, a nonnegative integer. A function is polynomial bounded if for some constant k. Ch3 Growth of Functions

21 Polynomials v.s. Exponentials
Any positive exponential function grows faster than any polynomial. Ch3 Growth of Functions

22 Logarithms A function f(n) is polylogarithmically bounded if , for some constant k for any constant a > 0. Any positive polynomial function grows faster than any polylogarithmic function. Ch3 Growth of Functions

23 Factorials Ch3 Growth of Functions

24 Factorials Stirling’s approximation can be used to show
Ch3 Growth of Functions

25 Factorials Also, for n>=1, we have where Ch3 Growth of Functions

26 Function iteration For example, if , then Ch3 Growth of Functions

27 The iterative logarithm function
Ch3 Growth of Functions

28 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 Ch3 Growth of Functions

29 Fibonacci numbers Ch3 Growth of Functions

30 Fibonacci numbers Fibonacci numbers grow exponentially.
Ch3 Growth of Functions


Download ppt "Ch 3: Growth of Functions Ming-Te Chi"

Similar presentations


Ads by Google