Commutative -Rational Series of Polynomial Growth
Abstract
This paper studies which functions computed by -weighted automata can be realised by -weighted automata, under two extra assumptions: commutativity (the order of letters in the input does not matter) and polynomial growth (the output of the function is bounded by a polynomial in the size of the input). We leverage this effective characterization to decide whether a function computed by a commutative -weighted automaton of polynomial growth is star-free, a notion borrowed from the theory of regular languages that has been the subject of many investigations in the context of string-to-string functions during the last decade.
Keywords and phrases:
Rational series, weighted automata, polyregular function, commutative2012 ACM Subject Classification:
Theory of computation Quantitative automata ; Theory of computation TransducersFunding:
Aliaume Lopez was supported by the Polish National Science Centre (NCN) grant “Polynomial finite state computation” (2022/46/A/ST6/00072).Editors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim ThắngSeries and Publisher:

1 Introduction
Given a semiring , and a finite alphabet , the class of (noncommutative) -rational series is defined as functions from to that are computed by -weighted automata [1]. This computational model is a generalization of the classical notion of non-deterministic finite automata to the weighted setting, where transitions are labeled with elements of . The semantics of -weighted automata on a given word is defined by the sum over all accepting runs reading , of the product of the weights of the transitions taken along this run. In this paper, we are interested in the case where equals or , hence, in -rational series () and -rational series (). It is clear that is a proper subclass of , and a longstanding open problem is to provide an algorithm that decides whether a given is in [10].
Problem 1.
Input: A . Output: Is in ?
Problem 1 recently received attention in the context of polyregular functions (), a computational model that aims to generalize the theory of regular languages to the setting of string-to-string functions [2]. In the case of regular languages, star-free languages form a robust subclass of regular languages described equivalently in terms of first order logic [13], counter-free automata [13], or aperiodic monoids [16]. Analogously, there exists a star-free fragment of polyregular functions called star-free polyregular functions () [2]. One open question in this area is to decide whether a given polyregular function is star-free.
Problem 2.
Input: A polyregular function . Output: Is star-free?
In order to approach decision problems on polyregular functions, restricting the output alphabet to a single letter has proven to be a fruitful method [6, 7]. Because words over a unary alphabet are canonically identified with natural numbers, unary output polyregular functions are often called -polyregular functions (), and their star-free counterpart star-free -polyregular functions (). Coincidentally, polyregular functions with unary output forms a subclass of -rational series, namely the class of -rational series of polynomial growth, i.e. the output of the function is bounded by a polynomial in the size of the input. In [5], the authors introduced the class of -polyregular functions () as a subclass of -rational series that generalizes -polyregular functions by allowing negative outputs, and showed that membership in the star-free subclass inside is decidable [5, Theorem V.8]. Although this could not be immediately leveraged to decide inside , it was conjectured that [8, Conjecture 7.61]. It was believed that understanding the membership problem of inside , that is, a restricted version of Problem 1, would be a key step towards proving , which itself would give hope in designing an algorithm for Problem 2. We illustrate in Figure 1 the known inclusions and related open problems between the discussed classes of functions.
Contributions.
In this paper, we work under the extra assumption of commutativity, that is, assuming that the function is invariant under the permutation of its input. In this setting, we prove that [8, Conjecture 7.61] and design an algorithm that decides whether a function in is in [8, Open question 5.55]. As a consequence, the upper left square of Figure 1 has all of its arrows decidable and with effective conversion procedures under this extra assumption. Because -rational series with polynomial growth are exactly -polyregular functions [5], this can be seen as decision procedure for Problem 1 under the extra assumption of commutativity and polynomial growth. Similarly, our results provide an algorithm for Problem 2 under the extra assumption of commutativity and unary output alphabet.
As an intermediate step, we provide a complete and decidable characterization of polynomials in that can be computed using (resp. . These characterizations uncover a fatal flaw in the proof of a former characterization of such polynomials [10, Theorem 3.3, page 4]. We also prove that this previous results holds for polynomials with at most two indeterminates (Lemma 29), which may explain why it was not detected earlier. Furthermore, these characterizations provide effective descriptions of polynomials that can be expressed in as those obtained using integer combinations of products of binomial coefficients (called integer binomial polynomials, defined page 3) and similarly for by introducing the notion of strongly natural binomial polynomials (defined page 3.3), which we believe has its own interest. Finally, these characterizations demonstrate that polynomials expressible by (resp. ) are exactly those expressible by (resp. ), that is, polynomials are inherently star free functions.
Outline of the paper.
In Section 2, we provide a combinatorial definition of -polyregular functions (resp. -polyregular functions), show that one can decide if a function is commutative (Lemma 8). In Section 3, we provide a counterexample to the flawed result of [10, Theorem 3.3, page 4] (Lemma 15), and correct it by providing effective characterizations of polynomials computed by (Theorem 31) and (Theorem 34). Finally, in Section 4, we answer positively to [8, Open question 5.55] (Theorem 37) and to [8, Conjecture 7.61] (Theorem 40), both under the extra assumption of commutativity.
2 Preliminaries
The capital letters denote fixed alphabets, i.e. finite set of letters, and (resp. ) are the set of words (resp. non-empty words) over . The empty word is written . When and , we let be the length of , and be the number of occurrences of in .
We assume that the reader is familiar with the basics of automata theory, in particular the notions of monoid morphisms, idempotents in monoids, monadic second-order () logic and first-order () logic over finite words (see e.g. [17]). As aperiodicity will be a central notion of this paper, let us recall that a monoid is aperiodic whenever for all , there exists such that . If the monoid is finite, this can be uniformly chosen for all elements in .
We use the notation for the map that counts occurrences of every letter in the input word (that is, computes the Parikh vector) namely: . Given a set , a function is commutative whenever for all , for all permutations of , . Equivalently, it is commutative whenever there exists a map such that .
Let , and let be a finite alphabet. Given a function , we define the as . A function is represented by a commutative function if there exists a map such that . This notion will be useful to formally state that a polynomial “is” a commutative polyregular function. For instance, the polynomial function is represented by the commutative function defined by .
2.1 Polynomials
A polynomial is non-negative when for all non-negative integer inputs , the output of the polynomial is non-negative. In the case of at most three indeterminates, we use variables instead of to lighten the notation. Beware that we do not consider negative values as input, as the numbers will ultimately count the number of occurrences of a letter in a word. As an example, the polynomial is non-negative, and so is the polynomial , but the polynomial is not.
A monomial is a product of indeterminates and integers. For instance, is a monomial, is a monomial, is a monomial, but and are not. Every polynomial decomposes uniquely into a sum of monomials. A monomial divides a monomial , when divides seen as polynomials in . For instance, divides , divides , and does not divide . In the decomposition of , a monomial is a maximal monomial if it is a maximal element for the divisibility preordering of monomials. In the polynomial , the set of maximal monomials is . For instance, the non-negative monomials of are and .
2.2 Polyregular Functions
Because the functions of interest in this paper have output in or , we will only provide the definition of polyregular functions for these two output semigroups, and we refer the reader to [3] for the general definition of polyregular functions and their aperiodic counterpart, the star-free polyregular functions. We chose in this paper to provide a combinatorial description of polyregular functions with commutative outputs because it will play nicely with our analysis on polynomials. This description is very similar in shape to the finite counting automata introduced by [15].
Definition 3 (-polyregular functions [5]).
Let . The set of polyregular -polyregular functions of degree at most , is the set of functions such that there exists a finite monoid , a morphism , and a function satisfying for all :
We call the production function of . If the function has codomain , then is -polyregular of degree at most , i.e., . If the monoid is aperiodic then the function is star-free -polyregular (), resp. star-free -polyregular ().
We complete Definition 3 by letting , and similarly for , , and . In order to illustrate these definitions, let us provide an example of an -polyregular function computed using a finite monoid in Example 4. Let us also introduce in Example 5 a function that serves as an example of division computed by a -polyregular function.
Example 4.
The map belongs to .
Proof.
Let us define which is a finite aperiodic monoid, defined by , and that is the constant function equal to . We check that for all : .
Example 5.
Let be the function that maps a word to the number of distinct pairs of positions in , i.e., . Then, .
Proof.
Let us remark that the set of distinct pairs of positions in a word is in bijection with the set of decompositions of the form , where and are non-empty, via the map . Let us write which is a finite aperiodic monoid, and that maps the empty word to and the other words to . Then, let us define via . We conclude because:
One of the appeals of and are the numerous characterizations of these classes in terms of logic, weighted automata, and the larger class of polyregular functions [5, 8]. In this paper, the main focus will be the connection to weighted automata, which is based on the notion of growth rate. The growth rate of a function is defined as the minimal such that . If such a exists, we say that the function has polynomial growth. It turns out that for all , (resp. ) are precisely functions in (resp. in that have growth rate at most .
Lemma 6 ([8, Theorem 5.22]).
Let . The following are equivalent:
-
1.
.
-
2.
has polynomial growth of degree at most .
And similarly for and .
Let us introduce some compositional properties of -polyregular functions that will be used in this paper to construct -polyregular functions.
Lemma 7 ([5, Theorem II.20]).
Let , (resp. , , ), be a star-free language over , and be a polyregular function (resp. a star-free polyregular function). Then, the following are also in (resp. , , ): , , , . Furthermore, the above constructions preserve commutativity.
Let us briefly state that commutativity is a decidable property of -rational series, hence of -polyregular functions. As a consequence, we are working inside a relatively robust and decidable subclass of -rational series.
Lemma 8.
Let . One can decide if is commutative.
Proof.
Remark that the group of permutations of is generated by the cycle and the transposition . As a consequence, a function is commutative if and only if . When is a rational series, and are both rational series that can be effectively computed from ,111 This can be done by guessing the second (resp. last) letter of the input word, remembering the first letter in a state, and then running the original automaton for on the modified input, checking at the second position (resp. the end of the word) if the guess was correct. and since equivalence of rational series is decidable [1, Corollary 3.6], we have obtained a decision procedure.
3 -rational Polynomials
In this section, we will completely characterize which polynomials in are represented by -rational series (resp. -rational series). To that end, we start by characterizing these classes for polynomials in . We say that a polynomial is an -rational polynomial if it is represented by a -rational series. It is an easy check that polynomials with coefficients in are -rational polynomials (Lemma 9). However, Example 10 provides a polynomial with negative coefficients that is an -rational polynomial. The problem of characterizing -rational polynomials was claimed to be solved in [10], using the Definition 11 to characterize -rational polynomials, as restated in Flawed 12.
Lemma 9.
Let . Then, is an -rational polynomial.
Example 10.
The polynomials , , and are -rational polynomials, but is not an -rational polynomial.
Definition 11 ([10, Section 3, page 3]).
The class is the class of polynomials that are non-negative and such that every maximal monomial is non-negative. When the indeterminates are clear from the context, we write this class .
Flawed Theorem 12 ([10, Theorem 3.3, page 4]).
Let be a polynomial. Then, is an -rational polynomial if and only if .
Before giving a counterexample to the above statement, let us first exhibit in Example 14 some non-negative polynomial that is not an -rational polynomial. While the example will not be in , it illustrates the key difference between non-negative polynomials and -rational polynomials. In order to derive this example, we will need the following fundamental result about the pre-image of regular languages by polyregular functions.222 In this particular case, one could have considered more generally -rational series, and replaced regular languages over a unary alphabet by semi-linear sets. Before that, let us remark that if a polynomial is represented by a -rational series, then it is in fact represented by a -polyregular function thanks to Lemma 6.
Theorem 13 ([2, Theorem 1.7]).
The pre-image of a regular language by a (string-to-string) polyregular function is a regular language.
Example 14.
Let . Then is non-negative, but is not an -rational polynomial. Indeed, assume by contradiction that represents over the alphabet . Then, is a regular language (Theorem 13), but is not.
Please note that the same argument cannot be leveraged for proving that is not representd by a -rational series: Theorem 13 only holds for string-to-string functions, and is applied to the specific case where the output alphabet is , i.e., where the output of the function belongs to which is isomorphic to .
Let us now design a counterexample to Flawed 12 by suitably tweaking Example 14 to ensure that the polynomial not only is non-negative, but also belongs to . We define .
Lemma 15.
Proof.
It is clear that is non-negative. We can expand the expression of to obtain . The maximal monomials of are , , and , all of which are non-negative.
Assume by contradiction that is an -rational polynomial. Let be a finite alphabet. There exists a commutative -polyregular function such that for all , . Remark that for all , if and only if . Hence, if and only if and , or , and . Now, let us consider the language . By the above computation, we conclude that . Because is not a regular language, we conclude that is not a regular language. However, is a regular language (Theorem 13).
We will discuss at the end of Section 3.2 why Lemma 15 is minimal in the number of indeterminates, which first requires us to provide a correct analogue of Flawed 12. Our counterexample relies on the fact that is not stable under fixing indeterminates, while -rational polynomials are. Indeed, the polynomial satisfies , which has a negative coefficient for a maximal monomial. Let us now prove that closing under variable assignments is enough to recover from Flawed 12. We use the following notation to fix the value of some indeterminate, if is a polynomial in , then is the polynomial . More generally, if is a partial function from to , written , the restriction is the polynomial with indeterminates obtained by fixing the variables of the domain of .
Definition 16.
The class is the collection of polynomials such that, for every partial function , every maximal monomial of is non-negative.
First, let us remark that , because polynomials in are non-negative. We also remarked at the beginning of this section that our counterexample provided in Lemma 15 is not in . The rest of the section is mainly concerned with proving the following corrected version of Flawed 12.
Theorem 17.
Let . The following are equivalent:
-
1.
,
-
2.
is represented by a -rational series,
-
3.
is represented by a -polyregular function,
-
4.
is represented by a star-free -polyregular function,
Furthermore, the properties are decidable, and conversions effective.
Theorem 17 is surprising given the fact that it is not possible to decide whether a polynomial is non-negative or if a polynomial belongs to (Remark 18), by reduction to the undecidability of Hilbert’s Tenth Problem [9, 12]. That is, is a decidable class that strictly contains , and is contained in the undecidable classes and the class of non-negative polynomials.
Remark 18.
Checking whether a polynomial is non-negative is undecidable. Similarly, checking whether a polynomial belongs to is undecidable.
The proof of Theorem 17 is divided into two parts. First, we provide in Section 3.1 a fine combinatorial understanding of what functions can be computed in and . This allows us to prove that -polyregular functions are in (Corollary 22). Then, in Section 3.2 we will show how to compute polynomials in using (Lemma 26). Finally, we will next generalize Theorem 17 to polynomials in in Section 3.3.
3.1 From -polyregular functions to polynomials
Let us prove that -rational polynomials are in . This fact follows from the correct implication in the statement of Flawed 12, but we provide a self-contained proof using a refinement of the classical combinatorial pumping arguments for [5, Lemma 4.16] and [8, Lemma 5.37]. We take extra care to reprove in our upcoming Lemma 20 a strong statement that has two main goals. Our first goal is to highlight the role of commutative polyregular functions in the broader study of polyregular functions, which is done by reformulating the traditional pumping argument as a composition property involving said functions, which will be reused in the upcoming Definitions 35 and 39 of Section 4. Our second goal is to give a precise shape of the functions that arise from such pumping arguments, which was lacking in former similar statements.
To address our first goal, let us define that a function is a pumping pattern from to whenever there exists words , and words , such that . That is, is syntactically defined by a non-commutative monomial over the monoid . Pumping patterns are commutative polyregular functions.
Our second goal is achieved by understanding that -polyregular functions essentially compute binomial coefficients, as illustrated by the polynomial of Example 5. A simple binomial function is a function of the form , where and are natural numbers. We extend this to natural binomial functions that are obtained by considering -linear combinations of products of simple binomial functions, that is, we consider functions that have the following shape: . Beware that is defined to be when , and is therefore not a polynomial. Let us immediately prove that simple binomial functions can be represented in , generalizing Example 5. Conversely, we prove in Lemma 20 that, when suitably pumping a -polyregular function, one always obtains natural binomial functions.
Lemma 19.
Let be a simple binomial function from to . Then it is represented by a star-free polyregular function.
Proof.
Because of the stability properties of (Lemma 7), we only need to check that given , the function is represented by a function . Let us prove it when , since the other functions can be obtained by translating . By definition, , where . Let us proceed as in Example 5 and define . It is clear that is in bijection with for all using the map . Now, using the monoid and the morphism and , one can compute as where is defined by . We conclude that is a star-free polyregular function.
Lemma 20.
Let be an -polyregular function. There exists a computable such that for all pumping patterns , there exists a computable natural binomial function such that:
The multiplicative factor is necessary in Lemma 20. Indeed, the function defined as when the input is of odd length and when the input is of even length is -polyregular, but is not a polynomial. We can trade off this multiplicative factor for a constant term addition under the extra assumption that the function is star-free polyregular, as described in the following Lemma 21. This lemma is not immediately of use, but is crucial for the upcoming characterization of -rational polynomials in Theorem 34, which in turn is a key ingredient of our main Theorem 40.
Lemma 21.
Let be a star-free -polyregular function. There exists a computable such that for all pumping patterns , there exists a computable natural binomial function such that:
Because natural binomial functions behave as polynomials with non-negative maximal monomials on large enough inputs, we can conclude from Lemma 20 that -rational polynomials are in .
Corollary 22.
Let be an -rational polynomial. Then, .
Proof.
Let be a commutative -rational series with domain defined as that represents . Because has polynomial growth, (Lemma 6). Using Lemma 20, there exists a number and natural binomial function such that for all :
For large enough values of , the simple binomial function coincides with a polynomial whose leading coefficient is which is non-negative. We conclude that the maximal monomials of are non-negative, and since , we conclude that the maximal monomials of have non-negative coefficients.
For every partial valuation , the polynomial continues to be represented by a -polyregular function, namely where belongs to a restricted alphabet. As a consequence, the maximal monomials of are also non-negative, and we have proven that .
3.2 From polynomials to -polyregular functions
This section is devoted to proving that polynomials in can be represented by star-free -polyregular functions. The key lemma of this section is Lemma 26, which is proved by induction on the number of indeterminates of a given polynomial . In order to prove that result, we use the combinatorial Lemma 25 that allows us to transform a polynomial into a polynomial in through a well-chosen translation of the indeterminates. This argument is based on the notion of discrete derivative which is built by translating the domain of the polynomial. To that end, let us write for the translation function that maps a polynomial to the polynomial .
Definition 23.
Let , and be a polynomial, then .
Lemma 24.
Let that is non-constant, and , then and all of its coefficients are (positive) multiples of . Furthermore, every monomial that strictly divides some monomial of appears in .
Proof.
We prove the result for monomials, as it extends to -linear combinations by linearity. Let be a monomial. Notice that , and using a binomial expansion we list all the possible divisors of , all of which with coefficients that are positive integers and multiples of except the coefficient of the maximal monomial (equal to itself) which is . As a consequence, is simply obtained by removing this maximal monomial, which concludes the proof.
Lemma 25.
Let , be the sum of maximal monomials of , and be the sum of non-maximal monomials of . There exists a computable number , such that .
Proof.
Let us first tackle the specific case where is a constant polynomial. In this case, and . Furthermore, for all . We conclude that for all , hence belongs to . Selecting we conclude. Assume now that is not a constant polynomial. We will use Lemma 24 on a well-selected value of . Let us write to be the maximal absolute value of a coefficient in . Let be the number of unitary monomials that divide some monomial appearing in . We can now define , and let . Remark that is already in , and the constant coefficient of is also in . For any other monomial of , by the maximality of , it strictly divides some monomial of , and equals some monomial of up to a multiplication by a factor in . Because every monomial of has a coefficient that is a multiple of , we can compensate every monomial of by a monomial of . Therefore, .
Lemma 26.
Let . If , then is represented by a star-free -polyregular function, which is computable given .
Proof.
We prove the result by induction on the number of indeterminates of . In the proof, we write for the indeterminates appearing in , that is, we assume without loss of generality that all indeterminates are used.
Base case: If the (unique) maximal monomial of is a constant term. Since , , and therefore is represented by a constant star-free -polyregular function.
Induction: Assume that is not a constant polynomial, and let us write where is the sum of the maximal monomials of . We compute a bound such that (Lemma 25). In particular, is represented by a star-free -polyregular function using Lemma 9, the latter being effectively computable from . Let us now remark that , and is therefore (effectively) represented by a star-free -polyregular function (using again Lemma 9). As a consequence, is (effectively) represented by a function .
For all partial valuations fixing at least one indeterminate, one can use the induction hypothesis to compute a star-free -polyregular function that represents . This is possible because we assumed that all indeterminates in are used in .
Let us assume that the alphabet over which the (commutative) functions and are defined is , with representing the indeterminate of the polynomials. Now, let us define by case analysis the following commutative star-free -polyregular function, defined on words of the form , with .
Remark that is a commutative star-free -polyregular function that represents .
While Lemma 26 provides an effective conversion procedure, it does not explicitly state that the membership is decidable to keep the proof clearer. A similar proof scheme can be followed to conclude that membership is decidable, and even show that elements in are, up to suitable translations, polynomials in (Lemma 27). Beware that partial applications are still needed in this characterization, as Example 28 illustrates.
Lemma 27.
Let . There exists a computable number such that the following are equivalent:
-
1.
,
-
2.
for all partial functions , ,
-
3.
for all partial functions , .
In particular, the above properties are decidable.
Example 28.
The polynomial is not a -rational polynomial, but is non-negative and satisfies .
We now have all the tools to prove the corrected version of Flawed 12.
Proof of Theorem 17 on page 17.
The implications Item 4 Item 3 Item 2 are obvious. Lemma 26 proves Item 1 Item 4, while Corollary 22 proves Item 2 Item 1. Note that the lemmas provide effective conversion procedures, and that Lemma 27 also provides a decision procedure.
For completeness, let us remark that the counterexample of Lemma 15 uses three indeterminates, and this is not a coincidence: in the particular cases of one or two indeterminates, the classes and coincide. In particular, the examples appearing in [10] are not invalidated, as they all use at most two indeterminates. Note that the equivalence is clear for the univariate case, where being non-negative and having non-negative maximal coefficient clearly imply being an -rational polynomial.
Lemma 29.
.
Proof.
It is clear that , by considering the empty valuation . For the converse inclusion, let us consider that is non-negative, such that the maximal monomials are non-negative.
If we fix none of the variables, then the maximal monomials are non-negative by assumption. If we fix one of the variables, we can assume without loss of generality that we fix for some . Then is a non-negative univariate polynomial, and therefore must either have a positive leading coefficient (which is the unique maximal monomial in this case) or be constant equal to 0. In both cases, the maximal monomials have positive coefficient. The same reasoning applies a fortiori in the case where we fix the two indeterminates, leading to a constant polynomial.
3.3 From to
Let us complete our analysis of polynomials represented by or by considering polynomials with coefficients in , and justify that all the combinatorial work has already happened in and . From Lemma 21, we know that the polynomials that can be computed by star-free -polyregular functions are going to coincide (on large enough inputs) with natural binomial functions. For that reason, we introduce the following “polynomial counterpart” of a binomial coefficient: given two numbers , defined as ,333 In particular, is defined to be when , and when . that we call a binomial monomial, and we introduce natural binomial polynomials as -linear combinations of products of binomial monomials, i.e., of the shape: . Similarly, we introduce the class of integer binomial polynomials, which are obtained by -linear combinations of products of binomial monomials.
These definitions are justified by the classical result of Pólya that characterizes polynomials in that are integer-valued (i.e., are such that ) as integer binomial polynomials [14, 4]. Note that this result straightforwardly extends to multiple indeterminates as we prove in Lemma 30.
Lemma 30.
Let be a polynomial. Then, is an integer binomial polynomial if and only if , if and only if .
As an immediate corollary, we completely characterize the class of polynomials in that are represented by as the integer binomial polynomials.
Theorem 31.
Let . Then, the following properties are equivalent:
-
1.
is integer-valued,
-
2.
is represented by a -rational series,
-
3.
is represented by a -polyregular function,
-
4.
is represented by a star-free -polyregular function,
-
5.
is an integer binomial polynomial.
These properties are furthermore decidable.
Proof.
The implications Item 4 Item 3 Item 2 Item 1 are obvious. Now, Item 1 Item 5 is a direct consequence of Lemma 30. Finally, Item 5 Item 4 follows from the fact that is represented by a star-free -polyregular function defined by hardcoding the output values (in ) when , and using a star-free -polyregular function when (Lemma 19). Because is closed under products and -linear combinations, we conclude.
Obtaining an analogue of Theorem 31 for -polyregular functions requires a bit more work, as polynomials in that are represented by are not exactly natural binomial polynomials (see Example 32). To address the issues raised by the former example, we introduce the notion of strongly natural binomial polynomials, as the polynomials such that for all partial valuation , is a natural binomial polynomial, which characterizes the class of polynomials that are represented by (Theorem 34).
Example 32.
The polynomial is a non-negative natural binomial polynomial in , but cannot be computed by a star-free -polyregular function. Indeed, has a negative maximal monomial, hence , and we conclude using Theorem 17.
Lemma 33.
Let be an integer-valued polynomial, and be such that . Then, is a strongly natural binomial polynomial.
Theorem 34.
Let be a polynomial with rational coefficients and let be the smallest number in such that . Then, the following are equivalent:
-
1.
and is integer-valued,
-
2.
is represented by a -rational series,
-
3.
is represented by a -polyregular function,
-
4.
is represented by a star-free -polyregular function,
-
5.
is a strongly natural binomial polynomial.
In particular, the properties are decidable.
Proof.
Let us first remark that , and that if is represented by a function , then said function has polynomial growth, and in particular thanks to Lemma 6. As a consequence, Item 2 Item 3. For the implication Item 3 Item 1, we obtain via Theorem 17 by remarking that -polyregular functions have output in and are closed under multiplication by a constant . The fact that is integer-valued follows from Theorem 31 and the fact that . The implication Item 1 Item 5 is obtained thanks to Lemma 33.
Let us now prove by induction on the number of indeterminates that Item 5 Item 4. Note that by construction, there exists a number such that when the input values of are all greater than , coincides with a natural binomial function, which is itself represented by a star-free -polyregular function. If some input value is set to a number , then one can leverage the fact that remains a strongly natural binomial polynomial to conclude by induction that is represented by a star-free -polyregular function. Combining these, we obtain a star-free -polyregular function representing .
Let us remark that Theorem 34 shows that the class of polynomials represented by is the same as the class of polynomials represented by , which is a non-trivial statement that will be reused in the study of more general commutative functions in .
4 Beyond Polynomials
In this section, we leverage the decidability results of Section 3 to decide membership in inside and membership in inside , both under the extra assumption of commutativity. To characterize inside we introduce the notion of -combinatorial function (Definition 35), following the spirit of revious characterizations of subclasses of in terms of polynomial pumping arguments [6, 7, 5].
Definition 35.
Let , and be a -polyregular function. The function is -combinatorial if there exists , such that for all pumping patterns , there exists a strongly natural binomial polynomial satisfying:
Let us now introduce a decomposition of commutative -polyregular functions into integer binomial polynomials. Given a number , let us write for the collection of pairs where and . To a tuple , one can associate its -type, written , which is the pair where and .
Lemma 36.
Let be a commutative -polyregular function, where we fix the alphabet . There exists a computable , and computable integer binomial polynomials for , such that for all ,
Theorem 37.
Let , and be commutative over an alphabet of size . Then, the following are equivalent:
-
1.
is -combinatorial,
-
2.
,
Furthermore, the properties are decidable, and conversions effective.
Proof.
Let be commutative over an alphabet of size . We apply Lemma 36 to compute an and integer binomial polynomials such that for all , , where . We are first going to prove that if and only if is a strongly natural binomial polynomial for all . This will also provide decidability of Item 2, since one can decide whether a polynomial is strongly natural binomial polynomial using Theorem 34.
Assume that , then by definition, the polynomials are represented by an -polyregular function, hence are strongly natural binomial polynomials (Theorem 34). Conversely, if is a strongly natural binomial polynomial for all , then because one can compute the -type of the input using a polyregular function, and then compute the suitable strongly natural binomial polynomial which is possible in thanks to Theorem 34. The resulting composition belongs to thanks to Lemma 7, and we conclude that because it has growth rate at most (Lemma 6).
Note that the same proof scheme can be used to conclude that Item 2 implies Item 1. For the converse implication, we are going to introduce associated to the fact that is -combinatorial. Because polynomials represented by -polyregular functions and integer binomial polynomials are both closed under multiplication of their input by a constant factor, we can assume that in the decomposition of . Now, consider . Notice that for all vectors , the vector has -type . In particular, the following equality holds:
Let us therefore consider the pumping pattern that is simply defined as . Because is -combinatorial with parameter , there exists a strongly natural binomial polynomial such that over . This proves that equals as polynomials, hence, that is a strongly natural binomial polynomial for all . We have proven that .
It was already known that -polyregular functions with unary input that are non-negative are -polyregular [1, Proposition 2.1 p 137]. Let us derive this fact from our Theorem 37.
Corollary 38.
Let be a non-negative -polyregular function, then .
Proof.
Since has unary input, it is commutative. Furthermore, is -combinatorial because for all and all , is non-negative. When it is a polynomial function, it therefore belongs to , hence is a strongly natural binomial polynomial. We conclude using Theorem 37.
Let us now prove that the above characterizations of commutative -polyregular functions can be combined with the recent advances in the study of -polyregular functions [5] allowing to decide the membership of inside . The key ingredient of this study is the use of a semantic characterization of star-free -polyregular functions among -rational series that generalizes the notion of aperiodicity for languages to functions.
Definition 39 (Ultimately polynomial).
Let be a finite alphabet. A function is ultimately polynomial when there exists such that for all , for all pumping pattern , there exists a polynomial such that:
It was observed in [5, Claim V.6], and in [8, Claim 7.45, Lemma 7.53] that a regular language is star-free if and only if its indicator function is ultimately polynomial. We can now answer [8, Conjecture 7.61] positively, by proving that .
Theorem 40.
Let be a finite alphabet, and be a commutative -polyregular function. Then, the following are equivalent:
-
1.
is ultimately polynomial,
-
2.
,
-
3.
.
Furthermore, membership is decidable and conversions are effective.
Proof.
The implication Item 3 Item 2 is immediate since . Furthermore, Item 2 implies Item 1 following previous results for star-free -polyregular functions [5, Theorem V.13].
For the implication Item 1 Item 3, let us assume that is ultimately polynomial. We prove the result by induction on the size of the alphabet . By definition, there exists , and such that:
It is clear that is represented by an -polyregular function, namely, where , and is therefore represented by a star-free -polyregular function thanks to Theorem 34. For every letter and number , there exists, by induction hypothesis, a star-free -polyregular function that represents the function that maps to .
Let us conclude by computing using the following star-free -polyregular function :
5 Outlook
Let us end on a more general discussion regarding the status of commutative input functions in the study of unary output polyregular functions. A quantitative pumping argument for polyregular function states that has property if and only if for all pumping pattern , has property . Let us formalize such a statement for growth rate and aperiodicity respectively in Lemmas 41 and 42. Note that we generalized pumping patterns to commutative star-free polyregular functions to simplify the statements.
Lemma 41.
Let , and . Then, if and only if for every commutative star-free polyregular function of growth rate , .
Lemma 42.
Let . Then, , if and only if for every commutative star-free polyregular function , .
Remark that if Lemma 42 were to hold for -polyregular functions, then the decidability of inside , and the decidability of inside would immediately follow. On the one hand, one can guess a candidate function and check for equivalence, on the other hand, one can guess a commutative star-free polyregular function and check membership (which is decidable thanks to this paper). This is restated in our concluding conjecture.
Conjecture 43.
Let . Then, if and only if for every commutative star-free polyregular function , .
References
- [1] Jean Berstel and Christophe Reutenauer. Noncommutative rational series with applications, volume 137 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, 2010. doi:10.1017/CBO9780511760860.
- [2] Mikołaj Bojańczyk. Polyregular functions, 2018. arXiv:1810.08760.
- [3] Mikołaj 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), volume 132 of Leibniz International Proceedings in Informatics (LIPIcs), pages 106:1–106:14, Dagstuhl, Germany, 2019. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2019.106.
- [4] Paul-Jean Cahen and Jean-Luc Chabert. Integer-Valued Polynomials. American Mathematical Society, December 1996. doi:10.1090/surv/048.
- [5] Thomas Colcombet, Gaëtan Douéneau-Tabot, and Aliaume Lopez. Z-polyregular functions. In 2023 38th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–13, Los Alamitos, CA, USA, June 2023. IEEE Computer Society. doi:10.1109/LICS56636.2023.10175685.
- [6] Gaëtan Douéneau-Tabot. Pebble Transducers with Unary Output. In Filippo Bonchi and Simon J. Puglisi, editors, 46th International Symposium on Mathematical Foundations of Computer Science (MFCS 2021), volume 202 of Leibniz International Proceedings in Informatics (LIPIcs), pages 40:1–40:17, Dagstuhl, Germany, 2021. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.MFCS.2021.40.
- [7] Gaëtan Douéneau-Tabot. Hiding Pebbles When the Output Alphabet Is Unary. In Mikołaj Bojańczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022), volume 229 of Leibniz International Proceedings in Informatics (LIPIcs), pages 120:1–120:17, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2022.120.
- [8] Gaëtan Douéneau-Tabot. Optimization of string transducers. PhD thesis, Université Paris Cité, 2023. URL: https://gdoueneau.github.io/pages/DOUENEAU-TABOT_Optimization-transducers_v2.pdf.
- [9] David Hilbert. Mathematical problems. Bulletin of the American Mathematical Society, 8(10):437–479, 1902. doi:10.1090/s0002-9904-1902-00923-3.
- [10] Juhani Karhumäki. Remarks on commutative N-rational series. Theoretical Computer Science, 5(2):211–217, 1977. doi:10.1016/0304-3975(77)90008-1.
- [11] Aliaume Lopez. Commutative n-polyregular functions, 2024. doi:10.48550/arXiv.2404.02232.
- [12] Yuri Vladimirovich Matiyasevich. The diophantineness of enumerable sets. Doklady Akademii Nauk SSSR, 191:279–282, 1970. in Russian.
- [13] Robert McNaughton and Seymour A. Papert. Counter-Free Automata. The MIT Press, 1971. doi:10.5555/1097043.
- [14] G. Pólya. Über ganzwertige ganze Funktionen. Rend. Circ. Mat. Palermo, 40:1–16, 1915. doi:10.1007/BF03014836.
- [15] Marcel P. Schützenberger. Finite counting automata. Information and control, 5(2):91–107, 1962. doi:10.1016/S0019-9958(62)90244-9.
- [16] Marcel P. Schützenberger. On finite monoids having only trivial subgroups. Information and Control, 8(2):190–194, 1965. doi:10.1016/S0019-9958(65)90108-7.
- [17] Wolfgang Thomas. Languages, automata, and logic. In Grzegorz Rozenberg and Arto Salomaa, editors, Handbook of formal languages, pages 389–455. Springer, 1997. doi:10.1007/978-3-642-59136-5.