The Accepting Power of Finite

Automata Over Groups

Victor Mitrana

Faculty of Mathematics University of Bucharest

Str Academiei Bucharest ROMANIA

Ralf STIEBE

Faculty of Computer Science University of Magdeburg

POBox D Magdeburg GERMANY

Turku Centre for Computer Science

TUCS Technical Rep ort No

Novemb er

ISBN ISSN

Abstract

Some results from are generalized for nite automata over arbitrary

groups The accepting p ower is smaller when ab elian groups are considered

in comparison with the nonab elian groups We prove that this is due to

the commutativity Each language accepted by a nite automaton over an

ab elian group is actually a unordered vector language Finally deterministic

nite automata over groups are investigated

TUCS Research Group

Mathematical Structures of Computer Science

Intro duction

One of the oldest and most investigated machine in the is

the nite automaton Many fundamental prop erties have b een established

and many problems are still op en

Unfortunately the nite automata without any external control have a

very limited accepting p ower Dierent directions of research have b een con

sidered for overcoming this limitation The most known extension added to a

nite automata is the pushdown memory In this way a considerable increas

ing of the accepting capacity has b een achieved The pushdown automata

are able to recognize all contextfree languages

Another simple and natural extension related somehow to the pushdown

memory was considered in a series of pap ers namely to asso ciate to

each conguration an element of a given group but no information regarding

the asso ciated element is allowed This value is stored in a counter An input

string is accepted if and only if the automaton reaches a designated nal state

with its counter containing the neutral element of the group

Thus new characterizations of unordered vector languages or context

free languages have b een rep orted These results are in a certain sense

unexp ected since in such an automaton the same choice is available regardless

the content of its counter More precisely the next action is determined just

by the input symb ol currently scanned and the state of the machine

In this pap er we shall consider only acceptors with a oneway input tap e

read from left to right and a counter able to store elements from a given

group The aforementioned pap ers deal with nite automata over very well

dened groups eg the additive group of integers the multiplicative group

of nonnull rational numb ers or the free group The aim of this pap er is to

provide some general results regardless the asso ciated group

We shall prove that the addition of an ab elian group to a nite automaton

is less p owerful than the addition of the multiplicative group of rational

numb ers An interchange lemma p oints out the main reason of the p ower

decrease of nite automata over ab elian groups Characterizations of the

contextfree and recursively enumerable languages classes are set up in the

case of nonab elian groups

As far as the deterministic variants of nite automata over groups are

concerned we shall show their considerable lack of accepting p ower

Preliminaries

We assume the reader familiar with the basic concepts in automata and

theory and in the group theory For further details we refer

to and resp ectively

For an alphab et we denote by the free monoid generated by

under the op eration of concatenation the empty string is denoted by and

+

the semigroup fg is denoted by The length of x is denoted

by jxj

Let K M e b e a group under the op eration denoted by with the

neutral element denoted by e An extended nite automaton EFA shortly

over the group K is a construct

A Z K q F

0

where Z q F have the same meaning as for a usual nite automaton

0

namely the set of states the input alphab et the initial state and the set of

nal states resp ectively and

Z fg P Z M

f

This sort of automaton can b e viewed as a nite automaton having a counter

in which any element of M can b e stored The relation q m s a q s

Z a fg m M means that the automaton A changes its current

state s into q by reading the symb ol a on the input tap e and writes in the

register x m where x is the old content of the register The initial value

registered is e

We shall use the notation

q aw m j s w m r i s r q a

A

for all s q Z a fg m r M The reexive and transitive closure

Sometimes the subscript identifying of the relation j is denoted by j

A

A

the automaton will b e omitted when it is selfundersto o d

The word x is accepted by the automaton A if and only if there

is a nal state q such that q x e j q e In other words a string is

0

accepted if the automaton completely reads it and reaches a nal state when

the content of the register is the neutral element of M

The language accepted by an extended nite automaton over a group A

as ab ove is

LA fx jq x e j q e for some q F g

0

A

For two groups K M e and K M e we dene the triple

1 1 1 1 2 2 2 2

K K M M e e with m m n n m n m n

1 2 1 2 1 2 1 2 1 2 1 1 1 2 2 2

It is wellknown that K K is also a group

1 2

We are going to provide some results that will b e useful in what follows

The notation LRE G identies the class of regular languages

Theorem For any group K LEFAK LRE G i al l nitely gen

erated subgroups of K are nite

Proof Let K b e a group such that any nitely generated subgroup of K is

nite Let A Z K z F b e an EFA over K M e We denote

0

by X the nite subset of M

X fm M j z m z a for some z z Z a fgg

Let H hX i e b e the subgroup generated by X

We construct the nite automaton with moves B Z hX i z e

0

F feg with z m a fz m n j z n z a for all z Z

z m i m M a fg One can easily prove that z w e j

0

A

z e w j z m which implies LA LB

0

B

It remains to prove that for any innite group K nitely generated exists

an EFA over K accepting a non Let K hX i e b e such

a group with the nite set of generators X Consider the deterministic EFA

1

A fz g Y K z fz g with Y X fx j x X g and z a z a

for all a Y The following facts ab out LA are obvious

z m For any m hX i exist a word v Y such that z v e j

A

For any v Y exists a word w Y such that v w LA

For any k the set

z mg X fm hX i j v Y jv j k z v e j

k

A

is nite

As a consequence of these facts and of the inniteness of hX i we obtain For

all k there is a word v such that v v LA for all v Y jv j k

k k

But one can easily prove that for any regular language L Y exists

k such that for all v w L there is w Y jw j k with v w L

Hence LA cannot b e regular 2

A nitely generated ab elian group is nite if all its elements are of nite

order Hence for an ab elian group K LEFAK LRE G i all ele

ments of K have nite order This is not necessarily true for nonab elian

groups We can however prove a pumping lemma which is very similar to

the pumping lemma for regular languages

Lemma Let K be some group without elements of innite order For any

language L LEFAK there is a constant n such that for al l x L

jxj n there exist a decomposition x uv w and a natural number q

iq +1

with juv j n jv j uv w L for al l i

Moreover if K has the nite exponent p then q can uniformly be chosen

as q p

Proof Let A Z K z F b e an EFA over K We cho ose n jZ j

0

Now consider a word x with jxj n Similar to the pro of of the pumping

lemma for regular languages it can b e shown that there is a decomp osition

x uv w juv j n jv j such that

z uv w e j z v w m j z w m m j f e z Z f F

0 1 1 2

A A A

q

iq +1

Now cho ose q such that m e Obviously any word uv w is accepted

2

by A 2

As a consequence of the ab ove pumping lemma we obtain

Theorem For any group K LEFAK contains the language L

n n

fa b j n g i at least one element of K has an innite order

Proof Let K M e If M contains an element m of innite order then

the nitely generated subgroup hmi e is isomorphic to ZZ hence

L is in LEFAK

If all elements of M have nite order a simple application of the ab ove

pumping lemma yields L LEFAK 2

For a group K let F K denote the family of all nitely generated sub

groups of K

Theorem For any group K

LEFAK LEFAH

HF (K)

Proof Let K M e b e a group The inclusion

LEFAK LEFAH

HF (K)

holds since LEFAK LEFAH for any subgroup H of K

On the other hand let A Z K z F b e an EFA over K The

0

group H hX i e where X fm M jq m z a for some q z

Z a fgg is a nitely generated subgroup of K Obviously during any

computation in the counter of A app ear only elements of hX i Therefore

the automaton A can b e viewed as an automaton over H More precisely

A Z H z F accepts the same language as A do es This proves the

0

second inclusion and thus the theorem 2

EFA over ab elian groups

Valence grammars and EFA have initially b een intro duced for the groups

k

Z ZZ k and Q Q fg In what follows we shall

k

show that the accepting capacity of EFA do es not increase if we consider

arbitrary ab elian groups instead of Q Thus every language accepted by an

EFA over an ab elian group is a unordered vector language The deep er

reason of this fact is the following fundamental result in the group theory

Theorem A nitely generated abelian group is the direct product of a nite

number of cyclic groups

As a consequence a nitely generated ab elian group is either nite or

isomorphic to a group Z H where k is a p ositive integer and H is a nite

k

ab elian group

Theorem For a group K and a nite group H

LEFAK H LEFAK

Proof Let K and H b e given by K M e and H M e

1 1 1 2 2 2

and let A Z K H z F b e an EFA over K H We construct

0

z e F with Z Z M z the EFA over K A Z K z

0 2 2

0 0

F F fe g and

2

z n a fz n m m j z m m z ag

2 2 2 2 1 1 2

z z Z a fg m M m n M

1 1 2 2 2

By induction on the numb er of steps one can show that z e w e j

0

0 2 1

A

z w m m hence LA LA z m w m i z w e e j

1 2 2 1 0 1 2

A

2

We are now ready to prove the main result of this section

Theorem For an abelian group K one of the fol lowing relations hold

LEFAK LRE G

LEFAK LEFAZ for some k

k

LEFAK LEFAQ

S

Proof As it was shown in Theorem LEFAK LEFAH

HF (K)

Every H F K is either nite or isomorphic to a group Z H where k

k

and H is a nite group Hence for all H F K either LEFAH

LRE G or LEFAH LEFAZ H LEFAZ for some

k k

k

If all nitely generated subgroups of K are nite then LEFAK

LRE G holds due to Theorem

Otherwise let N K b e the set of all k such that LEFAH LEFAZ

k

for some H F K If N K is nite then LEFAK LEFAZ

k

where k maxN K If N K is innite then LEFAK LEFAQ

2

n n R

It is known that languages as L fa b j n g or L fw cw j

1 2

+

w fa bg g are not in LEFAQ Therefore L L LEFAK for

1 2

any ab elian group K In it was conjectured that the commutativity of

the multiplication of rational numb ers is resp onsible for this fact We shall

formally prove this conjecture by help of the following interchange lemma

Lemma Let K M e be some abelian group and let L be a language

in LEFAK There is a constant k such that for any x L jxj k and

any decomposition x v w v w v w v jw j exist two integers

1 1 2 2 k k k +1 i

w v with w v w v w r s k such that the word x v w

s k +1 k 2 1

r k 2 1

w for i fr sg is in L w w w

i r

i s

Proof Let A Z K z F b e an EFA over K M e We cho ose

0

2

k jZ j For a word x LA jxj k let b e given a decomp osition

x v w v w v w v jw j There are the states y z Z i

1 1 2 2 k k k +1 i i i

k q F with

z v e j y m i k

i1 i i i

y w e j z n i k

i i i i

z v e j q m

k k +1 k +1

and m n m n m n m e

1 1 2 2 k k k +1

By the pigeonhole principle there are two numb ers r s k with

y z y z

r r s s

v w v w v with w w w w w Now consider x v w

2 k k +1 s r 1

1 2 k r s i

i k the w for i fr sg For the words v i k and w

i i

i

relations

z v e j y m i k

i1 i i i

i k e j z n y w

i i

i i

z v e j q m

k k +1 k +1

hold with n n n n n n for i fr sg By the commutativity of

s r i

r s i

K it follows

m n m n m n m

1 2 k k +1

1 2 k

m n m n m n m

1 1 2 2 k k k +1

e

implying that x is accepted by A 2

n n

Theorem For any abelian group K the languages L fa b j n g

1

R +

and L fw cw j w fa bg g are not in LEFAK

2

Proof Assume that L LEFAK for some K and let k b e the constant

1

2 2 k k

from the interchange lemma Now consider the word x aba b a b

i i

and the decomp osition v a w b i k v There are

i i k +1

2 k s r

r s k such that x aw a w a w with w b w b

1 2 k r s

i

b for i fr sg is in L contradiction w

1

i

A similar reasoning for the relation L LEFAK is left to the reader

2

2

EFA over nonab elian groups

In this section we restrict our investigation to the free groups since for any

nonab elian group K there is a homomorphism from a free group to K

In this way we get a characterization of the contextfree languages class in

terms of languages accepted by extended nite automata over the free group

with just two generators The free group with n generators is denoted by

F

n

Recall from

Theorem The family of contextfree languages equals LEFAF

2

Lemma Let K and K be two groups For two languages L LEFAK

1 2 i i

i the languages L L and L L are in LEFAK K

1 2 1 2 1 2

0

Proof Let A Z K z F i b e two EFA over K resp ec

i i i i i i i

i

tively We assume that Z Z is empty

1 2

We have LB L L and LC L L where B Z Z

1 2 1 2 1 2 1

0 0

K K z z F F with

2 1 2 1 2

1 2

z z a fz z m m jz m z a z m z ag

1 2 1 2 1 1 1 2 2 2

1 2 1 2

z Z z Z a

1 1 2 2 1 2

z z fz z m e j z m z g

1 2 2 1 2 1 1 1

1 1

fz z e m j z m z g

1 1 2 2 2 2

2 2

z Z z Z

1 1 2 2

0

and C Z Z K K z F with

1 2 1 2 1 2 2

1

z a fz m e j z m z ag z Z a

2 1 1 1

fz m e j z m z g z Z n F

2 1 1 1

z

0

fz m e j z m z g fz e e g z F

2 1 1 2

2

z a fz e m j z m z ag z Z a fg

1 2 2 2

which concludes the pro of 2

It is wellknown that every recursively enumerable language can b e ex

pressed as the homomorphical image of the intersection of two linear lan

guages It is obvious that each family LEFAK is closed under homomor

phims In conclusion due to the previous lemma as well as to Theorem

we have just proved

Theorem LEFAF F equals the family of recursively enumerable

2 2

languages

Deterministic EFA

In the case of EFA the determinism signicantly decreases the accepting

capacity Denote by LDEFAK the family of languages recognized by

deterministic EFA over the group K

n n n

Lemma For any group K the languages L fa j n g fa b j

1

m n n n

n g L fa b j m ng and L fa bg n fa b j n g are not in

2 3

LDEFAK

Proof Let K M e and let A Z fa bg K z F b e a DEFA

0

n

over K such that L LA Since a LA for all n there are

1

r

q e and the integers r s jF j such that z a e j

0

A

n n s

q e for some q Z Since a b LA for all n z a e j

0

A

r r r

q b e j q e for some q F Hence we have also z a b e j

0

A A

r s r s r

q b e j q e implying a b LA contradiction z a b e j

0

A A

In conclusion L LA

1

By similar arguments it can b e shown that L and L are not in LDEFAK

2 3

2

On the other hand LDEFAK generally contains languages with un

decidable memb ership problem

Theorem There is a nitely generated group K such that the fol lowing

question is undecidable Given a DEFA A over K and a word w over the

input alphabet of A is w LA

Proof For a nitely generated group K M e with the set of generators

X the word problem is the following question Is a given term x x x

1 2 n

1 1 1

x X X i n X fx j x X g equal to the neutral

i

element e It is a wellknown result from group theory that there is a nitely

generated group K with undecidable word problem

Let K M e with the nite set of generators X b e such a group

1

We construct the DEFA A fz g X X K z fz g with the transition

1

function z x z x for all x X X Obviously A accepts a word

x x x i x x x e The undecidability of the memb ership

1 2 n 1 2 n

problem for A follows directly from the undecidability of the word problem

for K 2

Theorem For every group K having at least one element of innite or

der we have LDEFAK LEFAK strict inclusion

Proof Let K b e an arbitrary given group and A Z K z F b e a

0

deterministic EFA over K

n

If there is an element of M of innite order then the language fa jn

n n

g fa b jn g LEFAK since LEFAK is closed under union

In conclusion LDEFAK LFEAK 2

Deterministic EFA over ab elian groups

The next result is a consequence of Theorem

Theorem For every abelian group K we have either LDEFAK

LRE G or LDEFAK LEFAK strict inclusion

Obviously the statement of Theorem is also valid for the deterministic

EFA over ab elian groups

As we have seen neither LEFAQ nor LDEFAQ are closed

under complement In the end of this section we will show that the com

plement of a language from LDEFAQ is in LEFAQ In order to

handle the diculties owing to the existence of steps we intro duce some

notations

Let A S Z s F b e a DEFA over Z for some k For all

k 0 k

s S we dene the sets

k

N fr ZZ j s j q r for some q F g

s

Lemma Let A be a DEFA as above For al l s S there is an EFA A

s

Y Z s fq g such that s a for al l a and s j

s k s s s

k

q r i r ZZ n N

s s

k

Proof In what follows let e i k denote the ith unit vector of ZZ

i

For any s S we construct the EFA A s S fq g T Z s fq g with

1 k 1

q S T fa a g fb b g and the transition relation dened

1 k 1 k 1

as

p a for p S a T

1

p p for p S n F

1

p p fq g for p F

1

q a fq e for i k

1 i i

q b fq e for i k

1 i i

q

1

Obviously the language accepted by A s is

1

jw j jw j N g jw j L fw T j jw j

a b s b s a

1 1

k k

2k

jw j Let T IN b e the Parikh mapping with w jw j

b a

1 1

jw j jw j for all w T The Parikh set L is semilinear and its

a b s

k k

complement L is semilinear to o Therefore there is a nite automaton

s

L such that the Parikh set of LA s is A s Y T s fq g

s 2 2 s s

s

From A s we can construct A as follows A Y Z s fq g with

2 s s s k s s

p a for p Y a

s s

p fp e j p p a i k g

s i i

s

p b i k g for p Y fp e j p

i s i

s

Obviously s j q r i LA s contains a word w with r

s 2

A

s

jw j jw j jw j jw j ie i L contains no word v with r

a b a b s

1 1

k k

jv j jv j jv j jv j hence i r N 2

a b a b z

1 1

k k

Theorem For al l L LDEFAQ the complement of L is contained

in LEFAQ

Proof Let A S Z s F b e a DEFA over Z The set of states can

k 0 k

b e partitioned into the set R consisting of all states s S such that A can

p erform only steps if s is reached and its complement S n R

The complement of LA consists of two sets rst the set of all words

k

+

w w w with w and s w j p w r for some r ZZ

1 2 2 0 2

A

+

and some p R second the set of all words w w a with a and

1

s w j p a r j s r for some p s S and r t for all

0 A

A

k

t N The last condition is equivalent to r t for some t ZZ n N

s s

Now let for all s S A Y Z s fq g b e the DEFA constructed

s s k s s

in the last lemma Without loss of generality we may assume that Y and

s

0

are disjoint for s s and that Y and S are disjoint for all s S Y

s s

Now we construct B S Z s F with the set of states S S

k 0

S

Y ff g the set of nal states F fq j s S g ff g and the following

s s

sS

transition mapping

s if s S fs g

0

s s ff g if s s

0

s if s Y for some x S

x x

0

r js r s ag if s S R s a fy

s

s a

0

r js r s ag ff g if s R s a fy

s

f a ff g

f ff m e g m f g i k

i

for all a

It is easy to see that B accepts all words not in LA On the other hand

no word from LA is accepted by B 2

An imp ortant consequence of the last theorem is the decidability of the

inclusion problem and of the equivalence problem to o for DEFA over Q

which is an interesting contrast to the undecidability of the universe problem

for nondeterministic oneturn counter automata a prop er sub class of EFA

over ZZ

Theorem Let A and B be DEFA over Q It is decidable whether or not

LA LB

Proof Given B one can construct a nondeterministic EFA B over Q with

LB LB Clearly LA LB i LB LA is empty Now an EFA

C over Q can b e constructed such that LC L B LA Hence the

inclusion problem for DEFA over Q is reduced to the emptiness problem for

EFA over the same group which is decidable 2

References

J Dassow Gh Paun Regulated rewriting in formal language theory

AkademieVerlag Berlin

J Dassow V Mitrana Finite automata over free generated groups sub

mitted

S Ginsburg S A Greibach Abstract families of languages Memoirs

Amer Math Soc

S Ginsburg Algebraic and automatatheoretic properties of formal lan

guages NorthHoll Amsterdam Oxford

S A Greibach Remarks on blind and partially blind oneway multi

counter machines Th Comp Sci

O H Ibarra S K Sahni C E Kim Finite automata with multiplication

Th Comp Sci

Gh Paun A new generative device valence grammars Rev Roum

Math Pures et Appl

J J Rotman An Introduction to the Theory of Groups SpringerVerlag

Turku Centre for Computer Science

Lemminkaisenkatu

FIN Turku

Finland

httpwwwtucsab o

University of Turku

 Department of Mathematical Sciences

Ab o Akademi University

 Department of Computer Science

 Institute for Advanced Management Systems Research

Turku Scho ol of Economics and Business Administration

 Institute of Information Systems Science