arXiv:2610.08525cs.FLOct 2026

Manuscript Offprint

arXiv:2610.08525

Stronger bounds on the degree of ambiguity of finite automata

Stefan Kiefer, Filip Mazowiecki, Andrew Ryzhikov, Antoni Wiśniewski

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Ambiguity measures the number of accepting runs in nondeterministic finite automata (NFA). We consider finitely ambiguous NFA, where there exists a constant NN such that over every word ww there are at most NN accepting runs. In such a case we also say that the NFA is NN-ambiguous. Importantly NN depends only on the NFA, it does not depend on the length of the word. Weber and Seidl showed that every NFA is NN-ambiguous for N=2O(nlog⁡n)N = 2^{\mathcal{O}(n \log n)}, where nn is the number of states [15]. We improve this to N=2O(n)N = 2^{\mathcal{O}(n)}, which is asymptotically tight.

2012 ACM Subject Classification Theory of computation → Regular languages

Keywords and phrases finite automata, ambiguity

Digital Object Identifier 10.4230/LIPIcs.CVIT.2016.23

Funding Filip Mazowiecki: Supported by the Polish National Science Centre SONATA BIS-12 grant number 2022/46/E/ST6/00230

Andrew Ryzhikov: Supported by the Polish National Science Centre SONATA BIS-12 grant number 2022/46/E/ST6/00230

Antoni Wiśniewski: Supported by the Polish National Science Centre SONATA BIS-12 grant number 2022/46/E/ST6/00230

Acknowledgements The authors proved the result of Section 3 without AI assistance. They also found an exponential upper bound for the more general case, where all SCCs have the same size. The general result of Section 4 was originally proved by ChatGPT 6 Astra. The lower bound in Section 5 was suggested earlier by ChatGPT 5.6 Sol, in interaction with the authors. The authors collaborated closely with ChatGPT 6 Astra in writing Section 5 and Section A.

1 Introduction

Ambiguity is a fundamental syntactic notion in automata theory [7, 4]. The degree of ambiguity of an NFA A\mathcal{A} is a function f(m):N→Nf(m): \mathbb{N} \to \mathbb{N} defined as follows: f(m)f(m) is the maximum, among all words ww of length mm, number of accepting paths labelled by ww in A\mathcal{A}. For example f(m)=1f(m) = 1 for deterministic finite automata, and in general f(m)≤nO(m)f(m) \leq n^{\mathcal{O}(m)}, where nn is the size of the NFA. Note that restricting the ambiguity even to f(m)≤1f(m) \leq 1 does not change expressiveness of the class, as every NFA can be determined.

The growth of ambiguity functions is understood quite well. Namely, given an NFA, its degree of ambiguity is either O(mk)\mathcal{O}(m^k) for some constant kk, or is not bounded by any subexponential function [15]. This means, for example, that if the degree of ambiguity of an NFA is in O(log⁡m)\mathcal{O}(\log m) or O(m)\mathcal{O}(\sqrt{m}), then it is in O(1)\mathcal{O}(1). An NFAs such that its degree of ambiguity f(m)f(m) is upper bounded by a constant NN is called NN-ambiguous; 1-ambiguous NFAs are

© Jane Open Access and Joan R. Public;

licensed under Creative Commons License CC-BY 4.0

42nd Conference on Very Important Topics (CVIT 2016).

Editors: John Q. Open and Joan R. Access; Article No. 23; pp. 23:1–23:15

Leibniz International Proceedings in Informatics

LIPICS Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany

Figure

23:2 Stronger bounds on the degree of ambiguity of finite automata

usually called unambiguous NFA. An NFA is called finitely ambiguous if it is N-ambiguous for some N. Deciding if, for a given NFA, its degree of ambiguity is O(mk)\mathcal{O}(m^k) for some constant k can be done in polynomial time [15]. If the answer is affirmative, computing the smallest such k can also be done in polynomial time [1].

The degree of ambiguity can also be defined for more involved automata models, such as weighted automata [9, 5] and string-to-string transducers [14, 6], by simply considering the degree of ambiguity of the underlying NFA. Unlike for ordinary Boolean automata, restricting the degree of ambiguity for such models typically restricts their expressivity. As a result, finitely ambiguous automata play a crucial role in algorithmic applications: many problems are decidable for finitely ambiguous automata, but are undecidable for more general classes [2]. A widely used approach for developing algorithms is then as follows: given an N-ambiguous automaton, construct an equivalent automaton that is a union of unambiguous automata. In most constructions, the number of unambiguous automata in such a union is equal to N. It is thus natural to ask how large the degree of ambiguity of a finitely ambiguous NFA with n states can be, which is the main question addressed by this paper.

Weber and Seidl [15] showed that it is at most 2O(nlog⁡n)2^{\mathcal{O}(n\log n)}, and provided a series of N-ambiguous n-state NFAs with degree of ambiguity 21.0221n2^{1.0221n}. A slightly weaker lower bound of 2n−22^{n-2} can be easily obtained by NFAs over a one-letter alphabet. We refer to [15] for the bounds predating their work. In this paper, we show an upper bound of 2O(n)2^{\mathcal{O}(n)}, thus obtaining an asymptotically tight bound. Let us briefly note that from the computational complexity viewpoint, the precise ambiguity of a finitely ambiguous NFA is quite hard to analyse. Namely, given a finitely ambiguous NFA and a number N, deciding if it is N-ambiguous is PSPACE-complete, even with the promise that N does not exceed the number of states [3].

Ambiguity of NFAs is tightly linked with the growth in (multiplicative) semigroups of nonnegative integer matrices. Consider a finite set of square rational matrices G={M1,…,Mk}⊆Qn×nG = \{M_1, \ldots, M_k\} \subseteq \mathbb{Q}^{n \times n}, called generators. We define the semigroup generated by GG over the rationals: M={M∈Qn×n∣M=N1⋯Nm\mathcal{M} = \{M \in \mathbb{Q}^{n \times n} \mid M = N_1 \cdots N_m, where Ni∈G}N_i \in G\}. In general this is a complex object, where natural problems like membership are undecidable [12] (see e.g. the introduction of [13]). However, certain approximations of M\mathcal{M} are computable, e.g. its Zariski closure [8].

A particularly interesting case is when M\mathcal{M} is finite, then for example its Zariski closure remains the same set M\mathcal{M}. Assuming finitness the size of ∣M∣|\mathcal{M}| was analysed already in 70s [10] and recently it was shown that ∣M∣|\mathcal{M}| is bounded exponentially [11]. Using our results one can bound the norm of M\mathcal{M}, i.e. bound the entries of matrices in M\mathcal{M}, provided the generators are 0-1 matrices. Indeed, the assumption about 0-1 matrices allows us to identify the generators with transition matrices of an NFA. Standard results on weighted automata [10, Lemma 5.1, Corollary 5.4] show that finitness of M\mathcal{M} is equivalent to finite ambiguity, and that if the NFA is NN-ambiguous then NN is a bound on the norm of M\mathcal{M}.

References (21)