Universal Turing Machine
Lecture 20
1
Universal Turing Machine Lecture 20 1 Turing Machine move the head - - PowerPoint PPT Presentation
Universal Turing Machine Lecture 20 1 Turing Machine move the head left or right by one cell sequentially accessed read write infinite memory finite memory (state) next- action look-up table CS 374 Variants dont change which
1
CS 374
finite memory (state)
next-action look-up table
sequentially accessed infinite memory
read write move the head left or right by one cell
CS 374
3
CS 374
4
CS 374
5
Symbols scanned on the k different tapes Symbols to be written
Directions to move in (Di is one of L, R, S)
With 2 tapes, n+1 steps: copy till # to 2nd tape. Scan it backwards after that
CS 374
6
BUT.... M has k heads! How can Mʹ be in k places at once?
CS 374
7
head 1 head 2
q1
head q1
CS 374
8
head 1 head 2
q2 head q1
CS 374
9
head 1 head 2
q2 head q1,1,1
CS 374
10
head 1 head 2
q2 head q2,0,0,R,L
CS 374
11
head 1 head 2
q2 head q2
CS 374
12
CS 374
. . . . . . . .
. .
M1 work space M2 work space: initially input to M2 . . . . . . . .
. . .
M1 work space M2 returned value
CS 374
14
CS 374
15
CS 374
16
p
0/3,L
q1 q4
1/2,R 3/1,R
q2 q3
2 / 1 , L
p
0/0,R 1/0,L
q1 q3 q4
0/1,L 1/0,R
q2
1/1/,R 0/1,L 1/1,L 0/1,L 0/1,R 1/0,L x/x,L x/x,R x/x,R x/x.L READ WRITE MOVE
CS 374
17
ENIAC (1946-1955) Programmers: Kay McNulty, Betty Jennings, Betty Snyder, Marlyn Wescoff, Fran Bilas, Ruth Lichterman
CS 374
18
CS 374
19
Already saw: can be reduced to 1 tape and binary alphabet
CS 374
20
CS 374
21
1 1 _ _ _ _ _ _ _
. . . . . . # 1 _ 1 1 _ _ _ _ _ _ _
syntax of z
w to tape 2, 0 to tape 3
until a halting state in tape 3: Scan tape 1 to find the correct transition, and update tapes 2 & 3.
CS 374
22
CS 374
23
CS 374
24
CS 374
25
CS 374
26
CS 374
(Open whether these models allow polynomial-time computation
27