Back to Search
Start Over
A polynomial-time approximation algorithm for counting words accepted by an NFA (invited paper)
- Source :
- STOC
- Publication Year :
- 2021
- Publisher :
- ACM, 2021.
-
Abstract
- Counting the number of words of a certain length accepted by a non-deterministic finite automaton (NFA) is a fundamental problem, which has many applications in different areas such as graph databases, knowledge compilation, and information extraction. Along with this, generating such words uniformly at random is also a relevant problem, particularly in scenarios where returning varied outputs is a desirable feature. The previous problems are formalized as follows. The input of #NFA is an NFA N and a length k given in unary (that is, given as a string 0^k), and then the task is to compute the number of strings of length k accepted by N. The input of GEN-NFA is the same as #NFA, but now the task is to generate uniformly, at random, a string accepted by N of length k. It is known that #NFA is #P-complete, so an efficient algorithm to compute this function exactly is not expected to exist. However, this does not preclude the existence of an efficient approximation algorithm for it. In this talk, we will show that #NFA admits a fully polynomial-time randomized approximation scheme (FPRAS). Prior to our work, it was open whether #NFA admits an FPRAS; in fact, the best randomized approximation scheme known for #NFA ran in time n^O(log(n)). Besides, we will mention some consequences and applications of our results. In particular, from well-known results on counting and uniform generation, we obtain that GEN-NFA admits a fully polynomial-time almost uniform generator. Moreover, as #NFA is SpanL-complete under polynomial-time parsimonious reductions, we obtain that every function in the complexity class SpanL admits an FPRAS.
- Subjects :
- Discrete mathematics
TheoryofComputation_MATHEMATICALLOGICANDFORMALLANGUAGES
TheoryofComputation_COMPUTATIONBYABSTRACTDEVICES
Finite-state machine
Unary operation
Regular language
String (computer science)
Complexity class
Approximation algorithm
Nondeterministic finite automaton
Function (mathematics)
Computer Science::Formal Languages and Automata Theory
Mathematics
Subjects
Details
- Database :
- OpenAIRE
- Journal :
- Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing
- Accession number :
- edsair.doi...........92d392e6e06a120b9ac96bbfbcf275ba