Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Asymptotic Analysis and Algorithm Performance, Lecture notes of Data Structures and Algorithms

An introduction to the concept of algorithm performance analysis using Big O notation. The authors, Christine Alvarado, Mia Minnes, and Leo Porter, explain the importance of dropping constants and keeping only the dominant term when analyzing the fastest growing term. examples to help illustrate the concepts of Big O notation and its industry and academic use. It concludes with an explanation of how to formally define the relationship between two functions using Big O notation.

What you will learn

  • What does it mean for a function to be O(g(n))?
  • What is the importance of dropping constants when analyzing algorithm performance?
  • How can you formally define the relationship between two functions using Big O notation?

Typology: Lecture notes

2020/2021

Uploaded on 05/10/2021

muluneh-abrham
muluneh-abrham 🇺🇸

4

(1)

4 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Algorithm performance
Asymptotic analysis
This work is licensed under a Creative Commons
Attribution-ShareAlike 4.0 International License
by Christine Alvarado, Mia Minnes, and Leo Porter, 2015.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Asymptotic Analysis and Algorithm Performance and more Lecture notes Data Structures and Algorithms in PDF only on Docsity!

Algorithm performance

Asymptotic analysis

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License by Christine Alvarado, Mia Minnes, and Leo Porter, 2015.

Drop constants 10000000 = O(1)

Keep only dominant term fastest growing

Keep only dominant term 3n+3 = O(3n)

Examples?

 f(n) = 3 log_2 n + 4n log_2 n + n. Which of the following is true?  f(n) = O(log_2 n)  f(n) = O(n log_2 n)  f(n) = O(n^2) ** In response, industry / academic use of O  f(n) = O(n)  f(n) = 100. Which of the following is true?  f(n) = O(2^n)  f(n) = O(n^2)  f(n) = O(n)  f(n) = O(1) IVQ

Next up … Analyzing code