You are on page 1of 6

D. G.

B O B R O W , E d i t o r
Flow Diagrams, Turing Machines
And Languages With Only Two
Formation Rules
CORRADO ]~JHM AND GIUSEPPE JACOPINI
International Computation Centre and Istituto Nazionale
per le Applicazioni del Calcolo, Roma, Italy
In the first part of the paper , flow di agrams are introduced
to represent inter ah mappings of a set into itself. Although
not every di agram is decomposable into a finite numbm of
given base diagrams, this becomes hue at a semantical level
due to a suitable extension of the given set and of the basic
mappings defi ned in it. Two normalization methods of flow
di agrams are given. The first has | hree base diagrams; the
second, only two.
In the second part of the paper , the second method is ap-
pl i ed to ' l he theory of Turing machines. Wi t h ever y Turing
maching provi ded with a t wo- way hal f - t ape, i here is associ-
at ed a similar machine, doing essentially ' l he same job, but
working on a t ape obt ai ned from the first one by interspersing
al t ernat e bl ank squares. The new machine belongs to the
family, elsewhere introduced, generat ed by composition and
iteration from the two machines X and R. That fami l y is a
proper subfamily of the whole fami l y of Turing machines.
1. I n t r o d u c t i o n a n d S u mma r y
The set of bl ock or flow di agr ams is a t wo-di mensi onal
pr ogr ammi ng l anguage, whi ch was used at t he begi nni ng
of aut omat i c comput i ng and whi ch now still enj oys a
cer t ai n favor. As f ar as is known, a s ys t emat i c t heor y of
t hi s l anguage does not exist. At t he most , t her e are some
paper s by Pet er [1], Gor n [2], He r me s [3], Ci a mpa [4],
Ri guet [5], I a n o v [6], Asser [7], where flow di agr ams are
i nt r oduced wi t h different pur poses and defined in connec-
t i on wi t h t he descri pt i ons of al gor i t hms or pr ogr ams.
This paper was presented as an invited talk at the 1964 Int er-
national Colloquium on Algebraic Linguistics and Automata
Theory, Jerusalem, Israel. Preparation of the manuscript was
supported by National Science Foundation Grant GP-2880.
This work was carried out at the Istituto Nazionale per le
Applicazioni del Calcolo (INAC) in collaboration with the In-
ternational Computation Centre (ICC), under the Italian Con-
siglio Nazionale delle Ricerche (CNR) Research Group No. 22
for 1953-64.
I n t hi s paper, flow di agr ams are i nt r oduced by t he
ost ensi ve met hod; t hi s is done t o avoi d defi ni t i ons whi ch
cer t ai nl y woul d not be of much use. I n t he first pa r t
( wr i t t en by G. Jacopi ni ) , met hods of nor mal i zat i on of
di agr ams are st udi ed, whi ch allow t he m t o be decomposed
i nt o base di agr ams of t hr ee t ypes (fi rst resul t ) or of t wo
t ypes (second r esul t ) . I n t he second pa r t of t he paper ( by
C. BShm) , some resul t s of a pr evi ous paper are r epor t ed
[8] and t he resul t s of t he first pa r t of t hi s paper are t hen
used t o pr ove t ha t ever y Tur i ng machi ne is reduci bl e into,
or in a det ernfi ned sense is equi val ent to, a pr ogr a m
wr i t t en in a l anguage whi ch admi t s as f or mat i on rules
onl y composi t i on and i t erat i on.
2. No r ma l i z a t i o n o f Fl o w Di a g r a ms
I t is a wel l - known f act t ha t a flow dai gr am is sui t abl e
for r epr esent i ng pr ogr ams, comput er s, Tur i ng machi nes,
etc. Di agr ams are usual l y composed of boxes mut ua l l y
connect ed by ori ent ed lines. The boxes are of f unct i onal
t ype (see Fi gur e 1) when t hey r epr esent el ement ar y oper a-
t i ons t o be carri ed out on an unspeci fi ed obj ect x of a
set X, t he f or mer of whi ch ma y be i magi ned concr et el y
as t he set of t he di gi t s cont ai ned in t he me mo r y of a
comput er , t he t ape confi gurat i on of a Tur i ng machi ne,
etc. Ther e are ot her boxes of pr edi cat i ve t ype (see Fi gur e
2) whi ch do not oper at e on an obj ect but deci de on t he
next oper at i on t o be carri ed out , accor di ng t o whet her or
not a cer t ai n pr ope r t y of x E X occurs. Exampl es of
di agr ams are: Z(c~, 8, % a, b, c) [Figure 3] and
~5(c~, ~, , , ~, E, a, b, c, d, e) [see Fi gur e 4]. I t is eas y t o see
a difference bet ween t hem. I nsi de t he di agr am ~, some
par t s whi ch ma y be consi dered as a di agr am can be iso-
l at ed in such a way
denot e, respect i vel y,
nat ur al t o wr i t e
Z(o~, /~, ~, a, b, c)
t ha t if 11(a, b), a(c~, a) , zX(a, a, b)
t he di agr ams of Fi gur es 5-7, it is
= a( ~ , ~ ( , a ( , , a) , 11(b, c ) ) ) .
Not hi ng of t hi s ki nd can be done for what concerns ~5 ;
t he same happens for t he ent i r e infinite class of si mi l ar
di agr ams
fh[ = ~ ] , f t 2 , ~ a , " " , f t ~ , . . . ,
whose f or mat i on rul e can be easi l y i magi ned.
Let us say t ha t whi l e ~ is decomposabl e accor di ng t o
s ubdi agr ams 1I, ft and A, t he di agr ams of t he t ype ft~ ar e
not decomposabl e. Fr o m t he l ast consi derat i on, whi ch
shoul d be obvi ous t o anyone who t ri es t o i sol at e wi t h a
366 C o mmu n i c a t i o n s o f t h e A C M V o l u me 9 / Nu mb e r 5 / May, 1966
~FLL~
/~Dse
FIGS. 1-2. Functional and predicative boxes
" " . . . . . . . . . . . . . .
FiG. 3. Diagram of
FIG. 4. Diagram of ~5
FIGS. 5-6. Diagrams of II and f~
FIGS. 7-8. Diagrams of A and q,
FIGS. 9-10. Diagram of A and a diagram equivalent to
FIGS. 11-12. Diagrams equivalent to A and
Vol ume 9 / Number 5 / May, 1966
br oken line (as was done for ~) a par t of ~,~ pr ovi ded
wi t h onl y one i nput and one out put , i t follows t ha t :
It is nol possible lo decompose all flow diagrams into a
finite number of given base diagrams.
However , t oget her wi t h t hi s decomposi t i on, t h a t could
be called strong, anot her decomposi t i on ma y be consi dered
whi ch is obt ai ned by oper at i ng on a di agr am equi val ent
t o t he one t o be decomposed ( t ha t is, t he di agr am has t o
express t he same t r ansf or mat i on, wha t e ve r t he meani ng
of t he boxes cont ai ned in i t ma y be) . For i nst ance, i t ma y
be obser ved t ha t if we i nt r oduce ~(c~, a) [as in Fi gur e 8]
and A( a, a) [as in Fi gur e 9] t he di agr ams of ~, A and ~t
become, respect i vel y, equi val ent to Fi gures 10, 11 and 12.
Thus, t he following decomposi t i ons ma y be accept ed:
(a, a) = H( a, ~( a, a ) )
A( a, a) = A( a, ~( a, a) , a)
~( a, a) = A( a, ~( a , a ) ) .
Never t hel ess, i t is t o be reckoned t ha t t he above st at e-
me nt holds even wi t h regard t o t he new wi der concept of
decomposabi l i t y. I n fact , i t does not seem possible 1 for
ever y ~ t o find an equi val ent di agr am whi ch does not
cont ai n, as a subpr ogr am, anot her ~t= or an ~t of hi gher
order. For i nst ance, not e t ha t
~a(c~, 13, % a, b, c) = A( a, H( a, ~t3(j3, % a, b, c, a ) )
= ~ 8 (~, ~ , % ~, ~ , % a, b , c, a, b , c)
and si mi l ar f or mul as hol d for all orders of ~.
The pr oved unf easi bi l i t y is ci r cumvent ed if a new predi -
care is added and if, among t he el ement ar y operat i ons,
some are assumed whi ch ei t her add one bi t of i nf or mat i on
t o t he obj ect of t he comput at i on or r emove one f r om it.
The ext r a bi t s have a st ack s t r uct ur e ( f or mal l y descri bed
below as nest ed ordered pai r s) since i t is sufficient t o
oper at e a nd/ or t ake decisions onl y on t he t opmos t bi t .
Ther ef or e, t hr ee new f unct i onal boxes denot ed by T,
F, K, and a new pr edi cat i ve box ~ are i nt roduced. The
effect of t he first t wo boxes is t o t r ans f or m t he obj ect x
i nt o t he or der ed pai r (v, x) where v can have onl y t he
val ues t ( t r ue) or f ( f al se) ; mor e precisely,
x r >( t , x ) , x r ( f , x ) , ( t , x ) T > ( t , ( t , x) )
and so on. Box K t akes out f r om an or der ed pai r i t s second
component
( v, x) K> z, ( t , ( f, ( t , x) ) ) K> ( f, ( t , x) ) .
The pr edi cat e oo is defined as
~ [ ( v, x) ] = t ~ v= t ,
i.e., t he pr edi cat e o0 is veri fi ed or not accordi ng t o whet her
t he first component of t he pai r is T or F; w and K are
defined onl y on a pai r ; on t he cont r ar y, all t he boxes
1 We did not, however, succeed in finding a plain and sufficiently
rigorous proof of this.
Communi cat i ons of t he ACM 367
a, ~, ~, . . . , a, b, c, . . . oper at i ng on x are not defined on
a pai r. The following s t a t e me nt hol ds:
I f a mappi ng x --~ x' is representable by any f l ow di a-
gram cont ai ni ng a, b, c, . . . , a, [~, % . . . , it is also repre-
senlable by a fl ow di agram decomposable i nt o H, and A
and cont ai ni ng the same boxes whi ch occurred i n the i ni t i al
di agrams, pl us the boxes K, T, F and o~.
Th a t is to say, i t is descri babl e by a f or mul a in II, q%A,
a , b , c, - . . , T, F , K, o~, ~ , % . . . , ~.
NOTE. A bi nar y swi t ch is t he mos t nat ur al i nt e r pr e t a t i on of
t he added bi t v. I t is t o be obser ved, however , t ha t in cer t ai n
cases if t he obj ect x can be gi ven t he pr oper t y of a l i st , any ext en-
sion of t he set X becomes superfl uous. For exampl e, suppose t he
obj ect of t he comput at i on is any i nt eger x. Oper at i ons T, F, K
may be defi ned in a pur el y ar i t hmet i c way:
x ) 2x + 1, x ) 2x, x )
and t he oddi t y pr edi cat e may be chosen for ~. The added or can-
celed bi t v emer ges onl y if x is t hought of as wr i t t e n in t he bi na r y
not at i on s ys t em and if t he act i ons of T, F, K, r espect i vel y, are
i nt er pr et ed as appendi ng a one or a zero to t he f ar r i ght or to erase
t he r i ght mos t di gi t .
To pr ove t hi s s t at ement , obser ve t ha t any flow di agr am
ma y be i ncl uded in one of t he t hr ee t ypes : I (Fi gure 13),
I I ( Fi gur e 14), I I I ( Fi gur e 15), where, inside t he sect i on
lines, one mus t i magi ne a pa r t of t he di agr am, in wha t e ve r
way bui l t , t ha t is called a or (B ( not a s ubdi agr am) . The
br anches ma r ke d 1 and 2 ma y not al ways bot h be pres-
ent ; nevert hel ess, f r om ever y sect i on line at l east one
br anch nms t st ar t .
As for t he di agr ams of t ypes I and I I , if t he di agr ams
in Fi gur es 16-17, are called A and B, 2 respect i vel y, I
t ur ns i nt o Fi gur e 20 and ma y be wr i t t en
I I ( I I ( T, ~(o~, H( I I ( K, a) , A) ) ) , K)
and I I t ur ns i nt o Fi gur e 21, whi ch ma y be wr i t t en
I I ( I I ( T, (o0, H( K, A( a, A, B) ) ) ) , K) .
The case of t he di agr am of t ype I I I ( Fi gur e 15) ma y be
deal t wi t h as case I I by subst i t ut i ng Fi gur e 22, wher e B'
i ndi cat es t h a t s ubpar t of C accessible f r om t he uppe r
ent r ance, and C" t ha t pa r t accessible f r om t he l ower
ent r ance.
I f it is assumed t ha t A and B are, by i nduct i ve hypot h-
esis, 3 r epr esent abl e in H, and A, t hen t he s t a t e me nt is
demons t r at ed.
I t is t hus pr oved possi bl e t o compl et el y descri be a pr o-
gr am by means of a f or mul a cont ai ni ng t he names of
di agr ams ,-I,, I I and A. I t can also be obser ved t ha t [t, I I
and A could be chosen, since t he r eader has seen (see
If one of t he br anches 1 or 2 is mi ssi ng, A will be si mpl y Fi gur e
18a or 18b, and si mi l ar l y for B. If t he di agr am is of t he t ype of
Fi gur e 19 wher e V {E} (T, F) , i t will be si mpl y t r a ns l a t e d i nt o
II(V, A*) wher e A* is t he whol e s ubdi agr am r epr es ent ed by (~.
3 The i nduct i on r eal l y oper at es on t he number 3N + M, wher e
M is t he number of boxes T and F in t he di agr am and N is t he num-
ber of all boxes of a,ay ot her ki nd ( pr edi cat es i ncl uded) .
Fm. 13.
l . l z .
St r uct ur e of a t ype I di agr am
2
.. _ .
: " 7
: I
.
Fm. 14. St r uct ur e of a t ype I I di a gr a m
12
. ' "%
- - - - - - ~.
/ ]
~.. . . , '
FIG. 15. St r uct ur e of a t ype I I I di agr am
" ' . . . . . . . . . . . . . . . . ' "
FIG. 16. A- di a gr a m F1G. 17. B- di agr am
. . . . . . . . . . . . . . " .
.~q , _ _ z o4 :
, . . . . . . . . . . . . . . - " ' . . . . . . . . . . . . . 3
FIG. 18a-b. Two speci al cases of t he A- di a gr a m
FIG. 19.
..." - . .
Di a gr a m r educi bl e t o H( V, A*)
FiG. 20. Nor mal i zat i on of a t ype I di agr am
368 Co mmu n i c a t i o n s o f t i l e ACM Vo l u me 9 / Nu mb e r 5 / Ma y, 1966
FIG. 21. Normalization of a type I I diagram
..].2
........ . . . . . . ....%
~( ~
. : . . . . . . . . . . S
" ... . . . . . . . . . "
FIG. 23. The diagram _~
FIG. 22. Normalization of a type I I I diagram
FIG. 24. Transformation of ~(o~, X, Y)
f or mul a a nd Fi gur e 10) t h a t ,I~ can be expressed usi ng
and 11. Mor eover , it is obs er ved t h a t t he pr edi cat e oa
occur s onl y as t he first a r g u me n t of q, (or, if desi red, of
~) and all t he ot her s as a r gume nt s of a : q,(~0, X) a nd
~(a, X, Y), etc.
No w l et us defi ne f or ever y pr edi cat i ve box a, fl, . . .
a new f unct i onal box a, fl, - - wi t h t he f ol l owi ng me a ni ng:
a ~ k ( a , III(T, F) , I I ( F, T) ) ( Fi gur e 23)
Thi s simplifies t he l anguage. I n f act , a n y k(c~, X, Y) can
be r epl aced b y (see al so Fi gur e 24) :
1Fi(a, I I ( ~( w, I I ( K, H( K, H( X, H( T, T ) ) ) ) ) ,
n( K, ~ ( ~ ( ~ , ~ ( K, ~ ( Y , T) ) ) , g ) ) ) ) .
The n we can s i mpl y wr i t e:
III(X, Y) ~ X Y ,
I I ( I I ( X, Y), Z) = i I ( X, II(Y, Z)) =-- X Y Z ,
owi ng t o t he obvi ous as s oci at i vi t y of H. We ma y al so
wr i t e :4
~(~0, x ) _-- ( x ) .
4 The same notation is followed here as in [8].
To s um u p : e ve r y flow di a gr a m wher e t he oper at i ons
a, b, c, - . . a nd t he pr edi cat es a, ~, 3' " ' " occur can be
wr i t t e n b y me a ns of a s t r i ng wher e s ymbol s of oper at i ons
a, b, c, - . - , a, t3, 3`, " ' " , T, F, K a nd par ent hes es ( , )
appear . Fo r exampl e:
H( a, b) = ab
(5) ~(a, a) = .~K(Ka~K)K
(5) !,(a, a) = F(Ka~K)K
A( a, a, b) = y ( KKa T T ) K( KbT ) K
(5) A( a, a) = o~K(KaT)K
( 5 ) ~ 2 ( a , fl, a, b )
= F(K, ~(KTT)K(Kaf l (KTT)K(KbFT))K)K.
m
Mor e abs t r act l y, t he ma i n r esul t can be s umma r i z e d
as follows. Le t
i X be a set of obj ect s x
a set of u n a r y pr edi cat es c, fl, . . . defi ned i n X
0 a set of ma ppi ngs a, b, . . . f r om X t o X
~D(~, O) t he class of all ma ppi ngs f r om X t o X descri b-
abl e b y me a ns of fl ow di agr ams cont ai ni ng boxes
bel ongi ng t o U O.
Y t he set of obj ect s y def i ned by i nduc t i on as fol l ows:
E Y~ ( t , y ) E Y, ( f , y) C Y ( 1)
oo a pr edi cat e, defi ned i n Y ( at l east on Y - - X) b y
{
~ ( t , x) = t
~(f, x) f
T, F t wo ma ppi ngs defi ned on Y b y
K
T[y] = (t, y)
F[y] = (f, y)
a ma p p i n g defi ned i n Y b y
K[ ( t , y)] = K[ ( f , y)] = y
X a set of ma ppi ngs a_, Ld, " ' " def i ned on X, wi t h val ues
i n Y as fol l ows:
~ tx] = - .~ tx], (six], z) (2)
etc.
Now, gi ven a set Z of obj ect s z, a set Q of ma ppi ngs
f r om Z t o Z, a nd one u n a r y pr edi cat e ~- defi ned i n Z, l et
us r ecur si vel y defi ne f or ever y q C Q a new ma p p i n g
~(q), wr i t t e n s i mpl y (q) if no mi s unde r s t a ndi ng occurs, as
5 These fornmlas have not been obtained using the general
method as described. The application of t hat method would make
the formula even more cumbersome.
Vol ume 9 / Number 5 / May, 1966 Communi c a t i ons of t he ACM 369
follows:
~ [ z ] - ~ ( q ) [ z ] = z
~Ir[z] --~ (q)[z] (q)[q[z]].
For ever y q~, q2 E Q, l et us call qlq2 t he mappi ng defined
by qlq2[z] = q2[ql[z]]. Let us call 8(7r, Q) t he class of map-
pings f r om Z t o Z defined by i nduct i on as follows:
Q c 8(~', Q)
q ~ 8 ( ~ - , Q) ~ (q) C 8(~r, Q)
q ~E 8( ~ - , Q) , q 2E 8( ~ - , Q ) ~ q , q : ~ 8(Tr, Q) .
Not e t he following useful propert i es of 8:
Q1 c Q2--~ 8(7r, Q1) c 8(~-, Q2) (3)
Q: ~ 8(~-, 01) --~ 8(~-, 01 t.J Q2) = 8(~r, Q1)- (4)
The meani ng of t he l ast s t at ement can easily be r ewr i t t en:
~(, I, , O) c 8(oo, 0 U, I , O {T, F, K}) . (5)
3. Appl i c at i ons t o t he Theory o f Tur i ng Ma c hi ne s
I n a previ ous paper [8], a pr ogr ammi ng l anguage 6 ~' was
i nt r oduced which described, in a sense specified in t ha t
paper, t he fanfi]y 63' of Tur i ng machi nes for a ( l ef t war d)
infinite t ape and any finite al phabet {ci, c2, . . . , Ca} U
{ []}, where n ~ 1, [] is t he symbol for t he bl ank square
on t he t ape. Using t he not at i on of Sect i on 2 (see Not e) ,
63' ~ ~( {a}, {h, R}) (6)
where
a is t he una r y pr edi cat e t r ue iff t he square act ual l y
scanned ( by t he Tur i ng machi ne head) is bl ank
(i.e. cont ai ns [] ) ;
h is t he oper at i on of replacing t he scanned symbol c~
wi t h c~+1 (Co ~ c=+~ ~ [] ) and shifting t he head
one square t o t he l eft ;
R is t he oper at i on of shi ft i ng t he head one square, if
any, t o t he ri ght .
Briefly, a is a predi cat e, h and R are par t i al l y defi ned
f unct i ons s in t he set X of t ape configurations. By " t a pe
conf i gur at i on" of a Tur i ng machi ne is meant t he cont ent
of t he t ape plus t he i ndi cat i on of t he square bei ng
scanned by t he machi ne head.
E x a mp l e . I f t he confi gurat i on ( at a cer t ai n t i me) is
x ~ . . . [ ] [ ] Cx C~ Cn ,
t hen
~ [ z ] - = f , h[x] --= . . . [] [] O[] Cn , R[x] - ~ " " " [ ] []ClCnC n
where t he under scor e i ndi cat es t he scanned square. I n
[8] a l anguage (p" (descri bi ng a pr oper subf ami l y of Tur i ng
machi nes) has been shown. I t was defi ned as follows.
( i ) h, R E ~" (Axi om of At omi c Operat i ons)
( i f ) q~, q2 E (e" implies qlq2 E (P"
( Composi t i on Rul e)
s F o r mor e de t a i l s , see [8, 9].
( i i i ) q E (P" implies (q) E (P" ( I t er at i on Rul e)
( i v) Onl y t he expressions t ha t can be der i ved f r om ( i ) ,
( i i ) and ( i i i ) bel ong t o (P".
I nt er pr et i ng ql , q2 as funct i ons f r om X t o X , qlq2 can be
i nt er pr et ed as t he composi t i on q2 o q, , i.e.
q~q2[x] --= q2[ql[x]] x C X
and (q) can be i nt er pr et ed as t he composi t i on of q wi t h
itself ,n t i mes : q o . . . . q ~ q=, i.e. qn[x] --= q [' " "[q[x]]'" "]
where q[x] = x and n = g~{a[q~[x]] = t}, ~ -> 0, i.e.
(q) is t he mi ni mum power of q (if i t exists) such t ha t t he
scanned square, in t he final confi gurat i on, is [ ] .
Fr om t he poi nt of vi ew of this paper, t he set 63" of t he
confi gurat i on mappi ngs descri bed by ~" is
63" ~- 8( a, {X, R}). (7)
The dr awbacks of (P" as opposed t o (P' are t ha t not all
Tur i ng machi nes ma y be di r ect l y descri bed by means of
(P". For i nst ance, i t was pr oved in [8] t ha t t he oper at i on
H --1 ( per f or med by t he machi ne, whi ch does not hi ng if
t he scanned symbol is di fferent f r om U, and ot herwi se
goes t o t he r i ght unt i l t he first [] is scanned) cannot be
descri bed in (P" ( H -1 C 63").
Nevert hel ess, t he most surprising pr oper t y of (e" is t hat ,
accordi ng t o t he commonest defi ni t i on of " comput i ng" a
f unct i on by a Tur i ng machi ne, ever y par t i al recursi ve
f unct i on f in m ~ 0 vari abl es can be eval uat ed by a pro-
gr am Pf E (P" (see [8]).
Al t hough t hi s l ast pr oper t y enabl es us t o bui l d a one -
one mappi ng ( vi a a gSdelization of t he Tur i ng machi nes)
2f
of (P' in (P , i t is here pr ef er r ed t o find a mor e di r ect
correspondence bet ween Tur i ng machi nes, wi t hout any
reference t o par t i al recursi ve funct i ons. To ever y Tur i ng
machi ne M, l et us associate t he machi ne M* whose initial
( and final) t ape confi gurat i on is obt ai ned by i nt erspersi ng
a bl ank squar e bet ween ever y t wo cont i guous squares of
t he t ape of M. Dur i ng t he comput at i on, t hese auxi l i ar y
squares are used t o record, f r om r i ght t o left, t he val ues
v of t he swi t ch st ack.
5f or e precisely, for ever y confi gurat i on x ~ . . . [ ] u~- . .
UK--1UKUK+I " ' " Um wher e ui C {O, cl , . . . , c=}, l et us
call x* t he confi gurat i on
:g
x ~ " " [ ] [ ] [ ] u l ' " [ ~UK- - ~[ ] UKOU~+I " ' " O U m.
I f M desi gnat es t he Tur i ng machi ne whi ch when appl i ed 7
t o confi gurat i on b gives e as t he final confi gurat i on, i.e. if
M[b] = e, t hen M* is a machi ne such t ha t M*[b*] = e*.
' M* 63" We want t o pr ove: M C 6 3 , ~ E .
Taki ng advant age of t he t heor em ( 5) , we ma y wr i t e
6 3 ' c 8 ( w, {~ , R, a , T , F , K}) . (8)
Fol l owi ng t he defi ni t i on (1) of Y, t he mappi ng x --+ x*
7 Fo r s i mp l i c i t y , as i n (6), Tu r i n g ma c h i n e s a n d c onf i gur a t i on
ma p p i n g s wi l l be i de nt i f i e d.
370 C o mmu n i c a t i o n s o f t h e AC M V o l u me 9 / Nu mb e r 5 / Ma y , 1966
i s now e x t e n d e d t o a ma p p i n g y ~ y* as f ol l ows :
i f y* ~ . . . [ ] UK_ i [ _ 2 ] UK. . .
( t , y ) * ~- " ' ' [ DUK- - ~DUK " " , ( 9)
( f , Y ) * ~ " ' ' DU ~ - - l Cl U K' ' "
Obvi ous l y,
M C ~ M ~ ~ ( ~ , [ h , R , a , T , F , K } )
a n d t he r e f or e
M* C ~' * ~ ~l* C ~(o0", {x*, R*, c~*, T*, F*, K*} ).
I t is onl y ne c e s s a r y t o p r o v e t h a t
~( ~*, {X*, R*, a*, T*, F*, K*}) c ~( a, {h, R}) .
Fi r s t , obs e r ve t h a t f or e v e r y ma c h i n e Z* ~ ~(o0", {. . . }) ,
' ' (Z *) ------ R " ( L Z * R ) L ,
whe r e L ~ [XR]~X is t he o p e r a t i o n of s hi f t i ng t h e h e a d
one s qua r e t o t h e l ef t , ha s be e n p r o v e d ; t her ef or e,
~(~*, {. . . }) c 8(~, {. . . } U {x, R}).
Se c ondl y, i t c a n be e a s i l y c he c ke d t h a t
IX*, R*, T*, F*, K* / c g ( a , {X, R/ ) .
I n f act ,
X* = XL, R* = R 2, T* = L 2,
F* = Lh, K* = R ( h R ) R .
Ac c or di ng t o ( 4) , i t ha s be e n p r o v e d t h a t
s(~*, {. . . }) c s(~, {~*, x, R}).
Th i r d l y ,
*
~ ~ ( ~ , {x, R}) .
F r o m f o r mu l a ( 2) a nd t h e c o n v e n t i o n ( 9) i t mu s t f ol l ow
t h a t :
_~*[. . . ~ u ~ [ ~ u ~ . . . ] . . . . [ ~ u ~ c ~ u ~ [ ~ . . . ( 10)
a *[ . . . [ ~ u ~ u l ~ c . . . ] . . . . Du ~ u ~ c ~ c . . . ( 11)
wh e r e u , , u ~ ~ {~ , c ~ , . . . , c ~ } a n d c ~ {c ~ . . . , c ~ }.
I n or de r t o i mp l e me n t a*, t h e p r o g r a m LSh [ whi ch
me e t s c ondi t i ons ( 10) ] mu s t be me r g e d wi t h L h L ~ [ whi ch
me e t s ( 11) ] . A s ol ut i on s c a n be wr i t t e n i n t h e f or m
c~* -= L' ~R~( X ) L ~ ( Y ) R
whi c h obvi ous l y sat i sf i es ( 10) . Th e p r o g r a m ( X) c a n be
chos en ma i n l y t o c opy t h e s y mb o l c on t h e f i r st f r ee b l a n k
s qua r e ; t h e p r o g r a m ( Y) , t o execut e t he i nve r s e ope r a -
t i on, i . e. ,
( X) [ . [~U~ClU~DC. . . ] . . . . c u ~ u ~ c ~ . . .
( Y) [ . . . c u ~ [ 2u ~ c ~ . . . ] . . . . ~ u ~ u ~ c ~ c . . .
s The aut hors are i ndebt ed to the referee for this solution, which
is short er and more el egant t han theirs.
I t i s not di f f i cul t t o t e s t t h a t t h e choi ce
( X ) ~ ( r ' L ( X R ) X L ( ~ R ) L 2X R 6 ) ,
( Y ) -~ (r' RS ~L4),
whe r e r' ~ [XR] n, gi ve s t h e de s i r e d s ol ut i on.
RECEIVED NOVEMBER, 1965
REFERENCES
1. PETER, R. Graphschemat a und rekursi ve Funkt i onen.
Dialectica 12 (1958), 373-393.
2. Goa s , S. Specification languages for mechanical languages
and t hei r processors. Comm. ACM. $, (Dec. 1961), 532-542.
3. HERMES, H. Aufzghlbarkeit, Entscheidbarkeit, Berechen-
barkeit. Springer Verlag, Berlin, 1961.
4. CIAMPA, S. Un' appl i cazi one della t eori a dei graft. At l i del
Convegno Nazionale di Logica, Torino 5-7 (April 1961), 73-80.
5. RIGUET, J. Programmat i on et th~orie des categories. Proc.
I CC Syrup. S ymbolic Languages i n Data Processing, Gordon
and Breach, New York, 1962, 83-98.
6. IANOV, Yu, I. On the equivalence and t ransformat i on of
program schemes. Dokl. Akad. Nauk S S S R 113, (1957),
39--42. (Russian).
7. ASSER, G. Funct i onal al gori t hms and graph schema. Z.
Math. Logik u. Grundlagen Math., 7, (1961), 20--27.
8. BiJtfM, C. On a fami l y of Turi ng machines and the rel at ed
programming language. I CC Bul l . 3, (July 1964), 187-194.
9. B~HM, C., JACOPINI, G. Nuove tecniche di progrummazione
semplificanti l a sintesi di macchine universuli di Turi ng.
Rend. Acc. Naz. Li ncei {8}, 32, (June 1962), 913-922.
LETTERS--cont' d f rom page 3 2 3
On 0 a n d O
EDITOR:
I n readi ng t he l et t er by Mr. Tur ner [On the Confusion Between
"0" and " 0" , Comm. ACM 9, 1 (Jan. 1966), 35], I notice t hat his
redefinition of t he ALGOL (identifier) fails t o allow those such as
"012ABC", which cont ai n a di gi t i mmedi at el y aft er t he zero. I t
seems t hat such a combi nat i on of charact ers will pose no maj or
recogni t i on problems, and should be allowed, provi di ng onl y t hat
i t contains a l et t er somewhere, ot her t han t he i ni t i al " 0" , which
may l ogi cal l y be t aken as a l et t er or a di gi t .
I t herefore offer an addi t i on t o Mr. Tur ner ' s redefi ni t i on:
(identifier) : : = <letter>l<identifier>(letter>[<identifier>(digit> I
0<identifier>] 0(unsigned integer>(letter)
I personal l y have avoided most of t he confusion bet ween t he
two charact ers by at t empt i ng never t o use ei t her charact er i n
mnemonic symbols unless i t has some mnemonic significance and
i t is difficult t o t ake i t to be t he other. There are, however, some
si t uat i ons which are beyond t he cont rol of the programmer, but
wi t h which we are made t o l i ve; two of these are t he FORTRAN
i nt ernal funct i ons, MAXOF and MINOF. For si t uat i ons such as
these, Mr. Tur ner ' s sol ut i on seems somewhat appr opr i at e.
MICHAEL a. PERSHING
Department of Computer S cience
University of Il l i noi s
Urbana, Il l i noi s 61808
Vol ume 9 / Nu mb e r 5 / May, 1966 Co mmu n i c a t i o n s of t h e ACM 371

You might also like