0% found this document useful (0 votes)
7 views3 pages

Asmtopic Notations

Asymptotic analysis is a method for evaluating the run-time performance of algorithms by defining their best, average, and worst case scenarios based on input size. It employs notations such as Big Oh (Ο), Omega (Ω), and Theta (θ) to express upper, lower, and both bounds of an algorithm's running time, respectively. Common asymptotic notations include constant, logarithmic, linear, n log n, quadratic, cubic, polynomial, and exponential complexities.

Uploaded by

hell raiser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Asmtopic Notations

Asymptotic analysis is a method for evaluating the run-time performance of algorithms by defining their best, average, and worst case scenarios based on input size. It employs notations such as Big Oh (Ο), Omega (Ω), and Theta (θ) to express upper, lower, and both bounds of an algorithm's running time, respectively. Common asymptotic notations include constant, logarithmic, linear, n log n, quadratic, cubic, polynomial, and exponential complexities.

Uploaded by

hell raiser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DATA STRUCTURES - ASYMPTOTIC ANALYSIS

https://www.tutorialspoint.com/data_structures_algorithms/asymptotic_analysis.htm
Copyright © tutorialspoint.com

Advertisements

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.

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.

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 fnn 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.

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

 Best Case − Minimum time required for program execution.


 Average Case − Average time required for program execution.
 Worst Case − Maximum time required for program execution.

Asymptotic Notations

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

 Ο Notation
 Ω Notation
 θ Notation

Big Oh Notation, Ο
The notation Οnn 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.

For example, for a function fnn

Ο(f(n)) = { g(n) : there exists c > 0 and n0 such that f(n) ≤ c.g(n) for all n
> n0. }

Omega Notation, Ω

The notation Ωnn 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.

For example, for a function fnn

Ω(f(n)) ≥ { g(n) : there exists c > 0 and n0 such that g(n) ≤ c.f(n) for all n
> n0. }
Theta Notation, θ

The notation θnn 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 −

θ(f(n)) = { g(n) if and only if g(n) = Ο(f(n)) and g(n) = Ω(f(n)) for all n >
n0. }

Common Asymptotic Notations

Following is a list of some common asymptotic notations −

Ο11
Constant −

Logarithmic − Οlognlogn

Linear − Οnn

n log n − Οnlognnlogn

quadratic − Ο(n2)

Cubic − Ο(n3)

polynomial − nΟ11

exponential − 2Οnn

You might also like