Analysis 1.7

# Analysis 1.7 - Asymptotic Algorithm Analysis The asymptotic...

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

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

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

View Full Document
Last Updated: 10/01/12 5:45 AM CSE 2011 Prof. J. Elder - 32 - End of Lecture 2 Jan 5, 2012
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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online