15 - 15. Turing Machines Outline (Deterministic) Turing...

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

View Full Document Right Arrow Icon
15. Turing Machines Outline (Deterministic) Turing Machines How TMs work How TMs are specifed Computations For TMs 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Turing Machines Pushdown automata are too restrictive (uses stack) to serve as models of general purpose computers. TMs have unlimited and unrestricted memory (allowing writing to tape and reading back the stored information). TM can do everything that a real computer can do. We shall see that even TM cannot solve certain problems; these problems are beyond the theoretical limits of compu- tation. TM is a formal model of computers, consisting of A tape with a left end, but extends indeFnitely to the right, A Fnite control with a Fnite number of states, and Aread/ write head. q 4 q 3 q 2 q 1 q 0 bb abaa a b Read/write head (moves in both directions) control Finite h 2
Background image of page 2
First example of Turing Machines How does a TM recognize the following non-context-free lan- guage { w # w | w ∈{ 0 , 1 } } ? M : On input string w : 1. zig-zag across the tape to corresponding positions on both sides of the # symbol to check whether these positions con- tain the same symbol. If they do not, or if no # is found, reject w . Else cross oF matched symbols. 2. When all symbols to the left of # have been crossed oF, check for any remaining symbols to the right of #. If any symbols remain, reject w , otherwise accept w . 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Basic Operations of Turing Machines At the beginning of computation, assume that the left end of tape has a special symbol ± ; the input string is placed just to the right of ± , the rest of the tape is blank ( ± ). At each step, the machine reads the symbol that the R/W head is currently pointing to, and depending on its current state and the symbol read. 1. Enter the next state, 2. Do one of the following (but not both): Write a symbol in the current tape square, or Move R/W head one tape square to the left or right. Computation stops only when it enters a halting state .The machine might have read only part of the string. The symbols left on the tape when it halts is the output . TMs are deterministic. Note: The initial position of the head is often assumed to be immediately to the right of ± , but we can specify it to be any- where.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/22/2011 for the course COMP 272 taught by Professor Prof.tai during the Spring '10 term at HKUST.

Page1 / 20

15 - 15. Turing Machines Outline (Deterministic) Turing...

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

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