# A function f n is polylogarithmically bounded if for any constant a by 6t0SpFkz

VIEWS: 0 PAGES: 28

• pg 1
```									3.Growth of Functions
3.1 Asymptotic notation
( g (n))  { f (n) |  c1 , c2 , n0 s.t. 0  c1 g (n)  f (n)  c2 g (n)
for all n  n0 }
f ( n)  ( g ( n))

 g(n) is an asymptotic tight bound for f(n).
   ``=’’ abuse

2
   The definition of required every member
of be asymptotically nonnegative.
c2g(n)

f(n)
f ( n )  ( g( n ))
c1g(n)

n
n0
3
Example:
n2 n2      n2
  3n  if n>7.
14 2       2
6n  (n )
3     2

f ( n )  an2  bn  c , a, b, c constants, a>0.
 f(n)=(n2 ).
   In general,
p(n)  i  0 ai ni where ai are constant w ith ad    0.
d

Then P(n)  (n d ).
4
asymptotic upper bound
O( g (n))  { f (n) | c, n0 s.t. 0  f (n)  cg (n) n  n0 }

cg(n)

f(n)
f ( n )  O( g( n ))

n
n0
5
asymptotic lower bound
( g (n))  { f (n) | c, n0 s.t. 0  cg (n)  f (n) n  n0 }

f(n)
f ( n )  ( g( n ))
cg(n)

n
n0
6
Theorem 3.1.
   For any two functions f(n) and g(n),
f ( n )  ( g( n ))

if and only if f ( n )  O( g( n ))
and            f ( n )  ( g( n ))

7
 o( g( n ))  { f ( n )| c , n0 n  n0 , 0  f ( n )  cg( n )}
f ( n)
 f ( n )  o( g( n ))  limn        0
g( n )
  ( g( n ))  { f ( n )| c , n0 n  n0 , 0  cg( n )  f ( n )}
f ( n)
 f ( n )   ( g( n ))  limn        
g( n )

8
   Transitivity
f ( n )  ( g( n ))  g( n )  ( h( n ))  f ( n )  ( h( n ))
f ( n )  O( g( n ))  g( n )  O( h( n ))  f ( n )  O( h( n ))
f ( n )  ( g( n ))  g( n )  ( h( n ))  f ( n )  ( h( n ))
f ( n )  o( g( n ))  g( n )  o( h( n ))  f ( n )  o( h( n ))
f ( n )   ( g( n ))  g( n )   ( h( n ))  f ( n )   ( h( n ))

   Reflexivity
f ( n )  ( f ( n ))
f ( n )  O( f ( n ))
f ( n )  ( f ( n ))

   Symmetry
f ( n )  ( g( n ))  g( n )  ( f ( n ))
9
   Transpose symmetry
f ( n )  O( g( n ))  g( n )  ( f ( n ))
f ( n )  o( g( n ))  g( n )   ( f ( n ))

f ( n )  O( g( n ))  a  b
f ( n )  ( g( n ))  a  b
f ( n )  ( g( n ))  a  b
f ( n )  o( g( n ))  a  b
f ( n )   ( g( n ))  a  b

10
Trichotomy
   a < b, a = b, or a > b.
   e.g., n , n1sin n does not always hold
because the latter oscillates between n0 n2

11
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).

12
Floor and ceiling
x  1   x  x   x  x  1   For any real x

n / 2  n / 2  n             For any integer n

  n / a  / b   n / ab      For any real n>=0, and
integers a, b >0
 n / a  / b   n / ab
a / b  (a  (b  1)) / b
a / b  (a  (b  1)) / b
13
Proof of Ceiling
Prove : n / a  / b   n / ab
Let n  abm  r , where0  r  ab
If r  0, n / a  / b   n / ab  m
otherwise,r  0, then left  n / a  / b  
  abm  r         r               r  
  a  / b    bm  a  / b    bm   a   / b  
            
                                    
bm  s / b  m  s / b  m  s / b  m  1, and
*

right  n / ab  m  r / ab  m  r / ab  m  1
so, n / a  / b   n / ab, done
* because0  r  ab  0  r  ab  1 
0  r / a  (ab  1) / a  0  r / a  b  1 / a 
0  r / a  b  1  0  s  r / a   b  1                  14
Proof of Floor
Prove : n / a  / b   n / ab
Let n  abm  r , where0  r  ab
If r  0, n / a  / b   n / ab  m,
otherwise,r  0, then left  n / a  / b  
(abm  r ) / a  / b  bm  r / a  / b 
bm  r / a  / b  (bm  s ) / b   m  s / b  m,
*

and right  (abm  r ) / ab  m  r / ab  m,
so, n / a  / b   n / ab, done
* because0  r  ab  1  0  r / a  b  1 
0  s  r / a   b  1                                      15
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 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.

16
Exponential Basics
For all real a  0, m, and n
a 1
0

a a
1

1
a  1/ a
(a )  a
m n   mn
 (a )
n m

mn
a a a
m    n

17
Polynomials v.s. Exponentials
d i i
   Polynomials:      P( n )   a n
i 0
   A function is polynomial bounded if f(n)=O(nk)
   Exponentials: nb  o( a n )         ( a  1)
   Any positive exponential function grows faster
than any polynomial.

xi
e 
x

i  0 i!

1  x  e x  1  x  x 2 if | x | 1
x n
lim n (1  )  e x
n                         18
Prove: nb=o(an)
p s.t.b  p
since a  1, a  (1  x),
n          n
a n  (1  x) n   Ckn x k   Cn  k x k
n

k 0       k 0

p 1                n!             p 1   p 1 p 1
 C   n
n  ( p 1)   x                                    x  ( n ) x
(n  ( p  1))!( p  1)!
nb         np
     p 1 p 1
 0 as n  
a n
( n ) x
19
Logarithm Notations

lg n  log 2 n
ln n  log e n
lg n  (lg n)
k              k

lg lg n  lg(lg n)

20
Logarithm Basics
For all real a  0 , b  0 , c  0 , and n,
a  b log b a
log c (ab)  log c a  log c b
log b a n  n log b a
log c a
log b a 
log c b
log b (1 / a )   log b a
1
log b a 
log a b
a log b c  c log b a
21
Logarithms
x 2 x 3 x 4 x5
ln(1  x )  x              ... if | x|  1
2   3   4   5
x
 ln(1  x)  x for x  1
1 x

     A function f(n) is polylogarithmically bounded
if f (n)  O(lg k n) for some k
     log b n  o(n a ) for any constant a > 0.
     Any positive polynomial function grows faster
than any polylogarithmic function.
22
Prove: lgbn=o(na)
nb
Because lim n  0,
n  a
a
substituting lg n for n, a nd 2 for a
b            b
lg n      lg n
lim a lg n  lim a  0
n  ( 2 )   n  n

23
Factorials
   Stirling’s approximation
n n       1
n! 2n ( ) (1  ( ))
n e           n
n !  o( n )
n !  ( 2 n )
log( n !)  ( n log n )
n
 n  n
n!      2n   e
e
where
1             1
 n 
12n  1        12n
24
Function iteration
      n         if ｉ  0,
f   (i )
( n)      (i 1)
f(f        (n)) if ｉ  0.

For example, if f ( n)  2n , then f (i ) (n)  2i n

25
The iterative logarithm function
n                if i  0
lg(lg ( i 1) n) if i  0 and lg ( i 1) n  0

lg (n)  
(i )

 undefined if i  0 and lg (i1 ) n  0

                    or lg (i1 ) n is undefined.
lg* ( n )  min{ i  0 |lg( i )  1 }
lg* 2  1
lg* 4  2                                      ..2   h
22
lg* 16  3
lg* 65536  4
lg 2   *   2
h
lg* 265536  5
26
   Since the number of atoms in the observable
universe is estimated to be about 265536, which
is much less than 1080 , we rarely encounter a
value of n such that lg* n  5.

27
Fibonacci numbers
Use characteristic polynomial
F0  0
solve x 2  x  1  x 2  x  1  0 
F1  1
1 5
x        
Fi  Fi 1  Fi  2           2
i                         n              n
 
i                      1 5 
        B
1 5 

Fi                    Fi  A            2 
5                   2              
1 5                F0  0  A  B  0
       1.61803...             1 5     1 5
2                F1  1  A       B      1
 1 5                             2        2
       0.61803... A  1 , B   1
2                       5       5
28

```
To top