OF FINITELY AMBIGUOUS MAX-PLUS TREE AUTOMATA

We show that the finite sequentiality problem is decidable for finitely ambiguous max-plus tree automata. A max-plus tree automaton is a weighted tree automaton over the max-plus semiring. A max-plus tree automaton is called finitely ambiguous if the number of accepting runs on every tree is bounded by a global constant. The finite sequentiality problem asks whether for a given max-plus tree automaton, there exist finitely many deterministic max-plus tree automata whose pointwise maximum is equivalent to the given automaton.


Introduction
A max-plus automaton is a finite automaton whose transitions are weighted by real numbers. A max-plus automaton assigns a weight to each of its runs by adding the weights of the transitions which constitute the run and it assigns a weight to every word by taking the maximum over the weights of all runs on the given word. Max-plus automata are weighted automata [40,39,27,6,13] over the max-plus semiring. In the form of min-plus automata, they were originally introduced by Imre Simon as a means to show the decidability of the finite power property [42,43] and they enjoy a continuing interest [26,19,22,7,12,16,28]. They have found applications in many different contexts, for example to determine the star height of a language [18], to prove the termination of certain string rewriting systems [44], and to model discrete event systems [23]. They also appear in the context of natural language processing [29], where probabilities are often computed in the min-plus semiring as negative log-likelihoods for reasons of numerical stability. Like finite automata, max-plus automata are by definition non-deterministic devices. However, while every finite automaton can be determinized [36], the same is in general not true for max-plus automata [22]. Actually, it is a long-standing open question whether given a max-plus automaton, the existence of an equivalent deterministic automaton can be decided. This problem is commonly known as the sequentiality problem and is one of the most prominent open questions about max-plus automata. For practical applications, the execution of a deterministic automaton is of course much more efficient than the execution of a non-deterministic one, so being able to decide whether a given automaton can be determinized is very much desirable. While open in general, the sequentiality problem has been shown to be decidable for some important subclasses of max-plus automata, namely for unambiguous [29], finitely ambiguous [22], and polynomially ambiguous [21] max-plus automata. Here, we call a max-plus automaton unambiguous if there exists at most one run on every word, finitely ambiguous if the number of runs on each word is bounded by a global constant, and polynomially ambiguous if the number of runs on each word is bounded polynomially in the length of the word. Note that the classes of deterministic, unambiguous, finitely ambiguous, polynomially ambiguous, and arbitrary max-plus automata form a strictly ascending hierarchy [22,20,28]. Also, deciding the degree of ambiguity of a max-plus automaton can easily be reduced to deciding the degree of ambiguity of a finite automaton. It is trivial to decide whether a finite automaton is deterministic. Polynomial time algorithms to decide whether a finite automaton is unambiguous, finitely ambiguous, or polynomially ambiguous can be found in [8,45,41].
While a given max-plus automaton may not be equivalent to a single deterministic maxplus automaton, this does not exclude the possibility that it is equivalent to the pointwise maximum of finitely many deterministic automata. The problem of deciding whether a max-plus automaton possesses such a finitely sequential representation is known as the finite sequentiality problem. The decidability of the finite sequentiality problem was posed as an open question in [19] and has been solved only recently for unambiguous [4] and finitely ambiguous [3] max-plus automata. Note that the class of max-plus automata which possess a finitely sequential representation lies strictly between the classes of deterministic and finitely ambiguous max-plus automata, and it is incomparable to the class of unambiguous max-plus automata [22].
In this paper, we show that the finite sequentiality problem is decidable for finitely ambiguous max-plus tree automata. Operating on trees instead of words, max-plus tree automata are a generalization of max-plus word automata and more generally, they are weighted tree automata [1,5,14,17] over the max-plus semiring. Applications of max-plus tree automata include proving the termination of certain term rewriting systems [24] and they are commonly employed in natural language processing [35] in the form of probabilistic context-free grammars. Our approach to proving the decidability of the finite sequentiality problem for finitely ambiguous max-plus tree automata employs ideas from Bala's proof of the corresponding result for finitely ambiguous max-plus word automata [3]. However, due to lack of space, formal proofs had to be omitted in [3] and Bala's informal description of his methods does not suffice for reconstruction. Also, no other published version of [3] exists. We provide an honest attempt to compare our approach to his but note that our interpretation might not be accurate.
In his proof for max-plus word automata, Bala first introduces the A-Fork property and then proceeds to show that this property is a decidable criterion characterizing the finite sequentiality of a finitely ambiguous max-plus automaton. More precisely, he shows that a finitely ambiguous max-plus automaton possesses a finitely sequential representation if and only if the A-Fork property is not satisfied. To show the decidability of the A-Fork property, he shows its expressibility in a decidable fragment of Presburger arithmetic. To show that an automaton is not finitely sequential if the A-Fork property is satisfied, he uses pumping techniques similar to those employed in [4] for the finite sequentiality problem of unambiguous max-plus word automata. This part of his proof most likely employs Ramsey's Theorem [37] as it involves "colorings of finite hypercubes". His proof for the existence of a finitely sequential representation in case that the A-Fork property is not satisfied employs transducers and the notions of critical pairs and close approximations, none of which occur in our approach. We are thus unsure about the nature of this particular part of the proof, but it most likely uses a reduction to the decidability of the finite sequentiality problem for unambiguous automata.
Our approach is as follows. First, we introduce the separation property, a twofold modification of the A-Fork property. On the one hand, we endow our new property with a criterion accounting for the non-linear structure of trees. This new criterion is inspired by the criterion we added in [34] to the fork property [4], the property characterizing finite sequentiality of unambiguous max-plus word automata, in order to obtain the tree fork property, the property characterizing finite sequentiality of unambiguous max-plus tree automata. On the other hand, we strengthen the A-Fork property as with only the first modification, our new property would wrongly characterize some finitely sequential automata as not being finitely sequential. We then show that the separation property is decidable by employing Parikh's Theorem [31,15] for a reduction to the decidability of the satisfiability of systems of linear inequalities over the rational numbers with integer solutions [30,9]. This means in particular that we show the decidability of the finite sequentiality problem only for automata with weights in the rationals. Then we employ Ramsey's Theorem to show that no finitely sequential representation exists whenever the separation property is satisfied. Due to the criterion accounting for the non-linearity of trees, this is considerably more difficult than in [3] and it is in fact the most technical and the most challenging aspect of our result. Finally, we show that if the separation property is not satisfied for a given max-plus tree automaton, then we can construct finitely many unambiguous max-plus tree automata which all do not satisfy the tree fork property and whose pointwise maximum is equivalent to the automaton. By [34], these unambiguous automata then possess finitely sequential representations. Combining these, we obtain a finitely sequential representation of the original automaton.

Preliminaries
For a set X, we denote the power set of X by P(X) and the cardinality of X by |X|. For two sets X and Y and a mapping f : X → Y , we call X the domain of f , denoted by dom(f ). For a subset X ⊆ X, we call the set f (X ) = {y ∈ Y | ∃x ∈ X : f (x) = y} the image or range of X under f . The restriction of f to X , denoted by f X , is the mapping for every x ∈ X . For an element y ∈ Y , we call the set f −1 (y) = {x ∈ X | f (x) = y} the preimage of y under f . For a second mapping g : X → Y , we write f = g if for all x ∈ X we have f (x) = g(x). We let N = {0, 1, 2, . . .}. By N * we denote the set of all finite words over N. The empty word is denoted by ε, and the length of a word w ∈ N * by |w|. The set N * is partially ordered by the prefix relation ≤ p and totally ordered with respect to the lexicographic ordering ≤ l . Two words from N * are called prefix-dependent if they are in prefix relation, and otherwise they are called prefix-independent.
A ranked alphabet is a pair (Γ, rk Γ ), often abbreviated by Γ, where Γ is a finite set and rk Γ : Γ → N a mapping which assigns a rank to every symbol. For every m ≥ 0 we define Γ (m) = rk −1 Γ (m) as the set of all symbols of rank m. The rank of Γ is defined as rk(Γ) = max{rk Γ (a) | a ∈ Γ}. The set of (finite, labeled, and ordered) Γ-trees, denoted by T Γ , is the set of all pairs t = (pos(t), label t ), where pos(t) ⊂ N * is a finite non-empty prefix-closed set of positions, label t : pos(t) → Γ is a mapping, and for every w ∈ pos(t) we have wi ∈ pos(t) iff 1 ≤ i ≤ rk Γ (label t (w)). We write t(w) for label t (w) and |t| for |pos(t)|. We also refer to the elements of pos(t) as nodes, to ε as the root of t, and to prefix-maximal nodes as leaves. The height of t is defined as height(t) = max w∈pos(t) |w|. For a leaf w ∈ pos(t), the set {v ∈ pos(t) | v ≤ p w} is called a branch of t. Now let s, t ∈ T Γ and w ∈ pos(t). The subtree of t at w, denoted by t w , is a Γ-tree defined as follows. We let pos(t w ) = {v ∈ N * | wv ∈ pos(t)} and for v ∈ pos(t w ), we let label t w (v) = t(wv). The substitution of s into w of t, denoted by t s → w , is a Γ-tree defined as follows. We let pos(t s → w ) = (pos(t) \ {v ∈ pos(t) | w ≤ p v}) ∪ {wv | v ∈ pos(s)}. For v ∈ pos(t s → w ), we let label t s→w (v) = s(u) if v = wu for some u ∈ pos(s), and otherwise label t s→w (v) = t(v). For a ∈ Γ (m) and trees t 1 , . . . , t m ∈ T Γ , we also write a(t 1 , . . . , t m ) to denote the tree t with pos(t) = {ε} ∪ {iw | i ∈ {1, . . . , m}, w ∈ pos(t i )}, label t (ε) = a, and label t (iw) = t i (w). For a ∈ Γ (0) , the tree a() is abbreviated by a.
Let (K, ⊕, , 0, 1) be a commutative semiring. A weighted bottom-up finite state tree automaton (short: WTA) over K and Γ is a tuple A = (Q, Γ, µ, ν) where Q is a finite set (of states), Γ is a ranked alphabet (of input symbols), µ : the function of transition weights), and ν : Q → K (the function of final weights). We define We call a WTA over the max-plus semiring a max-plus-WTA and a WTA over the Boolean semiring a finite tree automaton (FTA). We also write a WTA A = (Q, Γ, µ, ν) over B as a For a tree t ∈ T Γ , a mapping r : pos(t) → Q is called a quasi-run of A on t. For a quasi-run r on t and a position w ∈ pos(t) with t(w) = a ∈ Γ (m) , the tuple t(t, r, w) = (r(w1), . . . , r(wm), a, r(w)) is called the transition at w. The quasi-run r is called a (valid) run if for every w ∈ pos(t) the transition t(t, r, w) is valid with respect to A. We call a run r accepting if r(ε) is final. By Run A (t) and Acc A (t) we denote the sets of all runs and all accepting runs of A on t, respectively. For a state q ∈ Q, we denote by Run A (t, q) the set of all runs r ∈ Run A (t) such that r(ε) = q. For a run r ∈ Run A (t), the weight of r is defined by wt A (t, r) = w∈pos(t) µ(t(t, r, w)). The behavior of A, denoted by A , is the mapping defined for every t ∈ T Γ by A (t) = r∈Acc A (t) (wt A (t, r) ν(r(ε))), where the sum over the empty set is 0 by convention. The support of a WTA A is the set supp(A) = {t ∈ T Γ | A (t) = 0}. The support of an FTA A is also called the language accepted by A and denoted by L(A). A subset L ⊆ T Γ is called recognizable if there exists an FTA A with L = L(A).

137:5
For a WTA A = (Q, Γ, µ, ν), a run of A on a Γ-context t is a run of the WTA A = (Q, Γ , µ , ν) on t, where µ ( , q) = 1 for all q ∈ Q and µ (d) = µ(d) for all d ∈ ∆ A . We denote Run A (t) = Run A (t) and for r ∈ Run A (t) write wt A (t, r) = wt A (t, r). For an n-Γ-context t ∈ T Γ and states q 0 , . . . , q n , we denote by Run A (q 1 , . . . , q n , t, q 0 ) the set of all runs r ∈ Run A (t) such that r(ε) = q 0 and r(♦ i (t)) = q i for every i ∈ {1, . . . , n}.
We consider the set Γ × Q as an alphabet by defining rk Γ×Q (a, q) = rk Γ (a) for every pair (a, q) ∈ Γ × Q and identify every tree t ∈ T Γ×Q with the pair (t, r) given by t = (pos(t ), π Γ • label t ) ∈ T Γ and r = π Q • label t , where π Γ : Γ × Q → Γ and π Q : Γ × Q → Q are the projections. For a Γ-word s ∈ T Γ , a state q ∈ Q, and a run r s ∈ Run A (q, s, q), we define (s, r s ) 0 = ( , q) and (s, We call a WTA A = (Q, Γ, µ, ν) over K and Γ trim if for every p ∈ Q, there exist t ∈ T Γ , r ∈ Acc A (t), and w ∈ pos(t) with r(w) = p. The trim part of A is the automaton obtained from A by removing all states p ∈ Q for which no such t, r, and w exist. This process obviously has no influence on A . We call A complete if for every m ≥ 0, a ∈ Γ (m) , and The Criterion for Finite Sequentiality We will show that for a finitely ambiguous max-plus-WTA A, it is decidable whether its behavior A is finitely sequential. For this, we first formulate the separation property, a generalization of Bala's A-Fork property [3]. Then we show that it is decidable whether the separation property is satisfied and that the behavior of a max-plus-WTA is finitely sequential if and only if the separation property is not satisfied. In the following, let Γ be a ranked alphabet. We begin by recalling the tree fork property and the related concepts of rivals, reachers, distinguishers, and forks. Intuitively, two states of a finitely ambiguous max-plus-WTA A are called rivals if they can be reached by the same tree u and they can loop in the same Γ-word s but the weights of these loops differ. The tree u is then called a reacher of p and q and the Γ-word s a distinguisher for p and q. For two rivals p and q, a Γ-word f is called a p-q-fork if f can both loop in p and also go from p to q, in a bottom-up sense. We say that A satisfies the tree fork property if there exist two rivals p and q such that either there exists a p-q-fork or p and q can occur at prefix-independent positions in some run of A. Formally, these definitions are as follows.
be a finitely ambiguous max-plus-WTA. Two states p, q ∈ Q are called rivals if there exists a tree u ∈ T Γ with Run A (u, p) = ∅ and Run A (u, q) = ∅ and a Γ-word s with runs r p ∈ Run A (p, s, p) and r q ∈ Run A (q, s, q) such that wt A (s, r p ) = wt A (s, r q ). In this case, we call u a p-q-reacher and s a p-q-distinguisher. We say that A satisfies the tree fork property if at least one of the following two conditions is satisfied.
(i) There exist rivals p, q ∈ Q and a Γ-word f with Run A (p, f, p) = ∅ and Run A (p, f, q) = ∅.
In this case, we call f a p-q-fork. (ii) There exist rivals p, q ∈ Q, a 2-Γ-context t ∈ T Γ , and a run r ∈ Run A (t) with r(♦ 1 (t)) = p and r(♦ 2 (t)) = q. In this case, we call t a p-q-split.
I C A L P 2 0 2 0

137:6 Finite Sequentiality of Finitely Ambiguous Max-Plus Tree Automata
We have the following theorem relating the tree fork property to finite sequentiality of unambiguous max-plus-WTA.

Theorem 2 ([34]). The behavior of a trim unambiguous max-plus-WTA
A is finitely sequential if and only if A does not satisfy the tree fork property. If A is finitely sequential, a finitely sequential representation of A can be effectively constructed.
For finitely ambiguous max-plus-WTA, however, the tree fork property does not capture finite sequentiality. To see why, consider an unambiguous max-plus-WTA A satisfying the tree fork property [34,4,22] and let L be the largest weight used in A. Then construct a one-state max-plus-WTA B whose every transition weight and every final weight is L. Clearly, B is deterministic and we have B ≥ A . By taking the disjoint union A ∪ B of A and B, we obtain a 2-ambiguous max-plus-WTA which satisfies the tree fork property but whose behavior coincides with that of the deterministic automaton B. In this particular example, the states relevant for the tree fork property to be satisfied are not relevant at all for the behavior of the automaton.
For the rest of this paper, let A be a trim finitely ambiguous max-plus-WTA over the ranked alphabet Γ. In order to reduce the finite sequentiality problem of finitely ambiguous max-plus-WTA to that of unambiguous max-plus-WTA, we decompose A into a maximum of finitely many unambiguous max-plus-WTA A 1 , . . . , A N and then analyze the interplay of these latter automata. We can do so as in fact, every finitely ambiguous WTA can be decomposed into finitely many unambiguous WTA [22,32]. This is a common approach when dealing with finite ambiguity [22,25,33] and is also used by Bala in the corresponding proof for words [3]. In the simplest case, if A 1 , . . . , A N all do not satisfy the tree fork property, we find a finitely sequential representation of A by constructing such a representation for each A n and then combining all of these. However, if some A n does satisfy the tree fork property, we have to analyze whether this automaton contributes enough to the behavior of A for there not to exist a finitely sequential representation of A. For an easier analysis of the automata A 1 , . . . , A N , we normalize their final weights and consider their product as follows. Let U be the automaton we obtain for A from Lemma 3. For a tree t ∈ T Γ , a Γ-word s ∈ T Γ , runs r t ∈ Run U (t), r s ∈ Run U (s), states p, q ∈ Q, and a coordinate i ∈ {1, . . . , M }, we let wt i (t, r t ) = π i (wt U (t, r t )), wt i (s, r s ) = π i (wt U (s, r s )), and wt i (p, s, q) = wt i (s, r q p ) for the unique run r q p ∈ Run U (p, s, q). We define the concepts of rivals, reachers, distinguishers, and forks for U as follows.

Definition 4.
Let i ∈ {1, . . . , M }, p, q ∈ Q, t ∈ T Γ , and r ∈ Acc U (t). We call p and q i-rivals if there exists a tree u ∈ T Γ such that Run U (u, p) = ∅ and Run U (u, q) = ∅ and a Γ-word s such that Run U (p, s, p) = ∅, Run U (q, s, q) = ∅, and wt i (p, s, p) = wt i (q, s, q). In this case, we also call u a p-q-reacher and s an i-p-qdistinguisher.
We call a Γ-word f an i-p-q-fork if p and q are i-rivals, Run U (p, f, p) = ∅, and Run U (p, f, q) = ∅.
We say that (t, r) is i-p-q-fork-broken if there exist positions w p , w q ∈ pos(t) such that w q < p w p , r(w p ) = p, r(w q ) = q, and (t → w p ) wq is an i-p-q-fork. We say that (t, r) is i-p-q-split-broken if p and q are i-rivals and there exist two prefixindependent positions w p , w q ∈ pos(t) with r(w p ) = p and r(w q ) = q. When appropriate, we may drop some of the hyphenated modifiers from the terms above; for example, we will refer to (t, r) as i-fork-broken if there exist states p, q ∈ Q such that (t, r) is i-p-q-fork-broken and as i-split-broken if there exist states p, q ∈ Q such that (t, r) is i-p-q-split-broken. We call (t, r) i-broken if it is i-fork-broken or i-split-broken.
Our concept of brokenness, is inspired by Bala's notion of "broken paths" [3]. Of course, as his proof is concerned with words, the concept of split-brokenness does not exist. His notion of brokenness corresponds to our notion of fork-brokenness. Employing the notion of brokenness, Bala characterizes finite sequentiality of finitely ambiguous max-plus word automata using the A-Fork property. Translated to tree automata, the A-Fork property is defined as follows. We say that U satisfies the A-Fork property if for every constant C > 0, there exists a tree t ∈ T Γ and an accepting run r ∈ Acc U (t) such that for some weightmaximal coordinate i, i.e., with wt i (t, r) = max M j=1 wt j (t, r), we have that (t, r) is i-broken and for every coordinate j such that (t, r) is not j-broken, we have wt j (t, r) < wt i (t, r) − C. In other words, the A-Fork property is satisfied if broken coordinates are able to dominate non-broken coordinates by an arbitrarily large margin. Bala shows that a finitely ambiguous max-plus word automaton is finitely sequential if and only if the corresponding automaton U does not satisfy the A-Fork property. For tree automata, however, this criterion does not capture finite sequentiality. More precisely, if we know that there do not exist a tree t and a run r on t such that (t, r) is split-broken, then the A-Fork property does capture finite sequentiality also for tree automata. However, if U satisfies the A-Fork property due to split-broken coordinates dominating non-broken coordinates, the behavior of A may still be finitely sequential. This is evidenced by the following example.

Example 5.
Consider the scenario for U as defined in Figure 1. The support of U consists of all trees of the form c(b k (a m i (d i )), b l (a n j (d j ))) with i, j ∈ {1, 2}, k, l > 0, and m, n ≥ 0. A valid run on such a tree necessarily assigns states from {p 1 , p 2 , p} to the left branch of the tree and states from {q 1 , q 2 , q} to the right branch of the tree. Moreover, if a branch begins with a letter d i , this branch is assigned states from {p i , q i , p, q}. In particular, we see that U is unambiguous. The states p and q are 2-rivals as we see from the p-q-reacher u = b(a 1 (d 1 )) and the 2-p-q-distinguisher s = b( ). By considering the trees t n = c(b(a n 1 (d 1 )), b(a n 2 (d 2 ))), we see that runs exist where p and q occur prefix-independently and the weight of coordinate 2 is arbitrarily larger than the weights of coordinates 1 and 3 since we have U (t n ) = (−n, 0, −n). However, in t n the subtrees below p and q are distinct, thus a deterministic automaton can distinguish between them.
In fact, if U is given this way, we can construct a finitely sequential representation of A as follows. All trees of the form c(b k (a m 1 (d 1 )), b l (a n 1 (d 1 ))) are assigned the weight (−m − n + k + l − 2, k − l, k + l − 2), so coordinate 3 is always dominant. Similarly, coordinate 1 is dominant for trees of the form c(b k (a m 2 (d 2 )), b l (a n 2 (d 2 ))). These trees can be handled by the deterministic max-plus-WTA obtained from U by removing the states q 1 and q 2 , letting µ(p, p, c, ) = (0, 0, 0), and replacing µ with π 1 • µ and π 3 • µ, respectively. For trees of the form c(b k (a m 1 (d 1 )), b l (a n 2 (d 2 ))), we remove the states p 2 and q 1 from U and then construct three deterministic max-plus-WTA by replacing µ by π 1 • µ, π 2 • µ, and π 3 • µ, respectively. For the trees c(b k (a m 2 (d 2 )), b l (a n 1 (d 1 ))) we can proceed similarly. The pointwise maximum of the automata constructed this way is then equivalent to A . This example shows in particular that if U satisfies the A-Fork property, A can still be finitely sequential. Our fundamental idea to adapt the A-Fork property to tree automata is to formulate our version not for U but for a covering of U. Oversimplifying, a covering of an automaton is a new automaton obtained by enhancing the states of the original automaton with additional capacities to store information. A prominent example of a covering construction is the Schützenberger covering of an automaton. The Schützenberger covering in particular has already been employed in a number of decidability results for max-plus automata [22,4,3,33,34]. For more background on coverings, see [38].
Here, we construct from U an unambiguous automaton U with the same behavior as U and whose states are tuples from Q × P(Q) × P(Q 4 × P(Q 2 )). Every run r of U on a tree t ∈ T Γ will correspond uniquely to a run of U on t, given by projecting to the first entry. For a position w, the second entry of r(w) will be the set of all states q ∈ Q which can be reached by t w , i.e., for which Run U (t w , q) is non-empty. The third entry of r(w) will contain a tuple (p, q, p , q , Y ) if and only if t w can reach p and q with two runs r p and r q , these runs visited p and q simultaneously at some position v in the past, and Y consists of all pairs of states which these runs visited simultaneously up to v. More precisely, the third entry of r(w) will consist of all tuples (p, q, p , q , Y ) such that (1) there exist runs r p ∈ Run U (t w , p) and r q ∈ Run U (t w , q), (2) for some position below w, i.e., some position v ∈ pos(t w ), we have r p (v) = p and r q (v) = q , and (3) Y is the set of all pairs of states (r p (vu), r q (vu)) with u ∈ pos(t wv ). Our intention of considering the covering U is to increase the knowledge we have about each pair of rivals. For two rivals of U, all we know is what the definition of rivals specifies. For two rivals of U on the other hand, we can show that they are necessarily of the form (p, P, V ) and (q, P, V ) where p and q are rivals of U. This allows us to infer statements about the rivals of U which are not necessarily true for the rivals of U. The precise construction of U is as follows.
Finally, we introduce our version of the A-Fork property. To allow for easier proofs, we use a different formulation and consequently a different name. But in fact, U satisfies the separation property if and only if it satisfies the A-Fork property in the way we translated it to trees earlier.
In this case, we also say that (t, r) is I-C-separated. We call I separable if it is C-separable for every C ∈ N and define I as the set of all separable subsets I ⊆ {1, . . . , M }. If I is non-empty, we say that U satisfies the separation property or, for short, that U is broken.
Our main result is to prove the following theorem relating the separation property to the finite sequentiality problem of finitely ambiguous max-plus-WTA.

Theorem 8. The behavior A of A is finitely sequential if and only if U is not broken. Moreover, it is decidable whether U is broken. In particular, it is decidable whether A is finitely sequential.
We separate the proof of Theorem 8 into three parts. Due to lack of space, we have to restrict ourselves to brief descriptions of our methods. In Section 3.1, we outline that it is decidable whether U is broken. This part of the proof does not follow any idea from [3] as in his proof, Bala reduces the decidability of the A-Fork property to the decidability of a decidable fragment of Presburger arithmetic. In Section 3.2, we show that if U is broken, then A is not finitely sequential. This part of the proof employs ideas from [4,3,34], but extends these non-trivially. This particular proof is the most challenging and technical aspect of our result. Finally, in Section 3.3, we outline how to construct finitely many deterministic max-plus-WTA whose pointwise maximum is equivalent to A in case that U is not broken. Although this part is inspired by an idea in [3], we are not sure whether we employ this idea in the same way.
For all of our proofs, it is crucial that for every two states of U , we can decide whether they are rivals [2, Section 4], [11,Section 5.4]. For two rivals of an unambiguous automaton, it is in fact quite easy to give an upper bound on the size of their smallest distinguisher and smallest reacher. Thus, deciding whether two states are rivals reduces to checking for finitely many trees whether they can reach both states and checking for finitely many Γ-words whether they are a distinguisher for these two states. For Section 3.3, we require an even more precise statement, namely that if s is a distinguisher for two rivals p and q, then we can obtain a p-q-distinguisher of height at most 4|Q| 2 by removing loops from the unique runs looping in p and q. For this, we employ the notion of a truncation. Simply put, for a Γ- word s and a run r on s, a truncation of (s, r) is any pair (s , r ) of a Γ-word s and a run r on s which can be obtained by repeatedly cutting loops from (s, r).
We can use truncations to bound the size of distinguishers as follows.
Lemma 10 ([11, Lemma 5.10], [34]). Let p, q ∈ Q be i-rivals for some i ∈ {1, . . . , M }, let u ∈ T Γ be a p-q-reacher, let f ∈ T Γ be a p-q-fork, let s ∈ T Γ be an i-p-q-distinguisher, and let r p ∈ Run U (p, s, p) and r q ∈ Run U (q, s, q). Then there exists a p-q-reacher u with height(u ) ≤ |Q| 2 , a p-q-fork f with height(f ) ≤ 2|Q| 2 , and an i-p-q-distinguisher s with height(s ) ≤ 4|Q| 2 such that for the runs r p ∈ Run U (p, s , p) and r q ∈ Run U (q, s , q), (s , r p ) is a truncation of (s, r p ) and (s , r q ) is a truncation of (s, r q ). In particular, for every two states p, q ∈ Q, it is decidable whether p and q are rivals.

Decidability
In order to show that it is decidable whether U is broken, we construct a coveringŪ of U with the capability to detect the broken coordinates of a run of U . The coveringŪ possesses the same behavior as U and each run ofŪ corresponds to exactly one run of U . We constructŪ by adding to each state of Q one entry containing all states reachable on the current subtree, one entry containing all states visited on the current run, one entry containing all pairs (p, q) of states such that q is reachable by a run which visited p at a position where our current run also visited p, and one entry containing a record of all broken coordinates. This allows us to infer the brokenness of a run directly from the state at its root. More precisely, we construct U = (Q, Γ,μ,ν) with states fromQ = Q × P(Q) × P(Q) × P(Q 2 ) × {0, 1} M such that if t ∈ T Γ ,r ∈ RunŪ (t), w ∈ pos(t), andr(w) = (q, P, V, W,ā), then the following statements hold. We have (1) the projection π Q :Q → Q to the first coordinate induces a bijection π Q : AccŪ (t) → Acc U (t) preserving weights of runs, (2) P = {p ∈ Q | Run U (t w , p) = ∅}, We let d 1 , . . . , d D be an enumeration of ∆Ū and for a tree t ∈ T Γ and a runr ∈ RunŪ (t), define the transition Parikh vector of (t,r) by p(t,r) = (|{w ∈ pos(t) | t(t,r, w) = d 1 }|, . . . , |{w ∈ pos(t) | t(t,r, w) = d D }|), i.e., we count the number of occurrences of each transition in (t,r). We can employ Parikh's Theorem [31,15] to show that the set p(Ū) = {p(t, r) | t ∈ T Γ , r ∈ AccŪ (t)} is semilinear, i.e., that there exist integers k, k 1 , . . . , k k , vectors α (l) ∈ N D , and matrices β (l) ∈ N D×k l (l ∈ {1, . . . , k}) with p(Ū) = k l=1 {α (l) +β (l)X | X = (X 1 , . . . , X k l ) ∈ N k l }. We note that Parikh's Theorem is effective, so we can effectively compute all of these integers, vectors, and matrices.
Next (q 1 , . . . ,q m ,ā, (q, P, V, W,ā)) ∈ ∆Ū such thatā[i] = 1 ↔ i ∈ I} be the set of all indices of transitions whose root state indicates brokenness of exactly the coordinates in I. Furthermore, for every l ∈ {1, . . . , D} we let α (l) [1], . . . , α (l) [D] be the entries of α (l) and β (l) [1], . . . , β (l) [D] be the rows of β (l) . It is then elementary to show that every set I ⊆ {1, . . . , M } is separable iff it isC-separable iff for some l ∈ {1, . . . , M }, the system of linear inequalities below possesses an integer solution. The satisfiability of systems of linear inequalities over the rationals with integer solutions is decidable [30] [9,Theorem 3.4]. There are only finitely many such systems to consider, so it is decidable whether I is separable. To decide whether U is broken, it suffices to check whether there exists a separable subset I ⊆ {1, . . . , M }.

Necessity
To show that A is not finitely sequential if U is broken, we assume that A can be represented as a finite maximum of deterministic max-plus-WTA A 1 , . . . , A N and employ Ramsey's Theorem [37] to obtain a contradiction. Although not stated explicitly, Bala's proof for words [3] most likely also involves some form of Ramsey's Theorem as his proof of U being broken implying A to not be finitely sequential "deals with colorings of finite hypercubes". In our proof for tree automata, we are able to handle fork-brokenness without employing Ramsey's Theorem. This suggest that applying our approach to word automata yields a proof which is simpler than the corresponding one used in [3]. The reason for this is that our separation property considers sets of coordinates instead of the single coordinates which the A-Fork property considers. For the separable sets I ∈ I which are minimal with respect to set inclusion, we are able to prove a statement for I-C-separated pairs (t, r) which greatly facilitates dealing with fork-brokenness and enables us to deal with split-brokenness in the first place. Namely, if (t, r) is I-C-separated for a sufficiently large C and no subset of I is separable, then for every p ∈ r(pos(t)), every Γ-word s with height(s) ≤ 4|Q| 2 and Run U (p, s, p) = ∅, and every two coordinates i, j ∈ I we have wt i (p, s, p) = wt j (p, s, p).
For the proof, we choose a sufficiently large C, a set I ∈ I which is minimal with respect to set inclusion, and an I-C-separated pair (t, r). Then we construct from (t, r) new trees which require more than N deterministic max-plus-WTA in order to be assigned the correct weight. If (t, r) is fork-broken, we construct trees and runs of U with increasingly more alterations of forks and distinguishers. This approach is similar to the method used in [4] and [34] to deal with fork-brokenness. The challenge we face in adapting the proof from [34] to our situation is that we have to ensure that in the runs we construct, the coordinates from I dominate the other coordinates. In our constructions we may therefore only make "small" modifications to (t, r). Our solution relies on the minimality of I and involves constructing more than the N + 1 trees sufficient for the proofs in [4,34]. The case where (t, r) is split-broken is much more complicated and is in fact the only reason we have to use the covering automaton U instead of U. As split-brokenness does not apply to words, this was not an issue in [3]. Our approach vastly extends the idea used to deal with split-brokenness in [34]. In [34], we relied on replacing the subtrees below the prefix-independent rivals of a split-broken run by other suitable trees. However, Example 5 shows that this is not possible in our scenario as these subtrees may be indispensable to ensure that broken coordinates dominate all non-broken coordinates. Here, we instead modify the subtrees present and construct trees and runs of U. For this, we employ the properties of U , pumping techniques, and Ramsey's Theorem.

Sufficiency
To show that A is finitely sequential if U is not broken, we show that in this case we can construct M unambiguous max-plus-WTA which all do not satisfy the tree fork property and whose pointwise maximum is equivalent to A . By Theorem 2, we obtain a finitely sequential representation of A by constructing one for each of the unambiguous max-plus-WTA. We essentially construct the unambiguous automata by removing problematic runs from U and then projecting to the coordinates 1, . . . , M . Our fundamental idea is the following. First, let ξ be the smallest difference between the weights of two coordinates of a loop in a Γ-word of height at most 4|Q| 2 , i.e., for X = {|wt i (p, s, p) − wt j (q, s, q)| | p, q ∈ Q, i, j ∈ {1, . . . , M }, s is a Γ-word with height(s) ≤ 4|Q| 2 , Run U (p, s, p) = ∅, Run U (q, s, q) = ∅}, let ξ = min X \ {0}. Then assume that (t, r) is i-p-q-broken and that the maximum of wt U (t, r) is in coordinate i. Furthermore, assume that in r, some i-p-q-distinguisher s of height at most 4|Q| 2 loops N times in p, where N ∈ N is some integer, and that wt i (p, s, p) < wt i (q, s, q). By removing the loops of s in p from (t, r) and inserting them back as loops in q, we increase the weight of coordinate i by N ξ, but leave the weights of all non-broken coordinates unchanged. Thus, coordinate i then dominates all non-broken coordinates by a margin of at least N ξ. As i cannot dominate all non-broken coordinates by an arbitrarily large margin, N cannot be arbitrarily large. In turn, this means that if N is sufficiently large, then wt U (t, r) cannot take its maximum weight in coordinate i. This implies that the weight of coordinate i can be discarded if some distinguisher loops in both of its rivals too many times.
We employ this idea in the following way. We define the set R = {(i, p, q, s) ∈ {1, . . . , M } × Q 2 × T Γ | i ∈ {1, . . . , M }, s is an i-p-q-distinguisher, height(s) ≤ 4|Q| 2 } and define the constant N = MCξ −1 , whereC is as in Section 3.1. We note that R is computable, as by Lemma 10, we can decide for every two states p, q ∈ Q whether they are rivals or not. Let t ∈ T Γ , r ∈ Run U (t), (i, p, q, s) ∈ R, r p ∈ Run U (p, s, p), and r q ∈ Run U (q, s, q). We call (t, r) (i, p, q, s)-fork-broken if there exist positions u p , v p , w p , w q , u q , v q ∈ pos(t) with v q < p u q ≤ p w q < p w p ≤ p v p < p u p such that (t, r) → u p vp (s, r p ) N +1 , (t, r) → u q vq (s, r q ) N +1 , r(w p ) = p, r(w q ) = q, and t → w p wq is a p-q-fork.
(i, p, q, s)-split-broken if there exist positions u p , v p , u q , v q ∈ pos(t) such that v p < p u p , v q < p u q , v p and v q are prefix-independent, (t, r) → u p vp (s, r p ) N +1 , and (t, r) → u q vq (s, r q ) N +1 .
Following the idea above, we can show that if (t, r) is (i, p, q, s)-broken, then wt i (t, r) < A (t). Furthermore, we can show that for every i ∈ {1, . . . , M }, we can construct a complete and deterministic FTA B i over the alphabet Γ × Q which accepts a tree (t, r) ∈ T Γ×Q if and only if there does not exist (i, p, q, s) ∈ R such that (t, r) is (i, p, q, s)-broken. Via a product-like construction, we can employ B i to construct a WTA C i which "filters" the runs of U so that the runs of C i correspond exactly to those runs of U which are not (i, p, q, s)-broken for any (i, p, q, s) ∈ R. Then C i is not i-broken as otherwise, we can construct an accepting run r of C i on a tree t whose projection to Q yields an i-broken pair (t, r) which loops an i-p-q-distinguisher s for N + 1 times in both p and q. As by Lemma 10, s can be truncated to a distinguisher of height at most 4|Q| 2 , (t, r) is thus (i, p, q, s)-broken. We obtain the contradiction that r is not accepting. Consequently, projecting the weights of each automaton C i to the i-th coordinate yields M unambiguous max-plus-WTA whose pointwise-maximum coincides with A and which all do not satisfy the tree fork property.