SlideShare a Scribd company logo
1 of 22
UCSE010 - DESIGN AND ANALYSIS OF ALGORITHMS
1
Dr.Nisha Soms/SRIT
Semester-06/2020-2021
• There are three types of analysis that we
perform on a particular algorithm.
• Best Case indicates the minimum time required for
program execution.
• For example, the best case for a sorting algorithm would be
data that's already sorted.
2
Dr.Nisha Soms/SRIT
• Average Case indicates the average time required for
program execution.
• Finding average case can be very difficult.
• Worst Case indicates the maximum time required for
program execution.
• For example, the worst case for a sorting algorithm might
be data that's sorted in reverse order (but it depends on the
particular algorithm).
3
Dr.Nisha Soms/SRIT
4
Dr.Nisha Soms/SRIT
Ref: https://www.cse.iitd.ac.in/~mausam/courses/col106/autumn2017/lectures/02-
asymptotic.pdf
 The standard notations used to define the time
required and the space required by the algorithm.
 The word Asymptotic means approaching a value or
curve arbitrarily closely (i.e., as some sort of limit is
taken).
 There are three types of asymptotic notations to
represent the growth of any algorithm, as input
increases:
▪ Big Theta (Θ)
▪ Big Oh(O)
▪ Big Omega (Ω)
5
Dr.Nisha Soms/SRIT
6
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 f(n) is O(g(n)), if there exists constants c and
n0 , s.t. f(n) ≤ c g(n) for all n ≥ n0
 f(n) and g(n) are functions over non-negative
integers
7
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 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.
8
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 f(n) is Ω(g(n)) if there exists constants c and
n0, such that c g(n) ≤ f(n) for n ≥ n 0
9
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 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.
1
0
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 f(n) is Ɵ(g(n)) if there exists constants c1 , c2 ,
and n0, such that c1 g(n) ≤ f(n) ≤ c2 g(n) for n
≥ n0
1
1
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 The notation θ(n) is the formal way to express
both the lower bound and the upper bound of
an algorithm's running time.
 It measures the average case time complexity
average amount of time an algorithm can
possibly take to complete.
 Given f(n) and g(n), which grows faster?
 If Lim n→∞ f(n)/g(n) = 0, then g(n) is faster
 If Lim n→∞ f(n)/g(n) = ∞, then f(n) is faster
 If Lim n→∞ f(n)/g(n) = non-zero constant,
then both grow at the same rate
 Solved Problems are available in
https://www.cse.wustl.edu/~sg/CS241_FL99/h
w1-practice.html
Semester-06/2020-2021 Dr.Nisha Soms/SRIT 12
1
3
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 General Property:
If f(n) is O(g(n)) then a*f(n) is also O(g(n)) ; where a is a
constant.
 Example:
f(n) = 2n²+5 is O(n²) then 7*f(n) = 7(2n²+5)
= 14n²+35 is also O(n²)
 Similarly, this property satisfies both Θ and Ω notation.
 We can say
 If f(n) is Θ(g(n)) then a*f(n) is also Θ(g(n)); where a is a constant.
 If f(n) is Ω (g(n)) then a*f(n) is also Ω (g(n)); where a is a
constant.
1
4
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 Reflexive Property:
If f(n) is given then f(n) = O(f(n))
 Example:
If f(n) = n3 ⇒ O(n3)
 Similarly,
 f(n) = Ω(f(n))
 f(n) = Θ(f(n))
1
5
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 Transitive Property:
If f(n) is O(g(n)) and g(n) is O(h(n)) then f(n) =
O(h(n)) .
 Example: if f(n) = n , g(n) = n² and h(n)=n³
n is O(n²) and n² is O(n³) then n is O(n³)
 Similarly this property satisfies for both Θ and Ω
notation.
 We can say
 If f(n) is Θ(g(n)) and g(n) is Θ(h(n)) then f(n) = Θ(h(n))
 If f(n) is Ω (g(n)) and g(n) is Ω (h(n)) then f(n) = Ω (h(n))
1
6
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 Symmetric Property:
If f(n) is Θ(g(n)) then g(n) is Θ(f(n)) .
 Example: f(n) = n² and g(n) = n² then f(n) =
Θ(n²) and g(n) = Θ(n²)
This property only satisfies for Θ notation.
1
7
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 Transpose Symmetric Property:
If f(n) is O(g(n)) then g(n) is Ω (f(n)).
 Example: f(n) = n , g(n) = n² then n is O(n²)
and n² is Ω (n)
This property only satisfies for O and Ω
notations.
1
8
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 Transpose Symmetric Property:
If f(n) is O(g(n)) then g(n) is Ω (f(n)).
 Example: f(n) = n , g(n) = n² then n is O(n²)
and n² is Ω (n)
This property only satisfies for O and Ω
notations.
1
9
Semester-06/2020-2021 Dr.Nisha Soms/SRIT
 If f(n) = O(g(n)) and f(n) = Ω(g(n)) then f(n) = Θ(g(n))
 If f(n) = O(g(n)) and d(n)=O(e(n))
then f(n) + d(n) = O( max( g(n), e(n) ))
 Example: f(n) = n i.e O(n), d(n) = n² i.e O(n²)
then f(n) + d(n) = n + n² i.e O(n²)
 If f(n)=O(g(n)) and d(n)=O(e(n)) then
f(n) * d(n) = O( g(n) * e(n) )
 Example: f(n) = n i.e O(n), d(n) = n² i.e O(n²)
then f(n) * d(n) = n * n² = n³ i.e O(n³)
 Solved Problems are available in
https://www.cse.wustl.edu/~sg/CS241_FL99/h
w1-practice.html
Semester-06/2020-2021 Dr.Nisha Soms/SRIT 20
 https://dotnettutorials.net/lesson/properties-of-
asymptotic-notations/
 https://unacademy.com/lesson/properties-of-
asymptotic-notation-part-1/1F2FTIU0
 https://www.cse.iitd.ac.in/~mausam/courses/col1
06/autumn2017/lectures/02-asymptotic.pdf
 https://www.cse.iitd.ac.in/~pkalra/col100/slides/1
0-Efficiency.pdf
 https://www.cse.wustl.edu/~sg/CS241_FL99/hw1
-practice.html
Semester-06/2020-2021 Dr.Nisha Soms/SRIT 21
Please Click Like, Share and Subscribe !
Semester-06/2020-2021 Dr.Nisha Soms/SRIT 22

More Related Content

What's hot

Analysis of algorithn class 3
Analysis of algorithn class 3Analysis of algorithn class 3
Analysis of algorithn class 3
Kumar
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
Sajid Marwat
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
Anindita Kundu
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
Sri Prasanna
 

What's hot (20)

Algorithm big o
Algorithm big oAlgorithm big o
Algorithm big o
 
Divide and conquer strategy
Divide and conquer strategyDivide and conquer strategy
Divide and conquer strategy
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis
 
Analysis of algorithn class 3
Analysis of algorithn class 3Analysis of algorithn class 3
Analysis of algorithn class 3
 
Computational Complexity
Computational ComplexityComputational Complexity
Computational Complexity
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Basic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV SyllabusBasic Computer Engineering Unit II as per RGPV Syllabus
Basic Computer Engineering Unit II as per RGPV Syllabus
 
Time complexity
Time complexityTime complexity
Time complexity
 
asymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysisasymptotic analysis and insertion sort analysis
asymptotic analysis and insertion sort analysis
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 
Analysis of Algorithm
Analysis of AlgorithmAnalysis of Algorithm
Analysis of Algorithm
 
Design and Analysis of algorithms
Design and Analysis of algorithmsDesign and Analysis of algorithms
Design and Analysis of algorithms
 
Asymptotic Analysis
Asymptotic AnalysisAsymptotic Analysis
Asymptotic Analysis
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
 
Graph Traversal Algorithms - Breadth First Search
Graph Traversal Algorithms - Breadth First SearchGraph Traversal Algorithms - Breadth First Search
Graph Traversal Algorithms - Breadth First Search
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Lecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithmsLecture 5: Asymptotic analysis of algorithms
Lecture 5: Asymptotic analysis of algorithms
 
Lec 5 asymptotic notations and recurrences
Lec 5 asymptotic notations and recurrencesLec 5 asymptotic notations and recurrences
Lec 5 asymptotic notations and recurrences
 
Algorithum Analysis
Algorithum AnalysisAlgorithum Analysis
Algorithum Analysis
 

Similar to Asymptotic analysis

Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
KarthikVijay59
 
lecture 1
lecture 1lecture 1
lecture 1
sajinsc
 
Ch-2 final exam documet compler design elements
Ch-2 final exam documet compler design elementsCh-2 final exam documet compler design elements
Ch-2 final exam documet compler design elements
MAHERMOHAMED27
 
C3L2_The Derivative_G12A.pptx
C3L2_The Derivative_G12A.pptxC3L2_The Derivative_G12A.pptx
C3L2_The Derivative_G12A.pptx
karan11dhawan
 
Skiena algorithm 2007 lecture09 linear sorting
Skiena algorithm 2007 lecture09 linear sortingSkiena algorithm 2007 lecture09 linear sorting
Skiena algorithm 2007 lecture09 linear sorting
zukun
 

Similar to Asymptotic analysis (20)

Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
Measuring algorithm performance
Measuring algorithm performanceMeasuring algorithm performance
Measuring algorithm performance
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
Data structures notes for college students btech.pptx
Data structures notes for college students btech.pptxData structures notes for college students btech.pptx
Data structures notes for college students btech.pptx
 
Asymptotic Analysis in Data Structure using C
Asymptotic Analysis in Data Structure using CAsymptotic Analysis in Data Structure using C
Asymptotic Analysis in Data Structure using C
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
lecture 1
lecture 1lecture 1
lecture 1
 
Theta notation
Theta notationTheta notation
Theta notation
 
Searching.pptx
Searching.pptxSearching.pptx
Searching.pptx
 
Ch-2 final exam documet compler design elements
Ch-2 final exam documet compler design elementsCh-2 final exam documet compler design elements
Ch-2 final exam documet compler design elements
 
Design and analysis of ra sort
Design and analysis of ra sortDesign and analysis of ra sort
Design and analysis of ra sort
 
Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02
 
Master’s theorem Derivative Analysis
Master’s theorem Derivative AnalysisMaster’s theorem Derivative Analysis
Master’s theorem Derivative Analysis
 
Complexity
ComplexityComplexity
Complexity
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
 
C3L2_The Derivative_G12A.pptx
C3L2_The Derivative_G12A.pptxC3L2_The Derivative_G12A.pptx
C3L2_The Derivative_G12A.pptx
 
A survey on parallel corpora alignment
A survey on parallel corpora alignment A survey on parallel corpora alignment
A survey on parallel corpora alignment
 
Weekends with Competitive Programming
Weekends with Competitive ProgrammingWeekends with Competitive Programming
Weekends with Competitive Programming
 
Skiena algorithm 2007 lecture09 linear sorting
Skiena algorithm 2007 lecture09 linear sortingSkiena algorithm 2007 lecture09 linear sorting
Skiena algorithm 2007 lecture09 linear sorting
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 

Recently uploaded

Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Asymptotic analysis

  • 1. UCSE010 - DESIGN AND ANALYSIS OF ALGORITHMS 1 Dr.Nisha Soms/SRIT Semester-06/2020-2021
  • 2. • There are three types of analysis that we perform on a particular algorithm. • Best Case indicates the minimum time required for program execution. • For example, the best case for a sorting algorithm would be data that's already sorted. 2 Dr.Nisha Soms/SRIT
  • 3. • Average Case indicates the average time required for program execution. • Finding average case can be very difficult. • Worst Case indicates the maximum time required for program execution. • For example, the worst case for a sorting algorithm might be data that's sorted in reverse order (but it depends on the particular algorithm). 3 Dr.Nisha Soms/SRIT
  • 5.  The standard notations used to define the time required and the space required by the algorithm.  The word Asymptotic means approaching a value or curve arbitrarily closely (i.e., as some sort of limit is taken).  There are three types of asymptotic notations to represent the growth of any algorithm, as input increases: ▪ Big Theta (Θ) ▪ Big Oh(O) ▪ Big Omega (Ω) 5 Dr.Nisha Soms/SRIT
  • 6. 6 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  f(n) is O(g(n)), if there exists constants c and n0 , s.t. f(n) ≤ c g(n) for all n ≥ n0  f(n) and g(n) are functions over non-negative integers
  • 7. 7 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  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.
  • 8. 8 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  f(n) is Ω(g(n)) if there exists constants c and n0, such that c g(n) ≤ f(n) for n ≥ n 0
  • 9. 9 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  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.
  • 10. 1 0 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  f(n) is Ɵ(g(n)) if there exists constants c1 , c2 , and n0, such that c1 g(n) ≤ f(n) ≤ c2 g(n) for n ≥ n0
  • 11. 1 1 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  The notation θ(n) is the formal way to express both the lower bound and the upper bound of an algorithm's running time.  It measures the average case time complexity average amount of time an algorithm can possibly take to complete.
  • 12.  Given f(n) and g(n), which grows faster?  If Lim n→∞ f(n)/g(n) = 0, then g(n) is faster  If Lim n→∞ f(n)/g(n) = ∞, then f(n) is faster  If Lim n→∞ f(n)/g(n) = non-zero constant, then both grow at the same rate  Solved Problems are available in https://www.cse.wustl.edu/~sg/CS241_FL99/h w1-practice.html Semester-06/2020-2021 Dr.Nisha Soms/SRIT 12
  • 13. 1 3 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  General Property: If f(n) is O(g(n)) then a*f(n) is also O(g(n)) ; where a is a constant.  Example: f(n) = 2n²+5 is O(n²) then 7*f(n) = 7(2n²+5) = 14n²+35 is also O(n²)  Similarly, this property satisfies both Θ and Ω notation.  We can say  If f(n) is Θ(g(n)) then a*f(n) is also Θ(g(n)); where a is a constant.  If f(n) is Ω (g(n)) then a*f(n) is also Ω (g(n)); where a is a constant.
  • 14. 1 4 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  Reflexive Property: If f(n) is given then f(n) = O(f(n))  Example: If f(n) = n3 ⇒ O(n3)  Similarly,  f(n) = Ω(f(n))  f(n) = Θ(f(n))
  • 15. 1 5 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  Transitive Property: If f(n) is O(g(n)) and g(n) is O(h(n)) then f(n) = O(h(n)) .  Example: if f(n) = n , g(n) = n² and h(n)=n³ n is O(n²) and n² is O(n³) then n is O(n³)  Similarly this property satisfies for both Θ and Ω notation.  We can say  If f(n) is Θ(g(n)) and g(n) is Θ(h(n)) then f(n) = Θ(h(n))  If f(n) is Ω (g(n)) and g(n) is Ω (h(n)) then f(n) = Ω (h(n))
  • 16. 1 6 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  Symmetric Property: If f(n) is Θ(g(n)) then g(n) is Θ(f(n)) .  Example: f(n) = n² and g(n) = n² then f(n) = Θ(n²) and g(n) = Θ(n²) This property only satisfies for Θ notation.
  • 17. 1 7 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  Transpose Symmetric Property: If f(n) is O(g(n)) then g(n) is Ω (f(n)).  Example: f(n) = n , g(n) = n² then n is O(n²) and n² is Ω (n) This property only satisfies for O and Ω notations.
  • 18. 1 8 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  Transpose Symmetric Property: If f(n) is O(g(n)) then g(n) is Ω (f(n)).  Example: f(n) = n , g(n) = n² then n is O(n²) and n² is Ω (n) This property only satisfies for O and Ω notations.
  • 19. 1 9 Semester-06/2020-2021 Dr.Nisha Soms/SRIT  If f(n) = O(g(n)) and f(n) = Ω(g(n)) then f(n) = Θ(g(n))  If f(n) = O(g(n)) and d(n)=O(e(n)) then f(n) + d(n) = O( max( g(n), e(n) ))  Example: f(n) = n i.e O(n), d(n) = n² i.e O(n²) then f(n) + d(n) = n + n² i.e O(n²)  If f(n)=O(g(n)) and d(n)=O(e(n)) then f(n) * d(n) = O( g(n) * e(n) )  Example: f(n) = n i.e O(n), d(n) = n² i.e O(n²) then f(n) * d(n) = n * n² = n³ i.e O(n³)
  • 20.  Solved Problems are available in https://www.cse.wustl.edu/~sg/CS241_FL99/h w1-practice.html Semester-06/2020-2021 Dr.Nisha Soms/SRIT 20
  • 21.  https://dotnettutorials.net/lesson/properties-of- asymptotic-notations/  https://unacademy.com/lesson/properties-of- asymptotic-notation-part-1/1F2FTIU0  https://www.cse.iitd.ac.in/~mausam/courses/col1 06/autumn2017/lectures/02-asymptotic.pdf  https://www.cse.iitd.ac.in/~pkalra/col100/slides/1 0-Efficiency.pdf  https://www.cse.wustl.edu/~sg/CS241_FL99/hw1 -practice.html Semester-06/2020-2021 Dr.Nisha Soms/SRIT 21
  • 22. Please Click Like, Share and Subscribe ! Semester-06/2020-2021 Dr.Nisha Soms/SRIT 22