0% completed
Little-o (o) and Little-omega (ω) Notations provide more precise ways to describe the growth rate of functions. While Big-O and Big-Omega set upper and lower bounds that an algorithm’s complexity can approach, little-o and little-omega are stricter. They define cases where a function grows strictly slower (little-o) or strictly faster (little-omega) than another.
Little-o Notation (o-notation)
Little-o notation, represented as o(g(n)), describes a function f(n) that grows strictly slower than g(n). In other words, f(n) approaches zero relative to g(n) as n grows larger.
Formal Definition
A function f(n) is o(g(n)) if for every positive constant c, there exists an n_0 such that:
f(n) < c \cdot g(n)
for all n \geq n_0.
- Interpretation: f(n) grows slower than any constant multiple of g(n) as n \to \infty.
Example of Little-o
Let’s say f(n) = n and g(n) = n^2.
- For any constant c, f(n) = n will eventually be less than c \cdot g(n) = c \cdot n^2 as n gets large.
- Therefore, f(n) = o(n^2), since n grows slower than n^2.
In this case, f(n) = o(n^2) implies that f(n) will never reach the growth rate of n^2 but will remain strictly slower.
Little-omega Notation (ω-notation)
Little-omega notation, represented as ω(g(n)), describes a function f(n) that grows strictly faster than g(n). This means that as n becomes very large, f(n) exceeds any constant multiple of g(n).
Formal Definition
A function f(n) is ω(g(n)) if for every positive constant c, there exists an n_0 such that:
f(n) > c \cdot g(n)
for all n \geq n_0.
- Interpretation: f(n) grows faster than any constant multiple of g(n) as n \to \infty.
Example of Little-omega
Consider f(n) = n^2 and g(n) = n.
- For any constant c, f(n) = n^2 will eventually exceed c \cdot g(n) = c \cdot n as n becomes large.
- Therefore, f(n) = ω(n), indicating that n^2 grows strictly faster than n.
In this case, f(n) = ω(n) implies that f(n) will always outpace g(n) as n increases.
Key Points to Remember
- Little-o and Little-omega Are Stricter Notations: They define functions that grow slower or faster without approaching the growth rate of the comparison function.
- Strict Growth Conditions: These notations require that f(n) strictly remains slower or faster than g(n) for large input sizes.
- Useful for Precise Analysis: While Big-O and Big-Omega are broad, little-o and little-omega provide clarity for strictly different growth rates.
.....
.....
.....
On this page
Little-o Notation (o-notation)
Formal Definition
Example of Little-o
Little-omega Notation (ω-notation)
Formal Definition
Example of Little-omega
Key Points to Remember