
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: McQuain; Class: Data Structs & OO Development; Subject: Computer Science; University: Virginia Polytechnic Institute And State University; Term: Fall 2008;
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Finiteness: Algorithm must complete after a finite number of instructions have been executed absence of Ambiguity: Each step must be clearly defines, having only one interpretation definition of Sequence: Each step must have a unique defined preceding and succeeding step. The first step (start step) and last step (halt step) must be clearly noted. input/Output: Number and types of required inputs and results must be specified. Feasibility: It must be possible to perform each instruction logn, n, nlogn, n^2, n^3, 2^n BigO: Suppose that f(n) and g(n) are nonnegative functions of n. Then we say that f(n) is O(g(n)) provided that there are constants C
0 and N > 0 such that for all n > N, f(n) <= Cg(n). expresses and upper bound Theorems: 1.) K is O(1) 2.) A polynomial is O(the term containing the highest power of n) 3.) K*f(n) is O(f(n)) (i.e. you can drop constants) 4.) If f(n) is O(g(n)) and g(n) is O(h(n)) then f(n) is O(h(n)) [transitivity] 5.) K, logb(n), n, nlogb(n), n^2, n^higher power, 2^n, 3^n, larger constants^n, n!, n^n 6.) f(n) is O(the dominant term of f(n)) 7.) for any base b, logb(n) is O(log(n)) BigOmega: Suppose that f(n) and g(n) are nonnegative functions of n. Then we say that f(n) is (^) ๎ถ๎g ๎n๎๎ provided that there are constants C > 0 and N > 0 such that for all n > N, f(n) >= Cg(n). expresses a lower bound BigTheta: Suppose that f(n) and g(n) are nonnegative functions of n. Then we say that f(n) is ๎ฎ๎ g๎ n๎๎ provided that f(n) is O(g(n)) and also that f(n) is (^) ๎ถ๎g๎ n๎๎. Theroems: 8.) f(n) is ๎ฎ๎ g๎ n๎๎ if lim n ๎โ f ๎n ๎ g ๎ n๎ =c , where 0 ๎c๎โ