Abstract 1 Introduction 2 Word languages and transductions 3 MSO set interpretations, properties and limitations 4 Lexicographic transductions 5 Nested marble transducers 6 Expressiveness and closure properties of lexicographic transductions 7 Discussion References

Lexicographic Transductions of Finite Words

Emmanuel Filiot ORCID Université libre de Bruxelles (ULB), Belgium Nathan Lhote ORCID Aix Marseille Univ, CNRS, LIS, Marseille, France Pierre-Alain Reynier Aix Marseille Univ, CNRS, LIS, Marseille, France
Abstract

Regular transductions over finite words have linear input-to-output growth. This class of transductions enjoys many characterizations, such as transductions computable by two-way transducers as well as transductions definable in MSO (in the sense of Courcelle). Recently, regular transductions have been extended by Bojańczyk to polyregular transductions, which have polynomial growth, and are characterized by pebble transducers and MSO interpretations. Another class of interest is that of transductions defined by streaming string transducers or marble transducers, which have exponential growth and are incomparable with polyregular transductions.

In this paper, we consider MSO set interpretations (MSOSI) over finite words, that were introduced by Colcombet and Loeding. MSOSI are a natural candidate for the class of “regular transductions with exponential growth”, and are rather well behaved. However, MSOSI for now lacks two desirable properties that regular and polyregular transductions have. The first property is to have an automata description. This property is closely related to a second property, that of being regularity preserving, meaning preserving regular languages under inverse image.

We first show that if MSOSI are (effectively) regularity preserving then any automatic ω-word has a decidable MSO theory, an almost 20 years old conjecture of Bárány.

Our main contribution is the introduction of a class of transductions of exponential growth, which we call lexicographic transductions. We provide three different presentations for this class: first, as the closure of simple transductions (recognizable transductions) under a single operator called maplex; second, as a syntactic fragment of MSOSI (but the regular languages are given by automata instead of formulas); and third, we give an automaton based model called nested marble transducers, which generalize both marble transducers and pebble transducers. We show that this class enjoys many nice properties including being regularity preserving.

Keywords and phrases:
Transducers, Automata, MSO, Logical interpretations, Automatic structures
Funding:
Emmanuel Filiot: research director at F.R.S.-FNRS. This work was partially funded by the FNRS project 40020726.
Copyright and License:
[Uncaptioned image] © Emmanuel Filiot, Nathan Lhote, and Pierre-Alain Reynier; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Automata extensions
Related Version:
Full Version: https://arxiv.org/abs/2503.01746 [18]
Acknowledgements:
Nathan Lhote would like to warmly thank Mikołaj Bojańczyk, Rafał Stefański and Lê Thành Dũng (Tito) Nguyễn for many interesting discussions at different stages of this work.
Funding:
This work has been partly funded by the QuaSy project (ANR-23-CE48-0008).
Editors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak

1 Introduction

Before discussing lexicographic transductions, the central notion of this article, we give some context on transduction classes and connections to automatic structures.

MSOSI and the connection to automatic structures.

MSO set interpretations (MSOSI) were introduced in [11], as a generalization of automatic structures (as well as ω-automatic, tree automatic and ω-tree automatic structures). Indeed an automatic structure can be seen as an MSOSI whose domain is a single structure with decidable MSO theory such as (,). Using a framework of transformations turns out to be very fruitful, and most of the properties of automatic structures already hold for set-interpretations over structures with decidable MSO theory. The core property of automatic structures (and their generalizations) is that they have a decidable FO theory. More generally, MSOSI have what we call the FO backward translation property, meaning that the inverse image of an FO definable set by an MSOSI is MSO definable. This property is obtained via simple, yet powerful, syntactic formula substitution. This technique actually allows to show more generally that MSOSI are closed under post-composition by FO interpretations (FOI).

Generally speaking, automatic structures do not have a decidable MSO theory. This has motivated a line of research that looks for interesting structures with a decidable MSO theory. For instance, morphic ω-words, as well as two generalizations called k-lexicographic ω-words [2] and toric ω-words [4], have been shown to have a decidable MSO theory. Morphic ω-words and k-lexicographic ω-words are particular cases of automatic ω-words111Not to be confused with automatic sequences.. An automatic ω-word is an automatic structure with unary relations and a single binary relation that is a total order isomorphic to (,) (it is crucial that the structure be given by its order relation and not by the successor). To the best of our knowledge, it is not known whether an automatic ω-word with an undecidable MSO theory exists, raising the next conjecture.

Conjecture 1 ([2], Section 9).

Any automatic ω-word has a decidable MSO theory222Bárány actually conjectures that any automatic ω-word has a so-called canonical presentation..

In [2, Corollary 5.6], the author even shows that k-lexicographic ω-words are closed under sequential transductions. As we show in Proposition 11 this property is deeply connected to preserving MSO definable sets by inverse image (which we call regularity preserving333It follows the terminologiy of [3]. This property is sometimes called regular continuity [10].) and is stronger than having a decidable MSO theory.

A different setting where one can obtain regularity preserving transductions, is provided in [8] where it is shown that MSO interpretations (MSOI) from finite words to finite words characterize the polyregular transductions. Once again, as for automatic ω-words, the output structure must be defined by its order and not by the successor.

This calls for a more unifying argument and systematic study of MSOSI whose output structures are linearly ordered, that we phrase as a conjecture444One could state stronger conjectures extending the structures to trees, ω-words or infinite trees.:

Conjecture 2.

MSOSI from finite words to finite words are regularity preserving.

In this article, we focus on transductions from finite words to finite words for two main reasons: it is already challenging, and it captures part of the difficulty of ω-words. We show in Proposition 14 that a positive answer to Conjecture 2 entails that Conjecture 1 holds.

On regular transductions with exponential growth.

The theory of finite word transducers has a long history (in fact as long as automata theory) and is still actively studied.

Various classes of transductions have been introduced, most notably (and ordered inclusion-wise): sequential (Seq), rational (Rat), regular (Reg) and the more recent polyregular transductions (PolyReg) as well as transductions defined by streaming string transducers (SST), which subsume Reg but are incomparable to PolyReg. For a recent survey, see [23].

These classes are rather well-known and enjoy nice regularity properties, including being closed under composition (except for SST which is still closed under post-composition by Seq) which entails555In Proposition 11 we see that the two are closely related. being regularity preserving. However some important questions remain open, such as equivalence of PolyReg transductions, which is not known to be decidable.

The two classes of Reg and PolyReg enjoy natural logical characterizations, namely word-to-word MSO transductions (MSOT) and MSOI, respectively. The fact that MSOT are regularity preserving is again obtained by simple formula substitution and holds for arbitrary structures. In contrast in the case of MSOI, the only known proof is via a translation into an automaton model called pebble transducers. This raises a natural question for MSOSI:

Question 1.

Can we get an automaton model corresponding to MSOSI over finite words?

A positive answer to this question would hopefully provide a proof of Conjecture 2, since natural automata models are usually closed under post-composition by Seq 5. While hope plays an important part in research, we have good reasons to think this is a hard problem: as mentioned above this would solve a long standing open problem on automatic structures.

It is rather clear that PolyReg captures the “right” notion of regular transductions with polynomial growth. While MSOSI seems like a natural candidate, not enough is known about this class yet to say that it captures the “right” notion of regular transductions with exponential growth. Let us more humbly describe what should be, in our view, a nice class of regular transductions with exponential growth: this class should be characterized by different, somewhat natural666As opposed to an artificial model like the union of PolyReg with SST., computation models which subsume the well-behaved classes of PolyReg and SST. It should be regularity preserving and potentially5 have extra closure properties by pre- or post-composition with smaller classes. In this article we introduce the class of lexicographic transductions (Lex) which meets all the above criteria.

Contributions.

The first contribution of the article is a hardness result: showing that word-to-word MSOSI are regularity preserving is at least as hard as showing that any automatic ω-word has a decidable MSO theory (Proposition 14). To obtain this result we define automatic transduction (AT) which are naturally equivalent to MSOSI but formulated in a way that makes the connection with automatic structures clearer. That way we obtain a one-to-one correspondence between automatic ω-words and automatic transductions over a unary alphabet which define a total function.

The main contribution of the article is the introduction of a new class of transductions, called lexicographic transductions (Lex). We give three different characterizations of this class and show that it enjoys many nice properties, including being regularity preserving.

The first definition of Lex is in the spirit of list functions of [7, 5]: we start with simple functions which are recognizable transductions whose range contains words of length at most 1 only. Then we close the class under a single type of operator called maplex which works as follows: maplexf maps a word u to the concatenation f(u1)f(u2)f(un) where u1,,un are all the labellings of u over some fixed and totally ordered alphabet, enumerated in lexicographic order.

Secondly, we show that this class can be expressed as a syntactic restriction of AT, which we call lexicographic automatic transductions (ATLex). These two characterizations are actually syntactically equivalent but quite different in spirit. We leverage the aforementioned correspondence between automatic ω-words and automatic transduction, as well as a result of Bárány to show that the nesting of maplex operators generates a strict hierarchy of transduction classes (Proposition 27).

Thirdly, we introduce an automaton model called nested marble transducers (NMT). Nested marble transducers are quite expressive: they generalize marble transducers [15, 12] which are known to coincide with SST, they also naturally generalize PolyReg. Informally, a level k nested marble transducer can annotate its input as a marble transducer (i.e. it drops a marble whenever moving left and lifts a marble whenever moving right), and call a level k1 nested marble transducer to run on this annotated configuration. This call returns both an output string and a state which the top-level transducer can use to take its next transition. This passing of information from the lower levels to the higher levels is what allows to prove closure under post-composition with a sequential transducer. This is the key ingredient to show that NMT have regular domains, are regularity preserving, and more generally are closed under post-composition by PolyReg.

Regarding expressiveness, Lex can be expressed by NMT in a rather direct way (Theorem 36). In the other way, transductions expressed in Lex do not have such a state-passing mechanism, hence showing that NMT is included in Lex constitutes the technical heart of this article (Theorem 37). An important step consists in showing that one can remove the state-passing mechanism in NMT (Theorem 33). On top of being technical, we show it is computationally costly: there is an unavoidable non-elementary blow-up to transform a nested marble transducers into nested marble transducers without state-passing. This allows to prove the equivalence between the different models. In addition, as shown in Figure 1, this equivalence holds at each level of the aforementioned hierarchy.

Figure 1: Overview of the different equivalent models, with the transformations between them. The dotted arrow denotes an equivalence with a semantic restriction of ATk-Lex (see [18] for details).

2 Word languages and transductions

Words and languages.

Given an alphabet Σ, a Σ-word u (or just word if Σ is clear from the context) is a sequence of letters from Σ. We denote by ϵ the empty word, and by |u| the length of a word u. In particular |ϵ|=0. For all integers n0, we let Σn (resp. Σn) be the set of words of length n (resp. at most n). We let Pos(u)={1,,|u|} be the set of positions of u, and for all iPos(u), u[i]Σ is the i-th letter of u. We write Σ for the set of words over Σ, and Σ+ for the set of non-empty words. An ω-word is defined similarly, with a set of positions equal to . A word language over Σ is a subset of Σ. In this paper, we let | be a symbol called separator, assumed to be distinct from any alphabet symbol. Let Σ1,Σ2 be two alphabets, and u1Σ1,u2Σ2 be two words of length . The convolution u1u2 of u1 and u2 is the word in (Σ1×Σ2) such that for all 1i, (u1u2)[i]=(u1[i],u2[i]).

Finite automata.

A (non-deterministic) finite automaton (NFA) over an alphabet Σ is denoted as a tuple A=(Q,q0,F,Δ) where Q is the set of states, q0 the initial state, FQ the final states, and ΔQ×Σ×Q the transition relation. We write q𝑢Aq when there exists a run of A from state q to state q on u, and denote by L(A)={uΣq0𝑢AqfF} the language recognized by A. When A is a deterministic finite automaton (DFA), the transition relation is denoted by a (partial) function δ:Q×ΣQ.

Word transductions.

A word transduction (or just transduction for short) over Σ,Γ two alphabets is a (partial) function f:ΣΓ. We denote by dom(f) its domain. Given two transductions f1,f2:ΣΓ with disjoint domains, we let f1+f2 be the transduction of domain dom(f1)dom(f2) such that (f1+f2)(u)=fi(u) if udom(fi). Given f:ΣΓ, g:ΓΛ, we write (gf):ΣΛ the composition gf. Given h:ΛΔ, (hgf) stands for (h(gf)). For uΣ, we also write (hgfu) for (hgf)(u).

A transduction f has exponential growth if there exists c such that for all udom(f), |f(u)|2c|u| holds. A transduction f has polynomial growth if there exist c,k such that for all udom(f), |f(u)|c|u|k holds.

Example 3 (Reverse, copy and square).

Let Σ be an alphabet. The transduction rev:ΣΣ takes as input any word u=σ1σn and outputs its reverse σnσ1, for all σiΣ. The transduction copy takes u and returns uu.

Let Σ be an alphabet and Σ¯={σ¯σΣ}. Given a word u=σ1σn and a position iPos(u), we let underi(u)=σ1σi1σi¯σi+1σn. The transduction square:Σ(ΣΣ¯) is defined as square(u)=under1(u)under|u|(u). For example square(abc)=a¯bcab¯cabc¯.

Example 4 (Subwords).

Let sub:ΣΣ be the transduction which enumerates all the subwords of a word in lexicographic order (with rightmost significant bit). For example sub(abc)=a.b.ab.c.ac.bc.abc. Note that sub has exponential growth.

Example 5 (Map).

Let Σ be some alphabet and |Σ be some separator symbol. Let Σ|=Σ{|}. Let f:ΣΓ. The transduction mapf:Σ|Σ| takes any input word of the form u=u1|u2||un where uiΣ for all i{1,,n}, and returns f(u1)|f(u2)||f(un) (if all the f(ui) are defined, otherwise (mapf)(u) is undefined.

Sequential and rational transductions.

Sequential transductions are transductions recognized by sequential transducers. A sequential transducer over some alphabets Σ and Γ (not necessarily disjoint) is a pair T=(A,μ) where A=(Q,q0,F,δ) is a DFA over Σ and μ:dom(δ)Γ is a total function. We write qu/vTq whenever there exists a sequence of states q1=q,q2,,qn+1=q such that q1u[1]Aq2qnu[n]Aqn+1 where n=|u|, and v=μ(q1,u[1])μ(qn,u[n]). The transduction fT recognized by T is defined for all uL(A) by fT(u)=v such that q0u/vqfF. Note that dom(fT)=L(A). We denote by Seq the class of sequential transductions. Like sequential transducers, a (non-deterministic, functional) finite state transducer is defined as a pair T=(A,μ) but A can be non-deterministic, with the functional restriction: for all words uL(A), the outputs of all the accepting runs over u are all equal. With this restriction, T recognizes a transduction fT. A rational transduction is a transduction fT for some T, and we denote by Rat the class of rational transductions [21].

Regular and polyregular transductions.

The class of regular (resp. polyregular) transductions is the smallest class of transductions which is closed under composition of transductions and map, and contains the sequential transductions, copy and rev (resp. the sequential transductions, rev and square[9, 5]. We denote by PolyReg the class of polyregular transductions.

3 MSO set interpretations, properties and limitations

MSO set interpretations

Signatures, formulas and structures.

A relational signature (or simply signature) is a set 𝒮 of symbols together with a function 𝖺𝗋𝗂𝗍𝗒:𝒮. We consider a set of first-order variables denoted by lower case letter x,y,z, as well as a set of second-order variables denoted by upper case letter X,Y,Z. The MSO-formulas over signature 𝒮, denoted by MSO[𝒮], are denoted by the grammar ϕ::=xϕXϕϕϕ¬ϕX(x)R(x1,,xr), where x,x1,,xr are first-order variables, X is a second-order variable and R𝒮 with 𝖺𝗋𝗂𝗍𝗒(R)=r. We denote by FO[𝒮] the formulas which do not use second-order variables.

A relational structure u over signature 𝒮 is a set U called the universe of the structure, together with, for each symbol R𝒮 of arity r, an interpretation RuUr.

Regularity preserving.

A function from 𝒮-structures to 𝒯-structures is called regularity preserving if the inverse image of an MSO[𝒯] definable set is MSO[𝒮] definable. We say that a class of functions is regularity preserving if all functions in the class are.

Word structures.

The word signature over Σ is the tuple SΣ=((σ(x))σΣ,(x,y)) where σ(x) are unary predicate symbols and (x,y), usually written xy, is a binary predicate symbol. Any word u can be naturally associated with an SΣ-structure u~=(U,(σu~)σΣ,u~) where U=Pos(u), σu~ is a set of positions labeled σ, for all σΣ, and u~ is the natural (linear) order on Pos(u). We write u instead of u~ if it is clear from the context that u is an SΣ-structure. A word structure over Σ is an SΣ-structure isomorphic to some u~. Note that being a word structure is FO definable.

Definition 6 (MSO set interpretations [11]).

An MSO set interpretation (MSOSI) T from 𝒮-structures to 𝒯-structures, is given by k{0} called the dimension, a domain formula ϕdomMSO[𝒮], an output universe formula ϕ𝗎𝗇𝗂𝗏(X¯)MSO[𝒮], and for each symbol R𝒯 of arity r a formula ϕR(X1¯,,Xr¯)MSO[𝒮], where X¯,X1¯, are k-tuples of variables.

The semantics of T is a partial transduction fT from 𝒮-structures to 𝒯-structures. The domain of fT is the set of structures u such that uϕdom. Given such a u with universe U, we define its image v=fT(u) as the structure with universe V={P¯(2U)kuϕ𝗎𝗇𝗂𝗏(P¯)}, and for each R𝒯 of arity r, the interpretation Rv={(P1¯,,Pr¯)VkuϕR(P1¯,,Pr¯)}.We say that an MSOSI is (finite) word-to-word if its domain and co-domain only contain word structures over some respective alphabets Σ,Γ.

 Remark 7.

Given an MSOSI from SΣ-structures to SΓ-structures, one can restrict the domain formula to word structures whose image are word structures. This is because being a linear order is FO-definable.

Example 8.

The transduction sub of Example 4 is definable by the MSOSI T=(k=2,ϕdom=,ϕ𝗎𝗇𝗂𝗏(X,Y),(ϕσ(X,Y))σΣ,ϕ(X,Y)). The main idea is to let X range over all possible subsets, and Y range over all possible singletons {y} such that yX. Let 𝗌𝗂𝗇𝗀(Y,y)=Y(y)y(Y(y)y=y). It holds true iff Y={y}. Then, ϕ𝗎𝗇𝗂𝗏(X,Y)=y(𝗌𝗂𝗇𝗀(Y,y)X(y)). The label of an output position (X,{y}) is the label of the input position y, i.e. ϕσ(X,Y)=y(𝗌𝗂𝗇𝗀(Y,y)σ(y)). Finally, any two output positions (X1,{y1}), (X2,{y2}) are ordered lexicographically (with rightmost significant bit): if X1=X2, then y1y2, otherwise, the smallest mismatching position x (i.e. a position in the symmetric difference of X1 and X2) must be in X1. Those properties are easily expressible in MSO.

MSO transductions, MSO and FO interpretations.

An MSO interpretation (MSOI) is an MSOSI whose free set variables are restricted to be singleton sets. This can be syntactically enforced in the universe formula ϕ𝗎𝗇𝗂𝗏, as being a singleton is an MSO definable property. Equivalently, MSOI are defined as MSOSI but instead the free variables are first-order. Note that transductions realized by MSOI have only polynomial growth. An FO interpretation (FOI) is an MSOI whose formulas are all FO-formulas. Finally an MSO transduction (MSOT) is (roughly777Classically, one adds a bounded number of copies of the input to get the full class of MSOT. speaking) an MSO interpretation of dimension 1. MSOT capture exactly the class of regular transductions [13, 1, 16, 23].

The following theorem is at the core of the theory of set interpretations, and automatic structures. It holds in all generality, and furthermore the compositions can be done by simple formula substitutions.

Theorem 9 ([11, Proposition 2.4]).

MSO set interpretations are effectively closed under pre-composition by MSOT and post-composition by FOI.

Exponential versus polynomial growth.

There is a dichotomy for the growth of set interpretations over words, deeply connected to the similar dichotomy for the automata ambiguity, between exponential and polynomial growths. Moreover for polynomial growth transductions, the level of growth exactly coincides with the minimum dimension of an MSOSI defining the transduction. The result holds in the more general case of trees.

Theorem 10 ([20, Theorem 1.5],[6, Theorem 2.3]).

A set interpretation over words has growth either 2Θ(n), or Θ(nk) for some k, and this can be computed in PTime. In the latter case888Note that to get this tight correspondence, we need to allow a bounded number of copies of the input, see [20, Definition 4.3]., one can compute an equivalent MSOI of dimension k.

Quite a lot is known about word-to-word set interpretations with polynomial growth, which are called polyregular transductions and enjoy many different characterizations [8, Theorem 7].

Regularity preserving.

An open question on word-to-word MSOSI is whether they are regularity preserving. This can actually be formulated in terms of closure properties.

Proposition 11.

The following are equivalent:

  • Word-to-word MSOSI are regularity preserving,

  • The class of word-to-word MSOSI is closed under post-composition with transductions computed by Mealy machines (see [24] for a definition of Mealy machines),

  • The class of word-to-word MSOSI is closed under post-composition with polyregular transductions.

Automatic transductions

We describe an automata-based presentation of MSOSI, which we call automatic transductions. Algorithmically speaking, it is more amenable to efficient processing, as it is based on automata instead of MSO, and it makes the connection between automatic structures and set interpretations more obvious.

Definition 12.

An automatic transduction (AT for short) from Σ to 𝒯-structures is described as a tuple T=(Σ,B,Adom,A𝗎𝗇𝗂𝗏,(AR)R𝒯) where:

  • B is a finite alphabet describing a work alphabet

  • Adom is an automaton over Σ recognizing the domain of the transduction,

  • A𝗎𝗇𝗂𝗏 is an automaton over Σ×B. Words accepted by A𝗎𝗇𝗂𝗏 are called configurations,

  • for each R𝒯 of arity r, AR is an automaton over Σ×Br describing tuples of the relation R.

Given a word uΣ, the output 𝒯-structure v=fT(u) is defined, whenever uL(Adom), as follows: its universe is the set V={xB|uxL(A𝗎𝗇𝗂𝗏)}; a predicate symbol R𝒯 of arity r is interpreted as Rv={(x1,,xr)Vr|ux1xrL(AR)}.

 Remark 13.

Automatic transductions are essentially identical to MSOSI, except restricted to input word structures, where one can leverage the classical equivalence between MSO and automata. They can be naturally generalized to work over input structures such as ω-words, trees and infinite trees, giving rise to the notions of ω-automatic, tree-automatic and ω-tree-automatic transductions. Note that an ω-automatic structure is precisely an ω-automatic transduction whose domain is a single infinite word aω.

Transduction/structure correspondence.

In [18], we show a correspondence between word-to-word automatic transductions and automatic ω-words (defined therein), thanks to which we obtain the following proposition.

Proposition 14.

If word-to-word MSOSI are effectively regularity preserving, then automatic ω-words have a decidable MSO theory999One could actually prove the stronger implication that any automatic ω-word has a canonical presentation, as in [2]..

This entails that a positive answer to Conjecture 2 would provide a positive answer to Conjecture 1, which has been open since [2].

4 Lexicographic transductions

As explained in the latter section, we do not know whether MSOSI are regularity preserving, and as a consequence of Proposition 14, proving that it enjoys this property would prove a long-standing conjecture of the theory of automatic structures [2]. In this section, we introduce a subclass of MSOSI which enjoys this property, called lexicographic transductions.

Definition of lexicographic transductions

We first define this class in terms of closure of basic transductions, called simple transductions, under a lexicographic map operation. The connection with MSOSI is done at the end of this section (Subsection 4), via a corresponding subclass of automatic transductions.

Simple transductions.

A regular constant (partial) transduction of type ΣΓ is an expression of the form Lw, where L is a regular language over Σ and w is a word in Γ, such that for all uΣ, (Lw)(u) is defined only if uL, by (Lw)(u)=w. A simple transduction101010It is a restriction of the known class of recognizable transduction to output words of length at most 1. f is a finite union of regular constant transductions whose codomain only contains words of length at most 1. A simple transduction f:ΣΓ is denoted by f=i=1nLiwi such that L1,,LnΣ are pairwise disjoint regular languages, and w1,,wnΓ1.

Lexicographic enumerators.

An ordered alphabet is a pair λ=(B,) such that B is finite set and is a linear order over B. The order is extended lexicographically (using the same notation) to words of same length over B, with most significant letter to the right: for all n and all u,vBn, uv if there exists a position in such that u[i]v[i] and for all i<jn, u[j]=v[j]. Note that is a total order over Bn, for all n. We denote succλ:BB the successor function on B induced by .

Remind that | is a fixed separator symbol. The λ-lexicographic enumerator is the function

lex-enumλ:Σ,Γ alphabetsΣ((Σ×B)|)(Σ×B)w(wu1)|(wu2)||(wuk)

where |w|=|u1|==|uk|, u1 is minimal for , uk is maximal for and for all 1i<k, ui+1=succλ(ui). Note that k=|B||w|.

Example 15.

Let Σ={a,b} let λ=(B,) be a finite order with B={0,1} and 01. For all σΣ and bB, we write σb instead of (σ,b) and Σb to denote the set of pairs (σ,b) for all σΣ. Then lex-enumλ(abb)=a0b0b0|a1b0b0|a0b1b0|a1b1b0|a0b0b1|a1b0b1|a0b1b1|a1b1b1.

MapLex combinator.

Let λ=(B,) be an ordered alphabet. We define the function

maplexλ:Σ,Γ alphabets((Σ×B)Γ)ΣΓ

such that for all Σ,Γ alphabets, all f:(Σ×B)Γ and uΣ,

maplexλfu=f(v1)f(v2)f(vk)

where lex-enumλ(u)=v1|v2||vk. Note that u is in the domain of maplexλf if and only if v1,,vk are all in the domain of f. We write maplex when λ is clear from the context.

Definition 16 (Lexicographic transductions).

Lexicographic transductions, denoted by Lex, are defined inductively by Lex0 the class of simple transductions and Lexk+1={maplexλf fLexk,λordered alphabet }. Elements of Lexk are called k-lexicographic transductions.

Lemma 17.

For all fLex, its domain dom(f) is regular.

Proof.

Any Lex transduction f:ΣΓ is equal to maplexλ1(maplexλ2(maplexλks)) for some k0, some ordered alphabets (λi=(Bi,i))i and some simple transduction s:(Σ×B1××Bk)Γ. Then, f is defined on uΣ iff for all 1ik and all biBi|u|, s(ub1bk) is defined. Now, observe that dom(f) is the complement of the Σ-projection of the complement of dom(s). This entails the result as dom(s) is regular and regular languages are closed under morphisms (and complement).

 Remark 18.

A simple transduction sLex0, has growth O(1), and maplexλs has growth O(|B|n), for λ=(B,λ). One application of maplex can thus cause an exponential blowup. Note however that these exponentials don’t compose, but multiply with extra applications of maplex. Using the same notations as in the above proof, f has growth O(|B1××Bk|n).

Example 19 (Identity and Reverse).

Take λ=(B,) and λ=(B,) with B={0,1}, 01, and 10. For all σΣ, let Lσ=(Σ0)(σ1)(Σ0) and Lϵ=(Σ×B)(σLσ).

id=maplexλ(Lϵϵ+σΣLσσ)rev=maplexλ(Lϵϵ+σΣLσσ)

This is illustrated below on input abc, with the output of the simple function below every word of the enumeration.

ida0b0c0ϵ|a1b0c0a|a0b1c0b|a1b1c0ϵ|a0b0c1c|a1b0c1ϵ|a0b1c1ϵ|a1b1c1ϵreva1b1c1ϵ|a0b1c1ϵ|a1b0c1ϵ|a0b0c1c|a1b1c0ϵ|a0b1c0b|a1b0c0a|a0b0c0ϵ
Example 20 (Morphisms).

Let ϕa:u{a,b}a be the morphism defined by ϕa(a)=a and ϕa(b)=ϵ. We have ϕaLex1. It suffices to take B={0,1} with 01. Then, let La=(Σ0)(a1)(Σ0), and Lϵ=La¯. Then ϕa=maplex(Laa+Lϵϵ). More generally, if ψ:ΣΓ is an arbitrary morphism, we show that ψLex1. Note that ψ may transform a single letter into several letters, while simple transductions output at most one letter. To overcome this difference, we consider a larger linearly ordered set. Let M=maxσΣ|ψ(σ)|. If M=0, then ψ is the constant transduction which outputs ϵ, so ψLex0. Otherwise, let λM=(BM,<) with BM={0,1,,M} naturally ordered. Let I:Γ2Σ× such that for all γΓ, I(γ) is the set of pairs (σ,i) such that ψ(σ)[i]=γ. Note that for all γΓ, I(γ)Σ×{1,,M}. Define Lγ as the set given by the regexp (σ,i)I(γ)(Σ0)(σi)(Σ0) and Lϵ the complement of the union of all Lγ. Then ψ=maplexλM(Lϵϵ+γΓLγγ).

Example 20 can be generalized to sequential transductions.

Lemma 21.

SeqLex1.

Example 22 (Domain restriction).

Let k0. Given f:ΣΓ a transduction in Lexk and LΣ a regular language, the transduction f|L:uf(u) if udom(f)L is in Lexk. We show this inductively on k: it is clear for fLex0. Assume f=maplexλg with λ=(B,) and let πΣ:(Σ×B)Σ be the natural projection morphism. Then f|L=maplexλg|πΣ1(L), which proves that Lexk is closed under domain restriction.

Example 23 (Subwords).

We show that subLex2 (see Example 4 for the definition of sub). We take λ=(B,<), with B={0,1} and define the following morphism del0:(Σ×B)Σ by del0(σ,0)=ϵ and del0(σ,1)=σ. We can then show sub=maplexλdel0. From Ex. 20, morphisms are in Lex1, so subLex2.

Example 24 (Square, illustrated on Fig. 2).

The transductions square and underi have been defined in Ex. 3. We show that squareLex2. Let λ=(B,<) with B={0,1} and let f:(Σ×B)(ΣΣ¯) such that for all uΣ of length n, for all 1in, f(u(0i110ni))=underi(u), and for b010, f(ub)=ϵ. It holds that square=maplexλf, because 0i110ni<0j110nj for all i<j. It remains to show that fLex1. It is because f=maplexλg for g:(Σ×B2)Σ the following simple transduction: for all ub1b2(Σ×B2), if b1010 or b2010, g(ub1b2)=ϵ, otherwise let i be the unique position at which 1 occurs in b1 and j the unique position at which a 1 occurs in b2. If i=j, then g(ub1b2)=u[j]¯, otherwise g(ub1b2)=u[j]. Since those properties are regular, g is a simple transduction.

a00b00ϵ|a01b00ϵ|a00b01ϵ|a01b01ϵ|a10b00ϵ|a11b00a¯|a10b01b|a11b01ϵ|a00b10ϵ|a01b10a|a00b11b¯|a01b11ϵ|a10b10ϵ|a11b10ϵ|a10b11ϵ|a11b11ϵ

Figure 2: Equality square=(maplexλmaplexλg) illustrated on input ab, with the results of applying g underneath.

Presentation as automatic transductions

We give an alternative presentation in terms of automatic transductions. Let k1 be a positive integer, and λ¯=((B1,1),,(Bk,k)) be a k-tuple of ordered alphabets and let B=B1××Bk. We define the associated k-lexicographic order for words of the same length over B by uλ¯v if u=u1uk, v=v1vk, and there is i{1,,k} such that uiivi and for all j<i, uj=vj.

Definition 25.

Let λ¯=((B1,1),,(Bk,k)) be a k-tuple of ordered alphabets, let B=B1××Bk and let λ¯ be the associated k-lexicographic order.

A k-lexicographic automatic transducer over the alphabet B is an automatic transducer with work alphabet B such that the order is exactly λ¯. A transduction is said to be k-lexicographic automatic if it can be defined by a k-lexicographic automatic transducer. We denote by ATk-Lex the class of k-lexicographic automatic transductions and by ATLex the union of these, which we call lexicographic automatic transductions.

The next proposition is rather immediate.

Proposition 26 (ATk-Lex=Lexk).

For all k1, a transduction is k-lexicographic iff it is k-lexicographic automatic.

In [18], we make a connection between k-lexicographic automatic transductions and k-lexicographic automatic ω-words [2]. In [2, Theorem 6.1], the author shows that k-lexicographic automatic ω-words form a strict hierarchy and provides explicit witnesses for each level of the hierarchy. As a consequence of Proposition 26, we obtain that k-lexicographic transductions form a strict hierarchy, as stated by the following proposition.

Proposition 27.

For all k1, LexkLexk+1.

5 Nested marble transducers

We introduce in this section a transducer model, called nested marble transducers, and show that the class of transductions it recognizes is exactly the class of lexicographic transductions. Nested marble transducers generalize marble transducers [15, 12]. A marble transducer belongs to the family of transducers with an unbounded number of pebbles (of finitely many colours), with the following restriction: whenever it moves left, it has to drop a pebble, and whenever it moves right, it has to lift a pebble. The term marble is meant to emphasize this restriction. A nested marble transducer of level k1 behaves like a marble transducer which can call, when reading the leftmarker , a nested marble transducer of level k1. A nested marble transducer of level 0 is what we call a simple transducer. It is just a DFA with an output function on its accepting states, so it realizes a transduction whose range is finite.

Definition 28 (Simple transducers).

Let Σ,Γ be finite sets (not necessarily disjoint). A (Σ,Γ)-simple transducer is a pair T=(A,μ) where A=(Q,q0,F,δ) is a DFA over Σ{,} and μ:FΓ1 is a total function.

We define two semantics for T, an operational semantics fTop:Q×ΣΓ×F which takes as input a word and also a state from which the computation starts, and returns a word and the state reached when the computation ends, if it is accepting. Otherwise fTop is not defined. Formally, fTop(q,u) is defined for all u such that quAqf for some qfF, by fTop(q,u)=(μ(qf),qf).

From the operational semantics, we also define the transduction fT:ΣΓ recognized by T by applying the operational semantics from the initial state, and projecting away the final state, i.e. fT(u)=π1(fTop(q0,u)), where π1 is the projection on the first component.

Definition 29 (Nested marble transducers from Σ to Γ).

A (0,Σ,Γ)-nested marble transducer is a (Σ,Γ)-simple transducer. For k1, a (k,Σ,Γ)-nested marble transducer is a tuple T=(Σ,Γ,C,c0,QT,q0,FT,δ,δcall,δret,μ,T) where:

  • C is a finite set of (marble) colors, c0 is an initial color;

  • QT is a finite set of states, q0 is an initial state, and FT a set of accepting states;

  • T is a (k1,Σ×C,Γ)-nested marble transducer with set of states QT and set of accepting states FT;

  • δ:QT×(Σ{})×C(C{})×QT is a transition function;

  • δcall:QT×CQT is a call function; δret:QT×C×FTQT is a return function;

  • μ:dom(δ)Γ is an output function.

We use (k,Σ,Γ)-NMT (or just k-NMT if Σ,Γ are clear from the context) as a shortcut for (k,Σ,Γ)-nested marble transducer. T is the assistant NMT and k the level of T. Finally, we often say marble instead of marble colour.

We now define the semantics informally. The reading head of T is initially placed on the rightmost position labeled , marked with a marble of color c0, in state q0. Transitions work as follows: suppose the current state is q and the reading head is on some position i labeled by σΣ{,} and by some marble of color cC. Whatever transition in δ can be applied, some output word is produced by T according to μ. Then there are three cases:

  1. 1.

    if σΣ{} and δ(q,σ,c)=(c,q) where cC, then the reading head moves to position (i1) in state q and a marble of color c is placed (on position i1);

  2. 2.

    if σΣ and δ(q,σ,c)=(,q), then T lifts the current marble and moves its reading head to position i+1 in state q;

  3. 3.

    if σ= then T calls T initialized with state δcall(q,c), on the input word annotated with marbles. When T finishes its computation in some accepting state q, T lifts marble c, moves its reading head to position 1 and continues its computation from state δret(q,c,q).

The (operational) semantics of T is a function fTop:QT×ΣΓ×FT, that we define inductively. The case k=0 has been defined after Definition 28. If k1 and T=(Σ,Γ,C,c0,QT,q0,FT,δ,δcall,δret,μ,T) then we assume fTop:QT×(Σ×C)Γ×FT to be defined inductively. Let us now define fTop. A configuration of T over a word uΣ is a triple (q,i,v) such that q is the current state, iPos(u){0,n+1} is the current position (where n=|u|), and vC is an annotation of the suffix (u)[i:n+1]. We define a labeled successor relation (q,i,cv)𝑤T(q,i,v), between any two configurations where cC, labeled by wΓ, whenever one of the following cases hold:

  1. 1.

    1in+1, δ(q,c)=(c,q), i=i1, v=ccv and w=μ(q,c);

  2. 2.

    1in, δ(q,c)=(,q), i=i+1, v=v and w=μ(q,c);

  3. 3.

    i=0, fTop(δcall(q,c),(u)cv)=(w,p), q=δret(q,c,p), i=1 and v=v.

The function fTop:QT×ΣΓ×FT recognized by T is defined, for all qQT and all uΣ such that there exists a sequence of configurations over u: ν0=(q,n+1,c0)w1Tν1w2Tν3νk1wkTνk where the state qf of νk is accepting (i.e. in F) and the states of configurations νi, i<k, are non-accepting, by fTop(q,u)=(w1wk,qf).

The transduction fT:ΣΓ recognized by T is defined as the projection of fTop(q0,u) on Σ and Γ, i.e. if fTop(q0,u)=(v,qf) then fT(u)=v. We denote by NMT the class of transductions recognizable by some (k,Σ,Γ)NMT. The local size of an NMT is the number of its transitions, states and marbles. Its size is its local size plus the size the lower level NMT it calls. We similarly define the number of (resp. local number of) states/marbles/transitions.

Example 30.

We describe a 2-NMT T2 computing the transduction sub of Example 23. We recall that sub=maplexλdel0 where λ=(B={0,1},<) and del0 is a morphism. The transducer T2 behaves as a marble transducer which computes the λ-lexicographic enumerator lex-enumλ, and whenever a full annotation of its input has been computed, it calls a 1-NMT T1 which computes del0. Let us explain how T2 computes the next annotation in lexicographic order (which corresponds to the binary addition with most significant bit to the right). When the reading head of T2 is on the left marker, all input positions are marked with some pebble in B={0,1}. Then, T2 scans its input to the right (lifting all the pebbles it sees) until it reads a 0, replaces it by 1 and moves again to the left marker, dropping pebble 1 all the way back to the left marker. Only three states are needed. Initially, T2 drops pebble 0 on all positions, from right to left. We explain now how T1 works: it scans its input from right to left, and, whenever it reads an input (σ,b) with b=1, outputs σ. Whenever T1 reaches the leftmarker, it calls a simple transducer T0 which does nothing but outputting ϵ.

The following result states that NMT are closed under post-composition with Seq. To prove it, we strongly rely on the ability to pass state information through mappings δcall and δret to adapt a classical product construction of automata.

Lemma 31 (SeqNMTNMT).

For all k0, all (k,Σ,Γ)-NMT T and all sequential transducer S over Γ,Λ, one can construct, in polynomial time, a (max(k,1),Σ,Λ)-NMT T such that fT=fSfT.

State-passing free nested marble transducers.

In the definition of NMT, there are two explicit forms of information-passing: state information can be passed from level k to level k1 through the function δcall, and state information can be passed from level k1 to level k via the function δret. In addition, there is an implicit one through the domain of assistant transducers: indeed, the definition of the semantics requires that all calls to assistant transducers do accept, hence the assistant transducer can influence the master transducer by rejecting a word. In this subsection, we prove that information-passing can be removed while preserving the computational power of k-NMT, however at the cost of increasing the size by a tower of exponentials of height k. While state-passing was useful to prove the closure under post-composition with sequential transductions (Lemma 31), it will be more convenient to consider state-passing free nested marble transducers in the sequel, in particular to prove that NMT recognize lexicographic transductions (Subsection 5).

Definition 32.

A state-passing free (k,Σ,Γ)-nested marble transducer ((k,Σ,Γ)-NMTspf for short), is either a simple transducer if k=0, or, if k>0, a (k,Σ,Γ)-NMT T=(Σ,Γ,C,c0,QT,q0,F,δ,δcall,δret,μ,T) such that

  1. 1.

    T is a (k1,Σ×C,Γ)-NMTspf with set of states QT and initial state q0

  2. 2.

    δcall(q,c)=q0 for all qQT and cC

  3. 3.

    δret(q,c,q)=q for all qQT,cC and qQT

  4. 4.

    calls to the assistant transducer T always accept.

Since the functions δcall and δret play no role, we often omit them in the tuple denoting T.

Theorem 33 (State-passing removal).

For all k-NMT T, there exists an equivalent k-NMTspf T whose size is kEXP in that of T. This non-elementary blow-up is unavoidable.

Before proving this result, we show a property on domains of NMT. A nested marble automaton A of level k is a nested marble transducer T of level k whose output function μ is the constant function that always returns ϵ. The language of A is defined as L(A)=dom(fT).

Lemma 34.

A language is recognizable by a nested marble automaton of level k and n states iff it is recognizable by a finite automaton of size in k-EXP(n). This non-elementary blow-up is unavoidable.

Proof sketch.

It is clear that any regular language is the domain of some simple transduction. Conversely, let A be a nested marble automaton of level k. If k=0, it is obvious.If k1, let A=(Σ,C,c0,QA,q0,F,δ,δcall,δret,A) where A has level k1 (in the tuple, we have omitted the output alphabet and function, since they play no role). By IH, for all pairs (qc,qr) of states of A, the language of words accepted by A by a run starting in qc and ending in qr is regular, and can be described by some finite automaton Dqc,qr of size in (k1)-EXP(n).

We turn A into a marble automaton B (of level 1) such that L(B)=L(A). The marbles of B are enriched with information on the states of automata Dqc,qr, for all pairs (qc,qr), ensuring that B knows the state of all the automata Dqc,qr after reading the current suffix. B exploits this information to simulate A and whenever A calls A with some initial state qc, instead, B knows, if it exists, the state qr of A such that the current marked input is accepted by Aqc,qr. If such a state exists, then it is unique as A is deterministic, and B can bypass calling A and directly apply its return transition. Otherwise, B stops.

The result follows as marble automata are known to recognize regular languages. The conversion of a marble automaton into a finite automaton is exponential both in the number of states and number of marbles (see e.g. [15, 12], as well as Theorem 5.4 of [22] for a detailed construction), yielding a tower of k-exponential inductively.

It can be shown that this non-elementary blowup is not avoidable, because first-order sentences on word structures (with one successor) with quantifier rank r, can be converted in an exponentially bigger nested marble automaton, while it is known that such sentences can be converted into an equivalent finite automaton of unavoidable size a tower of exponential of height r [19].

Corollary 35.

Transductions recognized by nested marble transducers have regular domains.

We are now ready to sketch the proof of Theorem 33.

Proof sketch of Theorem 33.

There are two kinds of state-passing, through functions δcall and δret. We deal with them separately. First, removal of δcall can be done by enriching marbles with the current state, so as to pass this information to the assistant transducer. Removal of δret is more involved, but can be done by induction using a technique similar to the one used to prove Lemma 34. By induction hypothesis, the assistant transducer can be replaced by an equivalent state-passing free NMT. In addition, its domain is regular thanks to Lemma 34. Hence, one can enrich the marbles so as to precompute the final state reached by the assistant transducer, and in turn simulate the function δret. This also allows to ensures that all calls to the assistant transducer do accept.

Last, we justify the fact that the non-elementary blow-up is unavoidable. It is because the domain of any state-passing free NMT S is recognizable by a finite automaton of exponential size. Indeed, the calls to assistant transducers always terminate, so the domain of S does not depend on assistant transducers, hence can be described by a marble automaton, hence by a finite automaton of size exponential in the number of local states and marbles of S. Thus, the existence of an elementary construction for state-passing removal would contradict the non-elementary blow-up stated in Lemma 34.

Equivalence with lexicographic transductions.

In this subsection, we prove (Theorems 36 and 37) that a transduction is recognizable by a k-nested marble transducer iff it is k-lexicographic. Consider some fLEXk. Then f=maplexλ1(maplexλ2maplexλks)) for some λi=(Bi,i) and s a simple transduction. We call B1,,Bk the ordered alphabets of f and s the simple transduction of f. Given an ordered alphabet (B,), one can enumerate the annotations of a word according to the lexicographic extension using a marble automaton.

Theorem 36 (LexNMT).

Any transduction fLexk is recognizable by some NMT Tf of level k. If B1,,Bk are the ordered alphabets of f and s its simple transduction, represented by a sequential transducer with m states, then Tf has O(k+m) states and i=1k|Bi| marbles.

Conversely, we prove that the transductions recognized by NMTspf are lexicographic.

Theorem 37 (NMTspfLex).

Any transduction f recognizable by some NMTspf T of level k is k-lexicographic.

The proof is rather involved. We provide high level arguments. The result is shown by induction on k. It is trivial for k=0. For k>0, the main idea is to see the sequence of successive configurations of T on some input as a lexicographic enumeration. This is possible due to the stack discipline of marbles. By extending the marble alphabet with sufficient information, we define a total order on marbles such that successive configurations of T, extended with this information, forms a lexicographically increasing chain.

6 Expressiveness and closure properties of lexicographic transductions

In this section, we prove that Lex contains all the polyregular transductions [5], and all the transductions recognizable by (copyful) streaming string transducers [17, 1]. We also show that Lex is closed by post-composition under any polyregular transduction, and closed by pre-composition under any rational transduction. We start by showing that lexicographic transductions preserve regular languages under inverse image.

Proposition 38.

Transductions in Lex are regularity preserving.

Proof.

It is an immediate corollary of the inclusion LexNMT (Theorem 36), that NMT are closed by post-composition by a sequential transduction (Lemma 31), and that NMT have regular domains (Corollary 35).

We show that Lex subsumes both SST and PolyReg. More precisely that any transduction recognizable by a (copyful) streaming string transducer (SST) is 1-lexicographic. We do not give the definition of SST and refer the reader to [12] for more details. We also show that NMT of level k subsume k-pebble transducers. Again we do not give precise definitions of pebble transducers and refer the reader to [5].

Theorem 39 (SST and PolyReg in Lex).

The following hold:

  • SST=Lex1,

  • A transduction definable by a k-pebble transducer is in Lexk. In particular PolyRegLex.

Proof.

It is already known that marble transducers (i.e. nested marble transducers of level 1) capture exactly the class of SST-recognizable transductions [12]. The result then follows from Theorem 36 and Theorem 37. For the second statement, we note that single pebble can be simulated by one level of marbles, with colors {0,1} with the restriction that at most one marble can have color 1 per level.

Any polyregular transduction can be expressed as a composition of sequential transductions, square, map and rev [5]. We show that Lex is closed by post-composition by these transductions (e.g. for sequential functions it has been shown in Lemma 31). As a consequence we obtain that Lex is closed under post-composition by polyregular transductions.

Theorem 40.

PolyRegLexLex.

Finally, we show that lexicographic transductions are closed under pre-composition by any rational transduction.

Theorem 41 (LexRatLex).

Let k1. For any rational transduction g:ΓΛ and any k-lexicographic transduction f:ΛΓ, fg is k-lexicographic.

Proof.

A rational transduction can be decomposed as a letter-to-letter rational transduction, followed by a morphism. Example 20 shows that morphisms are lexicographic. Similar ideas apply inductively to show that Lex is closed by pre-composition under morphisms and letter-to-letter rational transductions.

7 Discussion

We have introduced lexicographic transductions, a subclass of MSOSI, and provided three characterizations: in terms of closure of simple functions by the maplex  operator, as lexicographic automatic transductions that can be seen as a syntactic restriction of MSOSI, and through nested marble transducers. Thanks to these characterizations, this class is shown to subsume both PolyReg and SST. Moreover, it is actually closed under post-composition by PolyReg and thus is regularity preserving, which MSOSI is not known to be.

Open questions on MSOSI.

We leave open whether MSOSI is regularity preserving. A way to attack the problem is to try to obtain an equivalent automata-based model, as stated in Question 1. However, as we have shown, a positive answer would entail that all automatic ω-words have a decidable MSO theory, which has been open for almost 20 years.

Open questions on Lex.

We have shown that Lex is a rather well-behaved class, however some interesting questions remain open. Although we suspect that MSOSI strictly subsumes Lex, this remains unproven. For example, we could not show that Lex is closed under pre-composition with Reg, in particular, it is already unclear whether LexrevLex holds.

The equivalence problem is central to transducer theory, but its decidability status is still unknown for PolyReg transductions. It is also open for Lex, which subsumes PolyReg.

One can decide whether a Lex transduction is in PolyReg (Theorem 10), however we do not know if the Lex hierarchy is decidable (already for its first level Lex1).

Possible extensions of Lex.

While Lex has proven to be an interesting class, the zoo of word-to-word transductions with exponential growth is relatively unknown. We propose three possible extensions of Lex, in increasing expressiveness, all included in MSOSI.

The class LexReg may be an interesting class in itself and the first level Lex1Reg coincides with the rather natural class of two-way streaming string transducers.

A more general way of extending Lex is to generalize the operation lex-enum to allow lexicographic orders where the significance of letters is given by an arbitrary MSO definable order. This class subsumes LexReg however it is not clear that it is regularity preserving.

Another possible generalization is to replace marbles with the so-called invisible pebbles of Engelfriet[14] and define nested invisible pebble transducers, where the nested levels can see the pebbles of the previous levels but not the ones of their own. We believe that the state-passing free version can be shown to be still included in MSOSI but it is not clear that it is regularity preserving. However, we conjecture that the version with state-passing can recognize non-regular languages, and hence is too expressive.

References

  • [1] Rajeev Alur and Pavol Cerný. Expressiveness of streaming string transducers. In Kamal Lodaya and Meena Mahajan, editors, IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2010, December 15-18, 2010, Chennai, India, volume 8 of LIPIcs, pages 1–12. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2010. doi:10.4230/LIPICS.FSTTCS.2010.1.
  • [2] Vince Bárány. A hierarchy of automatic ω-words having a decidable MSO theory. RAIRO Theor. Informatics Appl., 42(3):417–450, 2008. doi:10.1051/ITA:2008008.
  • [3] Jean Berstel, Luc Boasson, Olivier Carton, Bruno Petazzoni, and Jean-Eric Pin. Operations preserving regular languages. Theor. Comput. Sci., 354(3):405–420, 2006. doi:10.1016/J.TCS.2005.11.034.
  • [4] Valérie Berthé, Toghrul Karimov, Joris Nieuwveld, Joël Ouaknine, Mihir Vahanwala, and James Worrell. The monadic theory of toric words. Theor. Comput. Sci., 1025:114959, 2025. doi:10.1016/J.TCS.2024.114959.
  • [5] Mikolaj Bojańczyk. Polyregular functions. CoRR, abs/1810.08760, 2018. arXiv:1810.08760.
  • [6] Mikolaj Bojańczyk. On the growth rates of polyregular functions. In 38th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2023, Boston, MA, USA, June 26-29, 2023, pages 1–13. IEEE, 2023. doi:10.1109/LICS56636.2023.10175808.
  • [7] Mikolaj Bojańczyk, Laure Daviaud, and Shankara Narayanan Krishna. Regular and first-order list functions. In Anuj Dawar and Erich Grädel, editors, Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, pages 125–134. ACM, 2018. doi:10.1145/3209108.3209163.
  • [8] Mikolaj Bojańczyk, Sandra Kiefer, and Nathan Lhote. String-to-string interpretations with polynomial-size output. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, volume 132 of LIPIcs, pages 106:1–106:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPICS.ICALP.2019.106.
  • [9] Mikolaj Bojańnczyk and Rafal Stefanski. Single-use automata and transducers for infinite alphabets. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, July 8-11, 2020, Saarbrücken, Germany (Virtual Conference), volume 168 of LIPIcs, pages 113:1–113:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ICALP.2020.113.
  • [10] Michaël Cadilhac, Olivier Carton, and Charles Paperman. Continuity of functional transducers: A profinite study of rational functions. Log. Methods Comput. Sci., 16(1), 2020. doi:10.23638/LMCS-16(1:24)2020.
  • [11] Thomas Colcombet and Christof Löding. Transforming structures by set interpretations. Log. Methods Comput. Sci., 3(2), 2007. doi:10.2168/LMCS-3(2:4)2007.
  • [12] Gaëtan Douéneau-Tabot, Emmanuel Filiot, and Paul Gastin. Register transducers are marble transducers. In Javier Esparza and Daniel Král’, editors, 45th International Symposium on Mathematical Foundations of Computer Science, MFCS 2020, August 24-28, 2020, Prague, Czech Republic, volume 170 of LIPIcs, pages 29:1–29:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.MFCS.2020.29.
  • [13] Joost Engelfriet and Hendrik Jan Hoogeboom. Two-way finite state transducers and monadic second-order logic. In Jirí Wiedermann, Peter van Emde Boas, and Mogens Nielsen, editors, Automata, Languages and Programming, 26th International Colloquium, ICALP’99, Prague, Czech Republic, July 11-15, 1999, Proceedings, volume 1644 of Lecture Notes in Computer Science, pages 311–320. Springer, 1999. doi:10.1007/3-540-48523-6_28.
  • [14] Joost Engelfriet, Hendrik Jan Hoogeboom, and Bart Samwel. XML navigation and transformation by tree-walking automata and transducers with visible and invisible pebbles. Theor. Comput. Sci., 850:40–97, 2021. doi:10.1016/J.TCS.2020.10.030.
  • [15] Joost Engelfriet, Hendrik Jan Hoogeboom, and Jan-Pascal van Best. Trips on trees. Acta Cybern., 14(1):51–64, 1999. URL: https://cyber.bibl.u-szeged.hu/index.php/actcybern/article/view/3510.
  • [16] Emmanuel Filiot and Pierre-Alain Reynier. Transducers, logic and algebra for functions of finite words. ACM SIGLOG News, 3(3):4–19, 2016. doi:10.1145/2984450.2984453.
  • [17] Emmanuel Filiot and Pierre-Alain Reynier. Copyful streaming string transducers. Fundam. Informaticae, 178(1-2):59–76, 2021. doi:10.3233/FI-2021-1998.
  • [18] Emmanuel Filiot, Pierre-Alain Reynier, and Nathan Lhote. Lexicographic transductions of finite words. CoRR, abs/2503.01746, 2025. doi:10.48550/arXiv.2503.01746.
  • [19] Markus Frick and Martin Grohe. The complexity of first-order and monadic second-order logic revisited. Ann. Pure Appl. Log., 130(1-3):3–31, 2004. doi:10.1016/J.APAL.2004.01.007.
  • [20] Paul Gallot, Nathan Lhote, and Lê Thành Dũng Nguyên. The structure of polynomial growth for tree automata/transducers and mso set queries, 2025. doi:10.48550/arXiv.2501.10270.
  • [21] Tero Harju and Juhani Karhumäki. Finite transducers and rational transductions. In Jean-Éric Pin, editor, Handbook of Automata Theory, pages 79–111. European Mathematical Society Publishing House, Zürich, Switzerland, 2021. doi:10.4171/AUTOMATA-1/3.
  • [22] Tsutomu Kamimura and Giora Slutzki. Parallel and two-way automata on directed ordered acyclic graphs. Inf. Control., 49(1):10–51, 1981. doi:10.1016/S0019-9958(81)90438-1.
  • [23] Anca Muscholl and Gabriele Puppis. The many facets of string transducers (invited talk). In Rolf Niedermeier and Christophe Paul, editors, 36th International Symposium on Theoretical Aspects of Computer Science, STACS 2019, March 13-16, 2019, Berlin, Germany, volume 126 of LIPIcs, pages 2:1–2:21. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPICS.STACS.2019.2.
  • [24] Jacques Sakarovitch. Elements of Automata Theory. Cambridge University Press, USA, 2009.