M3: Asymptotic Notation Flashcards
What is asymptotic notation used for?
To describe the growth rate of algorithms, particularly how they scale with input size n.
What does Big O Notation (O) represent?
Upper Bound
Define Big O Notation.
T(n)=O(f(n)) means the function T(n) grows at most as fast as f(n) for large n.
When is Big O Notation used?
When we want to provide an upper limit on the growth rate of an algorithm.
Give an example of Big O Notation.
5n^2+3n+2=O(n^2)
Define Little o Notation.
T(n)=o(f(n)) means the function T(n) grows strictly slower than f(n) as n approaches infinity.
When is Little o Notation used?
When the growth rate of T(n) is significantly smaller than f(n).
What does Theta Notation (θ) represent?
Tight Bound
Define Theta Notation.
T(n)=θ(f(n)) means T(n) grows as fast as f(n) for large n, providing both an upper and lower bound.
When is Theta Notation used?
When we want to describe the exact asymptotic behavior of an algorithm.
Give an example of Theta Notation.
3n^2+2n+1=θ(n^2)
What does Big Omega Notation (Ω) represent?
Lower Bound
Define Big Omega Notation.
T(n)= Ω(f(n)) means T(n) grows at least as fast as f(n) for large n.
When is Big Omega Notation used?
When we want to provide a minimum bound on the growth rate of an algorithm.
Give an example of Big Omega Notation.
2n^2+3n= Ω(n^2)
What does Little omega Notation (ω) represent?
Strictly Lower Bound
Define Little omega Notation.
T(n)=ω(f(n)) means T(n) grows strictly faster than f(n) as n approaches infinity.
When is Little omega Notation used?
When the growth rate of T(n) is significantly larger than f(n).
Give an example of Little omega Notation.
n^2=ω(n)
What is the type and meaning of O(f(n))?
Type: Upper Bound; Meaning: T(n) grows at most as fast as f(n).
What is the type and meaning of o(f(n))?
Type: Strictly Upper Bound; Meaning: T(n) grows strictly slower than f(n).
What is the type and meaning of θ(f(n))?
Type: Tight Bound; Meaning: T(n) grows exactly as fast as f(n).
What is the type and meaning of Ω(f(n))?
Type: Lower Bound; Meaning: T(n) grows at least as fast as f(n).