Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Asympto(c

Analysis
Big-Oh: Deni(on
Design and Analysis
of Algorithms I

Big-Oh: English Deni(on


Let T(n) = func(on on n = 1,2,3,
[usually, the worst-case running (me of an algorithm]
Q : When is T(n) = O(f(n)) ?
A : if eventually (for all suciently large n), T(n) is bounded
above by a constant mul(ple of f(n)

Tim Roughgarden

Big-Oh: Formal Deni(on


Formal Deni(on : T(n) = O(f(n)) if
and only if there exist constants
such that
For all
Warning : cannot depend on n

Tim Roughgarden

You might also like