Tameness and the power of programs over monoids in DA
aa r X i v : . [ c s . CC ] J a n TAMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA ∗ NATHAN GROSSHANS, PIERRE MCKENZIE, AND LUC SEGOUFINUniversität Kassel, Fachbereich Elektrotechnik/Informatik, Kassel, Germany e-mail address : [email protected]
URL : https://nathan.grosshans.me DIRO, Université de Montréal, Montréal, Canada e-mail address : [email protected], DI ENS, ENS, CNRS, PSL University, Paris, France e-mail address : luc.segoufi[email protected]
Abstract.
The program-over-monoid model of computation originates with Barrington’sproof that it captures the complexity class NC . Here we make progress in understand-ing the subtleties of the model. First, we identify a new tameness condition on a classof monoids that entails a natural characterization of the regular languages recognizableby programs over monoids from the class. Second, we prove that the class known as DA satisfies tameness and hence that the regular languages recognized by programs overmonoids in DA are precisely those recognizable in the classical sense by morphisms from QDA . Third, we show by contrast that the well studied class of monoids called J is nottame. Finally, we exhibit a program-length-based hierarchy within the class of languagesrecognized by programs over monoids from DA . Introduction
A program of range n on alphabet Σ over a finite monoid M is a sequence of pairs ( i, f ) where ≤ i ≤ n and f : Σ → M is a function. This program assigns to each word w w · · · w n themonoid element obtained by multiplying out in M the elements f ( w i ) , one per pair ( i, f ) , inthe order of the sequence. When an accepting set F ⊆ M is specified, the program naturallydefines the language L n of words of length n assigned an element in F . A program sequence ( P n ) n ∈ N then defines the language formed by the union of the L n .A flurry of work on programs over monoids was triggered by Barrington’s celebrateddiscovery [Bar89], in fact extending the scope of an observation made earlier by Maurerand Rhodes [MR65], that polynomial length program sequences over the group S capturethe complexity class NC (of languages accepted by bounded fan-in Boolean circuits oflogarithmic depth). Key words and phrases:
Programs over monoids, tameness, DA, lower bounds. ∗ Revised and extended version of [GMS17] that includes a more inclusive definition of tameness, thusstrengthening the statement that J is not a tame variety, as explained in Section 3. Preprint submitted toLogical Methods in Computer Science © N. Grosshans, P. McKenzie, and L. Segoufin CC (cid:13) Creative Commons
N. GROSSHANS, P. MCKENZIE, AND L. SEGOUFIN
After all, a program over M is a mere generalization of a morphism from Σ ∗ to M andrecognition by a morphism equates with acceptance by a finite automaton ( M is obtainedfrom the automaton by closing { t a | a ∈ Σ ∪ { ε }} under composition, where t a is the trans-formation induced by a on the state set of the automaton). Given the extensive algebraicautomata theory available at the time of Barrington’s discovery [KR65, Eil76, Pin86], it wasto be a matter of a few years before the structure of NC got elucidated by algebraic means.The “optimism period” produced many significant results. The classes AC ⊂ ACC ⊆ NC were characterized by polynomial length programs over the aperiodic, the solvable, andall monoids respectively [Bar89, BT88]. More generally for any variety V of monoids (avariety being the undisputed best fit with the informal notion of a natural class of monoids)one can define the class P ( V ) of languages recognized by polynomial length programs overa monoid drawn from V . In particular, if A is the variety of aperiodic monoids, then P ( A ) characterizes the complexity class AC [BT88]. It was further observed that in a formal sense,only the regular languages matter for the purpose of understanding much of the structureof NC (see for example [Str94]).But sadly, the optimism period ended: although partial results in restricted settingswere obtained, the holy grail of reproving significant circuit complexity results and forgingahead by recycling the deep theorems afforded by algebraic automata theory never materi-alized. The test case for the approach was to try to prove, independently from the knowncombinatorial arguments [Ajt83, FSS84, Hås86] and those based on approximating circuitsby polynomials over some finite field [Raz87, Smo87], that P ( A ) does not contain the paritylanguage MOD , i.e., that MOD / ∈ AC . But why to this day has this failed?The answer of course is that programs are much more complicated than morphisms:programs can read the letter at an input position more than once, in non-left-to-right order,possibly assigning a different monoid element each time. Linear length programs can indeedtrivially recognize non-regular languages (though see [BS95]). In the classical theory, anytwo varieties provably recognize distinct classes of languages [Eil76, Pin86]. In the theory ofrecognition by polynomial length programs (we will speak then of p -recognition by programsover a monoid or simply by the monoid), distinct varieties can yield the same class, as do,for instance, any two varieties of monoids V and W that each contain a simple non-Abeliangroup, for which P ( V ) = P ( W ) = NC [MPT91, Theorem 4.1].To further illustrate the subtle behavior of programs, consider the variety of monoidsknown as J . This is the variety generated by the syntactic monoids of all languages definedby the presence or absence of certain subwords , where u is a subword of v if u can be obtainedfrom v by deleting letters [Sim75]. One deduces that J is unable to recognize the languagedefined by the regular expression ( a + b ) ∗ ac + . Yet a sequence of programs over J p -recognizes ( a + b ) ∗ ac + by the following clever trick. Consider the language L of all words having ca asa subword but having as subwords neither cca , caa nor cb . Being defined by the occurrenceof subwords, L is recognized by a morphism ϕ : { a, b, c } ∗ → M where M ∈ J , i.e., for this ϕ there is an F ⊆ M such that L = ϕ − ( F ) . Here is the trick: the program of range n over M given by the sequence of instructions (2 , ϕ ) , (1 , ϕ ) , (3 , ϕ ) , (2 , ϕ ) , (4 , ϕ ) , (3 , ϕ ) , (5 , ϕ ) , (4 , ϕ ) , · · · , ( n, ϕ ) , ( n − , ϕ ) , using F as accepting set, defines the set of words of length n in ( a + b ) ∗ ac + . For instance,on input abacc the program outputs ϕ ( baabcacc ) which is in F , while on inputs abbcc and abacca the program outputs respectively ϕ ( babbcbcc ) and ϕ ( baabcaccac ) which are not in F .(See [Gro20, Lemma 4.1] for a full proof of the fact that ( a + b ) ∗ ac + ∈ P ( J ) .) AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA The present work is motivated by the need to better understand such subtle behaviorsof polynomial length programs over monoids. Quite a bit of knowledge on such programshas accumulated over nearly thirty years (consider [BST90, Pél90, PST97, MPT00, Tes03]beyond the references already mentioned). Yet, even within the realm of questions that donot hold pretense to major complexity class separations, gaps remain.One beaming such gap concerns the variety of monoids DA . The importance of DA in al-gebraic automata theory and its connections with other fields are well established (see [TT02]for an eloquent testimony). DA is a relatively “small” variety, well within the variety of ape-riodic monoids. One could anticipate that “small” varieties will be sensitive to duplicationsand rearrangements in the order in which input letters are read by a program. Presumablyin part for that reason, programs over DA have seemingly not been successfully analyzedprior to our work.Our main result is a characterization of the regular languages recognized by polynomiallength programs over monoids in DA . We show that P ( DA ) ∩ R eg is precisely the class L ( QDA ) of languages recognized classically by morphisms in quasi- DA , denoted QDA . Asurjective morphism ϕ from Σ ∗ to a finite monoid M is in quasi- DA if, though M mightnot be in DA , its stable monoid induced by ϕ is in DA , i.e. there is a number k such thatthe image by ϕ of all words over Σ whose length is a multiple of k forms a submonoid of M which is in DA .To attach intuition to P ( DA ) ∩ R eg equating L ( QDA ) , consider aperiodic monoids.Classically, aperiodic monoids cannot recognize a language if doing so requires keeping amodular count. No monoid from A can thus recognize the regular language LEN of words w ∈ { a, b } ∗ of even length. On the other hand, any non-trivial monoid M p -recognizes LEN using the sequence ( P n ) n ∈ N in which P n is a single instruction, (1 , f : { a, b } → M ) ,where f ( a ) = f ( b ) are set to an accepting element if n is even and to a rejecting element if n is odd. It is known [BCST92] that when V = A , this haphazard modular counting abilityof polynomial length programs over monoids from V translates algebraically into “quasi- V power” being necessary and sufficient for morphisms to simulate those programs on regularlanguages. Our main result shows that the same holds when V = DA .Intuitively, the inclusion P ( DA ) ∩ R eg ⊆ L ( QDA ) therefore establishes that P ( DA ) contains no more regular languages than expected . In order to motivate tameness, we needto elaborate on such an “expectation”.What is to be expected when a program p -recognizes a regular language? For V = A and V = DA , because a program instruction ( i, f ) operating on a word w is “aware” of i , theexpectation is that beyond their ability as classical recognizers, programs over monoids from V may only make use of constant modular counting on the positions of a letter in w . Thiscan be formalized by considering tagging each letter in w with its position modulo a fixednumber. Languages whose sets of words tagged in this manner are recognized classicallyby a monoid from V form a well-known class of languages, those recognized by morphismsfrom the variety V ∗ Mod . Extending the strategy used to p -recognize LEN above showsthat L ( V ∗ Mod ) ⊆ P ( V ) for any V . The expectation, fulfilled when V = A , is that noregular language outside L ( V ∗ Mod ) appears in P ( V ) . That V = DA also fulfills thatexpectation follows from our main result because QDA = DA ∗ Mod [DP13]. Much ofthe structure of NC would in fact be resolved if a selection of “large” varieties of monoidsfulfilled that same expectation (see [MPT91, Corollary 4.13], [Str94, Conjecture IX.3.4]).But what is there to expect when V is a “small” variety such as J ? To be sure, thereare ways other than constant modular counting in which programs can supplement their N. GROSSHANS, P. MCKENZIE, AND L. SEGOUFIN classical recognition-by-morphism ability. One such way is to treat subsets of positions ina word w arbitrarily differently from the rest of w . Programs can even pick these subsetsdepending on the length of w . But we are interested in ways that maintain regularity ofthe languages being p -recognized. So we consider the ability that programs have to treat bounded-length prefixes and suffixes arbitrarily. Adding or suppressing this ability preservesregularity. When V = A or V = DA , morphisms to monoids from V happen to possess thisability intrinsically. But morphisms to monoids from V = J are limited in their handling ofprefixes and suffixes.We thus suggest to expect the abilities of programs over V p -recognizing a regularlanguage to be limited to 1) simulating classical recognition, 2) performing the usual countingof letter positions modulo a constant and 3) handling bounded-length prefixes and suffixes.To formalize 3), we introduce the class EV of morphisms that, modulo the beginning andthe end of a word, behave essentially like morphisms into monoids from V . We find asspecial cases that L ( EDA ) = L ( DA ) and L ( EJ ) ⊃ L ( J ) , as it should. To incorporate2), we define tameness of a variety of monoids V (Definition 3.9). The gist of tameness isto impose that any surjective morphism ϕ : Σ ∗ → M , whose image ϕ (Σ) is appropriatelyrestricted and whose word problems (i.e., whose languages of words over Σ whose imagethrough ϕ is a given element in M ) are p -recognizable by monoids from V , should belongto EV .Put simply then, we expect small varieties to be tame .Having defined tameness, we derive its main property: a variety of monoids V is tameif and only if P ( V ) ∩ R eg ⊆ L ( QEV ) , where QEV is a class of morphisms defined from EV in analogy with the definition of QV from V . We deduce from this property that • DA is tame; • J is not tame.Proving DA tame is indeed the main technical difficulty behind our main result abovecharacterizing P ( DA ) ∩ R eg . Disproving tameness of J follows by arguing ( a + b ) ∗ ac + / ∈L ( QEJ ) . So programs over J do p -recognize more regular languages than expected. Be itthe chicken or the egg, the non-tameness of J then “explains” the surprising power of P ( J ) ,as witnessed by the clever trick in our example above.Further analysing tameness, we prove that any sp -variety of monoids (concept intro-duced in [GMS17] as our initial attempt to capture the expected behavior of programs oversmall varieties) is tame. Being tame is strictly more inclusive than being an sp -varietyhowever: the variety of commutative monoids is shown tame, yet not an sp -variety.Our notion of a tame variety differs subtly but fundamentally from a similar notion,that of a p -variety, developed for semigroups by Péladeau, Straubing and Thérien [PST97]and also studied in the case of monoids by Péladeau [Pél90] and later Tesson [Tes03] intheir respective Ph.D. theses. These authors could show that for any p -variety of the form V ∗ D we have P ( V ∗ D ) ∩ R eg = L ( Q ( V ∗ D )) . It is possible to show that any p -varietyof the form V ∗ D is tame. Hence the result of [PST97] mentioned above follows from ourresult as for varieties of the form V ∗ D we have, using a lot of abuse of notation, that E ( V ∗ D ) = V ∗ D and that L ( Q ( V ∗ D )) = L ( V ∗ D ∗ Mod ) ⊆ P ( V ∗ D ) . However tamevarieties and p -varieties are two different notions as J is a p -variety but is not tame as wehave seen.Our final result concerns P ( DA ) . With C k the class of languages recognized by programsof length O( n k ) over DA , we prove that C ⊂ C ⊂ · · · ⊂ C k ⊂ · · · ⊂ P ( DA ) forms a strict AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA hierarchy. We also relate this hierarchy to another algebraic characterization of DA andexhibit conditions on M ∈ DA under which any program over M can be rewritten as anequivalent subprogram (made of a subsequence of the original sequence of instructions) oflength O( n k ) , refining a result by Tesson and Thérien [TT01]. Organization of the paper.
In Section 2 we define programs over varieties of monoids, p -recognition by such programs and the necessary algebraic background. The definition oftameness for a variety V is given in Section 3 with our first result showing that regularlanguages in P ( V ) are included in L ( QEV ) when V is tame; we also briefly discuss thecase of J , which isn’t tame. We show that DA is tame in Section 4. Finally, Section 5contains the hierarchy results about P ( DA ) .2. Preliminaries
This section is dedicated to the introduction of the mathematical material used throughoutthis paper. Concerning algebraic automata theory, we only quickly review the basics andrefer the reader to the two classical references of the domain by Eilenberg [Eil74, Eil76] andPin [Pin86].General notations. Let i, j ∈ N be two natural numbers. We shall denote by [[ i, j ]] the set ofall natural numbers n ∈ N verifying i ≤ n ≤ j . We shall also denote by [ i ] the set [[1 , i ]] .Words and languages. Let Σ be a finite alphabet. We denote by Σ ∗ the set of all finite wordsover Σ . We also denote by Σ + the set of all finite non empty words over Σ , the empty wordbeing denoted by ε . Given some word w ∈ Σ , we denote its length by | w | and, for any a ∈ Σ ,by | w | a the number of occurrences of the letter a in w . A language over Σ is a subset of Σ ∗ .A language is regular if it can be defined using a regular expression. Given a language L ,its syntactic congruence ∼ L is the relation on Σ ∗ relating two words u and v whenever forall x, y ∈ Σ ∗ , xuy ∈ L if and only if xvy ∈ L . It is easy to check that ∼ L is an equivalencerelation and a congruence for concatenation. The syntactic morphism of L is the mappingsending any word u to its equivalence class in the syntactic congruence.The quotient of a language L over Σ relative to the words u and v is the language,denoted by u − Lv − , of the words w such that uwv ∈ L .Monoids, semigroups and varieties. A semigroup is a non-empty set equipped with an asso-ciative law that we will write multiplicatively. A monoid is a semigroup with an identity.An example of a semigroup is Σ + , the free semigroup over Σ . Similarly Σ ∗ is the free monoidover Σ . A morphism ϕ from a semigroup S to a semigroup T is a function from S to T suchthat ϕ ( xy ) = ϕ ( x ) ϕ ( y ) for all x, y ∈ S . A morphism of monoids additionally requires thatthe identity is preserved. Any morphism ϕ : Σ ∗ → M for Σ a finite alphabet and M somemonoid is uniquely determined by the images of the letters of Σ by ϕ . A semigroup T isa subsemigroup of a semigroup S if T is a subset of S and is equipped with the restrictedlaw of S . Additionally the notion of submonoids requires the presence of the identity. Asemigroup T divides a semigroup S if T is the image by a semigroup morphism of a sub-semigroup of S . Division of monoids is defined in the same way by replacing any occurrenceof “semigroup” by “monoid”. The Cartesian (or direct) product of two semigroups is simplythe semigroup given by the Cartesian product of the two underlying sets equipped with theCartesian product of their laws.
N. GROSSHANS, P. MCKENZIE, AND L. SEGOUFIN
A language L over Σ is recognized by a monoid M if there is a morphism h from Σ ∗ to M and a subset F of M such that L = h − ( F ) . We also say that the morphism h recognizes L .It is well known that a language is regular if and only if it is recognized by a finite monoid.Actually, as ∼ L is a congruence, the quotient Σ ∗ / ∼ L is a monoid, called the syntactic monoidof L , that recognizes L via the syntactic morphism of L . The syntactic monoid of L is finiteif and only if L is regular. The quotient Σ + / ∼ L is analogously called the syntactic semigroupof L .A variety of monoids is a non-empty class of finite monoids closed under Cartesianproduct and monoid division. A variety of semigroups is defined similarly. When dealingwith varieties, we consider only finite monoids and semigroups.An element s of a semigroup is idempotent if ss = s . For any finite semigroup S thereis a positive number (the minimum such number), the idempotent power of S , often denoted ω , such that for any element s ∈ S , s ω is idempotent.A variety can be defined by means of identities [Rei82]. The variety is then the classof monoids or semigroups such that each of them has all its elements satisfy the identities.For instance, the variety of aperiodic monoids A can be defined as the class of monoidssatisfying the identity x ω = x ω +1 , where x ranges over the elements of the monoid while ω is the idempotent power of the monoid. The variety of monoids DA is defined by theidentity ( xy ) ω = ( xy ) ω x ( xy ) ω . The variety of monoids J is defined by the identity ( xy ) ω =( xy ) ω x = y ( xy ) ω . One easily deduces that J ⊆ DA ⊆ A .Varieties of languages. A variety of languages is a class of languages over arbitrary finitealphabets closed under Boolean operations, quotients and inverses of morphisms (i.e. if L is a language in the class over a finite alphabet Σ , if Γ is some other finite alphabet and ϕ : Γ ∗ → Σ ∗ is a morphism of monoids, then ϕ − ( L ) is also in the class).Eilenberg showed [Eil76, Chapter VII, Section 3] that there is a bijective correspondencebetween varieties of monoids and varieties of languages: to each variety of monoids V wecan bijectively associate L ( V ) the variety of languages whose syntactic monoids belong to V and, conversely, to each variety of languages V we can bijectively associate M ( V ) thevariety of monoids generated by the syntactic monoids of the languages of V , and thesecorrespondences are mutually inverse.When V is a variety of semigroups, we will denote by L ( V ) the class of languageswhose syntactic semigroup belongs to V . There is also an Eilenberg-type correspondencefor an appropriate notion of language varieties, that is ne -varieties of languages, but wewon’t present it here. (The interested reader may have a look at [Str02] as well as [PS05,Lemma 6.3].)Quasi and locally V languages, modular counting and predecessor. If S is a semigroup wedenote by S the monoid S if S is already a monoid and S ∪ { } otherwise.The following definitions are taken from [PS05, CPS06b]. Let ϕ be a surjective morphismfrom Σ ∗ , for Σ some finite alphabet, to a finite monoid M : such a morphism is called a stamp . For all k consider the subset ϕ (Σ k ) of M . As M is finite there is a k such that ϕ (Σ k ) = ϕ (Σ k ) . This implies that ϕ (Σ k ) is a semigroup. The semigroup given by thesmallest such k is called the stable semigroup of ϕ and this k is called the stability index of ϕ . If is the identity of M , then ϕ (Σ k ) ∪ { } is called the stable monoid of ϕ . If V is avariety of monoids, then we shall denote by QV the class of stamps whose stable monoid isin V and by L ( QV ) the class of languages whose syntactic morphism is in QV . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA For V a variety of monoids, we say that a finite semigroup S is locally V if, for everyidempotent e of S , the monoid eSe belongs to V ; we denote by LV the class of locally- V finite semigroups, which happens to be a variety of semigroups.We now define languages recognized by V ∗ Mod and V ∗ D . We do not use thestandard algebraic definition using the wreath product as we won’t need it, but directly acharacterization of the languages recognized by such algebraic objects [CPS06a, Til87].Let V be a variety of monoids. We say that a language over Σ is in L ( V ∗ Mod ) ifit is obtained by a finite combination of unions and intersections of languages over Σ forwhich membership of each word over Σ only depends on its length modulo some integer k ∈ N > and languages L over Σ for which there is a number k ∈ N > and a language L ′ over Σ × { , · · · , k − } whose syntactic monoid is in V , such that L is the set of words w that belong to L ′ after adding to each letter of w its position modulo k .Similarly we say that a language over Σ is in L ( V ∗ D ) if it is obtained by a finitecombination of unions and intersections of languages over Σ for which membership of eachword over Σ only depends on its k ∈ N last letters and languages L over Σ for which thereis a number k ∈ N and a language L ′ over Σ × Σ ≤ k (where Σ ≤ k denotes all words over Σ oflength at most k ) whose syntactic monoid is in V , such that L is the set of words w thatbelong to L ′ after adding to each letter of w the word composed of the k (or less when nearthe beginning of w ) letters preceding that letter. The variety of semigroups V ∗ D can thenbe defined as the one generated by the syntactic semigroups of the languages in L ( V ∗ D ) as defined above.A variety V is said to be local if L ( V ∗ D ) = L ( LV ) . This is not the usual definitionof locality, defined using categories, but it is equivalent to it [Til87, Theorem 17.3]. Oneof the consequences of locality that we will use is that L ( V ∗ Mod ) = L ( QV ) when V islocal [DP14, Corollary 18], while L ( V ∗ Mod ) ⊆ L ( QV ) in general (see [Dar14, Pap14]).Programs over varieties of monoids. Programs over monoids form a non-uniform model ofcomputation, first defined by Barrington and Thérien [BT88], extending Barrington’s permu-tation branching program model [Bar89]. Let M be a finite monoid and Σ a finite alphabet.A program P over M is a finite sequence of instructions of the form ( i, f ) where i is a positiveinteger and f a function from Σ to M . The length of P is the number of its instructions. Aprogram has range n if all its instructions use a number less than n . A program P of range n defines a function from Σ n , the words of length n , to M as follows. On input w ∈ Σ n ,each instruction ( i, f ) outputs the monoid element f ( w i ) . A sequence of instructions thenyields a sequence of elements of M and their product is the output P ( w ) of the program.A language L over Σ is p -recognized by a sequence of programs ( P n ) n ∈ N if for each n , P n has range n and length polynomial in n and recognizes L ∩ Σ n , that is, there exists a subset F n of M such that L ∩ Σ n is precisely the set of words w of length n such that P n ( w ) ∈ F n .In that case, we also say that L is p -recognized by M .We denote by P ( M ) the class of languages p -recognized by a sequence of programs ( P n ) n ∈ N over M . If V is a variety of monoids we denote by P ( V ) the union of all P ( M ) for M ∈ V .The following is a simple fact about P ( V ) . Let Σ and Γ be two finite alphabets and µ : Σ ∗ → Γ ∗ be a morphism. We say that µ is length multiplying, or that µ is an lm -morphism , if there is a constant k such that for all a ∈ Σ , the length of µ ( a ) is k . Lemma 2.1. [MPT91, Corollary 3.5]
For V any variety of monoids, P ( V ) is closed underBoolean operations, quotients and inverse images of lm -morphisms. N. GROSSHANS, P. MCKENZIE, AND L. SEGOUFIN
Given two range n programs P, P ′ over some monoid M using the same input alphabet Σ , we shall say that P ′ is a subprogram , a prefix or a suffix of P whenever P ′ is, respectively,a subword, a prefix or a suffix of P , looking at P and P ′ as words over [ n ] × M Σ .3. General results about regular languages and programs
Let V be a variety of monoids. By definition any regular language recognized by a monoidin V is p -recognized by a sequence of programs over a monoid in V . Actually, since ina program over some monoid in V , the monoid element output for each instruction candepend on the position of the letter read, hence in particular on its position modulo somefixed number, it is easy to see that any regular language in L ( V ∗ Mod ) is p -recognized bya sequence of programs over some monoid in V . We will see in Section 3.2 that programsover some monoid in V can also p -recognize the regular languages that are “essentially V ”i.e. that differ from a language in L ( V ) only on the prefix and suffix of the words.In this section we characterize those varieties V such that programs over monoids in V do not recognize more regular languages than those mentioned above.We first recall the definitions and results around p -varieties developed by Péladeau,Tesson, Straubing and Thérien and then present the definition of sp -varieties that wasinspired by their work and studied in the conference version of the present paper. In orderto deal with the limitation of sp -varieties we then define the notion of essentially- V thatwill be the last ingredient for our definition of tameness. We then provide an upper boundon the regular languages that can be p -recognized by a sequence of programs over a monoidfrom a tame variety V .3.1. p - and sp -varieties of monoids. We first recall the definition of p -varieties. Theseseem to have been originally defined by Péladeau in his Ph.D. thesis [Pél90] and later usedby Tesson in his own Ph.D. thesis [Tes03]. The notion of a p -variety has also been definedfor semigroups by Péladeau, Straubing and Thérien in [PST97].Let µ be a morphism from Σ ∗ to a finite monoid M . We denote by W ( µ ) the set oflanguages L over Σ such that L = µ − ( F ) for some subset F of M . Given a semigroup S there is a unique morphism η S : S ∗ → S extending the identity on S , called the evaluationmorphism of S . We write W ( S ) for W ( η S ) . We define W ( M ) similarly for any monoid M . It is easy to see that if M ∈ V then W ( M ) ⊆ P ( V ) . The condition to be a p -varietyrequires a converse of this observation. Definition 3.1.
An p -variety of monoids is a variety V of monoids such that for any finitemonoid M , if W ( M ) ⊆ P ( V ) then M ∈ V .The following result illustrates an important property of p -varieties, when the notion isadapted to varieties of semigroups accordingly. Proposition 3.2. [PST97]
Let V ∗ D be a p -variety of semigroups, where V is a variety ofmonoids.Then P ( V ∗ D ) ∩ R eg = L ( V ∗ D ∗ Mod ) (where the latter class is defined in the sameway as L ( V ∗ Mod ) ). It is known that J is a p -variety of monoids [Tes03] but as we have seen in the introduc-tion, P ( J ) contains languages that are more complicated than those in L ( J ∗ Mod ) (see theend of this subsection for a proof). In order to capture those varieties for which programs AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA are well behaved we need a restriction of p -varieties and this brings us to the followingdefinition. Definition 3.3.
An sp -variety of monoids is a variety V of monoids such that for any finitesemigroup S , if W ( S ) ⊆ P ( V ) then S ∈ V .Hence any sp -variety of monoids is also a p -variety of monoids, but the converse is notalways true as we will see in Proposition 3.6 below that J is not an sp -variety.An example of an sp -variety of monoids is the class of aperiodic monoids A . This is aconsequence of the result that for any number k > , checking if | w | a is a multiple of k for w ∈ { a, b } ∗ cannot be done in AC = P ( A ) [FSS84, Ajt83] (we shall denote the correspondinglanguage over the alphabet { , } by MOD k ). Towards a contradiction, assume there wouldexist a semigroup S such that S is not aperiodic but still W ( S ) ⊆ P ( A ) . Then there isan x in S such that x ω = x ω +1 . Consider the morphism µ : { a, b } ∗ → S sending a to x ω +1 and b to x ω , and the language L = µ − ( x ω ) . It is easy to see that L is the language of allwords with a number of a congruent to modulo k , where k is the smallest number suchthat x ω + k = x ω . As x ω = x ω +1 , k > . Let η S : S ∗ → S be the evaluation morphism of S . The morphism ϕ : Σ ∗ → S ∗ sending each letter a ∈ Σ to µ ( a ) verifies that µ = η S ◦ ϕ ,so that L = µ − ( x ω ) = ( η S ◦ ϕ ) − ( x ω ) = ϕ − ( η − S ( x ω )) . From W ( S ) ⊆ P ( A ) it followsthat η − S ( x ω ) ∈ P ( A ) , hence since ϕ sends each letter of Σ to a letter of S , it is an lm -morphism and as P ( A ) is closed under inverses of lm -morphisms by Lemma 2.1, we have L = ϕ − ( η − S ( x ω )) ∈ P ( A ) , a contradiction.The following is the desired consequence of being an sp -variety of monoids. Proposition 3.4.
Let V be an sp -variety of monoids. Then P ( V ) ∩ R eg ⊆ L ( QV ) .Proof. Let L be a regular language in P ( M ) for some M ∈ V . Let M L be the syntacticmonoid of L and η L its syntactic morphism. Let S be the stable semigroup of η L , inparticular S = η L (Σ k ) for some k . We wish to show that S is in V .We show that W ( S ) ⊆ P ( V ) and conclude from the fact that V is an sp -variety that S ∈ V as desired. Let η S : S ∗ → S be the evaluation morphism of S . Consider m ∈ S andconsider L ′ = η − S ( m ) . We wish to show that L ′ ∈ P ( V ) . This implies that W ( S ) ⊆ P ( V ) by closure under union, Lemma 2.1.Let L ′′ = η − L ( m ) . Since m belongs to the syntactic monoid of L and η L is the syntacticmorphism of L , a classical algebraic argument [Pin86, Chapter 2, proof of Lemma 2.6]shows that L ′′ is a Boolean combination of quotients of L . By Lemma 2.1, we conclude that L ′′ ∈ P ( V ) .By definition of S , for any element s of S there is a word u s of length k such that η L ( u s ) = s . Notice that this is precisely where we need to work with S and not S .Let f : S ∗ → Σ ∗ be the lm -morphism sending s to u s and notice that L ′ = f − ( L ′′ ) . Theresult follows by closure of P ( V ) under inverse images of lm -morphisms, Lemma 2.1.We don’t know whether it is always true that for sp -varieties of monoids V , L ( QV ) isincluded into P ( V ) . But we can prove it for local varieties. Proposition 3.5.
Let V be a local sp -variety of monoids. Then P ( V ) ∩ R eg = L ( QV ) .Proof. This follows from the fact that for local varieties L ( QV ) = L ( V ∗ Mod ) (see [DP14]).The result can then be derived using Proposition 3.4, as we always have L ( V ∗ Mod ) ⊆P ( V ) . As A is local [Til87, Example 15.5] and an sp -variety, it follows from Proposition 3.5that the regular languages in P ( A ) , hence in AC , are precisely those in L ( QA ) , whichis the characterization of the regular languages in AC obtained by Barrington, Compton,Straubing and Thérien [BCST92].We will see in the next section that DA is an sp -variety. As it is also local [Alm96],we get from Proposition 3.5 that the regular languages of P ( DA ) are precisely those in L ( QDA ) .As explained in the introduction, the language ( a + b ) ∗ ac + can be p -recognized by aprogram over J . A simple algebraic argument shows that it is not in L ( QJ ) : just computethe stable monoid of the syntactic morphism of the language, which is equal to the syntacticmonoid of the language, that is not in J . Hence, by Proposition 3.4, we have the followingresult: Proposition 3.6. J is not an sp -variety of monoids. Despite Proposition 3.6 providing some explanation for the unexpected relative strengthof programs over monoids in J , the notion of an sp -variety of monoids isn’t entirely satisfac-tory.We say that a monoid is trivial when its underlying set contains a sole element. Theclass of all trivial monoids, that we will denote by I , forms a variety: it is the sole varietycontaining only trivial monoids, so we may call it the trivial variety of monoids .One observation to be made is that any non-trivial monoid M p -recognizes the languageof words over { a, b } starting with an a : for the first position in any word, just send a to anyelement that is not the identity and b to the identity. This means that for any non-trivialvariety of monoids V , we have that a ( a + b ) ∗ ∈ P ( V ) . But since the stable monoid ofthe syntactic morphism of a ( a + b ) ∗ is equal to the syntactic monoid of this language, itfollows that for any non-trivial variety of monoids V not containing the syntactic monoidof a ( a + b ) ∗ , we have P ( V ) ∩ R eg * L ( QV ) , hence that V is not an sp -variety of monoids.Therefore, many varieties of monoids actually aren’t sp -varieties of monoids simplybecause of the built-in capacity of programs over any non-trivial monoid to test the firstletter of input words. This is for example true for any non-trivial variety containing onlygroups and for any non-trivial variety containing only commutative monoids. This built-incapacity, additional to programs’ ability to do positional modulo counting that underlies thedefinition of sp -varieties, should be taken into account in the notion we are looking for tocapture “well behavior”. In order to define our notion of tameness we first study this extracapacity that is built-in for programs over V and that we call “essentially- V ”.3.2. Essentially- V stamps. It is easy to extend our reasoning above to show that givenany non-trivial monoid M and given some k ∈ N > , the language of words over { a, b } having an a in position k , that is ( a + b ) k − a ( a + b ) ∗ , is p -recognized by M , and the samegoes for ( a + b ) ∗ a ( a + b ) k − . By generalizing, we can quickly conclude that given any non-trivial variety of monoids V , for any finite alphabet Σ and any x, y ∈ Σ ∗ , we have that x Σ ∗ y ∈ P ( V ) by closure of P ( V ) under Boolean operations, Lemma 2.1. Put informally, p -recognition by monoids taken from any fixed non-trivial variety of monoids allows to checksome constant-length beginning or ending of the input words. Moreover, p -recognition bymonoids taken from any fixed non-trivial variety of monoids V also easily allows to test formembership of words in L ( V ) after stripping out some constant-length beginning or ending:that is, languages of the form Σ k L Σ k for k , k ∈ N and L ∈ L ( V ) . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA This motivates the definition of essentially- V stamps. Definition 3.7.
Let V be a variety of monoids. Let ϕ : Σ ∗ → M be a stamp from a finitealphabet Σ to a finite monoid M . Let s be the stability index of ϕ .We say that ϕ is essentially- V whenever there exists a stamp µ : Σ ∗ → N with N ∈ V such that for all u, v ∈ Σ ∗ , we have µ ( u ) = µ ( v ) ⇒ (cid:0) ϕ ( xuy ) = ϕ ( xvy ) ∀ x, y ∈ Σ s (cid:1) .We will denote by EV the class of all essentially- V stamps and by L ( EV ) the class oflanguages recognized by morphisms in EV .Informally stated, a stamp ϕ : Σ ∗ → M is essentially- V when it behaves like a stampinto a monoid of V as soon as a sufficiently long beginning and ending of any input wordhas been fixed. The value for “sufficiently long” depends on ϕ and is adequately given bythe stability index s of ϕ , as by definition of s , any word w of length at least s can alwaysbe made of length between s and s − without changing the image by ϕ .Let us start by giving some examples.Consider first the language a ( a + b ) ∗ over the alphabet { a, b } . Let’s take ϕ : { a, b } ∗ → M to be its syntactic morphism: its stability index is equal to and it has the propertythat for any w ∈ { a, b } ∗ , we have ϕ ( aw ) = ϕ ( a ) and ϕ ( bw ) = ϕ ( b ) . Hence, if we define µ : { a, b } ∗ → { } to be the obvious stamp into the trivial monoid { } , we indeed have thatfor all u, v ∈ { a, b } ∗ , it holds that µ ( u ) = µ ( v ) ⇒ (cid:0) ϕ ( xuy ) = ϕ ( xvy ) ∀ x, y ∈ { a, b } (cid:1) .In conclusion, the stamp ϕ is essentially- V for any variety of monoids, in particular a ( a + b ) ∗ ∈ L ( EI ) .Let us now consider the language a ( a + b ) ∗ b ( a + b ) ∗ a over the alphabet { a, b } of wordsstarting and ending with an a and containing some b in between. Let ϕ ′ : { a, b } ∗ → M ′ beits syntactic morphism: its stability index is equal to and it has the property that for all x, y ∈ { a, b } + , given any u, v ∈ { a, b } ∗ verifying that the letter b appears in u if and onlyif it appears in v , it holds that ϕ ′ ( xuy ) = ϕ ′ ( xvy ) . Hence, if we define µ ′ : { a, b } ∗ → N ′ tobe the syntactic morphism of the language ( a + b ) ∗ b ( a + b ) ∗ , it is direct to see that for all u, v ∈ { a, b } ∗ , it holds that µ ′ ( u ) = µ ′ ( v ) ⇒ (cid:0) ϕ ′ ( xuy ) = ϕ ′ ( xvy ) ∀ x, y ∈ { a, b } (cid:1) .So we can conclude that the stamp ϕ ′ is essentially- V for any variety of monoids containingthe syntactic monoid of ( a + b ) ∗ b ( a + b ) ∗ , in particular a ( a + b ) ∗ b ( a + b ) ∗ a ∈ L ( EJ ) . However,note that ϕ ′ / ∈ EI because we have ϕ ′ (cid:0) ( aaa ) a ( aaa ) (cid:1) = ϕ ′ (cid:0) ( aaa ) b ( aaa ) (cid:1) .It is now easy to prove that as long as V is non-trivial, polynomial-length programsover monoids from V do have the built-in capacity to recognize any language recognized byan essentially- V stamp. Proposition 3.8.
For any non-trivial variety of monoids V , we have L ( EV ) ⊆ P ( V ) .Proof. Let ϕ : Σ ∗ → M for Σ a finite alphabet and M a finite monoid be a stamp in EV .By definition, given the stability index s of ϕ , there exists a stamp µ : Σ ∗ → N with N ∈ V such that for all u, v ∈ Σ ∗ , we have µ ( u ) = µ ( v ) ⇒ (cid:0) ϕ ( xuy ) = ϕ ( xvy ) ∀ x, y ∈ Σ s (cid:1) . This class actually is an ne -variety of stamps, as defined in [Str02]. Let F ⊆ M . By definition of µ , given m ∈ N and x, y ∈ Σ s , we either have that xµ − ( m ) y ⊆ ϕ − ( F ) or that xµ − ( m ) y ∩ ϕ − ( F ) = ∅ . This entails that there exist B ⊆ Σ ≤ s − and I ⊆ Σ s × N × Σ s such that ϕ − ( F ) = B ∪ [ ( x,m,y ) ∈ I xµ − ( m ) y .We claim that { w } ∈ P ( V ) for any w ∈ Σ ≤ s − and also that xµ − ( m ) y ∈ P ( V ) for any x, y ∈ Σ s and m ∈ N . So, by closure of P ( V ) under Boolean operations, Lemma 2.1, itfollows that ϕ − ( F ) ∈ P ( V ) . Since this is true for any F , we have that W ( ϕ ) ⊆ P ( V ) andas this is itself true for all ϕ , we can conclude that L ( EV ) ⊆ P ( V ) .The claim remains to be proven.Let k ∈ N > and a ∈ Σ . Since V is non-trivial, there exists a non-trivial N ′ ∈ V : weshall denote its identity by and by z one of its elements distinct from the identity, chosenarbitrarily. It is easy to see that the language Σ k − a Σ ∗ is p -recognized by the sequence ofprograms ( P n ) n ∈ N over N ′ such that for all n ∈ N , we have P n = ( ( k, f ) if n ≥ kε otherwisewhere f : Σ → N ′ is defined by f ( b ) = ( z if b = a otherwise for all b ∈ Σ . We prove the same for Σ ∗ a Σ k − symmetrically.It then follows by closure of P ( V ) under Boolean operations, Lemma 2.1, that { w } ∈P ( V ) for any w ∈ Σ ≤ s − and that x Σ ∗ y ∈ P ( V ) for any x, y ∈ Σ s .Finally, let m ∈ N . It is direct to show that there exists L m ⊆ Σ ∗ in P ( V ) verifyingthat L m ∩ Σ s Σ ∗ Σ s = Σ s µ − ( m )Σ s : just build the sequence of programs ( Q n ) n ∈ N over N such that for all n ∈ N , we have Q n = ( ( s + 1 , g )( s + 2 , g ) · · · ( n − s, g ) if n ≥ s + 1 ε otherwisewhere g : Σ → N is defined by g ( b ) = µ ( b ) for all b ∈ Σ . We can then conclude that xµ − ( m ) y ∈ P ( V ) for any x, y ∈ Σ s by closure of P ( V ) under Boolean operations, Lemma 2.1,and this holds for any m .3.3. Tameness.
We are now ready to define tameness.We will say that a stamp ϕ : Σ ∗ → M for Σ a finite alphabet and M a finite monoid is stable whenever ϕ (Σ ) = ϕ (Σ) , i.e. the stability index of ϕ is . Definition 3.9.
A variety of monoids V is said to be tame whenever for any stable stamp ϕ : Σ ∗ → M with Σ a finite alphabet and M a finite monoid, if W ( ϕ ) ⊆ P ( V ) then ϕ ∈ EV .Let us first mention that tameness is a generalization of sp -varieties of monoids. Proposition 3.10.
Any sp -variety of monoids is tame.Proof. Let V be an sp -variety of monoids.Let ϕ : Σ ∗ → M with Σ a finite alphabet and M a finite monoid be a stable stamp suchthat W ( ϕ ) ⊆ P ( V ) . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA Let S = ϕ (Σ + ) : as ϕ is stable, we have S = ϕ (Σ) . Let ρ : S → Σ be an arbitrarymapping from S to Σ such that ϕ ( ρ ( s )) = s . Consider η S : S ∗ → S the evaluation morphismof S : the unique morphism f : S ∗ → Σ ∗ sending each letter s ∈ S to ρ ( s ) verifies that η S = ϕ ◦ f . Now, given any F ⊆ S , we have η − S ( F ) = f − ( ϕ − ( F )) , but since ϕ − ( F ) ∈ P ( V ) and as f is an lm -morphism because it sends each letter of S to a letter of Σ , it follows that η − S ( F ) ∈ P ( V ) by closure of P ( V ) under inverses of lm -morphisms, Lemma 2.1. Therefore, W ( S ) ⊆ P ( V ) .Since V is an sp -variety of monoids, this entails that M = S belongs to V , and therefore ϕ ∈ EV . As this is true for any stable stamp ϕ such that W ( ϕ ) ⊆ P ( V ) , we can concludethat V is tame.The notion of essentially- V stamps can be adapted to varieties of semigroups in astraightforward way. We can then define a notion of tameness for varieties of semigroupsaccordingly. The exact same proof than the one above then goes through to allow us toshow that p -varieties of the form V ∗ D are tame.However there exist varieties of monoids that are tame but not sp -varieties. We give anexample of such a variety in Subsection 3.4.Programs over monoids taken from tame varieties of monoids have the expected behavioras we show next.Let ϕ : Σ ∗ → M be a stamp of stability index s , for Σ a finite alphabet and M a finitemonoid. The stable stamp of ϕ is the unique stamp ϕ ′ : (Σ s ) ∗ → M ′ such that ϕ ′ ( u ) = ϕ ( u ) for all u ∈ Σ s and M ′ is the stable monoid of ϕ . For any variety of monoids V we let QEV be the class of stamps whose stable stamp is essentially- V and, accordingly, we define L ( QEV ) as the class of languages whose syntactic morphism is in QEV . Proposition 3.11.
Any variety of monoids V is tame if and only if P ( V ) ∩R eg ⊆ L ( QEV ) .Proof. Let V be a variety of monoids.Left-to-right implication. Assume first that V is tame. For this direction, the proof followsthe same lines as those of Proposition 3.4.Let L ∈ P ( V ) ∩ R eg over some finite alphabet Σ and let η : Σ ∗ → M be the syntacticmorphism of L . For any m ∈ M , a classical algebraic argument [Pin86, Chapter 2, proofof Lemma 2.6] shows that η − ( m ) is a Boolean combination of quotients of L , so η − ( m ) ∈P ( V ) by Lemma 2.1.Now let s be the stability index of η , let M ′ be its stable monoid and take η ′ : (Σ s ) ∗ → M ′ to be the stable stamp of η . The unique morphism f : (Σ s ) ∗ → Σ ∗ such that f ( u ) = u for all u ∈ Σ s is an lm -morphism and verifies that η ′ = η ◦ f . Hence, for all m ′ ∈ M ′ , we have that η ′− ( m ′ ) = f − ( η − ( m ′ )) , so that η ′− ( m ′ ) ∈ P ( V ) by closure of P ( V ) under inverses of lm -morphisms, Lemma 2.1. Thus, since inverses of monoid morphisms commute with unionand P ( V ) is closed under unions (Lemma 2.1), we can conclude that η ′− ( F ) ∈ P ( V ) forall F ⊆ M ′ , i.e. W ( η ′ ) ⊆ P ( V ) .But as η ′ is stable, by tameness of V , this entails that η ′ ∈ EV , so that L ∈ L ( QEV ) .Right-to-left implication. Assume now that P ( V ) ∩ R eg ⊆ L ( QEV ) . Let ϕ : Σ ∗ → M for Σ a finite alphabet and M a finite monoid be a stable stamp verifying W ( ϕ ) ⊆ P ( V ) .For any m ∈ M , we therefore have ϕ − ( m ) ∈ L ( QEV ) . Let η m : Σ ∗ → M m be thesyntactic morphism of the language ϕ − ( m ) , we thus have η m ∈ QEV . We first claimthat η m is a stable stamp. To see this notice first that for all u, v ∈ Σ ∗ we have ϕ ( u ) = ϕ ( v ) ⇒ η m ( u ) = η m ( v ) . Indeed assume that ϕ ( u ) = ϕ ( v ) , then for all x, y ∈ Σ ∗ wehave ϕ ( xuy ) = ϕ ( xvy ) hence we have xuy ∈ ϕ − ( m ) iff xvy ∈ ϕ − ( m ) which entails η m ( u ) = η m ( v ) by definition of the syntactic morphism. It follows that η m (Σ ) = η m (Σ) as ϕ (Σ ) = ϕ (Σ) .Since η m is equal to its stable stamp and η m ∈ QEV , it follows that η m ∈ EV . Thereforethere exists a stamp µ m : Σ ∗ → N m with N m ∈ V such that for all u, v ∈ Σ ∗ , we have µ m ( u ) = µ m ( v ) ⇒ (cid:0) η m ( xuy ) = η m ( xvy ) ∀ x, y ∈ Σ (cid:1) .Now, we define the unique stamp µ : Σ ∗ → N such that µ ( a ) = Q m ∈ M µ m ( a ) for all a ∈ Σ and N is the submonoid of Q m ∈ M N m generated by the set { Q m ∈ M µ m ( a ) | a ∈ Σ } .As V is a variety, N ∈ V . Take u, v ∈ Σ ∗ and assume µ ( u ) = µ ( v ) : this means that µ m ( u ) = µ m ( v ) for all m ∈ M . Let x, y ∈ Σ . We then have in particular µ ϕ ( xuy ) ( u ) = µ ϕ ( xuy ) ( v ) .This implies by definition of µ ϕ ( xuy ) that η ϕ ( xuy ) ( xuy ) = η ϕ ( xuy ) ( xvy ) . As η ϕ ( xuy ) is thesyntactic morphism of ϕ − ( ϕ ( xuy )) , it follows that ϕ ( xvy ) = ϕ ( xuy ) . And this is true forany x, y ∈ Σ .In conclusion, µ witnesses the fact that ϕ is essentially- V .As for the case of sp -varieties of monoids, we don’t know whether it is always true thatfor a tame variety of monoids V , L ( QEV ) is included in P ( V ) . If this were the case thenfor tame varieties of monoids V we would have P ( V ) ∩ R eg = L ( QEV ) . We conjecturethis to be at least true for varieties of monoids that are local.We conclude this subsection by showing that J , that is not an sp -variety of monoids(Proposition 3.6), isn’t tame either. Proposition 3.12. J is not tame.Proof. To show this, we show that ( a + b ) ∗ ac + , that belongs to P ( J ) , does not belong to L ( QEJ ) .We first claim that any essentially- J stamp ϕ : Σ ∗ → M of stability index s for Σ afinite alphabet and M a finite monoid verifies that there exists some k ∈ N > such that ϕ ( x ( uv ) k y ) = ϕ ( x ( uv ) k uy ) for all u, v ∈ Σ ∗ and x, y ∈ Σ s . Indeed, by definition there existsa stamp µ : Σ ∗ → N with N ∈ J such that for all u, v ∈ Σ ∗ , we have µ ( u ) = µ ( v ) ⇒ (cid:0) ϕ ( xuy ) = ϕ ( xvy ) ∀ x, y ∈ Σ s (cid:1) .If we set ω to be the idempotent power of N , we have that for all u, v ∈ Σ ∗ , µ (cid:0) ( uv ) ω (cid:1) = (cid:0) µ ( u ) µ ( v ) (cid:1) ω = (cid:0) µ ( u ) µ ( v ) (cid:1) ω µ ( u ) = µ (cid:0) ( uv ) ω u (cid:1) by the identities for J . Hence, we have that ϕ ( x ( uv ) ω y ) = ϕ ( x ( uv ) ω uy ) for all u, v ∈ Σ ∗ and x, y ∈ Σ s .Let us now consider the syntactic morphism η : { a, b, c } ∗ → M of the language ( a + b ) ∗ ac + . As already mentioned for Proposition 3.6, the stable monoid of η is equal tothe syntactic monoid M . Moreover, the stability index of η is . Therefore, the sta-ble stamp of η is the unique stamp η ′ : ( { a, b, c } ) ∗ → M such that η ′ ( u ) = η ( u ) for all u ∈ { a, b, c } . By what we have shown just above, since the stability index of η ′ is , if η ′ were essentially- J , there should exist some k ∈ N > such that η ′ ( x ( uv ) k y ) = η ′ ( x ( uv ) k uy ) for all u, v ∈ ( { a, b, c } ) ∗ and x, y ∈ { a, b, c } . However, for all k ∈ N > , we do have that ( aa ) (cid:0) ( bb )( aa ) (cid:1) k ( cc ) ∈ ( a + b ) ∗ ac + while ( aa ) (cid:0) ( bb )( aa ) (cid:1) k ( bb )( cc ) / ∈ ( a + b ) ∗ ac + , which impliesthat η ′ (cid:0) ( aa ) (cid:0) ( bb )( aa ) (cid:1) k ( cc ) (cid:1) = η ′ (cid:0) ( aa ) (cid:0) ( bb )( aa ) (cid:1) k ( bb )( cc ) (cid:1) AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA for all k ∈ N > . Therefore, it follows that the stable stamp η ′ of η is not essentially- J , sowe can conclude that ( a + b ) ∗ ac + / ∈ L ( QEJ ) .3.4. The example of finite commutative monoids.
The variety
Com of finite commu-tative monoids is defined by the identity xy = yx and L ( Com ) is the class of languagesthat are Boolean combinations of languages of the form { w ∈ Σ ∗ | | w | a ≡ k mod p } for k ∈ [[0 , p − and p prime or { w ∈ Σ ∗ | | w | a = k } for k ∈ N with Σ any finite alphabet and a ∈ Σ (see [Eil76, Chapter VIII, Example 3.5]).Since the syntactic monoid of the language a ( a + b ) ∗ is not commutative, by the discus-sion at the end of Subsection 3.1, we know that Com is not an sp -variety of monoids. It is,however, tame, as we are going to prove now.We first give a sufficient equational characterisation for any stable stamp ϕ to beessentially- Com . Lemma 3.13.
Let ϕ : Σ ∗ → M for Σ a finite alphabet and M a finite monoid be a stablestamp verifying that for any x, y, e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) are idempotents, we have ϕ ( exyf ) = ϕ ( eyxf ) .Then, ϕ ∈ ECom .Proof.
Let us define the equivalence relation ∼ on Σ ∗ by u ∼ v for u, v ∈ Σ ∗ whenever ϕ ( xuy ) = ϕ ( xvy ) for all x, y ∈ Σ . This equivalence relation is actually a congruence,because given u, v ∈ Σ ∗ verifying u ∼ v , for all s, t ∈ Σ ∗ we have sut ∼ svt since for any x, y ∈ Σ , it holds that ϕ ( xsuty ) = ϕ ( x ′ uy ′ ) = ϕ ( x ′ vy ′ ) = ϕ ( xsvty ) where x ′ , y ′ ∈ Σ verify ϕ ( xs ) = ϕ ( x ′ ) and ϕ ( ty ) = ϕ ( y ′ ) .We observe that, since the stability index of ϕ is equal to , ϕ verifies that ϕ ( euvf ) = ϕ ( evuf ) for all u, v ∈ Σ ∗ and e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) are idempotents. Now take u, v ∈ Σ ∗ and x, y ∈ Σ . Since ϕ (Σ) is a finite semigroup and verifies that ϕ (Σ) = ϕ (Σ) , by aclassical result in finite semigroup theory (see e.g. [Pin86, Chapter 1, Proposition 1.12]), wehave that there exist x , e, x , y , f, y ∈ Σ such that ϕ ( x ex ) = ϕ ( x ) and ϕ ( y f y ) = ϕ ( y ) with ϕ ( e ) and ϕ ( f ) idempotents. Therefore, it follows that ϕ ( xuvy ) = ϕ ( x ex uvy f y )= ϕ ( x euvy x f y )= ϕ ( x euvy x f f y )= ϕ ( x ey x f uvf y )= ϕ ( x ey x f vuf y )= ϕ ( x evuy x f f y )= ϕ ( x evuy x f y )= ϕ ( x ex vuy f y )= ϕ ( xvuy ) .Thus, we have that uv ∼ vu for all u, v ∈ Σ ∗ , implying that Σ ∗ / ∼∈ Com . We can eventuallyconclude that the stamp µ : Σ ∗ → Σ ∗ / ∼ defined by µ ( w ) = [ w ] ∼ for all w ∈ Σ ∗ witnesses,by construction, the fact that ϕ is essentially- Com . The following lemma then asserts that any stable stamp ϕ such that W ( ϕ ) ⊆ P ( Com ) actually verifies the equation of the previous lemma, which allows us to conclude that Com is tame by combining those two lemmas.
Lemma 3.14.
Let ϕ : Σ ∗ → M for Σ a finite alphabet and M a finite monoid be a stablestamp such that W ( ϕ ) ⊆ P ( Com ) . Then, for any x, y, e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) areidempotents, we have ϕ ( exyf ) = ϕ ( eyxf ) .Proof. Let us first observe that for any program P over some finite commutative monoid N using the input alphabet Σ and of range n ∈ N , there exist a program P ′ over N using thesame input alphabet and of same range such that P ′ = Q ni =1 ( i, h i ) verifying P ( w ) = P ′ ( w ) for all w ∈ Σ n [Tes03, Example 3.4]. We call P ′ a single-scan program.The assumption that W ( ϕ ) ⊆ P ( Com ) thus means that for all F ⊆ M , there exists asequence ( P F,n ) n ∈ N of single-scan programs over some N F ∈ Com that recognizes ϕ − ( F ) .For all x, y, e, f, g ∈ Σ such that ϕ ( e ) , ϕ ( f ) and ϕ ( g ) are idempotents, we claim that ϕ ( exf yg ) = ϕ ( eyf xg ) (3.1) ϕ ( exyf ) = ϕ ( eyef xf ) . (3.2)Assuming the claim, take x, y, e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) are idempotents. Wehave that ϕ ( ef ef ) = ϕ ( ef f ef ) = ϕ ( eef f f ) = ϕ ( ef ) ,the middle equality being from (3.1). This implies that ϕ ( ef ) is an idempotent. As ϕ (Σ ) = ϕ (Σ) , we have that there exists g ∈ Σ such that ϕ ( ef ) = ϕ ( g ) , hence ϕ ( exyf ) = ϕ ( eyef xf ) = ϕ ( eygxf ) = ϕ ( exgyf ) = ϕ ( exef yf ) = ϕ ( eyxf ) ,the first and last equalities being from (3.2) and the middle one from (3.1).Thus, the lemma will be proven once we will have proven that (3.1) and (3.2) hold forall x, y, e, f, g ∈ Σ such that ϕ ( e ) , ϕ ( f ) and ϕ ( g ) are idempotents.(3.1) holds. Let x, y, e, f, g ∈ Σ such that ϕ ( e ) , ϕ ( f ) and ϕ ( g ) are idempotents. Set F = { ϕ ( exf yg ) } and n = 2( | N F | + 1) + 1 and assume P F,n = Q ni =1 ( i, h i ) . Then, since thefunction ∆ : [[1 , | N F | + 1]] → N F j ( h j ( x ) , h j ( y )) cannot be injective, there must exist j , j ∈ [[1 , | N F | +1]] , j < j such that h j ( x ) = h j ( x ) and h j ( y ) = h j ( y ) . So P F,n ( e j − xf j − − j yg n − j ) = P F,n ( e j − yf j − − j xg n − j ) ,hence as e j − xf j − − j yg n − j ∈ ϕ − ( F ) because ϕ ( e j − xf j − − j yg n − j ) = ϕ ( exf yg ) ,we must have e j − yf j − − j xg n − j ∈ ϕ − ( F ) . Thus, we have ϕ ( e j − yf j − − j xg n − j ) = ϕ ( eyf xg ) = ϕ ( exf yg ) .So for all x, y, e, f, g ∈ Σ such that ϕ ( e ) , ϕ ( f ) and ϕ ( g ) are idempotents, we havethat (3.1) holds. AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA (3.2) holds. Let x, y, e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) are idempotents. Set F = { ϕ ( exyf ) } and n = 4(2 | N F | + 1) and assume P F,n = Q ni =1 ( i, h i ) . Then, we have that the function ∆ : [[1 , | N F | + 1]] → N F j ( h j − ( x ) , h j − ( f ) , h j − ( y ) , h j − ( e )) verifies that there exists ( m , m , m , m ) ∈ N F such that (cid:12)(cid:12) ∆ − (( m , m , m , m )) (cid:12)(cid:12) ≥ .Therefore, there exist j , j , j ∈ [[1 , | N F | + 1]] , j < j < j such that h j − ( x ) = h j − ( x ) , h j − ( f ) = h j − ( f ) , h j − ( y ) = h j − ( y ) and h j − ( e ) = h j − ( e ) . So P F,n ( e j − xyf n − j +1 ) = P F,n ( e j − ye j − j ) − f ef j − j ) − xf n − j +2 ) ,hence as e j − xyf n − j +1 ∈ ϕ − ( F ) because ϕ ( e j − xyf n − j +1 ) = ϕ ( exyf ) ,we must have e j − ye j − j ) − f ef j − j ) − xf n − j +2 ∈ ϕ − ( F ) . Thus, we have ϕ ( exyf ) = ϕ ( e j − ye j − j ) − f ef j − j ) − xf n − j +2 )= ϕ ( eyef ef xf )= ϕ ( eyef xf ) .So for all x, y, e, f ∈ Σ such that ϕ ( e ) and ϕ ( f ) are idempotents, we have that (3.2)holds. 4. The case of DA In this section, we prove that DA is an sp -variety of monoids, which implies that it istame. Combined with the fact that DA is local [Alm96], we obtain the following result byProposition 3.5. Theorem 4.1. P ( DA ) ∩ R eg = L ( QDA ) . The result follows from the following main technical contribution:
Proposition 4.2. ( c + ab ) ∗ , ( b + ab ) ∗ and b ∗ (( ab ∗ ) k ) ∗ for any integer k ≥ are regularlanguages not in P ( DA ) . Before proving the proposition we first show that it implies that DA is an sp -variety offinite monoids. This implication is a consequence of the following lemma, which is a resultinspired by an observation in [TT02] stating that non-membership of a given finite monoid M in DA implies non-aperiodicity of M or division of it by (at least) one of two specificfinite monoids. Lemma 4.3.
Let S be a finite semigroup such that S / ∈ DA . Then, one of ( c + ab ) ∗ , ( b + ab ) ∗ or b ∗ (( ab ∗ ) k ) ∗ for some k ∈ N , k ≥ is recognized by a morphism µ : Σ ∗ → S , for Σ the appropriate alphabet, such that µ (Σ + ) ⊆ S .Proof. Let ω ∈ N > be the idempotent power of S . Aperiodic case. Assume first that S is aperiodic. Then, since S / ∈ DA , there exist x, y in S such that ( xy ) ω = ( xy ) ω x ( xy ) ω .Set e = ( xy ) ω , f = ( yx ) ω , s = ex and t = ye . Our hypothesis says that exe = e . Wenow have two cases, depending on whether f yf = f or not.Subcase f yf = f . Suppose f yf = f . In that case, let µ : { a, b, c } ∗ → S be the morphismsending a to s , b to t and c to e and consider the language L = µ − ( { , e } ) . We are nowgoing to show that no word of L can contain aa , bb , ac or cb as a factor. • Assume that L contains a word w with two consecutive a ’s. Then w = w aaw with w , w ∈ { a, b, c } ∗ and as w ∈ L , either e = µ ( w ) exexµ ( w ) or µ ( w ) exexµ ( w ) . Inboth cases e = u exeu for some suitable values of u and u taken from S . This impliesthat e = u e ( xeu ) = u e ( xeu ) = u e ( xeu ) = · · · = u ω e ( xeu ) ω and, similarly, that e = ( u ex ) ω eu ω . Because S is aperiodic, this in turn entails exeu = u ω e ( xeu ) ω ( xeu ) = u ω e ( xeu ) ω = e and eu = ( u ex ) ω eu ω u = ( u ex ) ω eu ω = e .Hence exe = exeu = e , contradicting the fact that exe = e . So L does not contain anyword with two consecutive a ’s. • Assume that L contains a word w with the factor ac . Then w = w acw with w , w ∈{ a, b, c } ∗ and as w ∈ L , either e = µ ( w ) exeµ ( w ) or µ ( w ) exeµ ( w ) . So, as justbefore, in both cases e = u exeu for some suitable values of u and u taken from S ,which entails exe = e , contradicting the fact exe = e . So L does not contain any wordwith the factor ac . • Assume that L contains a word w with two consecutive b ’s. Then w = w bbw with w , w ∈ { a, b, c } ∗ and as w ∈ L , either e = µ ( w ) f yf yµ ( w ) or µ ( w ) f yf yµ ( w ) ,as ye = y ( xy ) ω = ( yx ) ω y = f y . In both cases f = u f yf u for some suitable valuesof u and u taken from S , because, by aperiodicity of S , we have yex = y ( xy ) ω x =( yx ) ω +1 = ( yx ) ω = f . Similarly to what we did for the factor aa , this implies that f = u ω f ( yf u ) ω = ( u f y ) ω f u ω , which in turn entails f = f yf u = f u . Hence f yf = f yf u = f , contradicting the fact that f yf = f . So L does not contain any word withtwo consecutive b ’s. • Assume that L contains a word w with the factor cb . Then w = w cbw with w , w ∈{ a, b, c } ∗ and as w ∈ L , either e = µ ( w ) eyeµ ( w ) or µ ( w ) eyeµ ( w ) . So, similarly towhat we did for the factor aa , in both cases e = u eyeu for some suitable values of u and u taken from S , which entails eye = e . Now this means that eye = eyeye = yef yf y = f y since ye = f yf yf yx = f yxf yf = f as f yx = ( yx ) ω yx = ( yx ) ω +1 = ( yx ) ω = f ,contradicting the fact f yf = f . So L does not contain any word with the factor cb . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA Because L is a language over the alphabet { a, b, c } , any word w in it is of the form u v u · · · u k − v k u k where k ∈ N , v , . . . , v k ∈ c + and u , . . . , u k ∈ ( a + b ) ∗ . As w does notcontain aa nor bb as a factor, we have that u , . . . , u k ∈ ( b + ε )( ab ) ∗ ( a + ε ) . When k ≥ ,as moreover w does not contain ac nor cb as a factor, it follows that u , . . . , u k − ∈ ( ab ) ∗ , u ∈ ( b + ε )( ab ) ∗ and u k ∈ ( ab ) ∗ ( a + ε ) ; u can therefore be written as βu ′ where u ′ ∈ ( ab ) ∗ and β is b if u ∈ b ( ab ) ∗ and the empty word otherwise, and u k can be written as u ′ k α where u ′ k ∈ ( ab ) ∗ and α is a if u ∈ ( ab ) ∗ a and the empty word otherwise. We now observe that µ ( ab ) = exye = ( xy ) ω +1 = ( xy ) ω = e by aperiodicity and we consider four different cases. • β = α = ε .Then, µ ( w ) = µ ( u ′ v u · · · u k − v k u ′ k ) = e . • β = b and α = ε .Then µ ( w ) = µ ( b ) µ ( u ′ v u · · · u k − v k u ′ k ) = yee = ye that does not belong to { , e } ,otherwise we would have eye = e which would entail f yf = f , as shown in the previousparagraph. But this contradicts the fact that w ∈ L , so this case cannot occur. • β = ε and α = a .Then µ ( w ) = µ ( u ′ v u · · · u k − v k u ′ k ) µ ( a ) = eex = ex that does not belong to { , e } ,otherwise we would have exe = e . But this contradicts the fact that w ∈ L , so this casecannot occur. • β = b and α = a .Then µ ( w ) = µ ( b ) µ ( u ′ v u · · · u k − v k u ′ k ) µ ( a ) = yeeex = yex = f by aperiodicity. Wehave that f does not belong to { , e } . Indeed, suppose for the sake of contradictionthat it does: there are two cases to examine. Either ( yx ) ω = f = e = ( xy ) ω , and then exe = exf = ( xy ) ω x ( yx ) ω = ( xy ) ω ( xy ) ω x = ( xy ) ω x = ex . But ex = ( xy ) ω x = x ( yx ) ω = x ( xy ) ω xy = xexy by aperiodicity, so ex = x ω exy ω . Hence exy = x ω exy ω y = x ω exy ω = ex by aperiodicity, while exy = ( xy ) ω xy = ( xy ) ω = e by aperiodicity again. So exe = ex = e ,contradicting the fact exe = e . Or ( yx ) ω = f = 1 , and then f yf = y . But y = y ( yx ) ω = y ( yx ) ω yx = yyx by aperiodicity, so y = y ω yx ω . Hence yx = y ω yx ω x = y ω yx ω = y byaperiodicity, while yx = yx ( yx ) ω = ( yx ) ω = f by aperiodicity again. So f yf = y = f ,contradicting the fact f yf = f . Therefore, µ ( w ) does not belong to { , e } , contradictingthe fact that w ∈ L , so this case cannot occur either.This means that, necessarily, α = β = ε , so that u , u k ∈ ( ab ) ∗ . And for the same reasons, u ∈ ( ab ) ∗ when k = 0 . Therefore, we have w ∈ ( c + ab ) ∗ and since it is true for any w ∈ L ,it follows that L ⊆ ( c + ab ) ∗ . Combined with the fact that µ (( c + ab ) ∗ ) = { , e } , we canconclude that µ − ( { , e } ) = L = ( c + ab ) ∗ , showing ( c + ab ) ∗ is recognized by µ verifying µ ( { a, b, c } + ) ⊆ S .Subcase f yf = f . Suppose now f yf = f . In that case, let µ : { a, b } ∗ → S be the morphismsending a to s and b to t and consider the language L = µ − ( { , e, t } ) . Assume that L contains a word w with two consecutive a ’s. Then w = w aaw with w , w ∈ { a, b } ∗ andas w ∈ L , we have that µ ( w ) exexµ ( w ) is equal to t , e or . Since xt = xye = xy ( xy ) ω =( xy ) ω = e by aperiodicity, in all cases e = u exeu for some suitable values of u and u taken from S , which, as for the subcase f yf = f , implies exe = e , contradicting the fact exe = e . So L does not contain any word with two consecutive a ’s.This means that any word in L belongs to ( b + ab ) ∗ ( a + ε ) so that any word w in L is of theform uα where u ∈ ( b + ab ) ∗ and α is a if w ∈ ( b + ab ) ∗ a and the empty word otherwise. Since,as for the previous case, µ ( ab ) = e , but also µ ( bb ) = tt = yeye = f yf y = f y = ye = t = µ ( b ) , te = yee = ye = t and et = eye = ef y = xf yf y = xf y = e (by aperiodicity), we have that µ ( u ) ∈ { , e, t } . Assume now that α = a . There are three different cases. • µ ( u ) = 1 .Then µ ( w ) = 1 µ ( a ) = ex that does not belong to { , e, t } , otherwise we would have exe = e , because ete = et = e by the equalities proved just above. But this contradictsthe fact that w ∈ L , so this case cannot occur. • µ ( u ) = e .Then µ ( w ) = eµ ( a ) = eex = ex that does not belong to { , e, t } (see the previous case).But this contradicts the fact that w ∈ L , so this case cannot occur. • µ ( u ) = t .Then µ ( w ) = tµ ( a ) = yeex = yex = f by aperiodicity. We have that f does not belongto { , e, t } . Indeed, suppose for the sake of contradiction that is does: there are threecases to examine. Either ( yx ) ω = f = t = ye = y ( xy ) ω , and then exe = ( xy ) ω x ( xy ) ω = x ( yx ) ω ( xy ) ω = xy ( xy ) ω ( xy ) ω = ( xy ) ω = e by aperiodicity, contradicting the fact exe = e .Or ( yx ) ω = f = e = ( xy ) ω , and then we have exe = ( xy ) ω x ( xy ) ω = ( xy ) ω x ( yx ) ω =( xy ) ω x ( yx ) ω y ( yx ) ω = ( xy ) ω ( xy ) ω +1 ( xy ) ω = ( xy ) ω = e by aperiodicity and since f yf = f ,contradicting the fact exe = e . Or ( yx ) ω = f = 1 , and then y = f yf = f = 1 . But e = ( xy ) ω = x ω , so exe = x ω xx ω = x ω = e , contradicting the fact exe = e . Therefore, µ ( w ) does not belong to { , e, t } , contradicting the fact that w ∈ L , so this case cannotoccur either.This means that, necessarily, α = ε , so that w ∈ ( b + ab ) ∗ and since it is true for any w ∈ L ,it follows that L ⊆ ( b + ab ) ∗ . Combined with the fact that µ (( b + ab ) ∗ ) = { , e, t } , we canconclude that µ − ( { , e, t } ) = L = ( b + ab ) ∗ , showing ( b + ab ) ∗ is recognized by µ verifying µ ( { a, b } + ) ⊆ S .Non-aperiodic case. Assume now that S is not aperiodic. Then there is an x in S suchthat x ω = x ω +1 . Consider the morphism µ : { a, b } ∗ → S sending a to x ω +1 and b to x ω ,and the language L = µ − ( x ω ) . Let k ∈ N , k ≥ be the smallest positive integer such that x ω + k = x ω , that cannot be because x ω = x ω +1 . Using this, for all w ∈ { a, b } ∗ , we have µ ( w ) = x | w |· ω + | w | a = x ω +( | w | a mod k ) ,where | w | indicates the length of w and | w | a the number of a ’s it contains, so that w belongsto L if and only if | w | a = 0 mod k . Hence, L is the language of all words with a numberof a ’s divisible by k , b ∗ (( ab ∗ ) k ) ∗ . In conclusion, b ∗ (( ab ∗ ) k ) ∗ is recognized by µ verifying µ ( { a, b } + ) ⊆ S .Let now S be any finite semigroup such that W ( S ) ⊆ P ( DA ) . Let η S : S ∗ → S be theevaluation morphism of S . To show that S is in DA , we assume for the sake of contradictionthat it is not the case. Then Lemma 4.3 tells us that one of ( c + ab ) ∗ , ( b + ab ) ∗ or b ∗ (( ab ∗ ) k ) ∗ for some k ∈ N , k ≥ is recognized by a morphism µ : Σ ∗ → S , for Σ the appropriatealphabet, such that µ (Σ + ) ⊆ S .In all cases, we thus have a language L ⊆ Σ ∗ equal to µ − ( Q ) for some subset Q of S with the morphism µ sending letters of Σ to elements of S . Consider then the morphism ϕ : Σ ∗ → S ∗ sending each letter a ∈ Σ to µ ( a ) , a letter of S : we have µ = η S ◦ ϕ , so that L = ϕ − ( η − S ( Q )) . As W ( S ) ⊆ P ( DA ) , we have that η − S ( Q ) ∈ P ( DA ) , hence since ϕ isan lm -morphism and P ( DA ) is closed under inverses of lm -morphisms by Lemma 2.1, wehave L = ϕ − ( η − S ( Q )) ∈ P ( DA ) : a contradiction to Proposition 4.2. AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA In the remaining part of this section we prove Proposition 4.2.Proof of Proposition 4.2. The idea of the proof is the following. We work by contradictionand assume that we have a sequence of programs over some monoid M of DA decidingone of the targeted language. Let n be much larger than the size of M , and let P n be theprogram running on words of length n . Consider a language of the form ∆ ∗ for some finiteset ∆ of words (for instance assume ∆ = { c, ab } , ∆ = { b, ab } , . . . ). We will show that wecan fix a constant (depending on M and ∆ but not on n ) number of entries to P n such that P n always outputs the same value and there are completions of the entries in and out of ∆ ∗ . Hence, if ∆ was chosen so that there is actually a completion of the fixed entries in thetargeted language and one outside of it, P n cannot recognize ∆ ∗ . We cannot prove this forall ∆ , in particular it will not work for ∆ = { ab } and indeed ( ab ) ∗ is in P ( DA ) . The keyproperty of our ∆ is that after fixing any letter at any position, except maybe for a constantnumber of positions, one can still complete the word into one within ∆ ∗ . This is not truefor ∆ = { ab } because after fixing a b in an odd position all completions fall outside of ( ab ) ∗ .We now spell out the technical details.Let ∆ be a finite non-empty set of non-empty words. Let Σ be the corresponding finitealphabet and let ⊥ be a letter not in Σ . A mask is a word over Σ ∪ {⊥} . The positions of amask carrying a ⊥ are called free while the positions carrying a letter in Σ are called fixed .A mask λ ′ is a submask of a mask λ if it is formed from λ by replacing some occurrences(possibly zero) of ⊥ by a letter in Σ .A completion of a mask λ is a word w over Σ that is built from λ by replacing alloccurrences of ⊥ by a letter in Σ . Notice that all completions of a mask have the samelength as the mask itself. A mask λ is ∆ -compatible if it has a completion in ∆ ∗ (it willalways be possible and easy to find a completion of λ outside of ∆ ∗ ).The dangerous positions of a mask λ are the positions within distance l − of the fixedpositions or within distance l − of the beginning or the end of the mask, where l is themaximal length of a word in ∆ . A position that is not dangerous is said to be safe and isnecessarily free.We say that ∆ is safe if the following holds. Let λ be a ∆ -compatible mask. Let i beany free position of λ that is not dangerous. Let a be any letter in Σ . Then the submask of λ constructed by fixing a at position i is ∆ -compatible. We have already seen that ∆ = { ab } is not safe. However our targeted ∆ , ∆ = { c, ab } , ∆ = { b, ab } , ∆ = { a, b } , are safe. Wealways consider ∆ to be safe in the following.Note that it is important in the definition of safe for ∆ that we fix only safe positions, i.e.positions far apart and far from the beginning and the end of the mask. Indeed, dependingon the chosen ∆ , there might be words that never appear as factors in any word of ∆ ∗ , suchas bb when ∆ = { c, ab } or aa when ∆ = { b, ab } , so that fixing a position near an alreadyfixed position to an arbitrary letter in a ∆ -compatible mask may result in a mask that hasno completion in ∆ ∗ . This is why we make sure that safe positions are far from those alreadyfixed and from the beginning and the end of the mask, where far depends on the length ofthe words of ∆ .Finally, we say that a completion w of a mask λ is safe if w is a completion of λ belonging to ∆ ∗ or is constructed from a completion of λ in ∆ ∗ by modifying only letters atsafe positions of λ , the dangerous positions remaining unchanged.Let M be a monoid in DA whose identity we will denote by . We define a version of Green’s relations for decomposing monoids that will be used, asoften in this setting, to prove the main technical lemma in the current proof. Given twoelements u, u ′ of M we say that u ≤ J u ′ if there are elements v, v ′ of M such that u ′ = vuv ′ .We write u ∼ J u ′ if u ≤ J u ′ and u ′ ≤ J u . We write u < J u ′ if u ≤ J u ′ and u ′ J u . Giventwo elements u, u ′ of M we say that u ≤ R u ′ if there is an element v of M such that u ′ = uv .We write u ∼ R u ′ if u ≤ R u ′ and u ′ ≤ R u . We write u < R u ′ if u ≤ R u ′ and u ′ R u . Giventwo elements u, u ′ of M we say that u ≤ L u ′ if there is an element v of M such that u ′ = vu .We write u ∼ L u ′ if u ≤ L u ′ and u ′ ≤ L u . We write u < L u ′ if u ≤ L u ′ and u ′ L u . Finally,given two elements u, u ′ of M , we write u ∼ H u ′ if u ∼ R u ′ and u ∼ L u ′ .We shall use the following well-known fact about these preorders and equivalence rela-tions (see [Pin86, Chapter 3, Proposition 1.4]). Lemma 4.4.
For all elements u and v of M , if u ≤ R v and u ∼ J v , then u ∼ R v . Similarly,if u ≤ L v and u ∼ J v , then u ∼ L v . From the definition it follows that for all elements u, v, r of M , we have u ≤ R ur and v ≤ L rv . When the inequality is strict in the first case, i.e. u < R ur , we say that r is R -badfor u . Similarly r is L -bad for v if v < L rv . It follows from M ∈ DA that being R -bad or L -bad only depends on the ∼ R or ∼ L class, respectively. This is formalized in the followinglemma, that is folklore and used at least implicitly in many proofs involving DA (see forinstance [TT02, proof of Theorem 3]). Since we didn’t manage to find the lemma statedand proven in the form below, we include a proof for completeness. Lemma 4.5. If M is in DA , then u ∼ R u ′ and ur ∼ R u implies u ′ r ∼ R u . Similarly u ∼ L u ′ and ru ∼ L u implies ru ′ ∼ L u .Proof. Let u, u ′ , r ∈ M such that u ∼ R u ′ and ur ∼ R u . This means that there exist v, v ′ , s ∈ M such that u = u ′ v ′ , u ′ = uv and urs = u .This implies that u ′ = uv = ursv = u ′ v ′ rsv = u ′ ( v ′ rsv ) = · · · = u ′ ( v ′ rsv ) ω where ω is the idempotent power of M . Hence, we have that u ′ r ( v ′ rsv ) ω v ′ = u ′ ( v ′ rsv ) ω r ( v ′ rsv ) ω v ′ .But, by [TT02, Theorem 2], since M ∈ DA , we have that ( xyz ) ω y ( xyz ) ω = ( xyz ) ω for all x, y, z ∈ M , so that u ′ r ( v ′ rsv ) ω v ′ = u ′ ( v ′ rsv ) ω v ′ = u ′ v ′ = u .Therefore, we have u ′ r ≤ R u and since uvr = u ′ r , we also have u ≤ R u ′ r , so that u ′ r ∼ R u as claimed.The proof goes through symmetrically for ∼ L .Let ∆ be a finite set of words and Σ be the corresponding finite alphabet, ∆ being safe,and let n ∈ N . We are now going to prove the main technical lemma that allows us to assertthat after fixing a constant number of positions in the input of a program over M , it can stillbe completed into a word of ∆ ∗ , but the program cannot make the difference between anytwo possible completions anymore. To prove the lemma, we define a relation ≺ on the setof quadruplets ( λ, P, u, v ) where λ is a mask of length n , P is a program over M for wordsof length n and u and v are two elements of M . We will say that an element ( λ , P , u , v ) is strictly smaller than ( λ , P , u , v ) , written ( λ , P , u , v ) ≺ ( λ , P , u , v ) , if and onlyif λ is a submask of λ , P is a subprogram of P and one of the following cases occurs: AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA (1) u < R u and v = v and P is a suffix of P and u P ( w ) v = u P ( w ) v for all safecompletions w of λ ;(2) v < L v and u = u and P is a prefix of P and u P ( w ) v = u P ( w ) v for all safecompletions w of λ ;(3) u = u and v = 1 and P is a prefix of P and u P ( w ) v < J u P ( w ) v for all safecompletions w of λ ;(4) v = v and u = 1 and P is a suffix of P and u P ( w ) v < J u P ( w ) v for all safecompletions w of λ .Note that, since M is finite, this relation is well-founded (that is, it has no infinite decreasingchain, an infinite sequence of quadruplets µ , µ , µ , . . . such that µ i +1 ≺ µ i for all i ∈ N )and the maximal length of any decreasing chain can be upper bounded by · | M | , thatdoes only depend on M . For a given quadruplet µ , we shall also call its height the biggest i ∈ N such that there exists a decreasing chain µ i ≺ µ i − ≺ · · · ≺ µ = µ .The following lemma is the key to the proof. It shows that modulo fixing a few entries,one can fix the output: to count the number of fixed positions for a given mask λ , we denoteby | λ | Σ the number of letters in λ belonging to Σ , that is to say, the number of fixed positionsin λ . Lemma 4.6.
Let λ be a ∆ -compatible mask of length n , let P be a program over M of range n , let u and v be elements of M such that ( λ, P, u, v ) is of height h . Then there is an element t of M and a ∆ -compatible submask λ ′ of λ verifying | λ ′ | Σ ≤ (2 h l ) h · max {| λ | Σ , } suchthat any safe completion w of λ ′ verifies uP ( w ) v = t .Proof. The proof goes by induction on the height h .Let λ be a ∆ -compatible mask of length n , let P be a program over M for words oflength n , let u and v be elements of M such that ( λ, P, u, v ) is of height h , and assumethat for any quadruplet ( λ ′ , P ′ , u ′ , v ′ ) strictly smaller than ( λ, P, u, v ) , the lemma is verified.Consider the following conditions concerning the quadruplet ( λ, P, u, v ) :(a) there does not exist any instruction ( x, f ) of P such that for some letter a the submask λ ′ of λ formed by setting position x to a is ∆ -compatible and f ( a ) is R -bad for u ;(b) v is not R -bad for u ;(c) there does not exist any instruction ( x, f ) of P such that for some letter a the submask λ ′ of λ formed by setting position x to a is ∆ -compatible and f ( a ) is L -bad for v ;(d) u is not L -bad for v .We will now do a case analysis based on which of these conditions are violated or not.Case 1: condition (a) is violated. So there exists some instruction ( x, f ) of P such that for someletter a the submask λ ′ of λ formed by setting position x to a (if it wasn’t already thecase) is ∆ -compatible and f ( a ) is R -bad for u . Let i be the smallest number of such aninstruction.Let P ′ be the subprogram of P until, and including, instruction i − . Let w be a safecompletion of λ . For any instruction ( y, g ) of P ′ , as y < i , g ( w y ) cannot be R -bad for u ,so u ∼ R ug ( w y ) . Hence, by Lemma 4.5, u ∼ R uP ′ ( w ) for all safe completions w of λ .So, because f ( a ) is R -bad for u , any safe completion w of λ ′ , which is also a safecompletion of λ , is such that u ∼ R uP ′ ( w ) < R uP ′ ( w ) f ( a ) ≤ R uP ( w ) v by Lemma 4.5,hence uP ′ ( w ) < J uP ( w ) v by Lemma 4.4. So ( λ ′ , P ′ , u, ≺ ( λ, P, u, v ) , therefore, byinduction we get a ∆ -compatible submask λ of λ ′ and a monoid element t such that uP ′ ( w ) = t for all safe completions w of λ . Let P ′′ be the subprogram of P starting from instruction i +1 . Notice that, since u ∼ R t (by what we have proven just above), u < R t f ( a ) (by Lemma 4.5) and t f ( a ) P ′′ ( w ) v = uP ′ ( w ) f ( a ) P ′′ ( w ) v = uP ( w ) v for all safe completions w of λ . Hence, ( λ , P ′′ , t f ( a ) , v ) is strictly smaller than ( λ, P, u, v ) and by induction we get a ∆ -compatible submask λ of λ and a monoid element t such that t f ( a ) P ′′ ( w ) v = t for all safe completions w of λ .Thus, any safe completion w of λ is such that uP ( w ) v = uP ′ ( w ) f ( a ) P ′′ ( w ) v = t f ( a ) P ′′ ( w ) v = t .Therefore λ and t form the desired couple of a ∆ -compatible submask of λ and an elementof M . We still have to show that | λ | Σ satisfies the desired upper bound.By induction, since ( λ ′ , P ′ , u, is of height h ′ ≤ h − , we have | λ | Σ ≤ (2 h ′ l ) h ′ · (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ ≤ (2 h − l ) h − · (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ .Consequently, by induction again, as ( λ , P ′′ , t f ( a ) , v ) is of height h ′′ ≤ h − , we have | λ | Σ ≤ (2 h ′′ l ) h ′′ · | λ | Σ ≤ (2 h − l ) h − · | λ | Σ ≤ (2 h − l ) h − · (2 h − l ) h − · (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ = (2 h − l ) h · (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ .Moreover, it holds that | λ ′ | Σ ≤ | λ | Σ + 1 , so that | λ | Σ ≤ (2 h − l ) h · ( | λ | Σ + 1) ≤ (2 h − l ) h · h · max {| λ | Σ , } = (2 h l ) h · max {| λ | Σ , } .Case 2: condition (a) is verified but condition (b) is violated, so v is R -bad for u and Case 1 doesnot apply.Let w be a safe completion of λ : for any instruction ( x, f ) of P , as the submask λ ′ of λ formed by setting position x to w x is ∆ -compatible (by the fact that ∆ is safe and w isa safe completion of λ ), f ( w x ) cannot be R -bad for u , otherwise condition (a) would beviolated, so u ∼ R uf ( w x ) . Hence, by Lemma 4.5, u ∼ R uP ( w ) for all safe completions w of λ . Notice then that u ∼ R uP ( w ) < R uP ( w ) v (by Lemma 4.5), hence uP ( w ) < J uP ( w ) v (by Lemma 4.4) for all safe completions w of λ . So ( λ, P, u, ≺ ( λ, P, u, v ) , therefore weobtain by induction a monoid element t and a ∆ -compatible submask λ ′ of λ such that uP ( w ) = t for all completions w of λ ′ . If we set t = t v , we get that any safe completion w of λ ′ is such that uP ( w ) v = t v = t . Therefore λ ′ and t form the desired couple of a ∆ -compatible submask of λ and an element of M .Moreover, by induction, since ( λ, P, u, is of height h ′ ≤ h − , we have (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ ≤ (2 h ′ l ) h ′ · max {| λ | Σ , } ≤ (2 h l ) h · max {| λ | Σ , } ,the desired upper bound.Case 3: condition (c) is violated. So there exists some instruction ( x, f ) of P such that for someletter a the submask λ ′ of λ formed by setting position x to a (if it wasn’t already thecase) is ∆ -compatible and f ( a ) is L -bad for v .We proceed as for Case 1 by symmetry. AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA Case 4: condition (c) is verified but condition (d) is violated, so u is L -bad for v and Case 3 doesnot apply.We proceed as for Case 2 by symmetry.Case 5: conditions (a), (b), (c) and (d) are verified.As it was in Case 2 and Case 4, using Lemma 4.5, the fact that condition (a) andcondition (c) are verified implies that u ∼ R uP ′ ( w ) and v ∼ L P ′′ ( w ) v for any prefix P ′ of P , any suffix P ′′ of P and all safe completions w of λ . Moreover, since condition (b) andcondition (d) are verified, by Lemma 4.5, we get that uP ( w ) v ∼ R u and uP ( w ) v ∼ L v forall safe completions w of λ . This implies that ( λ, P, u, v ) is minimal for ≺ and that h = 0 .Let w be a completion of λ that is in ∆ ∗ . Let λ ′ be the submask of λ fixing all freedangerous positions of λ using w and let t = uP ( w ) v . Then, for any completion w of λ ′ , which is a safe completion of λ by construction, we have that uP ( w ) v ∼ R u ∼ R t and uP ( w ) v ∼ L v ∼ L t . Thus, uP ( w ) v ∼ H t for any completion w of λ ′ . As M isaperiodic, this implies that uP ( w ) v = t for all completions w of λ ′ (see [Pin86, Chapter 3,Proposition 4.2]). Therefore λ ′ and t form the desired couple of a ∆ -compatible submaskof λ and an element of M .Now, since the number of free positions of λ fixed in λ ′ , i.e. | λ ′ | Σ − | λ | Σ , is exactly thenumber of free dangerous positions in λ , and as a position in λ is dangerous if it is withindistance l − of a fixed position or within distance l − of the beginning or the end of λ , we have (cid:12)(cid:12) λ ′ (cid:12)(cid:12) Σ ≤ · | λ | Σ · (2 l −
2) + 2 · ( l −
1) + | λ | Σ = | λ | Σ · (4 l −
3) + 2 l − ≤ (2 l ) · max {| λ | Σ , } ,the desired upper bound.This concludes the proof of the lemma.Setting ∆ = { c, ab } or ∆ = { b, ab } with Σ the associated alphabet, when applyingLemma 4.6 with the trivial ∆ -compatible mask λ of length n containing only free positions,with P some program over M of range n and with u and v equal to , the resulting mask λ ′ has the property that we have an element t of M such that P ( w ) = t for any safe completion w of λ ′ . Since the mask λ ′ is ∆ -compatible and has a number of fixed positions upper-bounded by (2 h l ) h where h is the height of ( λ, P, u, v ) , itself upper-bounded by · | M | , aslong as n is big enough, we have a safe completion w ∈ ∆ ∗ and a safe completion w / ∈ ∆ ∗ .Hence, P cannot be part of any sequence of programs p -recognizing ∆ ∗ . This implies that ( c + ab ) ∗ / ∈ P ( M ) and ( b + ab ) ∗ / ∈ P ( M ) . Finally, for any k ∈ N , k ≥ , we can prove that b ∗ (( ab ∗ ) k ) ∗ / ∈ P ( M ) by setting ∆ = { a, b } and completing the mask given by the lemma bysetting the letters in such a way that we have the right number of a modulo k in one caseand not in the other case.This concludes the proof of Proposition 4.2 because the argument above holds for anymonoid in DA . 5. A fine hierarchy in P ( DA ) The definition of p -recognition by a sequence of programs over a monoid given in Section 2requires that for each n , the program reading the entries of length n has a length polynomialin n . In the case of P ( DA ) , the polynomial-length restriction is without loss of generality:any program over a monoid in DA is equivalent to one of polynomial length over the same monoid [TT01] (in the sense that they recognize the same languages). In this section, weshow that this does not collapse further: in the case of DA , programs of length O( n k +1 ) express strictly more than those of length O( n k ) .Following [GT03], we use an alternative definition of the languages recognized by amonoid in DA . We define by induction a hierarchy of classes of languages SU M k , where SU M stands for strongly unambiguous monomial . A language L is in SU M if it is ofthe form A ∗ for some finite alphabet A . A language L is in SU M k for k ∈ N > if it is in SU M k − or L = L aL for some languages L ∈ SU M i and L ∈ SU M j and some letter a with i + j = k − such that no word of L contains the letter a or no word of L containsthe letter a .Gavaldà and Thérien stated without proof that a language L is recognized by a monoid in DA iff there is a k ∈ N such that L is a Boolean combination of languages in SU M k [GT03](see [Gro18, Theorem 4.1.9] for a proof). For each k ∈ N , we denote by DA k the varietyof monoids generated by the syntactic monoids of the Boolean combinations of languagesin SU M k . It can be checked that, for each k , DA k forms a variety of monoids recognizingprecisely Boolean combinations of languages in SU M k : this is what we do in the firstsubsection.In the two following subsections, we then give a fine program-length-based hierarchywithin P ( DA ) for this parametrization of DA .5.1. A parametrization of DA . For each k ∈ N , we denote by SU L k the class of regularlanguages that are Boolean combinations of languages in SU M k ; it is a variety of languagesas shown just below. But as DA k is the variety of monoids generated by the syntacticmonoids of the languages in SU L k , by Eilenberg’s theorem, we know that, conversely, allthe regular languages whose syntactic monoids lie in DA k are in SU L k .Back to the fact that SU L k is a variety of languages for any k ∈ N . Closure underBoolean operations is obvious by construction. Closure under quotients and inverses ofmorphisms is respectively given by the following two lemmas and by the fact that bothquotients and inverses of morphisms commute with Boolean operations.Given a word u over a given finite alphabet Σ , we will denote by alph( u ) the set ofletters of Σ that appear in u . Lemma 5.1.
For all k ∈ N , for all L ∈ SU M k over a finite alphabet Σ and u ∈ Σ ∗ , u − L and Lu − both are unions of languages in SU M k over Σ .Proof. We prove it by induction on k .Base case: k = 0 . Let L ∈ SU M over a finite alphabet Σ and u ∈ Σ ∗ . This means that L = A ∗ for some A ⊆ Σ . We have two cases: either alph( u ) * A and then u − L = Lu − = ∅ ;or alph( u ) ⊆ A and then u − L = Lu − = A ∗ = L . So u − L and Lu − both are unions oflanguages in SU M over Σ . The base case is hence proved.Inductive step. Let k ∈ N > and assume that the lemma is true for all k ′ ∈ N , k ′ < k .Let L ∈ SU M k over a finite alphabet Σ and u ∈ Σ ∗ . This means that either L is in SU M k − and the lemma is proved by applying the inductive hypothesis directly for L and u , or L = L aL for some languages L ∈ SU M i and L ∈ SU M j and some letter a ∈ Σ with i + j = k − and, either no word of L contains the letter a or no word of L contains AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA the letter a . We shall only treat the case in which a does not appear in any of the words of L ; the other case is treated symmetrically.There are again two cases to consider, depending on whether a does appear in u or not.If a / ∈ alph( u ) , then it is straightforward to check that u − L = ( u − L ) aL and Lu − = L a ( L u − ) . By the inductive hypothesis, we get that u − L is a union of languages in SU M i over Σ and that L u − is a union of languages in SU M j over Σ . Moreover, it isdirect to see that no word of u − L contains the letter a . By distributivity of concatenationover union, we finally get that u − L and Lu − both are unions of languages in SU M k over Σ . If a ∈ alph( u ) , then let u = u au with u , u ∈ Σ ∗ and a / ∈ alph( u ) . It is againstraightforward to see that u − L = ( u − L if u ∈ L ∅ otherwiseand Lu − = L a ( L u − ) ∪ ( L u − if u ∈ L ∅ otherwise .As before, by the inductive hypothesis, we get that L u − is a union of languages in SU M i over Σ and that both u − L and L u − are unions of languages in SU M j over Σ . And,again, by distributivity of concatenation over union, we get that u − L and Lu − both are aunion of languages in SU M k over Σ .This concludes the inductive step and therefore the proof of the lemma. Lemma 5.2.
For all k ∈ N , for all L ∈ SU M k over a finite alphabet Σ and ϕ : Γ ∗ → Σ ∗ amorphism of monoids where Γ is another finite alphabet, ϕ − ( L ) is a union of languages in SU M k over Γ .Proof. We prove it by induction on k .Base case: k = 0 . Let L ∈ SU M over a finite alphabet Σ and ϕ : Γ ∗ → Σ ∗ a morphism ofmonoids where Γ is another finite alphabet. This means that L = A ∗ for some A ⊆ Σ . It isstraightforward to check that ϕ − ( L ) = B ∗ where B = { b ∈ Γ | ϕ ( b ) ∈ A ∗ } . B ∗ is certainlya union of languages in SU M over Σ . The base case is hence proved.Inductive step. Let k ∈ N > and assume that the lemma is true for all k ′ ∈ N , k ′ < k .Let L ∈ SU M k over a finite alphabet Σ and ϕ : Γ ∗ → Σ ∗ a morphism of monoids where Γ is another finite alphabet. This means that either L is in SU M k − and the lemma isproved by applying the inductive hypothesis directly for L and ϕ , or L = L aL for somelanguages L ∈ SU M i and L ∈ SU M j and some letter a ∈ Σ with i + j = k − and,either no word of L contains the letter a or no word of L contains the letter a . We shallonly treat the case in which a does not appear in any of the words of L ; the other case istreated symmetrically.Let us define B = { b ∈ Γ | a ∈ alph( ϕ ( b )) } as the set of letters of Γ whose imageword by ϕ contains the letter a . For each b ∈ B , we shall also let ϕ ( b ) = u b, au b, with u b, , u b, ∈ Σ ∗ and a / ∈ alph( u b, ) . It is not too difficult to see that we then have ϕ − ( L ) = [ b ∈ B ϕ − ( L u b, − ) bϕ − ( u b, − L ) . By the inductive hypothesis, by Lemma 5.1 and by the fact that inverses of morphismscommute with unions, we get that ϕ − ( L u b, − ) is a union of languages in SU M i over Γ and that ϕ − ( u b, − L ) is a union of languages in SU M j over Γ . Moreover, it is direct tosee that no word of ϕ − ( L u b, − ) contains the letter b for all b ∈ B . By distributivity ofconcatenation over union, we finally get that ϕ − ( L ) is a union of languages in SU M k over Γ . This concludes the inductive step and therefore the proof of the lemma.5.2. Strict hierarchy.
For each k we exhibit a language L k ⊆ { , } ∗ that can be recognizedby a sequence of programs of length O( n k ) over a monoid M k in DA k but cannot berecognized by any sequence of programs of length O( n k − ) over any monoid in DA .For a given k ∈ N > , the language L k expresses a property of the first k occurrencesof in the input word. To define L k we say that S is a k -set over n for some n ∈ N if S is a set where each element is an ordered tuple of k distinct elements of [ n ] . For anysequence ∆ = ( S n ) n ∈ N of k -sets over n , we set L ∆ = S n ∈ N K n,S n , where for each n ∈ N , K n,S n is the set of words over { , } of length n such that for each of them, it contains atleast k occurrences of and the ordered k -tuple of the positions of the first k occurrencesof belongs to S n .On the one hand, we show that for all k there is a monoid M k in DA k such that for all ∆ the language L ∆ is recognized by a sequence of programs over M k of length O( n k ) . Theproof is done by an inductive argument on k .On the other hand, we show that for all k there is a ∆ such that for any finite monoid M and any sequence of programs ( P n ) n ∈ N over M of length O( n k − ) , L ∆ is not recognized by ( P n ) n ∈ N . This is done using a counting argument: for some monoid size i , for n big enough,the number of languages in { , } n recognized by a program over some monoid of size i oflength at most α · n k − for α some constant is upper-bounded by a number that turns outto be asymptotically smaller than the number of different possible K n,S n .Upper bound. We start with the upper bound. Notice that for some k ∈ N > and ∆ =( S n ) n ∈ N , the language of words of length n of L ∆ is exactly K n,S n . Hence the fact that L ∆ can be recognized by a sequence of programs over a monoid in DA k of length O( n k ) is aconsequence of the following proposition. Proposition 5.3.
For all k ∈ N > there is a monoid M k ∈ DA k such that for all n ∈ N and all k -sets S n over n , the language K n,S n is recognized by a program over M k of lengthat most n k .Proof. We first define by induction on k a family of languages Z k over the alphabet Y k = {⊥ l , ⊤ l | ≤ l ≤ k } . For k = 0 , Z is { ε } . For k > , Z k is the set of words containing ⊤ k and such that the first occurrence of ⊤ k has no ⊥ k to its left, and the sequence between thefirst occurrence of ⊤ k and the first occurrence of ⊥ k or ⊤ k to its right, or the end of theword if there is no such letter, belongs to Z k − . A simple induction on k shows that Z k isdefined by the following expression Y ∗ k − ⊤ k Y ∗ k − ⊤ k − · · · Y ∗ ⊤ ⊤ Y ∗ k and therefore it is in SU M k and its syntactic monoid M k is in DA k . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA Fix n . If n = 0 , the proposition follows trivially, otherwise, we define by induction on k a program P k ( i, S ) for every k -set S over n and every ≤ i ≤ n + 1 that will for the momentoutput elements of Y k ∪ { ε } instead of outputting elements of M k .For any k > , ≤ j ≤ n and S a k -set over n , let f j,S be the function with f j,S (0) = ε and f j,S (1) = ⊤ k if j is the first element of some ordered k -tuple of S , f j,S (1) = ⊥ k otherwise.We also let g k be the function with g k (0) = ε and g k (1) = ⊥ k . If S is a k -set over n and ≤ j ≤ n then S | j denotes the ( k − -set over n containing the ordered ( k − -tuples ¯ t such that ( j, ¯ t ) ∈ S .For k > , ≤ i ≤ n + 1 and S a k -set over n , the program P k ( i, S ) is the followingsequence of instructions: ( i, f i,S ) P k − ( i + 1 , S | i )( i, g k ) · · · ( n, f n,S ) P k − ( n + 1 , S | n )( n, g k ) . In other words, the program guesses the first occurrence j ≥ i of , returns ⊥ k or ⊤ k depending on whether it is the first element of an ordered k -tuple in S , and then proceedsfor the next occurrences of by induction.For k = 0 , ≤ i ≤ n + 1 and S a -set over n (that is empty or contains ε , the onlyordered -tuple of elements of [ n ] ), the program P ( i, S ) is the empty program ε .A simple computation shows that for any k ∈ N > , ≤ i ≤ n + 1 and S a k -set over n ,the number of instructions in P k ( i, S ) is at most n k .A simple induction on k shows that when running on a word w ∈ { , } n , for any k ∈ N > , ≤ i ≤ n + 1 and S a k -set over n , P k ( i, S ) returns a word in Z k iff the ordered k -tuple of the positions of the first k occurrences of starting at position i in w exists andis an element of S .For any k > and S n a k -set over n , it remains to apply the syntactic morphism of Z k to the output of the functions in the instructions of P k (1 , S n ) to get a program over M k oflength at most n k recognizing K n,S n .Lower bound. The following claim is a simple counting argument. Claim 5.4.
For all i ∈ N > and n ∈ N , the number of languages in { , } n recognized byprograms over a monoid of size i , reading inputs of length n over the alphabet { , } , withat most l ∈ N instructions, is bounded by i i i · ( n · i ) l .Proof. Fix a monoid M of size i . Since a program over M of range n with less than l instruc-tions can always be completed into such a program with exactly l instructions recognizingthe same languages in { , } n (using the identity of M ), we only consider programs withexactly l instructions. As Σ = { , } , there are n · i choices for each of the l instructions ofa range n program over M reading inputs in { , } ∗ . Such a program can recognize at most i different languages in { , } n . Hence, the number of languages in { , } n recognized byprograms over M of length at most l is at most i · ( n · i ) l . The result follows from the factsthat there are at most i i isomorphism classes of monoids of size i and that two isomorphicmonoids allow to recognize the same languages in { , } n through programs.If for some k ∈ N > and ≤ i ≤ α , α ∈ N > , we apply Claim 5.4 for all n ∈ N , l = α · n k − , we get a number µ i ( n ) of languages upper-bounded by n O( n k − ) , which isasymptotically strictly smaller than the number of distinct K n,S n , which is nk ) , i.e. µ i ( n ) is in o (cid:0) nk ) (cid:1) . Hence, for all j ∈ N > , there exist an n j ∈ N and T j a k -set over n j such that no programover a monoid of size ≤ i ≤ j , of range n j and of length at most j · n k − recognizes K n j ,T j .Moreover, we can assume without loss of generality that the sequence ( n j ) j ∈ N > is increasing.Let ∆ = ( S n ) n ∈ N be such that S n j = T j for all j ∈ N > and S n = ∅ for any n ∈ N verifyingthat it is not equal to any n j for j ∈ N > . We show that no sequence of programs over afinite monoid of length O( n k − ) can recognize L ∆ . If this were the case, then let i be thesize of the monoid. Let j ≥ i be such that for any n ∈ N , the n -th program has length atmost j · n k − . But, by construction, we know that there does not exist any such program ofrange n j recognizing K n j ,T j , a contradiction.This implies the following hierarchy, where P ( V , s ( n )) for some variety of monoids V and a function s : N → N denotes the class of languages recognizable by a sequence ofprograms of length O( s ( n )) : Proposition 5.5.
For all k ∈ N , P (cid:0) DA , n k (cid:1) ( P (cid:0) DA , n k +1 (cid:1) . More precisely, for all k ∈ N and d ∈ N , d ≤ max { k − , } , P (cid:0) DA k , n d (cid:1) ( P (cid:0) DA k , n d +1 (cid:1) . To prove this proposition, we use two facts. First, that for all k ∈ N and all d ∈ N , d ≤ max { k − , } , any monoid from DA d is also a monoid from DA k . And second, that a ∗ ∈ P ( DA , n ) \ P ( DA , simply because any program over some finite monoid of range n for n ∈ N recognizing a n must have at least n instructions, one for each input letter.5.3. Collapse.
Tesson and Thérien showed that any program over a monoid M in DA isequivalent to one of polynomial length [TT01]. We now show that if we further assume that M is in DA k then the length can be assumed to be O( n max { k, } ) . Proposition 5.6.
Let k ≥ . Let M ∈ DA k . Then any program over M is equivalent to aprogram over M of length O( n max { k, } ) . The equivalent program of length O( n max { k, } ) is actually a subprogram of the initialone. For each possible acceptance set, an input word to the program is accepted if and onlyif the word over the alphabet M produced by the program belongs to some fixed Booleancombination of languages in SU M k . The idea is then just to keep enough instructions sothat membership of the produced word over M in each of these languages does not change.Recall that if P is a program over some monoid M of range n , then P ( w ) denotes theelement of M resulting from the execution of the program P on w . It will be convenienthere to also work with the word over M resulting from the sequence of executions of eachinstruction of P on w . We denote this word by EP ( w ) .The result is a consequence of the following lemma and the fact that for any acceptanceset F ⊆ M , a word w ∈ Σ n (where Σ is the input alphabet) is accepted iff EP ( w ) ∈ L where L is a language in SU L k , a Boolean combination of languages in SU M k . Lemma 5.7.
Let Σ be a finite alphabet, M a finite monoid, and n, k natural numbers.For any program P over M of range n and any language K over M in SU M k , thereexists a subprogram Q of P of length O( n max { k, } ) such that for any subprogram Q ′ of P thathas Q as a subprogram, we have for all words w over Σ of length n : EP ( w ) ∈ K ⇔ EQ ′ ( w ) ∈ K .Proof. A program P over M of range n is a finite sequence ( p i , f i ) of instructions where each p i is a positive natural number which is at most n and each f i is a function from Σ to M . AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA We denote by l the number of instructions of P . For each set I ⊆ [ l ] we denote by P [ I ] thesubprogram of P consisting of the subsequence of instructions of P obtained after removingall instructions whose index is not in I . In particular, P [1 , m ] denotes the initial sequenceof instructions of P , until instruction number m .We prove the lemma by induction on k .The intuition behind the proof for a program P on inputs of length n and some K γK ∈SU M k when k ≥ is as follows. We assume that K does not contain any word with theletter γ , the other case is done symmetrically. Consider the subset of all indices I γ ⊆ [ l ] thatcorrespond, for a fixed letter a and a fixed position p in the input, to the first instructionof P that would output the element γ when reading a at position p . We then have that,given some w as input, EP ( w ) ∈ K γK if and only if there exists i ∈ I γ verifying that theelement at position i of EP ( w ) is γ , EP [1 , i − w ) ∈ K and EP [ i + 1 , l ]( w ) ∈ K . Theidea is then that if we set I to contain I γ as well as all indices obtained by induction for P [1 , i − and K and for P [ i + 1 , l ] and K , we would have that for all w , EP ( w ) ∈ K γK if and only if EP [ I ]( w ) ∈ K γK , that is EP ( w ) where only the elements at indices in I have been kept.The intuition behind the proof when k < is essentially the same, but without induction.We now spell out the details of the proof, starting with the inductive step.Inductive step. Let k ≥ and assume the lemma proved for all k ′ < k . Let n be a naturalnumber, P a program over M of range n and length l and any language K over M in SU M k .If K ∈ SU M k − , by the inductive hypothesis, we are done. Otherwise, by definition, K = K γK for γ ∈ M and some languages K ∈ SU M k and K ∈ SU M k over M with k + k = k − . Moreover either γ does not occur in any of the words of K or it does notoccur in any of the words of K . We only treat the case where γ does not appear in any ofthe words in K . The other case is treated similarly by symmetry.Observe that when n = 0 , we necessarily have P = ε , so that the lemma is triviallyproven in that case. So we now assume n > .For each ≤ p ≤ n and each a ∈ Σ consider within the sequence of instructions of P the first instruction of the form ( p, f ) with f ( a ) = γ , if it exists. We let I γ be the set ofindices of these instructions for all a and p . Notice that the size of I γ is in O( n ) .For all i ∈ I γ , we let J i, be the set of indices of the instructions within P [1 , i − appearing in its subprogram obtained by induction for P [1 , i − and K , and J i, be thesame for P [ i + 1 , l ] and K .We now let I be the union of I γ and J i, and J ′ i, = { j + i | j ∈ J i, } for all i ∈ I γ . Weclaim that Q = P [ I ] has the desired properties.First notice that by induction the sizes of J i, and J ′ i, for all i ∈ I γ are in O( n max { k − , } )= O( n k − ) and because the size of I γ is linear in n , the size of I is in O( n k ) = O( n max { k, } ) as required.Let Q ′ be a subprogram of P that has Q as a subprogram: it means that there existssome set I ′ ⊆ [ l ] containing I such that Q ′ = P [ I ′ ] .Now take w ∈ Σ n .Assume now that EP ( w ) ∈ K . Let i be the position in EP ( w ) of label γ witnessingthe membership in K . Let ( p i , f i ) be the corresponding instruction of P . In particularwe have that f i ( w p i ) = γ . Because γ does not occur in any word of K , for all j < i such that p j = p i we cannot have f j ( w p j ) = γ . Hence i ∈ I γ . By induction we have that EP [1 , i − J ]( w ) ∈ K for any set J ⊆ [ i − containing J i, and EP [ i + 1 , l ][ J ]( w ) ∈ K for any set J ⊆ [ l − i ] containing J i, . Hence, if we set I ′ = { j ∈ I ′ | j < i } as the subset of I ′ of elements less than i and I ′ = { j − i ∈ I ′ | j > i } as the subset of I ′ of elements greaterthan i translated by − i , we have EP [ I ′ ]( w ) = EP [1 , i − I ′ ]( w ) γEP [ i + 1 , l ][ I ′ ]( w ) ∈ K γK = K as desired.Assume finally that EP [ I ′ ]( w ) ∈ K . Let i be the index in I ′ whose instruction pro-vides the letter γ witnessing the fact that EP [ I ′ ]( w ) ∈ K . This means that if we set I ′ = { j ∈ I ′ | j < i } as the subset of I ′ of elements less than i and I ′ = { j − i ∈ I ′ | j > i } as the subset of I ′ of elements greater than i translated by − i , we have EP [ I ′ ]( w ) = EP [1 , i − I ′ ]( w ) γEP [ i + 1 , l ][ I ′ ]( w ) with EP [1 , i − I ′ ]( w ) ∈ K and EP [ i + 1 , l ][ I ′ ]( w ) ∈ K . If i ∈ I γ , then it means that I ′ ⊆ [ i − contains J i, and that I ′ ⊆ [ l − i ] contains J i, by construction, so that, by induction, EP ( w ) = EP [1 , i − w ) γEP [ i + 1 , l ]( w ) ∈ K γK = K .If not this shows that there is an instruction ( p j , f j ) with j < i , j ∈ I ′ , p j = p i and f j ( w p j ) = γ . But that would contradict the fact that γ cannot occur in K . So we have EP ( w ) ∈ K as desired.Base case. There are two subcases to consider.Subcase k = 1 . Let n be a natural number, P a program over M of range n and length l and any language K over M in SU M .If K ∈ SU M , we can conclude by referring to the subcase k = 0 .Otherwise K = A ∗ γA ∗ for γ ∈ M and some finite alphabets A ⊆ M and A ⊆ M .Moreover either γ / ∈ A or γ / ∈ A . We only treat the case where γ does not belong to A ,the other case is treated similarly by symmetry.We use the same idea as in the inductive step.Observe that when n = 0 , we necessarily have P = ε , so that the lemma is triviallyproven in that case. So we now assume n > .For each ≤ p ≤ n , each α ∈ M and a ∈ Σ consider within the sequence of instructionsof P the first and last instruction of the form ( p, f ) with f ( a ) = α , if they exist. We let I be the set of indices of these instructions for all a, α and p . Notice that the size of I is in O( n ) = O( n max { k, } ) .We claim that Q = P [ I ] has the desired properties. We just showed that it has therequired length.Let Q ′ be a subprogram of P that has Q as a subprogram: it means that there existssome set I ′ ⊆ [ l ] containing I such that Q ′ = P [ I ′ ] .Take w ∈ Σ n .Assume now that EP ( w ) ∈ K . Let i be the position in EP ( w ) of label γ witnessingthe membership in K . Let ( p i , f i ) be the corresponding instruction of P . In particularwe have that f i ( w p i ) = γ and this is the γ witnessing the membership in K . Because γ / ∈ A , for all j < i such that p j = p i we cannot have f j ( w p j ) = γ . Hence i ∈ I ⊆ I ′ . From EP [1 , i − w ) ∈ A ∗ and EP [ i + 1 , l ]( w ) ∈ A ∗ it follows that EP [ I ′ ∩ [[1 , i − w ) ∈ A ∗ and EP [ I ′ ∩ [[ i + 1 , l ]]]( w ) ∈ A ∗ , showing that EP [ I ′ ]( w ) = EP [ I ′ ∩ [[1 , i − w ) γEP [ I ′ ∩ [[ i + 1 , l ]]]( w ) ∈ K as desired.Assume finally that EP [ I ′ ]( w ) ∈ K . Let i be the index in I ′ whose instruction providesthe letter γ witnessing the fact that EP [ I ′ ]( w ) ∈ K . This means that EP [ I ′ ∩ [[1 , i − w ) ∈ AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA A ∗ and EP [ I ′ ∩ [[ i + 1 , l ]]]( w ) ∈ A ∗ . If there is an instruction ( p j , f j ) , with j < i and f j ( w p j ) / ∈ A then either j ∈ I ′ and we get a direct contradiction with the fact that EP [ I ′ ∩ [[1 , i − w ) ∈ A ∗ , or j / ∈ I ′ and we get a smaller j ′ ∈ I ⊆ I ′ with the sameproperty, contradicting again the fact that EP [ I ′ ∩ [[1 , i − w ) ∈ A ∗ . Hence for all j < i , f j ( w p j ) ∈ A . By symmetry we have that for all j > i , f j ( w p j ) ∈ A , showing that EP ( w ) ∈ A ∗ γA ∗ = K as desired.Subcase k = 0 . Let n be a natural number, P a program over M of range n and length l and any language K over M in SU M .Then K = A ∗ for some finite alphabet A ⊆ M .We again use the same idea as before.Observe that when n = 0 , we necessarily have P = ε , so that the lemma is triviallyproven in that case. So we now assume n > .For each ≤ p ≤ n , each α ∈ M and a ∈ Σ consider within the sequence of instructionsof P the first instruction of the form ( p, f ) with f ( a ) = α , if it exists. We let I be the setof indices of these instructions for all a, α and p . Notice that the size of I is in O( n ) =O( n max { k, } ) .We claim that Q = P [ I ] has the desired properties. We just showed that it has therequired length.Let Q ′ be a subprogram of P that has Q as a subprogram: it means that there existssome set I ′ ⊆ [ l ] containing I such that Q ′ = P [ I ′ ] .Take w ∈ Σ n .Assume now that EP ( w ) ∈ K . As EP [ I ′ ]( w ) is a subword of EP ( w ) , it follows directlythat EP [ I ′ ]( w ) ∈ A ∗ = K as desired.Assume finally that EP [ I ′ ]( w ) ∈ K . If there is an instruction ( p j , f j ) , with j ∈ [ l ] and f j ( w p j ) / ∈ A then either j ∈ I ′ and we get a direct contradiction with the fact that EP [ I ]( w ) ∈ A ∗ = K , or j / ∈ I ′ and we get a smaller j ′ ∈ I ⊆ I ′ with the same property,contradicting again the fact that EP [ I ′ ]( w ) ∈ A ∗ = K . Hence for all j ∈ [ l ] , f j ( w p j ) ∈ A ,showing that EP ( w ) ∈ A ∗ = K as desired.6. Conclusion
We introduced a notion of tameness, particularly relevant to the analysis of programs overmonoids from “small” varieties. The main source of interest in tameness is Proposition 3.11,stating that a variety of monoids V is tame if and only if the class of regular languages p -recognized by programs over monoids from V is included in the class L ( QEV ) . A firstquestion that arises is for which V those two classes of regular languages are equal. We couldnot rule out the possibility that for some tame V , L ( QEV ) \ P ( V ) = ∅ . We conjecturethat if V is local, abusing notation, QEV = EV ∗ Mod , by analogy with QV equating V ∗ Mod in that case; as L ( EV ∗ Mod ) ⊆ P ( V ) holds unconditionally, under our conjecture P ( V ) ∩ R eg = L ( QEV ) would hold for tame local varieties V .Concretely, we have obtained the technical result that DA is a tame variety. We havegiven A and Com as further examples of tame varieties. Our proof that A is tame neededthe fact that MOD m / ∈ AC for all m ≥ , so it would be interesting to prove A tame purelyalgebraically. But tameness of A implies MOD / ∈ AC by Proposition 3.11, confronting usagain with the holy grail alluded to in the introduction, certainly a challenging barrier toovercome. By contrast, we have shown that J is not tame. So programs over monoids from J p -recognize “more regular languages than expected”. A natural question to ask is what theseregular languages in P ( J ) are. Partial results in that direction were obtained in [Gro20].To conclude we should add, in fairness, that the progress reported here does not inany obvious way bring us closer to major NC complexity subclasses separations. Ourconcrete contributions here largely concern P ( DA ) and P ( J ) , classes that are well within AC . But this work does uncover new ways in which a program can or cannot circumventthe limitations imposed by the underlying monoid algebraic structure available to it. References [Ajt83] Miklós Ajtai. Σ -formulae on finite structures. In Ann. Pure and Appl. Logic , volume 24, pages1–48, 1983.[Alm96] Jorge Almeida. A syntactical proof of locality of DA.
Int. J. of Algebra and Computation (IJAC) ,6(2):165–178, 1996.[Bar89] David A. Mix Barrington. Bounded-width polynomial-size branching programs recognize exactlythose languages in NC . J. Comput. Syst. Sci. , 38(1):150–164, 1989.[BCST92] David A. Mix Barrington, Kevin J. Compton, Howard Straubing, and Denis Thérien. Regularlanguages in NC . J. Comput. Syst. Sci. , 44(3):478–499, 1992.[BS95] David A. Mix Barrington and Howard Straubing. Superlinear lower bounds for bounded-widthbranching programs.
J. Comput. Syst. Sci. , 50(3):374–381, 1995.[BST90] David A. Mix Barrington, Howard Straubing, and Denis Thérien. Non-uniform automata overgroups.
Inf. Comput. , 89(2):109–132, 1990.[BT88] David A. Mix Barrington and Denis Thérien. Finite monoids and the fine structure of NC1.
J.ACM , 35(4):941–952, 1988.[CPS06a] Laura Chaubard, Jean-Éric Pin, and Howard Straubing. Actions, wreath products of C -varietiesand concatenation product. Theoretical Computer Science , 356(1-2):73–89, 2006.[CPS06b] Laura Chaubard, Jean-Eric Pin, and Howard Straubing. First order formulas with modular pred-icates. In , pages 211–220, 2006.[Dar14] Luc Dartois.
Méthodes algébriques pour la théorie des automates . PhD thesis, Université ParisDiderot, Paris, 2014.[DP13] Luc Dartois and Charles Paperman. Two-variable first order logic with modular predicates overwords. In , pages 329–340, 2013.[DP14] Luc Dartois and Charles Paperman. Adding modular predicates.
CoRR , abs/1401.6576, 2014.[Eil74] Samuel Eilenberg.
Automata, Languages, and Machines , volume A. Academic Press, New York,1974.[Eil76] Samuel Eilenberg.
Automata, Languages, and Machines , volume B. Academic Press, New York,1976.[FSS84] Merrick L. Furst, James B. Saxe, and Michael Sipser. Parity, circuits, and the polynomial-timehierarchy.
Mathematical Systems Theory , 17(1):13–27, 1984.[GMS17] Nathan Grosshans, Pierre McKenzie, and Luc Segoufin. The power of programs over monoids inDA. In , pages 2:1–2:20, 2017.[Gro18] Nathan Grosshans.
The limits of Nečiporuk’s method and the power of programs over monoidstaken from small varieties of finite monoids . PhD thesis, University of Paris-Saclay, France, 2018.[Gro20] Nathan Grosshans. The power of programs over monoids in J. In
Language and Automata Theoryand Applications - 14th International Conference, LATA 2020, Milan, Italy, March 4-6, 2020,Proceedings , pages 315–327, 2020.[GT03] Ricard Gavaldà and Denis Thérien. Algebraic characterizations of small classes of boolean func-tions. In
STACS 2003, 20th Annual Symposium on Theoretical Aspects of Computer Science,Berlin, Germany, February 27 - March 1, 2003, Proceedings , pages 331–342, 2003.
AMENESS AND THE POWER OF PROGRAMS OVER MONOIDS IN DA [Hås86] Johan Håstad. Almost optimal lower bounds for small depth circuits. In Proceedings of the 18thAnnual ACM Symposium on Theory of Computing, May 28-30, 1986, Berkeley, California, USA ,pages 6–20, 1986.[KR65] Kenneth Krohn and John L. Rhodes. Algebraic theory of machines. I. Prime decompositiontheorem for finite semigroups and machines. In
Trans. Amer. Math. Soc. , volume 116, pages450–464, 1965.[MPT91] Pierre McKenzie, Pierre Péladeau, and Denis Thérien. NC : The automata-theoretic viewpoint. Computational Complexity , 1:330–359, 1991.[MPT00] Alexis Maciel, Pierre Péladeau, and Denis Thérien. Programs over semigroups of dot-depth one.
Theor. Comput. Sci. , 245(1):135–148, 2000.[MR65] Ward D. Maurer and John L. Rhodes. A property of finite simple non-abelian groups. In
Amer.Math. Soc. , volume 16, pages 552–554, 1965.[Pap14] Charles Paperman.
Circuits booléens, prédicats modulaires et langages réguliers . PhD thesis, Uni-versité Paris Diderot, Paris, 2014.[Pél90] Pierre Péladeau.
Classes de circuits booléens et variétés de monoïdes . PhD thesis, UniversitéPierre-et-Marie-Curie (Paris-VI), Paris, France, 1990.[Pin86] Jean-Éric Pin.
Varieties of formal languages . North Oxford, London and Plenum, New-York, 1986.(Traduction de Variétés de langages formels).[PS05] Jean-Éric Pin and Howard Straubing. Some results on C -varieties. RAIRO-Theor. Inf. Appl. ,39(1):239–262, 2005.[PST97] Pierre Péladeau, Howard Straubing, and Denis Thérien. Finite semigroup varieties defined byprograms.
Theor. Comput. Sci. , 180(1-2):325–339, 1997.[Raz87] Alexander A. Razborov. Lower bounds on the size of bounded depth circuits over a completebasis with logical addition.
Mathematical Notes , 41(4):333–338, 1987.[Rei82] Jan Reiterman. The Birkhoff theorem for finite algebras.
Algebra Universalis , 14(1):1–10, 1982.[Sim75] Imre Simon. Piecewise testable events. In
Automata Theory and Formal Languages, 2nd GI Con-ference, Kaiserslautern, May 20-23, 1975 , pages 214–222, 1975.[Smo87] Roman Smolensky. Algebraic methods in the theory of lower bounds for Boolean circuit complex-ity. In
Proceedings of the 19th Annual ACM Symposium on Theory of Computing, 1987, NewYork, New York, USA , pages 77–82, 1987.[Str94] Howard Straubing.
Finite Automata, Formal Logic, and Circuit Complexity . Birkhauser, Boston,1994.[Str02] Howard Straubing. On logical descriptions of regular languages. In
LATIN 2002: Theoretical In-formatics, 5th Latin American Symposium, Cancun, Mexico, April 3-6, 2002, Proceedings , pages528–538, 2002.[Tes03] Pascal Tesson.
Computational Complexity Questions Related to Finite Monoids and Semigroups .PhD thesis, McGill University, Montreal, Canada, 2003.[Til87] Bret Tilson. Categories as algebra: An essential ingredient in the theory of monoids.
J. of Pureand Applied Algebra , 48(1-2), 1987.[TT01] Pascal Tesson and Denis Thérien. The computing power of programs over finite monoids.
J.Autom. Lang. Comb. , 7(2):247–258, November 2001.[TT02] Pascal Tesson and Denis Thérien. Diamonds are forever: the variety DA.
Semigroups, algorithms,automata and languages , 1:475–500, 2002.
This work is licensed under the Creative Commons Attribution License. To view a copy of thislicense, visit https://creativecommons.org/licenses/by/4.0/https://creativecommons.org/licenses/by/4.0/