Resynchronized Uniformization and Definability Problems for Rational Relations

Regular synchronization languages can be used to define rational relations of finite words, and to characterize subclasses of rational relations, like automatic or recognizable relations. We provide a systematic study of the decidability of uniformization and definability problems for subclasses of rational relations defined in terms of such synchronization languages. We rephrase known results in this setting and complete the picture by adding several new decidability and undecidability results.


Introduction
In this paper we study uniformization and definability problems for subclasses of rational relations over finite words.The class of (binary) rational relations is defined by transducers, that is, nondeterministic finite state automata in which each transition is annotated with a pair of an input and an output word (see Berstel (1979); Sakarovitch (2009)).One can also view such a transducer as a two-tape automaton that processes two given words with two reading heads.The two heads can process their word at different speeds (for example, in each transition one can read only one letter on the first tape and two letters on the second tape).While the class of rational relations is rather expressive, it does not have good algorithmic and closure properties (see Berstel (1979)).For example, the class is not closed under intersection and complement, and the universality problem (whether a given transducer accepts all pairs of words) is undecidable.
One obtains subclasses of rational relations by restricting the way the two heads can move on their tapes.An important such subclass of rational relations are synchronous rational relations, often called automatic relations, see Frougny and Sakarovitch (1993); Khoussainov and Nerode (1994); Blumensath and Grädel (2000).These are obtained when restricting the transducers to move synchronously on the two tapes, that is, reading in each transition one letter from each word (that has not yet been fully read).Automatic The definability problem for two classes C 1 , C 2 of word relations is the problem of deciding for a given relation in C 1 whether it is in C 2 .For example, if C 1 is the class of rational relations, and C 2 the class of automatic relations, then the problem is to decide whether a given rational relation can be defined by a synchronous transducer.This problem was shown undecidable by (Frougny and Sakarovitch, 1993, Proposition 5.5), and also the definability problem for rational and recognizable relations was shown undecidable by (Berstel, 1979, Chapter III, Theorem 8.4).A systematic study of definability problem for some important subclasses of rational relations is given by Carton et al. (2006).
In this paper, we consider a more general version of the definability problem, where the subclasses of rational relations are defined by synchronization languages, a formalism that has been introduced and studied by Figueira and Libkin (2015); Descotte et al. (2019).In that setting, a synchronization language is a language over the alphabet {1, 2}, specifying how the two heads of a transducer are allowed to move on the two tapes.For example, the word 1121222 indicates that two symbols from the first tape are read, then one symbol from the second tape, then one symbol from the first tape, and then three symbols from the second tape.Each run of a transducer defines such a synchronization word.Therefore, a regular synchronization language L defines a subclass of the rational relations, namely all relations that can be defined by a transducer whose runs have synchronization words in L. For example, the class of automatic relations is defined by the synchronization language (12) * (1 * +2 * ), and the class of recognizable relations by 1 * 2 * , see Figueira and Libkin (2015).
We consider here a more general version of synchronization languages.Assuming that the input (first tape) alphabet Σ, and the output (second tape) alphabet Γ of the relation are disjoint, we consider synchronization languages that are regular subsets of (Σ ∪ Γ) * .A word over (Σ ∪ Γ) * does not just specify in which order the heads move along the tape, but also which symbols have to be read in each step.This way, it is possible to capture subclasses of rational relations that cannot be captured with the synchronization languages over {1, 2}, as for example the class of prefix-recognizable relations (see Section 4.2.3).Another motivation for studying this more general formalism of synchronization languages is its tight connection to origin semantics.
Origin semantics is motivated by the intractability of, e.g., the equivalence problem for rational relations (whether two given transducers recognize the same relation), which stems from the fact that two transducers recognizing the same relation may produce their outputs very differently.This is witnessed by their different synchronization languages.To overcome this difficulty Bojańczyk (2014); Bojańczyk et al. (2017) have introduced and studied transducers with origin semantics, that is, additionally, there is an origin function that maps output positions to their originating input positions.The main result of Bojańczyk (2014) is a machine-independent characterization of relations defined by two-way transducers with origin semantics (Bojańczyk, 2014, Theorem 1).Using the origin semantics, many interesting problems become decidable, e.g., deciding whether two given (one-way) transducers are equivalent reduces to deciding whether their synchronization languages are equal.However, the origin semantic is rather rigid.To mitigate this, Filiot et al. (2016) have introduced a similarity measure between (one-way (i) ) transducers with origin semantics which amounts to a similarity measure between their synchronization languages.Restricting, for example, the equivalence problem to transducers that have 'similar' synchronization languages allows to regain decidability.Since origin semantics of transducers cannot be captured by synchronization languages over {1, 2}, this is another motivation for studying the formalism of synchronization languages over Σ ∪ Γ.For example, a synchronization language over Σ ∪ Γ can capture all transducers that behave similarly to a given one in the above mentioned measure.
We study here the decidability of the definability problem, whether a given rational, automatic, or recognizable relation can be defined inside a given synchronization language T for different classes of synchronization languages.It is easy to prove that all instances of the definability problem are undecidable if the class of target synchronization languages is regular but otherwise not restricted.Most importantly, we show that it is decidable whether a given automatic relation can be defined inside a given target synchronization language that comes from the class of synchronization languages that define recognizable relations.It remains open if it is decidable whether a given automatic relation can be defined inside a given target synchronization language that comes from the class of synchronization languages that define automatic relations, but we show decidability for a few special cases.These and further results are summarized in Table 2 on Page 19.An explanation of the results is given in Section 4.1.We note here that another kind of definability problem in the context of synchronization languages has been studied by Descotte et al. (2018): Given two synchronization languages (over {1, 2}), are all relations that are definable with the first synchronization language also definable with the second synchronization language?So the definability problem considered by Descotte et al. (2018) is on the level of classes of relations, while we study definability for individual relations.
Furthermore, we also study the uniformization problem for subsequential transducers.A uniformization of a binary relation R is a subset of R that defines a function and that has the same domain as R, so the function selects precisely one image for each element in the domain.In our setting, we are given a relation over finite words, and ask whether this relation has a uniformization that can be computed by a subsequential transducer.A subsequential transducer is a transducer that is deterministic on the input symbols, and produces in each step a finite sequence of output symbols (the prefix "sub" refers to the fact that the transducer can make a final output at the end of the word).The uniformization problem by synchronous sequential transducers (that read in each step one input symbol and produce one output symbol) has first been studied for automatic relations over infinite words in the context of synthesizing sequential functions from a logic specification by Büchi and Landweber (1969).The setting in which the sequential transducer needs not be synchronous has been considered by Hosch and Landweber (1972);Holtmann et al. (2010).
While the decidability results for uniformization of automatic relations by synchronous sequential transducers can easily be transferred from infinite to finite words, the problem becomes different when the sequential transducer needs not be synchronous.Decidability for uniformization of automatic relations by subsequential transducers has been shown by (Carayol and Löding, 2014, Theorem 18), and for other subclasses of rational relations (finite valued and deterministic rational relations) by Filiot et al. (2016).For rational relations, the problem becomes undecidable, see (Carayol and Löding, 2014, Theorem 17) (however, each rational relation has a uniformization by a rational function, see Sakarovitch (2009), which needs not be subsequential). (i) The introduction of this measure has triggered similar work on two-way transducers, see Bose et al. (2018Bose et al. ( , 2019)).
The problem of uniformization by subsequential transducers does not impose any restrictions on how the subsequential transducer produces its output.If one is, for example, interested in uniformization by subsequential transducers that have a bound k on the delay between input and output (the difference of the length of the processed input and the produced output), then this can be captured by using a regular synchronization language as another parameter to the problem.The subsequential transducer then has to produce its output in such a way that the resulting interleaving of input and output is inside the given synchronization language.As an example (of unbounded delay between input and output), transducers that produce exactly two output symbols for each input symbol are captured by the synchronization language (ΣΓΓ) * .
Uniformization of automatic relations by subsequential transducers with a synchronization language of finite shiftlag (which roughly corresponds to the bounded delay case mentioned in the previous paragraph) has been shown to be decidable by Winter (2018).Uniformization of rational relations by subsequential transducers with a synchronization language 'similar' to the one of the given transducer has been studied in Filiot et al. (2016).
Our contribution is a systematic overview and some new results of uniformization problems for rational, automatic, and recognizable relations by subsequential transducers for different classes of synchronization languages.The most involved result is that it is undecidable whether a given automatic relation has a uniformization by a subsequential transducer inside a given regular target synchronization language.Furthermore, we show is that it is decidable whether a given rational relation has a uniformization by a recognizable relation.The proof is a reduction to the boundedness problem for distance automata.A complete overview is given in Table 1 on Page 9, and the results are explained in more detail in Section 3.1.
The paper is structured as follows.In Section 2 we provide definitions and terminology used throughout the paper.In Section 3 we present results on uniformization, and in Section 4 we consider definability problems.

Preliminaries
In this section, we introduce our terminology and recall some results that are used throughout the paper.
Let N denote the set of non-negative integers.
Words, languages, relations, and uniformizations.An alphabet is a finite non-empty set of symbols, also called letters.We denote alphabets by Σ and Γ.A word over Σ is a possibly empty finite sequence a 1 • • • a n of symbols from Σ.The empty word is denoted by ε.Given a word w, we denote by |w| its length, that is, the number of symbols in w, by |w| a the number of occurrences of letter a in w, by w[i] its ith symbol, and by w We denote by Σ −1 the set of symbols a −1 for all a ∈ Σ.Any word w over Σ ∪ Σ −1 can be reduced into a unique irreducible word using the free group equations aa −1 = a −1 a = ε for all a ∈ Σ, e.g., Let Σ * , and Σ + denote the set of finite and non-empty finite words over Σ, respectively.We write Synchronization languages.We consider relations over Σ * × Γ * , and refer to Σ as input alphabet and to Γ as output alphabet.We assume that Σ and Γ are disjoint, if not, we annotate every symbol in Σ with 1 and every symbol in Γ with 2 to make them disjoint.A language over Σ ∪ Γ then encodes a relation over Σ * × Γ * , as explained in the following.For c ∈ {i, o}, referring to input and output, respectively, we define two functions These functions are lifted to words over Σ∪Γ by applying them to each letter.A word w ∈ (Σ ∪ Γ) * is a synchronization of the uniquely determined pair (u, v) ∈ Σ * × Γ * with u = π i (w) and v = π o (w).We write w to denote (u, v).Then a language S ⊆ (Σ ∪ Γ) * of synchronizations defines the relation S = { w | w ∈ S}.Such languages over Σ ∪ Γ are called synchronization languages.
Given a synchronization language S ⊆ (Σ∪Γ) * , we say a word w ∈ (Σ∪Γ Lag, shift, and shiftlag.Different classes of automaton definable relations can be defined in terms of the interleaving of input and output symbols in synchronization languages, see Figueira and Libkin (2015).These characterizations make use of the notions lag, shift, and shiftlag, as defined below.For the examples illustrating these definitions, consider Σ = {a} and Γ = {b}.Given a word w ∈ (Σ ∪ Γ) * , a position i ≤ |w|, and γ ∈ N, we say i is γ-lagged if the absolute value of the difference between the number of input and output symbols in w[1 : i] is γ, e.g., the last position 5 in the word abaaa is 3-lagged.Likewise, we define the notions >γ-lagged and <γ-lagged.
Given a word w Two shifts i < j are consecutive if there is no shift ℓ such that i < ℓ < j.Given a word w ∈ (Σ ∪ Γ) * , let shift(w) be the number of shifts in w, let lag(w) be the maximum lag of a position in w, and let shiftlag(w) be the maximum n ∈ N such that w contains n consecutive shifts which are >n-lagged.
As an example consider the word w = aabaabbbbbbbaaab: lag(w) is 4, because position twelve (at the end of the b-block) is 4-lagged; shift(w) is 5; shiftlag(w) is 2, because the two consecutive shifts at positions five and twelve are >2-lagged.
We lift these notions to languages by taking the supremum in N∪{∞}, e.g., shift(S) = sup{shift(w) | w ∈ S}, and likewise for lag(S) and shiftlag(S).For example, the language a * b * a * has infinite lag and shiftlag of 2, the language a * b * a * b * has shiftlag of 3.
such a run exists.A run on the empty word is a single state, we write A : p ε − → p.A run is accepting if it starts in the initial state and ends in a final state.For each state q ∈ Q, we denote by A q the NFA that is obtained from A by setting the initial state to q.
The language recognized by A is The class of languages recognized by NFAs is the class of regular languages.
An NFA is deterministic (a DFA) if for each state q ∈ Q and a ∈ Σ there is at most one outgoing transition.In this case, it is more convenient to express ∆ as a (partial) function δ : Q × Σ → Q.Furthermore, let δ * denote the usual extension of δ from symbols to words.
Transducers.A non-deterministic finite state transducer (NFT), transducer for short, is a tuple T = (Q, Σ, Γ, q 0 , ∆, F, f ), where Q is finite set of states, Σ and Γ are alphabets, The class of relations recognized by NFTs is the class of rational relations.The transducer is subsequential if each transition reads exactly one input symbol and the transitions are deterministic on the input, in other words, if ∆ corresponds to a (partial) function Q × Σ → Γ * × Q.Then it defines a subsequential function.
A transducer induces a synchronization language in a natural way.A synchronization of a pair of words can be seen as a representation of how a transducer consumes the input and output word of a pair.We denote the synchronization language of a transducer T by S(T ) which is formally defined as the set It is easy to see that an NFA for S(T ) can be obtained from T .Note that this directly implies that S(T ) is regular.Given a regular language S ⊆ (Σ ∪ Γ) * , we say that T is S-controlled if S(T ) is S-controlled.
We say that T has finite lag (shift resp.shiftlag) if S(T ) has finite lag (shift resp.shiftlag).
Conversely, for a regular synchronization language S one can easily construct a transducer T such that S(T ) = S.
Characterization of relation classes via synchronization languages.In this work, we consider classes of relations that can be defined by regular synchronization languages, that is, subclasses of rational relations.Two standard subclasses of rational relations are automatic relations which are relations that can be defined in terms of automata that synchronously read input and output symbols, and recognizable relations which are relations that can be expressed as finite unions of products of regular languages (see, e.g., Carton et al. (2006)).We do not formalize these definitions here because we are working with a different characterization of these relation classes, as explained below.We denote by REC, AUT, and RAT the classes of recognizable, automatic, and rational relations, respectively.It is well-known that REC ⊊ AUT ⊊ RAT.
We recall the connection between these classes of relations and synchronization languages as established by Figueira and Libkin (2015).For a regular synchronization language S ⊆ (Σ ∪ Γ) * , let REL(S) = { T | T ⊆ (Σ ∪ Γ) * is a regular S-controlled language} be the set of relations that can be given by regular S-controlled synchronization languages.
Let REG all be the class of all regular synchronization languages, REG FSL and REG FS be the class of regular synchronization languages with finite shiftlag and finite shift, respectively.Clearly, REG FS ⊊ REG FSL ⊊ REG all .We have the following result.
Theorem 3 (Figueira and Libkin (2015)).Let S ⊆ (Σ ∪ Γ) * be a regular language, then: Note that the previous theorem is a statement about the class of relations REL(S) defined by all regular subsets of S. In particular, if S ∈ REG FS then S ∈ REC, if S ∈ REG FSL then S ∈ AUT.However, the converse generally does not hold, e.g., consider Given a class C of regular languages over Σ ∪ Γ, we say that a regular language S 0 ⊆ (Σ ∪ Γ) * is a canonical representative of C if REL(S 0 ) = S∈C REL(S).A canonical representative is called effective if for each regular S-controlled T ⊆ (Σ ∪ Γ) * for some S ∈ C there is a regular S 0 -controlled T ′ ⊆ (Σ ∪ Γ) * such that T = T ′ and T ′ can be constructed in finite time.

Uniformization problems
In this section, we take a systematic look at uniformization problems defined by synchronization languages in the classes REG all , REG FSL , and REG FS .Roughly speaking, these problems are about deciding whether a given relation (given by a synchronization language S), has a uniformization by a subsequential transducer whose synchronization language is contained in a given synchronization language T .We begin with an example of a rational relation that is uniformizable by a subsequential transducer.Afterwards, we formally define our problem settings.Example 5. Consider the rational relation over the input alphabet Σ = {a, b} and the output alphabet

Christof Löding, Sarah Winter
defined by the synchronization language ac(ac + b) * + (a + bc) * bc.The relation is uniformized by the subsequential transducer depicted in Figure 1 on the left-hand side.If the input starts with a, then the transducer produces output c for each input a and no output for an input b, and vice versa otherwise.
The general problem whether a rational relation has a uniformization by a subsequential transducer is undecidable, see (Carayol and Löding, 2014, Theorem 17).We consider the decision problem that introduces a parameter T for the synchronizations that the subsequential transducer can use: Definition 6 (Resynchronized uniformization problem).The resynchronized uniformization problem asks, given a regular source language S ⊆ (Σ ∪ Γ) * and a regular target language T ⊆ (Σ ∪ Γ) * , whether there exists a T -controlled subsequential transducer that uniformizes S .
We start by giving an example.
Example 7. Consider the rational relation over the input alphabet Σ = {a, b, c} and output alphabet defined by the synchronization language S = da * ba * (d + e) * + ea * ca * (d + e) * .Furthermore, consider T = Σ * (ΣΓ) + .The relation is uniformized by the T -controlled subsequential transducer depicted in Figure 1 on the right-hand side.The uniformization realized by the transducer maps inputs of the form a i ba j to d j+1 and inputs of form a i ca j to ed j for all i, j ≥ 0.
R 2 can also be uniformized by a subsequential transducer that is (Σ * Γ * )-controlled.To be more specific, R 2 can be uniformized by a subsequential transducer that is (Σ * Γ)-controlled.Such a transducer can first read the whole input, and then output d if the input is of the form a * ba * , and output e if the input is of the form a * ca * .
But R 2 cannot be uniformized by a subsequential transducer that is (ΣΓ) * -controlled.Such a transducer would have to make the first output after reading the first input symbol.If this input symbol is a, then it is not yet decided if the output has to start with d or with e.

always
Tab. 1: Overview of results for instances of the resynchronized uniformization problem (upper and middle rows) and variants (lower rows).The results are described in Section 3.1.

Overview of the results
Table 1 provides an overview of known and new (un)decidability results for the resynchronized uniformization problem for different types of source relations and target synchronization relations.The entries for the new results contain references to the corresponding statement in this paper, which are proved in Section 3.2 and Section 3.3.Some entries contain a reference to the literature.The results by (Winter, 2018) (see (Winter, 2018, Theorems 10 and 25)) use the same terminology as in this paper, so they do not need further explanation.Some other results from the literature are not stated in terms of synchronization languages, so we explain their connection to our setting below, and we also briefly explain the table entries without a further reference, which are either trivial or are direct consequences of other entries in the table.
As classes for source relations we consider rational, automatic, and recognizable relations, represented by the columns in the table.Formally, these relations are specified by regular languages from the classes REG all , REG FSL , and REG FS .But note that precise representations of the source relations are not important because according to Theorem 4 we can always assume that the source relation is encoded using the canonical synchronizations for rational, automatic, and recognizable relations.

The rows of the table correspond to different variations concerning the target synchronization language
T in the problem.The upper three rows show the cases where T is fixed to the canonical synchronizations for rational, automatic, and recognizable relations, respectively.
The first row is about the problem whether a given relation has a (Σ ∪ Γ) * -controlled subsequential uniformization, which is equivalent to asking whether it has a uniformization by an arbitrary subsequential transducer.This problem has been considered by Carayol and Löding (2014): For rational source relations the problem is undecidable (Carayol and Löding, 2014, Theorem 17) and for automatic source relations it is decidable (Carayol and Löding, 2014, Theorem 18).The same authors have also shown that it is decidable whether an automatic relation has a uniformization by a recognizable relation, which corresponds to a Σ * Γ * -controlled subsequential uniformization in our table (third row, middle column), see (Carayol and Löding, 2014, Proposition 20).
The question whether an automatic relation has a uniformization by a synchronous subsequential transducer (second row, middle column) is a classical problem of reactive synthesis that has been studied intensively over infinite words and was first solved by Büchi and Landweber (1969).The result can easily be adapted from infinite to finite words.
Let us now look at first three rows and the rightmost column (recognizable relations).First, we explain why a recognizable relation always has a uniformization by a Σ * Γ * -controlled subsequential transducer, and thus also a by (Σ ∪ Γ) * -controlled one.Recall that a recognizable relation R can be effectively represented as n i=0 U i × V i where U i ⊆ Σ * and V i ⊆ Γ * are regular languages for each i.Since regular languages are closed under all Boolean operations, one can find such a representation in which all the U i are pairwise disjoint.Now it suffices to pick some Clearly, R f is realizable by a Σ * Γ * -controlled subsequential transducer based on a product DFA for the U i .Secondly, the result that it is decidable whether a recognizable relation has a uniformization by a synchronous subsequential transducer follows directly from the fact that it is decidable whether an automatic relation has a uniformization by a synchronous sequential transducer because every recognizable relation is also automatic (in general, decidability results propagate to the right in each row of the table ).
As already mentioned, the first three rows deal with the fixed target synchronization languages that are the canonical representatives for the classes REG all , REG FSL , REG FS .The three rows in the middle are about the problem where a regular target synchronization language from one of these classes is given as input to the problem.The two undecidability results for rational source relations in this part of the table directly follow for the choices of T = (Σ ∪ Γ) * resp.T = (ΣΓ) * (Σ * + Γ * ) from the results in the upper rows.The decidability results in this part of the table follow directly from the decidability results by Winter (2018) since REG FS ⊆ REG FSL ⊆ REG all .We conjecture that the case of rational source relations and target synchronization languages of finite shift is decidable, but we were not able to prove it, so this case is still open.
The last three rows consider the version of the problem where the target synchronization language is not fixed or given, but we ask for the existence of a uniformization by a subsequential transducer whose synchronization language is in REG all , REG FSL , resp.REG FS .Clearly, for the class REG all this reduces to the first row because both problems do not impose any restriction on the synchronization language of the subsequential transducer.Concerning recognizable source relations, we have seen above that a recognizable relation always has Σ * Γ * -controlled sequential uniformization, thus, every entry is "always".The decidability result for automatic source relations in the last row is a direct consequence of the decidability result one column to the left.
We now show the remainder of the results, first the decidability results in Section 3.2, then the undecidability results in Section 3.3.

Decidability results
To begin with, we show the following: Theorem 8.It is decidable whether a given automatic relation has a uniformization by a subsequential transducer with finite shiftlag.
Proof: This is consequence of the proof that it is decidable whether an automatic relation has a uniformization by a subsequential transducer presented by Carayol and Löding (2014).It turns out that if an automatic relation has a uniformization by a subsequential transducer, then the relation also has a uniformization by a subsequential transducer with finite shiftlag.A bit more formally, Carayol and Löding (2014) have reduced the problem to deciding the existence of a winning strategy in a safety game.Such a winning strategy can be translated into a (Σ k Γ k ) * Σ * Γ * -controlled subsequential transducer for a computable k.In other words, as long as the needed lookahead on the input to produce the next output is at most k, the subsequential transducer for the uniformization alternates between reading input words of length k and producing output words of length k.Once the transducer needs a lookahead of more than k, it can read the remainder of the input and produce one final output word.The language (Σ k Γ k ) * Σ * Γ * has finite shiftlag.Now we show that it is decidable whether a given rational relation has a uniformization by a Σ * Γ *controlled subsequential transducer.The functions computed by Σ * Γ * -controlled subsequential transducers are clearly recognizable relations, and conversely, each functional recognizable relation can be computed by a Σ * Γ * -controlled subsequential transducer (as already explained in Section 3.1).
We prove that it is decidable whether a given rational relation has a uniformization by a recognizable relation by a reduction from the boundedness problem for distance automata.A distance automaton is a finite state automaton that additionally maps transitions to distances of 0, 1, or ∞.Then a run is associated with the sum of distances seen along the run.Such an automaton is said to be bounded if there exists a bound such that each accepted word has a run with a distance less or equal to this bound.We define this formally.
A finite state automaton with a distance function (distance automaton) A is a tuple (Q, Σ, q 0 , ∆, F, d), where the first five components are the same as for finite state automata, and d : ∆ → {0, 1, ∞} is a distance function that assigns a value to each transition.The concepts of run, accepting run, and recognized language are defined as for finite state automata.The distance d(ρ) of a run of the form (p 0 , a 1 , p 1 ) . . .
and otherwise as the minimal distance of an accepting run of A on w, that is, min{d(ρ) | ρ is an accepting run of A on w}.Let D(A) denote the supremum of distances associated with L(A), that is, the supremum of {d(w Hashiguchi has shown that the boundedness problem for distance automata is decidable, see Hashiguchi (1982Hashiguchi ( , 1990)), see also Kirsten (2005).Now that we have introduced distance automata, we are ready to prove the result.
Theorem 9.It is decidable whether a given rational relation has a uniformization by a recognizable relation.
Proof: We give a reduction to the boundedness problem for distance automata.Let R ⊆ Σ * × Γ * be a rational relation given by an NFA A over Σ ∪ Γ that defines R, that is, L(A) = R.Our goal is to construct a distance automaton B such that such that dom(B) = dom(R) and D(B) is bounded iff R has a uniformization by a recognizable relation.
Note that a uniformization of R by a recognizable relation only produces finitely many different possible output words.Hence, there is a bound on the length on these output words.And vice versa, if there is a bound n such that for each word u in the domain of R there is an output word v such that |v| ≤ n and (u, v) ∈ R, then the relation assigning to each input the smallest output in length-lexicographic order is a recognizable uniformization of R.
So we use the reduction to boundedness of distance automata to check such a bound on the length of shortest output words for each input exists.The idea behind the construction is to replace transitions labeled with output symbols with transitions that increase the distance value of a run.Formally, we take all input transitions of A with distance value 0, and insert transitions with distance value 1 that correspond to runs consuming one input symbol and a non-empty sequence of output symbols, as described below.
Let B = (Q A , Σ, q A 0 , ∆, F A , d) be a distance automaton, where ∆ and d are defined such that (p, a, q) ∈ ∆ and d((p, a, q)) = 0 iff A : p a − → q and (p, a, q) ∈ ∆ and d((p, a, q)) = 1 iff A : It is easy to see that L(B) = dom(R).We show that R has a uniformization by a recognizable relation iff Let ℓ be the length of the longest v i .Then, for each u ∈ dom(R) there exists a v ∈ Γ ≤ℓ such that there is synchronization w of (u, v) that is accepted by A. A run of A on w can be easily translated into a run of B on u.It directly follows that d(u) is at most ℓ.Thus, d(B) is bounded.
Assume d(B) is bounded by n.Thus, for each u ∈ dom(R) we can pick a v ∈ Γ * of length at most |∆| • n such that there exists a synchronization w of (u, v) that is accepted by A. The factor |∆| was introduced because a number of consecutive transitions with output labels that occur in A increase the distance of a corresponding run in B only by one.Since there are only finitely many words of a fixed length it follows directly that R can be uniformized by recognizable relation.
From the decidability of the boundedness problem for distance automata we obtain decidability of the problem whether a rational relation is uniformizable by a recognizable relation.
Turning to the question whether a rational relation has a subsequential uniformization inside the class of languages with finite shift, we obtain the following.Corollary 10.It is decidable whether a given rational relation has a uniformization by a subsequential transducer with finite shift.
Proof: We show that if a rational relation is uniformizable by a subsequential transducer whose synchronization language has finite shift, then it is uniformizable by a recognizable relation which is decidable by Theorem 9.
Given a rational relation R and a subsequential transducer T that uniformizes R such that S(T ) ∈ REG FS .Recall that Σ * Γ * is an effective canonical representation of REG FS .Clearly, the Σ * Γ * -controlled representation of S(T ) describes a functional recognizable relation, and as explained earlier, functional recognizable relation can be computed by Σ * Γ * -controlled subsequential transducers.
Resynchronized Uniformization and Definability Problems for Rational Relations 13

Undecidability results
First, we introduce a technical result by Carayol and Löding (2014) of which Corollaries 12 and 13 are easy consequences.There, it is shown that is undecidable whether a given rational relation has a uniformization by a subsequential transducer by showing the following stronger statement.
Lemma 11 (Carayol and Löding (2014)).There exists a rational relation R M , constructed from a Turing machine M , such that R M has a uniformization by the identity function if M does not halt for the empty input, and R M has no uniformization by any subsequential transducer if M halts for the empty input.
Corollary 13.It is undecidable whether a given rational relation has a uniformization by a subsequential transducer with finite shiftlag.
In the remainder of this section, we show that for a given automatic relation and a given regular synchronization language it is undecidable whether the relation has a subsequential uniformization according to the synchronization language.
First, we show a stronger result.Recall that a regular synchronization language S ⊆ (Σ ∪ Γ) * is a fine-grained way to describe the possible behavior of a transducer.A little less fine-grained is a socalled regular control language, that is a regular language L ⊆ {1, 2}.Such a language describes how a transducer may process input and output symbols, but does not specify which input and output symbols occur, e.g., 12211 means that a transducer reads one input symbol, subsequently produces two output symbols, and then reads two input symbols.This notion of control language is the one used by Figueira and Libkin (2015).Each control language L naturally corresponds to a synchronization language by substituting 1 with Σ and 2 with Γ, and to each synchronization language we can associate the control language obtained by the projection that replaces symbols from Σ with 1, and symbols from Γ with 2. So the definitions and notations introduced in Section 2 regarding synchronization languages can be applied in a natural way to control languages (in fact, these notions have originally been defined for control languages by Figueira and Libkin (2015)).
We show that for a given automatic relation and a given control language it is undecidable whether the relation has uniformization according to the control language.
Theorem 14.It is undecidable for a given automatic relation whether it has a uniformization by an L-controlled subsequential transducer for a given regular control language L ⊆ {1, 2} * .
Proof: We give a reduction from the halting problem for Turing machines (TMs).Given a TM M with a right-infinite tape, our goal is to describe an automatic relation R M and a regular control language L M such that R M can only be uniformized by an L M -controlled subsequential transducer if M does not halt for the empty input.
Let Q M denote the state set of M , q M 0 denotes the initial state of M , Γ M denotes the tape alphabet of M including the blank symbol , δ M denotes the transition function of M , and ⊢ denotes the tape delimiter.We represent a configuration c of M in the usual way as and the head of M is on b 1 .We assume that a configuration is represented without additional blanks, meaning a configuration representation does not start nor end with a blank.Let C M denote the set of all configurations of M .For a configuration c ∈ C M let succ(c) denote its successor configuration.Without loss of generality, we assume that succ(c) is at least as long as c, we call this nonerasing.Every TM can be made non-erasing by introducing a new tape symbol B that is written instead of and the TM behaves on B the same as on .Furthermore, we call a configuration c ∈ C M whose last letter is some q ∈ Q M and there is a transition of the form δ M (q, ) = (q ′ , a, R) extending configuration, because |succ(c)| = |c| + 1.We denote by C M E the set of extending configurations.
where c 1 , . . ., c m−1 are configurations of M and c m is a (prefix of a) configuration of M .The idea is that we want to force a uniformizer to produce an output sequence that begins with $ ⊢ q M 0 $succ(c 1 )$ . . .$succ(c m−1 ) for such an input.The control language is defined in such a way that this is indeed possible (the subsequential transducer can produce succ(c i ) while reading c i ).And this should define a uniformization iff there is no halting computation of M for the empty input.That is, we have to define R M in such a way that the pair succ defined over all four-letter infixes of words from the domain of R M which defines how a subsequential transducer should build successor configurations.First, given a configuration c ∈ C M , note that in order to output succ(c) Furthermore, in order to determine the letter succ(c) [j], it suffices to remember c For example, consider the configuration c of the form a 1 a 2 qb 1 b 2 and the transition δ M (q, b 1 ) = (q ′ , c, L), is needed, because the applied transition moves the head to the left.
The function f M succ extends this idea to infixes from words of the domain of R M .Formally, the type of the partial function f M succ is ΣΣΣΣ → Σ ∪ ΣΣ.We omit a formal definition of the mapping, instead, we provide some examples: • a 1 a 2 qb 1 maps to q ′ if δ M (q, b 1 ) = (q ′ , c, L) • a 1 a 2 q$ maps to a 2 c if δ M (q, ) = (q ′ , c, R) suffix of an extending configuration and $ is seen, this is the only case the function has a two-letter target To ensure that f M succ is totally defined, we define succ(c) = c for halting configurations c.We design the relation R M and the control language L M such that a potential uniformizer is forced to behave according to f M succ .To ensure this, we introduce two constraints (formally below).The output must end according to f M succ applied to the suffix of the input, and we have to enforce that the potential uniformizer produces two letters only if the delimiter $ after an extending configuration is seen.The latter condition can not directly be enforced by R M nor L M , but in R M it suffices to compare the length of the last configuration in the input and the last configuration of the output modulo two to detect deviations (explained in the correctness proof).
Before we define the relation, we introduce one shorthand notation.Given w ∈ Σ * , let last i (w) denote the letter w[|w| − i] for i ∈ N, that is, the ith to last letter of w, and let last i:j (w) denote w Items 6 and 7 are designed under the assumption that if |c m | ≤ 1, then a uniformizer has not finished to produce succ(c m−1 ).If |c m | = 2, then $ -the delimiter after succ(c m−1 ) -is produced, and if |c m | ≥ 3, then the production of succ(c m ) has started.

6.
• if In combination with the control language L M defined below, Items 5 to 7 ensure that an L M -controlled subsequential uniformizer of R M has to output succ(c i ) while reading c i according to f M succ (as will be explained later).It is not hard to see that R M is an automatic relation.For Item 7 note that (x − y) mod 2 = sign((x mod 2) − (y mod 2)).Replacing Items 5 to 7 by c ′ i+1 = succ(c i ) would make the relation non-automatic, in general.
The control language L M is defined by the regular expression 1222211(1(2 + 22)) * 12, we explain its use further below.
We claim that R M can be uniformized by an L M -controlled subsequential transducer iff M does not halt on the empty tape.
If M does not halt, then an L M -controlled subsequential transducer that produces for input u of the form $c 1 $ . . .$c m # uniformizes R M : First, note that this output guarantees that c ′ i+1 = succ(c i ) for all i ≤ m − 1, and c ℓ−1 = succ(c m−1 ).We show that the conditions of R M are satisfied: We begin with Items 5 to 7.
Clearly, f M succ (last 4:1 (u)) has the correct value.The next statements are easy consequences of the definition of f M succ : If |c m | ≤ 1, then the delimiter $ after succ(c m−1 ) is not included in the output, and c ′ ℓ refers to succ(c m−1 ).Every configuration has length at least 2, thus, Hence, it is easy to see that all length constraints regarding c ′ ℓ are satisfied.We turn to the modulo constraints.After c m−1 , $ follows, thus, f M succ at the end of succ applied to shifting four-letter windows of c m (with three letters known of c m when the first letter of c ′ ℓ is produced) yields that |c m | and |c ′ ℓ | are either both even or both odd.Thus, the condition if Thus, assume c 1 is the initial configuration.Then either there exists an i ≤ m − 1 such that succ(c i ) ̸ = c i+1 or if no such i exists then succ(c i ) cannot be a halting configuration for all i because M does not halt.In the former case we have that In the latter case we have that c ′ ℓ−1 = succ(c m−1 ) is not a halting configuration.
We argue that it is possible for a subsequential transducer to realize in an L M -controlled fashion.The idea is that the transducer, after producing $c ′ 1 $ := $ ⊢ q M 0 $, behaves according to f M succ shifting the considered four-letter window letter-by-letter.With this in mind it is easy to see that it is possible to realize the desired sequence in an L M -controlled fashion such that all conditions of R M are satisfied.
Now assume that M does halt for the empty input, and let c 1 , . . ., c m be the sequence of configurations corresponding to a halting computation.Clearly, an L M -controlled subsequential transducer that produces for the input u of the form and c ℓ−1 is a halting configuration of M .
We now show that any L M -controlled subsequential uniformizer of R M behaves according to f M succ (after producing $c ′ 1 $ := $ ⊢ q M 0 $) which implies that if R M is uniformizable by an L M -controlled subsequential transducer then M does not halt on the empty input.Assume such a uniformizer has so far behaved according to f M succ , and now produces something different.Let u ′ denote the current input sequence.We distinguish two cases.
First, assume that the uniformizer in its last computation step has produced output Then, the next and last input symbol is #.The whole input sequence is u = u ′ #.Clearly, the condition f M succ (last 4:1 (u)) of R M is violated.Secondly, assume that the uniformizer in its last computation step has produced output o such that |o| ̸ = |f M succ (last 3:0 (u ′ ))|.As in the previous case, the next and last input symbol is #.The whole input sequence is u = u ′ #.The uniformizer must make one last single-letter output to be L M -controlled, this output must be #, otherwise the output is clearly not according to R M .
To start, we assume that last , hence, the output o of the uniformizer does not contain $.Since o was the first output not according to f M succ , we obtain that Assume that |c m | = 2.The uniformizer must ensure that |c ′ ℓ | = 0, the only way to achieve this with an output of length two is either $$ or o ends with $ (and begins with some other letter).However, $$ is not part of a valid output sequence.In the other case, since all previous outputs were according to f M succ , we obtain that Thus, since |o| = 2 and all previous outputs were according to f M succ , we obtain that We have proven that every L M -controlled uniformizer of R M behaves according to f M succ after the output $ ⊢ q M 0 $.Together with (u, v) ∈ R M iff M halts on the empty input, where we obtain that R M is uniformizable by an L M -controlled subsequential transducer iff M halts on the empty input.

Christof Löding, Sarah Winter
We have seen that the problem whether an automatic relation has a uniformizer that behaves according to a given control language is undecidable, thus, it is also undecidable if we specify a synchronization language.
Corollary 15.It is undecidable whether a given automatic relation has a uniformization by an Scontrolled subsequential transducer for a given regular synchronization language S ⊆ (Σ ∪ Γ) * .
Proof: Consider the automatic relation R M , based on a Turing machine M , and L M ⊆ {1, 2} * as in the proof of Theorem 14.Let S = {w ∈ (Σ ∪ Γ) * | w is L M -controlled}.It follows directly that it is undecidable whether R M has an S-controlled uniformization.

Definability problems
In the previous section we considered uniformization problems in the context of synchronization languages.We now turn to the definability problem, so the question whether a given relation can be defined inside a given target language of synchronizations.
More formally, we are interested in the following problem.
We say that T ′ ⊆ T is a definition of S in T if T ′ is regular and S = T ′ , so if T ′ is a witness for S ∈ REL(T ).We assume all source and target languages to be regular without explicitly mentioning it in the remainder.
We start by giving an example.The relation S contains pairs of words where the words have the same length, or the difference between the length of the words is at least two.The target synchronization language contains all pairs of words with difference at least two in the synchronous encoding (denoted by the set U ).The difference with S is that the pairs of words of same length are contained in T in the completely asynchronous encoding a * b * .Clearly, this set of words a n b n for all n is not a regular subset of a * b * .However, in order to define S in T , we can also select a larger subset of a * b * that also contains pairs of words that are already covered by U .We illustrate below that this is indeed possible, that is, S ∈ REL(T ).We define the set Clearly, T ′ is regular and T ′ ⊆ T .The relation M captures all pairs of words where the difference between the length of the words is even which implies that (ab) * ⊆ M .Note that M ∩ U contains pairs of words where the difference between the length of the words is at least two and even.Moreover, dec.(Prop.20) Tab. 2: Overview of results for instances of the resynchronized definability problem (upper and middle rows) and variants (lower rows).The results are described in Section 4.1.

Overview and simple results
In Table 2 we give an overview of known and new results.The table is organized in the same way as Table 1 for the uniformization problems.As classes for source relations we consider rational, automatic, and recognizable relations.The upper three rows correspond to the question whether a relation is rational, automatic, and recognizable, respectively, because the target languages are effective canonical representations of their respective relation classes, see Theorem 4. In the context of definability, the lower three rows correspond to the same problems as in the upper three rows, respectively (while in the context of uniformization by subsequential transducers there are differences, see Table 1).
The three middle rows describe the instances of the resynchronized definability problem where a target synchronization language is given as part of the input.The undecidability and decidability results shown in the table are not very difficult to obtain, and are explained below.The most interesting case, whether given automatic relation is definable inside a given target language of finite shiftlag, is considered in Section 4.2.The general case remains open, however, we solve some special cases of the problem.
Let us now turn to the undecidability results in the middle three rows.For the first column and the second and third middle row, undecidability follows directly for the choices of T = (ΣΓ) * (Σ * + Γ * ) and Christof Löding, Sarah Winter Σ * Γ * , respectively.
The undecidability results for the first row in the middle part are a direct consequence of the undecidability of the universality problem for rational relations, see e.g., Berstel (1979).
Proposition 18.For every fixed source language S with S = Σ * × Γ * the resynchronized definability problem for given T ∈ REG all is undecidable.
Proof: If S = Σ * × Γ * , then the question if S can be defined in T is equivalent to asking whether T is universal.This corresponds to the universality problem for rational relations because there is a one-to-one correspondence between finite state transducers and regular synchronization languages (as explained in Section 2).
The decidability results in the middle rows of Table 2 are based on the following simple lemma.
Lemma 19.Given a recognizable relation R and T ∈ REG FS , the set {w ∈ T | w ∈ R} is regular.
Proof: Since R is recognizable it can be effectively expressed as a finite union of products of regular languages, say R = It is routine to construct such an NFA from NFAs for T and the U i , V i .
Proposition 20.The resynchronized definability problem is decidable if the given source language has finite shift and the given target language has finite shiftlag.
Proof: Let S ∈ REG FS and T ∈ REG FSL .We show that S ∈ REL(T ) iff S ⊆ T .Clearly, if S ̸ ⊆ T , then S ̸ ∈ REL(T ).For the other direction, let U := {w ∈ T | w ∈ S } be the set of all synchronizations in T that synchronize a pair in S .The relation S is recognizable, because S is regular and has finite shift.Hence, U is regular according to Lemma 19.If S ⊆ T , then each pair in S has at least one synchronization in T , and therefore U = S , which means that S ∈ REL(T ).
Since S and T are automatic relations, the inclusion S ⊆ T is decidable.
Proposition 21.The resynchronized definability problem is decidable if the given source language has finite shiftlag and the given target language has finite shift.
Proof: Given S ∈ REG FSL and T ∈ REG FS .The relation S is automatic, and for automatic relations it is decidable whether they are recognizable, see Carton et al. (2006).If S is not recognizable, then S / ∈ REL(T ) ⊆ REC.If S is recognizable, it can be effectively represented as a recognizable relation, i.e., as some S ′ ∈ REG FS .Then, the problem reduces to the resynchronized definability problem for regular source and target languages with finite shift, which is decidable according to Proposition 20.

Automatic source relations and targets with finite shiftlag
We do not know whether the resynchronized definability problem for a given automatic relation and a given regular synchronization language with finite shiftlag is decidable.However, we provide some partial answers and show decidability for some special cases in Sections 4.2.1 to 4.2.3.We start by explaining how the problem is related to another open problem, namely the problem whether two given disjoint automatic relations R 1 and R 2 can be separated by a recognizable relation, that is, asking whether there exists a recognizable relation R such that R 1 ⊆ R and R ∩ R 2 = ∅, see Proposition 22.
This problem seems to lie on the border between decidability and undecidability, we give a brief, rather informal, explanation.The following problem was recently shown to be undecidable by Kopczynski (2016): Given two visibly pushdown languages L 1 and L 2 that are disjoint, does there exist a regular language L that separates L 1 and L 2 , that is, L 1 ⊆ L and L 2 ∩ L = ∅?Although this is an undecidable problem in general, we explain how to reduce the problem whether two disjoint automatic relations are separable by a recognizable relation to a more restricted variant.
An automatic relation can be translated into a so-called one-turn visibly pushdown language.Think of a one-turn visibly pushdown language obtained from an automatic relation R as a Σ * Γ * -controlled language of the form {u r v | (u, v) is in the relation R}.The idea is that in a visibly pushdown automaton, after reading u r , the stack content is u, then while reading v the stack is emptied and membership of (u, v) in the relation is verified as follows: Let S be the (ΣΓ) * (Σ * ∪ Γ * )-controlled representation of R. The visibly pushdown automaton repeats these steps: a letter from the input u is read, and a letter from the stack content v is read (and popped).The pair of letters is used to simulate two steps in a DFA that recognizes the set S.
Turning to the separability problem, if there is a regular language separating two such one-turn visibly pushdown languages obtained from two disjoint automatic relations, then there is such a regular language that is Σ * Γ * -controlled (since all relevant words are in Σ * Γ * ).Consequently, the automatic relations that served as a starting point are separable by a recognizable relation of the form {(u r , v) | uv is in the separating language with u ∈ Σ * and v ∈ Γ * }.
Proposition 22.The problem whether two automatic relations are separable by a recognizable relation can be reduced to the resynchronized definability problem for given source and target languages with finite shiftlag.
Proof: Let R 1 ⊆ Σ * × Γ * and R 2 ⊆ Σ * × Γ * be two automatic relations with R 1 ∩ R 2 = ∅.For the reduction, we define a source language S and a target language T , both with finite shiftlag, such that S ∈ REL(T ) iff there is a recognizable relation that contains R 1 and has empty intersection with R 2 .
Let S be the (ΣΓ) * (Σ * ∪ Γ * )-controlled representation of R 2 , that is, of the complement of R 2 .The set S can be obtained starting from a (ΣΓ) * (Σ * ∪ Γ * )-controlled representation of R 2 via complementation and intersection.The target language T is defined such that a definition of S as a subset of T must contain all pairs from R 1 in the recognizable synchronization Σ * Γ * .The pairs that are neither in R 1 nor in R 2 can be contained using the recognizable or the automatic synchronization (or both).This is achieved by choosing T := Σ * Γ * ∪ M , where M is the (ΣΓ) * (Σ * + Γ * )-controlled representation of R 1 ∩ R 2 .We show that S ∈ REL(T ) iff R 1 and R 2 are separable by a recognizable relation.
Assume S ∈ REL(T ), and let U ⊆ T be regular with Assume R is a recognizable relation that separates R 1 and R 2 .We have R 2 = R ∪ M , thus we can define S in T by M ∪ N , where N is the Σ * Γ * -controlled representation of R.

Special types of definitions
The reduction in the proof of Proposition 22 suggests that the difficulty of the problem is coming from the fact that for certain pairs in the source relation, there are different synchronizations available in T .In the reduction, the pairs that are neither in R 1 nor in R 2 are contained in T with their (ΣΓ) * (Σ * ∪ Γ * )controlled representation and their Σ * Γ * -controlled representation.These two representations are the two extreme cases in the sense that one representation is completely asynchronous (input before output), and the other representation is as synchronous as possible (alternating between input and output as long as possible).The definition of S in T has to select some of the asynchronous representations but, in general, not all of them.This is also illustrated in Example 17.
In this section we show that this is indeed the main source of the difficulty of the problem.We define special types of definitions of S in T that correspond to the selection of, roughly speaking, the most asynchronous representation of S in T (called minsync(S, T )), the most synchronous representations of S in T (called maxsync(S, T )), and the full representation of S in T (called allsync(S, T )).We show that regularity of these representations of S in T is decidable.In Sections 4.2.2 and 4.2.3 we then give applications of these results.
For the formal definitions we need a measure of how "(a)synchronous" a word w is in a synchronization language T of finite shiftlag.A characterization for regular synchronization languages of finite shiftlag by Figueira and Libkin (2015) (formally stated in Lemma 23 below) shows that such languages can be expressed as a finite union of concatenations of a regular language with finite lag and a regular language with finite shift.
Intuitively, the finite lag part of this representation of T corresponds to the synchronous part.So the idea is that we consider for w ∈ T the longest prefix x of w such that x −1 T is not of finite shift.The longer such a prefix, the "more synchronous" the word w is inside T .Formally, these ideas are captured by a partial order on words in T , as defined below.
Given a synchronization language T ∈ REG FSL , we define a partial order on T .Given w, w ′ ∈ T such that w = w ′ , we let w As usual, we let w ≈ T w ′ if w ⪯ T w ′ and w ′ ⪯ T w, and w ≺ T w ′ if w ⪯ T w ′ and w ̸ ≈ T w ′ .We omit the index T if it is clear from the context.
Given two synchronization languages S, T ∈ REG FSL , we define three sets of synchronizations, namely, If one of the above sets is regular, and S ⊆ T , then this gives a T -controlled definition of S because minsync(S, T ) and maxsync(S, T ) contain exactly one representation of every element in S , and allsync(S, T ) contains all representations of S -elements that are in T .Our main goal is to show that it is decidable whether these sets are regular, see Lemma 31.Towards that we introduce some additional notations, definitions, and lemmas.
Additional notations.Given a DFA A over Σ ∪ Γ, we denote by Q FS A ⊆ Q A the set that contains a state q if L(A q ) ∈ REG FS , where A q denotes A with initial state q.The following lemma is a simple consequence of this definition.
Lemma 24.Let T ∈ REG FSL and A be a DFA with L(A) = T .For all w ∈ (Σ ∪ Γ) * we have that w We say that two words x, y ∈ (Σ ∪ Γ) * are compatible if they are of same length and there exist u, v ∈ (Σ ∪ Γ) * such that xu = yv .So two words of same length are compatible if they can be extended such that they synchronize the same pair.For example, with Σ = {a, b} and Γ = {c, d}, the words acab and cadc are compatible because acab • dc = cadc • ab = (aab, cdc).Furthermore, we define diff (x, y) = (u, v) if x and y are compatible and u, v are the shortest words such that xu = yv , and let |diff (x, y)| = |uv|.Note that u and v are unique because |x| = |y| implies that one of u, v consists only of input symbols, and the other one only of output symbols.Taking the previous example, we have diff (acab, cadc) = (dc, ab) As a tool in our proofs we use an automaton that synchronously reads pairs of words x, y that have bounded lag and, if x, y are compatible, it reaches the state (u, v) for diff (x, y) = (u, v).This is explained in more detail below.
First note that for compatible words of bounded lag, the length of their difference is bounded.
and the transitions in ∆ update the difference for the next input (a 0 , a 1 ), which can formally be defined by (w 0 , w 1 ), (a 0 , a 1 ), (y 0 z 0 , y 1 z 1 ) ∈ ∆ with for i = 0, 1.Note that if the operation a −1 i w i does not yield an element from (Σ ∪ Γ) * then there exists no transition from (w 0 , w 1 ) with label (a 0 , a 1 ), because this indicates incompatibility.
By an easy but cumbersome induction one can show that the above definition of D k is such that the automaton indeed computes the difference of two compatible string with lag at most k, as stated in the following lemma.
Lemma 26.Given x, y compatible with lag(x), lag(y) ≤ k and diff (x, y) = (u, v), then D k : (ε, ε) Lastly, given T ∈ REG FSL , we define the set fse(T ) -finite shift entry -as that is, the set of all prefixes of T that induce an entry point into some finite shift remainder of T .It is easy to see that this set is regular because by Lemma 24 it is sufficient to accept those words that enter a state from Q FS A in a DFA A for T for the first time.Furthermore, lag(fse(T )) ≤ γ, where γ is chosen according to Lemma 23.
Main lemmas.We are ready to show our key lemmas.The decidability of regularity of the sets minsync(S, T ), maxsync(S, T ), and allsync(S, T ) is stated in Lemma 31.
We start with a helpful lemma about the regularity of sets of non-minimal synchronizations, and then consider the sets minsync(T, T ), maxsync(T, T ) without the additional parameter S in Lemma 28 and Lemma 30.
Lemma 27.For T ∈ REG FSL and a regular T ′ ⊆ T , the set {w ∈ T | there is w ′ ∈ T ′ such that w ≻ w ′ } is regular.
A synchronization w ∈ T is in U if w = xz such that x −1 T / ∈ REG FS and there exists some y ∈ fse(T ) such that x, y are compatible and w ∈ y(y −1 T ′ ) .The last condition ensures that y can be extended to some w ′ = yz ′ ∈ T ′ with w = w ′ .
This description allows us to represent U as Using this representation, our goal is to show that U is regular by rewriting it it terms of automata for T, T ′ .Let A, A ′ denote DFAs for T, T ′ respectively.For simplicity, we assume that A and A ′ use the same transition structure, and only differ in their sets of final states (this can be achieved by taking the product of the two transition structures).Recall that x and y (chosen as above) have a lag of at most γ, where γ is chosen according to Lemma 23.According to Lemma 26, the run of D γ on x ⊗ y ends in the state diff (x, y), say (u, v), which indicates that xu = yv .So we can write the representation of U as The set M p,q,u,v is easily seen to be regular.Since L(A q ) is regular and has finite shift, the relation R q,u,v is recognizable.Hence, the set L p,q,u,v is regular according to Lemma 19.In conclusion, the set U is representable as a finite union of regular sets, thus, it is regular.
Lemma 28.For each T ∈ REG FSL the set minsync(T, T ) is regular.
Proof: The set minsync(T, T ) is equal to T \ {w ∈ T | there is w ′ ∈ T such that w ≻ w ′ }, that is, T without all synchronizations that are not minimal.An application of Lemma 27 with T ′ = T yields that the set of non-minimal synchronizations in T is regular, and hence also its complement minsync(T, T ).
In contrast to Lemma 28, given T ∈ REG FSL , the set maxsync(T, T ) is not regular in general.It is easy to see that the set to be removed is not regular, thus, maxsync(T, T ) is not regular.
In fact, regularity of maxsync(T, T ) turns out to be a strong property because then the resynchronized definability problem reduces to the question of regularity of maxsync(S, T ), as stated in the following lemma.
Lemma 30.Let S and T ∈ REG FSL such that maxsync(T, T ) is regular.Then S ∈ REL(T ) iff maxsync(S, T ) is regular and S ⊆ T .
The set U is regular according to Lemma 27, and hence maxsync(T ′ , T ) is a Boolean combination of regular sets.
Analogously, let k be the smallest k > i such that k is a shift of y.
Note that this implies that a j+1 = b i and b k+1 = a i .Furthermore, since w 1 = w 2 , this also implies that p i−1 = q k and q i−1 = p j .Moreover, since ).Thus, we can conclude that p i−1 = q i−1 = q k = p j .Since δ A (p i−1 , u) = p j and δ A (q i−1 , v) = q k , we obtain that a 1 • • • a i−1 (u + v) * a j+1 • • • a n ⊆ S. Clearly, this subset does not have finite shiftlag, thus, S does not have finite shiftlag, which is a contradiction.
Using the results from the previous section we obtain that Theorem 41.The resynchronized definability problem is decidable for source languages with finite shiftlag and unambiguous target language with finite shiftlag.
Proof: Let S, T ∈ REG FSL and let T be unambiguous.Our goal is to decide whether S ∈ REL(T ), i.e., whether there is a regular language U ⊆ T such that U = S .Assume, such a U exists, then U = minsync(S, T ) = maxsync(S, T ) = allsync(S, T ), because T is unambiguous.Thus, S ∈ REL(T ) iff minsync(S, T ) is regular and S = minsync(S, T ) .The first condition is decidable according to Lemma 31, the second condition is decidable because S, T ∈ REG FSL .

Prefix-recognizable targets
In this section we describe a class of target synchronization languages T that have the property that maxsync(T, T ) is regular.According to Theorem 36, the resynchronized definability problem is decidable for such targets (and source languages S of finite shiftlag).
Based on that we then give an alternative proof for decidability of the problem whether a given (binary) automatic relation is prefix-recognizable (the decidability of this problem has already been shown by Choffrut (2014) for relations of arbitrary arity).
The class of target languages that we consider contains the synchronization languages that are of the form T = U Σ * Γ * for a regular (ΣΓ) * -prefix closed set U .An automaton that accepts the words w with this property can easily be built from an automaton for U .
A direct consequence of Lemma 42 and Theorem 36 is: Theorem 43.The resynchronized definability problem is decidable for given S, T ∈ REG FSL where T = U Σ * Γ * for a regular (ΣΓ) * -prefix closed set U .

Christof Löding, Sarah Winter
We now turn to prefix-recognizable relations.The standard definition of this class of relations uses a single alphabet A as input and output alphabet.A relation over A * × A * is called prefix-recognizable if it can be written in the form n i=1 U i (V i × W i ) := {(uv, uw) | u ∈ U i , v ∈ V i , and w ∈ W i }, for regular languages U i , V i , W i ⊆ A * for each i.
A simple example of a prefix-recognizable relation is the lexicographical ordering on words over an ordered alphabet.
Prefix-recognizable relations where first studied by Angluin and Hoover (1984) and Läuchli and Savioz (1987).The class of prefix-recognizable relations is a natural class that enjoys many nice properties.An overview over these properties (for prefix-recognizable graphs) is given by (Blumensath, 2001, Theorem 1).Furthermore, the graphs of prefix-recognizable relations have a decidable MSO theory which was shown by Caucal (2003).
In order to capture prefix-recognizable relations in our setting, we we make the input and output alphabets disjoint by annotating input letters by 1 and output letters by 2, that is, Σ = {1}×A and Γ = {2}×A.And we say that a relation over Σ * × Γ * is prefix-recognizable if the relation over A * × A * that is obtained by removing the annotations 1 and 2 is prefix-recognizable.
Let Id A = {(1, a)(2, a) | a ∈ A} * ⊆ (ΣΓ) * .Then it is not hard to see that the prefix-recognizable relations are precisely those that can be defined by regular subsets of T pr := Id A Σ * Γ * .Remark 44.A relation over Σ * × Γ * is prefix recognizable iff it is in REL(T pr ).
Since Id A is (ΣΓ) * -prefix closed, we obtain the following corollary of Theorem 43: Corollary 45 (Choffrut (2014)).It is decidable whether a given automatic relation is prefix-recognizable.

Conclusion
We have considered uniformization and definability problems for subclasses of rational relations that are defined in terms of synchronization languages.Our results in combination with known results from the literature provide a systematic overview of the decidability and undecidability for the different variations of the problems.While this picture is almost complete, there are a few problems left open, as shown in Tables 1 and 2.
Furthermore, since we consider synchronization languages over (Σ ∪ Γ) * , our decidability results carry over to the more restricted case of synchronization languages over {1, 2}.However, the undecidability results from the middle parts of the tables (where a synchronization language T is given as input to the problem) do not carry over, in general.The undecidability results in Section 3 also hold in the setting of synchronization languages over {1, 2} (in particular, Theorem 14 is formulated for such synchronization languages).For the undecidability results in Table 2 that are derived from Proposition 18 it is open whether they carry over to synchronization languages over {1, 2}.

Fig. 1 :
Fig. 1: The subsequential transducer on the left uniformizes the relation R1 from Example 5, the subsequential transducer on the right uniformizes the relation R2 from Example 7.
1, and |o| = 2, because L M ensures that an output is either one or two letters.Depending on the length of c m , different conditions of R M must be satisfied.Assume that |c m | > 3, then o can not include $, because that would start a new configuration prefix c ′ ℓ which violates the length constraints of c ′ ℓ .Thus, since |o| = 2, we obtain that c m is even iff c ′ ℓ is odd, which violates that (|c m | − |c ′ ℓ |) mod 2 = 0 if |c m | ≥ 3. Assume that |c m | = 3.This implies that the output produced before o was $, otherwise the subsequential transducer would have not behaved according to f M succ in the computation step before o.Hence, o can not be of the form $$ or begin with $, because $$ is not part of a valid output according to R M .If o ends with $, then |c ′ ℓ | = 0 which violates the length constraint.Thus, o contains no $, meaning that |c ′ ℓ | = 2 which violates the length constraint.

Remark 25 .
Let x, y be compatible with diff (x, y) = (u, v).If lag(x), lag(y) ≤ k, then |u|, |v| ≤ k.Given k ∈ N, we define the relation D k ⊆ (Σ ∪ Γ) * × (Σ ∪ Γ) * as D k := {(x, y) | x and y are compatible and lag(x), lag(y) ≤ k}.The relation D k is automatic, that is, the set {x ⊗ y | (x, y) ∈ D k } is regular, where x ⊗ y denotes the convolution of x and y defined as the word (x[1], y[1]) • • • (x[n], y[n]) ∈ (Σ × Γ) * , where n = |x| = |y| (if |x| ̸ = |y| the convolution is not defined).Due to Remark 25, the set of convolutions of pairs in D k is recognized by a DFA D k that keeps track of the difference of the words.Formally, D k
Shorthand, we write T : p 0 A run is accepting if it starts in the initial state and ends in a final state.
Let us break down the intended use of L M :