machine that can execute a program. A universal computer is a machine that can execute any program. Monday: formalized input/output as one-dimensional, infinite tape divided into squares, each containing one symbol from a finite set
can’t compute with only a finite number of states • Solutions: – “Infinite” State Machine • Hard to define, draw, and reason about – Add a working memory to the Finite State Machine 7
State – Input on Infinite Tape – Pointer to start of input • Step: – Read one input symbol from tape – Write symbol on tape, and move L or R one square – Follow transition rule from current state • Finish: – Transition to halt state 9
# Move: ¬ # 1 0 1 1 0 1 1 ... ... 1 0 1 1 0 1 1 1 # Input: 1 Write: 0 Move: ¬ Input: 1 Write: 1 Move: ® Input: 0 Write: 0 Move: ® 3 Input: 0 Write: # Move: Halt Infinite Tape: Finite set of symbols, one in each square Can read/write one square each step Controller: Limited (finite) number of states Follow rules based on current state and read symbol Write one square each step, move left or right or halt, change state 10
state and read symbol: Write a symbol into current square Move left or right one position Change state of mind 7 One Step 0 0 A 1 0 4 w 0 # 0 $ 1 4 w 0 #
state and symbol read: Write a symbol into current square Move left or right one position Change state of mind 7 0 0 A 1 0 4 w 0 # 0 $ 1 4 w 0 # Describing a Turing Machine
0 $ 1 4 w 0 # Describing a Turing Machine Symbols: a finite set of things you can write in a square States: a finite set of the “states of mind” of the machine Rules: a list of quintuples: (read symbol, state) è (write symbol, move, new state) Read symbol in current square Based on rule for current state and symbol read: Write a symbol into current square Move left or right one position Change state of mind