8
GROUP LANGUAGES A. V. Anisimov UDC 51 : 621.391 Any group G with n generatrices xi, x2, .... x n can be assigned as a homomorphic image of a free semigroup in the alphabet E ={x l, x 2..... Xn, xt'1 , x~l ..... x~l}. Let ~0 be this homomorphism Y* -+ 6 and let 9~q ~ Ker % By assigning the group G with the aid of defining relations, we completely determine the set 97~.. It is welI known that if G is finitely defined, then 97~ will be recursively enumerable and hence it will be a language of type 0 {see, for example, [1]). We shall say that the language Y/: specifies the group G. Any language ~ in an alphabet E that specifies a group in the above sense will be called a group language. In this paper we shall study regular and context-free group languages. The properties of such lan- guages are closely linked to the properties of the groups specified by them; for this reason their study reduces to an investigation of the corresponding groups. It is proved that the class of groups specified by regular languages coincides with the class of finite groups. In the context-free case it was possible to fully describe only the class of abelian groups. Let us note that group languages offer numerous examples of various types of languages on which it is convenient to verify the general assertions, Suppose that a semigroup II is specified by the generatrices xl, x 2 ..... x n and the defining relations A~=B 1, i=1,2 ..... m. (1) An elementary transformation of the semigroup II is a transition from a word of the form XAiY to a word XBiY or conversely, where X and Y are words of the semigroup II, and Ai=B i is one of the defining rela- tions (1). Elementary transformations are expressed by the schemes XA~Y ~ XB~Y, XBy -+ X A y . The relations (1) define the equality of words in the semigroup II. The words X and Y of a semigroup II are equal in H if and only if there exists a sequence of elementary transformations X + X,--+ .... Xk ~ Y that carries the word X into the word Y. A group G with generatrices x 1..... x n is defined as a semigroup specified by an alphabet E = {x 1, .... Xn, x]i ..... x~ 1} and a system of defining relations A~ 1, i= 1,2 .... ,m; xixT~= 1, (2) xT.'x i= 1, ]--- 1,2 ..... tz. A free semigroup in the alphabet E will be denote by E*. An equality relation defines a congruence p on E* - XpY if and only if X= Y in 17, Hence there exists a natural homomorphism of E* onto the group G. It is evident that this homomorphism can be realized through the free group generated by the set X={x 1, x 2..... Xn}. Let 7R = Ker~, 92I be a language in the alphabet Y,, since a language is by definition any subset Translated from Kibernetika, No. 4, pp. 18-24, July-August, 197 1. Original article submitted August 25, 1970, t974 Consultants Bureau, a division of Plenum Publishing Corporation, 227 g'est 17th Street, New York, N. Y. 10011. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, microfilming, recording or otherwise, without written permission of the publisher. A copy of this article is available from the publisher for $15.00. 594

Group languages

Embed Size (px)

Citation preview

Page 1: Group languages

G R O U P L A N G U A G E S

A . V . A n i s i m o v UDC 51 : 621.391

Any g r o u p G with n g e n e r a t r i c e s xi , x2, . . . . x n can be a s s i g n e d as a h o m o m o r p h i c i m a g e of a f r e e

s e m i g r o u p in the a l p h a b e t E = { x l , x 2 . . . . . Xn, x t '1 , x~l . . . . . x~l}. L e t ~0 b e th i s h o m o m o r p h i s m Y* -+ 6

and l e t 9~q ~ Ker % By a s s i g n i n g the g roup G with the a id of de f in ing r e l a t i o n s , we c o m p l e t e l y d e t e r m i n e the s e t 97~.. I t i s we l I known tha t i f G i s f i n i t e ly def ined , then 97~ wi l l b e r e c u r s i v e l y e n u m e r a b l e and h e n c e i t w i l l b e a l a n g u a g e of type 0 {see, fo r e x a m p l e , [1]). We s h a l l s a y tha t the l a n g u a g e Y/: s p e c i f i e s the g roup G.

Any l a n g u a g e ~ in an a l p h a b e t E tha t s p e c i f i e s a g roup in the above s e n s e wi l l b e c a l l e d a g roup language.

In this paper we shall study regular and context-free group languages. The properties of such lan- guages are closely linked to the properties of the groups specified by them; for this reason their study reduces to an investigation of the corresponding groups.

It is proved that the class of groups specified by regular languages coincides with the class of finite groups. In the context-free case it was possible to fully describe only the class of abelian groups.

Let us note that group languages offer numerous examples of various types of languages on which it is convenient to verify the general assertions,

Suppose that a semigroup II is specified by the generatrices xl, x 2 . . . . . x n and the defining relations

A ~ = B 1, i = 1 , 2 . . . . . m. (1)

An e l e m e n t a r y t r a n s f o r m a t i o n o f the s e m i g r o u p II i s a t r a n s i t i o n f r o m a w o r d of the f o r m XAiY to a w o r d XBiY o r c o n v e r s e l y , w h e r e X and Y a r e w o r d s of t he s e m i g r o u p I I , and A i = B i i s one of the def in ing r e l a - t i ons (1). E l e m e n t a r y t r a n s f o r m a t i o n s a r e e x p r e s s e d by the s c h e m e s

XA~Y ~ XB~Y, X B y -+ X A y .

The r e l a t i o n s (1) def ine the equa l i t y of w o r d s in the s e m i g r o u p II. The w o r d s X and Y of a s e m i g r o u p II a r e equal in H if and only if t h e r e e x i s t s a s e q u e n c e of e l e m e n t a r y t r a n s f o r m a t i o n s

X + X,--+ . . . . Xk ~ Y

tha t c a r r i e s the w o r d X into the w o r d Y.

A g roup G with g e n e r a t r i c e s x 1 . . . . . x n i s de f ined as a s e m i g r o u p s p e c i f i e d by an a l p h a b e t E = {x 1, . . . . Xn, x ] i . . . . . x~ 1} and a s y s t e m of def in ing r e l a t i o n s

A ~ 1, i = 1,2 . . . . ,m;

xixT~= 1, (2)

xT.'x i = 1, ]--- 1,2 . . . . . tz.

A f r e e s e m i g r o u p in the a l p h a b e t E wi l l b e deno t e by E* . An e q u a l i t y r e l a t i o n d e f i n e s a c o n g r u e n c e p on E* - XpY i f and only if X= Y in 17, Hence t h e r e e x i s t s a n a t u r a l h o m o m o r p h i s m of E* onto the g roup G. I t i s ev iden t tha t t h i s h o m o m o r p h i s m can b e r e a l i z e d t h rough the f r e e g roup g e n e r a t e d by the s e t X={x 1, x 2 . . . . . Xn}. L e t 7R = Ker~, 92I b e a l anguage in the a l p h a b e t Y,, s i n c e a l a n g u a g e i s by de f in i t ion any s u b s e t

T r a n s l a t e d f r o m K i b e r n e t i k a , No. 4, pp . 18-24 , J u l y - A u g u s t , 197 1. O r i g i n a l a r t i c l e s u b m i t t e d Augus t

25, 1970,

�9 t974 Consultants Bureau, a division o f Plenum Publishing Corporation, 227 g'est 17th Street, New York, N. Y. 10011. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, microfilming, recording or otherwise, without written permission of the publisher. A copy o f this article is available from the publisher for $15.00.

594

Page 2: Group languages

of Z* . As was no ted above , if G i s f i n i t e l y def ined , then 9:~ wi l l be a l a n g u a g e of type 0. On the b a s i s of the de f in ing r e l a t i o n s (2) i t i s e a s y to c o n s t r u c t a g r a m m a r tha t s p e c i f i e s the l anguage 9 ~ .

Le t F = (Z, N, s , P) be a g r a m m a r , w h e r e E i s a s e t of t e r m i n a l s , N a s e t of n o n t e r m i n a l s , sEN, s an i n i t i a l s y m b o l , and P a r e p r o d u c t i o n s . By L (F) we s h a l l denote the l a n g u a g e g e n e r a t e d by th i s g r a m m a r . We s h a l l s a y tha t a l a n g u a g e L(F) s p e c i f i e s a g roup G i f in the above no ta t i ons "L(F) = ~ . . In such a c a s e the l anguage 9~ i s s a i d to be a g r o u p l anguage .

In the fo l lowing we s h a l l n e e d the concep t of a s t r o n g g roup au toma ton .

L e t G be a g r o u p de f i ned by the a l p h a b e t Z = { x 1 . . . . . Xn, x~ "l . . . . . :~nt}. On the b a s i s of the g r o u p G i t i s p o s s i b l e to c o n s t r u c t a s p e c i a l au toma ton wi thou t ou tputs A G = (Z, G, 5 ). The s t a t e s of A G a r e e l e m e n t s of the g roup G. T h e t r a n s i t i o n func t ion 5 on the a l p h a b e t i s de f ined as fo l lows : 5(g, x i) =g~ 5 (g, x~l) =

go q~(~il), w h e r e q~ i s a n a t u r a l h o m o m o r p h i s m of ~* onto G, and o i s a g roup o p e r a t i o n in G. The func t ion 5 c a n b e con t inued in a n a t u r a l way, o n w o r d s be long ing to E*. A s t r o n g g roup a u t o m a t o n i s no th ing e l s e but an a u t o m a t o n i n t e r p r e t a t i o n of a c o l o r e d C a y l e y g r a p h . A s t r o n g g r o u p au toma ton i s de f ined f o r a r b i t r a r y g r o u p s , not n e c e s s a r i l y f in i te . Some p r o p e r t i e s of s t r o n g g roup a u t o m a t a can be found in [3].

Le t Sg b e a s e t of w o r d s in Z* tha t c a r r y the a u t o m a t o n A G f r o m a s t a t e g in to the s a m e s t a t e g. I t i s e a s y to s e e tha t Sg = 97L fo r gE G.

Now l e t u s s tudy g r o u p s s p e c i f i e d by r e g u l a r l a n g u a g e s .

T H E O R E M 1. Le t ~ ={xl , x 2 . . . . . x n, x~ "l, x~ 1 . . . . . x~ 1} be an a l p h a b e t of the g roup G, l e t the l a n -

guage ~ in the a l p h a b e t ~, s p e c i f y a g r o u p G, i . e . , t h e r e e x i s t s a h o m o m o r p h i s m ~ of Z * onto G, and l e t 9~ = Ker q) . T h e g r o u p G i s f in i t e i f and only i f 9~ i s a r e g u l a r I a n g u a g e . t

P r o o f . I f G i s a f i n i t e g roup , we s h a l l c o n s i d e r a s t r o n g g roup a u t o m a t o n A G. S ince i t i s f in i te , the s e t ~ = Sg w i l l be r e g u l a r .

Now l e t us a s s u m e tha t ~ is a r e g u l a r l anguage . We s h a l l p r o v e a s l i g h t l y m o r e g e n e r a l r e s u l t whence the a s s e r t i o n of the t h e o r e m can b e o b t a i n e d in an obv ious m a n n e r .

I f R i s a r e g u l a r e v e n t and the l a n g u a g e 2R s p e c i f i e s a g roup G and R ~ 9~, , then R wi l l c a r r y any s t a t e g of the a u t o m a t o n A G in to i t s e l f b y u s i n g only a f in i t e n u m b e r of s t a t e s .

Le t us b e g i n with the fo l lowing r e m a r k , t f a r e g u l a r no t a t i on o f the even t R c o n t a i n s {T}, w h e r e T i s a r e g u l a r even t and { } a r e i t e r a t i o n b r a c k e t s , then T ~ . In fac t , l e t p b e a Word b e l o n g i n g to T . S ince ~T} o c c u r s in a r e g u l a r no t a t i on of the even t R, t h e r e e x i s t s a w o r d f i P f 2 E R , w h e r e f i and f2 a r e w o r d s b e l o n g i n g to E*. But in th i s c a s e a l s o the w o r d f l p p f 2 E R . Hence ~( f ip f2)= (p(f lppf2)= 1, s i n c e R C ~ = K e r c p . Let us r e c a l l t ha t q~ deno t e s a n a t u r a l e p i m o r p h i s m of Z* onto G. Hence q~(fl)q~ (p)q~{f2)= (p(fl)q~2(p)q)(f2). A f t e r c a n c e l l a t i o n s (which can be p e r f o r m e d in v i ew of the fac t tha t ~ m a p s E* onto a group) we ob ta in go(p)=1, Where 1 i s the un i t e l e m e n t of the g roup G, and h e n c e p E ~ . S ince p i s a w o r d b e l o n g i n g to T, i t fo l lows tha t T ~ ~

T h e c y c l i c depth of a r e g u l a r e x p r e s s i o n i s de f ined as the m a x i m u m n u m b e r of m u t u a l l y e m b e d d e d p a i r s of i t e r a t i o n b r a c k e t s .

The c y c l i c depth of a r e g u l a r even t i s the m i n i m a l c y c l i c depth o c c u r r i n g in a r e g u l a r no ta t ion of an even t .

The a b o v e a s s e r t i o n wi l l b e p r o v e d by induc t ion on the c y c l i c depth.

Le t us a s s u m e tha t R h a s a c y c l i c depth not g r e a t e r than 1. By u s i n g the d i s t r i b u t i v i t y of m u l t i p l i c a - t ion fo r d i s j u n c t i o n s , i t i s p o s s i b l e to w r i t e R in the f o r m of a union of even t s Ti , R = V T i , w h e r e T i i s

V~ =p~ {R~} P2 {Rz} P3.-- {Rk} Pk+,,

pj a r e w o r d s b e l o n g i n g to E * , a n d R j a r e even t s of depth 0. S ince R ~ , , i t fo l lows tha t a l so T i t T l e , a n d

(as was shown above) Ri ~ ~ , ] = 1,2 . . . . . k , , each R i c a r r y i n g any s t a t e g of a s t r o n g g roup a u t o m a t o n A G in to i t s e l f by u s i n g only a f in i t e n u m b e r of s t a t e s , s i n c e Rj i s a f in i te d i s j u n c t i o n of w o r d s b e l o n g i n g to E*.

t W h e n th i s p a p e r was a l r e a d y in p r i n t , A. A. L e t i c h e v s k i i was so k ind to m a k e the a u t h o r a w a r e of a n o t h e r p r o o f of t h i s t h e o r e m b a s e d on V. M. G l u s h k o v ' s r e s u l t s c o n c e r n i n g a u t o m a t i c p a r t i t i o n s .

595

Page 3: Group languages

It is evident that {R.} likewise ca r r i e s g into i tself without adjoining any new states. The word Pl ca r r i e s g J

into gl after finitely many steps, i.e., in this transit ion the automaton A G can be only in finitely many states, and {R1} ca r r i e s g into i tself by likewise using finitely many states. Under the action of P2 the automaton goes over f rom the state gl into the state g2, with the number of intermediate states remaining finite, etc. Hence follows that T i c a r r i e s any state g into i tself by using only finitely many intermediate states. This reasoning is i l lustrated by the d iagram

Some gj may coincide, but this has no effect on the proof.

Since any T i ca r r i e s g into i tself by using only finitely many states, it is evident that R=VT i will l ikewise c a r r y g into i tself by using finitely many states.

Suppose that the asser t ion is t rue for all regular events with a cyclic depth smal le r than or equal to n, and let R have a cyclic depth n + 1. By using (as above) the distributivity of multiplication with respec t to disjunction, it is possible to express R in the form of a disjunction of finitely many events Ti, R=VTi , where the T i have the fo rm

T~ = Pl {RI} P2 IR2} P~. �9 {Rk} Pk+L'

and the Rj are regular events of cyclic depth not l a rger than n - 1 , j = 1, 2 . . . . . k. By reasoning in the same way as above and by using the induction hypothesis, we find that R ca r r i e s any state g of the automaton A G into i tself by using only finitely many states, and thus we have proved the above asser t ion.

Hence we can see that if ~ is regular , then ~]l will c a r r y any state g into i tself by using only finitely many intermediate states, and this signifies that the automaton A G is finite, since in A G it is pos- sible to ca r ry any state g into i tself by t r avers ing any state. Hence the group G is also finite, which com- pletes the proof of the theorem.

This theorem can be regarded as a cr i ter ion of nonregular i ty of cer tain languages. Let us consider, for example, the g r a m m a r

s = (Y~' s, s, P),

where E ={x l, x 2 . . . . . Xn, x~l I . . . . . ~nl}, and P denotes the following productions:

S - - ~ S

S--> SS

S -+ SXiSX.~Is

--I S ~ SX~ SXiS, i ~ 1 , 2 , . . . . 12.

The symbol ~ will always deno te , lpty word.

The language generated by this g r a m m a r is called Dick' s language and denoted by D2n. It is easy to show that Dick's language specifies a free group of rank n with free genera t r iees xl, x 2 . . . . . x n [4]. In the theory of context-free languages it is well known that the language D2n is not regular . F r o m the point of view of group languages the nonregulari ty of D2n follows directly f rom the infinity of a free group.

Another example: let ~ ={x 1 . . . . . Xn, x[l . . . . . ~nl}, n >1. ~ is a set of words p belonging to ~* such that the sum of the powers with which x i occurs in p is equal to the sum of the powers of x~ in this same word, i= 1, 2, . . . . n. It is easy to show that .~ specifies a factor group of a f ree group of rank n with respec t to its commutator . This group is infinite, and hence the language ~ is not regular . It follows f rom the resul ts obtained below that ~ is not even a context- f ree language.

Now let us study the groups specified by context-free (CF) languages.

As we noted above, in addition to finite groups this class contains also f ree groups of finite rank; however, Theorem 2 shows that this c lass is much wider.

THEOREM 2. The class of groups specified by CF languages is d o s e d under the f ree -produc t oper ation.

596

Page 4: Group languages

P r o o f . Le t G l and G 2 be g r o u p s s p e c i f i e d by the C F g r a m m a r s F = (Z l, N l , s l , P1) and F 2 = (~2, 1~2,

s2, P2)- Le t us c o n s t r u e t a c o n t e x t - f r e e g r a m m a r F~ tha t s p e c i f i e s a f r e e p r o d u c t of g r o u p s G1 and G 2. I t i s a l w a y s p o s s i b l e to a s s u m e tha t t he a l p h a b e t s of the g r o u p s G 1 and G 2 and of the g r a m m a r s F1 and F 2 a r e n o n i n t e r s e c t i n g . Le t s~.z , UZ~UN, U N ~ . If Y i s a w o r d in an a lphabe t , we sha l l def ine Y(s) as a w o r d o b t a i n e d f r o m Y b y i n s e r t i o n s a f t e r e ach l e t t e r and b e f o r e the f i r s t s y m b o l s . F o r e x a m p l e , i f Y= x~ "l �9 x2Nx2, then Y ( s ) = s x i u sx2sNsx2s. Le t us de f ine F ( s ) a s a g r a m m a r o b t a i n e d f r o m F by ad jo in ing t h e s y m b o l s to n o n t e r m i n a l s and r e p l a c i n g a l l the w o r d s Y in the r i g h t - h a n d s i d e s by p r o d u c t i o n s by Y(s) . Le t u s c o n s i d e r the g r a m m a r F~= (ZIU~2, NIUN2Us, P) :

Ir~ (s)

]r~ (~)

S___). SI

S -+ S .

We s h a l l a s s e r t t ha t F~ s p e c i f i e s G 1 * G 2.

Le t ~/~ = L(F1) b e a l a n g u a g e s p e c i f y i n g G1, l e t 9:q~ = L ( [ ~ ) be a l a n g u a g e s p e c i f y i n g G2, and ~/~ a l a n g u a g e in the a l p h a b e t ~lU~,2 t ha t s p e c i f i e s G 1 . Gz.

I t i s ev iden t t ha t L ( F s ) ~ . Now l e t p E ~ . . The p r o o f tha t pEL(F3) wi l l be c a r r i e d out by induc t ion on the length of the w o r d p [ p l . F o r ]pl =0 we h a v e p - - e , and the a s s e r t i o n i s obv ious . L e t us a s s u m e th s t ] p ] ~ 0 and f o r a l l qE~/~ we h a v e ]q]< ] p ] , qEL(F3) . If p E N , , then p=U1,V1U2V 2 . . . UtVt, w h e r e U i 6 ~ ,

V i 6 ~ , i = 1, . . ~ t and the i n t e r n a l w o r d s a r e no t e m p t y . S ince the v a l u e of t he w o r d p i n G 1 * Gzis equa l to 1, i t f o l l ows f r o m the p r o p e r t i e s of a f r e e p r o d u c t tha t t h e r e e x i s t s a t l e a s t one U i o r V i such tha t U i E ~ I o r V i E ~ 2, , and the c o r r e s p o n d i n g U i o r V i i s not e m p t y . We s h a l l a s s u m e , fo r e x a m p l e , t ha t U, 6 ~ , . L e t p ' =U1V l . . . V i _ l V i U i + l V i + 1 . . . UtV t . Le t p ' EgTi and IP' ] < ]P[. By u s i n g t h e i nduc t ion h y p o t h e s i s , we can a s s e r t tha t s==~p'.. I t i s e a s y to s e e tha t i f s==~f,f 2, in F3, then a l s o s=~f,s[ 2 , w h e r e f l and f 2 a r e w o r d s . By u s i n g th i s p r o p e r t y , we f ind tha t i f s=~ U1V 1 . . . V i _ l V i _ l V i U i + l V i + l . . . UtV t , then s=~

U1V 1 . . . V i _ l s v i u i + l V i + l . . . UtVt, and s i n c e s ~ s 1 and s=VU,, then a l so s=~U,V,. . .V~_,UY~.. . UtVt= p.

Hence pE L(F3) , which c o m p l e t e s the p r o o f of the t h e o r e m .

One and the s a m e g r o u p can b e a s s i g n e d in d i f f e r e n t m a n n e r s wi th the a id of g e n e r a t i n g e l e m e n t s and def in ing r e l a t i o n s . I t fo l lows f r o m T h e o r e m 1 tha t i r r e s p e c t i v e of the m a n n e r in which we a s s i g n a f in i t e g roup , the c o r r e s p o n d i n g s e t .~ wi l l r e m a i n a r e g u l a r even t . A s i m i l a r r e s u l t h o l d s fo r g r o u p s s p e c i f i e d by C F l a n g u a g e s .

T H E O R E M 3. The p r o p e r t y of a f i n i t e l y de f ined g roup to be s p e c i f i e d by a C F g r a m m a r does not d e p e n d on the m a n n e r of a s s i g n m e n t of t h i s g roup by g e n e r a t i n g e l e m e n t s and def in ing r e l a t i o n s .

P r o o f . If the g roup G i s a s s i g n e d in the a l p h a b e t ~ ={x 1 . . . . . Xn, x]'ll , . . . . x~} , w(x)E~* and b ~ Z ,

i t i s p o s s i b l e to a s s i g n the g roup G b y the a l p h a b e t Z U b U b - I and by def in ing r e l a t i o n s tha t a r e o b t a i n e d f r o m the p r e v i o u s r e l a t i o n s by a d j o i n i n g the de f in ing r e l a t i o n bw(x) = 1, b b - i = 1, b -~b= 1.

On the o t h e r h a n d i t i s p o s s i b l e to e l i m i n a t e b and b - I f r o m the s y s t e m of g e n e r a t r i c e s if, in add i t i on to the r e l a t i o n s b b - l = 1 and b - l b = 1, b o r b - I o c c u r s only in one def in ing r e l a t i o n of t y p e bw(x)= 1 o r b - l w ( x )

=1. T h i s r e l a t i o n , a s w e l l a s the r e l a t i o n s bb -1= 1 and b - l b = 1, a r e e l i m i n a t e d . Both t h e s e t r a n s f o r - m a t i o n s a r e c a l l e d type -A t r a n s f o r m a t i o n s . The ad jo in ing and the r e m o v a l of the c o n s e q u e n c e s of de f in ing r e l a t i o n s a r e t y p e - B t r a n s f o r m a t i o n s .

The p r o o f of the t h e o r e m i s b a s e d on the fo l lowing w e l l - k n o w n g r o u p - t h e o r e t i c a l t h e o r e m of T i e t z e .

I t i s p o s s i b l e to go o v e r f r o m one m a n n e r of a s s i g n m e n t , by g e n e r a t i n g e l e m e n t s and de f in ing r e l a t i o n s , of a f i n i t e l y de f i ned g roup to a n o t h e r by u s i n g a f in i t e n u m b e r of t r a n s f o r m a t i o n s of t ype A and t y p e B.

I t fo l lows f r o m T i e t z e ' s t h e o r e m tha t fo r p r o v i n g T h e o r e m 3 i t s u f f i c e s to c o n s i d e r the c a s e in which one of the t r a n s f o r m a t i o n s of t ype A o r B t a k e s p l a c e .

Thus l e t ~/~ be a l anguage in the a l p h a b e t ~= {x~ . . . . . Xn, X~ ~ . . . . . x~l}, t ha t a s s i g n s the g roup G, and l e t r be a n a t u r a l h o m o m o r p h i s m of ~ * in to G.

I t i s e v i d e n t t ha t the s e t ~ r e m a i n s u n c h a n g e d in a t y p e - B t r a n s f o r m a t i o n . Suppose tha t we have a t y p e - A t r a n s f o r m a t i o n and tha t the g e n e r a t r i c e s b and b -1 a r e ad jo ined . To the s y s t e m of def in ing r e l a - t i o n s we a d j o i n the r e l a t i o n s bw(x)= 1, b b - ~ = l and b - l b = l . Le t E b = E U b U b -~ and l e t v b e a h o m o m o r p h i s m

597

Page 5: Group languages

of E ~ o n t o E* that is defined as follows" l"{xi)= xi, T(xi-1 ) = x i " l , i= 1, 2, . . . . n; 1- (b) -- w-'l (x) , T(b- i )=w(x) ,

w h e r e w-l(x) is a w o r d i n v e r s e to the w o r d w(x), i .e . , a m i r r o r i m a g e of the w o r d w(x-1). In the a lphabet E b the group G is spec i f i ed by the l anguage 71l~, which is the k e r n e l of the c o r r e s p o n d i n g h o m o m o r p h i s m ~b o It is easy to see that we obtain the fol lowing c o m m u t a t i v e d i a g r a m :

Z~

Hence fol lows that ~?~ ~ Ker~p'~ =~-~(~1l)... Since CF l a n g u a g e s a r e c losed u n d e r the ope ra t ion of takIng the p r e - i m a g e , it fol lows that ~/l~ is l ikewise a CF language .

Suppose that the g e n e r a t r i c e s b and b - I and the r e l a t ions bb-1 = 1, b -~b=l , and bw(x)= 1 a re e l imina ted . Then E ={b, x~ . . . . . Xn, b- i , x~t . . . . . xffl} and let Z~ = E \ {b, b-~/.

Le t us defIne the h o m o m o r p h i s m r : Z * ~ Y~, v(x i) = x i, v (x r l )= x f 1, i= 1, 2 . . . . . n; T(b-1) = W(X),

v(b)=w- l (x ) . Then we have the c o m m u t a t i v e d i a g r a m

r~

In the alphabet E b the group G is spec i f ied by the language ~b = Ker~~ If ~ = Ker% then ~/~b = ~(~) . . Since CF languages a r e c losed unde r the opera t ion of taking h o m o m o r p h i c images , it follows that ~/~b is a C F ' language. This comple t e s the p r o o f of the t h e o r e m .

Now le t us s tudy d i r ec t p r o d u c t s of g roups spec i f ied by languages .

Le t L~t and L 2 be languages In the a lphabets E 1 and •2, and le t ~ 2 i ~ E e = ~ . T h e r e exis ts a na tu r a t

h o m o m o r p h i s m "0: (E1UE2)* ~ E~*x E ~ . We s h a l l define the d i r ec t p roduc t of the l anguages I_~ and L 2 by ~ - l [ ( ~ , L2)] and denote i t b y L l x L2; to r e p h r a s e , the d i r ec t p r o d u c t of the l anguages L t and L 2 is a language obta ined f r o m L 1 - ~ by p e r m u t a t i o n s of e l emen t s of I~ with e l ement s of L 2.

In the fol lowing we shal l need the concept of an n - s t o r e automaton. In this pape r we shal l u se the defini t ion given in [2].

THEOREM 4, Let L i be a l a n g u a g e u n d e r s t o o d b y t h e n - s t o r e au tomaton A 1 and L 2 a language unde r - s tood by the m - s t o r e au tomaton A 2. Then L i x L 2 will be unde r s tood by an n + m - s t o r e au tomaton A 3. If A t and A 2 a r e d e t e r m i n i s t i c au tomata , then A~ will a l so be de t e rmin i s t i c .

P r o o f . Let A, = (~,, Y~,, 5,, a o, Fl, Mli, M12 . . . . . Min t and A2 =(~I2, E2,5~, bo, F~, M21 , M22 . . . . . M2m), w h e r e ~f is the se t of in t e rna l s t a tes , E i the input alphabet , 5 i the t r ans i t i on function, a 0 and b 0 a r e ini t ial s t a tes , and F i the se t of t e r m i n a l s t a tes , i= 1, 2. MIj denotes the s t o r e s of the f i r s t au tomaton, j = 1,2 . . . . . n, and M2j the s t o r e s of A2, ] = 1, 2 . . . . . m. Let us c o n s t r u c t an au tomaton that will be ca l led a d i r ec t p r o d u c t of the au toma ta A 1 and A 2 and denoted by A~ • A~ A, • A~ : (~l~ • ~ , E1U Y'2, 6 3, (e/0, bo), F i x F2, Mll . . . . , Mln , M21 , . . . , M2m). The s t a tes of the au tomaton A l • A 2 a r e e l emen t s o f t h e d i r e e t p r o d u e t o f s e t s ~, • ~2 The input a lphabets a r e combined . The s t o r e s a r e combined and r e m a i n the s a m e .

Le t us a s s u m e at f i r s t tha t the au tomata A l and A 2 a r e d e t e r m i n i s t i c . Then at each ins tan t of au to - ma ton t ime an au tomaton A 1 x A 2 which is in a s ta te (a, b) can p e r f o r m the fol lowing act ions depending on the s t a t es a and b:

1. ~IfA l in the s ta te a r e a d s x f r o m the input s t o r e and thus goes ove r to the s ta te a ' , and if A 2 in the s ta te b r e a d s y f r o m the input s t o r e and goes over to b ' , then an au tomaton AI • A 2 which is in the s ta te (a, b) will r e a d x f r o m the input and go ove r to (a ' , b), or , in the c a s e of the Input y, it r e a d s y and goes o v e r to (a, b ' ) .

2. I f a is a s ta te be longing to the Input s t o r e r ead ing sec t ion , and if in the s ta te b the au tomaton A 2 o p e r a t e s with in t e rna l s t o r e s (it r e a d s o r wr i t e s , o r is idle), and thus goes o v e r to the s ta te b ' , then A t • A 2 in the s ta te (a, b) will p e r f o r m the s a m e opera t ion with the in te rna l s t o r e and go ove r into the s ta te (a, b ' ) .

598

Page 6: Group languages

3. I f A 1 in t he s t a t e a o p e r a t e s wi th an i n t e r n a l s t o r e and thus goes o v e r to a ' , t hen A I • 2 in the s t a t e (a, b) w i l l p e r f o r m the s a m e o p e r a t i o n with an i n t e r n a l s t o r e and go o v e r ~ (a ' , b)~ H e r e the s t a t e b wi l l h a v e no e f fec t w h a t s o e v e r .

I t i s e a s y to s e e t h a t wi th such an a s s i g n m e n t of the t r a n s i t i o n func t ion , the a u t o m a t o n A 1 x A 2 wi l l b e a d e t e r m i n i s t i c n + m - s t o r e au toma ton .

I f A 1 and A 2 a r e n o n d e t e r m i n i s t i c a u t o m a t a , the t r a n s i t i o n s in the a u t o m a t o n A 1 x A 2 wi l l be de f i ned in the s a m e way , wi th a l l o w a n c e fo r n o n d e t e r m i n a c y in t he c o r r e s p o n d i n g s t a t e s . F o r e x a m p l e , the f i r s t r u l e i s r e w r i t t e n a s fo l l ows :

If A 1 in the s t a t e a can r e a d x and thus go o v e r to a ' , and i f A 2 in the s t a t e b can r e a d y and go o v e r to b ' , then A 1 x A 2 in the s t a t e (a, b) can r e a d x and go o v e r to (a ' , b) , and in t he c a s e of t he input y i t c an r e a d y and go o v e r to (a, b ' ) .

L e t us show tha t t he a u t o m a t o n A l x A 2 p e r c e i v e s t he l a n g u a g e L l x L 2. Le t pE(~IUZ2)* and s u p p o s e tha t p i s c o r r e c t l y t r a n s f e r r i n g A 1 x A 2 f r o m the s t a t e (ao, b o) to a t e r m i n a l s t a t e (a, b); p can a l w a y s b e e x p r e s s e d in the f o r m U1V 1 . . . UtVt, w h e r e U i E ~ , V i ~ * 2 , i = l , 2 . . . . . t and the i n t e r n a l w o r d s a r e no t e m p t y . F r o m the o p e r a t i o n of the a u t o m a t o n A l x A 2 we can s e e tha t the w o r d p l=u lu2 . . . u t i s c o r r e c t l y t r a n s f e r r i n g the a u t o m a t o n A I f r o m the s t a t e a 0 to the t e r m i n a l s t a t e a, and the w o r d P2 = vlv2 �9 o �9 v t i s c o r r e c t l y t r a n s f e r r i n g A 2 f r o m the s t a t e b 0 to the t e r m i n a l s t a t e b . Hence the w o r d PIEL1 and P2EL2, and t h e r e f o r e pE LlX L2: Now l e t pE L l x L 2. S i m i l a r l y , p = U1V 1 . . . UtV i . Then Pl = U 1 U 2 �9 ~ ~ U t ~ L1 and P2 = V1V2 �9 �9 �9 Vt~ L2; Pl c o r r e c t l y t r a n s f e r s A 1 f r o m the s t a t e a 0 to the t e r m i n a l s t a t e a , and p2A2 f r o m b 0 to the t e r m i n a l S ta te b. It i s ev iden t t ha t in t h i s c a s e a l s o the w o r d p wi l l c o r r e c t l y t r a n s f e r t he a u t o m a t o n A 1 x A 2 f r o m the s t a t e (a o, bo) to the t e r m i n a l s t a t e (a, b). Th i s c o m p l e t e s the p r o o f of the t h e o r e m .

C O R O L L A R Y 1. I f L 1 i s a r e g u l a r l a n g u a g e and L 2 a c o n t e x t - f r e e l a n g u s g e , then L 1 x L 2 wi l l be a c o n t e x t - f r e e l anguage .

P r o o f . R e g u l a r l a n g u a g e s a r e u n d e r s t o o d by a u t o m a t a w i t h o u t s t o r e s , and c o n t e x t - f r e e l a n g u a g e s by 1 - s t o r e a u t o m a t a . I t fo l lows f r o m T h e o r e m 4 tha t in th i s e a s e the d i r e c t p r o d u c t w i l l b e r e p r e s e n t e d by a 1 - s t o r e au toma ton , i . e . , i t i s a c o n t e x t - f r e e l anguage .

C O R O L L A R Y 2. If G 1 i s a f in i t e g roup and G 2 a g roup s p e c i f i e d by a C F l anguage , then G l x G 2 wi l l b e s p e c i f i e d by a C F l anguage .

P r o o L L e t G 1 b e s p e c i f i e d by the l a n g u a g e ~1, , and G 2 by the l a n g u a g e ~ . I t i s e a s y to s e e tha t G l x G 2 i s s p e c i f i e d by the l a n g u a g e ~ , • 9~ . If G 1 i s f in i t e , then ~ , w i l l be r e g u l a r and f r o m t h e p r e - v i o u s c o r o l l a r y i t fo l lows tha t ~:~-1 • ~ 2 i s a C F l a n g u a g e .

Le t L be a l anguage . A c o m m u t a t i v e c l o s u r e of a l a n g u a g e L i s a l anguage (denoted by A(L)) tha t h a s b e e n o b t a i n e d f r o m L by a l l s o r t s of p e r m u t a t i o n s of l e t t e r s in the w o r d s o c c u r r i n g in L. M o r e p r e c i s e l y , a w o r d pEA(L) if and only i f i t can b e r e d u c e d by l e t t e r p e r m u t a t i o n to a w o r d b e l o n g i n g to L. The o p e r a t i o n of c o m m u t a t i v e c l o s u r e i s i m p o r t a n t in the t h e o r y of c o n t e x t - f r e e l a n g u a g e s , fo r e x a m p l e in c onne c t i on wi th P a r i k h ' s w e l l - k n o w n t h e o r e m [5].

A s b e f o r e , l e t D2n be D i c k ' s l a n g u a g e and l e t ~ be a l anguage con ta in ing e~ We s h a l l u s e the fo l - lowing l e m m a .

L E M M A 1. A(D2n) x ~)~ canno t be a c o n t e x t - f r e e l a n g u a g e fo r n > 1.

P r o o f . Suppose tha t A(D2n)x ~ i s a C F l anguage . By a w e l l - k n o w n c r i t e r i o n , t h e r e h e n c e e x i s t n u m b e r s p and q such t ha t i f z EA (D~) • 9~ and l z l >p, then z = xuwvy, uv ~ e , l uwv l<q and fo r a l l n a t u r a l k we h a v e xukwvky E A (D~,) • . ~ L e t a and b be d i s t i n c t s y m b o l s of the a l p h a b e t of the l a n g u a g e D2n , wi th a ~b-1 and b ~a -1 . The w o r d t=ambm(a-1)m(b-1) m fo r a l l m be longs to A(D2~) • ~ , s i n c e ~:~ con ta in s eo

L e t us t a k e m > p + q . Then t = x u w v y and fo r a l l k we h a v e xukwvky EA(D2~) • ~ Since t h e a l p h a b e t s of the l a n g u a g e s ~ and A(D2n) a r e d i s j o i n t ( this fo l lows f r o m the de f in i t ion of a d i r e c t p r o d u c t ) and z E ~ , we h a v e xukwvky EA (D2~) . The l a n g u a g e A(D2n ) i s a g roup l a n g u a g e and i t s p e c i f i e s the f a c t o r g roup of a f r e e g roup with r e s p e c t to the c o m m u t a t o r , i . e . , a f r e e a b e l i a n g roup of r a n k n. Hence in th i s g roup we m u s t h a v e the r e l a t i o n u w v = w . Since A(D2n) i s a s e t of w o r d s whose s u m of exponen t s of x i i s equa l to t he

s u m of exponen t s of xi 'I , i = 1 , 2, . . . . n, i t fo l lows f r o m u w v = w tha t uvEA(D2n ). I t i s e v ide n t t h a t , i f m > q, i t i s no t p o s s i b l e to s e l e c t such uv f r o m the cond i t i on lwvl < q in the w o r d a m b m a - m b - m . Th i s c o m p l e t e s the p r o o f of the l e m m a .

599

Page 7: Group languages

Let us note that it hence follows that A(D2n) is not a CF language and that a di rect product of groups specified by CF languages is not always specified by a CF language. For example, the group Zx Z, where Z denotes the group of integers with respec t to addition, is not specified by a CF language, since it is spec- ified by the language A(D2n).

Any finitely generated abelian gro.up is isomorphic to a direct product of a finite group and a finite number of groups Z. Let us denote by Z 1~ the direct product of groups Z taken k t imes. Suppose that the abelian group G decomposes in this way into a di rect product of a finite group T and zk.

THEOREM 5. A finitely generated abelian group G = T • Z k will be specified by a CF language if and only if k - 1.

Proof . The group Z k is a f ree abelian group of rank k and it is i somorphic to the factor group of a f ree group of rank k with respec t to its commutator . As we have seen above, this group is specified by the language A(D2k). A finite group T is specified by a regula r language Y2~ r . Then G will be specified by a language 9re r x A (D2k), which according to the lemma cannot be context- f ree for k > 1.

On the other hand, for k = l the language A(D2)= D 2 will be context - f ree and, therefore , a CF language (by vir tue of Corol lary 3). This completes the proof of the theorem.

In conclusion let us examine to what extent it is essential that the alphabet E in which a group is defined should have the fo rm E ={xl, x 2 . . . . . Xn, x~ 1 , x2 -1 . . . . . Xkm }. It is found that all the resu l t s obtained above hold for any alphabet.

Let En={X~ . . . . . X.n}. By a group language in the alphabet Y~n we shall henceforth understand any language in the alphabet En which is a kernel of an epimorphism of En* onto a group. Let G be a group and

let ~0 be an epimorphism of Y~ onto G. ~ == Ker~o. We obtain the following asser t ion, analogous to Theorem 1:

A group G is finite if and only if 9)~ is a regular language.

The proof is entirely s imi lar to the proof of Theorem 1. It is only neces sa ry to slightly modify the concept of a s t rong group automaton A G. The input alphabet is En and the t ransi t ion function 5 is defined on Gx E n b y the law 5 (g, x i )=g~ r

The t heo ry of context-free group languages is based on the following theorem, which is analogous to Theorem 3.

THEOREM 3'. Let the group G be finitely defined, En={Xl . . . . . Xn}, Em={yt . . . . . Ym}, ~0: E*n "-* G, * onto one and the same group G. Let ~---Ker q, r m* - - G, where ~p and r are epimorphisms of E~ and E m

and 9l = K e r $ . Hence if ~ is a CF language, then 91 will also be a CF language.

Proof . Let Z2n={Xl, x2, . . . . Xn, xl -~, x2-1 , . . . . =~n I } and E2m= ~vl, Y2 . . . . . Ym, Yl-I,Y[ i, . . . Y ~ } ,

where x]l a n d y y ~ are new symbols, i---l, 2 . . . . . n; j = l , 2, . . . . m. L e t u s define the epimorphism r

~*2n - - G as follows: r (xi) = r , (p' (x~ 1) = [(P(xi)] - l . We shall also define the homomorphism T : ~2*n - - En'*

T(xi)= xi, ~'(x:il) =Pi, where Pi is a fixed word belonging to ~* n such that ~o(Pi)= [~o(xi)]-l. Such a word must exist, since (p is an epimorphism by our condition. It is easy to see thet we obtain the following commu- tative diagram:

q:

z';o - z~.

Let 9~q' ~= Ker q~'. Then ~" = v --~ (Tit) and hence ~]~' will be a CF language. The language ~ ' spe- cifies a group G in the alphabet Yen.

In a s imi lar way we can define the homomorphisms r ' and ~' and construct the commutat ive diagram

N~--

600

Page 8: Group languages

Let ~/~ Kerr The language 9}' specifies in the alphabet Z2m the same group G, and hence by

virtue of Theorem 3 this language is context-free. Hence the language ~ ~ v' (~}') is also context-free. This completes the proof of the theorem.

It follows from this theorem that for obtaining groups specified by CF languages, it suffices to con- sider these groups in any convenient alphabet.

IQ 2.

3.

4.

5.

L I T E R A T U R E C I T E D

A. I. Mal'tsev, Algorithms and Recursive Functions [in Russian], Nauka, Moscow (1965). V. M. Glushkov, "Simple algorithms of analysis and synthesis of store automata," Kibernetika, No. 5 (1968).

A. Vo Anisimov, "The group of automorphisms of connected automata," in: Teoriya Avtomatov, No. 5, (1969). N. Chomsky and M. P. Schiitzenberger, i"The algebraic theory of context-free languages," in: Com- puter Programming and Formal Systems, North Holland, Amsterdam (1963)o R. J. Parikh, "Language generating devices," MIT Res. Lab. Electron. Quart. Prog. Rept., 60 (1961).

601