Professional Documents
Culture Documents
Class 30: Models of Computation: David Evans
Class 30: Models of Computation: David Evans
Class 30: Models of Computation: David Evans
Models of
Computation
Cray-1 (1976)
Apollo Guidance
Computer (1969)
Punch Cards
2 April 2004
Engelbart’s mouse and keypad
CS 200 Spring 2004 5
Simplest Input
• Non-interactive: like punch cards and
paper tape
• One-dimensional: just a single tape of
values, pointer to one square on tape
0 0 1 1 0 0 1 0 0 0
0 0 1 1 0 0 1 0 0 0
0 1
0
Start 1 2
1
#
HAL
T
2 April 2004 CS 200 Spring 2004 10
Hmmm…maybe we don’t need
those infinite tapes after all?
not a ( not a
paren paren
Start 1 2
)
)
# What if the
next input symbol
ERRO HAL
is ( in state 2?
R T
2 April 2004 CS 200 Spring 2004 11
How many states do we need?
not a ( not a
paren paren
not a
Start 1 2 paren
(
)
)
)
3 not a
paren
#
(
ERRO HAL
R T 4
)
2 April 2004 CS 200 Spring 2004 12
(
Finite State Machine
• There are lots of things we can’t compute
with only a finite number of states
• Solutions:
– Infinite State Machine
• Hard to describe and draw
– Add a tape to the Finite State Machine
2: look
Start 1 for (
(, X, R
#, 1, # #, 0, #
HAL
Will this report the
correct result for (()?
T
2 April 2004 CS 200 Spring 2004 16
Matching Parentheses
(, (, R
X, X, L
X, X, R ), X, L
2: look
Start
1 (, X, R for (
#, #, L
#, 1, # #, 0, #
3: look
X, X, L for ( HAL
T
#, 1, #
(, 0, #
2 April 2004 CS 200 Spring 2004 17
Turing Machine
• Alan Turing, On computable numbers: With
an application to the
Entscheidungsproblem, 1936
– Turing developed the machine abstraction to
show the halting problem really leads to a
contradiction
– Our informal argument, depended on assuming
we could do if and everything else except
halts?
), X, L
TuringMachine ::= < Alphabet, Tape, FSM >
), #, R
(, #, L
Alphabet ::= { Symbol* }
1
2:
look
for (
Tape ::= < LeftSide, Current, RightSide >
Start
(, X, R
OneSquare ::= Symbol | #
Current ::= OneSquare
HAL
#, 1, - T #, 0, -
LeftSide ::= [ Square* ]
Finite State Machine RightSide ::= [ Square* ]
• TM- = WindowsXP
3672349872381692309875823987609823712347823
http://www.people.virginia.edu/~cw7r/cs200/