0% found this document useful (0 votes)
3 views14 pages

Module 1 Part B

The document provides an overview of Asymptotic Notations, specifically O (Big-Oh), Ω (Big-Omega), and Θ (Theta), which are used to describe the time complexity of algorithms. It outlines the significance of these notations in classifying functions based on their growth rates and provides examples of various classes of functions. The document emphasizes that these notations serve as bounds for algorithmic performance rather than being tied to specific cases like best, average, or worst case.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

Module 1 Part B

The document provides an overview of Asymptotic Notations, specifically O (Big-Oh), Ω (Big-Omega), and Θ (Theta), which are used to describe the time complexity of algorithms. It outlines the significance of these notations in classifying functions based on their growth rates and provides examples of various classes of functions. The document emphasizes that these notations serve as bounds for algorithmic performance rather than being tied to specific cases like best, average, or worst case.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Amity School of Engineering & Technology (CSE)

Analysis and Design of Algorithm(ADA)

Module-1
Asymptotic Notations

O(Big-Oh), Ω (Big-Omega) and

1
Amity School of Engineering & Technology (CSE)

OBJECTIVES
After completing this section, you will be able to

 Understand the class of Functions

 Explain the need and significance of Asymptotic Notation

 Differentiate (mathematically) between asymptotic notations


-,
-
-

2
Amity School of Engineering & Technology (CSE)

Class (Growth) of Functions


Class Name Example
Constant f(n)=1, or f(n)=7 or f(n)=500

Logrithemic Binary search


Linear time Linear search or f(n)=3n+2 or f(n)=10n+500
or n/700+5 =O(1)
Poly logrithemic Merge sort

Quadratic Matrix addition


Cubic Matrix Multiplication
or Exponential TOH
Factorial TSP (using brute force method)

3
Amity School of Engineering & Technology (CSE)

Growth of functions(increasing order)

4
Amity School of Engineering & Technology (CSE)

Asymptotic Notations- (O, Ω, and θ)


The basic Asymptotic Notations are:
1. O(Big-“Oh”) Notation. [Maximum number of steps to
solve a problem, (upper bound)]

2. Ω (Big-“Omega”) Notation [Minimum number of steps to


solve a problem, (lower bound)]

3. (Theta) Notation [Average number of steps to solve a


problem, (Average bound)]

Note: Any function can be represented either in Upper bound or in Lower


bound or in Average bound
5
Amity School of Engineering & Technology (CSE)

 Time complexity of the algorithm may be any


one of these:
) …

 If complexity is not among these, then may be between


two class listed here. Then we go for O or Ω notations.

6
Amity School of Engineering & Technology (CSE)

Hint:
Log property: )
7
Amity School of Engineering & Technology (CSE)

(Big)-O Notation

Aveg Upper bound


Lower bound Bound

8
Amity School of Engineering & Technology (CSE)

9
Amity School of Engineering & Technology (CSE)

10
Amity School of Engineering & Technology (CSE)

Ω Notation (example)

<n

Aveg Upper bound


Lower bound Bound

11
Amity School of Engineering & Technology (CSE)

Hint: since

12
Amity School of Engineering & Technology (CSE)

Theta (Notation (Example)


Aveg Upper bound


Lower bound Bound

13
Amity School of Engineering & Technology (CSE)

Note:
 Asymptotic Notations are not related to Best-case,
Average-case or worst case, its just a bound of a
function.

 Any Notation (O, Ω or ) can be used for Best-case,


Average-case or worst case

 Always write , if not possible then use O or Ω

14

You might also like