Asymptotic Notation
Running time of an algorithm, order of growth
Worst case
Running time of an algorith increases with the size of the input in the limit as the size
of the input increases without bound.
Big-theta notation
g(n) is an asymptotically tight bound of f(n)
Example
n >= 1, c2 >= 1/2
n >= 7, c1 <= 1/14
choose c1 = 1/14, c2 = ½, n0 = 7.
O-notation
Asymptotic upper bound
f(n) = O(g(n)) some constant multiple of g(n) is an asymptotic upper bound of f(n),
no claim about how tight an upper bound is.
Example
The running time is O(n
2
) means there is a function f(n) that is O(n
2
) such that for
any value of n, no matter what particular input of size n is chosen, the running time of
that input is bounded from above by the value f(n).
Big-Omega notation
Asymptotic lowerbound
Theorem
When we say that the running time (no modifier) of an algorithm is Ω(g(n)), we
mean that no matter what particular input of size n is chosen for each value of n,
the running time on that input is at least a constant times g(n), for sufficiently
large n
Interpretation
not specifying all lower-terms exactly
“No matter how the anonymous functions are chosen on the left of the equal sign,
there is a way to choose the anonymous functions on the right of the equal sign to
make the equation valid.”
for any function f (n) ∈ Θ(n), there is some function g(n) ∈Θ (n
2
)
such that 2n
2
+ f (n) = g(n) for all n.
In other words, the right-hand side of an equation provides a coarser level of detail
than the left-hand side.
o-notation
w-notation
Properties
analogy to comparison of two real numbers, a, b.
Standard notation
Floor and ceiling,
for any real x
for any integer n
Modular arithmetic
if (a mod n) = (b mod n), we write
a is equivalent to b, modulo n. in other words, a and b have the same remainder when
divided by n. Or n is a divisor of b – a.
Polynomials
Exponentials
For all real constants a and b such that a > 1
we can conclude that
Thus, any exponential function with a base strictly greater than 1 grows faster than
any polynomial function.
when
we have the approximation
Logarithms
for all real a > 0, b > 0, c > 0 and n
where logarithm bases are not 1.
Changing the base of a logarithm from one constant to another only changes the value
of the logarithm by a constant factor, and so we shall often use the notation “lg n”
when we don’t care about constant factors.
polylogarithmic bound
for any constant a > 0. Thus, any positive polynomial function grows faster than
any polylogarithmic function.
Factorials
n >= 0
A weak upper bound on the factorial function is n! ≤ n
n
, since each of the n
terms in the factorial product is at most n. Stirling’s approximation,
gives a tighter upper and lower bounds.
Function iteration
Iterated logarithm function
reads “log star of n”
The iterated logarithm is a very slowly growing function:
Be sure to distinguish lg
(i)
n (the logarithm function applied I times in succession,
starting with argument n) from lg
i
n (the logarithm of n raised to the ith power).
Fibonacci numbers
Homework
Rank the following functions by order of growth

More Related Content

PPTX
Asymptotic notations
DOCX
PPTX
Analysis of algorithn class 3
PDF
Big omega
PPTX
Lec 5 asymptotic notations and recurrences
PPTX
Asymptotic notations ada
PDF
Theta notation
PDF
Little o and little omega
Asymptotic notations
Analysis of algorithn class 3
Big omega
Lec 5 asymptotic notations and recurrences
Asymptotic notations ada
Theta notation
Little o and little omega

What's hot (20)

PPTX
Asymptotic Notations
PPTX
Asymptotic notations
PPTX
Asymptotic notation
PPTX
Introducction to Algorithm
PPT
Asymptotic notation
PDF
Asymptotic notation
PPT
asymptotic notations i
PPT
Asymptotic Notation
PPTX
Asymptotic notation ada
PPT
Asymptotic notations
PDF
Formal Languages and Automata Theory unit 3
PPTX
Algorithm Analysis
PPT
Asymptoptic notations
PDF
Reconstruction
PPTX
formal definitions in theory of computation
PPTX
Asymptotic Analysis in Data Structure using C
PDF
Econ501a l11
PPTX
Automata Theory - Turing machine
PPT
Asymptotic Notation and Complexity
PPTX
C++ Programming Club-Lecture 3
Asymptotic Notations
Asymptotic notations
Asymptotic notation
Introducction to Algorithm
Asymptotic notation
Asymptotic notation
asymptotic notations i
Asymptotic Notation
Asymptotic notation ada
Asymptotic notations
Formal Languages and Automata Theory unit 3
Algorithm Analysis
Asymptoptic notations
Reconstruction
formal definitions in theory of computation
Asymptotic Analysis in Data Structure using C
Econ501a l11
Automata Theory - Turing machine
Asymptotic Notation and Complexity
C++ Programming Club-Lecture 3
Ad

Similar to Asymptotic (20)

PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
DAA_LECT_2.pdf
PDF
asymptoticnotations-111102093214-phpapp01 (1).pdf
PPTX
Asymptotic Notations
PDF
Lecture 3(a) Asymptotic-analysis.pdf
PPTX
DAA Week 2 slide for design algorithm and analysis.pptx
PPT
Design and analysis of algorithm ppt ppt
PPTX
Dr hasany 2467_16649_1_lec-2-zabist
PDF
6_12_13Asymptotic analysiskfnhlkjsbfbkjs.pdf
PPT
02 asymp
PPTX
Asymptotic notation
PPTX
Binary search design and ana algorithm.pptx
PDF
PPTX
Asymptotic Notation
PDF
Data Structures and Algorithms - Lec 02.pdf
PPT
Time complexity
PPTX
Analysis of algorithms
PPT
ASYMTOTIC NOTATION ON DATA STRUCTURE AND ALGORITHM
PDF
Lecture3(b).pdf
Design an Analysis of Algorithms II-SECS-1021-03
DAA_LECT_2.pdf
asymptoticnotations-111102093214-phpapp01 (1).pdf
Asymptotic Notations
Lecture 3(a) Asymptotic-analysis.pdf
DAA Week 2 slide for design algorithm and analysis.pptx
Design and analysis of algorithm ppt ppt
Dr hasany 2467_16649_1_lec-2-zabist
6_12_13Asymptotic analysiskfnhlkjsbfbkjs.pdf
02 asymp
Asymptotic notation
Binary search design and ana algorithm.pptx
Asymptotic Notation
Data Structures and Algorithms - Lec 02.pdf
Time complexity
Analysis of algorithms
ASYMTOTIC NOTATION ON DATA STRUCTURE AND ALGORITHM
Lecture3(b).pdf
Ad

Recently uploaded (20)

PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
HVAC Specification 2024 according to central public works department
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI .pdf
PDF
Empowerment Technology for Senior High School Guide
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
What’s under the hood: Parsing standardized learning content for AI
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
Education and Perspectives of Education.pptx
PDF
Journal of Dental Science - UDMY (2021).pdf
PDF
International_Financial_Reporting_Standa.pdf
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
My India Quiz Book_20210205121199924.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Core Concepts of Personalized Learning and Virtual Learning Environments
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
HVAC Specification 2024 according to central public works department
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI .pdf
Empowerment Technology for Senior High School Guide
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
What’s under the hood: Parsing standardized learning content for AI
Race Reva University – Shaping Future Leaders in Artificial Intelligence
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Cambridge-Practice-Tests-for-IELTS-12.docx
Education and Perspectives of Education.pptx
Journal of Dental Science - UDMY (2021).pdf
International_Financial_Reporting_Standa.pdf
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
My India Quiz Book_20210205121199924.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Paper A Mock Exam 9_ Attempt review.pdf.
Environmental Education MCQ BD2EE - Share Source.pdf

Asymptotic

  • 1. Asymptotic Notation Running time of an algorithm, order of growth Worst case Running time of an algorith increases with the size of the input in the limit as the size of the input increases without bound. Big-theta notation g(n) is an asymptotically tight bound of f(n) Example
  • 2. n >= 1, c2 >= 1/2 n >= 7, c1 <= 1/14 choose c1 = 1/14, c2 = ½, n0 = 7. O-notation Asymptotic upper bound f(n) = O(g(n)) some constant multiple of g(n) is an asymptotic upper bound of f(n), no claim about how tight an upper bound is. Example The running time is O(n 2 ) means there is a function f(n) that is O(n 2 ) such that for any value of n, no matter what particular input of size n is chosen, the running time of that input is bounded from above by the value f(n).
  • 3. Big-Omega notation Asymptotic lowerbound Theorem When we say that the running time (no modifier) of an algorithm is Ω(g(n)), we mean that no matter what particular input of size n is chosen for each value of n, the running time on that input is at least a constant times g(n), for sufficiently large n Interpretation not specifying all lower-terms exactly
  • 4. “No matter how the anonymous functions are chosen on the left of the equal sign, there is a way to choose the anonymous functions on the right of the equal sign to make the equation valid.” for any function f (n) ∈ Θ(n), there is some function g(n) ∈Θ (n 2 ) such that 2n 2 + f (n) = g(n) for all n. In other words, the right-hand side of an equation provides a coarser level of detail than the left-hand side. o-notation w-notation
  • 5. Properties analogy to comparison of two real numbers, a, b.
  • 6. Standard notation Floor and ceiling, for any real x for any integer n Modular arithmetic if (a mod n) = (b mod n), we write a is equivalent to b, modulo n. in other words, a and b have the same remainder when divided by n. Or n is a divisor of b – a. Polynomials Exponentials For all real constants a and b such that a > 1
  • 7. we can conclude that Thus, any exponential function with a base strictly greater than 1 grows faster than any polynomial function. when we have the approximation Logarithms for all real a > 0, b > 0, c > 0 and n
  • 8. where logarithm bases are not 1. Changing the base of a logarithm from one constant to another only changes the value of the logarithm by a constant factor, and so we shall often use the notation “lg n” when we don’t care about constant factors. polylogarithmic bound for any constant a > 0. Thus, any positive polynomial function grows faster than any polylogarithmic function.
  • 9. Factorials n >= 0 A weak upper bound on the factorial function is n! ≤ n n , since each of the n terms in the factorial product is at most n. Stirling’s approximation, gives a tighter upper and lower bounds. Function iteration Iterated logarithm function reads “log star of n” The iterated logarithm is a very slowly growing function:
  • 10. Be sure to distinguish lg (i) n (the logarithm function applied I times in succession, starting with argument n) from lg i n (the logarithm of n raised to the ith power). Fibonacci numbers
  • 11. Homework Rank the following functions by order of growth