Asymptotic NOTATION
Asymptotic NOTATION
Asymptotic Notations:
Asymptotic Notations are mathematical tools used to analyze the performance of algorithms
by understanding how their efficiency changes as the input size grows.
These notations provide a concise way to express the behavior of an algorithm’s time or
space complexity as the input size approaches infinity.
Rather than comparing algorithms directly, asymptotic analysis focuses on understanding the
relative growth rates of algorithms’ complexities.
Asymptotic analysis allows for the comparison of algorithms’ space and time complexities by
examining their performance characteristics as the input size varies.
By using asymptotic notations, such as Big O, Big Omega, and Big Theta, we can categorize
algorithms based on their worst-case, best-case, or average-case time or space complexities,
providing valuable insights into their efficiency.
Theta notation encloses the function from above and below. Since it represents the upper and
the lower bound of the running time of an algorithm, it is used for analyzing the average-case
complexity of an algorithm.
Theta (Average Case) You add the running times for each possible input combination and
take the average in the average case. Let g and f be the function from the set of natural
numbers to itself. The function f is said to be Θ(g), if there are constants c1, c2 > 0 and a
natural number n0 such that c1* g(n) ≤ f(n) ≤ c2 * g(n) for all n ≥ n0
Big-O notation represents the upper bound of the running time of an algorithm. Therefore, it
gives the worst-case complexity of an algorithm.
It is the most widely used notation for Asymptotic analysis.
.It returns the highest possible output value(big-O) for a given input.
If f(n) describes the running time of an algorithm, f(n) is O(g(n)) if there exist a positive
constant C and n0 such that, 0 ≤ f(n) ≤ cg(n) for all n ≥ n0
The execution time serves as an upper bound on the algorithm’s time complexity.