Algorithm Analysis (CSC 301 2015F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [IRC] [Teaching & Learning]
Current: [Outline] [EBoard] [Reading] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Algorist]
Related Courses: [Walker (2014F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Overview
Formal definition
f(n) is in O(g(n)) iff exists c,n0 s.t. f(n) < c*g(n) for n>n0
What role does the n0 serve? "For large enough n"; it lets us ignore ugly stuff when n is small. 1000000000 + .0000001n
Also little-o
f(n) is in o(g(n)) iff lim as n->inty f(n)/g(n) = 0
Why have a formal definition of Big-Oh?
function conundrum(n)
r := 0
for i := 1 to n do
for j := i + 1 to n do
for k := i + j − 1 to n do
r := r + 1
return(r)