lecture1 - Notes on Complexity Theory Last updated August...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Notes on Complexity Theory Last updated: August, 2011 Lecture 1 Jonathan Katz 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look at Sipser’s book [3].) A Turing machine is defined by an integer k 1, a finite set of states Q , an alphabet Γ, and a transition function δ : Q × Γ k Q × Γ k - 1 ×{ L, S, R } k where: k is the number of (infinite, one-dimensional) tapes used by the machine. In the general case we have k 3 and the first tape is a read-only input tape , the last is a write-once output tape , and the remaining k - 2 tapes are work tapes . For Turing machines with boolean output (which is what we will mostly be concerned with in this course), an output tape is unnecessary since the output can be encoded into the final state of the Turing machine when it halts. Q is assumed to contain a designated start state q s and a designated halt state q h . (In the case where there is no output tape, there are two halting states q h, 0 and q h, 1 .) We assume that Γ contains { 0 , 1 } , a “blank symbol”, and a “start symbol”. There are several possible conventions for what happens when a head on some tape tries to move left when it is already in the left-most position, and we are agnostic on this point. (Anyway, by our convention, below, that the left-most cell of each tape is “marked” there is really no reason for this to ever occur. . . ). The computation of a Turing machine M on input x ∈ { 0 , 1 } * proceeds as follows: All tapes of the Turing machine contain the start symbol followed by blank symbols, with the exception of the input tape which contains the start symbol followed by x (and then the remainder of the input tape is filled with blank symbols). The machine starts in state q = q s with its k heads at the left-most position of each tape. Then, until q is a halt state, repeat the following: 1. Let the current contents of the cells being scanned by the k heads be γ 1 , . . . , γ k Γ. 2. Compute δ ( q, γ 1 , . . . , γ k ) = ( q 0 , γ 0 2 , . . . , γ 0 k , D 1 , . . . , D k ) where q 0 Q and γ 0 2 , . . . , γ 0 k Γ and D i ∈ { L, S, R } . 3. Overwrite the contents of the currently scanned cell on tape i to γ 0 i for 2 i k ; move head i to the left, to the same position, or to the right depending on whether D i = L, S , or R , respectively; and then set the current state to q = q 0 . The output of M on input x , denoted M ( x ), is the binary string contained on the output tape (between the initial start symbol and the trailing blank symbols) when the machine halts. (When there is no output tape, then the output is ‘1’ if M halts in state q h, 1 and the output is ‘0’ is M halts in state q h, 0 .) It is also possible that M never halts when run on some input x . We return to this point later. 1-1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The running time of a Turing machine M on input x is simply the number of “steps” M takes before it halts; that is, the number of iterations (equivalently, the number of times δ is computed) in the above loop. 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 | ). The
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern