Analysis of Algorithms : Asymptotic Notations and its properties.
Asymptotic Notations: -
To represents, the Growth of any algorithm three types of Asymptotic Algorithms used.
- Big O Notation (read as "Oh")
- Big Ω Notation (read as "omega")
- Big θ Notation (read as "theta")
Types of Analysis: -
- Worst Case: - It provides Upper Bound on running time. In the worst case, the algorithm will not run for a long time period, no matter what the inputs are.
- Best Case: - It provides a Lower Bound on running time. Input is one for which the algorithm runs the fastest.
- Average Case: - It provides a prediction about the running time and assumes that the Input is random.
Algorithm Analysis using Asymptotic Notations: -
- Big O Notation: - The function f(n) = O (g(n)) [read as " f of n is Big-Oh of g of n"] iff their exist positive constants c and n0 (i.e., n not) such that f(n) <= c*g(n) for all n, n>= n0 (i.e., n not).
- Big Ω Notation: - The function f(n) = Ω(g(n)) [read as " f of n is Big-omega of g of n"] iff their exist positive constants c and n0 (i.e., n not) such that f(n) >= c*g(n) for all n, n>= n0 (i.e., n not).
- Big- θ Notation : - The function f(n) = θ (g(n)) [read as " f of n is Big-theta of g of n"] iff their exist positive constants c and n0 (i.e., n not) such that c1*g(n) <= f(n) >= c2*g(n) for all n, n>= n0 (i.e., n not).
- Big- θ Notation : - The function f(n) = θ (g(n)) [read as " f of n is Big-theta of g of n"] iff their exist positive constants c and n0 (i.e., n not) such that c1*g(n) <= f(n) >= c2*g(n) for all n, n>= n0 (i.e., n not).
No comments