SlideShare a Scribd company logo
Prepared by-
Shaishav Shah(170120116094)
Guided by – Prof. Bhumi Shah
Gandhinagar Institute of Technology
SUBJECT - ADA(2150703 )
Asymptotic Notations
Asymptotic Notations
Asymptotic Notations
• Execution time of an algorithm depends on the
instruction set, processor speed, disk I/O speed, etc.
• Hence, we estimate the efficiency of an algorithm
asymptotically.
• Time function of an algorithm is represented by T(n),
where n is the input size.
Types of asymptotic notations used to
represent the complexity of an
algorithm
• Following asymptotic notations are used to calculate
the running time complexity of an algorithm.
– O − Big Oh
– Ω − Big omega
– θ − Big theta
– o − Little Oh
– ω − Little omega
O: Asymptotic Upper Bound
• ‘O’ (Big Oh) is the most commonly used notation.
• A function f(n) can be represented is the order
of g(n) that is O(g(n)), if there exists a value of
positive integer n as n0 and a positive constant c such
that −
f(n) ⩽ c.g(n) for n > n0 in all case
• Hence, function g(n) is an upper bound for
function f(n), as g(n) grows faster than f(n).
Example
Let us consider a given function,
f(n)=4.n3+10.n2+5.n+1f(n)=4.n3+10.n2+5.n+1
Considering g(n)=n3,
f(n)⩽5.g(n) for all the values of n>2
Hence, the complexity of f(n) can be represented
as O(g(n)), i.e. O(n3).
Ω: Asymptotic Lower Bound
• We say that f(n)=Ω(g(n)) when there exists
constant c that f(n)⩾c.g(n)for all sufficiently large
value of n.
• Here n is a positive integer.
• It means function g is a lower bound for function f;
after a certain value of n, f will never go below g.
Example
Let us consider a given function,
f(n)=4.n3+10.n2+5.n+1.
Considering g(n)=n3g(n)=n3, f(n)⩾4.g(n) for all
the values of n>0.
Hence, the complexity of f(n) can be
represented as Ω(g(n)), i.e. Ω(n3).
θ: Asymptotic Tight Bound
• We say that f(n)=θ(g(n)) when there exist
constants c1 and c2 that c1.g(n)⩽f(n)⩽c2.g(n) for all
sufficiently large value of n.
• Here n is a positive integer.
• This means function g is a tight bound for function f.
Example
Let us consider a given function,
f(n)=4.n3+10.n2+5.n+1
Considering g(n)=n3, 4.g(n)⩽f(n)⩽5.g(n) for all
the large values of n.
Hence, the complexity of f(n) can be
represented as θ(g(n)), i.e. θ(n3).
O - Notation
• The asymptotic upper bound provided by O-
notation may or may not be asymptotically tight.
• The bound 2.n2=O(n2) is asymptotically tight, but the
bound 2.n=O(n2) is not.
• We use o-notation to denote an upper bound that is not
asymptotically tight.
• We formally define o(g(n)) (little-oh of g of n) as the
set f(n) = o(g(n)) for any positive constant c>0 and there
exists a value n0>0, such that 0⩽f(n)⩽c.g(n).
• Intuitively, in the o-notation, the function f(n) becomes
insignificant relative to g(n) as n approaches infinity; that
is,
limn→∞(f(n)/g(n))=0
Example
• Let us consider the same function,
f(n)=4.n3+10.n2+5.n+1
• Considering g(n)=n4,
limn→∞(4.n3+10.n2+5.n+1/n4)=0
• Hence, the complexity of f(n) can be represented
as o(g(n)), i.e. o(n4).
ω – Notation
• We use ω-notation to denote a lower bound that is
not asymptotically tight.
• Formally, however, we define ω(g(n)) (little-omega of
g of n) as the set f(n) = ω(g(n)) for any positive
constant C > 0 and there exists a value n0>0, such
that 0⩽c.g(n)<f(n).
• For example, n2/2=ω(n), but n2/2≠ω(n2). The
relation f(n)=ω(g(n))implies that the following limit
exists
limn→∞(f(n)/g(n))=∞
• That is, f(n) becomes arbitrarily large relative
to g(n) as n approaches infinity.
Example
Let us consider same function, f(n)=4.n3+10.n2+5.n+1
Considering g(n)=n2,
limn→∞(4.n3+10.n2+5.n+1/n2)=∞
Hence, the complexity of f(n) can be represented
as o(g(n)), i.e. ω(n2).
Thank You

More Related Content

PPTX
Asymptotic notations
DOCX
PPTX
Analysis of algorithn class 3
PPT
Asymptotic notation
PPTX
Asymptotic notation
PPTX
Lec 5 asymptotic notations and recurrences
PPTX
Asymptotic notations
PDF
Asymptotic notation
Asymptotic notations
Analysis of algorithn class 3
Asymptotic notation
Asymptotic notation
Lec 5 asymptotic notations and recurrences
Asymptotic notations
Asymptotic notation

What's hot (20)

PPTX
Asymptotic Notations
PPT
asymptotic notations i
PPT
Asymptotic notations
PDF
Polar Plot
PDF
Asymptotic Notation
PPT
Basics & asymptotic notations
PPT
Asymptotic analysis
PPT
Asymptotic Notation and Complexity
PPTX
Asymptotic notation
PDF
Nyquist Stability Criterion
PDF
Applied Calculus: Physical Meanings/Applications of Derivatives
PPT
Algorithum Analysis
PPT
Time complexity
PDF
Nyquist plot
DOC
2009-1 중간고사문제(초고주파공학)
PPTX
Asymptotic notation ada
PDF
Time complexity (linear search vs binary search)
PPT
02 asymp
PDF
Nyquist stability criterion
Asymptotic Notations
asymptotic notations i
Asymptotic notations
Polar Plot
Asymptotic Notation
Basics & asymptotic notations
Asymptotic analysis
Asymptotic Notation and Complexity
Asymptotic notation
Nyquist Stability Criterion
Applied Calculus: Physical Meanings/Applications of Derivatives
Algorithum Analysis
Time complexity
Nyquist plot
2009-1 중간고사문제(초고주파공학)
Asymptotic notation ada
Time complexity (linear search vs binary search)
02 asymp
Nyquist stability criterion
Ad

Similar to Asymptotic notations ada (20)

PPTX
DAA Week 2 slide for design algorithm and analysis.pptx
PDF
Lecture 3(a) Asymptotic-analysis.pdf
PPTX
Introducction to Algorithm
PPTX
Asymptotics 140510003721-phpapp02
PPTX
Asymptotic Notations.pptx
PDF
DAA_LECT_2.pdf
PPT
Slides_Unit04_ComplexityAnalysis- Big-O notation
PDF
asymptoticnotations-111102093214-phpapp01 (1).pdf
PPTX
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
PDF
Unit-1 DAA_Notes.pdf
PPT
1 Analysis of algorithmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm.ppt
PPTX
Weekends with Competitive Programming
PDF
Anlysis and design of algorithms part 1
PPT
Asymptotic Analysis.ppt
PPTX
Design and Analysis of Algorithms Lecture Notes
PPTX
DS Unit-1.pptx very easy to understand..
PPTX
Analysis of algorithms
PPTX
Time complexity.pptxghhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjjjjjjjj
PPTX
Algorithm Analysis
DAA Week 2 slide for design algorithm and analysis.pptx
Lecture 3(a) Asymptotic-analysis.pdf
Introducction to Algorithm
Asymptotics 140510003721-phpapp02
Asymptotic Notations.pptx
DAA_LECT_2.pdf
Slides_Unit04_ComplexityAnalysis- Big-O notation
asymptoticnotations-111102093214-phpapp01 (1).pdf
cse couse aefrfrqewrbqwrgbqgvq2w3vqbvq23rbgw3rnw345
Unit-1 DAA_Notes.pdf
1 Analysis of algorithmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm.ppt
Weekends with Competitive Programming
Anlysis and design of algorithms part 1
Asymptotic Analysis.ppt
Design and Analysis of Algorithms Lecture Notes
DS Unit-1.pptx very easy to understand..
Analysis of algorithms
Time complexity.pptxghhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjjjjjjjj
Algorithm Analysis
Ad

More from ShaishavShah8 (19)

PPTX
Diffie hellman key algorithm
PPTX
Constructor oopj
PPTX
Clipping computer graphics
PPTX
Classification of debuggers sp
PPTX
Parallel and perspective projection in 3 d cg
PPT
Arrays in java oopj
PPTX
Classical cyphers python programming
PPTX
Logics for non monotonic reasoning-ai
PPTX
Rdd transformations bda
PPT
Introduction to data warehouse dmbi
PPT
Lan, wan, man mcwc
PPT
Introduction to xml, uses of xml wt
PPTX
Agile process se
PPTX
Applications of huffman coding dcdr
PPTX
Cookie management using jsp a java
PPTX
Login control .net
PPTX
Rdd transformations
PPTX
LAN, WAN, MAN
PPTX
Introduction to data warehouse
Diffie hellman key algorithm
Constructor oopj
Clipping computer graphics
Classification of debuggers sp
Parallel and perspective projection in 3 d cg
Arrays in java oopj
Classical cyphers python programming
Logics for non monotonic reasoning-ai
Rdd transformations bda
Introduction to data warehouse dmbi
Lan, wan, man mcwc
Introduction to xml, uses of xml wt
Agile process se
Applications of huffman coding dcdr
Cookie management using jsp a java
Login control .net
Rdd transformations
LAN, WAN, MAN
Introduction to data warehouse

Recently uploaded (20)

PPTX
The various Industrial Revolutions .pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
STKI Israel Market Study 2025 version august
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Getting Started with Data Integration: FME Form 101
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Hybrid model detection and classification of lung cancer
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPT
What is a Computer? Input Devices /output devices
PPTX
1. Introduction to Computer Programming.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
The various Industrial Revolutions .pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
NewMind AI Weekly Chronicles – August ’25 Week III
Univ-Connecticut-ChatGPT-Presentaion.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
STKI Israel Market Study 2025 version august
Final SEM Unit 1 for mit wpu at pune .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Programs and apps: productivity, graphics, security and other tools
Getting Started with Data Integration: FME Form 101
DP Operators-handbook-extract for the Mautical Institute
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Developing a website for English-speaking practice to English as a foreign la...
Hybrid model detection and classification of lung cancer
Chapter 5: Probability Theory and Statistics
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
What is a Computer? Input Devices /output devices
1. Introduction to Computer Programming.pptx
Architecture types and enterprise applications.pdf
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...

Asymptotic notations ada

  • 1. Prepared by- Shaishav Shah(170120116094) Guided by – Prof. Bhumi Shah Gandhinagar Institute of Technology SUBJECT - ADA(2150703 ) Asymptotic Notations
  • 3. Asymptotic Notations • Execution time of an algorithm depends on the instruction set, processor speed, disk I/O speed, etc. • Hence, we estimate the efficiency of an algorithm asymptotically. • Time function of an algorithm is represented by T(n), where n is the input size.
  • 4. Types of asymptotic notations used to represent the complexity of an algorithm • Following asymptotic notations are used to calculate the running time complexity of an algorithm. – O − Big Oh – Ω − Big omega – θ − Big theta – o − Little Oh – ω − Little omega
  • 5. O: Asymptotic Upper Bound • ‘O’ (Big Oh) is the most commonly used notation. • A function f(n) can be represented is the order of g(n) that is O(g(n)), if there exists a value of positive integer n as n0 and a positive constant c such that − f(n) ⩽ c.g(n) for n > n0 in all case • Hence, function g(n) is an upper bound for function f(n), as g(n) grows faster than f(n).
  • 6. Example Let us consider a given function, f(n)=4.n3+10.n2+5.n+1f(n)=4.n3+10.n2+5.n+1 Considering g(n)=n3, f(n)⩽5.g(n) for all the values of n>2 Hence, the complexity of f(n) can be represented as O(g(n)), i.e. O(n3).
  • 7. Ω: Asymptotic Lower Bound • We say that f(n)=Ω(g(n)) when there exists constant c that f(n)⩾c.g(n)for all sufficiently large value of n. • Here n is a positive integer. • It means function g is a lower bound for function f; after a certain value of n, f will never go below g.
  • 8. Example Let us consider a given function, f(n)=4.n3+10.n2+5.n+1. Considering g(n)=n3g(n)=n3, f(n)⩾4.g(n) for all the values of n>0. Hence, the complexity of f(n) can be represented as Ω(g(n)), i.e. Ω(n3).
  • 9. θ: Asymptotic Tight Bound • We say that f(n)=θ(g(n)) when there exist constants c1 and c2 that c1.g(n)⩽f(n)⩽c2.g(n) for all sufficiently large value of n. • Here n is a positive integer. • This means function g is a tight bound for function f.
  • 10. Example Let us consider a given function, f(n)=4.n3+10.n2+5.n+1 Considering g(n)=n3, 4.g(n)⩽f(n)⩽5.g(n) for all the large values of n. Hence, the complexity of f(n) can be represented as θ(g(n)), i.e. θ(n3).
  • 11. O - Notation • The asymptotic upper bound provided by O- notation may or may not be asymptotically tight. • The bound 2.n2=O(n2) is asymptotically tight, but the bound 2.n=O(n2) is not. • We use o-notation to denote an upper bound that is not asymptotically tight. • We formally define o(g(n)) (little-oh of g of n) as the set f(n) = o(g(n)) for any positive constant c>0 and there exists a value n0>0, such that 0⩽f(n)⩽c.g(n). • Intuitively, in the o-notation, the function f(n) becomes insignificant relative to g(n) as n approaches infinity; that is, limn→∞(f(n)/g(n))=0
  • 12. Example • Let us consider the same function, f(n)=4.n3+10.n2+5.n+1 • Considering g(n)=n4, limn→∞(4.n3+10.n2+5.n+1/n4)=0 • Hence, the complexity of f(n) can be represented as o(g(n)), i.e. o(n4).
  • 13. ω – Notation • We use ω-notation to denote a lower bound that is not asymptotically tight. • Formally, however, we define ω(g(n)) (little-omega of g of n) as the set f(n) = ω(g(n)) for any positive constant C > 0 and there exists a value n0>0, such that 0⩽c.g(n)<f(n). • For example, n2/2=ω(n), but n2/2≠ω(n2). The relation f(n)=ω(g(n))implies that the following limit exists limn→∞(f(n)/g(n))=∞ • That is, f(n) becomes arbitrarily large relative to g(n) as n approaches infinity.
  • 14. Example Let us consider same function, f(n)=4.n3+10.n2+5.n+1 Considering g(n)=n2, limn→∞(4.n3+10.n2+5.n+1/n2)=∞ Hence, the complexity of f(n) can be represented as o(g(n)), i.e. ω(n2).