Abstract 1 Introduction 2 Preliminaries 3 A Characterisation of Unambiguisability 4 Unambiguisability and Determinisability 5 Minimising Registers in Cost Register Automata 6 Discussion and Future Research References

Unambiguisability and Register Minimisation of Min-Plus Models

Shaull Almagor ORCID Department of Computer Science, Technion, Israel    Guy Arbel ORCID Department of Computer Science, Technion, Israel    Sarai Sheinvald ORCID Department of Computer Science, Technion, Israel
Abstract

We study the unambiguisability problem for min-plus (tropical) weighted automata (WFAs), and the register-minimisation problem for tropical Cost Register Automata (CRAs), which are expressively-equivalent to WFAs. Both problems ask whether the “amount of nondeterminism” in the model can be reduced. We show that WFA unambiguisability is decidable for tropical WFAs. Our proof is via reduction to WFA determinisability, which was recently shown to be decidable. To obtain this reduction, we develop a characterisation of unambiguisability via gaps between runs. On the negative side, we show that CRA register minimisation is undecidable already for inputs with 7 registers, and hence also for any larger fixed number of registers.

Keywords and phrases:
Automata, Weighted Automata, Determinisation, Unambiguous, Unambiguisation, Tropical, Min Plus
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Funding:
Shaull Almagor: ISRAEL SCIENCE FOUNDATION (grant No. 989/22).
Copyright and License:
[Uncaptioned image] © Shaull Almagor, Guy Arbel, and Sarai Sheinvald; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Formal languages and automata theory
; Theory of computation Quantitative automata
Related Version:
Full Version: https://arxiv.org/abs/2512.09484
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Weighted Finite Automata (WFAs) are a popular quantitative computational model, defining functions from words to values [11, 23, 9, 3]. The semantics of WFAs are typically defined over a semiring, with the most prominent settings being the field of rationals (,+,×), and the tropical semiring ({},min,+). Both semirings yield WFAs that are useful for modelling certain aspects of systems, with a wide spectrum of applications (see [10, 11, 3] and references therein). For example, the rational field can be used to define probabilistic automata [22], whereas the tropical semiring allows reasoning about the optimal way of using resources (e.g., energy consumption), since the semantics is to take the minimal weighted run among all the runs on a word. Famously, tropical WFAs have been key to resolving the star-height conjecture [16, 13, 14, 19].

As with many computational models, reasoning about WFAs becomes harder in the presence of nondeterminism. For example, equivalence of tropical WFAs is undecidable for nondeterministic automata, but decidable for deterministic ones [18, 3]. Unlike Boolean automata, nondeterministic WFAs are strictly more expressive than their deterministic fragment for most semirings. Accordingly, a natural problem for WFAs is the determinisability problem: given a WFA 𝒜, is there a deterministic WFA 𝒟 such that 𝒜𝒟? This problem has a rich history dating back to the 1990s [20, 21] (see [2] for more details). It was recently shown to be decidable for the rational field [6, 15], and even more recently for the tropical semiring [2].

The “amount” of nondeterminism can be measured in various ways. The most prominent is ambiguity: a WFA is unambiguous if every word has at most one accepting run. We can similarly define k-ambiguous, finitely ambiguous and polynomially ambiguous [8]. Unambiguous WFAs are strictly more expressive than deterministic WFAs, but retain some nice closure and algorithmic properties [21]. As such, a natural question is unambiguisability111Equally fun mouthfuls include: “disambiguisability”, “unambiguousability”, etc.: given a WFA, is there an equivalent unambiguous WFA? For polynomially-ambiguous tropical automata, this problem was shown to be decidable in [17]. In addition, it is decidable over the rational field [6].

In this work, we resolve the decidability of this problem for tropical WFAs with unrestricted nondeterminism, by reducing it to the determinisability problem. Note that for most models, determinisability and unambiguisability have been resolved in tandem, by first deciding unambiguisability, and then deciding determinisability on the equivalent unambiguous, if it exists. Interestingly, for tropical WFAs determinisation is resolved directly, while unambiguisability remained open. It is somewhat surprising, therefore, that its solution is via reduction to determinisability.

Another measure of nondeterminism in WFAs stems from a closely related model – that of Cost Register Automata (CRAs) with linear register updates [5]. A cost register automaton has a deterministic control, equipped with several registers that hold values. At each step, the registers’ contents is manipulated according to some semiring actions (in our case, (min,+)). Over semirings, CRAs and WFAs are equally expressive [5]. A natural decision problem about CRAs is register minimisation: given a CRA with k registers, is there an equivalent CRA with k<k registers? We refine the results of [5] and show that the number of registers in a CRA corresponds to the width of a WFA: the maximal number of states that can be reached simultaneously (nondeterministically). This measure is incomparable with ambiguity as a measure for nondeterminism, but retains the flavour that width 1 is exactly determinism. Using this equivalence, we show that register minimisation for CRAs is undecidable already for inputs with 7 registers, and the construction extends to any larger fixed number of registers. We remark that for CRAs over the rational field, this problem is decidable [7].

Paper Organisation and Contributions

In Section 2 we lay down basic definitions and recall some results about unambiguous WFAs. In Section 3 we introduce a novel characterisation of unambiguisable WFAs via a notion of “gaps”. In Section 4 we present our first main contribution – a reduction from WFA unambiguisability to WFA determinisability. In particular, this shows the decidability of unambiguisability based on the recent breakthrough [2]. In Section 5 we show that register minimisation for CRAs is undecidable. We conclude with a discussion in Section 6. Detailed proofs appear in the full version.

2 Preliminaries

For k denote [k]={1,,k}. For an alphabet Σ, we denote by Σ (resp. Σ+) the set of finite words (resp. non-empty finite words) over Σ. For a word w=σ1σnΣ, we denote its length by |w|=n and the set of its prefixes by 𝗉𝗋𝖾𝖿(w). We write w[i,j]=σiσj for the infix of w corresponding to 1ij|w|. For a letter σΣ we denote by #σ(w) the number of occurrences of σ in w.

We denote by and the sets {} and {}, respectively. We extend the addition and min operations to in the natural way: a+= and min{a,}=a for all a. By argmin{f(x)xA} we mean the set of elements in A for which f(x) is minimal for some function f and set A.

Weighted Automata

A (min,+) Weighted Finite Automaton (WFA for short) is a tuple 𝒜=Q,Σ,q0,Δ,F with the following components:

  • Q is a finite set of states.

  • Σ is a finite alphabet.

  • q0Q is the initial state (in Section 5 we allow a set Q0 of initial states).222Having a set of initial states does not add expressiveness, as it can be replaced by a single initial state that simulates the first transition from the entire set.

  • ΔQ×Σ××Q is a transition relation such that for every p,qQ and σΣ there exists exactly333This is without loss of generality: if there are two transitions with different weights, the higher weight can always be ignored in the (min,+) semantics. Missing transitions can be introduced with weight . one weight c such that (p,σ,c,q)Δ.

  • FQ is a set of accepting states.

If for every pQ and σΣ there exists at most one transition (p,σ,c,q) with c, then 𝒜 is called deterministic. We denote by 𝒜 the maximal absolute value of any weight in Δ.

Runs

A run of 𝒜 is a sequence of transitions ρ=t1,t2,,tm where ti=(pi,σi,ci,qi) such that qi=pi+1 for all 1i<m and ci< for all 1im. We say that ρ is a run on the word w=σ1σm from p1 to qm, and we denote ρ:p1𝑤qm. For an infix x=w[i,j] we denote the corresponding infix of ρ by ρ[i,j]=ti,,tj (and sometimes by ρ[x], if this clarifies the indices). The weight of the run ρ is 𝗐𝗍(ρ)=i=1mci. A run from the initial state is accepting if it ends in F, i.e., if p1=q0 and qmF. When the start state is explicit, we say that the run is accepting from that start state if it ends in F.

For a word w, we abuse the name of the WFA as the function it describes, and denote by 𝒜(w) the weight assigned by 𝒜 to w, which is the minimal weight of an accepting run of 𝒜 on w. For convenience, we introduce some auxiliary notations. For a word wΣ and sets of states Q1,Q2Q, denote

𝗆𝗐𝗍𝒜(Q1𝑤Q2)=min{𝗐𝗍(ρ)q1Q1,q2Q2,ρ:q1𝑤q2}

If Q1 or Q2 are singletons, we denote them by a single state (e.g., 𝗆𝗐𝗍𝒜(P𝑤q) for some set PQ and state q). Then, we can define 𝒜(w)=𝗆𝗐𝗍𝒜(q0𝑤F). If there are no accepting runs on w, then 𝒜(w)=. The function 𝒜:Σ can be seen as the weighted analogue of the language of an automaton.

 Remark 1 (On initial and final weights and states).

Weighted automata are often defined with initial and final weights, i.e., q0 is replaced with an initial vector initQ (and in particular may have several initial states with finite weight), and there are designated accepting states or a final weight vector finQ. Then, the weight of a run also includes the initial weight and final weight (which may be ).

In the full version we show that the unambiguisability problem for this general model can be reduced to that of our setting. Therefore, it is sufficient to consider our model, without initial and final weights, and with a single initial state and a single accepting state (we use the latter assumption only in Section 4).

We write p𝑤q when there exists some run ρ such that ρ:p𝑤q. We lift this notation to concatenations of runs, e.g., ρ:p𝑥q𝑦r means that ρ is a run on xy from p to r that reaches q after the prefix x. We also incorporate this to 𝗆𝗐𝗍 by writing e.g., 𝗆𝗐𝗍(q𝑥p𝑦r) to mean the minimal weight of a run ρ:q𝑥p𝑦r.

A WFA is trim if every state is reachable from q0 by some run and can reach an accepting state with some run. Note that states that do not satisfy this can be found in polynomial time (by simple graph search), and can be removed from the WFA without changing the weight of any accepted word. Throughout this paper, we assume that all WFAs are trim.

Determinisability

We say that WFAs 𝒜 and are equivalent if 𝒜(w)=(w) for every word w. A WFA 𝒜 is determinisable if it is equivalent to some deterministic WFA. Our first point of comparison is the following problem.

Problem 1 (WFA Determinisation).

Given a WFA 𝒜, decide whether 𝒜 is determinisable.

This problem was recently shown to be decidable [2].

Unambiguisability

A WFA 𝒜 is unambiguous if every word has at most one accepting run. Otherwise it is ambiguous. We say that 𝒜 is unambiguisable if it is equivalent to some unambiguous WFA. Our central object of study is the following problem.

Problem 2 (WFA Unambiguisability).

Given a WFA 𝒜, decide whether 𝒜 is unambiguisable.

3 A Characterisation of Unambiguisability

It is well-known that determinisability of WFA can be characterised by means of gaps [12, 2], namely by how far two potentially-minimal runs can get away from one another. We defer the discussion about this type of gaps to Section 4.1.

We now present an analogous characterisation for unambiguisability. To distinguish the terms, we dub this characterisation 𝔘-type gaps (where 𝔘 stands for “𝔘nambiguous”). Intuitively, we show that 𝒜 is unambiguisable if and only if there is some bound B such that any two accepting runs on a word xy are no farther than B apart after reading x, if the higher run can still become minimal after reading y. Conversely, 𝒜 is not unambiguisable iff for every B there exists a word xy on which there exist two accepting runs that are farther than B apart after reading x, and such that the higher run becomes minimal. We call xy a witness to unambiguisability. Such a witness is depicted in Figure 3(a).

Definition 2 (𝔘-type B-Gap Witness).

Consider a WFA 𝒜=Q,Σ,q0,Δ,F. For B, a 𝔘-type B-gap witness over an alphabet Σ consists of a pair of words x,yΣ and states p1,q1Q, p2,q2F such that there exist runs ρ:q0𝑥p1𝑦p2 and χ:q0𝑥q1𝑦q2 and the following holds.

  • 𝗆𝗐𝗍(q0𝑥Q)=𝗐𝗍(χ[x]), i.e., the prefix χ[x]:q0𝑥q1 is a minimal-weight run on x.

  • 𝗆𝗐𝗍(q0xyF)=𝗐𝗍(ρ), i.e., ρ is a minimal accepting444Note that there may be lower non-accepting runs. run on xy.

  • 𝗐𝗍(ρ[x])𝗐𝗍(χ[x])>B, i.e., after reading x, the run ρ is at least B above the minimal run χ.

We say that a WFA 𝒜 has 𝔘-type gaps bounded by B if there are no 𝔘-type gap witnesses whose gap is greater than B; equivalently, there are no 𝔘-type (B+1)-gap witnesses. For brevity, we refer to 𝔘-type gaps simply as “gaps” throughout this section. In Section 4, we restore the 𝔘-type notation as it is needed there.

The characterisation is as follows.

Theorem 3.

Consider a WFA 𝒜, then 𝒜 is unambiguisable if and only if there exists B such that 𝒜 has gaps bounded by B.

The detailed proof is given in the full version. We present the intuition here.

3.1 𝓐 is Unambiguisable Bounded Gaps

Let 𝒜=Q,Σ,q0,Δ,F and assume 𝒜 is unambiguisable. Let 𝒰=S,Σ,s0,Λ,G be an equivalent unambiguous WFA. In the full version, we recall standard results about unambiguous WFAs, namely that they can be negated. Additionally, WFAs can be summed using a standard product construction. We can therefore obtain a WFA for “𝒜𝒰”, so that for every wΣ we have that either 𝒜(w)=𝒰(w)=(w)=, or (w)=𝒜(w)𝒰(w)=0. Thus every finite value of is 0.

Let 𝖒=max{𝒜,𝒰,} denote the maximal weight appearing in any of 𝒜,𝒰 and in absolute value. Thus, in a single transition, any run of these WFAs can change the weight by at most 𝖒.

Assume by way of contradiction that 𝒜 does not have bounded gaps. In particular, there exists a B-gap witness for B>2|S||Q|𝖒+1, given by x,yΣ, p1,q1Q,p2,q2F and runs ρ:q0𝑥p1𝑦p2 and χ:q0𝑥q1𝑦q2 as per Definition 2. Since 𝒰 is unambiguous, we can think of ρ and χ as runs of with the same gap (i.e., the sum with 𝒰 does not affect the gap). Thus, the runs both end with weight 0.

This gap size therefore implies that either χ[x] becomes very negative, or ρ[x] becomes very positive (see Figure 1). In the former case, χ[x] is so low that we can find a short accepting suffix that leads to a negative-weight word, which is a contradiction. In the latter case, reading y after ρ[x] must take a negative cycle, which we can pump to obtain a negative-weight word, which is again a contradiction. We conclude that has bounded gaps.

(a) χ becomes too negative.
(b) ρ decreases too much after p1, leading to a negative cycle.
Figure 1: Contradiction scenarios for Section 3.1. In Figure 1(a) the run χ becomes too negative, so that a short suffix induces a negative run to q2. In Figure 1(b), the run ρ decreases too much between p1 and p2, causing a negative cycle, which again leads to a negative run to q2.

3.2 Bounded Gaps 𝓐 is Unambiguisable

Assume that 𝒜 has gaps bounded by B. Intuitively, we would want an equivalent unambiguous WFA to track the gaps from the minimal run, and disregard runs that go higher than B above it. Indeed, this is the characterisation in the determinisable case. Unfortunately, the minimal prefix of a run might not extend to a minimal run, as it may get “cut”. We therefore need to nondeterministically guess the minimal run. Then, however, we lose unambiguity.

To overcome this, we define a notion of canonical minimal run, and show that it is unique and can be guessed and verified using an unambiguous WFA. We illustrate this in Example 4 below.

Fix some arbitrary linear order on the states Q. We think of this order as a priority, where higher priority states are better. Consider a word w=σ1σn accepted by 𝒜 and let Υ be the set of minimal-weight accepting runs of 𝒜 on w. Since Υ is finite, we can denote its runs by {ρi=q0i,,qni1im} for some m. We now describe a procedure for culling runs from Υ until we are left with a single run.

Consider the sequence Υn+1ΥnΥ0 defined inductively (from n to 0) as follows.

  • Υn+1=Υ.

  • For 0kn we define Υk={ρiρiΥk+1qkiqki for every i such that ρiΥk+1}.

Intuitively, we consider the set of all minimal runs on w, and start scanning them from the end backwards. We first remove all runs for which qni is not -maximal. Then, from the remaining runs (if there are more than one), we keep only runs where qn1i is -maximal, and so on.

Note that for 0kn, the runs in Υk are all identical from index k. Therefore, Υ0 has a single run ρ, which we dub the canonical run on w. By definition, ρ is a minimal run of 𝒜 on w. Also, since is a linear order, the procedure above is deterministic, meaning that ρ is uniquely defined given .

We can now construct an equivalent unambiguous WFA 𝒰. Intuitively, upon reading a word w, the WFA 𝒰 attempts to track the canonical minimal run of 𝒜 on w. To do so, 𝒰 keeps track of all the runs in a window of weight ±B around a (nondeterministically chosen) state q. If all the runs stay close to q, then all the runs are tracked. However, once a run becomes too high or too low, the window tracks it as or , respectively. Then, when the word ends, if the current state q is accepting, has minimal weight in the window (in particular there are no accepting runs with weight ) and q has maximal priority, then this state accepts.

The crux of the construction is that due to the gap property, if we indeed track the canonical run, then all other accepting states end within its ±B window, with higher weight or lower priority. In addition, other accepting runs that do not become minimal do not yield accepting runs of 𝒰, since their windows invariably “believe” that the canonical run has lower weight or higher priority, and therefore are not marked as accepting.

Example 4.

Consider the WFA in Figure 2(a), with the ordering q0q1q5. There are two runs on the word aaa, both minimal: ρ1=q0,q1,q3,q5 and ρ2=q0,q2,q4,q5. We then have Υ4=Υ3={ρ1,ρ2}. Since q3q4, we have Υ2=Υ1=Υ0={ρ2}, which is the canonical run.

An equivalent unambiguous WFA 𝒰 is in Figure 2(b). The top run tracks “windows” around ρ1, reflecting the relative weight of each state from the corresponding state in ρ1. The bottom run similarly tracks ρ2. Notice, however, that from q3,(q3,0q4,2) there is no transition to q5. The reason is that this state “believes” that q4, which currently has minimal weight 2 above q3, can also reach q5 with the same weight (namely 1) as that from q3, but since q4 has higher priority, this disables the transition from q3. In the formal construction this is enforced using a consistency check.

(a) An unambiguisable WFA 𝒜.
(b) The equivalent Unambiguous WFA 𝒰.
Figure 2: Figure 2(a) has gaps bounded by 2. In Figure 2(b) we demonstrate the construction of Section 3.2, with the order q0q1q2q3q4q5. Crucially, note that the transition from q3 to q5 is removed in 𝒰. This is due to the consistency check, and since q3q4.

The precise construction and correctness proof are given in the full version.

4 Unambiguisability and Determinisability

In this section we use our characterisation of unambiguisable WFAs to obtain our main contribution – a reduction from the unambiguisability problem to the determinisation problem. The latter was recently shown to be decidable in [2].

4.1 A Gap Characterisation for Determinisability

We start by recalling a gap characterisation for determinisable WFAs, captured by 𝔇-type gap witnesses (where 𝔇 stands for “𝔇eterministic”). See Figure 3(b) for a depiction.

Definition 5 (𝔇-type B-Gap Witness).

For B, a 𝔇-type B-gap witness over an alphabet Σ consists of a pair of words x,yΣ and states q1,p1Q, p2F such that there exist runs ρ:q0𝑥p1𝑦p2 and χ:q0𝑥q1 and the following holds.

  • 𝗆𝗐𝗍(q0𝑥Q)=𝗐𝗍(χ), i.e. χ:q0𝑥q1 is a minimal-weight run on x (not necessarily accepting).

  • 𝗆𝗐𝗍(q0xyF)=𝗐𝗍(ρ), i.e., ρ is a minimal accepting run on xy.

  • 𝗐𝗍(ρ[x])𝗐𝗍(χ[x])>B, i.e., after reading x and reaching states p1,q1, the run ρ is at least B above the minimal run χ.

We say that a WFA 𝒜 has 𝔇-type gaps bounded by B if there are no 𝔇-type B+1 gap witnesses. A folklore result (see [2] for a precise proof) states that bounded 𝔇-type gap witnesses characterise determinisability, as follows.

Theorem 6.

Consider a trim WFA 𝒜, then 𝒜 is determinisable if and only if there exists B such that 𝒜 has 𝔇-type gaps bounded by B.

 Remark 7 (𝔘-type vs. 𝔇-type gap witnesses).

There is an obvious similarity between 𝔇-type witnesses (Definition 5) and 𝔘-type witnesses (Definition 2), and understanding the differences between the two is key to our proof. First, notice that every 𝔘-type B-gap witness is in particular a 𝔇-type B-gap witness. Indeed, being a 𝔇-type witness is a weaker requirement, so that the absence of 𝔇-type B-gap witnesses is a stronger requirement implying determinisability rather than unambiguisability.

For the converse, a 𝔇-type B-gap witness is not a 𝔘-type B-gap witness when the run χ:q0𝑥q cannot be continued to an accepting run on xy (and this is the only difference).

(a) 𝔘-type B-gap witness.
(b) 𝔇-type B-gap witness.
Figure 3: B-gap witness. The vertical height represents the weight. After reading x, the run χ is minimal, and ρ is far above it. Upon reading y, ρ continues to become a minimal run. In 𝔘-type witnesses, χ must also continue to become accepting. In 𝔇-type, there is no requirement on χ (but q1 can reach F via some word, since the automaton is trim).

4.2 Reducing Unambiguisability to Determinisability

We now turn to our main result.

Theorem 8.

The Unambiguisability problem is reducible to the Determinisability problem.

Before delving into the proof, we give some intuition. Consider a WFA 𝒜. We wish to construct from 𝒜 a WFA such that 𝒜 is unambiguisable if and only if is determinisable. In light of Remark 7, we actually aim that every 𝔘-type gap B-witness for 𝒜 induces a 𝔇-type B-gap witness for , and that does not have any 𝔇-type B-gap witnesses that are not also 𝔘-type. The former requirement is easy – all we need to do is maintain enough of the structure of 𝒜 so as not to cause too much havoc (i.e., maintain the 𝔘-type witnesses, which are already also 𝔇-type).

Making sure there are no further 𝔇-type witnesses in is the challenging part. To achieve this, we essentially “prune” the runs of 𝒜 as follows. At each state of , we maintain a commitment, which is a function f that describes for every state qQ whether q is going to reach the accepting state (f(q)=), whether q is going to reach some states, but not the accepting state (f(q)=), or whether q is unreachable (f(q)=). Then, with each letter we also receive an update function α which states for every transition whether it is along an accepting run (), only along non-accepting runs (), or unavailable (). The commitments are updated deterministically, and must correctly follow the run DAG of 𝒜 on the word. Here, the run DAG is the layered graph whose i-th layer contains the states reachable after the first i letters, and whose edges are the transitions used between consecutive layers. The idea is then that in a 𝔇-type witness in , the “lower” run χ on x must be extendable to an accepting run on xy, since the updates given by y dictate that there is such an extension. Thus, we can convert a 𝔇-type witness to a 𝔘-type one.

We prove Theorem 8 in the remainder of the section, starting with the construction.

4.2.1 The Reduction Construction

Consider a WFA 𝒜=Q,Σ,q0,Δ,F. We assume (based on Remark 1) that F={qfin} is the unique accepting state of 𝒜. We obtain from 𝒜 a WFA =S,Γ,s0,Λ,G such that 𝒜 is unambiguisable if and only if is determinisable. We start with some auxiliary definitions before describing . Consider the set Com={,,}Q. We refer to each fCom as a commitment, which intuitively prescribes to each state whether it is unreachable (), reachable and is along an accepting run () or reachable but not along an accepting run ().

Next, consider the set Updt={,,}Q×Q. We refer to each αUpdt as an update, which intuitively prescribes to each p,qQ whether the transition from p to q is not available (), is available along an accepting run () or is available but not along an accepting run (). We abbreviate and write pqα, pqα, pqα to signify these three cases, respectively. We illustrate the construction in Figure 4.

(a) An unambiguous WFA 𝒜.
(b) The (deterministic) reduction output WFA.
Figure 4: The reduction of Theorem 8. The WFA 𝒜 is unambiguisable (as it is already unambiguous). The reduction output adds the commitments and updates to the transitions. markings are omitted for clarity. For example, in order to take the qp transition, the commitment specifies that p leads to an accepting state, and that r does not, thus fixing an explicit run DAG. Note that is determinisable (as it is already deterministic).

We now turn to define . The states are S=Q×Com. That is, each state is a pair (q,f) where qQ and fCom. The alphabet is Γ=Σ×Updt. That is, at each transition reads a letter σΣ as well as an update αUpdt. The initial state is s0=(q0,f0) where f0Com is the commitment f0(q0)= and f0(p)= for every pq0. The accepting states are

G={(qfin,ffin)ffin(qfin)=ffin(p) for every pqfin}

The transitions Λ are as follows. Consider two states (q,f),(p,g)S and a letter (σ,α)Γ. We have ((q,f),(σ,α),c,(p,g))Λ if and only if the following consistency conditions hold.

  • 𝚫-consistency: (q,σ,c,p)Δ (i.e., the projection to 𝒜 is a valid transition with the same weight).

  • Update consistency: for every r,tQ we have (r,σ,,t)Δ if and only if rtα. Equivalently, 𝗆𝗐𝗍(r𝜎t) if and only if rtα or rtα. That is, the update α correctly reflects the available transitions on σ, marking them with and . Note that this condition depends only on the letter (σ,α), not on the states.

  • Outgoing consistency: for every rQ we have:

    • If f(r)= then for every rQ we have rrα (i.e., outgoing edges from states are marked or ).

    • If f(r)= then there exists rQ such that rrα.

  • Incoming consistency: for every rQ we have:

    • g(r)= if there exists rQ such that f(r)= and rrα, and for every rQ if rrα then f(r)=.

    • g(r)= if there exists rQ such that f(r) and rr.

Intuitively, at each state (q,f) commits to certain states (of 𝒜) leading to qfin, and others not leading to qfin. Then, reads a letter (σ,α) where α describes exactly the available transitions on σ. The state component q is updated nondeterministically according to σ in 𝒜. The commitment is updated deterministically according to f and α: outgoing consistency checks that the old commitment can be extended correctly, i.e., that transitions reach some state and states do not admit transitions, and incoming consistency uniquely determines whether each state in the next layer is marked , , or .

At a higher-level, essentially reads a word along with a specific run-DAG on it, where some runs are marked “trimmed” (), which intuitively means that they do not lead to accepting states. The detailed correctness proof is in the full version. We outline the ideas here.

The first step is to show a correspondence between 𝒜 and . For a word wΓ, we denote by w|Σ its projection on Σ. Similarly, for a run ρ of we denote by ρ|Q its projection on Q. We show in the full version that a run of can be projected to a run of 𝒜 by removing the commitments and updates, and conversely – a run of 𝒜 can be lifted to a run of by providing exactly the correct commitments and updates from the run DAG of 𝒜. Moreover, this correspondence maintains the weights of the runs. We now proceed to show correctness.

𝓐 is Not Unambiguisable 𝓑 is Not Determinisable

We prove this direction via the gap characterisation (Theorems 3 and 6). Specifically, we prove that if there is a 𝔘-type B-gap witness in 𝒜, then there is a 𝔇-type B-gap witness in . This follows easily from the correspondence above: any 𝔘-type B-gap witness induces a 𝔘-type B-gap witness in , and this is in particular a 𝔇-type witness (Remark 7).

𝓐 is Unambiguisable 𝓑 is Determinisable

We turn to the “hard” direction. We again use gap witnesses, this time showing that every 𝔇-type B-gap witness in induces a 𝔘-type B-gap witness in 𝒜. We first assume without loss of generality that is trim. However, we remark that this is an important assumption that is treated carefully in the proof. Consider therefore a 𝔇-type B-gap witness xy in , with the corresponding runs ρ:(q0,f0)𝑥(p,fp)𝑦(qfin,g) and χ:(q0,f0)𝑥(q,fq) (where χ is minimal on x, and ρ is minimal on xy). We claim that xy|Σ is a 𝔘-type B-gap witness in 𝒜. Note that this almost holds by Remark 7, and the only thing left to show is that χ|Q can be extended to some run on y|Σ.

This is where the consistency requirements in the construction of come into play. First, we observe that fp(p)=fq(q)=. Indeed, if, for example, fq(q), then the commitment reached so far forces that q cannot proceed to an accepting state. But then the state (q,fq) cannot reach any accepting state on any word, as any accepting continuation would violate the outgoing and incoming consistency requirements. This contradicts the assumption that is trim. Thus, since is trim, such a state cannot occur in a witness.

Next, observe that since the commitment component is updated deterministically, we have fp=fq. In particular, fp(q)=fp(p)=. Intuitively, this means that all the runs have the same opinion on whether q reaches an accepting state, and this opinion is . We can then inductively follow the update consistency on y from (q,f(q)), and we are guaranteed that there is some run from q on y that reaches an accepting state, as required.

We remark that a concerned reader may wonder why we place so much emphasis on a simple property such as being trim. This is in a way the key to the proof: the construction of is such that if a state is not trimmed, then it can reach an accepting state on every upcoming suffix (provided there is at least one other run that can read this suffix). ∎

This concludes the proof of Theorem 8. Since determinisability is decidable by [2], we have the following.

Corollary 9.

The Unambiguisability problem for WFA is decidable.

Finally, we remark that currently there are no known complexity upper bounds for determinisability, and therefore our reduction does not provide complexity bounds either. It should be noted, however, that the reduction has a single-exponential blowup in the state space. Once complexity bounds for determinisation are established, it would be interesting to see if this blowup is necessary, or whether there is a polynomial-time (or indeed – logspace) reduction.

Theorem 10.

WFA Unambiguisability is PSPACE-hard.

Proof.

The PSPACE-hardness proof of determinisation in [2, Appendix D] actually uses 𝔘-type witnesses, not just 𝔇-type witnesses. It therefore works word-for-word to show that unambiguisability is also PSPACE-hard.

5 Minimising Registers in Cost Register Automata

Tropical cost register automata (CRAs) with linear register updates provide an alternative representation of WFAs, where nondeterminism is captured in the behaviour of several registers, keeping the control deterministic. This view offers a natural measure of nondeterminism by the number of registers needed to capture a function. In this section we show that unfortunately, minimising the number of registers is generally undecidable already for inputs with 7 registers, and therefore also for any larger fixed number of registers.

A fundamental result in [5] is that CRAs are expressively equivalent to WFAs. In the full version we formally define CRAs, and refine this result by showing that CRAs with k registers are equivalent to WFAs in which, for every word, the maximal number of states simultaneously reachable is k. We refer to these as width-k WFAs. Thus, our result is the following. The corresponding CRA statement and the full proof are in the full version, and we bring here only the core idea.

Theorem 11.

The following problem is undecidable already for k=7: given a width k WFA, decide whether there is an equivalent width k1 WFA.

Figure 5: Reduction idea. The letter σ represents all “non-killing” letters in the transitions. Killing letters lead to ×. Intuitively, we start either at qa or at q0 (in 𝒜). In qa there is a self loop with weight 0 on everything except a. From q0 we can run as 𝒜, but also move to the components on $. In state q we self loop with weight 1 on , and with 0 on all other letters except . There may be a self loop on q0 with the word w.

Consider a WFA 𝒜 of width 6, such that either 𝒜(w)0 for all w, or there is a word w such that 𝗆𝗐𝗍(q0𝑤q0)=1, so that555This actually requires further assumptions, see the detailed proof. the weight of wn is n. We want to separate the two cases using a reduction to the width-minimisation problem. We obtain from 𝒜 a new WFA 𝒜 as depicted in Figure 5. We add to the alphabet the letters {$,,,,a,,,} and introduce new states qa,q,,q. The behaviour is the following: we start both at qa and at q0 (in 𝒜). When $ is read, runs from q0 leave to all the q. There, q loses 1 on , and is not allowed to read . In addition component qa maintains weight 0 but cannot read a.

The intuitive idea is the following. First, we claim that in any WFA equivalent to 𝒜, the states q must be tracked separately, leading to width 6 at least. This is because upon reading the word e.g., n2n3n4n5n6n for large n, the gaps between the runs on the q states are very large. Then, we can use the “killing letters” to eliminate all the runs but one, with a very short suffix (e.g., the suffix leaves only the q run). For large enough n, a WFA of width 5 cannot track these values correctly.

Next, we look at the qa component. If 𝒜(w)0 for all w, the component qa is redundant, so we have an equivalent width-6 WFA. Otherwise, we claim that any equivalent WFA needs to track qa separately to all the q. Here the reason is that using wn we can reach weight n in the 𝒜 component (so qa is far below it, with weight 0), but upon reading a the qa component is killed and the weight suddenly jumps to n, which again requires another component in any equivalent WFA. Thus, in this case any equivalent WFA must be of width at least 7.

In order to turn this construction into a proper reduction we show that we can obtain such a WFA 𝒜 for which the separation described above is undecidable. This uses the upper-boundedness construction of [3], which reduces the 0-halting problem for two-counter machines to deciding whether the function described by a WFA is bounded from above. The detailed proof in the full version states the precise properties of that construction and then applies the gadget described here.

6 Discussion and Future Research

In a nutshell, our work maps out the borders of “nondeterminism minimisation” in WFAs, showing on the positive side that unambiguisability is decidable, and on the negative side that reducing the width (equivalently – minimising the number of registers in a CRA) is undecidable.

Note that our results hold for the closely related settings such as max-plus WFAs over and min-plus or max-plus WFAs . For max-plus over , the setting is completely symmetric – simply negate all the weights to obtain an analogous min-plus WFA. For , note that adding a constant to all the transitions retains unambiguisability and determinisability (for both max-plus and min-plus). Therefore, we can start with a WFA and increase the weights so that they are all in , and the results stil hold. Note that “still holds” means that the general problem and the problem are computationally equivalent. The decidability already holds because this is a sub-case.

Our decidability proof of unambiguisability relies on the decidability of WFA determinisability. In particular, the current best known complexity bounds for determinisability are in the 6th level of the fast-growing hierarchy [1]. Since our reduction has a single-exponential blowup (and the fast-growing hierarchy is closed under single-exponential blowups) then the same complexity bounds hold for unambiguisability as well. For the lower bound, the best current bound is PSPACE-hardness, as per Theorem 10.

Two natural questions arise from our research. First, can we decide more relaxed ambiguity? E.g., can we decide if a given WFA has an equivalent 2-ambiguous/finitely ambiguous/polynomially-ambiguous WFA? The question of 2-ambiguisability seems very difficult, and currently out of reach. In particular, we do not know of a gap criterion that corresponds to 2-ambiguous WFAs. The second question is whether register minimisation becomes decidable for k<7, which is perhaps of lesser importance, but it would nonetheless be nice to complete the picture.

In addition, now that some borders on decidability are in place, we can map out fragments, e.g., register minimisation for copyless CRAs [4].

References

  • [1] Shaull Almagor, Guy Arbel, and Sarai Sheinvald. A complexity bound for determinisation of min-plus weighted automata. In 2026 41st Annual Symposium on Logic in Computer Science (LICS), 2026.
  • [2] Shaull Almagor, Guy Arbel, and Sarai Sheinvald. Determinization of min-plus weighted automata is decidable. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 247–257. SIAM, 2026. arXiv:2503.23826.
  • [3] Shaull Almagor, Udi Boker, and Orna Kupferman. What’s decidable about weighted automata? Information and Computation, 282:104651, 2020. Special issue on 9th International Workshop Weighted Automata: Theory and Applications (WATA 2018). doi:10.1016/j.ic.2020.104651.
  • [4] Shaull Almagor, Michaël Cadilhac, Filip Mazowiecki, and Guillermo A. Pérez. Weak cost register automata are still powerful. Int. J. Found. Comput. Sci., 31(6):689–709, 2020. doi:10.1142/S0129054120410026.
  • [5] Rajeev Alur, Loris DAntoni, Jyotirmoy Deshmukh, Mukund Raghothaman, and Yifei Yuan. Regular functions and cost register automata. In 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 13–22. IEEE, 2013. doi:10.1109/LICS.2013.65.
  • [6] Jason P Bell and Daniel Smertnig. Computing the linear hull: Deciding deterministic? and unambiguous? for weighted automata over fields. In 2023 38th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–13. IEEE, 2023. doi:10.1109/LICS56636.2023.10175691.
  • [7] Yahia Idriss Benalioua, Nathan Lhote, and Pierre-Alain Reynier. Minimizing Cost Register Automata over a Field. In 49th International Symposium on Mathematical Foundations of Computer Science (MFCS 2024), volume 306 of Leibniz International Proceedings in Informatics (LIPIcs), pages 23:1–23:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.MFCS.2024.23.
  • [8] Ronald Book, Shimon Even, Sheila Greibach, and Gene Ott. Ambiguity in graphs and expressions. IEEE Transactions on Computers, 100(2):149–153, 1971. doi:10.1109/T-C.1971.223204.
  • [9] Krishnendu Chatterjee, Laurent Doyen, and Thomas A Henzinger. Quantitative languages. ACM Transactions on Computational Logic (TOCL), 11(4):1–38, 2010. doi:10.1145/1805950.1805953.
  • [10] Laure Daviaud. Register complexity and determinisation of max-plus automata. ACM SIGLOG News, 7(2):4–14, 2020. doi:10.1145/3397619.3397621.
  • [11] Manfred Droste, Werner Kuich, and Heiko Vogler. Handbook of weighted automata. Springer Science & Business Media, 2009.
  • [12] Emmanuel Filiot, Ismaël Jecker, Nathan Lhote, Guillermo A Pérez, and Jean-François Raskin. On delay and regret determinization of max-plus automata. In 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–12. IEEE, 2017. doi:10.1109/LICS.2017.8005096.
  • [13] K. Hashiguchi. Limitedness theorem on finite automata with distance functions. Journal of computer and system sciences, 24(2):233–244, 1982. doi:10.1016/0022-0000(82)90051-4.
  • [14] K. Hashiguchi. New upper bounds to the limitedness of distance automata. Theoretical Computer Science, 233(1-2):19–32, 2000. doi:10.1016/S0304-3975(97)00260-0.
  • [15] Ismaël Jecker, Filip Mazowiecki, and David Purser. Determinisation and unambiguisation of polynomially-ambiguous rational weighted automata. In Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 1–13, 2024. doi:10.1145/3661814.3662073.
  • [16] Daniel Kirsten. Distance desert automata and the star height problem. RAIRO-Theoretical Informatics and Applications, 39(3):455–509, 2005. doi:10.1051/ITA:2005027.
  • [17] Daniel Kirsten and Sylvain Lombardy. Deciding unambiguity and sequentiality of polynomially ambiguous min-plus automata. In 26th International Symposium on Theoretical Aspects of Computer Science STACS 2009, pages 589–600. IBFI Schloss Dagstuhl, 2009. doi:10.4230/LIPIcs.STACS.2009.1850.
  • [18] D. Krob. The equality problem for rational series with multiplicities in the tropical semiring is undecidable. International Journal of Algebra and Computation, 4(3):405–425, 1994. doi:10.1142/S0218196794000063.
  • [19] H. Leung and V. Podolskiy. The limitedness problem on distance automata: Hashiguchi’s method revisited. Theoretical Computer Science, 310(1-3):147–158, 2004. doi:10.1016/S0304-3975(03)00377-3.
  • [20] Mehryar Mohri. Compact representations by finite-state transducers. In 32nd Annual Meeting of the Association for Computational Linguistics, pages 204–209, 1994. doi:10.3115/981732.981760.
  • [21] Mehryar Mohri. Finite-state transducers in language and speech processing. Computational linguistics, 23(2):269–311, 1997.
  • [22] Azaria Paz. Introduction to probabilistic automata. Academic Press, 2014.
  • [23] Marcel Paul Schützenberger. On the definition of a family of automata. Inf. Control., 4(2-3):245–270, 1961. doi:10.1016/S0019-9958(61)80020-X.