{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

rec01 - 6.006 Intro to Algorithms Recitation 01 February 2...

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

View Full Document Right Arrow Icon
6.006 Intro to Algorithms Recitation 01 February 2, 2011 Asymptotic analysis Asymptotic analysis or “big O” notation is a way of describing the growth of the runtime of an algorithm without without having to worry about different computers, compilers, or implementa- tions. For functions f ( n ) , g ( n ) , O ( g ( n )) is a class of functions such that f ( n ) O ( g ( n )) if there exist M, x 0 such that | f ( n ) | ≤ M · | g ( n ) | for all x > x 0 . Similarly, f ( n ) Ω( g ( n )) if there exist M, x 0 such that | f ( n ) | ≥ M · | g ( n ) | for all x > x 0 . If f ( n ) O ( g ( n )) and f ( n ) Ω( g ( n )) , then we write f ( n ) Θ( g ( n )) . x = ( x 2 ) M = , x 0 = (1) x = ( log x ) M = , x 0 = (2) x 3 = (2 x ) M = , x 0 = (3)
Background image of page 1

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

View Full Document Right Arrow Icon
6.006 Intro to Algorithms Recitation 01 February 2, 2011 Python This class uses Python 2.6. Do not use Python 3. If you’re not familiar with Python, there are numerous resources available on the Internet: Python tutorial: http://docs.python.org/tutorial/ Python libraries: http://docs.python.org/library/ 6.006 resources page: http://courses.csail.mit.edu/6.006/spring11/resources.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}