Big O Notation-Algorithm Design and Analysis-Lecture Slides, Slides of Design and Analysis of Algorithms

This lecture is part of lecture series for Design and Analysis of Algorithms course. This course was taught by Dr. Bhaskar Sanyal at Maulana Azad National Institute of Technology. It includes: Big-O, Notation, Shorthand, Efficiency, Algorithm, Growth, Functions, Logarithmic, Linear, Quadratic, Exponential

Typology: Slides

2011/2012

Uploaded on 07/11/2012

dharmadaas
dharmadaas 🇮🇳

4.3

(55)

262 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Big-O Notation
We use a shorthand mathematical notation to
describe the efficiency of an algorithm relative
to any parameter n as its “Order” or Big-O
We can say that the first algorithm is O(n)
We can say that the second algorithm is O(n2)
For any algorithm that has a function g(n) of the
parameter n that describes its length of time to
execute, we can say the algorithm is O(g(n))
We only include the fastest growing term and
ignore any multiplying by or adding of constants
Docsity.com
pf3

Partial preview of the text

Download Big O Notation-Algorithm Design and Analysis-Lecture Slides and more Slides Design and Analysis of Algorithms in PDF only on Docsity!

1

Big-O Notation

• We use a shorthand mathematical notation to

describe the efficiency of an algorithm relative

to any parameter n as its “Order” or Big-O

  • We can say that the first algorithm is O(n)
  • We can say that the second algorithm is O(n 2

• For any algorithm that has a function g(n) of the

parameter n that describes its length of time to

execute, we can say the algorithm is O(g(n))

• We only include the fastest growing term and

ignore any multiplying by or adding of constants

2 Seven Growth Functions

  • Seven functions g(n) that occur frequently in the analysis of algorithms (in order of increasing rate of growth relative to n): - Constant  1 - Logarithmic  log n - Linear  n - Log Linear  n log n - Quadratic  n 2 - Cubic  n 3 - Exponential  2 n