0
6.5kviews
Explain the asymptotic notations

Mumbai University > Computer Engineering > Sem 4 > Analysis of Algorithm

Marks: 10M

Year: May 2016

1 Answer
1
183views
  1. Asymptotic analysis of an algorithm refers to defining the mathematical boundation/framing of its run-time performance. Using asymptotic analysis, we can very well conclude the best case, average case, and worst case scenario of an algorithm.

  2. Asymptotic analysis is input bound i.e., if there's no input to the algorithm, it is concluded to work in a constant time. Other than the "input" all other factors are considered constant.

  3. Asymptotic analysis refers to computing the running time of any operation in mathematical units of computation. For example, the running time of one operation is computed as f(n) and may be for another operation it is computed as g(n2). This means the first operation running time will increase linearly with the increase in n and the running time of the second operation will increase exponentially when n increases. Similarly, the running time of both operations will be nearly the same if n is significantly small.

  4. Usually, the time required by an algorithm falls under three types −

    i. Best Case − Minimum time required for program execution.

    ii. Average Case − Average time required for program execution.

    iii. Worst Case − Maximum time required for program execution.

  5. Following are the commonly used asymptotic notations to calculate the running time complexity of an algorithm.

    i. Ο Notation

    The notation Ο(n) is the formal way to express the upper bound of an algorithm's running time. It measures the worst case time complexity or the longest amount of time an algorithm can possibly take to complete.

enter image description here

For example, for a function f(n)

enter image description here

ii. Ω Notation

The notation Ω(n) is the formal way to express the lower bound of an algorithm's running time. It measures the best case time complexity or the best amount of time an algorithm can possibly take to complete.

enter image description here

For example, for a function f(n)

enter image description here

iii. θ Notation

The notation θ(n) is the formal way to express both the lower bound and the upper bound of an algorithm's running time. It is represented as follows –

enter image description here

Please log in to add an answer.