Docstoc

A SIMPLIFIED UNIVERSAL TURING MACHINE

Document Sample
A SIMPLIFIED UNIVERSAL TURING MACHINE Powered By Docstoc
					                              A SIMPLIFIED UNIVERSAL T U R I N G M A C H I N E

                                                                                          By

                                                                                E. F. Moore
                                                                   Bell Telephone Laboratories, New Jersey


i.      IN;RODUCTION                                                                           merely as input-output media. Hence, a
                                                                                               Turing machine c o u l d a l s o be considered
     In 1936 Turing (I) defined a class                                                        a mathematical model{3) of a digital
of logical machines (which he called a-                                                        computer.
machines, but which are now generally
called Turing machines) which he used as                                                       2.   Multiple-tape Turing Machines
an aid in proving certain results in
mathematical logic, and which should                                                               I will modify Turing's definition of
prove of interest in connection with the                                                       the machines considered by permitting
theory of control and switching systems.                                                       generalized Turing machines to employ
                                                                                               more than one tape, and permitting some
     Given any logical operation or arith-                                                     of the tapes to be in the form of closed
                                                                                               loops (like a conveyor belt, or a rubber
metical computation for which complete                                                         band) rather than being infinite.
instructions for carrying out can be sup-
plied, it is possible co design a Turing
machine which can perform this operation.                                                          I will use the term "ordinary Turlng
                                                                                               machine" to refer to what Turing called
     A Turing machine is defined to have                                                       an "a-machine", and the term "multiple-
only a finite number of internal states                                                        tape Turing machine" to refer to a
and to have an infinitely long tape on                                                         machine modified as above.
which it can read, write, and erase sym-                                                           A multiple-tape Turing machine can
bols, and which it can move one space at                                                       operate more like those digital computers
a time in either direction.                                                                    which have several tape drives, or which
     Turing suggested that such a machine                                                      have cyclic memories (such as mercury
is an abstract mathematical model of a                                                         delay lines, magnetic drums, or loops of
human being assigned to performing a com-                                                      punched paper tape). It can easily be
putation, with the states of the machine                                                       shown that the class of calculations
corresponding to the states of mind of                                                         which can be performed on ordinary Turing
the human, and the symbols on the tape                                                         machines is exactly the same as the class
corresponding to the numerical answers                                                         that multiple-tape Turing machines can
and to the intermediate results on                                                             handle, although the method of handling
                                                                                               the calculations must be different, to
scratch paper (2}.                                                                             permit all of the information to be
     Developments since the time of                                                            stored on one tape. The objectives which
Turing's paper have been in the di-                                                            can be attained by having more than one
rection of digital computers which show                                                        tape are to increase the similarity in
a much more direct resemblance to Turing                                                       method of operationbetween this ab-
machines than do human beings. In fact,                                                        straction and certain actual machines.
                                                                                               and (in the example given later in this
several present-day digital computers do                                                       report; to simplify the internal structure
actually use magnetic or perfgratedpa~er                                                       and the method of ~ction of a machine
tapes as auxiliary memories, insteaa ox                                                        which performs some specific task.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . - - . . . . . . . . . . . - -

(i) Turing, A. M., On computable numbers,
    with an application to the Ent-
    scheldungs problem, Proc. Lond. Math.
    Soc. Series 2, Vol. ~I,-pp.~-2~,-                                                          (3) The computers a g a i n d i f f e r   from
        T~6.                                                                                        these abstract mathematical machines,
                                                                                                    chiefly in making mistakes (i.e.,
(2) This, like most other mathematical                                                              machine breakdowns and transient
    models, appears to differ from the                                                              errors). Also, the Turlng machines
    object imitated in several auxiliary                                                            are unnecessarily general in their
    properties. For instance, the human                                                             properties, since no existing
    can make mistakes in com~utation, find                                                          physical machine can have an arbi-
    some of his own mistakes, ask for a                                                             trarily long tape. However, Turlng
    raise, as~ whether the problem is                                                               machines can be designed which behave
    really worth solving, and invent                                                                as if they did not have the infinite
    short-cut methods.                                                                              tape. If no such restriction is impos-
                                                                                                    ed in the Turing machine, it corre-
        However, on closer analysis, it would                                                       sponds to a human attendant operating
        seem a reasonable conjecture that                                                           an actual computer by removing and
        sufficiently complicated mathematical                                                       replacing reels of tape whenever the
        models, somewhat like Turing machines                                                       machine indicates this should be
        could eventually be rigorously shown                                                        done, thus removing the limitation
        to have properties of the sort                                                              imposed by the mechanical properties
        mentioned.                                                                                  of the machine.


                                                                                          50
3.   Universal Turing Machine                         of internal states, ql,.. .... , qn, and
                                                      has a finite number of symbols(6~, So,
    In addition to considering Turing                 S1, ... Sm, which it can print on the
machines which would perform various other            scanned square of the tape.
mathematical operations, Turing gave a
description ol a universal Turing machine,                The next move that the machine will
which was a single ordin=ry Turing                    make is assumed to be determined by the
machine which could perform any operation             internal state of the machine and by
which any oth~F~ordinary Turing machine               the symbol scanned. This ordered pair
could performS*J, even in case the other              (an internal state qi and a symbol S~
machine was more complicated than the                 scanned) will be called a determinan£,
universal machine.                                    and the next action taken is to be
                                                      determined only by the present determi-
    This ability to make a relatively                 nant of the machine.
simple machine act like a more compli-
cated machine is achieved by giving the                    There are only m * 3 different
simple machine complicated instructions.              kinds of operations which the machine can
In particular, the universal Turing                   perform in any one step. These are t h e
machine is given on one part of its tape              ooeration R, in which the machine moves(7)
a complete symbolic description of the                to the right along the tape (i.e., it
machine it is expected to imitate. Then               changes from scanning its present square
the universal machine stores on another               to scanning the one immediately to the
part of its tape (for instance, on                    right of this), the operation L, in
alternate squsres) a copy o£ the tape                 which the machine moves to the left
that would be on the imitated machine,                along the t~pe, and the m + 1 operations
and makes the changes on this part oi                 S k (defined for k = O, l, ..o m) which
the tape which the imitated machine would             erase the symbol on the square now
make. The remaining part of the tape                  scanned, and print in its place the
must be used for intermediate scratch                 symbol S k.
work, for instance to record what state
the imitated machine is in, what part of                  After the machine performs one of
the tape it is scamning, etc. The                     these m + 3 operations listed above, it
internal structure o£ the universal                   goes into a specified state q~, and
Turing machine has to i n ~ u d e instructions        begins the cycle again (i.e., it now
to use these various kinds of data, and               performs an operation based on its new
to move back and forth between the dif-               determinant).
ferent parts of tape.
                                                           The determination as to which oper-
    Since the method of storing all of                ation the machine will perform and which
this information on one tape is rather                states it will go into are given by the
complicated, the internal structure o£                description of the Turing machine, which
the universal Turing machine which                    is a finite list of quadruples of the
Taring described is also rather compli-               form -
cated, requiring a large number of states.
                                                                    qiSj X q&
    The present report describes a uni-
                                                      where i = i, ... , n~ & = i, ..., n~ j =
versal Turing machine which only has
                                                      0, ..., m~ and X is any Turing machine
fifteen states, at the expense of being               operation (i.e., X = R, X = L, or X = Sk,
a multiple-tape machine. This simplifi-
                                                      for k = O, ... m). The verbal interpre-
cation is accomplished by putting dilTer-             tation of such a quadruple is that if the
ant kinds of information on different                 machine is in state q~ scanning symbol S-,
tapes which can be moved independently,               it should next perforg operation X and g~
pemnitting all the information required
                                                      into state q~.
at each step to be at the reading heads
simultaneously.
                                                           It should be noted that the first two
                                                      terms of each quadruple are the determi-
4.   Conventions for Ordinary Turing
                                                      nant, and hence for the machine to be able
     Machines                                         to act consistently according to its de-
                                                      scription, we must impose the condition
    The following conventions concerning              that no two quadruples can begin with the
the description and operation o£ ordinary             same determinant.  This condition will be
Turing machines are slightly simplified               called the consistency condition, and will
from those given by Turing, and a r e , ~             be taken to be part of the definition of
accordance with those used by Davlst)J.               an ordinary Turing machine.
The machine is assumed to have a tape
which has been subdivided into squares
                                                           This completes the definition of
the width of the tape, each square                    ordinary Turing machines in general, but
containing exactly one symbol. The
machine is able to read what is on only
one square of the tape at any given
time. The machine has a finite number                 (6)    Blank tape (i.e., tape which has
                                                             not yet been printed on by the
                                                             machine) is assumed to originally
                                                             contain the blar k symbol S o on
                                                             eacn square.
(4)It could be interpreted, loosely speak-
   ing, as a completely general-purpose
   digital computer.                                   (7)    The somewhat confusin~ coDvention
                                                              that the machine move~ relative
                                                              to the tape, instead of vice versa,
(5) Martin Davis. Mimecgraphed lecture                        is used here only to avoid chang-
    notes on recursive function theory,                       ing the conventions established
    University of Illinois, 1951.                             by Turing and Davis.

                                                 51
there is one other modification that w i l l        It should be noted that the above tape
be made to simplify the construction of             descriptions have the property that a
the universal Turing machine given in               block of N l's represents a determinant
this report.  This is to restrict m to be           if, and only if, N is not divisible by 3.
equal to l, i.e., to permit only two
symbols S^, and S~ on the ordinary Turing           5.   A ~ulti~le-tape Universal Turing
machine c~nsidered. To simplify the                      Machine
notation, we will let S^ = O, and S 1 = l,
and note that O is the ~ymbol present on                   Let us consider a Turing machine
blank tape.                                         having three tapes, which will be called
                                                    ~         and T~, on each of which only the
      This restriction does not cut down               b v ~ 0 or X can occur. The descrip-
the generality of the machines considered,          tion of this machine is given by a list
since if any operation can be performed on          of sextuples below, with the first four
a machine having m + 1 symbols, it can be           items in each representing the determi-
performed on a machine having only two              nant, which in this case must consist of
symbols, by replacing each symbol in the            the internal state and the symbol scanned
original machine by a block of binary               on each of the three tapes. For instance
digits, whose length is s, the least                q~lO1 is the determinant which indicates
integer ~ log 2 (m + 1), i.e., by coding            that the sextup!e in which it occurs is
the origlnal machine on a binary basis.             to nave effect only if the machine is in
In order to do this and remain within the           internal state q~, scans 1 on T1, scans
scope of the definition given for a Turing          0 on T2, and scaMs 1 on T 3.
machine, it is necessary to replace each
quadruple of the original machine with a                 As an added convention 8 is
set of at most 3s - 2 quadruples (taking            used in the determinant to indicate that
care not to violate the consistency con-            the sextuple is to have effect regardless
dition) which scan through the block of             of whether the corresponding tape shows
binary digits to identify it and which              a O or a 1.
step along performing a series of oper-
ations equivalent to the operation of the                Yhe fifth symbol in each sextuple
original machine.                                   is one operation which is to be performed
                                                    next. These operations are given as in
     Finally, before describing the                 the case of the ordinary Turing machine,
universal Turing machine which can                  except that a subscript indicates which
imitate any ordinary Turing machine                 tape it is to apply to.  Thus R 1 indi-
havin~ only two symbols, let us define              cates a step to the right along T1, and
precisely how the description of the
                                                    03 indicates the printing of a O on T3.
ordinary Turing machine will be written
on a tape, using only binary digits.                     Finally the sixth symbol in each
                                                    sextuple gives the next state of the
     The tape description is obtained               Turing machine.
from the list of quadruples that com-
pletely defines the machine, by the use                   The complete list of sextuples of
cf a rule translating the quadruples                the machine is given below, with
into l's and O's in such a manner that              explanations of the operations.   The list
will permit their use easily in the                 is broken up into parts A, B, and C to
universal machine.                                  permit over-all explanation of the parts.
                                                    The sequenc~ of steps which this machine
     .The determinant q~O (or q~l)                  goes through in part A, part B, and then
which begins each quadruple is~trans -              part C will perform one step of the
lated into a block of 3i + 1 (or 3i +               actions of the Turing machine being
2, respectively) successive l's along               imitated.
the tape.
                                                         In order to use this machine,
     The operation which is indicated               the tape T1 sbould be a loop of tape,
in the third term of each quadruple is              containing the description of the
translated into a string of O's which               machine being imitated, T 2 should be an
immediately follow the above described              infinite tape which is blank except for
block on the tape.  The translation                 containing the determinant of the
is as follows -                                     machine being imitated (written as a
                                                    string of l's, as described above), and
             0              0                       T~ should be a copy of the infinite tape
             1              O0                      which would be on the machine being
             L              000                     imitated°
              R             0000
                                                         The three tapes are used for ohe
     The next state ell is translated               purposes indicated above at each step,
as a block of 35 successive l's,                    except that T 2 will contain the sequence
immediately following the above string              of all the past determinants of the
of O's.                                             machine being imitated, only the most
                                                    recent of which is used at any step.
     For instance, the following are
translations of a few quadruples -                        As an aid in following the written
                                                    description below, Figure 1 shows most
                  qlOlq 2    llllOOllllll           of the same information in diagrammatic
                                                    form.
                  q21Lq I    llllllllO00111
                                                    6.   Description of the Machine
     To write the tape description of
an entire ordinary Turing machine on a                   Part A
tape, we write the translations of the
quadruples in any order, separating each                 In states ql through q~ the
from the next with any number of O's.               multiole-tape Turing machin~ is search-
                                               52
ink along T 1 to find the quadruple that                  Part B
will be perginent to the next operation
of the machine it is imitating.                           In states qA through q11 the
                                                     multiple-tape Tu~ing machine-examines
     It is done by searching along T1                the number of O's immediately following
to find a block of l's having the sale               the block of l's just located on T 1
length as the block on T 2.                          which indicate what operation the
                                                     ordinary Turing machine being imitated
     qlllSR2q 2  The machine steps along             ia expected to perform on its tape.
               to the right on T1 and T 2            The corresponding operation is then per-
     q21~SRlqlalternately, starting in               formed on T 3.
               state ql at the left end
               of the ~lock of l's on                     q6OOeRlq7      The multiple-tape Turing
               each tape.                                              machine is scanning the
                                                                       first 0 following the
     ql108L2q3      If the machine reaches                             determinant block on T 2.
                  0 on T 2 while wire,in the                           In order to begin count-
                  block of l's on T., the                              ing how many successive
                  block on T 1 was snorter,                            O's there are, the machine
                  and the machine begins                               moves to the right on T 1.
                  preparation for comparing
                  the next block on T1 with               q710803q 8      Since the multiple-tape
                  the same block on T 2 by                             Turing machine has reach-
                  moving b a c k one space t~                          ed a 1 on T1, there was
                  return to the OAOCK on x2.                           only a singAe O. This
                                                                       indicates that the opera-
     q3118Rlq3      The machine moves along                            tion the ordinary Turing
                  toward the right end of                              machine should perform
                  the block of l's on T 1.                             next is to print a O, so
                                                                       T 3 takes this action.
     q30iSL2q4      When the machine has
                  just passed the right end               qTOOeRlq9      There were at least two
                  of the block of l's on T1,                           successive O's on TI, so
                  it moves back toward the                             the machine moves t$ the
                  beginning of the block on                            right along T1, to continue
                  T2 •                                                 counting the O's.

     qlOlSL2q 4     If the machine reaches                q910813q8      There were exactly two
                  a 0 on T 1 while still                               successive O's on Ti, so
                  within t~e block of l's                              the multiple-tape m~chine
                  on T2, the block on T 2                              prints a I on T3.
                  was shorter, and the
                  machine moves back toward
                  the beginning of the block             q9OO~RlqlO      The machine continues
                                                                       counting O's on TI.
                  on T 2.
                    The machine continues                qlolOeL3q 8     There were exactly
     q401eL2q 4                                                        three successive O's on
                  moving to the left on T2,
                  to return to the beginning                           T1, so the multiple-
                                                                       tape machine moves to
                  of the block of l's on T 2.
                                                                       the left on T 3.
     q400eRlq 5      As soon as the machine
                  has passed the beginning              qloOOSRlqll      There were exactly
                  o~ the block of l's on T2,                           four successive O's on
                  it begins moving along                               TI, so the multiple-
                  t o ~ r d the next block.             qlllOeR3q 8    tape machine moves to
                                                                       the right on T~, after
                                                                       having moved along Ti,
     qsOOSRlq5      The machine continues                              to the beginning of
                  past the O's toward the                              the next block.
                  next block on T I.

     qslOSR2q I     As soon as the machine               Part C
                  has reached the begin-
                  ning of the next block
                  on T 1 it moves back to                  In states q8 and q12 through q]~,
                  the Neginning of the               the multiple-tape Turing machine prints
                  original block on T 2 to           on T^ the determinant for the next
                  begin making the next              operation, obtaining it from the symbol
                  comparison of blocks.              on T 3 and the state of the ordinary
                                                     Turing machine described on T I. If
     qlOOeR2q6       If the comparison               the length of the block of l'§ on T 1 is
                  reaches the end of both            3¢, then the number of l's which must be
                  blocks of l's simul-               copied on T2 is 3~ + i or 3~ + 2,
                  taneously, the blocks              depending on whether T 3 is scanning a O
                  were of equal lengths,             or a i.
                  and hence the proper     .
                  quadruple has oeen xounu.
                                                         qslOO12q13      If T 3 is scanning a O,
                  T 2 is moved to the right                            print a single 1 on T 2
                  to put a space between                               before going into staNe
                  the block which has just                             ql3 to begin copying
                  been used and the next                               from T1.
                  block that will be printed.

                                                53
       q810iI2q12   If T~ is scanning a i,           relay circuit, it would be possible to
                  print ~wo l's on Tp                build a working model of this machine
      q12111R2q15 before going into ~tate            using perhaps twenty or twenty-five re-
                  ql9 to begin copying               lays. These figures are mentioned
      qlSe0el2ql3 frdm T 1.                          since t~.e number of relays is frequently
                                                     used as a measure of the complexity of
      q13118R2q14     Each time this cycle           a logical machine, and would enable
                   of three steps is gone            comparisons to be made between this and
      ql~lOSRlql 5 through, the machine              actual digital computers.
                   copies a single 1 from
      qlse0el2ql 3 T 1 to T2, and steps                  This estimated number of relays is
                   aAong both tapes to the           intended to be sufficiently generous to
                   next position.                    permit the relay realization of this
                                                     machine to include the solution of
       q130ieL2q4     When the Turing machine        se,reral circuit problems. First, the
                    reaches the end of the           complexity of the relay sec~encing
                    block of l's on T I the          required will probably prohibit many of
                    copying is completed.            the possible relay combinations from
                    The tapes must now be            being useable. Second, the digits being
                    prepared for the opera-          read on each tape must be used in many
                    tions in Part A, by              parts of the circuit, sr~d hence extra
                    moving back toward the           relays to follow these digits may be
                    beginning of the block           required, and finally, since while
                    on T2, and entering the          the tape is in motion the information as
                    cycle of Part A at               to the present-determinant is unreadable,
                    the appropriate point.           it may be necessary to insert extra
                                                     states (not in the logical description
7.    Physical Rea!izability                         given) to record each determinant.

     If it were desired to build a work-
ing model of the machine just described,
standard teletype tape equipment could               8.   Conclusion
not be used, since it does not have the
properties assumed. A punch which would
be able to operate on tape moving in                      This machine indicates that very
either direction, and to read from the               complicated logical processes can be
same line that it is in a position to                done using a fairly small number of
punch in would be required.                          mechanical or electrical components,
                                                     provided large amounts of a memory
    But since holes in punched tape                  medium are available. With present
cannot be erased once they are punched,              speeds and costs of components, it
in order to make a machine using punched             would not be economically feasible to
tape capable of imitating the behavior               use such a machine to perform compli-
of an ordinary Turing machine which has              cated operations because of the extreme
this erasing property the coding of                  slowness and fairly large amount of
the description of the machine would                 memory required.
have to be in a more complicated fashion.
This has been shown by Shannon (8) to be                  However, with present trends toward
always possible, although his method of              the development of high-speed, elect-
doing it is somewhat complicated.                    ronic logical components, this result
                                                     suggests that it may be possible to
    It sh-,u!d be mentioned, however,                reduce the number of components required
that the properties of the tapes assumed             for logical control purposes, particular-
in Turing machines are very much like                ly if any cheap memory devices are
the properties a~tained by magnetic tapes,           developed.  It would be impossible to
which have erasability, reversibility,               draw any precise conclusions from this
and the ability to use the same reading              extreme example as to the extent to
head for either reading or writing.                  which memory and speed can be traded for
                                                     complexity since no precise quantitative
    If a tape mechanism were available               relations between them have been obtain-
which had the properties assumed and                 ed.
which could be connected directly to




(8)   Unpublished work.


                                                54
                      15-STATE                             UNIVERSAL                             TURING                                  MACHINE
     I~ 00eR          - L,                                                                         _   _            .   .   .   .   .          /COMPARE            BLOCKS
         !       ,   2~_"           IDENTICAL BLOCK H A S                             ' xN~.~.~...~e               Tel ~ ! j ~                        O N T! ~. r 2

             (,~                                                      ,         I            "~,,,e                "2 ~ , ~ - ~
                                                                          slOeRz~ ,                        ~8~K-O~                      ~T/ W A S S H O R T E R




             A                    ! ZERO                   SHORTER             /                 1-/-),,~30,eL2~,~Jl~~, L                                         , ____EJ, I


     l                          THER~'~'~E \
                                                                               /
                                                                               I      MOVETOmGNT
                                                                                                 Y j                                     l k
                                                                                                                                        Io,.O~".o,.l
                                                                                                                                                         K\
                            ~    z ZEROS               ,                      l E N D            OF 8LOCK                               l~'luu°"'~sl           \
             (~9~9'0e                '3~ 8 ~           ~                  ~           .          O N TI   l                                    I                  \
             y              '              -     \.~                ~-........~                            ~.ROCEEDp A S T ZEROS                                    h
                            ,                      '~'-,        r~-                . ~ -          ~1        TO N E X T B L O C K O N T!                    ~          I
     1~900eR'~'oJ                                      LaY I                               ~sOOeR,~s~                                                      I~'z°le Lm~'l'J
              I                 THERE WERE             ~        I                          ' "         I                    COPY             BLOCK                    A
             ,~             , ~ zERos          ,/fl\            i                                      '                ,'Ro,~ ~, TO T~ ~__~                          l-

              +        _                                            --         EXAMIHESYMBOL                                                                                     ,




     I~'o00,e""~"}TH.REW.,~. i .~,o,,=,~,=,                                                o..3                                         L~,@°2'=~,,L!~,,"e",~,*l




                                                                              Figure 1




                       SIMPLE                  LEARNING                        BY A DIGITAL                                               COMPUTER


                                                             The Computation Laboratory
                                                                  Harvard University


1.   Introduction                                                                                             Techniques                    of this      type may have

         Digital       comouters       can readily be                                             some value                    for those who,               like psy-

programmed           to exhibit modes            of behavior                                      chologists                and neurophysiologists,                             are

which are usually                 associated       only wlth                                      interested                In the potentialities                          of

the ne2vous           systems       of living          organisms.                                 existing         digital                    computers        as models             of

Thls paper describes                 a concrete             example                               the structure                          and of the functions                   of

of one practical                 technique     by which         the                               animal        nervous                    systems.        The description

Electronic           Delay Storage         Automatic                                              will be given                          In two stages.               In the

Calculator           (EDSAC)       of the University                                              first stage                       (Section 2) the behavior                         of

~athematlcal           Laboratory,         Cambridge,           was                               the EDSAC under                           the control           of a re-

made capable           of modifying            its behavior                                       s
                                                                                                  o_~.~         learning                    program will be presented

on the basis           of experience            acquired        In                                from the point of view of an experlmenter

the course           of operation.                                                                who can control                           the input of the machine

                                                                                     55

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:13
posted:8/24/2011
language:English
pages:6