This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS103 HO#57 SlidesComplexity Classes May 25, 2010 1 maps to A B ¬ Solvable(A) ¬ Solvable(B) A language known not to be decidable A language whose decidability we are trying to determine If B D Then A D But A D So B D A m B Using Mapping Reductions: The Most Common Scenario Using Mapping Reductions: A Less Common Scenario maps to A B A language known to be decidable A language whose decidability we are trying to determine If B D Then A D A m B Solvable(B) Solvable(A) BigO Notation • The exact running time of an algorithm may be a complicated function of the length of its input, so we typically just estimate it. • The question we generally ask is: how does the running time of an algorithm change as we size of the input gets very large. This is called asymptotic analysis. BigO Notation Suppose the running time, where n is the length of the input, is f(n) = 6n 3 + 2n 2 + 20n + 45 6022045 45 2000 20000 6000000 100 164445 45 600 1800 162000 30 49245 45 400 800 48000 20 6445 45 200 200 6000 10 73 45 20 2 6 1 n 6n 3 2n 2 20n 45 f(n) BigO Notation Let f and g be functions f, g: N R + . We say that f(n) = O(g(n)) if there are positive integers c and n such that for every integer n > n f(n) c g(n). We say that g(n) is an asymptotic upper bound for f(n). c g(n) f(n) n BigO Notation Suppose the running time, where n is the length of the input, is f(n) = 6n 3 + 2n 2 + 20n + 45 For the right c , f(n) 7n 3 We say that f(n) = O(n 3 ) , meaning that f(n) n 3 if we disregard the lower order terms and a constant factor. BigO supresses the constant on the highorder term. CS103 HO#57 SlidesComplexity Classes May 25, 2010 2 BigO Notation Suppose the running time, where n is the length of the input, is f(n) = 6n 3 + 2n 2 + 20n + 45 We say that f(n) = O(n 3 ) , meaning that f(n) n 3 if we disregard the lower order terms and a constant factor....
View
Full Document
 Fall '09
 Computational complexity theory, Language Class NP

Click to edit the document details