SlideShare a Scribd company logo
1 of 18
Introduction to Asymptotic Notations Presented By: Gaurav Mittal
Asymptotic Notation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Asymptotic Notation ,[object Object],[object Object],[object Object]
Big-O notation (Upper Bound  –  Worst Case) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Big-O notation  (Upper Bound  –  Worst Case) time n n 0 f(n) c . g(n) f(n) = O(g(n))
O -notation ,[object Object],[object Object],[object Object],[object Object],We say  g ( n )  is an  asymptotic upper bound  for  f ( n )
Big-O notation  (Upper Bound  –  Worst Case) ,[object Object],[object Object],[object Object],[object Object]
Big-O notation  (Upper Bound  –  Worst Case) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Big-O notation  (Upper Bound  –  Worst Case) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Big-O notation  (Upper Bound  –  Worst Case) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 -notation (Omega) (Lower Bound  –  Best Case)   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 -notation (Lower Bound  –  Best Case) time n n 0 c . g(n) f(n) f(n) =   (g(n))
 -notation ,[object Object],[object Object],[object Object],[object Object],We say  g ( n )  is an  asymptotic lower bound  for  f ( n )
 -notation (Omega) (Lower Bound  –  Best Case)   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
   notation (Theta) (Tight Bound) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
   notation (Theta) (Tight Bound) ,[object Object],[object Object],[object Object],[object Object],[object Object]
   notation (Theta) (Tight Bound) time n n 0 c 1 . g(n) f(n) f(n) =   (g(n)) c 2 . g(n)
Conclusion ,[object Object],[object Object]

More Related Content

What's hot

Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree methodRajendran
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysissumitbardhan
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.Tariq Khan
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptracha49
 
Job sequencing with deadline
Job sequencing with deadlineJob sequencing with deadline
Job sequencing with deadlineArafat Hossan
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysisSoujanya V
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursionAbdullah Al-hazmy
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IMohamed Loey
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
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 algortihmSajid Marwat
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and ComplexityRajandeep Gill
 

What's hot (20)

Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Red black tree
Red black treeRed black tree
Red black tree
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
LR Parsing
LR ParsingLR Parsing
LR Parsing
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
Merge Sort
Merge SortMerge Sort
Merge Sort
 
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.pptUNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
Job sequencing with deadline
Job sequencing with deadlineJob sequencing with deadline
Job sequencing with deadline
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursion
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting 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
 
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
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
 
Merge sort algorithm power point presentation
Merge sort algorithm power point presentationMerge sort algorithm power point presentation
Merge sort algorithm power point presentation
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Complexity of Algorithm
Complexity of AlgorithmComplexity of Algorithm
Complexity of Algorithm
 
Sorting algorithms
Sorting algorithmsSorting algorithms
Sorting algorithms
 

Similar to Asymptotic notations

Similar to Asymptotic notations (20)

Lecture 3(a) Asymptotic-analysis.pdf
Lecture 3(a) Asymptotic-analysis.pdfLecture 3(a) Asymptotic-analysis.pdf
Lecture 3(a) Asymptotic-analysis.pdf
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
big_oh
big_ohbig_oh
big_oh
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Clase3 Notacion
Clase3 NotacionClase3 Notacion
Clase3 Notacion
 
Lecture3(b).pdf
Lecture3(b).pdfLecture3(b).pdf
Lecture3(b).pdf
 
DAA_LECT_2.pdf
DAA_LECT_2.pdfDAA_LECT_2.pdf
DAA_LECT_2.pdf
 
Weekends with Competitive Programming
Weekends with Competitive ProgrammingWeekends with Competitive Programming
Weekends with Competitive Programming
 
Theta notation
Theta notationTheta notation
Theta notation
 
2_Asymptotic notations.pptx
2_Asymptotic notations.pptx2_Asymptotic notations.pptx
2_Asymptotic notations.pptx
 
02 asymp
02 asymp02 asymp
02 asymp
 
Design and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptDesign and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt ppt
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1Anlysis and design of algorithms part 1
Anlysis and design of algorithms part 1
 
Unit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfUnit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdf
 
asymptotic notations i
asymptotic notations iasymptotic notations i
asymptotic notations i
 
Asymptoptic notations
Asymptoptic notationsAsymptoptic notations
Asymptoptic notations
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 
Time complexity
Time complexityTime complexity
Time complexity
 

More from Ehtisham Ali

More from Ehtisham Ali (20)

Vintage indian advertisement's
Vintage indian advertisement'sVintage indian advertisement's
Vintage indian advertisement's
 
Extreme Interview Questions
Extreme Interview QuestionsExtreme Interview Questions
Extreme Interview Questions
 
Windows Avtars
Windows AvtarsWindows Avtars
Windows Avtars
 
Intruders detection
Intruders detectionIntruders detection
Intruders detection
 
Digital Signatures
Digital SignaturesDigital Signatures
Digital Signatures
 
Huffman Coding
Huffman CodingHuffman Coding
Huffman Coding
 
Windows basic quiz
Windows basic quizWindows basic quiz
Windows basic quiz
 
Wallpapers show
Wallpapers showWallpapers show
Wallpapers show
 
Wi fi Technology
Wi fi TechnologyWi fi Technology
Wi fi Technology
 
Virtual vista
Virtual vistaVirtual vista
Virtual vista
 
Marketing segmentations
Marketing segmentationsMarketing segmentations
Marketing segmentations
 
Lcd technology
Lcd technologyLcd technology
Lcd technology
 
Gd topics list
Gd topics listGd topics list
Gd topics list
 
Dvd
DvdDvd
Dvd
 
My room
My roomMy room
My room
 
Filmi kids
Filmi kidsFilmi kids
Filmi kids
 
Excel tutorial on students record
Excel tutorial on students record Excel tutorial on students record
Excel tutorial on students record
 
Television broadcasting and promotion
Television broadcasting and promotionTelevision broadcasting and promotion
Television broadcasting and promotion
 
TechQuiz
TechQuizTechQuiz
TechQuiz
 
Ms dos tutorial
Ms dos tutorialMs dos tutorial
Ms dos tutorial
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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.pdfAdmir Softic
 
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 GraphThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
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.pdfQucHHunhnh
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
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
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Asymptotic notations

  • 1. Introduction to Asymptotic Notations Presented By: Gaurav Mittal
  • 2.
  • 3.
  • 4.
  • 5. Big-O notation (Upper Bound – Worst Case) time n n 0 f(n) c . g(n) f(n) = O(g(n))
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.  -notation (Lower Bound – Best Case) time n n 0 c . g(n) f(n) f(n) =  (g(n))
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. notation (Theta) (Tight Bound) time n n 0 c 1 . g(n) f(n) f(n) =  (g(n)) c 2 . g(n)
  • 18.

Editor's Notes

  1. There are actually 5 kinds of asymptotic notation. How many of you are familiar with all of these? What these symbols do is give us a notation for talking about how fast a function goes to infinity, which is just what we want to know when we study the running times of algorithms. Instead of working out a complicated formula for the exact running time, we can just say that the running time is theta of n^2. That is, the running time is proportional to n^2 plus lower order terms. For most purposes, that’s just what we want to know. One thing to keep in mind is that we’re working with functions defined on the natural numbers. Sometimes I’ll talk (a little) about doing calculus on these functions, but the piont is that we won’t care what, say, f(1/2) is.
  2. Sometimes we won’t know the exact order of growth. Sometimes the running time depends on the input, or we might be talking about a number of different algorithms. Then we might want to put an upper or lower bound on the order of growth. That’s what big-O and big-Omega are for. Except for Theta, the thing to remember is that the English letters are upper bounds, and the Greek letters are lower bounds. (Theta is both, but it’s only a greek letter.) So O(g(n)) is the set of functions that go to infinity no faster than g. The formal definition is the same as for Theta, except that there is only one c, and you have the inequality. We call g an asymptotic . . .
  3. In the same way, Omega(g(n)) is the set of functions that go to infinity no slower than g(n). Again, the definition is the same except that the inequality reads “0 le c g(n) le f(n)” for all n ge n0. Are there any questions?