

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Asymptotic Behavior........................................ 2Order Notation............................................ 3Order Notation Continued..................................... 4More Notation............................................. 5More Notation Continued..................................... 6Log-Log Plot of Some Functions................................ 7Summation Notation........................................ 8Some Miscellaneous Stuff..................................... 9
and^ g(n)^ be nonnegative functions when
n^ ≥^0.
^ Define^ f^ (
n)^ ≺^ g(n) (read “f (n)^ is asymptotically less than
g(n)”)
if there exists a positive constant
k^ such that f^ (n)^ < g(n)^
when^ n^ ≥^ k. (This definition is not in the book.) Examples: 2 n^ + 100^ ≺^3
n^ −^100 (consider
n^ ≥^200 ) 2 n 1000 n≺^2 / 1000 (consider
n^ ≥^30 ) ^ Θ(g(n))^ includes all functions bounded by constant factors of
g(n).
CS 5633 Analysis of Algorithms
Chapter 3: Slide – 2
g(n))^ if^ cg(^1
n)^ ≺^ f^ (n)^ ≺
cg(n)^2 for some positive constants
cand^ c.^1 ^ Big-Oh-notation:^ f^ (n)^ ∈^ O
(g(n))^ if^ f^ (n
)^ ≺^ c g(n) for some positive constant
c. ^ Big-Omega-notation:^ f^ (n)^ ∈^ Ω(
g(n))^ if^ c g(n
)^ ≺^ f^ (n) for some positive constant
c. ^ little-oh-notation:^ f^ (n)^ ∈^ o(
g(n))^ if^ f^ (n)
≺^ c g(n) for all positive constants
c. CS 5633 Analysis of Algorithms
Chapter 3: Slide – 3 2
(g(n))^ if^ c g(
n)^ ≺^ f^ (n) for all positive constants
c. If^ f^ (n)^ is^ f
(n)^ also^.. .? is...^ o(g
(n))^ O(g(n)) Θ(
g(n)) Ω(g(n))
ω(g(n))
o(g(n)) O(g(n)) Θ(g(n)) Ω(g(n)) ω(g(n)) CS 5633 Analysis of Algorithms
Chapter 3: Slide – 4
if^... monotonically increasing
m^ ≤^ n^ →^
f^ (m)^ ≤^ f^ (n) monotonically decreasing
m^ ≤^ n^ →^
f^ (m)^ ≥^ f^ (n) strictly increasing
m < n
→^ f^ (m)^ < f
(n)
strictly decreasing
m < n
→^ f^ (m)^ > f
(n)
^ ⌊x⌋^ is the floor of
x.^ ⌈x⌉^ is the ceiling of
x.
di^ ^ anis polynomial in Σi^ i=
n^ of degree^
d. n^ ais exponential in
n. logn^ is logarithmic ina^
n. CS 5633 Analysis of Algorithms
Chapter 3: Slide – 5
lognb^ n = logab^ lg n = logn (^2) ln n = logn where^ e^ = 2e
^ n!^ is^ n^ factorial. ^ Let^0 < a <
1 < b < c.a Θ(1) ≺ Θ(lg^ n)^ ≺^ Θ(n)
≺^ Θ(n)^ ≺^ Θ(
n^ lg^ n)^ ≺^ Θ(n
bc)^ ≺^ Θ(n)^ ≺
n Θ(b)^ ≺^ Θ(c n)^ ≺^ Θ(n!)^ ≺
n Θ(n) CS 5633 Analysis of Algorithms
Chapter 3: Slide – 6 3
10
100 T(N)
N^N fact(N)^ 3^N^ 2^N^ N^3^ N^2 N*lg(N)^ N sqrt(N) lg(N) N CS 5633 Analysis of Algorithms
Chapter 3: Slide – 7
+^ a+^ · · ·^ + 1 2 an n ^ c a=^ Σi^ i= nc a Σi i= n ^ (a+^ b Σi^ i=
n) = a+^ Σii^ i= n^ b Σi i= ^ If^ a, a,... , a^12
is increasing, then:n n^ ais^ O^ (n a Σi^ i=
)n ( n ais Ω n a Σi (^) i= ) n/ 2 CS 5633 Analysis of Algorithms
Chapter 3: Slide – 8
a· · ·^ a 1 2 n (^ n log^ Πb^ i= )n a^ =^ (log^ Σi^ i=
a)b i ^ Sets, Relations, Functions, Graphs, TreesSee Appendix B CS 5633 Analysis of Algorithms
Chapter 3: Slide – 9 4