CS200: Computer Science, Spring 2004

Notes: Friday 2 April 2004
Schedule
 Wednesday, 7 April: Problem Set 7
 Wednesday, 7 April: Problem Set 8 Team Requests
 Exam 2 will be handed out on 14 April and due on 19 April.
Models of Computation What is a model?
What do we need to model computation?
Finite State Machine
FSM ::= <Alphabet, States, InitialState, HaltingStates, TransitionRules>
Alphabet ::= { Symbol^{*} }
A set of symbols for the input.
States ::= { StateName^{*} }
InitialState ::= StateName
Must be one of the states in States.
HaltingStates ::= { StateName^{*} }
Must all be states in States.
TransitionRules ::= { TransitionRule^{*} }
TransitionRule ::= < StateName, Symbol, StateName>
StateName X Symbol → StateName
Turing Machine
TM ::= <Alphabet, Tape, TFSM>
Alphabet ::= { Symbol^{*}}
A set of symbols for the tape.
Tape ::= < LeftSide, OneSquare, RightSide >
OneSquare ::= Symbol  #
LeftSide ::= [ Squares^{*} ]
Everything to left of LeftSide is #. RightSide ::= [ Squares^{*} ]
Everything to right of RightSide is #. Squares ::= OneSquare, Squares
Squares ::=TFSM ::= <States, InitialState, HaltingStates, TransitionRules>
Like a FSM, except the transition rules write to the tape and move the tape head.States ::= { StateName^{*} }
InitialState ::= StateName Must be one of the states in States.
HaltingStates ::= { StateName^{*} } Must all be states in States.
TransitionRules ::= { TransitionRule^{*} }
TransitionRule ::= < StateName, OneSquare, StateName, OneSquare, Direction>
StateName X OneSquare → StateName X OneSquare X DirectionUniversal Turing Machine
A Turing Machine that can simulate any other Turing Machine on an input: TM_{U} (P, I) = the output of running TMP on input I
Links
 Alan Turing site by Andrew Hodges, author of Alan Turing: the Enigma (Douglas Hofstadter wrote the preface)
 Manchester Illuminated Universal Turing Machine (Turing Machine Art)
 HTML is not a univeral language, but XSLT style sheets are: universal turing machine implemented using XSLT
 Universal Turing Machine print (title slide picture)
 Turing Machines (animations)
cs200staff@cs.virginia.edu Using these Materials 