Approximate Counting for Symbolic Automata
Abstract
Given a nondeterministic finite automaton and a length in unary, the problem #NFA seeks to compute the number of words of length accepted by . A celebrated result of Arenas, Croquevielle, Jayaram, and Riveros established that #NFA admits a fully polynomial-time randomized approximation scheme (FPRAS). Subsequent works have brought the running time down to for an NFA with states over a binary alphabet, with relative error at most and failure probability at most . These running-time bounds concern explicitly represented alphabets, whereas automata arising from programs, strings, and structured data are naturally symbolic, i.e., their transitions carry predicates, or guards, over a large concrete alphabet . In this work, we study #Symbolic-NFA, which asks to count the number of words of a given length accepted by a symbolic NFA. We present a randomized approximation algorithm for this #P-hard problem. We formulate the algorithm using an oracle interface that supports membership testing, approximate counting, and almost-uniform sampling for transition guards. With polynomial-time implementations of these guard operations, the algorithm yields an FPRAS. Our algorithm extends the recent dependent sampling approach of Meel and de Colnet to symbolic automata. Our FPRAS queries only the input guards, avoiding the potentially exponential blowup from constructing Boolean combinations. For an automaton with transition set , the algorithm makes counting and sampling queries. For constant-size explicit alphabets, our algorithm recovers the above running-time bound for #NFA. We also formalize the core probabilistic analysis, including concentration and confidence amplification, in Lean 4.
Create a lesson
Metadata
- Categories
- cs.FL, cs.PL
- Comments
- Accepted to appear at POPL 2027
Related papers
NeuroSTAR: Automata-guided Neuro-symbolic Specification Formalization
Shared title terminologycs.FLJoy Saha, Trey Woodlief, Sebastian Elbaum et al.
Discounted-Sum Automata -- Reductions between the Universality Problems
Shared title terminologycs.FLUdi Boker
Generalizing Cobham's Theorem to F-Automata
Shared title terminologycs.FLLaindon Burnett
Complexity of the Infinity and the Modulo-Counting Quantifiers in Automatic Structures
Shared title terminologycs.FLVincent Klimmer, Dietrich Kuske, Sebastian Pfau
Copying versus self-construction in cellular automata: an algorithmic-information approach to self-reproduction
Shared title terminologycs.FLKonstantin Doubrovinski
Complete Test Suites for Effectful Automata
Shared title terminologycs.FLBálint Kocsis, Rick Koenders, Joshua Moerman et al.