A Diamond Structure in the Transducer Hierarchy
Abstract
We answer an open question in the theory of transducer degrees initially posed in [1] on the existence of a diamond structure in the transducer hierarchy. Transducer degrees are the equivalence classes formed by word transformations which can be realized by a finite state transducer, which form an order based on which words can be transformed into other words. We provide a construction which proves the existence of a diamond structure, while also introducing a new function on streams which may be useful for proving more results about the transducer hierarchy.
1 Introduction
Finite state transducers (FSTs) are ubiquitous in computer science, and infinite streams are also common in many fields. Yet there are very few results on how to transform an arbitrary stream into another stream with an FST. We define a stream as being above another stream if some FST can transduce into , with and being the same degree if they can both be transduced into each other. The structure of these degrees, called the transducer hierarchy, has many parallels with Turing degrees. The main results that have been done thus far mostly deal with streams determined by polynomials, and in this paper we will present a new result that comes from a new operation on streams. This new operation, called fzip, may be useful in proving additional results, and allows us a new class of functions to consider the degrees of: piecewise polynomials.
2 Definitions
We will give some preliminary definitions with the goal of understanding the definition of a weight product, the key operation for all the results in this paper. For more definitions and background in this area, see [1, 2, 3, 4, 5]. We begin by setting 2 = {0,1}, which we will use as our input and output alphabet for all of our transducers. We use to denote the set of all finite and infinite streams over 2. We will focus only on finite state transducers of the following form:
Definition 2.1.
A finite-state transducer is a tuple where is a finite set of states, is the initial state, is the transition function, and is the output function.
Note that and can be extended () as follows:
The above equations correspond to inputting a (possibly infinite) stream of letters into . This allows us to define a function on finite or infinite strings in 2, by saying that is equal to the output of the FST after inputting . Formally speaking, this means that . Now we can make the following definition, which is the basis for the transducer hierarchy:
Definition 2.2.
Let be an FST, and let be infinite sequences. We say that to , or that is the - of , if . In general, for any two infinite sequences we say that if there exists some so that .
This relation is reflexive, and can be shown to be transitive by composition of FSTs (See Lemma 8, [1]). If for some we have but not vice versa, we say . If we do have and then we say that , and we use to denote the equivalence class of . We call the degree of .
Now that we have defined what a transducer degree is, we will focus our attention on a particular subset of streams, namely the streams which are generated by functions in the sense of the following definition.
Definition 2.3.
For a function from to , we define to be the stream given by
We will often use to mean both the stream determined by , as well as the degree of that stream . We also refer to a part of the stream of the form as a block.
Having defined in this way, some relatively simple initial results have been obtained in [2], which we state here.
Lemma 2.4.
Let We have the following equivalences and inequalities:
-
1.
for
-
2.
-
3.
-
4.
for
-
5.
One interesting consequence of the third equality is that any polynomial with a positive leading coefficient can be thought of as a stream and thus associated with a transducer degree, even if some of its values happen to be negative. For instance, the polynomial can’t directly be interpreted as a stream, since it is negative for . However, if we take , then this polynomial is nonnegative, and therefore corresponds to a stream (and thus a degree). So even though it’s technically incorrect, it will be convenient sometimes to refer to a degree such as , when we mean more precisely the degree for any . Similarly, the first equality allows us to refer to the degree of a function with rational coefficients, where we really mean the degree of the corresponding function multiplied by the appropriate scalar to eliminate any fractional coefficients.
Now we are ready to start defining weight products. We will not provide the full proof of the main result we need (Theorem 2.6), but a more detailed explanation can be found in [2]. We begin by defining a weight.
Definition 2.5.
A weight is a tuple with each . If for all then we say the weight is constant. To distinguish between weights and tuples of weights, weights will not be bolded but tuples of weights will, except potentially in cases where there is only one weight in the tuple.
Given a weight as above and a function we can define as:
We are ready to define the weight product. Let be a tuple of weights, with being the cyclic shift .
Then the weight product of with , written as , is defined in the following way:
Here and indicates the length of the tuple . We call a weight product if for all . Note that since is a finite tuple of finite tuples in , we can take the LCM of all of the denominators and multiply through to make the product natural. Since this does not change the degree of the resulting function (by Lemma 2.4), from now on we will assume that all weight products are natural. We also define the length of a tuple of weights to be . (By we mean simply the number of elements in that weight.) Finally, we note that in the case where the tuple of weights only contains one weight, i.e. , we will often use to denote .
The following image provides a more intuitive picture of how the weight product works, by showing pictorially how to compute the weight product of the tuple of weights with an arbitrary function , where :
This also provides us with a better notion of what the length represents. For this , we have , which is exactly how many values of we go through after applying every weight.
The key property of weight products is that they can replace transducers when used on a certain class of streams known as spiralling functions. For the purposes of this paper, we are interested in two subclasses of spiralling functions: polynomials and piecewise polynomials. In this paper, by “piecewise polynomial” we refer to a slightly different definition than the standard one. Here, we define a piecewise polynomial to be a function which, given a finite partition of , agrees with a polynomial on each element of this partition. In particular, the partitions we use will be residue classes modulo some . We will refer to a polynomial defined on a particular element of the partition as a “piece” of the piecewise polynomial.
Now that we have defined weight products as well as the class of functions we wish to apply them to, we can proceed to state the main result that we need for the rest of the paper. The full proof of this result can be found in (Theorem 21, [3]).
Theorem 2.6.
Let be (possibly piecewise) polynomials. Then if and only if there exists a tuple of weights and integers such that .
This theorem tells us that if we want to show that one polynomial degree is above another, we can consider weight products, rather than trying to figure out a transducer directly. The following theorem will give us a useful result for comparing polynomial degrees with non-polynomial degrees.
Theorem 2.7.
Let be a (possibly piecewise) polynomial, and . Then if and only if for some integer , and a tuple of weights .
These two theorems justify the use of weight products as a replacement for transducers. This greatly simplifies things, since we no longer need to consider how to transduce a stream by any transducer. Instead, we can consider weight products, which are much easier to work with. Having defined weight products, we now turn to a new operation on streams: fzip.
3 Basic Results
Given two streams and , one natural operation to define on them is the zip operation, also called merge in some contexts. This operation is defined by interleaving the two streams, that is, alternating elements from each stream. The formal definition is as follows:
Definition 3.1.
The th term of the stream is given by the following equation:
Intuitively, this is very easy to understand: the stream will simply start with the first element of , followed by the first element of , then the second element of , and so on. This operation has many applications, and in the field of transducer degrees one property is immediately obvious: and . The fact that an FST can be constructed for each of these inequalities is easy to prove, as shown in the following image:
However, when working with polynomial degrees, zip is not quite the right operation. The main problem with zip is that if we apply it to two polynomial streams, it’s not clear that the result is a polynomial stream, and it’s also not clear how to define it in terms of the original streams. For example, suppose we wanted to take . The beginning of this stream is given by , which corresponds to a function with values as shown in the table below.
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 2 | 0 | 4 | 4 | 2 |
It’s not at all clear based on the above table that this function is even a polynomial, and since it has at least four zeros it must be at least a quartic if it is. So zip is difficult to work with if we are dealing with polynomial streams. Fortunately, there is a similar operation which is very useful for our purposes.
Definition 3.2.
Let and be functions from .
We define to be the function
Therefore is
And now the advantage of fzip becomes clear: instead of interleaving individual letters, we can interleave the blocks of zeros determined by our functions. Just as with zip, it’s immediately clear that this stream lies above the streams corresponding to and , in this case with a slightly more complex transducer.
Due to this similarity, we do actually have one identity relating zip and fzip, in the case where we are zipping a functional stream with itself.
Lemma 3.3.
For all functions from to , , and this stream is in the same degree as .
Proof.
We know that
Zipping this stream with itself produces the following stream:
Because of the pattern of ’s, this stream corresponds to a function which alternates between being identically zero and two times the original function, i.e. . Since it can be written as a zip of , we know that its degree is greater than or equal to the degree of , and applying a transducer which doubles every letter to gives us the reverse inequality. Therefore these streams are in the same degree. ∎
A less obvious property is that fzip is not symmetric in general, so need not equal . This was proven inadvertently in [5], where a careful reading of the main proof in terms of fzip gives us a specific example of two functions which satisfy . However, there are two classes of functions which do allow fzip to be symmetric, as detailed in the following two lemmas.
Lemma 3.4.
For all functions , .
Proof.
This is easiest to understand in the form of a “proof by table”. Consider the following table of values for :
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|---|
f(0) | g(0) | f(1) | g(1) | f(2) | g(2) | f(3) | g(3) |
Now if we delete the first block of the stream , which an FST can do, this corresponds to the following table:
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|---|
g(0) | f(1) | g(1) | f(2) | g(2) | f(3) | g(3) | f(4) |
Therefore for even , and for odd . So by definition, . This shows that . The reverse inequality is very similar, except that we need to add the block to the beginning of the stream , which again can be done by an FST. Therefore . ∎
With this lemma, we can now show that there are two classes of functions for which fzip is symmetric: linear and exponential functions.
Lemma 3.5.
Suppose or for some , and let be any function from to . Then .
Proof.
We have two distinct cases: and .
Case 1:
First, apply the previous lemma to to say that . The function has the form
We can rewrite this as
We can now delete zeroes from each odd block in the corresponding stream. Since this is a reversible operation, the stream corresponding to is in the same degree as the function corresponding to the stream below:
But this new function is just . Therefore if , .
Case 2:
This case will proceed almost identically to the first case.
Again, we apply the previous lemma to to say that . The function now has the form
As before, this can be rewritten:
And now the final step is to divide each odd block by , which is a reversible FST operation.
As before, is just . Therefore if , .
∎
We observe that while it may be possible for functions which are not linear or exponential to have this property (of allowing fzip to be symmetric) it is worth pointing out that the proof relies on the defining characteristics of linear and exponential functions, namely that for linear functions , and for exponential functions . Since our operations on individual blocks are restricted to exactly these operations (addition/subtraction and division/multiplication) this may suggest that these are the only types of functions that could work for this lemma, or at least that expanding this lemma to other types of functions may be difficult.
We conclude this section by considering a couple of natural questions about fzip: under what circumstances can we compare one fzip with another, and how can we compare an fzip of two functions and with some third function ? For the first question, intuitively we would think that if are above respectively in the transducer hierarchy, then should be above . However, the main difficulty is that while fzip intertwines two functions, the weight product can’t be easily intertwined in the same way. For the second question, we can provide a very weak result which may illustrate the difficulty of this problem.
Lemma 3.6.
Let be functions from to . Suppose that there exist weights and with and . Further suppose that and for all , . Then .
Proof.
We will begin by constructing a new weight from and , and showing that is equal to . We have two different cases for constructing depending on if is even or odd.
Case 1: is even
If is even, simply take and replace each with the corresponding to obtain . Then .
Case 2: is odd
Start as before, by replacing the ’s in with the ’s, but this time we will also be replacing the ’s in with the weights from . Let’s call these new weight tuples and . Now we define to be the weight tuple obtained by concatenating and , i.e. .
Now that we have a definition of , we can proceed to proving that . We show this by proving that for even we have , and for odd we have . Let’s start by assuming is even, and from the proof for even it will be clear that the proof for odd is identical.
If is even, then by construction of and the definition of the weight product, we have for some , . Similarly, for some , . Letting , is equal to mod L (intuitively, is the number of times we go through all of the weights in ). We will show that .
The key to this proof is the condition that each has the same length as the corresponding . Because of this condition, whenever we apply the recursive part of the weight product definition, we are shifting by the same amount whether we are applying the weights from (which are half ’s and half ’s) or weights from only. More rigorously, we can see this by calculating the exact values of and .
We have that is equal to , where is the th weight in ( alternates between and ). Similarly, . From the length condition on the weights in and , for all , and therefore . This means that for even , , and by definition of , . Therefore for even . The case where is odd proceeds mostly identically, replacing with (and with ) where appropriate. So now we have shown that for even and for odd , which is exactly the definition of . Therefore and thus .
∎
4 A Diamond Structure in the Transducer Hierarchy
Now we proceed to our main result. We need two more lemmas before moving on to the main proof.
Lemma 4.1.
For all polynomials of degree 2, we can find a weight of length 2 and integers k, m such that .
Proof.
Let . We assume for simplicity that , since the constant term is irrelevant for transducer degrees. We can also assume that , since if not we can simply shift (i.e. choose a positive ) until this holds. Then we claim that the weight , and the integers , prove the lemma.
Indeed, this is simply a matter of verifying this computationally. From the definition of a weight product, since only contains one weight, we have
However, we do need to be careful here, and make sure to check that is indeed a valid weight. So we need its entries to both be nonnegative.
Because , . So the second entry is nonnegative. Similarly, since , and the first entry is also nonnegative. So is a valid weight, and .
∎
Now we prove the second lemma, which gives us essentially the inverse statement of the previous lemma. The basic computations behind this lemma were modified from Theorem 5.2 in [2] to better suit the purposes of this paper.
Lemma 4.2.
Let be a quadratic function of the form , with . Then there is a weight of length 2 such that = .
Proof.
We claim that the weight satisfies . This can be verified computationally, by simplifying the expression , and noting that since , both and are positive, making a valid weight. ∎
Theorem 4.3.
The degree is strictly greater than , and there are no intermediate degrees.
Proof.
The fact that is strictly greater than is trivial, since if could be transduced into , it could also be transduced into , which has been shown to be impossible. Proving that there are no intermediate degrees is the nontrivial part.
We set out to prove this statement by assuming that there is some intermediate degree. Since is a piecewise polynomial function, the degree of anything below it is equivalent to for some (piecewise) polynomial function , and in particular is a weight product of . Because is a piecewise polynomial function, any weight product will also be a piecewise polynomial function, and the pieces will all be linear or quadratic polynomials. (We can remove constant functions without any loss of degree). So then there are three cases:
Case 1: has only quadratic polynomials as its pieces.
Case 2: has only linear polynomials as its pieces.
Case 3: has both linear and quadratic polynomials as its pieces.
Recall that by “pieces”, we mean that since can be written as a function which is defined piecewise by N different functions, we call these functions the “pieces” of .
Now we consider each case. For Case 1, cannot be transduced into if each piece is quadratic, since the block size grows too fast to allow this. For Case 2, where is a piecewise linear function, suppose is equal to:
Then taking the product of the weight , where , with shows that in this case , and since is clearly transducible to they must be of equal degree.
Now we have only Case 3, where has both linear and quadratic pieces. We will show that can be transduced back into , and this will complete the proof.
First, we can assume that the first piece of is linear by simply deleting blocks from the beginning of .
We can then combine all of the other pieces of via a weight of the form , which preserves the first piece and sums up all of the other pieces. So now has the form
We can easily construct a transducer to subtract from only the even-numbered blocks and from the odd-numbered blocks, and also a transducer to divide even-numbered blocks by . Then has the form
Remove the first two blocks to shift to the right by 2, and then subtract 2 from all even blocks to obtain:
Note that we can rewrite as , where and . We can repeat this process indefinitely, and clear away the ’s at the end by repeating the step from to . Note that we can also reverse this process to get an expression of the form , and so we can also arbitrarily lower the value of . Since we’re adding or subtracting multiples of to , we can return to the form of with a guarantee that .
Now let . Define a new function . Rewriting in terms of gives , where is the constant term. We have already seen that the constant term is easily eliminated, so its exact value is irrelevant.
We now want to apply Lemma 4.2 to . Since , the coefficient of satisfies . Note that is two times the coefficient of , and therefore Lemma 4.2 can be applied unless . But that would be the case , and then would be easily transducable to by completing the square and dividing by 4A. So we can assume that .
Therefore can be transduced into via a weight product with only one weight of length 2. Let’s call this weight = (The lemma tells us exactly what these are, but it’s not important). Now we can take the product of the modified weight with . This weight allows us to ignore the alternating nature of and only transduce the piece. Since this part of the proof is very technical, we include some tables and diagrams to clarify the situation. First, a table clarifying exactly what looks like.
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|---|
0 | h(1) = f(0) | 2 | h(3) = f(1) | 4 | h(5) = f(2) | 6 | h(7) = f(3) | 8 |
Now we examine the weight product of with .
From the above diagram giving the first four values of , it should be believable that the values on even are exactly , as was the case for itself. The values for odd are a bit more complicated. The general pattern is that for odd , . However, by definition of the function from earlier, this is equivalent to . But if we redefine this in terms of , we obtain .
Now the right hand side of this equation is in fact equal to . But was chosen to be the weight such that . Therefore, for odd , , and renaming to gives:
Now we can add two blocks to shift to the left by 2, then add 2 and divide by 2 on all even numbered blocks to preserve :
which is exactly . Since each was formed by transducing , we have that , and thus .
Therefore there are no intermediate degrees between and .
∎
Now we proceed to prove the same result for .
Theorem 4.4.
The degree is strictly greater than , and there are no intermediate degrees.
Proof.
The proof will proceed in a similar manner to the previous theorem. Again the fact that is strictly greater than is trivial, since otherwise could be transduced into . So we only need to prove that there are no intermediate degrees.
Letting be a potential intermediate degree, we have the same three cases as before:
Case 1: has only quadratic polynomials as its pieces.
Case 2: has only linear polynomials as its pieces.
Case 3: has both linear and quadratic polynomials as its pieces.
Case 2 is not possible because we showed in the previous theorem that such a would be the same degree as . For Case 3, the previous theorem proved that would be equal to . So we need to turn our attention to Case 1. For this case, we will prove that is the same degree as , and this will complete the proof.
If has only quadratic polynomials as its pieces, it has the form:
We can remove all of the constant terms:
Now using the result of Lemma 4.1, let where . If we take the product of this weight with , then we obtain . To see that this is the case, we will do another example weight product calculation, for the case , and use a similar diagram as the previous theorem to illustrate our point.
Let the weight , where and . The exact values of these are as above. The key point is that satisfy the equations and , where . Now if we calculate the first four values of , we get the following:
Looking at this example, we can now see that in fact, for even and for odd . But because of the way that and were defined, this means that for even and for odd , which is exactly the definition of in the case . So . The general case proceeds effectively the same way. The key property of the weight tuple for this proof is that all of the weights in the tuple are the same length, which allows to be turned into a piecewise polynomial like with each weight corresponding exactly to one piece. The case could also be thought of in terms of Lemma 3.6, with the general case being provable via an extension of that lemma.
Therefore . But was a degree between and , and therefore . Since this was the last case for , there are no intermediate degrees between and .
5 Conclusion
We have shown that lies strictly above both and , with no intermediate degrees between them. From earlier results, we know that the degrees of both and are atoms, that is, there is nothing between them and the bottom degree 0. Therefore forms a diamond structure with and 0, and this is the first such structure that has been found. We also note that by the case analysis for potential transducts of in the previous section, and are the only degrees below . This result sheds more light on the structure of the transducer hierarchy, and also raises some further questions about the potential use of fzip to find new results. We state a few of these questions here:
-
1.
We know that . In general, is this inequality strict, or can for more than just linear or quadratic ’s?
-
2.
What can we say about when are both cubic polynomials?
-
3.
For some is it possible to find degrees between and ?
-
4.
If the degrees of are above the degrees of respectively, then is ?
References
- [1] Jörg Endrullis, Dimitri Hendriks and Jan Willem Klop “Degrees of Streams” Proceedings of the Leiden Numeration Conference 2010 In Journal of Integers 11B.A6, 2011, pp. 1–40
- [2] Jörg Endrullis, Clemens Grabmayer, Dimitri Hendriks and Hans Zantema “The Degree of Squares is an Atom” In Proc. Conf. on Combinatorics on Words (WORDS 2015) 9304, LNCS Springer, 2015, pp. 109–121 DOI: 10.1007/978-3-319-23660-5“˙10
- [3] Jörg Endrullis, Juhani Karhumäki, Jan Willem Klop and Aleksi Saarela “Degrees of Infinite Words, Polynomials and Atoms” In Proc. Conf. on Developments in Language Theory (DLT 2016) 9840, LNCS Springer, 2016, pp. 164–176 DOI: 10.1007/978-3-662-53132-7“˙14
- [4] Jörg Endrullis, Juhani Karhumäki, Jan Willem Klop and Aleksi Saarela “Degrees of Infinite Words, Polynomials and Atoms” In International Journal of Foundations of Computer Science 29.5, 2018, pp. 825–843 DOI: 10.1142/S0129054118420066
- [5] Jörg Endrullis, Jan Willem Klop and Rena Bakhshi “Transducer Degrees: Atoms, Infima and Suprema” In Acta Informatica 57.3-5, 2020, pp. 727–758 DOI: 10.1007/s00236-019-00353-7
∎