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

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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, and q h, 1 .) • We assume that Γ contains { , 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 ∈ { , 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 ,γ 2 ,...,γ k ,D 1 ,...,D k ) where q ∈ Q and γ 2 ,...,γ k ∈ Γ and D i ∈ { L,S,R } . 3. Overwrite the contents of the currently scanned cell on tape i to γ 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 . 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, .) It is also possible that M never halts when run on some input x . We return to this point later....
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.

Page1 / 5

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online