3 Growth of Functions Hsu LihHsing Computer Theory

  • Slides: 21
Download presentation
3. Growth of Functions Hsu, Lih-Hsing

3. Growth of Functions Hsu, Lih-Hsing

Computer Theory Lab. 3. 1 Asymptotic notation g(n) is an asymptotic tight bound for

Computer Theory Lab. 3. 1 Asymptotic notation g(n) is an asymptotic tight bound for f(n). n Chapter 3 ``=’’ abuse 2

Computer Theory Lab. n Chapter 3 The definition of required every member of be

Computer Theory Lab. n Chapter 3 The definition of required every member of be asymptotically nonnegative. 3

Computer Theory Lab. Example: n Chapter 3 In general, 4

Computer Theory Lab. Example: n Chapter 3 In general, 4

Computer Theory Lab. asymptotic upper bound Chapter 3 5

Computer Theory Lab. asymptotic upper bound Chapter 3 5

Computer Theory Lab. asymptotic lower bound Chapter 3 6

Computer Theory Lab. asymptotic lower bound Chapter 3 6

Computer Theory Lab. Theorem 3. 1. n Chapter 3 For any two functions f(n)

Computer Theory Lab. Theorem 3. 1. n Chapter 3 For any two functions f(n) and g(n), if and only if and . 7

Computer Theory Lab. Chapter 3 n n 8

Computer Theory Lab. Chapter 3 n n 8

Computer Theory Lab. Chapter 3 n Transitivity n Reflexivity n Symmetry 9

Computer Theory Lab. Chapter 3 n Transitivity n Reflexivity n Symmetry 9

Computer Theory Lab. n Chapter 3 Transpose symmetry 10

Computer Theory Lab. n Chapter 3 Transpose symmetry 10

Computer Theory Lab. Trichotomy Chapter 3 n a < b, a = b, or

Computer Theory Lab. Trichotomy Chapter 3 n a < b, a = b, or a > b. n e. g. , 11

Computer Theory Lab. 2. 2 Standard notations and common functions n Monotonicity: n n

Computer Theory Lab. 2. 2 Standard notations and common functions n Monotonicity: n n Chapter 3 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). 12

Computer Theory Lab. Floor and ceiling Chapter 3 13

Computer Theory Lab. Floor and ceiling Chapter 3 13

Computer Theory Lab. Modular arithmetic n n n Chapter 3 For any integer a

Computer Theory Lab. Modular arithmetic n n n Chapter 3 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 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. 14

Computer Theory Lab. Polynomials v. s. Exponentials n Polynomials: n n Exponentials: n Chapter

Computer Theory Lab. Polynomials v. s. Exponentials n Polynomials: n n Exponentials: n Chapter 3 A function is polynomial bounded if . Any positive exponential function grows faster than any polynomial. 15

Computer Theory Lab. Logarithms n n n Chapter 3 A function f(n) is polylogarithmically

Computer Theory Lab. Logarithms n n n Chapter 3 A function f(n) is polylogarithmically bounded if for any constant a > 0. Any positive polynomial function grows faster than any polylogarithmic function. 16

Computer Theory Lab. Factorials n Stirling’s approximation where Chapter 3 17

Computer Theory Lab. Factorials n Stirling’s approximation where Chapter 3 17

Computer Theory Lab. Function iteration For example, if , then Chapter 3 18

Computer Theory Lab. Function iteration For example, if , then Chapter 3 18

Computer Theory Lab. The iterative logarithm function Chapter 3 19

Computer Theory Lab. The iterative logarithm function Chapter 3 19

Computer Theory Lab. n Since the number of atoms in the observable universe is

Computer Theory Lab. n 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 . Chapter 3 20

Computer Theory Lab. Fibonacci numbers Chapter 3 21

Computer Theory Lab. Fibonacci numbers Chapter 3 21