Midterm Review1.1

Midterm Review1.1 - Definition of “Big Oh” CSE 2011 Prof J Elder-6 Last Updated 10:14 AM Arithmetic Progression The running time of

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Definition of “Big Oh” CSE 2011 Prof. J. Elder -6- Last Updated: 1/7/10 10:14 AM Arithmetic Progression The running time of prefixAverages1 is O(1 + 2 + …+ n) 7 6 5 The sum of the first n integers is n(n + 1) / 2 4 3 There is a simple visual proof of this fact 2 1 Thus, algorithm prefixAverages1 runs in O(n2) time CSE 2011 Prof. J. Elder 0 1 -7- 2 3 4 5 6 Last Updated: 1/7/10 10:14 AM Relatives of Big-Oh big-Omega f(n) is (g(n)) if there is a constant c > 0 and an integer constant n0 f(n) c•g(n) for n 1 such that n0 big-Theta f(n) is (g(n)) if there are constants c1 > 0 and c2 > 0 and an integer constant n0 1 such that c1•g(n) f(n) c2•g(n) for n n0 CSE 2011 Prof. J. Elder -8- Last Updated: 1/7/10 10:14 AM Intuition for Asymptotic Notation Big-Oh f(n) is O(g(n)) if f(n) is asymptotically less than or equal to g(n) big-Omega f(n) is (g(n)) if f(n) is asymptotically greater than or equal to g(n) big-Theta f(n) is (g(n)) if f(n) is asymptotically equal to g(n) CSE 2011 Prof. J. Elder -9- Last Updated: 1/7/10 10:14 AM Definition of Theta f(n) = (g(n)) CSE 2011 Prof. J. Elder - 10 - Last Updated: 1/7/10 10:14 AM ...
View Full Document

This note was uploaded on 02/14/2012 for the course CSE 2011Z taught by Professor Elder during the Fall '11 term at York University.

Page1 / 5

Midterm Review1.1 - Definition of “Big Oh” CSE 2011 Prof J Elder-6 Last Updated 10:14 AM Arithmetic Progression The running time of

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

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