scieee AI-readable full text Open interactive document viewer

The word problem distinguishes counter languages

Cleary, Sean; Elder, Murray; Ostheimer, Gretchen

Abstract

Counter automata are more powerful versions of finite state automata where addition and subtraction operations are permitted on a set of n integer registers, called counters. We show that the word problem of Zn is accepted by a nondeterministic m-counter automaton if and only if m >= n.

Full text

THE WORD PROBLEM DISTINGUISHES COUNTER LANGUAGES SEAN CLEARY, MURRAY ELDER, AND GRETCHEN OSTHEIMER Abstract. Counter automata are more powerful versions of finitestate automata where addition and subtraction operations are permitted on a set of ninteger registers, called counters. We show that the word problem of Znis accepted by a nondeterministic m-counter automaton if and only if m≥n. 1. Introduction Connections between formal language theory and group theory have been considered by many authors. If His generated as a group by a finite set X, and if we let X±be the set Xtogether with formal inverses, one important language to consider is the word problem, which is the set of words over X± representing the identity element of H. The formal language classification of the word problem of a group is independent of generating set in the sense that if Fis a family of languages and if Xand Yare two finite generating sets for a group H, then the word problem of Hwith respect to Xis in F if and only if the word problem of Hwith respect to Yis in F(see Gilman [3]). Therefore we can refer to the word problem of a group rather than to the word problem of a particular generating set for a group. It is natural then to ask about the extent to which the algebraic structure of a group Hdetermines the formal language classification of the word problem of H. In 1975 Anisimov and Seifert [1] proved that the word problem of His a regular language if and only if His finite, and in 1985 Muller and Schupp [8, 9] proved that the word problem of His a context-free language if and only if His virtually free. While the Anisimov and Seifert result can be proven easily from first principles, the Muller and Schupp result relies heavily on a deep result of Stallings concerning one-ended groups [10]. In 1991 Herbst [4] used the Muller and Schupp result to show that the word problem of His a one-counter language if and only if His virtually cyclic. Notice that it follows from these results that if we restrict our attention to The first author is grateful for the hospitality of the Centre de Recerca Matem`atica. 1 2 SEAN CLEARY, MURRAY ELDER, AND GRETCHEN OSTHEIMER languages which are word problems, nondeterministic automata which are either finite state, pushdown or one-counter are no more powerful than their deterministic counterparts. In formal language theory there are a variety of ways to generalize the ideas of finite-state, pushdown and one-counter automata. One such way is to consider G-automata, where Gis a group. Loosely, if Gis a group, a G-automaton over a finite alphabet Xis an automaton in which each edge is labeled by an ordered pair, the first coordinate of which is an element of G and the second coordinate of which is an element of X±or the empty word. A word wover X±is accepted by Aif there is a path from the initial state to a final state for which the second coordinate reads the letters of wand the product of the corresponding first coordinates is the identity element of G. If we take Gto be the trivial group, a G-automaton is simply a finitestate automaton, and if we take G=Z, a G-automaton is a one-counter automaton. For G=Zn, a G-automaton is an n-counter automaton. We show below that the word problem of Znis accepted by a nondeterministic m-counter automaton if and only if m≥n, so larger rank free abelian groups require more counters to accept their word problems. Thus, the natural heirarchy of counter languages coming from the number of counters used does not collapse in the nondeterministic case of word problems of groups. We note that sometimes counter automata are described as blind counter automata (see Mitrana and Stiebe [7]) to emphasize the fact that the counters can not be examined until at an accept state. A pushdown-automaton is equivalent in power to a G-automaton where Gis free [5]. Kambites proved that for groups Gand H,W(H) is accepted by a deterministic Gautomaton if and only if Hhas a finite index subgroup which embeds in G[6], so in the deterministic case, at least ncounters are required to accept the word problem of Zn. Furthermore, he posed the following question: “For what groups Gis it true that deterministic and non-deterministic G-automata accept the same word problems?” Below, Theorem 1 answers that question in the case that Gis abelian: deterministic and non-deterministic G-automata accept the same word problems. Our methods are elementary: we rely entirely on basic linear algebra. 2. Notation and definitions Let Gbe a group. We define a G-automaton over Xto be a finite directed graph with a distinguished initial vertex, some distinguished final vertices, and with edges labeled by G×(X±S{²}) where ²is the empty word. We will refer to vertices as states. By a loop we mean an edge that starts and ends at the same state, and by a circuit we mean a path that does so. THE WORD PROBLEM DISTINGUISHES COUNTER LANGUAGES 3 AG-automaton over Xis said to accept a word w∈X±∗ if there is a path pfrom the initial state to some final state labeled (1, w), where 1 is the identity element of G. In this case pis called an accepting path. If nis a positive integer, a Zn-automaton is called an n-counter automaton. An n-counter language is one that is accepted by an n-counter automaton. If ris a regular expression over X±, we let L(r) denote the language denoted by r. 3. General Preliminaries We will need to rely on two general results about languages accepted by G-automata. The first establishes that having an n-counter word problem is a property of a group, rather than of a particular generating set for the group. The proof relies on basic properties of rational transductions as summarized by Gilman [3] and Kambites [5], for example. Lemma 1. If Gand Hare groups, and if Xand Yare two finite generating sets for H, then the word problem for Hwith respect to Xis accepted by a G-automaton if and only if the word problem for Hwith respect to Yis as well. Proof. Fix a group G, and let Fbe the set of languages which are accepted by some G-automaton. Let WXbe the word problem of Hwith respect to X, and let WYbe the word problem of Hwith respect to Y. Suppose that WX∈ F. Then WYis a rational transduction of WX(see Proposition 2 in [5]). Fforms a family of languages. It follows that Fis closed under rational transduction (see Theorem 6.2 in [3]). Therefore WY∈ F.¤ The second general result establishes that the intersection of a regular language and an n-counter language is itself n-counter. This is Lemma 3 in Elder [2] and an immediate consequence of Theorem 4 in Kambites [5]. Later we will need to refer to specific characteristics of an n-counter automaton that accepts such an intersection. For this reason we include the following lemma and proof: Lemma 2. Let Xbe a finite set. Let L1be regular language over X, and let L2be a language accepted by a Zn-automaton over X. Then L1∩L2is also accepted by a Zn-automaton over X. Proof. Let A1be a finite-state automaton accepting L1. Let A2be a Znautomaton accepting L2. We construct a Zn-automaton Bas follows. The set of states of Bis Σ1×Σ2, where Σiis the set of states of Ai. A state (σ1, σ2) is final if and only if σiis final in Aifor i= 1,2. For x∈X±and v∈Zn, there is an edge Bfrom (σ1, σ2) to (τ1, τ2) labeled (v, x) if and only if there is an edge in A1from σ1to τ1labeled xand there is an edge in A2 4 SEAN CLEARY, MURRAY ELDER, AND GRETCHEN OSTHEIMER from σ2to τ2labeled (v, x). Furthermore, there is an edge from (σ1, σ2) to (τ1, τ2) labeled (v, ²) if and only if one of three conditions holds: •there is an edge in A1from σ1to τ1labeled ², and there is an edge in A2from σ2to τ2labeled (v, ²), or •v= 0, σ2=τ2and there is an edge in A1from σ1to τ1labeled ², or •σ1=τ1and there is an edge in A2from σ2to τ2labeled (v, ²). Words accepted by Bare exactly those in L1∩L2: a word win the intersection can follow a path labeled (0, w) to states (σ1, σ2) where σiis a final state for Ai; similarly, any word accepted by Bcan lead to a state (σ1, σ2) which is a product of final states via a path labeled (0, w) and would thus be accepted by each of the Ai.¤ 4. Main Result To show that we cannot accept the word problem of a free abelian group of rank nwith a counter automaton with less than ncounters, we proceed via a series of lemmas which allow us to consider automata of a preferred form and to derive later a contradiction from a property somewhat analogous to the ranks of vectorspaces not being less than that of their subspaces. We let H=Zn, and suppose that x1, x2, . . . , xnis a basis for Has a free abelian group. Let X1, X2, . . . , Xnbe the formal inverses of the generators. Let L=W(H)∩L(x∗ 1x∗ 2···x∗ nX∗ 1X∗ 2· · · X∗ n). If j= (j1, j2, . . . , jn)∈Nn, let w(j) denote the word xj1 1xj2 2···xjn nXj1 1Xj2 2· · · Xjn n. Lemma 3. Let Hand Lbe as above. Suppose W(H)is m-counter. Then there is an m-counter automaton Aaccepting Lwith the following structure: •Ahas a single final state σ. •Acan be described as a collection of 2nsubautomata A(x1), A(x2), . . . , A(xn), A(X1), A(X2), . . . , A(Xn)satisfying the following criteria: –the only edges between the subautomata are labeled (v, ²)for some v∈Zm, and these edges go from A(xi)to A(xi+1)for i= 1,2, . . . , n−1, from A(Xi)to A(Xi+1)for i= 1,2, . . . , n−1, and from A(xn)to A(X1). –for all a=xi, Xi, edges in A(a)are labeled (v, ²)or (v, a)where v∈Zn. Proof. Let A1be a finite-state automaton accepting the regular language L(x∗ 1x∗ 2· · · x∗ nX∗ 1X∗ 2· · · X∗ n) of the following specific form. There are nstates σxi,nstates σXi, and two additional states α, the initial state, and β, the only final state. For a=xi, Xi, the state σahas a loop labeled a. For i= 1,2, . . . , n −1, there are edges labeled ²from σxito σxi+1 and from σXi THE WORD PROBLEM DISTINGUISHES COUNTER LANGUAGES 5 to σXi+1 . In addition there are edges labeled ²from αto σx1and from σXn to β. Let A2be a Zm-automaton accepting W(H). We may assume without loss of generality that A2has a single final state. By Lemma 2, there exists aZm-automaton Aaccepting L. The automaton constructed in the proof of Lemma 2 has all of the desired properties. ¤ We want to show that m≥nusing linear algebra. The following lemma will allow us to do so. Ndenotes the set of positive integers. Lemma 4. If m < n then Nnis not contained in the union of finitely many translates of subspaces of Qneach of which has dimension at most m. Proof. Suppose that Nnis contained in the union of Q1, Q2, . . . , Qr⊆Qn, where each Qiis a translate of an m-dimensional subspace of Qn. Let k=r+ 1. Let B(k) be the set of all points (x1, x2, . . . , xn) in Nnsuch that xi≤kfor i= 1,2, . . . , n. There are knelements in B(k). Let Bi= B(k)∩Qi. There are at most kmelements in Bi. Therefore there at most rkm< km+1 ≤knelements in B(k). We have reached a contradiction. ¤ Let pand qbe accepting paths in an m-counter automaton. We will say that p < q if qcan be obtained from pby adding circuits. We will say that pis minimal if it is minimal with respect to <. Lemma 5. Let Hand Lbe as above. Suppose W(H)is m-counter. Let Abe an m-counter automaton Aaccepting Lwith the structure posited in Lemma 3. There exist accepting paths p,q1, q2, . . . , qnsuch that •p < qifor i= 1,2, . . . , n; •if j∈Nnsuch that w(j)is the word accepted by p, and if ai∈Nn such that w(j+ai)is the word accepted by qi, then {a1, a2, . . . , an} is a set of linearly independent vectors in Nn. Proof. Let pbe an accepting path which is minimal with respect to <, and let w(j) be the word that it accepts. Let Spbe the semigroup spanned by all vectors of the form j0−jsuch that there is a path qaccepting w(j0) with q > p. Consider the subspace Vpof Qnspanned Sp. Let Qp=j+Vp. There are finitely many accepting paths pwhich are minimal with respect to <. Suppose that none of these satisfies the criteria of the lemma. Then each Vphas dimension n−1 or smaller. But then Nnis contained in the union of finitely many translates of subspaces Qnwhich are at most (n−1)- dimensional. By Lemma 4 this is not possible. ¤ Theorem 1. If the word problem of Znis an m-counter language, then m≥n. 6 SEAN CLEARY, MURRAY ELDER, AND GRETCHEN OSTHEIMER Proof. Suppose that the word problem of Znwith respect to some generating set is an m-counter language, with m < n. By Lemma 1 we may assume that our generating set for Znis a free basis x1, x2, . . . , xn. Let X1, X2, . . . , Xnbe formal inverses of the generators. Let L=W(Zn)∩ L(x∗ 1x∗ 2· · · x∗ nX∗ 1X∗ 2· · · X∗ n). By Lemma 3 there exists an m-counter automaton Aaccepting Lwith the specific structure posited in that lemma. We can take p, j, qi, aias in Lemma 5. Let sibe the Zmcontribution of the loops in qithat are not in pand which lie in A(x1)∪A(x2)∪· · ·∪A(xn). Let Sibe the Zmcontribution of the loops in qithat are not in pand which lie in A(X1)∪A(X2)∪ · · · ∪ A(Xn). Since pand qiare both accepting, and since qiis built up from pin the specific way that it is, si+Si= 0. Since any set of nvectors in Zmis linearly dependent, then there exist α1, α2, . . . , αn∈Znot all zero such that α1s1+α2s2+· · · +αnsn= 0. We construct an accepting path ras follows. We start with p. If αiis strictly positive, consider those loops of qithat are not part of pbut that do lie in A(x1)∪A(x2)∪ · · · ∪ A(xn); add αitimes as many traversals of these loops. The Zmcontribution of these loops is αisi. If αiis strictly negative, do the same thing but this time consider those loops of qithat are not part of pbut that do lie in A(X1)∪A(X2)∪ · · · ∪ A(Xn), and add −αitimes as many traversals of these loops. The Zmcontribution of these loops is (−αi)Si=αisi. The path ris accepting since α1s1+α2s2+· · ·+αnsn= 0. We now reach a contradiction by showing that the word accepted by r does not represent the identity and thus is not in W(Zn). Consider the case, for example, when α1<0 and α2, α3, . . . , αn≥0. Let u=j+α2a2+ · · · +αnan, and let v=j+ (−α1)a1. Then the word waccepted by ris of the form xu1 1xu2 2· · · xun nXv1 1Xv2 2· · · Xvn n, so wis in the word problem only if u=v. This is the case if and only if α2a2+α3a3+· · · +αnan=−α1a1 This is impossible since {a1, a2, . . . , an}is linearly independent. All other cases reach a similar contradiction. ¤ From the classification of finitely-generated abelain groups, we get the immediate corollary, analgous to Kambites Theorem 1 [6] for the group case but in the nondeterministic case: Corollary 2. The word problem of finitely-generated abelian group His recognized by a nondeterministic G-automaton if and only if Hhas a finiteindex subgroup isomorphic to a subgroup of G. THE WORD PROBLEM DISTINGUISHES COUNTER LANGUAGES 7 5. Acknowledgments We would like to thank Mark Kambites for the relevant background material from semigroup theory and Bob Gilman for suggesting the proof of Lemma 4. References [1] A.V. Anisimov and F.D. Seifert. Zur algebraischen charateristik der durch kontextfreie sprachen definierten gruppen. Elektronische Informationsverarbeitung und Kybernetik, 11:675–702, 1975. [2] Murray Elder. A context-free and a 1-counter geodesic language for a Baumslag- Solitar group. Theoretical Computer Science, 339:344–371, 2005. [3] Robert H. Gilman. Formal languages and infinite groups. In Gilbert Baumslag et. al., editor, Geometric and Computational Perspectives on Infinite Groups, volume 25 of DIMACS Series in Discrete Mathematics and Computer Science, pages 27–51, Providence, RI, 1996. American Mathematical Society. [4] Thomas Herbst. On subclass of context-free groups. Theoretical Informatics and Applications, 25:255–272, 1991. [5] Mark Kambites. Formal languages and groups as memory. [6] Mark Kambites. Word problems recognisable by deterministic blind monoid automata. [7] Victor Mitrana and Ralf Stiebe. The accepting power of finite automata over groups. In New trends in formal languages, volume 1218 of Lecture Notes in Comput. Sci., pages 39–48. Springer, Berlin, 1997. [8] D. Muller and P. Schupp. Groups, the theory of ends and context-free languages. J. Computer and System Sciences, 26:295–310, 1983. [9] D. Muller and P. Schupp. The theory of ends, pushdown automata, and second order logic. Theoretical Computer Science, 37:51–75, 1985. [10] John R. Stallings. On torsion-free groups with infinitely many ends. Ann. of Math. (2), 88:312–334, 1968. Department of Mathematics, The City College of New York & The CUNY Graduate Center, New York, NY 10031, USA E-mail address:[email protected] Department of Mathematics, Stevens Institute of Technology, Hoboken, NJ 07030, USA E-mail address:[email protected] Department of Computer Science, Hofstra University, Hempstead NY 11549, USA E-mail address:[email protected]