This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Notes on Complexity Theory Last updated: December, 2011 Lecture 2 Jonathan Katz 1 Review The running time of a Turing machine M on input x is the number of “steps” M takes before it halts. Machine M is said to run in time T ( · ) if for every input x the running time of M ( x ) is at most T (  x  ). (In particular, this means it halts on all inputs.) The space used by M on input x is the number of cells written to by M on all its work tapes 1 (a cell that is written to multiple times is only counted once); M is said to use space T ( · ) if for every input x the space used during the computation of M ( x ) is at most T (  x  ). We remark that these time and space measures are worstcase notions; i.e., even if M runs in time T ( n ) for only a fraction of the inputs of length n (and uses less time for all other inputs of length n ), the running time of M is still T . (Averagecase notions of complexity have also been considered, but are somewhat more difficult to reason about. We may cover this later in the semester; or see [1, Chap. 18].) Recall that a Turing machine M computes a function f : { , 1 } * → { , 1 } * if M ( x ) = f ( x ) for all x . We will focus most of our attention on boolean functions, a context in which it is more convenient to phrase computation in terms of languages . A language is simply a subset of { , 1 } * . There is a natural correspondence between languages and boolean functions: for any boolean function f we may define the corresponding language L = { x  f ( x ) = 1 } . Conversely, for any language L we can define the boolean function f by f ( x ) = 1 iff x ∈ L . A Turing machine M decides a language L if x ∈ L ⇒ M ( x ) = 1 x 6∈ L ⇒ M ( x ) = 0 (we sometimes also say that M accepts L , though we will try to be careful); this is the same as computing the boolean function f that corresponds to L . Note in particular that we require M to halt on all inputs. What is complexity theory about? The fundamental question of complexity theory is to un derstand the inherent complexity of various languages/problems/functions; i.e., what is the most efficient algorithm (Turing machine) deciding some language? A convenient terminology for dis cussing this is given by introducing the notion of a class , which is simply a set of languages. Two basic classes are: • time ( f ( n )) is the set of languages decidable in time O ( f ( n )). (Formally, L ∈ time ( f ( n )) if there is a Turing machine M and a constant c such that (1) M decides L , and (2) M runs in time c · f ; i.e., for all x (of length at least 1) M ( x ) halts in at most c · f (  x  ) steps.) • space ( f ( n )) is the set of languages that can be decided using space O ( f ( n ))....
View
Full
Document
This note was uploaded on 01/13/2012 for the course CMSC 652 taught by Professor Staff during the Fall '08 term at Maryland.
 Fall '08
 staff

Click to edit the document details