SlideShare une entreprise Scribd logo
1  sur  11
ASYMPTOTIC NOTATIONS
Shashikant V. Athawale
Assistant Professor ,Computer Engineering Department
AISSMS College of Engineering,
Kennedy Road, Pune , MS, India - 411001
1
WHY IMPORTANT ??
 Give a simple characterization of an algorithm’s
efficiency.
 Allow comparison of performances of various
algorithms
2
ASYMPTOTIC NOTATIONS
1. Big-oh Notation (O)
2. Big-Omega Notation (Ω)
3. Theta Notation (Θ )
3
BIG-OH NOTATION (O)
 Gives the upper bound of
algorithm’s running time.
 Let f: N-> R be a function.
Then O(f) is the set of
functions
O(f) = { g: N-> R | there
exists a constant c and a
natural number n0 such
that
|g(n)| <= c|f(n)| for all
n>= n0 } 4
BIG-OMEGA NOTATION (Ω)
 Gives the lower bound of
algorithm’s running time.
 Let f, g: N-> R be functions
from the set of natural
numbers to the set of real
numbers.
We write g ∈ Ω(f) if and
only if there exists some
real number n0 and a
positive real constant c
such that
g(n)| >= c|f(n)|
for all n in N satisfying n>=
n0.
5
THETA NOTATION (Θ )
If f and g are functions
from S to the real numbers,
then we write g ∈ Θ(f) if and
only if there exists some
real number n0 and positive
real constants C and C’ such
that
C|f(n)|<= |g(n)| <=C’|f(n)|
for all n in S satisfying n>=
n0 .
Thus, Θ(f) = O(f) ∩ Ω(f)
6
7
notation intuition
O (Big-Oh) f(n) ≤ g(n)
Ω (Big-Omega) f(n) ≥ g(n)
Θ (Theta) f(n) = g(n)
INTUITION ABOUT THE NOTATIONS
LITTLE OH NOTATION (O)
little-Oh Defn:
f(n) = o(g(n))
 If for all positive constants
c there exists an n0 such that
f(n) < c· g(n) for all n ≥ n0.
8
LITTLE OMEGA NOTATION (Ω)
little-Omega Defn:
f(n) = Ω(g(n))
 If for all positive constants
c there exists an n0 such that
f(n) > c· g(n) for all n ≥ n0.
9
TIME COMPLEXITY
Dependency of
 the time it takes to solve a problem
 as a function of the problem dimension/size
Examples:
 Sorting a list of length n
 Searching a list of length n
 Multiplying a n×n matrix by an n×1 vector
Time to solve problem might depend on data
 Average-case time
 Best-case time
 data is well suited for algorithm (can’t be counted on)
 Worst-case time
 data is such that algorithm performs poorly (time-wise)
Worst-Case gives an upper bound as to how much time
will be needed to solve any instance of the problem 10
Thank You
11

Contenu connexe

Tendances

Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Ehtisham Ali
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
Ankit Katiyar
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 

Tendances (20)

Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Design and analysis of algorithms
Design and analysis of algorithmsDesign and analysis of algorithms
Design and analysis of algorithms
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Asymptotic notations(Big O, Omega, Theta )
Asymptotic notations(Big O, Omega, Theta )Asymptotic notations(Big O, Omega, Theta )
Asymptotic notations(Big O, Omega, Theta )
 
Recursion
RecursionRecursion
Recursion
 
Time complexity
Time complexityTime complexity
Time complexity
 
asymptotic notation
asymptotic notationasymptotic notation
asymptotic notation
 
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 algorithm
Merge sort algorithmMerge sort algorithm
Merge sort algorithm
 
Three Address code
Three Address code Three Address code
Three Address code
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Little o and little omega
Little o and little omegaLittle o and little omega
Little o and little omega
 

Similaire à Asymptotic notation

Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
DebiPrasadSen
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
Abbas Ali
 
Lecture 2 data structures and algorithms
Lecture 2 data structures and algorithmsLecture 2 data structures and algorithms
Lecture 2 data structures and algorithms
Aakash deep Singhal
 
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
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..
KarthikeyaLanka1
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
Sri Prasanna
 

Similaire à Asymptotic notation (20)

Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Lecture 3(a) Asymptotic-analysis.pdf
Lecture 3(a) Asymptotic-analysis.pdfLecture 3(a) Asymptotic-analysis.pdf
Lecture 3(a) Asymptotic-analysis.pdf
 
Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
Algorithms required for data structures(basics like Arrays, Stacks ,Linked Li...
 
Unit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdfUnit-1 DAA_Notes.pdf
Unit-1 DAA_Notes.pdf
 
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
 
Daa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithmsDaa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithms
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
 
Introduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic NotationIntroduction to Algorithms and Asymptotic Notation
Introduction to Algorithms and Asymptotic Notation
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
 
Lecture 2 data structures and algorithms
Lecture 2 data structures and algorithmsLecture 2 data structures and algorithms
Lecture 2 data structures and 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
 
DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..DS Unit-1.pptx very easy to understand..
DS Unit-1.pptx very easy to understand..
 
algorithm_analysis1
algorithm_analysis1algorithm_analysis1
algorithm_analysis1
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
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
 
The bog oh notation
The bog oh notationThe bog oh notation
The bog oh notation
 
1.algorithms
1.algorithms1.algorithms
1.algorithms
 
Time complexity
Time complexityTime complexity
Time complexity
 
Asymptotic notations ada
Asymptotic notations adaAsymptotic notations ada
Asymptotic notations ada
 
Analysis Of Algorithms I
Analysis Of Algorithms IAnalysis Of Algorithms I
Analysis Of Algorithms I
 

Plus de Dr Shashikant Athawale

Plus de Dr Shashikant Athawale (20)

multi threaded and distributed algorithms
multi threaded and distributed algorithms multi threaded and distributed algorithms
multi threaded and distributed algorithms
 
Amortized analysis
Amortized analysisAmortized analysis
Amortized analysis
 
Complexity theory
Complexity theory Complexity theory
Complexity theory
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Model and Design
Model and Design Model and Design
Model and Design
 
Fundamental of Algorithms
Fundamental of Algorithms Fundamental of Algorithms
Fundamental of Algorithms
 
CUDA Architecture
CUDA ArchitectureCUDA Architecture
CUDA Architecture
 
Parallel Algorithms- Sorting and Graph
Parallel Algorithms- Sorting and GraphParallel Algorithms- Sorting and Graph
Parallel Algorithms- Sorting and Graph
 
Analytical Models of Parallel Programs
Analytical Models of Parallel ProgramsAnalytical Models of Parallel Programs
Analytical Models of Parallel Programs
 
Basic Communication
Basic CommunicationBasic Communication
Basic Communication
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
Parallel Processing Concepts
Parallel Processing Concepts Parallel Processing Concepts
Parallel Processing Concepts
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Parallel algorithms
Parallel algorithms Parallel algorithms
Parallel algorithms
 
Greedy method
Greedy method Greedy method
Greedy method
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 
Advanced Wireless Technologies
Advanced Wireless TechnologiesAdvanced Wireless Technologies
Advanced Wireless Technologies
 
Vo ip
Vo ipVo ip
Vo ip
 

Dernier

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

Asymptotic notation

  • 1. ASYMPTOTIC NOTATIONS Shashikant V. Athawale Assistant Professor ,Computer Engineering Department AISSMS College of Engineering, Kennedy Road, Pune , MS, India - 411001 1
  • 2. WHY IMPORTANT ??  Give a simple characterization of an algorithm’s efficiency.  Allow comparison of performances of various algorithms 2
  • 3. ASYMPTOTIC NOTATIONS 1. Big-oh Notation (O) 2. Big-Omega Notation (Ω) 3. Theta Notation (Θ ) 3
  • 4. BIG-OH NOTATION (O)  Gives the upper bound of algorithm’s running time.  Let f: N-> R be a function. Then O(f) is the set of functions O(f) = { g: N-> R | there exists a constant c and a natural number n0 such that |g(n)| <= c|f(n)| for all n>= n0 } 4
  • 5. BIG-OMEGA NOTATION (Ω)  Gives the lower bound of algorithm’s running time.  Let f, g: N-> R be functions from the set of natural numbers to the set of real numbers. We write g ∈ Ω(f) if and only if there exists some real number n0 and a positive real constant c such that g(n)| >= c|f(n)| for all n in N satisfying n>= n0. 5
  • 6. THETA NOTATION (Θ ) If f and g are functions from S to the real numbers, then we write g ∈ Θ(f) if and only if there exists some real number n0 and positive real constants C and C’ such that C|f(n)|<= |g(n)| <=C’|f(n)| for all n in S satisfying n>= n0 . Thus, Θ(f) = O(f) ∩ Ω(f) 6
  • 7. 7 notation intuition O (Big-Oh) f(n) ≤ g(n) Ω (Big-Omega) f(n) ≥ g(n) Θ (Theta) f(n) = g(n) INTUITION ABOUT THE NOTATIONS
  • 8. LITTLE OH NOTATION (O) little-Oh Defn: f(n) = o(g(n))  If for all positive constants c there exists an n0 such that f(n) < c· g(n) for all n ≥ n0. 8
  • 9. LITTLE OMEGA NOTATION (Ω) little-Omega Defn: f(n) = Ω(g(n))  If for all positive constants c there exists an n0 such that f(n) > c· g(n) for all n ≥ n0. 9
  • 10. TIME COMPLEXITY Dependency of  the time it takes to solve a problem  as a function of the problem dimension/size Examples:  Sorting a list of length n  Searching a list of length n  Multiplying a n×n matrix by an n×1 vector Time to solve problem might depend on data  Average-case time  Best-case time  data is well suited for algorithm (can’t be counted on)  Worst-case time  data is such that algorithm performs poorly (time-wise) Worst-Case gives an upper bound as to how much time will be needed to solve any instance of the problem 10