Notes on self-assembly of Turing machine simulations - PowerPoint PPT Presentation

About This Presentation
Title:

Notes on self-assembly of Turing machine simulations

Description:

Notes on self-assembly of Turing machine simulations Day 9 of Comp Sci 480 – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 40
Provided by: ScottSu150
Category:

less

Transcript and Presenter's Notes

Title: Notes on self-assembly of Turing machine simulations


1
Notes on self-assembly of Turing machine
simulations
  • Day 9 of Comp Sci 480

2
What 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.

3
Intuitively
  • 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
4
Formal 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

5
The 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)

6
Turing 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

7
Initial 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
8
Next 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)

9
Halting 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)

10
A Turing machine example
11
Let 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
12
Let 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




















13
Let 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




















14
Let 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




















15
Let 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
16
Let 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
17
Let 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
18
Let 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
19
Let 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
20
Let 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
21
Let 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
22
Let 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
23
Let 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
24
Let 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
25
Let 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
26
Let 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
27
Let 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
28
Let 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
29
Let 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
30
Let 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
31
Let 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
32
Simulating 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

33
Seed 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









34
Move 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

35
Move 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

36
Copy tape symbols
  • For each tape symbol x ? G
  • create the following tile types

37
Grow 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

38
Halt
  • If the Turing machine reaches the halting state,
    the self-assembly should halt as well
  • create the following tile type

39
How do we use a Turing machine simulation to make
a square?
Write a Comment
User Comments (0)
About PowerShow.com