Professional Documents
Culture Documents
Untitled Notation
Untitled Notation
3 Predicting performance
Asymptotic Notation helps to predict the performance of an algorithm. It provides
information about how the performance of an algorithm will change with the
input size.
Big O Notation in detail
Definition Example
Big O is an upper bound on the growth rate of An algorithm that runs in O(n) means that its
an algorithm. It describes the worst-case time complexity increases linearly with the
scenario for an algorithm. input size n.
Omega Notation in detail
1 Definition
Omega is a lower bound on the growth rate of an algorithm. It describes the best-
case scenario for an algorithm.
2 Example
An algorithm that runs in Ω(1) has a constant runtime. Its time complexity remains
the same, no matter how large the input size n is.
3 Application
Omega notation is useful for finding the best-case scenario for an algorithm.
Theta Notation in detail
Definition Example
Theta notation is a tight bound An algorithm that runs in Θ(n^2)
between Big O and Omega notations. It means that its time complexity grows
describes the exact growth rate of an quadratically with the input size n.
algorithm.
Application
Theta notation is useful for finding the exact complexity of an algorithm.
Small O Notation in detail
Definition Example
Small o is an upper bound that is not tight. It An algorithm that runs in o(n^2) would have a
indicates that the growth rate of the algorithm faster growth rate than an algorithm that runs
is less than that of another function. in Θ(n^2).
Advantages of Using Asymptotic
Notations
1 Simplicity
Asymptotic Notations are simple to understand and apply.
2 Widely Accepted
Asymptotic Notations are widely used in computer science and software
engineering.
3 Efficiency
They help to choose the most efficient algorithm for a given data set and
predict its performance.