Abstract 1 Introduction 2 Preliminaries 3 𝝀-Resolvability 4 Deciding Resolvability for Unary Finite Automata 5 Unambiguous Finite Automata 6 Finitely-Ambiguous Finite Automata 7 Discussion References Appendix A Application to Automata over Infinite Words

Resolving Nondeterminism by Chance

Soumyajit Paul ORCID University of Liverpool, UK David Purser ORCID University of Liverpool, UK Sven Schewe ORCID University of Liverpool, UK Qiyi Tang ORCID University of Liverpool, UK Patrick Totzke ORCID University of Liverpool, UK Di-De Yen ORCID University of Liverpool, UK
Abstract

History-deterministic automata are those in which nondeterministic choices can be correctly resolved stepwise: there is a strategy to select a continuation of a run given the next input letter so that if the overall input word admits some accepting run, then the constructed run is also accepting.

Motivated by checking qualitative properties in probabilistic verification, we consider the setting where the resolver strategy can randomise and only needs to succeed with lower-bounded probability. We study the expressiveness of such stochastically-resolvable automata as well as consider the decision questions of whether a given automaton has this property. In particular, we show that it is undecidable to check if a given NFA is λ-stochastically resolvable. This problem is decidable for finitely-ambiguous automata. We also present complexity upper and lower bounds for several well-studied classes of automata for which this problem remains decidable.

Keywords and phrases:
History-determinism, finite automata, probabilistic automata
Copyright and License:
[Uncaptioned image] © Soumyajit Paul, David Purser, Sven Schewe, Qiyi Tang, Patrick Totzke, and Di-De Yen; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Formal languages and automata theory
Related Version:
Full Version: https://arxiv.org/abs/2504.10234
Acknowledgements:
We would like to thank the anonymous reviewers for their constructive feedback, that helped improve the paper.
Funding:
margin: [Uncaptioned image] This work has been supported by the European Union’s Horizon Europe (HORIZON) programme under the Marie Skłodowska-Curie grant agreement No 101208673 and the EPSRC through the projects EP/X042596/1 and EP/X03688X/1.
Editors:
Patricia Bouyer and Jaco van de Pol

1 Introduction

Many successful verification techniques rely on automata representations for specifications that capture the languages of acceptable system traces. These automata models are typically nondeterministic: any given trace may give rise to multiple runs of the automaton, and is accepted if at least one of these runs is successful. This enables succinct representations but is also a major source of complexity due to costly intermediate determinisation steps.

It is therefore natural to put extra constraints on the extent to which an automaton allows nondeterministic choice to avoid determinisation. One way to do this is to bound the level of ambiguity: an automaton is k-ambiguous if on every accepted word it has at most k many distinct accepting runs (see e.g. [42, 35, 16]). Unambiguous automata have proven to be useful for model-checking of Markov chain models [7, 33]. An orthogonal restriction on nondeterminism, which has been extensively studied in recent years (cf. [24, 14, 27, 3, 8, 1, 41, 9, 10, 32, 33]), is to demand that choices can be resolved “on-the-fly”: An automaton is history-deterministic (HD) if there is a strategy to select a continuation of a run given a next letter, so that if the overall word admits some accepting run then the constructed run is also accepting. This condition is strict in the sense that the resolver strategy must guarantee to produce an accepting run if one exists. In some scenarios less strict guarantees may suffice, for example when model-checking Markov Decision Processes [22, 21, 4, 6]. This motivates the study of automata that can be resolved in a weaker sense, namely, where the resolver strategy can randomise and is only required to succeed with a lower-bounded confidence.

A stochastic resolver for some nondeterministic automaton 𝒜 is a function that, for any finite run and input letter, gives a distribution over the possible transitions. This produces a probabilistic automaton 𝒫 that assigns a probability of acceptance to every input word and, together with a threshold λ>0, defines the language (𝒫λ) consisting of all words whose probability of acceptance is at least λ (see, e.g., [37]). Unless stated otherwise, we will consider memoryless stochastic resolvers, which base their decisions solely on the last state of the given run and the input letter. Fixing a memoryless resolver turns 𝒜 into a probabilistic automaton 𝒫 over the same set of states and where transitions that appear positively in 𝒫 are also contained in 𝒜. Consequently then, for every threshold 0<λ, the language (𝒫λ) is included in that of 𝒜. We now ask which automata admit positional resolvers that also guarantee the inclusion in the other direction.

An automaton 𝒜 called λ-memoryless stochastically resolvable (or simply λ-resolvable) if there exists a memoryless stochastic resolver with (𝒫λ)=(𝒜). An automaton is positively memoryless stochastically resolvable (or simply positively resolvable) if it is λ-resolvable for some λ>0. By varying the threshold λ, stochastic resolvability defines a spectrum where 0-resolvable corresponds to unrestricted nondeterminism and, on finite words, 1-resolvable coincides with history-determinism. See Figure 1 for distinguishing examples.

(a) NFA 𝒜 is 1/2-resolvable.
(b) NFA is not positively resolvable.
Figure 1: Two unambiguous NFA (all missing transitions implicitly go to a non-accepting sink). The one on the left is λ-resolvable for all λ1/2. The one on the right is not positively resolvable, because no matter the choice of transition probability, the probability of bn tends to zero as n grows.

Related Work.

The notion of history-determinism was introduced independently, with slightly different definitions, by Henzinger and Piterman [24] for solving games without determinisation, by Colcombet [14] for cost-functions, and by Kupferman, Safra, and Vardi [28] for recognising derived tree languages of word automata. For ω-regular automata, these variations all coincide [8]. For coBüchi-recognisable languages, history-deterministic automata can be exponentially more succinct than any equivalent deterministic ones [27]. Checking whether a given automaton is HD is decidable in polynomial time for Büchi and coBüchi automata [3, 27] and more generally also for parity automata of any fixed parity index [31]. History-determinism has been studied for richer automata models, such as pushdown automata [32, 20] timed automata [12, 11, 23] and quantitative automata [9, 10].

Recently, and independently from us, Henzinger, Prakash and Thejaswini [25] introduced classes of stochastically resolvable automata. The main difference of their work compared to ours is that they study the qualitative setting, where resolvers are required to succeed almost-surely, with probability one. In the terminology introduced above these are 1-resolvable automata. They study such automata on infinite words and compare their expressiveness, relative succinctness, against history-deterministic and semantically deterministic automata. Over finite words, these notions coincide: an NFA is 1-stochastically resolvable iff it is 1-memoryless stochastically resolvable iff it is semantically deterministic iff it is history-deterministic. They also consider the complexity of determining whether an automaton is 1-resolvable and establish that this is in polynomial time for safety automata, and 𝖯𝖲𝖯𝖠𝖢𝖤-complete for reachability and weak automata, and remains open for more general classes.

For a fixed probabilistic automaton, deciding whether a given λ is a lower bound corresponds to the undecidable emptiness problem [37], while asking if such a λ exists relates to the undecidable zero-isolation problem [19]. These problems become more tractable under restrictions such as bounded ambiguity [15, 16, 17, 18]. In the unary case, checking if λ is a lower bound is equivalent to the long-standing open positivity problem for linear recurrence sequences [36] and is also hard for Markov chains [45]. In contrast, our setting allows the probabilistic automaton to vary, asking whether some choice of probabilities satisfies the desired properties.

The unary case can be seen as a synthesis problem on parametric Markov chains. Consider the distribution transformer perspective [2, 5], where a Markov chain induces a sequence of distributions over states. Then the λ-resolvability problem asks, for universal NFA, whether there exists a parameter assignment such that the sequence of distributions is “globally” in the semi-algebraic set S={x[0,1]Q|qQxq=1 and qFxqλ} (distributions with probability mass at least λ in accepting states). When the NFA is non-universal the “globally” condition must be adjusted to the eventually periodic pattern of the NFA. Existing work characterises, up to a set of measure zero, parameters that satisfy prefix-independent properties or “eventually” properties such as Finally Globally in S [5]. For general parametric questions, there is always the special case where the parameters are redundant, which encodes the aforementioned positivity problem [45]. This special case does not necessarily arise in our setting, as the problem has all transitions parameterised independently (only the structure is fixed), which leaves hope for λ-resolvability.

Our Contributions.

We focus on automata over finite words and consider the decision problems whether a given automaton is resolvable. We distinguish the two variants of this problem, asking whether the automaton is positively resolvable, or whether it is λ-resolvable for a given value of λ. Our results are as follows, see also Table 1 for a summary.

  • We introduce the quantitative notion of λ-memoryless stochastic resolvability, and show λ-resolvability induces a strict hierarchy of automata with varying parameter λ(0,1).

  • We show that checking λ-resolvability is undecidable already for NFA, on finite words, and therefore also for automata on infinite words regardless of the accepting condition.

  • We complement this by showing that both positive resolvability and λ-resolvability remain decidable for finitely-ambiguous automata.

  • We present complexity upper and lower bounds for several well-studied variations of finitely-ambiguous automata (summarised in Table 1). In particular, checking positive resolvability is 𝖯𝖲𝖯𝖠𝖢𝖤-complete for finitely-ambiguous automata, 𝖭𝖫-complete for unambiguous (1-ambiguous) automata, and in the polynomial hierarchy for (unrestricted) unary automata. Checking λ-resolvability is 𝖯𝖲𝖯𝖠𝖢𝖤-hard even for k-ambiguous automata (and 𝖼𝗈𝖭𝖯-hard over a unary alphabet).

Table 1: Deciding positive resolvability (PR) and λ-resolvability (λR) of NFAs where λ(0,1).
unambiguous finitely-ambiguous general
PR
unary 𝖭𝖫 (Thm. 8) 𝖼𝗈𝖭𝖯-hard (Thm. 11) Σ2P (Thm. 4)
non-unary 𝖭𝖫-complete (Thms. 9 and 8) 𝖯𝖲𝖯𝖠𝖢𝖤-complete (Thms. 12 and 19) open
λR
unary 𝖯𝖳𝖨𝖬𝖤 (Thm. 10) 𝖼𝗈𝖭𝖯-hard (Thm. 11) decidable (Thm. 20) open
non-unary 𝖭𝖫-hard (Thm. 9) 𝖯𝖳𝖨𝖬𝖤 (Thm. 10) 𝖯𝖲𝖯𝖠𝖢𝖤-hard (Thm. 12) decidable (Thm. 20) undecidable (Thm. 2)

2 Preliminaries

In this paper, we use , , +, , +, and to denote the sets of non-negative integers, integers, positive integers, rational numbers, positive rational numbers, and real numbers, respectively. For S{,,} and two numbers i,jS with i<j, the notation [i,j]S (resp., (i,j)S) denotes the set {dSidj} (resp., {dSi<d<j}). The half-open intervals (i,j]S and [i,j)S are defined analogously. We also write [j]S to denote [1,j]S. The subscript S is omitted if it is clear from the context.

Nondeterministic Finite Automata.

A nondeterministic finite automaton (NFA) 𝒜 consists of a finite alphabet Σ, a finite set of states Q, an initial state q0, a set of accepting states FQ, and a set of transitions ΔQ×Σ×Q. We also use p𝜎q to signify that (p,σ,q)Δ. 𝒜 is unary if |Σ|=1; a deterministic finite automaton (DFA) if, for every (p,σ)Q×Σ, there exists at most one state qQ such that p𝜎q; and complete if, for every (p,σ)Q×Σ, there exists some qQ such that p𝜎q.

Given a word w=σ1σnΣ, a run π of 𝒜 on w is a sequence of transitions τ1τn, where each transition τi=(pi,σi,qi)Δ for i[1,n], and qi=pi+1 for i[1,n1]. The run π is accepting if p1=q0 and qnF. A word is accepted by 𝒜 if there exists an accepting run on it. We denote by (𝒜) the set of words accepted by 𝒜. Additionally, we use ACC𝒜(w) to denote the set of all accepting runs of 𝒜 on w. We omit the subscript 𝒜 when it is clear from the context. An NFA 𝒜 is k-ambiguous if, for every word wΣ, it holds that |ACC(w)|k. It is unambiguous when k=1. Moreover, 𝒜 is finitely-ambiguous if it is k-ambiguous for some k+. We use UFA and FNFA to refer to unambiguous and finitely-ambiguous NFA, respectively.

For qQ, let 𝒜q denote the automaton 𝒜 with q as its initial state, and for SΔ, let 𝒜S denote the automaton obtained from 𝒜 by restricting its transitions to S. For τS, we often say τ is nondeterministic in S to mean τ is nondeterministic in 𝒜S. Δ induces a transition function δ𝒜:2Q×Σ2Q, where δ𝒜(Q,w) is the set of all states where runs on word w can end up in when starting from any state qQ. Formally, for all QQ, δ𝒜(Q,ϵ)=Q, and for all wΣ and σΣ, δ𝒜(Q,wσ)={q(p,σ,q)Δ and pδ𝒜(Q,w)}. When Q={p}, we often abuse notation and write δ𝒜(p,w) instead of δ𝒜({p},w), and we omit the subscript 𝒜 when it is clear from the context. An NFA is trim if every state qQ is reachable from the initial state, and can reach an accepting state, i.e., qδ(q0,w) and δ(q,w)F for some words w,w.

Probabilistic Finite Automata.

A probabilistic finite automaton (PFA) 𝒫 is an extension of nondeterministic finite automaton that assigns an acceptance probability to each word. Specifically, 𝒫 is an NFA augmented with an assignment Θ:Δ[0,1], where for every (p,σ)Q×Σ, τ=(p,σ,q)ΔΘ(τ)=1. Accordingly, 𝒫 is a 6-tuple of the form (Σ,Q,q0,Δ,F,Θ). Given a transition τ=(p,σ,q), the value Θ(τ) represents the probability of transitioning from state p to state q upon reading the symbol σ. With a slight abuse of language, we also call (p,σ,q,d) a transition of 𝒫, where d=Θ(p,σ,q). We say that 𝒫 is based on the NFA 𝒜=(Σ,Q,q0,Δ,F) and call this its underlying NFA.111The condition τ=(p,σ,q)ΔΘ(τ)=1 may not hold for some pairs (p,σ) if the underlying NFA is not complete. Any NFA can be made complete by introducing a non-accepting sink state. Thus, throughout this paper, we assume that the underlying NFA of every PFA is implicitly made complete.

We use 𝒫(w) to denote the probability that 𝒫 accepts word w where:

𝒫(w):=π=τ1τnACC(w)i=1nΘ(τi).

For every threshold λ[0,1], let (𝒫λ) denote the set of all words accepted with probability at least λ, that is: (𝒫λ):={wΣ𝒫(w)λ}.

We also use 𝒫λ to refer to the PFA 𝒫 with a given threshold λ. Similarly, we define 𝒫λ, 𝒫>λ, and 𝒫<λ. A PFA 𝒫 is called simple if, for every transition (p,a,q,d) of 𝒫, the probability d belongs to {0,12,1}. Since transitions with d=0 do not affect the language accepted by a PFA, we assume d0 for all transitions in the remainder of this paper.

Stochastic Resolvers.

Given an NFA 𝒜, a (memoryless) stochastic resolver for 𝒜 resolves nondeterminism during the run on a word on-the-fly, randomly, and positionally. Formally, :Δ[0,1], such that τ=(p,σ,q)Δ(τ)=1 holds for every pair (p,σ)Q×Σ. A resolver for 𝒜 turns it into a PFA 𝒫𝒜. We call {τΔ(τ)>0} the support of .

Given a threshold λ[0,1], we say that 𝒜 is λ-memoryless stochastically resolvable (or simply λ-resolvable) if there exists a resolver for 𝒜 such that (𝒫λ)=(𝒜), where 𝒫=𝒫𝒜. An automaton 𝒜 is positively memoryless stochastically resolvable (or simply positively resolvable) if it is λ-resolvable for some λ(0,1].

3 𝝀-Resolvability

In this section we demonstrate the importance of the threshold λ: we first show that the choice of this threshold defines a spectrum of automata classes in terms of their resolvability. We then turn to the main negative result, that checking λ-resolvability is undecidable.

Theorem 1.

For every λ(0,1) there exists a unary NFA 𝒜λ such that 𝒜λ is λ-resolvable but not (λ+ϵ)-resolvable for any ϵ>0.

Proof.

Let λ=mn where m,n+ and m<n. The NFA 𝒜λ over unary alphabet {a} is as follows. In the initial state q0 upon reading the letter a, 𝒜λ nondeterministically goes to one of n branches, each with (nm) states. Consider an arbitrary ordering of all m sized subsets of [n], S1,,S(nm). For any branch j[n] and i[(nm)], the i-th state on the j-th branch - qSij, is accepting iff jSi. Refer to Figure 3 for an example with λ=23. The automaton 𝒜λ is m-ambiguous, where each word in {ai|i[(nm)]} has exactly m accepting runs. Moreover, 𝒜λ is mn-resolvable, since the uniform resolver that picks any transition at q0 with probability 1n, accepts every word with probability exactly mn. For any other resolver , consider the m branches i1,,im, with the lowest assigned probabilities. Let be the unique index such that S={i1,,im}. Then for the word a, we have 𝒫𝒜λ(a)<mn. Hence, 𝒜λ is not (λ+ϵ)-resolvable for any ϵ>0.

Figure 2: The automaton 𝒜λ for λ=23, in the proof of Theorem 1.
Figure 3: The construction for Theorem 2.
Theorem 2.

The λ-resolvability problem is undecidable for NFA.

Our approach relies on a reduction from the undecidable universality problem for simple222Note that [19] proves the (strict) emptiness problem for simple PFA is undecidable. Since a PFA is universal if and only if its complement is empty, the universality problem is also undecidable. PFAs [37, 19] to the λ-resolvability problem for an NFA. Consider a simple PFA 𝒫 over the alphabet Σ, whose underlying NFA is 𝒜. For a simple PFA, the structure of its underlying NFA uniquely determines the probabilities on its transitions: for each state q and letter σ, there are either one or two outgoing transitions from q labelled with σ; if there is one transition it must have probability 1 and if there are two, each must have probability 12.

Intuitively, we want the resolver (if it exists) for the underlying automaton 𝒜 of 𝒫 to always induce a simple PFA. So, 𝒜 is λ-resolvable if and only if 𝒫λ and 𝒜 recognise the same language. In principle, a resolver for an NFA does not necessarily enforce that two outgoing transitions both have probability 12 and may use any arbitrary split. To enforce an equal split, we construct an NFA 𝒜 over an extended alphabet Σ, such that 𝒜 is a super-automaton of 𝒜. By this, we mean that the alphabet, state set, set of accepting states, and transition set of 𝒜 are all subsets of those of 𝒜, and we refer to 𝒜 as a sub-automaton of 𝒜. The constructed NFA 𝒜 is designed so that it admits only one possible 14-resolver, and that the resolver matches the underlying probabilities of the simple PFA 𝒫 on the part of the automaton of 𝒜 corresponding to 𝒜. These relations are described in Figure 3.

Our construction has the property that 𝒜 is 14-resolvable if and only if 𝒫12 is universal. Essentially, the only possible resolver induces a probabilistic automaton 𝒫 on 𝒜 such that 𝒫(ww)=12𝒫(w) for all words w(A), where w is a fixed word over ΣΣ. This ensures 𝒫(w)12𝒫(ww)14 for w(A). The construction itself introduces new words, however these words are 14-resolvable by construction.

Proof Sketch of Theorem 2.

Without loss of generality, we fix Σ={a,b}. 𝒫12 is not universal if 𝒜 is not, and since universality for NFA is decidable, we assume that (𝒜)=Σ. We construct a super-automaton 𝒜 of 𝒜 such that it satisfies the following three properties:

  1. C.1

    For every state p of 𝒜 and every σΣ, 𝒜 has at most two distinct transitions of the form (p,σ,q) for some state q.

  2. C.2

    If 𝒜 is 14-resolvable, then its 14-resolvable solution must be a simple PFA.

  3. C.3

    The language (𝒜) is the disjoint union of two languages, ext (essentially an extension of (𝒜)) and ind (essentially corresponding to the new part of 𝒜), satisfying:

    1. (a)

      For every wind, 𝒫(w)14.

    2. (b)

      For every w′′ext, where ext=SΣ for some singleton set S={w} over ΣΣ and w′′=ww with wΣ, we have 𝒫(w′′)=12𝒫(w).

Properties C.1 and C.2 ensure that the simple PFA 𝒫 based on 𝒜 is the unique 14-resolvable solution to 𝒜 if it is 14-resolvable. Notice that regardless of whether 𝒜 has a 14-resolvable solution, 𝒫 is based on 𝒜, and for each word w(𝒜), 𝒫 returns its acceptance probability, which may be less than 14. Property C.3 states that 𝒫 is a 14-resolvable solution to 𝒜 if and only if 𝒫12 is universal. Accordingly, we have:

Lemma 3.

Let 𝒜 be the underlying NFA of a given simple PFA 𝒫, and let 𝒜 be the super-automaton of 𝒜 satisfying properties C.1–C.3. Then 𝒫12 is universal iff 𝒜 is 14-resolvable.

By Lemma 3, we can prove the undecidability of λ-resolvability by constructing, for any simple PFA 𝒫 with underlying NFA 𝒜, an NFA 𝒜 satisfying C.1–C.3. In the remainder of this section, we show how to do this and give intuitions for why these properties hold for the constructed automata. Property C.1 will hold trivially by construction, so we will focus on C.2 and C.3.

The automaton 𝒜 will consist of two sub-automata 𝒜ind and 𝒜ext. The first one, 𝒜ind recognises the language ind, which does not depend on the structure of the original NFA 𝒜, but rather on the numbers of 𝒜’s states and transitions. In contrast, 𝒜ext is an extension (super-automaton) of 𝒜 corresponding to the language ext.

Figure 4: NFA 𝒜.
Figure 5: NFA .

Consider the NFA 𝒜 given in Figure 5, where (A)={aab}. This NFA is 12-resolvable. Moreover, every PFA based on 𝒜 is a 12-resolvable solution, which is neither unique nor necessarily simple. However, if we add two transitions to 𝒜 and derive the NFA as shown in Figure 5, where for every word w{aa,aa}(B), the accepting run on w is unique, then the 12-resolvable solution PFA to becomes both unique and simple. Note that we not only introduce new transitions but also add a newly accepting state qf to ensure that no additional words over {a,b,,} are introduced in a more general case. This example illustrates how property C.2 can be enforced.

Figure 6: Partial structure of NFA 𝒜.
Figure 7: Additional words.

More specifically, referring to Figure 7, if 𝒜 has nondeterministic transitions to states q and r from p on reading a, we introduce two new transitions, (q,,qf) and (r,,qf), in 𝒜, where and are newly introduced symbols corresponding to the original transitions (p,a,q) and (p,a,r), respectively. If we can ensure that there exists a unique word wp corresponding to state p, such that there is a run from the initial state q0 of 𝒜 to p with probability exactly 12, and that the accepting runs on the words wpa and wpa are unique, then we can guarantee that if the PFA 𝒫 is a 14-resolvable solution to 𝒜, then the transition probabilities for both (p,a,q) and (p,a,r) in 𝒫 must be 12. The details of the run on the word wp are shown in Figure 8. For words of the form $0$i$j where i=1,2 and j=3,,6, the NFA in this figure has a unique accepting run. Analogous to the NFA , the symbols $0,,$6, p, and q0 are newly introduced and are not in Σ. Every PFA based on this automaton is a 14-resolvable solution if the transitions labelled with $0, $1, and $2 have probability exactly 12. For each state p, we define wp=$0p, treating p as a symbol. Consequently, the run of 𝒫 from q0 to p on wp has probability exactly 12. We apply this technique to every nondeterministic transition in 𝒜. Note that the automaton shown in Figure 8 is a part of 𝒜, is disjoint from 𝒜, and connects to 𝒜 through transitions of the form (y,p,p) for pQ. Hence, if 𝒜 has a 14-resolvable solution 𝒫, then for all transitions inherited from 𝒜, their probability values in 𝒫 must be 12. Accordingly, this construction ensures that property C.2 holds.

Figure 8: Details of the runs on words wp=$0p and wq0=$0q0.

Apart from the states of 𝒜 that have outgoing nondeterministic transitions, we also introduce a transition (y,q0,q0) to 𝒜, regardless of whether q0 itself has nondeterministic transitions. See Figure 7 and Figure 8. Consequently, the probability of the run of 𝒫 from q0 to q0 on the word wq0=$0q0 is exactly 12. Moreover, for every word wΣ, we have wq0w(𝒜) if and only if w(A). Hence, property C.3b follows.

It is important to explain why we consider the 14-resolvable problem of 𝒜 instead of the 12-resolvable one, as in the previous example with the NFA . Refer to Figure 7 for a modified example. Our intention is to force the 12 probability split using words of the form wpwσ, where |w|=1 and σ{,}, however the construction introduces other words that need to be managed. For example, the words wpa(ab)i and wpa(ab)i belong to (𝒜) for all i+. However, for the simple PFA 𝒫 based on 𝒜, we have 𝒫(wpa(ab)i)=12i+1<12 and 𝒫(wpa(ab)i)12 for all i+. Even if we set the probability of the run of 𝒫 from the state q0 to p on wp to be 1, we still have 𝒫(wpa(ab)i)0 as i. That is, when we introduce the transitions (q,,qf) and (r,,qf), we may also introduce additional words into (𝒜). However, based on our tentative construction of 𝒜, it is possible that (𝒫12)(𝒜), regardless of whether 𝒫 is universal or not. The words in (𝒜)(𝒫12) are of the form $0pwσ, where pQ, wΣ with |w|1, and σ is a symbol introduced for a nondeterministic transition, such as or , etc.

To address this issue, we ensure the probability is at least 14 probability when |w|1, we construct a DFA 𝒜extra recognising the language {$0}Q(ΣΣ){,,} and add it to 𝒜. The automaton 𝒜extra includes a unique transition from the initial state q0 to a state x upon reading symbol $0. This transition (q0,$0,x) is the same as the one shown in Figure 8, with the rest of 𝒜extra continuing from x. For every simple PFA based on the automaton given in Figure 8, the probability value of the transition (q0,$0,x) is 12. Thus, for every additional word wext, we have 𝒫(w)14, ensuring that property C.3a holds. Hence, the constructed 𝒜 satisfies properties C.1–C.3.

From Lemma 3, it follows that the λ-resolvability problem for NFA is undecidable.

4 Deciding Resolvability for Unary Finite Automata

Theorem 4.

Positive resolvability is in 𝖭𝖯𝖼𝗈𝖭𝖯 for unary NFA.

For a unary NFA a memoryless stochastic resolver induces a unary probabilistic automaton, or equivalently a Markov chain. This is given by an initial distribution as a row vector I[0,1]d, a stochastic matrix P[0,1]d×d and a final distribution as a column vector F[0,1]d such that 𝒫(an)=IPnF. We make use of the following lemma, which summarises standard results in Markov chain theory to our needs (see e.g. [30, Sec 1.2-1.5] or [34, Sec 1.8]). The lemma shows that there are a sequence of limit distributions that are visited periodically. Essentially, we get, for each word length n, a set of reachable states, and except for a possible initial sequence, these sets of states repeat periodically. Once in the periodical part, whenever there is a reachable accepting state, there must be some reachable accepting state in a bottom strongly connected component (SCC) to ensure the probability is bounded away from zero. The key point of the following lemma is to translate this into the support of the limit distributions for these states to be non-zero / zero for reachable states in- / outside of bottom SCCs, so that we only need to consider the support graph of the Markov chain, not the probabilities themselves. This allows us to guess the support of the resolver in 𝖭𝖯 and verify in 𝖼𝗈𝖭𝖯 that any resolver with this support would suffice.

Lemma 5.

Let P be a d-dimensional Markov chain with initial distribution I. There exists T, bounded by an exponential in d, and limit distributions π(0),,π(T1)[0,1]d, such that limnIPk(PT)n=π(k). Furthermore, π(k)(q) is non-zero if and only if

  1. 1.

    q is in a bottom SCC, and

  2. 2.

    q is reachable in P from some state in I by some path of length k+T for some d.

We now show how to decide whether there is a stochastic memoryless resolver.

Proof of Theorem 4.

Let 𝒜=({a},Q,q0,Δ,F) be a unary NFA over the alphabet {a}, with |Q|=d, initial state q0 encoded in a row vector I{0,1}d and final states encoded in a column vector F{0,1}d. We ask if there is a P[0,1]d×d with support at most Δ and λ such that IPnFλ whenever an(𝒜).

If P exists, it has some support SΔ and we guess this support of P non-deterministically. The choice of support induces a new NFA 𝒜S𝒜, in which every edge will be attributed a non-zero probability and (𝒜S)={anIPnF>0}. We verify, in 𝖼𝗈𝖭𝖯 [43], that (𝒜S)=(𝒜). If not, this is not a good support.

Henceforth, we assume (𝒜S)=(𝒜) and consider the condition to check whether the support S is good. For any P with support S we have IPnF>0 for an(𝒜S). It remains to decide whether this probability can be bounded away from zero, that is for some λ>0, IPnF>λ whenever an(𝒜S). The condition we describe is independent of the exact choice of P and is based only on the structure of 𝒜S. Using T from Lemma 5 we decompose (𝒜S) into T phases and define for all k{0,,T1} the set k={ak+Tnn}(𝒜). Each k is either finite, in which case it turns out there is nothing to do, or eventually periodic with period T, in which case we use Lemma 5’s characterisation of non-zero limit:

k is finite.

There is nothing to decide: any P with support S induces a lower bound min{IPk(PT)nFn,ak+Tnk}>0 on the weight of the words in k, as the minimum over a finite set of non-zero values.

k is eventually periodic.

We check there exists a path from q0 to some final state qfF of length k+T for some d, and that qf is in some bottom SCC in 𝒜𝒮. Then for any P with support S, Lemma 5 entails a limit distribution π(k)[0,1]d such that limnIPk(PT)n=π(k), in which π(k)(qf) is non-zero. Thus limnIPk(PT)nF=π(k)F=ϵk>0. In particular, there exists nk such that, for all n>nk, we have IPk(PT)nF>ϵk/2. Hence, there is a lower bound on the weights of words in k: min{IPk(PT)nFn:ak+Tnk,nnk}{ϵk/2}>0, which is a minimum over a finite set of non-zero values.
If there is no such path, then for any P with support S, the limit distribution is zero in all final states: the probability tends to zero no matter the exact choice of probabilities.

For a given k, it can be decided in polynomial time whether k is finite and whether there is a path of the given type. On a boolean matrix AS representing the reachability graph of 𝒜S, the vector I(AS)k and boolean matrix (AS)T can be computed by iterated squaring in which the reachability questions can be checked.

Thus to summarise, our procedure guesses a support SΔ and the period T in 𝖭𝖯, and verifies in 𝖼𝗈𝖭𝖯 both that (𝒜𝒮)=(𝒜) and guess the k<T to verify the required reachability queries for k. In Theorem 11 we show that the problem is 𝖼𝗈𝖭𝖯-hard already in the finite-ambiguous case, we present this result alongside the non-unary case in Section 6 due to commonalities.

5 Unambiguous Finite Automata

Given an NFA 𝒜, a support S is bad if there is no resolver over S that positively resolves 𝒜, that is, 𝒫𝒜 is not a positively resolvable solution to 𝒜 for each over S. We start this section with a property related to bad supports for finitely-ambiguous automata, which we use to derive the decidability and complexity bounds for the resolvability problems.

Lemma 6.

Let S be a support for an FNFA 𝒜 with (𝒜)=(𝒜S). For a word w with k accepting runs, π1,,πk, let b(w) be the minimum number of nondeterministic transitions present in any of the πi. Then S is a bad support if and only if there is an infinite sequence {wi}i of words such that {b(wi)}i is a strictly increasing sequence.

For a UFA– where each word has exactly one accepting run – removing a transition without changing the language implies that the transition either originates from an unreachable state or leads to a state with empty language. Such transitions can thus be safely removed or assigned probability zero. Assuming the UFA is trim, its support is unique. It is not positively resolvable if and only if this support is bad.

It is easy to see that a UFA is not positively resolvable if it admits an accepting run of the form q0𝑥q𝑦q𝑧f, where q0 is the initial state, f is an accepting state, and there is a nondeterministic transition taken while reading the infix y. By pumping y, we obtain a sequence of accepted words of the form xyiz, each with a unique accepting run, but with decreasing probabilities assigned by any stochastic resolver. This follows from the fact that the loop induced by y contains a nondeterministic transition, which causes the probability mass to diminish. The UFA in Figure 1(b) illustrates this phenomenon: it is unambiguous but not positively resolvable. This is witnessed by the word bb, where the first b corresponds to the nondeterministic, pumpable part of the word.

In the following, we show that the existence of such a witness word is both a necessary and sufficient condition for a UFA not to be positively resolvable.

Lemma 7.

A UFA 𝒜 is not positively resolvable if and only if there exists a word w=xyz(𝒜) such that the accepting run on w satisfies the following conditions:

  1. 1.

    After reading the prefix x, the run reaches a state qδ𝒜(q0,x), and after subsequently reading y, it returns to the same state, i.e., qδ𝒜(q,y). Moreover, reading z from q leads to an accepting state: δ𝒜(q,z)F.

  2. 2.

    The words y and z begin with the same letter a, it follows that the transition taken when reading y from q is nondeterministic.

By guessing this witnessing word of Lemma 7 letter by letter, we have an NL procedure for deciding whether a UFA is positively resolvable or not.

Theorem 8.

The positive resolvability problem for UFA is in NL.

We can show a matching lower bound in the unambiguous case by a straightforward reduction from the emptiness problem for UFA, which is known to be NL-complete.

Theorem 9.

Given a UFA, it is NL-hard to decide if it is positively resolvable, and NL-hard to decide if it is λ-resolvable for any fixed λ>0.

For a positively resolvable UFA 𝒜, Lemma 7 essentially states that no accepting run may contain nondeterministic transitions in its looping part. This is equivalent to requiring that all transitions within SCCs of 𝒜 are deterministic. Exploiting this structural property, we can compute the largest possible value of λ such that 𝒜 is λ-resolvable. To do so, we collapse all SCCs into single nodes, yielding a rooted directed acyclic graph (DAG), and reduce the problem to counting the maximum number of disjoint paths in this DAG, which can be computed in polynomial time.

Theorem 10.

It is polynomial time to decide whether a UFA is λ-resolvable.

6 Finitely-Ambiguous Finite Automata

In this section we establish decidability and hardness for both positive resolvability and λ-resolvability for finitely-ambiguous NFA.

6.1 Hardness of Resolvability

We show that when an NFA is finitely-ambiguous, deciding the existence of a resolver, and the existence of a λ-resolver are both 𝖼𝗈𝖭𝖯-hard in the unary case and 𝖯𝖲𝖯𝖠𝖢𝖤-hard otherwise. While the unary and non-unary cases differ slightly, both are based on deciding whether the union of k given DFAs are universal.

The ideas of both proofs are the same, we will extend the given automaton with a new component that ensures it is universal, but the new component itself will not be positively resolvable (see Figure 9). Therefore, if the existing k-DFAs are universal then the resolver that uniformly resolves between these k-DFAs (assigning zero weight to the new component) is sufficient. However, if the k-DFAs are not themselves universal, then the new component must be used to recognise some words, but this component is not positively resolvable, and so neither is the whole automaton. The difference between the proofs will be how we ensure this works even if only a single short word is not in the union of the k-DFAs.

Figure 9: Conceptual idea of hardness in both unary and non-unary cases (exact details differ).

In the unary case we reduce from the problem of whether a unary NFA is universal which is 𝖼𝗈𝖭𝖯-hard [43], but similarly to [13, Theorem 7.20], we can assume that the shape is the union of simple cycles. By bringing into Chrobak normal form in polynomial time the automaton has an initial stem and a nondeterministic transition to k cycles at the end of the stem. But since universality requires that all words are accepting, each state of the stem must be accepting, which can be pre-checked in polynomial time. Thus the hard case remains to determine whether the union of the remaining k-cycle DFAs are universal.

Theorem 11.

Given a unary k-ambiguous NFA it is 𝖼𝗈𝖭𝖯-hard to decide if it is positively resolvable, and 𝖼𝗈𝖭𝖯-hard to decide if it is 1/(k1)-resolvable for 1<k.

In the non-unary case we show 𝖯𝖲𝖯𝖠𝖢𝖤-hardness via the problem asking whether the union language of k-DFAs is universal, which is 𝖯𝖲𝖯𝖠𝖢𝖤-complete. This problem can be seen as the complement of the (well-known) problem of intersection emptiness for DFAs, that is, whether the intersection of k (not fixed) DFAs is empty, which is known to be 𝖯𝖲𝖯𝖠𝖢𝖤-complete [26]. The unary case exploits the cyclic structure to ensure that if some word is not in the union, then there are indeed infinitely many missing words. There is no such natural analogue in the non-unary case requiring a modified construction.

Theorem 12.

Given a k-ambiguous NFA, it is 𝖯𝖲𝖯𝖠𝖢𝖤-hard to decide if it is positively resolvable, and 𝖯𝖲𝖯𝖠𝖢𝖤-hard to decide if it is 1/(k2)-resolvable for 2<k.

6.2 Deciding Positive Resolvability for Finitely-Ambiguous NFA

In Section 5, we established positive resolvability for unambiguous automata by identifying a witnessing “bad” word. In this section, we generalise the notion of a “bad” word to finitely-ambiguous NFA. For any UFA 𝒜, there exists a unique support S such that (𝒜)=(𝒜S) assuming 𝒜 is trim. However, when 𝒜 is no longer unambiguous, there may be multiple such supports S satisfying (𝒜)=(𝒜S). If 𝒜 is not positively resolvable, then all of its supports are bad, in the sense that no stochastic resolver over any of these supports can positively resolve 𝒜. Our algorithm for deciding positive resolvability works by checking if supports of 𝒜 are bad. We characterise a bad support S, using a witness bad word that satisfies several conditions. This is a generalisation of the witnessing word in the UFA case. Intuitively, a bad word for a support is a word, which contain subwords, that can be pumped arbitrarily to produce new words with acceptance probability arbitrarily close to 0. These “pumpable” subwords must preserve some reachability behaviour as well as contain probabilistic choices with probability in (0,1).

Definition 13 (Bad word).

Let 𝒜 be an FNFA and SΔ be a support. Then a word wΣ with M accepting runs is a bad word for S if for some M, there exists a decomposition w=x0y1x1yx with words x0,,xΣ, y1,,yΣ+, sets of states R1,,R, Q1,,QQ, and states q1,,q with qiQi for each i[] such that:

  1. 1.

    For each i[], all accepting runs of w in 𝒜S from q0 end in Qi after reading x0y1xi1, i.e., qδ𝒜S(q0,x0y1xi1) and δ𝒜S(q,yix)F qQi.

  2. 2.

    An accepting run of w in 𝒜S must be in some qi for some i[] after reading x0y1x1yi.

  3. 3.

    For each i[] and each qQi, every accepting run of w that reaches q after reading the prefix x0y1xi1 also returns to q after subsequently reading yi. Moreover, when q=qi, this run of yi from qi to qi contains at least one transition from S which is nondeterministic in 𝒜S.

  4. 4.

    For each i[], Ri contains all states that are reached from q0 after reading x0y1xi1, but has no continuation to an accepting run in 𝒜S for the remaining suffix yixix, i,e., qδ𝒜S(q0,x0y1xi1) and δ𝒜S(q,yix)F= qRi. Moreover, Ri is also exactly the set of states that are reached from q0 after reading x0y1xi1yi, with no continuation to an accepting run in 𝒜S for the remaining suffix xix, i.e., qδ𝒜S(q0,x0y1xi1yi) and δ𝒜S(q,xix)F= qRi.

Example 14.

The NFA 𝒜 in Figure 10(a) is 4-ambiguous. Consider the full support S containing all transitions of 𝒜. The word w=abbabbac serves as a bad word witness for S, with decomposition w=x0y1x1y2x2 where =2, x0=ab, y1=b, x1=ab, y2=b, and x2=ac. There are four distinct accepting runs on w; see Figure 10(b) for an illustration. Based on Definition 13, for w, we have Q1={q1,q3}, Q2={q4,q6} and R1=R2={qf}. Among the four accepting runs, two take nondeterministic transitions from S when reading y1, and the other two do so when reading y2. Runs from Qi to Qi are highlighted and nondeterministic transitions are coloured in the figure. This shows that w is a bad word for S: the entire sequence of words {x0y1ix1y2ix2}i1 admits four accepting runs each, and the probability assigned to each such word diminishes as i increases under any stochastic resolver over S. In fact, this automaton is not positively resolvable. Although there exists another support which still preserves the language of 𝒜 – the one that excludes the transitions going through q2, we can show that this support is also bad, witnessed by the same bad word. With this support, we no longer have the second accepting run in Figure 10(b).  

(a) Non-positively resolvable FNFA. 
(b) Four accepting runs on w.
Figure 10: A bad word w=x0y1x1y2x2=abbabbac, where x0=ab, y1=b, x1=ab, y2=b, and x2=ac. The set R includes all reachable states from which no accepting run exists for the remaining suffix.

Detecting bad words involves finding a decomposition as well as suitable Qi’s, qi’s and Ri’s. In order to explicitly track these objects for some word, we consider an automata Γ𝒜, called the run automaton of 𝒜. Intuitively, a run of a word on Γ𝒜, records all the states reached in accepting runs of w as well as the reachable states from which there are no continuation to accepting runs.

Run automata.

Let 𝒜 be k-ambiguous. Then the run automaton Γ𝒜 has state space Qk×2Q, and transitions ((q1,,qk),R)𝑎((q1,,qk),R) iff qi𝑎qi in 𝒜 and qR,δ(q,a)R. Also, for every state (𝐪,R) in Γ𝒜, the set of states in the tuple 𝐪 and the set R are disjoint. Every word w=a1at(𝒜) with k accepting runs has a run on Γ𝒜 from initial state ((q0)k,) to (𝐪,Q) where 𝐪Fk and QF= such that 1) in the ith step of the run, it reaches ((q1i,,qki),Ri) if the jth accepting run of w is in qji after reading a1ai and 2) qRi iff there is no accepting run of ai+1at from the reachable state q. We call such a run, a nice run of w in Γ𝒜. For a word in (𝒜) with strictly fewer than k accepting runs will have such a run on Γ𝒜, where for some i1i2, qji1 = qji2 for all j, i.e. there will be at least two copies of same run. Every word w has a unique nice run on Γ𝒜 up to duplication and shuffling of accepting runs. A bad word for S is essentially a word in (AS) which has a nice run on Γ𝒜S such that in this nice run, the component of the run on the subword yi is a self-loop in Γ𝒜S with several accepting runs containing a nondeterministic transition from S. In Example 14 these self loops happen at states ((q1,q1,q3,q3),{qf}) and ((q4,q4,q6,q6),{qf}) in the nice run of the bad word in the run automata.

The following lemma ensures that for the loop words yi in Definition 13, there is always a unique loop from any state qQi back to itself. Assume there are two loops from q to q over the word y. Let x be a word that there is a run from q0 to q and z a word that there is run from q to a final state. Then, the sequence of words wi=xyiz admits an unbounded number of accepting runs, contradicting that the automaton is finitely-ambiguous.

Lemma 15.

In an FNFA, for any accepting run containing a loop from q to q over the word y, it is the unique loop from q to q over y.

A nice run for a bad word contains a cycle corresponding to each subword yi. The following lemma ensures that we can construct new words by pumping these subwords while preserving the number of accepting runs.

Lemma 16.

Let w=xyz be a word in (𝒜S) with M accepting runs, whose nice run in Γ𝒜S has a cycle on the subword y. Then for each j, xyjz also has M accepting runs.

Corollary 17.

Let w=x0y1x1x be a bad word for support S with M accepting runs. Then for each (j1,,j), x0y1j1x1y2j2yjx also has M accepting runs.

For FNFA, a support S is bad when either (𝒜S)(𝒜) or there is a bad word to witness that the support is bad. The following is a key lemma of this section, demonstrating that the existence of such a word is necessary and sufficient for a support to be bad.

Lemma 18 (Bad support-bad word).

Let 𝒜 be an FNFA, and let SΔ be a support. Then, S is a bad support if and only if (𝒜S)(𝒜) or there exists a bad word for S.

Proof Sketch.

One direction is straightforward: If there exists a bad word as defined in Definition 13, we construct a sequence of words by simultaneously pumping all the loop words. By Corollary 17, each word in this sequence has the same number of accepting runs. However, the number of nondeterministic transitions in the accepting runs of each word increases. By Lemma 6, this implies that the support is bad.

Towards the other direction, suppose we are given a bad support. Then, by Lemma 6, there exists a sequence of words whose accepting runs contain an increasing number of nondeterministic transitions. We select a word w from this sequence such that every accepting run of w contains more nondeterministic transitions than the number of states in the run automaton. This ensures that, in any nice run over w in the run automaton, each accepting run must traverse a self-loop that includes a nondeterministic transition. Formally, for the ith accepting run, the word w can be decomposed as xiyizi, where a nice run reaches the state (𝐪i,Ri) after reading xi, and returns to (𝐪i,Ri) after reading the loop word yi. Moreover, the subrun over yi contains at least one nondeterministic transition. Since the loop segments yi may overlap across different accepting runs, we construct a new word w by pumping these loop segments to ensure they are disjoint. The resulting word w satisfies all the conditions of Definition 13, and is therefore a bad word.

To decide the positive resolvability of an FNFA 𝒜, we consider all possible supports S such that (𝒜S)=(𝒜), and check whether each support is bad by analysing the run automaton Γ𝒜S. According to Lemma 18, if a support is bad, there must exist a bad word for it, and there must also be a corresponding nice run over this word in Γ𝒜S. This nice run encodes the structure of all accepting runs of 𝒜S on the bad word. In particular, for each accepting run π of 𝒜S, the nice run in Γ𝒜S includes a loop that contains at least one nondeterministic transition from S in its component corresponding to π. To show that a support is bad, it suffices to search for such nice runs in Γ𝒜S, which gives us a decidable procedure. A naive algorithm to check for a bad word would be to nondeterministically guess a nice run of a bad word in Γ𝒜S from ((q0)k,) to (𝐪,Q) with 𝐪Fk and QF=. This involves guessing a letter at each step, keeping track of states reached in each run, i.e. at jth step computing the states (q1j,,qkj) and guessing Rj for state ((q1j,,qkj),Rj) in Γ𝒜S. For the bad word decomposition, we would also need to guess the states Qi and the state qiQi for simulating the cycle in Γ𝒜S with nondeterministic transition in some run. We also track runs that have already seen nondeterministic transition in some cycle on 𝒜S. Finally, we have a bad word, if all runs have seen nondeterministic transitions in some cycle and the sets Rj’s are consistent with the final guessed word.

However, given an FNFA, since its degree of ambiguity k is known to be bounded by 5|Q|2|Q||Q| [46], the size of the run automaton Γ𝒜S can be |Q|k2|Q| in the worst case, which is doubly exponential in the size of 𝒜. Hence the described procedure is not in 𝖯𝖲𝖯𝖠𝖢𝖤. By slightly modifying this procedure, instead of storing the state tuple (q1j,,qkj) reached at every step, we store the set of states Aj={q1j,,qkj} along with keeping track of those states Gj in Aj, to which all accepting runs are yet to see nondeterministic transitions in some cycle in Γ𝒜S. Additionally, for the cycle part, when we guess Qi, since from Lemma 15 we know that every state qQi has unique run to itself for the subword yi, there are at most n runs to track in this part. So we arbitrarily order the runs and track the progression of these runs in the cycle. Note that, in this part any transition doesn’t change the size of the sets Ai and hence are bijections on Ai. We guess these bijections until the compositions of all the bijections is the identity map, i.e. each run has returned to the point of entering the cycle. At the end of the cycle we remove all states from Gi, whose cycles have encountered nondeterministic transitions from S. Since this procedure stores information only about sets Aj,Gj,Rj of size at most n, as well as bijections on [n], the state space can be described using O(n2n+4), giving us a 𝖯𝖲𝖯𝖠𝖢𝖤 procedure for detecting bad words.

Theorem 19.

It can be decided in 𝖯𝖲𝖯𝖠𝖢𝖤 if an FNFA is positively resolvable. Moreover, the shortest bad word is of length at most O(n2n+4).

Proof.

We provide a 𝖯𝖲𝖯𝖠𝖢𝖤  algorithm for the complement problem, i.e. checking if the given FNFA is not positively resolvable. The first step is to go through all possible supports SΔ that are language equivalent to 𝒜. This can be checked in 𝖯𝖲𝖯𝖠𝖢𝖤[43] for general NFA.

Given a support S with (𝒜S)=(𝒜), we check whether it is bad by nondeterministically guessing a bad word w. Specifically, we guess a word of the form w=x0y1x1yx, satisfying the conditions of Definition 13, letter by letter. During this process, we also guess the start and end points of each yi, and simultaneously track an abstraction of the accepting runs, as well as of all non-accepting runs.

While reading a part xi, which we call branching, or yi, which we call looping, the abstraction intuitively preserves the following for a bad word: (1) which states are reachable on the overall word read so far, but only appear on rejecting runs in a set R, (2) which states are part of an accepting run of the overall word in a set A, and (3) which states are part of the accepting runs but have not yet been shown to be “bad”, in a set G; formally, these are the states reached by an accepting run whose certificate state is qj (2nd item in Definition 13) with j>i. The formal rules for these sets are: RA= and GA.

The update rules from sets R,A,G to R,A,G when guessing a letter a are that all a-successors of a state in R must be in R, all a-successors of a state in A must be in AR and at least one of them must be in A, and all states in G must be a-successors of states in G.

When entering a looping part yi, we remember the set R and denote as R0. On reading yi the abstraction additionally tracks (4) the set A of states that occurs on some accepting run at the beginning of yi and remember as A0(A0 is the Qi from Lemma 18), (5) which state qA0 is on the path for the runs with index i (that start and end with qi in terms of Lemma 18), (6) whether this path through yi has seen a non-deterministic transition using a boolean flag, and (7) a bijection f:A0A.

The update rules when guessing a letter a in the looping part additionally require that, for all states qA resp. qG, exactly one a-successor is in A resp. G; q is left unchanged, and the boolean flag is set to true if the a-transition from f(q) is non-deterministic; otherwise it is left unchanged. The bijection f is updated to f such that, if f:qp, then f:qp such that pA and p is an a-successor of p.

Moving from the branching mode to looping mode can be done through an ε-transition, setting A0 to A, f to the identity and R0 to R, guessing qiG and setting the boolean flag to false. Moving back to branching mode happens through an ε-transition that can be taken when the boolean flag is set to true, f is the identity, A is A0 and R is R0. q is removed from G in this ε-transition.

Finally, we accept the run when we reach a state with RF= and G=AF in the branching mode.

The algorithm essentially reduces to a reachability problem on a graph with an exponential number of nodes. However, rather than explicitly constructing this graph, we operate on abstractions involving only a constant number of sets, variables, and functions, thereby requiring only polynomial space. The algorithm is then in NPSPACE, hence, in 𝖯𝖲𝖯𝖠𝖢𝖤, since NPSPACE=𝖯𝖲𝖯𝖠𝖢𝖤[39].

To show the correctness of the algorithm, we prove that a bad word exists if and only if we can construct an accepting run in the graph. For a bad word w=x0y1x1yx for some with M accepting runs, we observe that the M accepting runs do not have a natural order among them, and that a repetition of each yi may diminish the probability mass of several accepting runs. We give each accepting run an index i that refers to the first yi that diminishes it. In particular, the accepting runs with index i are in qi after reading x0y1yi. We simply take the terms from Definition 13 and construct an accepting run in the graph.

We can likewise construct a bad word from an accepting run on the graph as follows: starting with x0, the words between two ϵ-transitions define words x0,y1,x1,y2,; for the yi we also store their respective A0 and q as Qi and qi, respectively. It is now easy to see that this satisfies all local conditions of Definition 13, so that all we need to show is that all accepting runs are in qi after reading x0y1yi for some i. But this is guaranteed by G=.

We get as a side result, the shortest bad word cannot be longer than the size of the graph described, and thus, O(n2n+4). This is a rough bound: each state can appear in both the domain and range of the bijection, leading to at most 2n possibilities. There are further 2 possibilities: if a state is in the range of the bijection, then it belongs to A, and consequently, it can also be in G; if it is not in the range of the bijection, then it does not belong to A and can either be in R (since R and A are disjoint) or not. In addition, it can be the state q that we need to track in step 5. It may be in the set R0 or not.

6.3 Deciding 𝝀-Resolvability for Finitely-Ambiguous NFA

Here we will provide an algorithm to decide λ-resolvability for FNFA. We do this by building a finite system of inequalities and check if it is satisfiable. Decidability follows from the decidability of first-order theory of reals [44]. Towards this, we consider primitive words: a word w is primitive for S if a nice run of w in Γ𝒜S has no cycles.

Theorem 20.

It is decidable whether an FNFA is λ-resolvable.

Proof Sketch.

The key idea is that for each primitive word w and corresponding nice run π in the run automaton, we can obtain a number zw, which is a lower bound on the probability of any word whose nice run is the same as π without the self loops. Moreover, we can find a sequence of such words whose limit probability is zw. Hence, the automaton is λ-resolvable if and only if there is a support that satisfies zwλ for every primitive word w.

To encode this idea in a formula in the theory of the reals, we have a variable xτS for each τS, to express the probabilities assigned by some stochastic resolver over a given support S. Let ΘS denote the set of constraints ensuring that the variables {xτS}τS satisfy the probabilistic constraints and take values strictly within (0,1].

The set PS of all primitive words associated with the support S can be obtained from the run automaton Γ𝒜, along with the corresponding symbolic probability zw. We define the formula for the support S as φS:=wPSφwS, where φwS:=zwλ for each wPS. This gives our final system of inequalities φ:=SΔ{xτS}τS(ΘSφS).

We conclude by noting that our analysis does not extend to NFA that are not finitely-ambiguous, as Lemma 6 fails for bad supports in this setting.

7 Discussion

We have introduced the notion of λ-resolvability as a new measure for the degree of nondeterminism. We showed that checking this property is undecidable for NFA, and provided further decidability and complexity results for important special cases, in particular finitely-ambiguous automata.

This opens new fields of study, especially whether there are more meaningful classes of NFA where positive or λ-resolvability are decidable. More immediate future work includes closing the remaining complexity gaps and discovering whether or not checking positive resolvability for general NFA is decidable.

Other challenges that arise are how these results extend to more expressive languages, such as (visible) counter or pushdown languages, and how they extend to ω-regular languages. For the latter challenge, several of our results transfer elegantly. The undecidability of λ-resolvability holds even for weak ω-automata. For finitely-ambiguous case, we can just adjust our definition of bad words to bad prefixes: where the accepting and rejecting runs in a bad word end in final and non-final states for bad words, for bad prefixes there needs to be some infinite word that is accepted from all states the prefixes of accepting runs end in but from none of the states the prefixes of non-accepting runs end in. Checking if such a word exists can be done in 𝖯𝖲𝖯𝖠𝖢𝖤 for nondeterministic parity automata (NPA). It follows that the positive resolvability problem for finitely-ambiguous NPA is 𝖯𝖲𝖯𝖠𝖢𝖤-complete. The λ-resolvability problem is also decidable for finitely-ambiguous NPA. We give details in Appendix A.

References

  • [1] Bader Abu Radi and Orna Kupferman. Minimizing gfg transition-based automata. In International Colloquium on Automata, Languages and Programming (ICALP), 2019. doi:10.4230/LIPIcs.ICALP.2019.100.
  • [2] Rajab Aghamov, Christel Baier, Toghrul Karimov, Joris Nieuwveld, Joël Ouaknine, Jakob Piribauer, and Mihir Vahanwala. Model checking markov chains as distribution transformers. In Principles of Verification: Cycling the Probabilistic Landscape - Essays Dedicated to Joost-Pieter Katoen on the Occasion of His 60th Birthday, Part II, volume 15261 of Lecture Notes in Computer Science, pages 293–313. Springer, 2024. doi:10.1007/978-3-031-75775-4_13.
  • [3] Marc Bagnol and Denis Kuperberg. Büchi Good-for-Games Automata Are Efficiently Recognizable. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), pages 16:1–16:14, 2018. doi:10.4230/LIPIcs.FSTTCS.2018.16.
  • [4] Christel Baier, Luca de Alfaro, Vojtěch Forejt, and Marta Kwiatkowska. Model Checking Probabilistic Systems, pages 963–999. Springer International Publishing, 2018. doi:10.1007/978-3-319-10575-8_28.
  • [5] Christel Baier, Florian Funke, Simon Jantsch, Toghrul Karimov, Engel Lefaucheux, Joël Ouaknine, David Purser, Markus A. Whiteland, and James Worrell. Parameter synthesis for parametric probabilistic dynamical systems and prefix-independent specifications. In 33rd International Conference on Concurrency Theory, CONCUR 2022, September 12-16, 2022, Warsaw, Poland, volume 243 of LIPIcs, pages 10:1–10:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.CONCUR.2022.10.
  • [6] Christel Baier, Holger Hermanns, and Joost-Pieter Katoen. The 10,000 Facets of MDP Model Checking, pages 420–451. Springer-Verlag, 2022. doi:10.1007/978-3-319-91908-9_21.
  • [7] Christel Baier, Stefan Kiefer, Joachim Klein, David Müller, and James Worrell. Markov chains and unambiguous automata. J. Comput. Syst. Sci., 136:113–134, 2023. doi:10.1016/J.JCSS.2023.03.005.
  • [8] Udi Boker and Karoliina Lehtinen. Good for games automata: From nondeterminism to alternation. In International Conference on Concurrency Theory (CONCUR), volume 140, pages 19:1–19:16, 2019. doi:10.4230/LIPIcs.CONCUR.2019.19.
  • [9] Udi Boker and Karoliina Lehtinen. History Determinism vs. Good for Gameness in Quantitative Automata. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), pages 38:1–38:20, 2021. doi:10.4230/LIPIcs.FSTTCS.2021.38.
  • [10] Udi Boker and Karoliina Lehtinen. Token games and history-deterministic quantitative automata. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), pages 120–139. Springer International Publishing, 2022. doi:10.1007/978-3-030-99253-8_7.
  • [11] Sougata Bose, Thomas A. Henzinger, Karoliina Lehtinen, Sven Schewe, and Patrick Totzke. History-deterministic timed automata are not determinizable. In International Workshop on Reachability Problems (RP), 2022. doi:10.1007/978-3-031-19135-0_5.
  • [12] Sougata Bose, Thomas A. Henzinger, Karoliina Lehtinen, Sven Schewe, and Patrick Totzke. History-deterministic timed automata. Log Meth Comput Sci, Volume 20, Issue 4, October 2024. doi:10.46298/lmcs-20(4:1)2024.
  • [13] Dmitry Chistikov, Stefan Kiefer, Andrzej S. Murawski, and David Purser. The Big-O Problem. Log Meth Comput Sci, 18(1), 2022. doi:10.46298/LMCS-18(1:40)2022.
  • [14] Thomas Colcombet. The theory of stabilisation monoids and regular cost functions. In International Colloquium on Automata, Languages and Programming (ICALP), pages 139–150, 2009. doi:10.1007/978-3-642-02930-1_12.
  • [15] Wojciech Czerwinski, Engel Lefaucheux, Filip Mazowiecki, David Purser, and Markus A. Whiteland. The boundedness and zero isolation problems for weighted automata over nonnegative rationals. In LICS ’22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 15:1–15:13. ACM, 2022. doi:10.1145/3531130.3533336.
  • [16] Laure Daviaud, Marcin Jurdziński, Ranko Lazić, Filip Mazowiecki, Guillermo A. Pérez, and James Worrell. When are emptiness and containment decidable for probabilistic automata? J. Comput. Syst. Sci., 119:78–96, 2021. doi:10.1016/j.jcss.2021.01.006.
  • [17] Nathanaël Fijalkow, Hugo Gimbert, Edon Kelmendi, and Youssouf Oualhadj. Deciding the value 1 problem for probabilistic leaktight automata. Log. Methods Comput. Sci., 11(2), 2015. doi:10.2168/LMCS-11(2:12)2015.
  • [18] Nathanaël Fijalkow, Cristian Riveros, and James Worrell. Probabilistic automata of bounded ambiguity. Information and Computation, 282:104648, 2022. Special issue on 9th International Workshop Weighted Automata: Theory and Applications (WATA 2018). doi:10.1016/j.ic.2020.104648.
  • [19] Hugo Gimbert and Youssouf Oualhadj. Probabilistic automata on finite words: Decidable and undecidable problems. In Automata, Languages and Programming, pages 527–538, 2010. doi:10.1007/978-3-642-14162-1_44.
  • [20] Shibashis Guha, Ismaël Jecker, Karoliina Lehtinen, and Martin Zimmermann. A Bit of Nondeterminism Makes Pushdown Automata Expressive and Succinct. In International Symposium on Mathematical Foundations of Computer Science (MFCS), pages 53:1–53:20, 2021. doi:10.4230/LIPIcs.MFCS.2021.53.
  • [21] Ernst Moritz Hahn, Guangyuan Li, Sven Schewe, Andrea Turrini, and Lijun Zhang. Lazy probabilistic model checking without determinisation. In International Conference on Concurrency Theory (CONCUR), pages 354–367, 2015. doi:10.4230/LIPIcs.CONCUR.2015.354.
  • [22] Ernst Moritz Hahn, Mateo Perez, Sven Schewe, Fabio Somenzi, Ashutosh Trivedi, and Dominik Wojtczak. Good-for-mdps automata for probabilistic analysis and reinforcement learning. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), volume 12078, pages 306–323. Springer, 2020. doi:10.1007/978-3-030-45190-5_17.
  • [23] Thomas A. Henzinger, Karoliina Lehtinen, and Patrick Totzke. History-deterministic timed automata. In International Conference on Concurrency Theory (CONCUR), 2022. doi:10.4230/LIPIcs.CONCUR.2022.14.
  • [24] Thomas A. Henzinger and Nir Piterman. Solving games without determinization. In Computer Science Logic (CSL), pages 395–410. Springer Berlin Heidelberg, 2006. doi:10.1007/11874683_26.
  • [25] Thomas A. Henzinger, Aditya Prakash, and K. S. Thejaswini. Resolving nondeterminism with randomness, 2025.
  • [26] Dexter Kozen. Lower bounds for natural proof systems. In 18th Annual Symposium on Foundations of Computer Science (sfcs 1977), pages 254–266, 1977. doi:10.1109/SFCS.1977.16.
  • [27] Denis Kuperberg and Michał Skrzypczak. On determinisation of good-for-games automata. In International Colloquium on Automata, Languages and Programming (ICALP), pages 299–310, 2015. doi:10.1007/978-3-662-47666-6_24.
  • [28] Orna Kupferman, Shmuel Safra, and Moshe Y Vardi. Relating word and tree automata. Ann. Pure Appl. Logic, 138(1-3):126–146, 2006. doi:10.1016/J.APAL.2005.06.009.
  • [29] Orna Kupferman and Moshe Y. Vardi. Weak alternating automata are not that weak. ACM Trans. Comput. Log., 2(3):408–429, 2001. doi:10.1145/377978.377993.
  • [30] Gregory F. Lawler. Introduction to Stochastic Processes. Chapman and Hall/CRC, 2nd edition, 2010.
  • [31] Karoliina Lehtinen and Aditya Prakash. The 2-token theorem: Recognising history-deterministic parity automata efficiently, 2025.
  • [32] Karoliina Lehtinen and Martin Zimmermann. Good-for-games ω-pushdown automata. Log Meth Comput Sci, 18, 2022. doi:10.1145/3373718.3394737.
  • [33] Yong Li, Soumyajit Paul, Sven Schewe, and Qiyi Tang. Accelerating markov chain model checking: Good-for-games meets unambiguous automata. In Computer Aided Verification (CAV), 2025.
  • [34] J.R. Norris. Markov Chains. Cambridge University Press, 1998.
  • [35] Alexander Okhotin. Unambiguous finite automata over a unary alphabet. Information and Computation, 212:15–36, 2012. doi:10.1016/j.ic.2012.01.003.
  • [36] Joël Ouaknine and James Worrell. Positivity problems for low-order linear recurrence sequences. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 366–379. SIAM, 2014. doi:10.1137/1.9781611973402.27.
  • [37] Azaria Paz. Introduction to Probabilistic Automata. Academic Press, 2014.
  • [38] Alexander Rabinovich and Doron Tiferet. Degrees of ambiguity for parity tree automata. In Christel Baier and Jean Goubault-Larrecq, editors, 29th EACSL Annual Conference on Computer Science Logic, CSL 2021, January 25-28, 2021, Ljubljana, Slovenia (Virtual Conference), volume 183 of LIPIcs, pages 36:1–36:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.CSL.2021.36.
  • [39] Walter J. Savitch. Relationships between nondeterministic and deterministic tape complexities. Journal of Computer and System Sciences, 4(2):177–192, 1970. doi:10.1016/S0022-0000(70)80006-X.
  • [40] Sven Schewe. Büchi complementation made tight. In Susanne Albers and Jean-Yves Marion, editors, 26th International Symposium on Theoretical Aspects of Computer Science, STACS 2009, February 26-28, 2009, Freiburg, Germany, Proceedings, volume 3 of LIPIcs, pages 661–672. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Germany, 2009. doi:10.4230/LIPICS.STACS.2009.1854.
  • [41] Sven Schewe. Minimising good-for-games automata is NP-complete. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), 2020. doi:10.4230/LIPIcs.FSTTCS.2020.56.
  • [42] Erik Meineche Schmidt. Succinctness of description of context-free, regular and unambiguous languages. Cornell University, 1978. doi:10.5555/908560.
  • [43] L. J. Stockmeyer and A. R. Meyer. Word problems requiring exponential time (preliminary report). In Symposium on Theory of Computing (STOC), pages 1–9. Association for Computing Machinery, 1973.
  • [44] Alfred Tarski and J. C. C. McKinsey. A Decision Method for Elementary Algebra and Geometry. University of California Press, dgo - digital original, 1 edition, 1951. doi:10.2307/jj.8501420.
  • [45] Mihir Vahanwala. Skolem and positivity completeness of ergodic markov chains. Inf. Process. Lett., 186:106481, 2024. doi:10.1016/J.IPL.2024.106481.
  • [46] Andreas Weber and Helmut Seidl. On the degree of ambiguity of finite automata. Theor Comput Sci, 88(2):325–349, 1991. doi:10.1016/0304-3975(91)90381-B.

Appendix A Application to Automata over Infinite Words

A nondeterministic parity automaton (NPA) 𝒜 is a finite alphabet Σ, a finite set of states Q, an initial state q0, a set of transitions ΔQ×Σ×Q, a priority function ρ:Q[d] for some d. An NPA accepts a set of infinite words in Σω. A run π of 𝒜 on an infinite word w=σ1σ2Σω is an infinite sequence of transitions τ1τ2, where each τi=(pi,σi,qi) for i+. A run π naturally generates an infinite trace ρ(π) over [d], where the i-th element in this sequence is ρ(pi). Let 𝑖𝑛𝑓ρ(π) be the numbers that occur infinitely often in ρ(π). The run π is accepting if p1=q0 and the maximum element in 𝑖𝑛𝑓ρ(π) is even. A Büchi automaton is an NPA where ρ takes values in {1,2}. A Büchi automaton can be described by providing the set of states with priority 2 as the accepting set of states. A Büchi automata is weak iff every SCC contains either only accepting states or only rejecting states. Let ACC𝒜(w) denote the set of all accepting runs of 𝒜 on w. The notions of k-ambiguous and finitely-ambiguous naturally extends to NPA based on the cardinality of ACC𝒜(w).

A word wΣω induces a probability measure 𝑃𝑟𝑜𝑏w𝒫 over the measurable subsets of Δω, defined via the σ-algebra generated by basic cylinder sets in the standard way. The acceptance probability of w in 𝒫 is then given by:

𝒫(w)=𝑃𝑟𝑜𝑏w𝒫(ACC(w)).

Definitions of positive resolvability and λ-resolvability extends naturally to NPA.

A.1 Undecidability of 𝝀-Resolvability

We have shown that the λ-resolvability problem for automata over finite words (i.e., NFA) is undecidable. In this subsection, we extend this result to automata over infinite words.

Given an NFA 𝒜=(Σ,Q,q0,F,Δ), define the Büchi automaton 𝒜ω=(Σ,Q,q0,F,Δ) as follows:

  • Σ=Σ{}, where Σ.

  • Q=Q{qf}, where qfQ.

  • F={qf}.

  • Δ=Δ{(p,,qf)pFF}.

By construction, 𝒜ω has a unique accepting state qf, which is also a sink state, making 𝒜ω a weak automaton. Suppose 𝒫 is a PFA based on 𝒜. We construct the corresponding probabilistic automaton 𝒫ω based on 𝒜ω by adding transitions of the form (p,,qf,1) to 𝒫ω for all pFF. This construction ensures that 𝒫(w)=𝒫ω(wω) for every word wΣ. Consequently, for every λ(0,1), 𝒜 is λ-resolvable if and only if 𝒜ω is λ-resolvable. Together with the undecidability of the λ-resolvability problem for NFA (Theorem 2), we obtain the following:

Theorem 21.

The λ-resolvability problem for weak nondeterministic Büchi automata is undecidable.

A.2 Decidability for Finitely-ambiguous NPA

Our algorithm for FNFA also extends to finitely-ambiguous NPA using similar analysis. Since the number of accepting runs of every word is bounded by some k, Lemma 6 holds for finitely-ambiguous NPA as well.

Lemma 22.

Let S be a support for a finitely-ambiguous NPA 𝒜 with (𝒜)=(𝒜S). Then S is a bad support if and only if for every b, there is at least one word w(𝒜S) such that w has at least b nondeterministic transitions from S in each of its accepting runs.

Hence it is enough to track the behaviour of the NPA up to a finite prefix. Towards this goal, the notion of bad words can be adapted to NPA using bad prefixes. Let 𝒜q denote the ω-automaton 𝒜 with q as its initial state.

Definition 23 (Bad prefix).

Let 𝒜 be a finitely-ambiguous NPA and SΔ be a support. Then a word uΣ is a bad prefix for S if for some , there exists a decomposition u=x0y1x1y with words x0,,x1Σ, y1,,yΣ+, sets of states Q1,,Q,R1,,RQ, states q1,,q with qiQi for each i[] and an ω-word vΣω such that uv(𝒜S) and

  1. 1.

    For each i[], all accepting runs of uv from q0 end in Qi after reading x0y1xi1, i.e., qδ𝒜S(q0,x0y1xi1) and yiyv(𝒜Sq) qQi.

  2. 2.

    An accepting run of uv must be in some qi for some i[] after reading x0y1x1yi.

  3. 3.

    For each i[] and each qQi, every accepting run of uv that reaches q after reading the prefix x0y1xi1 also returns to q after subsequently reading yi. Moreover, when q=qi, this run of yi from qi to qi contains at least one transition from S which is nondeterministic in 𝒜S.

  4. 4.

    For each i[], Ri contains all states that are reached from q0 after reading x0y1xi1, but has no continuation to an accepting run for the remaining suffix yixiyv, i,e., qδ𝒜S(q0,x0y1xi1) and yiyv(𝒜Sq) qRi. Moreover, Ri is also exactly the set of states that are reached from q0 after reading x0y1xi1yi, with no continuation to an accepting run for the remaining suffix xiyv, i.e., qδ𝒜S(q0,x0y1xi1yi) and xiyv(𝒜Sq) qRi.

Lemma 24 (Bad support-bad prefix).

Let 𝒜 be a finitely-ambiguous NPA and S be a support of 𝒜. Then S is a bad support for 𝒜 iff (𝒜S)(A) or there exists a bad prefix for S.

Hence, our 𝖯𝖲𝖯𝖠𝖢𝖤 algorithm for deciding the positive resolvability of FNFA can be extended to finitely-ambiguous NPA by adding an accepting mode. This mode verifies whether there exists an ω-word v in the set qA(𝒜Sq)qR(𝒜Sq). In the branching mode, a transition to the accepting mode is always possible when G=. Once the system enters the accepting mode, it remains there.

To check whether or not qA(𝒜Sq)qR(𝒜Sq) is empty, we check if qA(𝒜Sq)qR(𝒜Sq) holds. To do this, we can simply translate the individual 𝒜Sq for all qA to NBAs 𝒩q and construct an NBA 𝒩 recognising qR(𝒜Sq); the blow-up for this is small.

We can now check whether or not qA(𝒩q)(𝒩) holds.

For this, we complement 𝒩 using [40] to the complement NBA 𝒞, but note that this complement – including the states and transitions – can be represented symbolically by 𝒩 itself – it only uses subsets of the states in 𝒩 (the reachable states and a subset thereof used for a breakpoint construction) and level rankings, which are functions from the reachable states of 𝒩 to natural numbers up to 2n, where n is the number of states of 𝒩 [29, 40].

We can now check whether or not qA(𝒩q)(𝒞)= holds.

To do this, we can search in the exponentially larger, but polynomially represented, product space of qA𝒩q×𝒞 (the product automaton of 𝒩q for all qA and 𝒞) to check if we can reach a product state, which can loop to itself while seeing an accepting state of each of the automata. This can be checked in 𝖭𝖫 in the explicit size of the product automaton and thus in 𝖯𝖲𝖯𝖠𝖢𝖤 in its representation.

Theorem 25.

The positive resolvability problem for finitely-ambiguous NPA is 𝖯𝖲𝖯𝖠𝖢𝖤-complete.

Let the degree of ambiguity of a finitely-ambiguous NPA 𝒜 be k, which can be decided [38, Proposition 21]. Note that in [38], the notion of finite ambiguity differs from ours: an automaton is called finitely ambiguous if |ACC(w)| is finite for every word w in the language. What we refer to as finitely-ambiguous is instead termed boundedly ambiguous in their terminology.

Let S be a support of 𝒜, we can construct a run automaton for 𝒜S, similar to the construction for an NFA on a support. As in the NFA case, by analysing the run automaton, we can build a finite system of inequalities and decide the λ-resolvability problem for finitely-ambiguous NPA.

Theorem 26.

The λ-resolvability problem for finitely-ambiguous NPA is decidable.