Determinisability of register and timed automata

The deterministic membership problem for timed automata asks whether the timed language given by a nondeterministic timed automaton can be recognised by a deterministic timed automaton. An analogous problem can be stated in the setting of register automata. We draw the complete decidability/complexity landscape of the deterministic membership problem, in the setting of both register and timed automata. For register automata, we prove that the deterministic membership problem is decidable when the input automaton is a nondeterministic one-register automaton (possibly with epsilon transitions) and the number of registers of the output deterministic register automaton is fixed. This is optimal: We show that in all the other cases the problem is undecidable, i.e., when either (1) the input nondeterministic automaton has two registers or more (even without epsilon transitions), or (2) it uses guessing, or (3) the number of registers of the output deterministic automaton is not fixed. The landscape for timed automata follows a similar pattern. We show that the problem is decidable when the input automaton is a one-clock nondeterministic timed automaton without epsilon transitions and the number of clocks of the output deterministic timed automaton is fixed. Again, this is optimal: We show that the problem in all the other cases is undecidable, i.e., when either (1) the input nondeterministic timed automaton has two clocks or more, or (2) it uses epsilon transitions, or (3) the number of clocks of the output deterministic automaton is not fixed.

Timed automata. Nondeterministic timed automata (nta) are one of the most widespread models of real-time reactive systems. They are an extension of finite automata with realvalued clocks which can be reset and compared by inequality constraints. The nonemptiness problem for nta is decidable and, in fact, PSpace-complete, as shown by Alur and Dill in their landmark 1994 paper [AD94]. This paved the way for the automatic verification of timed systems, leading to mature tools such as UPPAAL [BDL + 06], UPPAAL Tiga (timed games) [CDF + 05], and PRISM (probabilistic timed automata) [KNP11]. The reachability problem is still a very active research area these days [FJ15, HSW16, AGK18, GMS18, GMS19, GHSW19], as are expressive generalisations thereof, such as the binary reachability problem [CJ99,Dim02,KP05,FQSW20]. As a testimony to the model's importance, the authors of [AD94] received the 2016 Church Award [chu16] for the invention of timed automata.
Deterministic timed automata (dta) form a strict subclass of nta where the successive configuration is uniquely determined from the current one and the timed input symbol. The class of dta enjoys stronger properties than nta, such as decidable universality/equivalence/inclusion problems, and closure under complementation [AD94]. Moreover, the more restrictive nature of dta is needed for several applications of timed automata, such as test generation [NS03], fault diagnosis [BCD05], and learning [VdWW07,TALL19], winning conditions in timed games [AM99,JT07,BHPR07], and in a notion of recognisability of timed languages [MP04]. For these reasons, and for the more general quest of understanding the nature of the expressive power of nondeterminism in timed automata, many researchers have focused on defining determinisable classes of timed automata, such as strongly non-Zeno nta [AMPS98], event-clock nta [AFH99], and nta with integer-resets [SPKM08]. The classes above are not exhaustive, in the sense that there are nta recognising deterministic timed languages not falling into any of the classes above.
Another remarkable subclass of nta is obtained by requiring the presence of just one clock (without epsilon transitions). The resulting class of nta 1 is incomparable with dta: For instance, nta 1 are not closed under complement (unlike dta), and there are very simple dta languages that are not recognisable by any nta 1 . Nonetheless, nta 1 , like dta, have decidable inclusion, equivalence, and universality problems [OW04,LW08], although the complexity is non-primitive recursive [LW08, Corollary 4.2] (see also [OW07,Theorem 7.2] for an analogous lower bound for the satisfiability problem of metric temporal logic). Moreover, the nonemptiness problem for nta 1 is NLogSpace-complete (vs. PSpace-complete for unrestricted nta and dta, already with two clocks [FJ15]), and the binary reachability relation of nta 1 can be computed as a formula of existential linear arithmetic of polynomial size, which is not the case in general [CHT19].
Register automata. The theory of register automata shares many similarities with that of timed automata. Nondeterministic register automata (nra) have been introduced by Kaminski and Francez around the same time as timed automata. They were defined as an extension of finite automata with finitely many registers that can store input values and be compared with equality and disequality constraints. The authors have shown, amongst other things, that nonemptiness is decidable [KF94,Theorem 1]. It was later realised that the problem is, in fact, PSpace-complete [DL09, Theorems 4.3 and Theorem 5.1]. The class of nra recognisable languages is not closed under complementation [KF94,Proposition 5]; moreover, universality (and thus equivalence and inclusion) of nra is undecidable [NSV04,Theorem 5.1] (already for nra with two registers [DL09,Theorem 5.4]).
One way to regain decidability is to consider deterministic register automata (dra), which are effectively closed under complement and thus have a decidable inclusion (and thus universality and equivalence) problem 1 . dra also provide the foundations of learning algorithms for data languages [MSS + 17]. A recent result completing the theory of register automata has shown that a data language is dra recognisable if, and only if, both this language and its complement are nra recognisable [KLT21].
As in the case of timed automata, it has been observed that restricting the number of registers results in algorithmic gains. Already in the seminal work of Kaminski and Francez, it has been proved that the inclusion problem L(A) ⊆ L(B) is decidable when A is an nra and B is an nra with one register [KF94,Appendix A], albeit the complexity is non-primitive recursive in this case [DL09, Theorem 5.2].
1.2. The deterministic membership problem.
Timed automata. The dta membership problem asks, given an nta, whether there exists a dta recognising the same language. There are two natural variants of this problem, which are obtained by restricting the resources available to the sought dta . Let k ∈ N be a bound on the number of clocks, and let m ∈ N be a bound on the maximal absolute value of numerical constants. The dta k and dta k,m membership problems are the restriction of the problem above where the dta is required to have at most k clocks, resp., at most k clocks and the absolute value of maximal constant bounded by m. Notice that we do not bound the number of control locations of the dta, which makes the problem non-trivial. (Indeed, there are finitely many dta with a bounded number of clocks, control locations, and maximal constant.) Since untimed regular languages are deterministic, the dta k membership problem can be seen as a quantitative generalisation of the regularity problem. For instance, the dta 0 membership problem is precisely the regularity problem since a timed automaton with no clocks is the same as a finite automaton. We remark that the regularity problem is usually undecidable for nondeterministic models of computation generalising finite automata, e.g., context-free grammars/pushdown automata [Sha08, Theorem 6.6.6], labelled Petri nets under reachability semantics [VVN81], Parikh automata [CFM11], etc. One way to obtain decidability is to either restrict the input model to be deterministic (e.g., [Val75,VVN81,BLS06]), or to consider more refined notions of equivalence, such as bisimulation (e.g., [GP20]).
This negative situation is generally confirmed for timed automata. For every number of clocks k ∈ N and maximal constant m, the dta, dta k , and dta k,m membership problems are known to be undecidable when the input nta has ≥ 2 clocks, and for 1-clock nta with epsilon transitions [Fin06,Tri06]. To the best of our knowledge, the deterministic membership problem was not studied before when the input automaton is nta 1 without epsilon transitions.
Register automata. The situation for register automata is similar to, and simpler than, timed automata. The dra k membership problem asks, given an nra, whether there exists a dra with k registers recognising the same language, and the dra membership problem is the same problem with no apriori bound on the number of registers of the deterministic acceptor. Deterministic membership problems for register automata do not seem to have been considered before in the literature.
1.3. Contributions. We complete the study of the decidability border for the deterministic membership problem initiated for timed automata in [Fin06,Tri06], and we extend these results to register automata.
Upper bounds. Our main result is the following.
Theorem 1.1. The dta k and dta k,m membership problems are decidable for nta 1 languages.
Our decidability result contrasts starkly with the abundance of undecidability results for the regularity problem. We establish decidability by showing that if a nta 1,m recognises a dta k language, then, in fact, it recognises a dta k,m language and, moreover, there is a computable bound on the number of control locations of the deterministic acceptor (c.f. Lemma 7.1). This provides a decision procedure since there are finitely many different dta once the number of clocks, the maximal constant, and the number of control locations are fixed.
In our technical analysis, we find it convenient to introduce the so-called always resetting subclass of nta k . These automata are required to reset at least one clock at every transition and are thus of expressive power intermediate between nta k−1 and nta k . Always resetting nta 2 are strictly more expressive than nta 1 : For instance, the language of timed words of the form (a, t 0 )(a, t 1 )(a, t 2 ) s.t. t 2 − t 0 > 2 and t 2 − t 1 < 1 can be recognised by an always resetting nta 2 but by no nta 1 . Despite their increased expressive power, always resetting nta 2 still have a decidable universality problem (the well-quasi order approach of [OW04] goes through), which is not the case for nta 2 . Thanks to this restricted form, we are able to provide in Lemma 7.1 an elegant characterisation of those nta 1 languages which are recognised by an always resetting dta k .
We prove a result analogous to Theorem 1.1 in the setting of register automata.
Theorem 1.2. The dra k membership problem is decidable for nra 1 languages.
Thanks to the effective elimination of ε-transition rules from nra 1 (c.f. Lemma 3.3), the decidability result above also holds for data languages presented as nra 1 with ε-transition rules.
Lower bounds. We complement the decidability results above by showing that the deterministic membership problem becomes undecidable if we do not restrict the number of clocks/registers of the deterministic acceptor.
Theorem 1.3. The dta and dta _,m (m > 0) membership problems are undecidable for nta 1 without epsilon transitions.
Theorem 1.3 improves on an analogous result from [Fin06, Theorem 1] for nta 2 . We obtain a similar undecidability result in the setting of register automata: Theorem 1.4. The dra membership problem is undecidable for nra 1 .
Vol. 18:2 DETERMINISABILITY OF REGISTER AND TIMED AUTOMATA * 9:5 The following lower bounds further refine the analysis from [Fin06] in the case of a fixed number of clocks of a deterministic acceptor.
A similar landscape holds for register automata, where the deterministic membership problem for a fixed number of registers of the deterministic acceptor remains undecidable when given in input either a nra 2 or a nra 1 with guessing. (Register automata with guessing are a more expressive family of automata where a register can be updated with a data value not necessarily coming from the input word, i.e., it can be guessed. We omit a formal definition since we will not need to explicitly manipulate such automata in this paper.) In the decidable case of a nra 1 input, the problem is nonetheless not primitive recursive.
Related research. Many works have addressed the construction of a dta equivalent to a given nta (see [BSJK15] and references therein). However, since the general problem is undecidable, one has to either sacrifice termination, or consider deterministic under/overapproximations. In a related line of work, we have shown that the deterministic separability problem is decidable for the full class of nta, when the number of clocks of the separator is given in the input [CLP20b]. This contrasts with the undecidability of the corresponding membership problem. The deterministic separability problem for register automata has not been studied in the literature. Decidability of the deterministic separability problem when the number of clocks/registers of the separator is not provided remains a challenging open problem.

Automorphisms, orbits, and invariance
This section contains preliminary definitions needed both for register and timed automata.
Atoms. Let A be a structure (whose elements are called atoms) providing a data domain on which register and timed automata operate. In the case of register automata, we will primarily be concerned with equality atoms (A, =), where A is a countable set, and the signature contains the equality symbol only. However-as we discuss at the end of Section 7-our positive results generalise to other atoms, for instance to densely ordered atoms (R, ≤), where R is the set of real numbers with the natural order "≤". In the case of timed automata, we will consider timed atoms (R, ≤, +1), which extend densely ordered atoms with the increment function "+1".
Automorphisms. Let S ⊆ A be a (possibly empty) finite set of atoms. An S-automorphism is a bijection π : A → A that is the identity on S, i.e., π(a) = a for every a ∈ S, and which preserves the atom structure. The latter condition is trivially satisfied for equality atoms. In the case of densely ordered atoms, it also demands monotonicity: a ≤ b implies π(a) ≤ π(b). For instance, a non-trivial automorphism of densely ordered atoms is π(a) = 2 · a, which is also a {0}-automorphism since π(0) = 0. In the case of timed atoms automorphisms need to additionally preserve integer differences: π(a + 1) = π(a) + 1, for every a, b ∈ R. For instance, if π(3.4) = 4.5, then the last condition necessarily implies π(5.4) = 6.5 and π(−3.6) = −2.5. When S = ∅, we just say that π is an automorphism. Let Aut S (A) denote the set of all S-automorphisms of A, and let Aut(A) = Aut ∅ (A).
Informally speaking, by sets with atoms we mean sets whose elements are either sets or atoms (for a formal definition of the hierarchy thereof, we refer to [Boj]). If X is a set with atoms, then π(X) is the set with atoms which is obtained by replacing every atom a ∈ A occurring in X by π(a) ∈ A. We present some commonly occurring concrete examples, relying on standard set-theoretic encodings of tuples, functions, etc. Let Σ be a finite alphabet. A data word is a finite sequence w = (σ 0 , a 0 ) · · · (σ n , a n ) ∈ (Σ × A) * (2.1) of pairs (σ i , a i ) consisting of an input symbol σ i ∈ Σ and an atom a i ∈ A. An automorphism π acts on a data word w as above point-wise: π(w) = (σ 0 , π(a 0 )) · · · (σ n , π(a n )). Let X be a finite set of register names and let A ⊥ = A ∪ {⊥}, where ⊥ ∈ A represents an undefined value. A register valuation is a mapping µ : A X ⊥ assigning an atom (or ⊥) µ(x) to every register x ∈ X. An automorphism π acts on a register valuation µ as π(µ)(x) = π(µ(x)) for every x ∈ X, i.e., π(µ) = π • µ, where we assume that π(⊥) = ⊥.
More generally, if X is a set with atoms, then π acts on X pointwise as π(X) = {π(x) | x ∈ X}.
Orbits and invariance. A set with atoms X is S-invariant if π(X) = X for every Sautomorphism π ∈ Aut S (A). Notice that π does not need to be the identity on X for X to be S-invariant. A set X is invariant 2 if it is S-invariant with S = ∅. The S-orbit of an element x ∈ X (which can be an arbitrary object on which the action of automorphisms is defined) is the set orbit S (x) = {π(x) ∈ X | π ∈ Aut S (A)} of all elements π(x) which can be obtained by applying some S-automorphism π to x. The orbit of x is just its S-orbit with S = ∅, written orbit(x). Clearly x, y ∈ X have the same S-orbit orbit S (x) = orbit S (y) if, and only if, π(x) = y for some π ∈ Aut S (A).
The S-orbit closure of a set X (or just S-closure) is the union of the S-orbits of its elements: Cl S (X) = x∈X orbit S (x).
In particular, the S-orbit of x is the S-closure of the singleton set {x}: orbit S (x) = Cl S ({x}).
The ∅-closure Cl(X) we briefly call the closure of X. The following fact characterises invariance in term of closures.
Proof. The "only if" direction follows the definition of S-invariance. For the "if" direction, observe that Cl S (X) = X implies π(X) ⊆ X. The opposite inclusion stems from Sautomorphisms' closure under inverse: π −1 (X) ⊆ X, hence X ⊆ π(X).

Register automata
In this section, we define register automata over equality atoms (A, =). However, all the definitions below can naturally be generalised to any atoms satisfying some mild assumptions, as explained later in Section 4.2.

Constraints.
A constraint is a quantifier-free formula ϕ generated by the grammar where x, y are variables and ⊥ is a special constant denoting an undefined data value. A valuation is a function µ ∈ A X ⊥ assigning a data value (or ⊥) µ(x) to every variable x ∈ X. The satisfaction relation µ |= ϕ holds whenever the valuation µ satisfies the formula ϕ, and it is defined in the standard way. The semantics of a constraint ϕ(x 1 , . . . , x n ) with n free variables X = {x 1 , . . . , x n } is the set of valuations satisfying it: ϕ = {µ ∈ A X ⊥ | µ |= ϕ}. Using [Boj,Lemma 7.5] we easily deduce: Claim 3.1. Subsets of A X ⊥ definable by constraints are exactly the invariant subsets of A X ⊥ .
Register automata. Let Σ be a finite alphabet, and let Σ ε = Σ ∪ {ε} be Σ with the addition of the empty word ε. A (nondeterministic) register automaton (nra) is a tuple A = (X, Σ, L, L I , L F , ∆) where X = {x 1 , . . . , x k } is a finite set of register names, Σ is a finite alphabet, L is a finite set of control locations, of which we distinguish those which are initial L I ⊆ L, resp., final L F ⊆ L, and ∆ is a set of transition rules. We have two kinds of transition rules. A non-ε-transition rule is of the form and it means that from control location p ∈ L we can go to q ∈ L by reading input symbol σ ∈ Σ, provided that the transition constraint ϕ(x 1 , . . . , x k , y) holds between the current registers x 1 , . . . , x k and the input data value y being currently read; finally, all registers in Y ⊆ X are updated to store the input data value y. An ε-transition rule is of the form (p, ε, ϕ, q) ∈ ∆ and it means that from control location p ∈ L we can go to q ∈ L, but no input is read, provided that the transition constraint ϕ(x 1 , . . . , x k ) holds between the current registers x 1 , . . . , x k . Formally, the semantics of a register automaton A as above is provided in terms of an infinite transition system A = (C, C I , C F , →), where C = L×A X ⊥ is the set of configurations, which are pairs (p, µ) consisting of a control location p ∈ L and a register valuation µ ∈ A X ⊥ . Amongst them, C I = L I × {λx · ⊥} ⊆ C is the set of initial configurations, i.e., configurations of the form (p, µ) with p ∈ L I and µ(x) = ⊥ for all registers x, and C F = L F × A X ⊥ is the set of final configurations, i.e., configurations of the form (p, µ) with p ∈ L F (without any further restriction on µ). The set of transitions "→" is determined as follows. For a valuation µ ∈ A X ⊥ , a set of registers Y ⊆ X, and an atom 3 a ∈ A, let µ[Y → a] be the valuation which 3 It suffices to consider non-⊥ values a = ⊥ since we never need to reset a register to the undefined value ⊥. is a on Y and agrees with µ on X \ Y. Every non-ε-transition rule (3.2) induces a transition between configurations labelled by (σ, a) ∈ Σ × A, provided that the current valuation µ satisfies the constraint ϕ when variable y holds the input atom a, i.e., µ[y → a] |= ϕ(x 1 , . . . , x k , y). Similarly, an ε-transition rule (p, ε, ϕ, q) ∈ ∆ induces an ε-labelled transition (p, µ) ε − → (q, µ) whenever µ |= ϕ(x 1 , . . . , x k ). Finally, in order to deal with ε-transitions, we stipulate that whenever . A run of A over a data word w as in (2.1) starting in configuration (p, µ) and ending in configuration (q, ν) is a labelled path ρ in A of the form The run ρ is accepting if its ending configuration is accepting. The language recognised by configuration (p, µ) is the set of data words labelling accepting runs: A has an accepting run over w starting in (p, µ)}.
The language recognised by the automaton A is the union of the languages recognised by its initial configurations, L(A) = c∈C I L(c). A configuration is reachable if it is the ending configuration in a run starting in an initial configuration.
Remark 3.2. Register automata, as defined above, are without guessing, i.e. an automaton can only store in a register an atom appearing in the input.
It turns out that nra with ε-transition rules are as expressive as nra without ε-transition rules.
Lemma 3.3 Excercise 2 in [Boj]. For every k ∈ N and nra k one can effectively build an nra k without ε-transition rules recognising the same language.
For this reason, from this point on, we deal exclusively with nra without ε-transition rules, and we tacitly assume that an nra does not contain ε-transition rules.
Deterministic register automata. A register automaton A is deterministic (dra) if it has precisely one initial location L I = {p I } and, for every two rules (p, σ, ϕ, Y, q) and (p, σ, ϕ , Y , q ) starting in the same location p, over the same input symbol σ and with jointly satisfiable guards ϕ ∧ ϕ = ∅, we necessarily have Y = Y and q = q . Hence A has at most one run over every data word w. A dra can be easily transformed into a total one, i.e., one where for every location p ∈ L and input symbol σ ∈ Σ, the sets defined by the constraints { ϕ | ∃Y, q · p . Thus, a total dra has exactly one run over every timed word w.
There are other syntactical constraints, more or less restrictive, which would guarantee uniqueness of runs. Our choice is motivated by the fact that every nra which has unique runs can be transformed into an equivalent dra, albeit this may cause an exponential increase in the number of control locations. Nonetheless, since we deal with computational problems which are either undecidable or non-primitive recursive, this shall not be a concern in the rest of the paper. We write nra k , resp. dra k , for the class of k-register nra, resp. dra, and we say that a data language is an nra language, dra language, dra k language, etc., if it is recognised by a register automaton of the respective type.
Example 3.4. Let Σ = {σ} be a unary alphabet. As an example of a language L recognised by an nra 1 , but not by any dra, consider the set of data words where the last atom reappears earlier, i.e., words of the form: (σ, a 1 ) · · · (σ, a n ) where a i = a n for some 1 ≤ i < n. The language L is recognised by the nra 1 A = (X, Σ, L, L I , L F , ∆) with one register X = {x} and three locations L = {p, q, r}, of which L I = {p} is initial and L F = {r} is final, and transition rules Intuitively, the automaton waits in p until it guesses that the next input a i will be appearing at the end of the word as well, at which point it moves to q by storing a i in the register. From q, the automaton can accept by going to r exactly when the atom stored in the register reappears in the input. The language L is not recognised by any dra since, intuitively, any deterministic acceptor needs to store unboundedly many different atoms a i .
One-register automata. Nondeterministic register automata with just one register enjoy stronger algorithmic properties than the full class of nondeterministic register automata. It was already observed in Kaminski and Francez's seminal paper that the inclusion problem becomes decidable 4 . We immediately obtain the following corollary, which we will use in Section 4. Invariance of register automata. The following lemma expresses the fundamental invariance properties of register automata. Given a valuation µ of registers X, by µ(X) ⊆ A we mean the set of atoms stored in registers: µ(X) = {µ(x) | x ∈ X, µ(x) ∈ A}. Automorphisms act on configurations by preserving the control location: π(p, µ) = (p, π(µ)) = (p, π • µ).

− − → d in
A and π is an automorphism, then π(c) (2) The function L(_) mapping a configuration c to the language L(c) it recognises from c is invariant: For all automorphisms π, L(π(c)) = π(L(c)).
We refrain from proving Lemma 3.7, since proofs of analogous invariance properties, in the more involved setting of timed automata, are provided later (Facts 6.2-6.4 in Section 6). For the proof of (1) in the setting of equality atoms, we refer the reader to [Boj, Sect.1.1]; the other points are readily derivable from (1).
Deterministic membership problems. Let X be a subclass of nra . We are interested in the following family of decision problems: We study the decidability status of the X membership problem where X ranges over dra and dra k (for every fixed number of registers k). Example 3.4 shows that there are nra languages that cannot be accepted by any dra . Moreover, there is no computable bound for the number of registers k which suffice to recognise a nra 1 language by a dra k (when such a number exists), which follows from the following three observations: (1) the dra membership problem is undecidable for nra 1 (Theorem 1.4), (2) the problem of deciding equivalence of a given nra 1 to a given dra is decidable by Corollary 3.6 and (3) if an nra 1 is equivalent to some dra k then it is in fact equivalent to some dra k with computably many control locations (by Lemma 4.1 from the next section).
4. Decidability of dra k membership for nra 1 In this section we prove our main decidability result for register automata, which we now recall.
Theorem 1.2. The dra k membership problem is decidable for nra 1 languages.
The technical development of this section will also serve as a preparation for the more involved case of timed automata from Sections 5 and 6. The key ingredient used in the proof of Theorem 1.2 is the following characterisation of those nra 1 languages which are also dra k languages. In particular, this characterisation provides a bound on the number of control locations of a dra k equivalent to a given nra 1 (if any exists).
Lemma 4.1. Let A be a nra 1 with n control locations, and let k ∈ N. The following conditions are equivalent: Using the above lemma we derive a proof of Theorem 1.2: Proof of Theorem 1.2. Given a nra 1 A, the decision procedure enumerates all dra k B with at most f (k, n) locations and checks whether L(A) = L(B), using Corollary 3.6. If no such dra k B is found, the procedure answers negatively. Note that the fact that A is nra 1 is crucial here, since otherwise the equivalence check above would not be decidable. In fact, this is the only place where the one register restriction really plays a rôle: A generalisation of Lemma 4.1 for A being a nra l for l ≥ 1 could be stated and proved; however we prefer to Vol. 18:2 DETERMINISABILITY OF REGISTER AND TIMED AUTOMATA * 9:11 avoid the additional notational complications of dealing with the general case since we need Lemma 4.1 only in the case l = 1.
Remark 4.2 (Complexity). The decision procedure for nra 1 invokes the Ackermann subroutine to check equivalence between a nra 1 and a candidate dra . This is in a sense unavoidable, since we show in Theorem 1.6 that the dra k membership problem is Ackermann-hard for nra 1 .
The proof of Lemma 4.1 is presented below in Sec. 4.1. We remark that the lemma partially follows from the literature of automata theory in sets with atoms. For instance, the most interesting implication (2)⇒(3), even for A an arbitrary nra l with l ≥ 1, minus the concrete bound f (k, n) on control locations of B, follows from the following known facts: (a) L(A) is recognised by a nondeterministic equivariant orbit-finite automaton [Boj,Theorem 5.11], (b) the assumption (2) implies that the Myhill-Nerode equivalence of L has orbit-finite index, (c) thus by [Boj,Theorem 5.14] L(A) is recognised by a deterministic orbit-finite automaton B , and (d) we can construct from B some language-equivalent dra k B. However, this would not yield (1) the fact that we can even take k = k (i.e., the number of registers of B can be taken to be the size k of the supports S in the assumption), and (2) the concrete bound f (k, n) on the number of control locations of B (a computable such bound is necessary in the automata enumeration procedure in the proof of Theorem 1.2). For these reasons, we provide a full proof of the lemma. It thus remains to prove the implication (2)⇒(3), which is the content of the rest of the section. Assuming (2), we are going to define a dra k B with registers X = {x 1 , . . . , x k } and with at most f (k, n) locations such that L(B ) = L(A). We start from the transition system X obtained by the finite powerset construction underlying the determinisation of A. Next, after a series of language-preserving transformations, we will obtain a transition system isomorphic to the reachable part of B for some dra k B . As the last step, we extract from this deterministic transition system a syntactic definition of B . This is achievable due to the invariance properties witnessed by the transition systems in the course of the transformation.
Macro-configurations. For simplicity, we will abuse the notation and write c = (p, a) for a configuration c = (p, {x 1 → a}) of A, where p ∈ L and a ∈ A ∪ {⊥}. A macroconfiguration is a (not necessarily finite) set X of configurations (p, a) of A. We use the notation L A (X) := c∈X L A (c).
Let succ σ,a (X) := {c ∈ A | c σ,a − − → c for some c ∈ X} be the set of successors of configurations in X which can be reached by reading (σ, a) ∈ Σ × A. We define a deterministic transition system X consisting of the macro-configurations reachable in the course of determinisation of A. Let X be the smallest set of macro-configurations and transitions such that • X contains the initial macro-configuration: X 0 = {(p, ⊥) | p ∈ L I } ∈ X ; 9:12 L. Clemente, S. Lasota, and R. Piórkowski Vol. 18:2 • X is closed under successor: for every X ∈ X and (σ, a) ∈ Σ × A, there is a transition X σ,a − − → succ σ,a (X) in X . Due to the fact that A is finitely branching, i.e. succ σ,a ({c}) is finite for every fixed (σ, a), all macro-configurations X ∈ X are finite. Let the final configurations of X be For a macro-configuration X we write Val(X) := {a ∈ A | ∃p · (p, a) ∈ X} to denote the set of atoms appearing in X.
Pre-states. By assumption (2), for every macro-configuration X ∈ X , L A (X) is S-invariant for some S of size at most k, but the macro-configuration X itself needs not be S-invariant in general. Indeed, a finite macro-configuration X ∈ X is S-invariant if, and only if, Val(X) ⊆ S, which is impossible in general when X is arbitrarily large while the size of S is bounded (by k). Intuitively, in order to assure S-invariance we will replace X by its S-closure Cl S (X) (recall Fact 2.1).
The least support of a set with atoms X is the least S ⊆ A w.r.t. set inclusion s.t. X is S-invariant. In the case of equality atoms every set with atoms has the least support, which is moreover finite (see [BKL14,Cor. 9.4] or [Boj, Thm. 6.1]). By assumption, the least finite support of every macro-configuration X in X has size at most k.
A pre-state is a pair Y = (X, S), where X is a macro-state whose least finite support is S. Thus X is S-invariant which, together with the fact that S has size at most k, implies that there are only finitely many pre-states up to automorphism. We define the deterministic transition system Y as the smallest set of pre-states and transitions between them such that: where S is the least finite support of the language L = (σ, a) −1 L A (X) = L A (succ σ,a (X)), and X = Cl S (succ σ,a (X)).
Example 4.4. Suppose that k = 3, a successor of some macro-configuration X has the shape succ σ,a 1 (X) = {(p, a 1 ), (q, a 1 ), (r, a 2 ), (s, a 3 )} and the least finite support S of L is By the least finite support property of equality atoms, finite supports are closed under intersection, and hence S ⊆ (S ∪ {a}) ∩ T , which implies |S | ≤ k.
Vol. 18:2 DETERMINISABILITY OF REGISTER AND TIMED AUTOMATA * 9:13 States. We now introduce states, which are designed to be in one-to-one correspondence with configurations of the forthcoming dra k B . Intuitively, a state differs from a pre-state (X, S) only by allocating the values from (some superset of) S into k registers. Thus, while a pre-state contains a set S, the corresponding state contains a register assignment µ : ⊥ is a register assignment, and X is µ(X)-invariant. Thus every state (X, µ) determines uniquely a corresponding pre-state τ (X, µ) = (X, S) where S ⊆ µ(X) is the least finite support of X.
Example 4.7. We continue Example 4.4. States corresponding to the pre-state (X , S ) feature the macro-configuration X , but can have different register valuations. One of them We now define a deterministic transition system Z. Its states are all those (X, µ) satisfying τ (X, µ) ∈ Y, and transitions are determined as follows: Z contains a transition The equation (4.1) defines a deterministic update policy 5 of the register assignment µ that amounts to updating with the current input atom a all registers x i whose value is either no longer needed (because µ(x i ) / ∈ S ), or is shared with some other register x j , for j > i and is thus redundant. It is easy to see that the above register update policy guarantees that S ⊆ µ (X) ⊆ S ∪ {a}. Using Claim 4.5 we derive: and in Z and an automorphism π, if π(X 1 ) = X 2 and π•µ 1 = µ 2 and π(a 1 ) = a 2 , then we have π(X 1 ) = X 2 and π•µ 1 = µ 2 .
Let the initial state be Z 0 = (X 0 , λx.⊥), and let final states be F Z = {(X, µ) ∈ Z | X ∩ F = ∅}. By induction on the length of data words one proves: In the sequel we restrict Z to states reachable from Z 0 .
Orbits of states. Recall that the action of automorphisms on macro-configurations and reset-point assignments is extended to states as π(X, µ) = (π(X), π•µ), and that the orbit of a state Z is defined as orbit While a state is designed to correspond to a configuration of the forthcoming dra k B , its orbit is designed to play the rôle of control location of B . We therefore need to prove that the set of orbits {orbit(Z) | Z ∈ Z} is finite and its size is bounded by f (k, n).
Let M k denote the number of orbits of register valuations A X ⊥ , which is the same as the number of orbits of k-tuples A k ⊥ . In case of equality atoms we have M k ≤ (k + 1)! Indeed, at the first position there are two possibilities, ⊥ or an atom; at the second position there 5 There are in general many correct deterministic update policies, but for our purposes it suffices to define one such deterministic update policy. are at most three possibilities: ⊥, the same atom at the one at the first position, or a fresh atom; and so on, until the last position where there are at most k + 1 possibilities. Every l-element subset S = {a 1 , a 2 , . . . , a l } ⊆ A of atoms induces, in the case of equality atoms, exactly l + 1 different S-orbits of atoms: Therefore, each S ⊆ A of size at most k induces at most N k := k + 1 different S-orbits of atoms.
Consider a state Z = (X, µ) and let S = µ(X). We define the characteristic function char Z : S-orbits → P(L) as follows: Since X is S-invariant, the choice of the atom a ∈ o is irrelevant, and we conclude: Claim 4.10. Every state Z = (X, µ) is uniquely determined by its register valuation µ and by the characteristic function char Z .
Proof. We show that there are at most M k · (2 n ) N k different orbits of states. Consider two states Z = (X, µ) and Z = (X , µ) and let S = µ(X) and S = µ (X). Suppose that the register valuations µ and µ are in the same orbit: π • µ = µ for some automorphism π. Thus π(S) = S , and moreover π induces a bijection π between S-orbits and S -orbits. Note that, once S is fixed, there are at most (2 n ) N k possible characteristic functions of Z, and likewise for S and Z . Supposing further that the characteristic functions agree, i.e., satisfy char Z = char Z • π, using Claim 4.10 we derive π(Z) = Z , i.e., Z and Z are in the same orbit. Therefore, since the number of orbits of register valuations µ, µ is at most M k , and for each such orbit the number of different characteristic functions is at most (2 n ) N k , the number of different orbits of states is bounded as required.
For future use we observe that every state is uniquely determined by its register valuation and its orbit: Claim 4.12. Let Z = (X, µ) and Z = (X , µ) be two states in Z with the same register valuation. If π(X) = X and π•µ = µ for some automorphism π then X = X .
In the terminology of automata in sets with atoms, we have proved that Z is a deterministic orbit-finite automaton (c.f. [Boj,Sec. 5.2] for a definition), with the concrete bound on the number of orbits given by Lemma 4.11.
Construction of the dra. As the last step we define a dra k B = (X, Σ, L , {o 0 }, L F , ∆ ) such that the reachable part of B is isomorphic to Z. Let locations L = {orbit(Z) | Z ∈ Z} be the orbits of states from Z, the initial location be the orbit o 0 of Z 0 , and final locations = a}, and the constraint ψ(x 1 , . . . , x k , y) defines the orbit of (µ(x 1 ), . . . , µ(x k ), a) (here we rely on Claim 3.1). We argue that the automaton B is deterministic: Proof. Since the constraints are jointly satisfiable, both transition rules are enabled in some configuration c = (o, µ) and for some input atom a ∈ A. By Claim 4.12, c determines a corresponding state Z = (X, µ) with o = orbit(Z) and, since the system Z is deterministic, both transition rules are induced by a common transition (X, µ) σ,a − − → (X , µ ) in Z. This in turn implies o 1 = o 2 and Y 1 = Y 2 , as required.
Claim 4.14. Z is isomorphic to the reachable part of B .

4.2.
Other atoms. The proof of Theorem 1.2 straightforwardly generalises to any relational structure of atoms A satisfying the following conditions: • A is homogeneous [Fra53]; • A preserves well-quasi orders (wqo): finite induced substructures of A labelled by elements of an arbitrary wqo, ordered by label-respecting embedding, are again a wqo (for details we refer the reader to [Las16, item (A3), Sect.5]); • A is effective: it is decidable, if a given finite structure over the vocabulary of A is an induced substructure thereof; • A has the least finite support property. As an example, the structure of densely ordered atoms A = (R, ≤) satisfies all the conditions and hence Theorem 1.2 holds for register automata over this structure of atoms.
We briefly discuss the adjustments needed. The syntax of constraints (3.1) is extended by adding atomic constraints for all relations in A, and Claim 3.1 holds by homogeneity of A. The decision procedure checking equivalence of a nra 1 and a dra from Corollary 3.6, invoked in the proof of Theorem 1.2, works assuming that A preserves wqo and is effective. The least finite support assumption is required in the definition of pre-states. Finally, again due to homogeneity of A the bounds M k and N k used in Claim 4.11 are finite (but dependent on A).

Timed automata
The register-based model which is the closest to timed automata is based on timed atoms (R, ≤ , +1) [BL12]. However, due to the syntactic and semantic restrictions which are traditionally imposed on timed automata (such as monotonicity of time, nonnegative timestamps, the 9:16 L. Clemente, S. Lasota, and R. Piórkowski Vol. 18:2 special status of the initial timestamp 0, and the concrete syntax of transition constraints), the latter can be seen only as as a strict subclass of the corresponding register model. For this reason, we present our results on the deterministic membership probem in the syntax and semantics of timed automata.
Timed words and languages. Fix a finite alphabet Σ. Let R and R ≥0 denote the reals, resp., the nonnegative reals 6 . Timed words are obtained by instantiating data words to timed atoms, and imposing additional conditions: non-negativeness and monotonicity: A timed word over Σ is any sequence of the form which is monotonic, in the sense that the timed atoms (called timestamps henceforth) t i 's satisfy 0 ≤ t 1 ≤ t 2 ≤ · · · ≤ t n . For w a timed word as in (5.1) and an increment δ ∈ R ≥0 , let w + δ = (σ 1 , t 1 + δ) . . . (σ n , t n + δ) be the timed word obtained from w by increasing all timestamps by δ. Let T(Σ) be the set of all timed words over Σ, and let T ≥t (Σ) be, for t ∈ R ≥0 , the set of timed words with t 1 ≥ t. A timed language is any subset of T(Σ).
The concatenation w · v of two timed words w and v is defined only when the first timestamp of v is greater or equal than the last timestamp of w. Using this partial operation, we define, for a timed word w ∈ T(Σ) and a timed language L ⊆ T(Σ), the left quotient Clock constraints and regions. Let X = {x 1 , . . . , x k } be a finite set of clocks. A clock valuation is a function µ ∈ R X ≥0 assigning a non-negative real number µ(x) to every clock x ∈ X. A clock constraint is a quantifier-free formula of the form ϕ, ψ :: where "∼" is a comparison operator in {=, <, ≤, >, ≥} and z ∈ Z. A clock valuation µ satisfies a constraint ϕ, written µ |= ϕ, if interpreting each clock x i by µ(x i ) makes ϕ a tautology. Let ϕ be the set of clock valuations µ ∈ R X ≥0 s.t. µ |= ϕ. If ϕ is non-empty and it does not strictly include a non-empty ψ ϕ for some constraint ψ, then we say that it is a region. For example, for X = {x, y} we have that r 0 = 1 < x < 2 ∧ y = 3 is a region, while r 1 = 1 < x ≤ 2 ∧ y = 3 is not. Nonetheless, the latter partitions into two regions r 1 = r 0 ∪ x = 2 ∧ y = 3 , and we will later see that this is a general phenomenon. A k, m-region is a region ϕ where ϕ has k clocks and absolute value of maximal constant bounded by m. For instance, the clock constraint 1 < x 1 < 2 ∧ 4 < x 2 < 5 ∧ x 2 − x 1 < 3 defines a 2, 5-region consisting of an open triangle with nodes (1, 4), (2, 4) and (2, 5). A region ϕ is bounded if it is bounded as a subset of R X ≥0 in the classical sense, i.e., there Timed automata. A (nondeterministic) timed automaton is a tuple A = (X, Σ, L, L I , L F , ∆), where X is a finite set of clocks, Σ is a finite input alphabet, L is a finite set of control locations, L I , L F ⊆ L are the subsets of initial, resp., final, control locations, and ∆ is a finite set of transition rules of the form with p, q ∈ L control locations, σ ∈ Σ, ϕ a clock constraint to be tested, and Y ⊆ X the set of clocks to be reset. We write nta for the class of all nondeterministic timed automata, nta k 6 Equivalently, the rationals Q could be considered in place of reals. when the number k of clocks is fixed, nta _,m when the bound m on constants is fixed, and nta k,m when both k and m are fixed. An nta _,m A is always resetting if every transition rule resets some clock (Y = ∅ in (5.2)), and greedily resetting if, for every clock x, whenever ϕ implies that the value of x belongs to {0, . . . , m} ∪ (m, ∞), then x ∈ Y. Intuitively, a greedily reseting automaton resets every clock whose value is either an integer, or exceeds the maximal constant m.
Reset-point semantics. We introduce a semantics based on reset points instead of clock valuations. A reset-point assignment is a function µ ∈ R X ≥0 storing, for each clock x ∈ X, the timestamp µ(x) when x was last reset. Reset-point assignments and clock valuations have the same type R X ≥0 , however we find it technically more convenient to work with reset points than with clock valuations. The reset-point semantics has already appeared in the literature on timed automata [Fri98] and it is the foundation of the related model of timed-register automata [BL12].
A configuration of an nta A is a tuple (p, µ, t 0 ) consisting of a control location p ∈ L, a reset-point assignment µ ∈ R X ≥0 , and a "now" timestamp t 0 ∈ R ≥0 satisfying µ(x) ≤ t 0 for all clocks x ∈ X. Intuitively, t 0 is the last timestamp seen in the input and, for every clock x, µ(x) stores the timestamp of the last reset of x. A configuration is initial if p is so, t 0 = 0, and µ(x) = 0 for all clocks x, and it is final if p is so (without any further restriction on µ or t 0 ). For a set of clocks Y ⊆ X and a timestamp u ∈ R ≥0 , let µ[Y → u] be the assignment which is u on Y and agrees with µ on X \ Y. A reset-point assignment µ together with t 0 induces the clock valuation t 0 − µ defined as Every transition rule (5.2) induces a transition between configurations where A is the set of configurations, − → ⊆ A × Σ × R ≥0 × A is as defined above, and F ⊆ A is the set of final configurations. Since there is no danger of confusion, we use A to denote either the timed transition system above, or its domain. A run of A over a timed word w as in (5.1) starting in configuration (p, µ, t 0 ) and ending in configuration (q, ν, t n ) is a path ρ in A of the form The run ρ is accepting if its last configuration satisfies (q, ν, t n ) ∈ F . The language recognised by configuration (p, µ, t 0 ) is defined as: L A (p, µ, t 0 ) = {w ∈ T(Σ) | A has an accepting run over w starting in (p, µ, t 0 )}.
A configuration is reachable if it is the ending configuration in a run starting in an initial configuration. In an always resetting nta _,m , every reachable configuration (p, µ, t 0 ) satisfies t 0 ∈ µ(X), where µ(X) = {µ(x) | x ∈ X}; in a greedily resetting one, (1) (p, µ, t 0 ) has m-bounded span, in the sense that µ(X) ⊆ (t 0 − m, t 0 ], and moreover (2) any two clocks x, y with integer difference µ(x) − µ(y) ∈ Z are actually equal µ(x) = µ(y). Condition (2) follows from the fact that if x, y have integer difference and y was reset last, then x was itself an integer when this happened, and in fact they were both reset together in a greedily resetting automaton. Deterministic timed automata. A timed automaton A is deterministic if it has exactly one initial location and, for every two rules (p, σ, ϕ, Y, q), (p, σ , ϕ , Y , q ) ∈ ∆, if σ = σ and the two transition constraints are jointly satisfiable ϕ ∧ ϕ = ∅, then Y = Y and q = q . Hence A has at most one run over every timed word w. A dta can be easily transformed to a total one, where for every location p ∈ L and σ ∈ Σ, the sets defined by clock constraints { ϕ | ∃Y, q · (p, σ, ϕ, Y, q) ∈ ∆} are a partition of R X ≥0 . Thus, a total dta has exactly one run over every timed word w. We write dta for the class of deterministic timed automata, and dta k , dta _,m , and dta k,m for the respective subclasses thereof. A timed language is called nta language, dta language, etc., if it is recognised by a timed automaton of the respective type.
Example 5.1. This is a timed analog of Example 3.4. Let Σ = {σ} be a unary alphabet. As an example of a timed language L recognised by a nta 1 , but not by any dta, consider the set of non-negative timed words of the form (σ, t 1 ) · · · (σ, t n ) where t n − t i = 1 for some 1 ≤ i < n. The language L is recognised by the nta 1 A = (X, Σ, L, L I , L F , ∆) with a single clock X = {x} and three locations L = {p, q, r}, of which L I = {p} is initial and L F = {r} is final, and transition rules Intuitively, in p the automaton waits until it guesses that the next input will be (σ, t i ), at which point it moves to q by resetting the clock. From q, the automaton can accept by going to r only if exactly one time unit elapsed since (σ, t i ) was read. The language L is not recognised by any dta since, intuitively, any deterministic acceptor needs to store unboundedly many timestamps t i 's.
Deterministic membership problems. The decision problems for nta we are interested in are analogous to the ones for nra, but additionally a bound on the maximal constant appearing in a dta may be specified as a parameter. Let X be a subclass of nta . We are interested in the following decision problem.
X membership problem. Input: A timed automaton A ∈ nta . Output: Does there exist a B ∈ X s.t. L(A) = L(B)?
In the rest of the paper, we study the decidability status of the X membership problem where X ranges over dta, dta k (for every fixed number of clocks k), dta _,m (for every maximal constant m), and dta k,m (when both clocks k and maximal constant m are fixed). Example 5.1 shows that there are nta languages which cannot be accepted by any dta . Moreover, similarly as in case of nra, there is no computable bound for the number of clocks k which suffice to recognise a nta 1 language by a dta k (when such a number exists).

Invariance of timed automata
A fundamental tool used below is invariance properties of timed languages recognised by nta with respect to timed automorphisms. In this section we establish these properties, as extension of analogous properties of register automata. We also prove a timed analog of the least support property, and relate regions to orbits of configurations.
Remark 6.1. In considerations about timed automata we restrict to nonnegative reals, while a timed automorphism π can in general take a nonnegative real t ≥ 0 to a negative one. In the sequel whenever we write π(x), for x being any object like a timestamp, a configuration, a timed word, etc., we always implicitly assume that π is well-defined on x, i.e., yields a timestamp, a configuration, a timed word, etc. In other words, for invariance properties we restrict to those timed automorphisms that preserve nonnegativeness of all the involved timestamps.
Let S ⊆ R ≥0 . An S-timed automorphism is a timed automorphism s.t. π(t) = t for all t ∈ S. Let Π S denote the set of all S-timed automorphisms, and let Π = Π ∅ . A set X is S-invariant if π(X) = X for every π ∈ Π S ; equivalently, for every π ∈ Π S , x ∈ X if, and only if π(x) ∈ X. A set X is invariant if it is S-invariant with S = ∅. The following three facts express some basic invariance properties.
Fact 6.2. The timed transition system A is invariant.
By unrolling the definition of invariance in the previous fact, we obtain that the set of configurations is invariant, the set of transitions − → is invariant, and that the set of final configurations F is invariant. Fact 6.3 (Invariance of the language semantics). The function c → L A (c) from A to languages is invariant, i.e., for all timed automorphisms π, L A (π(c)) = π(L A (c)).
The two implications prove the equality.
Fact 6.4 (Invariance of the language of a configuration). The language Proof. This is a direct consequence of the invariance of semantics. Indeed, for every (µ(X) ∪ {t 0 })-timed automorphism π the configurations c = (p, µ, t 0 ) and π(c) = (p, π•µ, π(t 0 )) are equal, hence their languages L A (c) and L A (π(c)), the latter equal to π(L A (c)) by Fact 6.3, are equal too. Thus, L = π(L). Finally, if A is always resetting, then t 0 ∈ µ(X), from which the second claim follows.
Since timed automorphisms preserve integer differences, only the fractional parts of elements of S ⊆ R ≥0 matter for S-invariance, and hence it makes sense to restrict to subsets of the half-open interval [0, 1). Let fract(S) = {fract(x) | x ∈ S} ⊆ [0, 1) stand for the set of fractional parts of elements of S. The following lemma shows that, modulo the irrelevant integer parts, there is always the least set S witnessing S-invariance (c.f. the least support property of, e.g., equality atoms).
Lemma 6.5. For finite subsets S, S ⊆ R ≥0 , if a timed language L is both S-invariant and S -invariant, then it is also S -invariant as long as fract(S ) = fract(S) ∩ fract(S ).
Proof. Let L be an S-and S -invariant timed language, and let F = fract(S) and F = fract(S ). We prove that L is an (F ∩ F )-invariant subset of T(Σ). Consider two timed words w, w ∈ T(Σ) such that w = π(w) for some (F ∩ F )-timed automorphism π. We need to show w ∈ L iff w ∈ L, which follows immediately by the following claim: Claim 6.6. Every (F ∩ F )-timed automorphism π decomposes into π = π n • · · · • π 1 , where each π i is either an F -or an F -timed automorphism.
Composition of timed automorphisms makes Π into a group. In short terms, Claim 6.6 states that Π F ∩F ⊆ Π F + Π F , where Π F + Π F is the smallest subgroup of Π including both Π F and Π F . We state below in Claim 6.8 a fact equivalent to Claim 6.6, and which is based on the proof of Theorem 9.3 in [BKL14]. An important ingredient of the proof of Claim 6.8 is the following fact where, instead of dealing with decomposition of π, we analyse the individual orbit of F \ F , in the special case when both F \ F and F \ F are singleton sets: Claim 6.7. Let F, F ⊆ [0, 1) be finite sets s.t. F \ F = {t} and F \ F = {t }. For every (F ∩ F )-timed automorphism π we have π(t) = (π n • · · · • π 1 )(t), for some π 1 , . . . , π n , each of which is either an F -or an F -timed automorphism (i.e., belongs to Π F + Π F ).
Case F ∩F = ∅. Thus F = {t} and F = {t }. Take any timed automorphism π; without loss of generality assume that π(t) > t. Let z ∈ Z be the unique integer s.t. t + z − 1 < t < t + z. Let π 1 be an arbitrary {t }-timed automorphism that maps t to some t 1 ∈ (t, t +z). Note that t 1 may be any value in (t, t + z). Similarly, let π 2 be an arbitrary {t}-timed automorphism that maps t 1 to some t 2 ∈ (t , t + 1). Again, t 2 may be any value in (t , t + 1). By repeating this process sufficiently many times one finally reaches π(t) as required.
Proof of Claim 6.8. The proof is by induction on the size of the (finite) set F ∪ F . If F ⊆ F or F ⊆ F , then the conclusion follows trivially. Otherwise, consider any t ∈ F \ F and We shall now prove that Π E ⊆ G. To this end, consider any π ∈ Π E . By Claim 6.7, there exists a permutation τ = π n • · · · • π 1 ∈ Π E∪{t} + Π E∪{t } such that π(t) = τ (t). In other words, each of π 1 , . . . , π n is either a (E ∪ {t})-or a (E ∪ {t })timed automorphism. Since Π E∪{t} ⊆ G and Π E∪{t } ⊆ G, all π i ∈ G, hence also τ ∈ G.
It is now easy to show that Π F ∩F ⊆ G. Indeed, |F ∪ E| = |F ∪ F | − 1, so by the inductive assumption for F and E, we have Claim 6.8 immediately implies Claim 6.6 by taking G = Π F + Π F . Lemma 6.5 is thus proved.
As a direct corollary of Lemma 6.5, we have: Corollary 6.9. For every timed language L, the set {fract(S) | S ⊆ fin R ≥0 , L is S-invariant}, if nonempty, has a least (inclusion-wise) element. Finally, recall S-orbits and orbits of elements, as defined abstractly in Section 2. Every bounded region corresponds to an orbit of configurations. Hence, in case of greedily resetting nta where all reachable regions are bounded, orbits of reachable configurations are in bijective correspondence with reachable regions: Fact 6.10. Assume A is a greedily resetting nta k,m . Two reachable configurations (p, µ, t 0 ) and (p, µ , t 0 ) of A with the same control location p have the same orbit if, and only if, the corresponding clock valuations t 0 − µ and t 0 − µ belong to the same k, m-region.
7. Decidability of dta k and dta k,m membership for nta 1 In this section we prove our main decidability result for timed automata, which we now recall.
Theorem 1.1. The dta k and dta k,m membership problems are decidable for nta 1 languages.
Both results are shown using the following key characterisation of those nta 1 languages which are also dta k languages. As in case of register automata, this characterisation provides a bound on the number of control locations of a dta k equivalent to a given nta 1 (if any exists). The proof of Theorem 1.1 builds on Lemma 7.1 and on the following fact: Lemma 7.2. The dta k and dta k,m membership problems are both decidable for dta languages.
Proof. We reduce to a deterministic separability problem. Recall that a language S separates two languages L, M if L ⊆ S and S ∩ M = ∅. It has recently been shown that the dta k and dta k,m separability problems are decidable for nta [CLP20b, Theorem 1.1], and thus, in particular, for dta . To solve the membership problem, given a dta A, the procedure computes a dta A recognising the complement of L(A) and checks whether A and A are dta k separable (resp., dta k,m separable) by using the result above. It is a simple set-theoretic observation that L(A) is a dta k language if, and only if, the languages L(A) and L(A ) are separated by some dta k language, and likewise for dta k,m languages.
Proof of Theorem 1.1. We solve both problems in essentially the same way. Given a nta 1,m A, the decision procedure enumerates all always resetting dta k+1,m B with at most f (k +1, m, n) locations and checks whether L(A) = L(B) (which is decidable by [OW04,Theorem 17]). If no such dta k+1 B is found, the L(A) is not an always resetting dta k+1 language, due to Lemma 7.1, and hence forcedly is not a dta k language either; the procedure therefore answers negatively. Otherwise, in case when such a dta k+1 B is found, then a dta k membership (resp. dta k,m membership) test is performed on B, which is decidable due to Lemma 7.2.
Vol. 18:2 DETERMINISABILITY OF REGISTER AND TIMED AUTOMATA * 9:23 Remark 7.3 (Complexity). The decision procedure for nta 1 invokes the HyperAckermann subroutine of [OW04] to check equivalence between a nta 1 and a candidate dta . This is in a sense unavoidable, since we show in Theorem 1.5 that dta k and dta k,m membership problems are HyperAckermann-hard for nta 1 .
In the rest of this section we present the proof of Lemma 7.1. The proof is a suitable extension and refinement of the argument used in case of register automata in Section 4. 7.1. Proof of Lemma 7.1. Let us fix a nta 1,m A = (Σ, L, {x}, L I , L F , ∆), where m is the greatest constant used in clock constraints in A, and k ∈ N. We assume w.l.o.g. that A is greedily resetting: This is achieved by resetting the clock as soon as upon reading an input symbol its value becomes greater than m or is an integer ≤ m; we can record in the control location the actual integral value if it is ≤ m, or a special flag otherwise. Consequently, after every discrete transition the value of the clock is at most m, and if it is an integer then it equals 0.
The implication 3⇒1 follows by definition. For the implication 1⇒2 suppose, by assumption, L(A) = L(B) for a total always resetting dta k B. Every left quotient w −1 L(A) equals L B (c) for some configuration c, hence Point 2 follows by Fact 6.4. Here we use the fact that B is always resetting in order to apply the second part of Fact 6.4; without the assumption, we would only have S-invariance for sets S of size at most k + 1.
It thus remains to prove the implication 2⇒3, which will be the content of the rest of the section. Assuming Point 2, we are going to define an always resetting dta k,m B with clocks X = {x 1 , . . . , x k } and with at most f (k, m, n) locations such that L(B ) = L(A). We start from the timed transition system X obtained by the finite powerset construction underlying the determinisation of A, and then transform this transition system gradually, while preserving its language, until it finally becomes isomorphic to the reachable part of B for some dta k,m B . As the last step we extract from this deterministic timed transition system a syntactic definition of B and prove equality of their languages. This is achieved thanks to the invariance properties of the transition systems in the course of the transformation.
Macro-configurations. Configurations of the nta 1 A are of the form c = (p, u, t 0 ) where u, t 0 ∈ R ≥0 and u ≤ t 0 . A macro-configuration is a (not necessarily finite) set X of configurations (p, u, t 0 ) of A which share the same value of the current timestamp t 0 , which we denote as now(X) = t 0 . We use the notation L A (X) := c∈X L A (c). Let succ σ,t (X) := {c ∈ A | c σ,t −→ c for some c ∈ X} be the set of successors of configurations in X. We define a deterministic timed transition system X consisting of the macro-configurations reachable in the course of determinisation of A. Let X be the smallest set of macro-configurations and transitions such that • X contains the initial macro-configuration: X 0 = {(p, 0, 0) | p ∈ L I } ∈ X ; • X is closed under successor: for every X ∈ X and (σ, t) ∈ Σ × R ≥0 , there is a transition X σ,t −→ succ a,t (X) in X . Due to the fact that A is finitely branching, i.e. succ σ,t ({c}) is finite for every fixed (σ, t), all macro-configurations X ∈ X are finite. Let the final configurations of X be F X = {X ∈ X | X ∩ F = ∅}.
Claim 7.4. L A (X) = L X (X) for every X ∈ X . In particular L(A) = L X (X 0 ). For a macro-configuration X we write Val(X) := {u | (p, u, now(X)) ∈ X}∪{now(X)} to denote the reals appearing in X. Since A is greedily resetting, every macro-configuration X ∈ X satisfies Val(X) ⊆ (now(X) − m, now(X)]. Whenever a macro-configuration X satisfies this condition we say that the span of X is bounded by m.
Pre-states. By assumption (Point 2), L A (X) is S-invariant for some S of size at most k, but the macro-configuration X itself needs not be S-invariant in general. Indeed, a finite macro-configuration X ∈ X is S-invariant if, and only if, fract(Val(X)) ⊆ fract(S), which is impossible in general when X is arbitrarily large, its span is bounded (by m), and size of S is bounded (by k). Intuitively, in order to assure S-invariance we will replace X by its S-closure Cl S (X) (recall Fact 2.1).
A set S ⊆ R ≥0 is fraction-independent if it contains no two reals with the same fractional part. A pre-state is a pair Y = (X, S), where X is an S-invariant macro-state, and S is a finite fraction-independent subset of Val(X) that contains now(X). The intuitive rationale behind assuming the S-invariance of X is that it implies, together with the bounded span of X and the bounded size of S, that there are only finitely many pre-states, up to timed automorphism. We define the deterministic timed transition system Y as the smallest set of pre-states and transitions between them such that: • Y contains the initial pre-state: • Y is closed under the closure of successor: for every (X, S) ∈ Y and (σ, t) ∈ Σ × R ≥0 , there is a transition (X, S) σ,t −→ (X , S ), where S is the least, with respect to set inclusion, subset of S ∪ {t} containing t such that the language L = (σ, t) −1 L A (X) = L A (succ σ,t (X)) is S -invariant, and X = Cl S (succ σ,t (X)).
Observe that the least such fraction-independent subset S exists due to the following facts: by fraction-independence of S there is a unique fraction-independent subset S ⊆ S ∪ {t} which satisfies fract( S) = fract(S ∪ {t}) ( S is obtained by removing from S any element u such that fract(u) = fract(t), if any); since X is S-invariant, due to Fact 6.3 so it is its language L A (X), and hence L is necessarily S-invariant; by assumption (Point 2), L is R-invariant for some set R ⊆ R ≥0 of size at most k containing t; let T ⊆ [0, 1) be the least set of fractional values given by Corollary 6.9 applied to L , i.e., T ⊆ fract( S) ∩ fract(R); finally let S ⊆ S be chosen so that fract(S ) = T ∪ fract({t}). Due to fraction-independence of S the choice is unique and S is fraction-independent. Furthermore, t ∈ S and the size of S is at most k.
Let the final configurations of Y be F Y = {(X, S) ∈ Y | X ∩ L F = ∅}. By induction on the length of timed words it is easy to show: Due to the assumption that A is greedily resetting and due to Point 2, in every pre-state (X, S) ∈ Y the span of X is bounded by m and the size of S is bounded by k.
States. We now introduce states, which are designed to be in one-to-one correspondence with configurations of the forthcoming dta k B . Intuitively, a state differs from a pre-state (X, S) only by allocating the values from S into k clocks, thus while a pre-state contains a set S, the corresponding state contains a reset-point assignment µ : X → R ≥0 with image µ(X) = S.
Let X = {x 1 , . . . , x k } be a set of k clocks. A state is a pair Z = (X, µ), where X is a macro-configuration, µ : X → Val(X) is a reset-point assignment, µ(X) is a fractionindependent set containing now(X), and X is µ(X)-invariant. Thus every state Z = (X, µ) determines uniquely a corresponding pre-state ρ(Z) = (X, S) with S = µ(X). We define the deterministic timed transition system Z consisting of those states Z s.t. ρ(Z) ∈ Y, and of transitions determined as follows: (X, µ) σ,t −→ (X , µ ) if the corresponding pre-state has a transition (X, S) (7.1) Intuitively, the equation (7.1) defines a deterministic update of the reset-point assignment µ that amounts to resetting (µ (x i ) := t) all clocks x i whose value is either no longer needed (because µ(x i ) / ∈ S ), or is shared with some other clock x j , for j > i and is thus redundant. Due to this disciplined elimination of redundancy, knowing that t ∈ S and the size of S is at most k, we ensure that at least one clock is reset in every step. In consequence, µ (X) = S , and the forthcoming dta k B will be always resetting. Using Claim 7.6 we derive: Claim 7.8 (Invariance of Z). For every two transitions and in Z and a timed permutation π, if π(X 1 ) = X 2 and π•µ 1 = µ 2 and π(t 1 ) = t 2 , then we have π(X 1 ) = X 2 and π•µ 1 = µ 2 .
(Notice that we only consider two transition rules with the same constraint ψ, instead of two different jointly satisfiable constraints ψ, ψ as in the definition of deterministic timed automata, due to the fact that each constraint of B is a single k, m-region.) Proof. We use the invariance of semantics of A and Claim 7.8. Let o = orbit(X 1 , µ 1 ) = orbit(X 2 , µ 2 ). Thus there is a timed automorphism π such that X 2 = π(X 1 ) µ 2 = π•µ 1 . (7.6) It suffices to show that there is a (possibly different) timed permutation π satisfying the following equalities: We now rely the fact that both t 01 = now(X 1 ) ∈ µ 1 (X) and t 02 = now(X 2 ) ∈ µ 2 (X) are assigned to the same clock due to the second equality in (7.6): t 01 = µ 1 (x i ) and t 02 = µ 2 (x i ).
We focus on the case when t 1 − t 01 ≤ m (the other case is similar and easier since all clocks are reset due to greedy resetting), which implies t 2 − t 02 ≤ m due to (7.5). In this case we may assume w.l.o.g., due to (7.5) and the equalities (7.6), that π is chosen so that π(t 1 ) = t 2 . We thus take π = π for proving the equalities (7.7). Being done with the first equality, we observe that the last two equalities in (7.7) hold due to the invariance of Z (c.f. Claim 7.8).
The remaining second equality in (7.7) is a consequence of the third one.
Claim 7.15. Let Z = (X, µ) and Z = (X , µ) be two states in Z with the same reset-point assignment. If π(X) = X and π•µ = µ for some timed automorphism π then X = X .
Claim 7.16. Z is isomorphic to the reachable part of B .
Proof. We essentially repeat the argument of Claim 4.14. For a state Z = (X, µ), let ι(Z) = (o, µ, t), where o = orbit(Z) and t = now(X). Let Z denote the reachable part of B . By Claim 4.12, the mapping ι(_) is a bijection between Z and its image ι(Z) ⊆ B . We aim at proving ι(Z) = Z . By the very definition (4.2), the image ι(Z) is a subsystem of Z . Recall that Z is total: Therefore ι(Z) is total too and, since Z is deterministic and reachable, the subsystem ι(Z) necessarily equals Z .

Undecidability and hardness
In this section we complete the decidability and complexity landscape for the deterministic membership problem by providing matching undecidability and complexity hardness results, both for register and timed automata.
8.1. Lossy counter machines. Our undecidability and hardness results will be obtained by reducing from the finiteness problem for lossy counter machines, which is known to be undecidable. A k-counters lossy counter machine (k-LCM) is a tuple M = (C, Q, q 0 , ∆), where C = {c 1 , . . . , c k } is a set of k counters, Q is a finite set of control locations, q 0 ∈ Q is the initial control location, and ∆ is a finite set of instructions of the form 8.2.1. Undecidability of dra membership for nra 1 . We show that it is undecidable whether a nra 1 language can be recognised by some dra . In the following, it will be useful to be able to refer to projection of a data word on the finite component of the alphabet. To this end, for a data word w = (σ 0 , a 0 ) · · · (σ n , a n ) ∈ (Σ × A) * , let undata(w) = σ 0 · · · σ n ∈ Σ * be the word obtained by removing the atom component. As already announced, we reduce from the finiteness problem for lossy counter machines. Consider a lossy counter machine M = (C, Q, q 0 , ∆) with 4 counters C = {c 1 , c 2 , c 3 , c 4 }. We use the following encoding of LCM runs as data words over the alphabet Σ = Q ∪ ∆ ∪ C comprising the control locations, transitions, and counters of M . (A similar encoding has been used in the proof of Theorem 5.2 in [DL09] to show that the universality problem for nra 1 is not primitive recursive.) We encode a counter valuation u ∈ N C as the word over C ⊆ Σ enc(u) = c 1 c 1 · · · c 1 u(c 1 ) letters The set Enc(π) ⊆ (Σ×A) * of reversal-encodings of π contains all data words w ∈ (Σ×A) * satisfying the following conditions: (E1) the finite part of w is of the form undata(w) = p n δ n enc(u n ) · · · p 1 δ 1 enc(u 1 ) p 0 enc(u 0 ) ∈ Σ * ; (8.2) (E2) all atoms appearing in a single enc(u i ) block are distinct; (E3) for every transition δ i = (p i−1 , op i , p i ) and for every counter c j ∈ {c 1 , c 2 , c 3 , c 4 }: (E3.1) if op i = c j ++ increments counter c j , then (recalling that the lossy semantics amounts to u i (c j ) − 1 ≤ u i−1 (c j )) we require that for each occurrence of c j in enc(u i ) there is a matching occurrence of c j in enc(u i−1 ) with the same atom, with the exception of the last occurrence of c j in enc(u i ); (E3.2) if op i = c j --decrements counter c j , then (recalling that the lossy semantics amounts to u i (c j ) + 1 ≤ u i−1 (c j )) we require that for each occurrence of c j in enc(u i ) there is a matching occurrence of c j in enc(u i−1 ) with the same atom, which is not the last occurrence of c j in enc(u i−1 ).
= 0 tests whether counter c j is zero, then u i−1 (c j ) = u i (c j ) = 0, and thus we require that neither enc(u i ) nor enc(u i−1 ) contain any occurrence of c j ; (E3.4) otherwise the operation op i does not modify counter c j , i.e., u i (c j ) ≤ u i−1 (c j ), and we require that for each occurrence of c j in enc(u i ) there is a matching occurrence of c j in enc(u i−1 ) with the same atom. The intuition underlying the first two items in condition (E3) is that the effect of an increment or decrement of c j is encoded by creating or removing the last occurrence of c j in a block. Let L = π a run of M Enc(π) be the set of all reversal-encodings of runs of M . Under this encoding, we can build a nra 1 A recognising the complement of L. Indeed, A can determine bad encodings w ∈ L by guessing one of finitely many reasons for this to occur: (F1) the projection undata(enc(π)) to the finite alphabet Σ is not a word in the regular language (Q∆{c 1 } * {c 2 } * {c 3 } * {c 4 } * ) * {q 0 } (notice that enc(u 0 ) is the empty string, since the initial valuation u 0 assigns 0 to every counter), or there is a transition δ i = (p, _, q) s.t. either the source is incorrect p = p i−1 or the destination is incorrect q = p i . This is even a regular language of finite words over Σ (i.e., without atoms). Thus in the remaining cases below we can assume that the finite part of w is of the form as in (8.2); (F2) there is a block enc(u i ) containing the same atom twice; (F3) there is a transition δ i = (p i−1 , op i , p i ) and a counter c j ∈ {c 1 , c 2 , c 3 , c 4 } s.t. one of the following condition holds: (F3.1) op = c j ++ but there is a non-last occurrence of c j in enc(u i ) without matching occurrence of c j in enc(u i−1 ) with the same atom; (F3.2) op = c j --but some occurrence of c j in enc(u i ) either has no matching occurrence of c j in enc(u i−1 ) with the same atom, or has a matching occurrence which is the last occurrence of c j in enc(u i−1 ).
= 0 but either enc(u i ) or enc(u i−1 ) contains an occurrence of c j ; (F3.4) the operation op does not modify counter c j , but there is an occurrence of c j in enc(u i ) without a matching occurrence of c j in enc(u i−1 ) with the same atom.
One register is sufficient to recognise each of the possible mistakes above. Proof. The "only if" implication follows from the fact that if Reach(M ) is finite, i.e., there is a finite bound k on the sum of values of all counters of M in a run, then the complement of L(A) (which encodes all correct reversal-encodings) is a dra k language, and thus L(A) itself is a dra language since dra languages are closed under complement. For the "if" implication, assume that Reach(M ) is infinite, and by way of contradiction assume that L(A) is a dra language. In this case, the complement L of L(A) is recognised by some dra k B with a finite number of registers k. Since Reach(M ) is infinite, there are runs where counter (say) c 1 is unbounded. In particular, there is a run π reaching a counter valuation u i with u i (c 1 ) ≥ k + 2. When B reads the corresponding encoding w ∈ Enc(π), after reading the first k + 1 atoms a 1 , . . . , a k+1 in the enc(u i ) block, it must forget at least one such atom, say a j . The next atom a k+2 in the enc(u i ) block can thus be replaced by a j and B still accepts the corresponding data word w . However, w is not the reversal encoding of any run of M , since it violates condition (E2). This contradicts that B recognises L, and thus L(A) is not a dra language, as required.
We thus have a reduction from the LCM finiteness problem to the dra membership problem for nra 1 , which is thus undecidable thanks to Theorem 8.1.
Corollary 8.3. The dra membership problem for nra 1 languages is undecidable.
Vol. 18:2 DETERMINISABILITY OF REGISTER AND TIMED AUTOMATA * 9:31 8.2.2. Undecidability and hardness for dra k membership. The nra universality problem asks whether a given nra A recognises every data word L(A) = (Σ × A) * . All the lower bounds in this section leading to undecidability and hardness results for the dra k membership problem are obtained by a reduction from the universality problem for corresponding classes of data languages.
Lemma 8.4 (c.f. [Fin06, Theorem 1]). Let k ∈ N and let Y be a class of invariant data languages that (1) contains all the dra 0 languages, (2) is closed under union and concatenation, and (3) contains some non-dra k language. The universality problem for data languages in Y reduces in polynomial time to the dra k membership problem for data languages in Y.
Proof. Let L ∈ Y be a data language over a finite alphabet Σ. We show that universality of L reduces to dra k membership. Thanks to the last assumption, let M ∈ Y be a data language over some finite alphabet Γ which is not recognised by any dra k . Consider the following language over the extended alphabet Σ = Σ ∪ Γ ∪ {$}: where $ ∈ Σ ∪ Γ is a fixed fresh alphabet symbol. Since Y contains the universal language, by its closure properties the language N belongs to Y. We conclude by proving the following equivalence: L = (Σ × A) * if, and only if, N is recognised by a dra k .
For the "only if" direction, if L is universal, then N = (Σ × A) * · ({$} × A) · (Σ × A) * is clearly recognised by a dra k . For the "if" direction suppose, towards reaching a contradiction, that N is recognised by a dra k A but L is not universal. Choose an arbitrary data word w ∈ L over Σ and consider an arbitrary extension u = w · ($, a) of w by one letter. Since $ does not belong to the finite alphabet Σ ∪ Γ, the left quotient u −1 N = {v | uv ∈ N } equals M . Let (p, µ) be the configuration reached by A after reading u, which thus recognises L(p, µ) = M . Since M is invariant as a language in Y, M is a dra k language, which is a contradiction.
From Lemma 8.4 we immediately obtain the undecidability and hardness results for the dra k membership problem, which we now recall.
Proof. For the first point, consider the class Y consisting of all the nra 2 languages. Clearly this class contains all dra 0 languages and it is closed under union and concatenation. Thanks to Example 3.4 we know that there are nra 1 (and thus nra 2 ) languages which are not dra languages. Thus the conditions of Lemma 8.4 are satisfied and the universality problem for nra 2 reduces in polynomial time to the dra k membership problem for nra 2 . Since the former problem is undecidable [DL09,Theorem 5.4], undecidability of the latter one follows. For the other two points we can proceed in an analogous way, by using the fact that the universality problem is undecidable for nra g 1 (nra 1 with guessing) [Boj, Exercise 9], and not primitive recursive for nra 1 [DL09, Theorem 5.2].
Since the timed automaton constructed in the reduction above uses only constant 1, the reduction works also for the dta _,m membership problem for every fixed m > 0, thus proving Theorem 1.3. This result is the best possible in terms of the parameter m, since the problem becomes decidable for m = 0. In fact, the class of dta k,0 languages coincides with the class of dta 1,0 languages (one clock is sufficient; c.f. [OW04, Lemma 19]), and thus dta _,0 membership reduces to dta 1,0 membership, which is decidable for nta 1 by Theorem 1.1. 8.3.2. Undecidability and hardness for dta k and dta k,m membership. All the lower bounds in this section are obtained by a reduction from the universality problem for suitable language classes (does a given timed language L ⊆ T(Σ) satisfy L = T(Σ)?), in complete analogy to Section 8.2.2 dealing with register automata. Our starting point is the following result.
We provide a suitable adaptation, generalization, and simplification of the result above which will allow us to extend undecidability to the dta k membership problem for every fixed k ≥ 0, and also to obtain a complexity lower bound for nta 1 input languages. Fix two languages L ⊆ T(Σ) and M ⊆ T(Γ), and a fresh alphabet symbol $ ∈ Σ ∪ Γ. The composition L M is the timed language over Σ = Σ ∪ {$} ∪ Γ defined as follows: where t is necessarily larger or equal than the last timestamp of u by the definition of T(Σ ). The following lemma exposes some abstract conditions on classes of timed languages which are sufficient to encode the universality problem. Lemma 8.7. Let k, m ∈ N and let Y be a class of timed languages that (1) contains all the dta 0 languages, (2) is closed under union and composition, and (3) contains some non-dta k (resp. non-dta k,m ) language. The universality problem for languages in Y reduces in polynomial time to the dta k (resp. dta k,m ) membership problem for languages in Y.
Lemma 8.7 is entirely analogous to Lemma 8.4 for data languages, except that invariance of languages in Y is not required; moreover, notice that the notion of composition of timed languages that we need to state and prove the lemma above is a bit more complicated than the straightforward notion of concatenation that appears in the analogous statement for data languages from Lemma 8.4.
Proof. We consider dta k membership (the dta k,m membership is treated similarly). Consider some fixed timed language M ∈ Y which is not recognised by any dta k (relying on the assumption 3), over an alphabet Γ. For a given timed language L ∈ Y, over an alphabet Σ, we construct the following language over the extended alphabet Σ ∪ Γ ∪ {$}: where $ ∈ Σ ∪ Γ is a fixed fresh alphabet symbol. Since Y contains all the dta 0 languages thanks to the assumption 1, and it is closed under union and composition thanks to the assumption 2, the language N belongs to Y. We claim that the universality problem for L is equivalent to the dta k membership problem for N : L = T(Σ) if, and only if, N is recognised by a dta k .
For the "only if" direction, if L = T(Σ) then clearly N = T(Σ) T(Γ). Thus N is a dta 0 languages, and thus also dta k for any k ≥ 0. For the "if" direction suppose, towards reaching a contradiction, that N is recognised by a dta k A but L = T(Σ). Assume, w.l.o.g., that A is greedily resetting. Choose an arbitrary timed word w = (σ 1 , t 1 ) . . . (σ n , t n ) ∈ L over Σ. Therefore, for any extension v = (σ 1 , t 1 ) . . . (σ n , t n )($, t n + t) of w by one letter, we have Choose t larger than the largest absolute value m of constants appearing in clock constraints in A, and let (p, µ) be the configuration reached by A after reading v. Since t > m, all the clocks are reset by the last transition and hence µ(x) = 0 for all clocks x. Consequently, if the initial control location of A were moved to the location p, the so modified dta k A would accept the language M . But this contradicts our initial assumption that M is not recognised by a dta k , thus finishing the proof.
We can now prove the following refinement of Theorem 8.6 claimed in the introduction.
Proof. Each of the three points follows by an application of Lemma 8.7. For instance, for the first point take as Y the class of languages recognised by nta 2 . This class contains all dta 0 languages, is closed under union and composition, and is not included in dta k for any k nor in dta k,m for any k, m (c.f. the nta 1 language from Example 5.1 which is not recognised by any dta). Since the universality problem is undecidable for nta 2 [AD94, Theorem 5.2], by Lemma 8.7 the dta k and dta k,m membership problems are undecidable for nta 2 . The second and third points follow in the same way, using the fact that universality is undecidable for nta ε 1 (nta 1 with epsilon transitions) [LW08, Theorem 5.3], resp., HyperAckermann-hard for nta 1 (by combining the same lower bound for the reachability problem in lossy channel systems [CS08, Theorem 5.5], together with the reduction from this problem to universality of nta 1 given in [LW08, Theorem 4.1]).

Conclusions
We have shown decidability and undecidability results for several variants of the deterministic membership problem for timed and register automata. Regarding undecidability, we have extended the previously known results [Fin06,Tri06] by proving that the dta membership problem is undecidable already for nta 1 (Theorem 1.3). Regarding decidability, we have shown that when the resources available to the deterministic automaton are fixed (either just the number of clocks k, or both clocks k and maximal constant m), then the respective deterministic membership problem is decidable (Theorem 1.1) and HyperAckermann-hard (Theorem 1.5). We have depicted a similar scenario for register automata, in regards of both decidability (Theorem 1.2), undecidability and hardness (Theorems 1.4 and 1.6). Our deterministic membership algorithm is based on a characterisation of nta 1 languages which happen to be dta k (Lemma 7.1), which is proved using a semantic approach leveraging on notions from the theory of sets with atoms [BL12]. It would be interesting to compare this approach to the syntactic determinisation method of [BBBB09]. Analogous decidability results for register automata have been obtained with similar techniques.
Finally, our decidability results extend to the slightly more expressive class of always resetting nta 2 , which have intermediate expressive power strictly between nta 1 and nta 2 .