1.2.3 Asymptotic Notations

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 5

Department of Computer Science and Engineering (CSE)

Asymptotic Anaysis
• Asymptotic analysis is a technique used in computer science and
algorithm analysis to evaluate the performance and efficiency of
algorithms as the input size grows towards infinity.
• It provides a high-level understanding of how the algorithm's
runtime or space requirements scale with larger inputs without
getting into the specifics of constant factors or small input sizes.
• The goal of asymptotic analysis is to classify algorithms based on
their efficiency and compare their relative performance.
• It helps in making informed decisions about selecting the most
appropriate algorithm for a given problem or designing more
efficient algorithms.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Types Of Asymptotic Notations:


There are three commonly used asymptotic notations:

1. Big O notation (O):

• O notation represents the upper bound or worst-case


scenario of an algorithm's growth rate.
• It characterizes the maximum amount of resources
(time or space) an algorithm requires for a given input
size.
• For a function f(n), O(g(n)) denotes that f(n) grows no
faster than g(n) asymptotically.
• Example: If an algorithm has a time complexity of
O(n^2), it means that the algorithm's runtime grows
quadratically or is bounded above by a quadratic
function.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Omega notation (Ω):


• Ω notation represents the lower
bound or best-case scenario of an
algorithm's growth rate.
• It characterizes the minimum amount
of resources an algorithm requires for
a given input size.
• For a function f(n), Ω(g(n)) denotes
that f(n) grows at least as fast as g(n)
asymptotically.
• Example: If an algorithm has a time
complexity of Ω(n), it means that the
algorithm's runtime grows linearly or
is bounded below by a linear
function.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Theta notation (Θ):

• Θ notation represents the tight or average


case scenario of an algorithm's growth rate.
• It characterizes the range of growth rates
within upper and lower bounds for a given
input size.
• For a function f(n), Θ(g(n)) denotes that f(n)
grows at the same rate as g(n) asymptotically.
• Example: If an algorithm has a time
complexity of Θ(n^2), it means that the
algorithm's runtime grows quadratically,
neither faster nor slower.

University Institute of Engineering (UIE)


THANK YOU

University Institute of Engineering (UIE)

You might also like