Analysis 1.7 - Asymptotic Algorithm Analysis The asymptotic...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 31 - Asymptotic Algorithm Analysis The asymptotic analysis of an algorithm determines the running time in big-Oh notation To perform the asymptotic analysis – We find the worst-case number of primitive operations executed as a function of the input size – We express this function with big-Oh notation Example: – We determine that algorithm arrayMax executes at most 6 n ± 1 primitive operations – We say that algorithm arrayMax “runs in O ( n ) time” Since constant factors and lower-order terms are eventually dropped anyhow, we can disregard them when counting primitive operations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 32 - End of Lecture 2 Jan 5, 2012
Background image of page 2
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 33 - Computing Prefix Averages We further illustrate asymptotic analysis with two algorithms for prefix averages The i -th prefix average of an array X is the average of the first
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Analysis 1.7 - Asymptotic Algorithm Analysis The asymptotic...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online