lect notes-AsymptoticAnalysis

lect notes-AsymptoticAnalysis - • f(n = O(f(n •...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Asymptotic Analysis •B ig O Notation: O(f(n)) f(n) is a function of positive integer • Definition : x n = O(f(n)) – There exists positive constants M , n 0 such that |x n | |f(n)| forall n n 0 – Here M and n 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Asymptotic Analysis •Examp le : 1+2+…+n = O(n 2 ) 1+2+…+n n+n+…+n = n 2 •Take M = 1 , n 0
Background image of page 2
Asymptotic Analysis •Examp le : 1 2 +2 2 +…+n 2 = O(n 3 ) 1 2 +2 2 +…+n 2 = 1/3 n 3 + O(n 3 ) P(n) = a 0 + a 1 n + … + a m n m = O(n m ) •Take M = |a 0 | + |a 1 | + … + |a m | n 0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Asymptotic Analysis •B ig O notation is useful • Note that “ = ” is one way ½ n 2 + n = O(n 2 ) correct O(n 2 ) = ½ n 2 + n wrong O(f(n)) is a set of functions g(n) such that |g(n)|
Background image of page 4
Asymptotic Analysis
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • f(n) = O(f(n)) • c•O(f(n)) = O(f(n)) • O(f(n)) + O(f(n)) = O(f(n)) • O(f(n))•O(g(n)) = (f(n)•g(n)) • O(f(n)) – O(f(n)) = ? Asymptotic Analysis • |x n | ≤ M |f(n)| n ≥ n • |x’ n | ≤ M’ |f(n)| n ≥ n’ • |x n ± x’ n | ≤ |x n | + |x’ n | ≤ (M + M’) |f(n)| ≤ M’’ |f(n)| n ≥ max(n , n’ ) • Big Omega: Ω (f(n)) • Theta: Θ (f(n)) Asymptotic Analysis • g(n) = Ω (f(n)) – |g(n)| ≥ L |f(n)| n ≥ n • g(n) = Θ (f(n)) iff – g(n) = O(f(n)) – g(n) = Ω (f(n))...
View Full Document

{[ snackBarMessage ]}

Page1 / 7

lect notes-AsymptoticAnalysis - • f(n = O(f(n •...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online