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

IT 403 Asymptotic Notations- PPT

The document outlines the syllabus for IT 303: Data Structure, focusing on asymptotic notation and algorithm complexity. It covers prerequisites, objectives, and learning outcomes related to time and space complexity, as well as asymptotic notations like Big-O, Omega, and Theta. The course aims to help students understand algorithm efficiency and analyze various algorithms using these notations.

Uploaded by

ashuagrawal.9479
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 views21 pages

IT 403 Asymptotic Notations- PPT

The document outlines the syllabus for IT 303: Data Structure, focusing on asymptotic notation and algorithm complexity. It covers prerequisites, objectives, and learning outcomes related to time and space complexity, as well as asymptotic notations like Big-O, Omega, and Theta. The course aims to help students understand algorithm efficiency and analyze various algorithms using these notations.

Uploaded by

ashuagrawal.9479
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/ 21

Program: B.

Tech, IT, 3rd sem, 2nd year

IT 303: Data Structure


Unit-1
Asymptotic Notation

July-Dec, 2022-23

Dr. Jitendra Singh Kushwah


Associate Professor, Information Technology
Outlines
• Prerequisite
• Objective
• Complexity of an Algorithm
• Asymptotic Notations
• Examples
• Learning Outcomes
• References

IT 303 2
Prerequisite
• Basic knowledge of Algorithm and Procedure.

• The fundamental concept of mathematics are clear so you can


easily understand the terms in the Complexity of an Algorithm.

IT 303 3
Objective
• Understand and remember the term Complexity.

• Introduce the concept of Asymptotic Notations through


examples.

•To introduce Time Complexity.

• To introduce Space Complexity

IT 303 4
Complexity of an Algorithm
Problem
Problem

Algorithm

A1 A2 A3 A4 A5 A6
Program in C

Design of Algorithm Using:


1. Greedy Algorithm
2. Divide and Conquor Algorithm

Problem have many solutions but selection of Algorithm is


must compulsory.

IT 303 Reference No.: R1 5


Complexity of an Algorithm
1. It is a function describing the efficiency of the algorithm.

2. The efficiency of an algorithm is mainly defined by two


factors i.e. space and time.

3. A good algorithm is one that is taking less time and less


space.

4. There is a trade-off between time and space.

IT 303 Reference No.: R1 6


Complexity of an Algorithm

A. Space Complexity
• Space Complexity of an algorithm denotes the total space
used or needed by the algorithm for its working, for various
input sizes.

• when you are creating a variable then you need some space
for your algorithm to run.

• All the space required for the algorithm is collectively called


the Space Complexity of the algorithm.

IT 303 Reference No.: R1 7


Complexity of an Algorithm

B. Time Complexity
• The time complexity is the number of operations an
algorithm performs to complete its task with respect to input
size

• The algorithm that performs the task in the smallest number


of operations is considered the most efficient one.

• It is represented by Big(oh) notation means maximum time


taken by the program.

IT 303 Reference No.: R1 8


Asymptotic Notations

• The efficiency of Algorithm is measured with the help of


asymptotic notations.

• Before designing and Analysis of Algorithm, We must


understand the terms of Algorithm call Asymptotic
Notations

• Asymptotic notations are the mathematical notations used


to describe the running time of an algorithm

IT 303 Reference No.: R1 9


Asymptotic Notations
1. Big(oh) Notation:
Big-O notation represents the upper bound of the running
time of an algorithm. Thus, it gives the worst case complexity
of an algorithm.

- Worst Case
- Upper Bound
- At most
- Least Upper Most

IT 303 Reference No.: R1 10


Asymptotic Notations

O(g(n)) = { f(n): there exist positive constants c and n0 such


that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0 , c>0,
n0>=0}

For any value of n, the running time of an algorithm does not


cross time provided by O(g(n)).

As n increases, f(n) grows no faster than g(n). In other


words, g(n) is an asymptotic upper bound on f(n).

IT 303 Reference No.: R1 11


Asymptotic Notations

2. Omega Notation (Ω-notation)


Omega notation represents the lower bound of the running time
of an algorithm. Thus, it provides best case complexity of an
algorithm.
- Best Case
- Lower Bound
- At least
- Greatest Lower Bound

IT 303 Reference No.: R1 12


Asymptotic Notations

Ω(g(n)) = { f(n): there exist positive constants c and n0 such that


0 ≤ cg(n) ≤ f(n) for all n ≥ n0 }

For any value of n, the minimum time required by the algorithm


is given by Omega Ω(g(n))

IT 303 Reference No.: R1 13


Asymptotic Notations
3. Theta Notation (Θ-notation)
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.

- Average Case
- Exact Time
- Tight Bound

IT 303 Reference No.: R1 14


Asymptotic Notations

Θ(g(n)) = { f(n): there exist positive constants c1, c2 and n0 such


that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0 }

If a function f(n) lies anywhere in between c1g(n) and c2 >


g(n) for all n ≥ n0, then f(n) is said to be asymptotically tight
bound.

IT 303 Reference No.: R1 15


Asymptotic Notations (Example)

IT 303 Reference No.: R1 16


Asymptotic Notations (Example)

IT 303 Reference No.: R1 17


Asymptotic Notations (Questions)

Find All Asymptotic Notations of these:

1. n2 + 5n + 7

2. n3 + 4 n2

3. 5 n2 + 3n + 20

4. ½ n2 + 3n

IT 303 Reference No.: R1 18


Learning Outcomes
• To find Run Time complexity of an Function.

• Understand Asymptotic Notations to find Lower, Upper


and Tight bound of a function.

•To understand the term Space and Time complexity of an


Algorithm.

IT 303 19
References
1. Seymour Lipschutz; Data Structures; Schaum’s Outlines,
Tata McGraw Hill Publishing.

IT 303 20
IT 303 21

You might also like