# $\text{#NFA}$ admits an FPRAS: Efficient Enumeration, Counting, and   Uniform Generation for Logspace Classes

**Authors:** Marcelo Arenas, Luis Alberto Croquevielle, Rajesh Jayaram, Cristian, Riveros

arXiv: 1906.09226 · 2021-06-24

## TL;DR

This paper introduces efficient algorithms for enumeration, counting, and uniform generation in logspace classes, proving that the fundamental #NFA problem admits a fully polynomial randomized approximation scheme, thus advancing understanding of complexity in these classes.

## Contribution

It demonstrates that #NFA admits an FPRAS, solving an open problem, and extends this result to functions in SpanL, providing new algorithms for logspace-based classes.

## Key findings

- #NFA admits an FPRAS, solving an open problem.
- Functions in SpanL admit an FPRAS.
- Efficient enumeration, counting, and uniform generation algorithms are developed for logspace classes.

## Abstract

In this work, we study two simple yet general complexity classes, based on logspace Turing machines, which provide a unifying framework for efficient query evaluation in areas like information extraction and graph databases, among others. We investigate the complexity of three fundamental algorithmic problems for these classes: enumeration, counting and uniform generation of solutions, and show that they have several desirable properties in this respect.   Both complexity classes are defined in terms of non-deterministic logspace transducers (NL transducers). For the first class, we consider the case of unambiguous NL transducers, and we prove constant delay enumeration, and both counting and uniform generation of solutions in polynomial time. For the second class, we consider unrestricted NL transducers, and we obtain polynomial delay enumeration, approximate counting in polynomial time, and polynomial-time randomized algorithms for uniform generation. More specifically, we show that each problem in this second class admits a fully polynomial-time randomized approximation scheme (FPRAS) and a polynomial-time Las Vegas algorithm for uniform generation. Interestingly, the key idea to prove these results is to show that the fundamental problem $\text{#NFA}$ admits an FPRAS, where $\text{#NFA}$ is the problem of counting the number of strings of length $n$ (given in unary) accepted by a non-deterministic finite automaton (NFA). While this problem is known to be $\text{#P}$-complete and, more precisely, $\text{SpanL}$-complete, it was open whether this problem admits an FPRAS. In this work, we solve this open problem, and obtain as a welcome corollary that every function in $\text{SpanL}$ admits an FPRAS.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1906.09226/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1906.09226/full.md

## References

34 references — full list in the complete paper: https://tomesphere.com/paper/1906.09226/full.md

---
Source: https://tomesphere.com/paper/1906.09226