Title: Notes on self-assembly of Turing machine simulations
1Notes on self-assembly of Turing machine
simulations
2What is a Turing machine?
- A Turing machine is an abstract mathematical
model of a computer. - A Turing machine is used to study the process of
computation.
3Intuitively
- A Turing machine consists of three components
- An infinite tape (infinite in both directions),
- a control module that maintains the current state
of the machine, and - a read/write head
q
4Formal definition
- A Turing machine is a tuple M
(Q,S,G,d,q0,qhalt), where - Q is a finite set of states,
- S is a finite set of characters, usually 0,1,
- G is a finite set of characters such that S is a
subset of G, - dQG ? QGL,R is the transition function, and
- q0 and qhalt are the start and halting states,
respectively
5The transition function
- The transition function says what to do next,
given the current state and symbol being read)
and is stated as - dQG ? QGL,R
- The previous notation is just a formal way of
specifying a function with the following
behavior - Input a state and tape symbol
- Output a state, tape symbol and direction
- For example, d(p,a) (q,b,d) means If Im
currently in state p, reading tape symbol a, then
in the next step, I will go to state q, overwrite
symbol a with b, and move in direction d (either
left or right)
6Turing machine behavior
- A configuration of a Turing machine is the
current state of the machine, which tape symbol
is currently being read and the current state of
the tape - The Turing machine starts in an initial
configuration - The next configuration is given by the transition
function d - The halting configuration, if ever reached, is
the unique configuration that has no next
configuration
7Initial configuration
- An input string w w0w1 wk-1 is put
somewhere on the tape, blank symbols ()
everywhere else - The state is set to q0
- The read/write head is positioned so that it is
reading the leftmost character in the input,
i.e., w0
q0
8Next configuration
- Suppose the current state is p and the read/write
head is reading tape symbol a - If d(p,a) (q,b,d), then the Turing machine does
the following - Changes state from p to q
- Overwrites the tape symbol being read (a) with b
(a and b need not be different) - Moves the read/write head in direction d (either
left or right)
9Halting configuration
- The Turing machine is said to halt if it ever
enters the halting state, i.e., if its in state
q, reading tape symbol a, and d(q,a)
(qhalt,___,___), for any tape symbol b and
direction d - There is no next configuration from the halting
configuration - A Turing machine need not ever reach a halting
configuration (i.e., it runs forever)
10A Turing machine example
11Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
12Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
q0
1
13Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
q01
C0
q2
1
14Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C1
1
q2
q01
C0
q2
1
15Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C1
1
q2
q01
C0
q1
1
1
16Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
17Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C2
q1
1
1
C1
1
q2
q01
C0
q0
1
1
1
18Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q0
1
1
1
19Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
20Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
21Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
22Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
23Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
24Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
25Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
26Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q1
1
1
1
1
27Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q0
1
1
1
1
1
28Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C8
1
1
1
q01
1
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q0
1
1
1
1
1
29Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C8
1
1
1
q01
1
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q2
1
1
1
1
1
30Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
C9
q21
1
1
1
1
C8
1
1
1
q01
1
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
q2
1
1
1
1
1
31Let M (Q,S,G,d,q0,qhalt), where Q
q0,q1,q2,qhalt, S 1, G 1,, and d is
defined in the following table
d 1
q0 q2,1,L q1,1,R
q1 q1,1,R q0,1,L
q2 qhalt q1,1,L
Chalt
C9
q21
1
1
1
1
C8
1
1
1
q01
1
C7
1
1
1
q1
1
C6
1
1
1
q11
C5
1
1
1
q11
C4
1
1
1
q11
C3
q0
1
1
1
C2
q1
1
1
C1
1
q2
q01
C0
qhalt
1
1
1
1
1
32Simulating a Turing machine with self-assembly
- Basic idea self-assemble the space-time
configuration history of a Turing machine - Each configuration is represented by a row of
tiles, above the previous configuration
33Seed row
- Hard code the initial configuration in a seed row
by creating the following tile types
q0w0
w1
wk-1
q0w0
w1
wk-1
0
1
0
k-1
k-2
k-1
-1
-1
q0w0
w1
wk-1
34Move right
- For all transitions of the form d(p,a) (q,b,R)
where q is not the halting state - create the following tile types, where c ? G
35Move left
- For all transitions of the form d(p,a) (q,b,L)
where q is not the halting state - create the following tile types, where c ? G
36Copy tape symbols
- For each tape symbol x ? G
- create the following tile types
37Grow the tape
- If the read/write head tries to grow too far left
or too far right, we need to expand the tape, so
create the following tile types
38Halt
- If the Turing machine reaches the halting state,
the self-assembly should halt as well - create the following tile type
39How do we use a Turing machine simulation to make
a square?