Succinct Representation for (Non)Deterministic Finite Automata

Deterministic finite automata are one of the simplest and most practical models of computation studied in automata theory. Their conceptual extension is the non-deterministic finite automata which also have plenty of applications. In this article, we study these models through the lens of succinct data structures where our ultimate goal is to encode these mathematical objects using information-theoretically optimal number of bits along with supporting queries on them efficiently. Towards this goal, we first design a succinct data structure for representing any deterministic finite automaton $\mathcal{D}$ having $n$ states over a $\sigma$-letter alphabet $\Sigma$ using $(\sigma-1) n\log n + O(n \log \sigma)$ bits of space, which can determine, given an input string $x$ over $\Sigma$, whether $\mathcal{D}$ accepts $x$ in $O(|x| \log \sigma)$ time, using constant words of working space. When the input deterministic finite automaton is acyclic, not only we can improve the above space-bound significantly to $(\sigma -1) (n-1)\log n+ 3n + O(\log^2 \sigma) + o(n)$ bits, we also obtain optimal query time for string acceptance checking. More specifically, using our succinct representation, we can check if a given input string $x$ can be accepted by the acyclic deterministic finite automaton using time proportional to the length of $x$, hence, the optimal query time. We also exhibit a succinct data structure for representing a non-deterministic finite automaton $\mathcal{N}$ having $n$ states over a $\sigma$-letter alphabet $\Sigma$ using $\sigma n^2+n$ bits of space, such that given an input string $x$, we can decide whether $\mathcal{N}$ accepts $x$ efficiently in $O(n^2|x|)$ time. Finally, we also provide time and space-efficient algorithms for performing several standard operations such as union, intersection, and complement on the languages accepted by deterministic finite automata.

[1]  Rajeev Raman,et al.  Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets , 2007, ACM Trans. Algorithms.

[2]  Frédérique Bassino,et al.  Enumeration and random generation of accessible automata , 2007, Theor. Comput. Sci..

[3]  Philippe Flajolet,et al.  Analytic Combinatorics , 2009 .

[4]  J. Ian Munro,et al.  Succinct encoding of arbitrary graphs , 2013, Theor. Comput. Sci..

[5]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[6]  Michael Sipser,et al.  Introduction to the Theory of Computation , 1996, SIGA.

[7]  Guy Joseph Jacobson,et al.  Succinct static data structures , 1988 .

[8]  Reinhard Diestel,et al.  Graph Theory, 4th Edition , 2012, Graduate texts in mathematics.

[9]  Friedhelm Meyer auf der Heide,et al.  Dynamic perfect hashing: upper and lower bounds , 1988, [Proceedings 1988] 29th Annual Symposium on Foundations of Computer Science.

[10]  J. Ian Munro,et al.  Succinct Representation of Balanced Parentheses and Static Trees , 2002, SIAM J. Comput..

[11]  David Richard Clark,et al.  Compact pat trees , 1998 .

[12]  Mikkel Thorup,et al.  Changing base without losing space , 2010, STOC '10.

[13]  Jeffrey Shallit,et al.  On the Number of Distinct Languages Accepted by Finite Automata with n States , 2002, DCFS.

[14]  J. Ian Munro,et al.  Succinct Data Structures for Chordal Graphs , 2018, ISAAC.

[15]  Kunihiko Sadakane,et al.  An Efficient Representation of Partitions of Integers , 2018, IWOCA.

[16]  Rajeev Motwani,et al.  Introduction to automata theory, languages, and computation - international edition, 2nd Edition , 2003 .

[17]  Gonzalo Navarro,et al.  Compact Data Structures - A Practical Approach , 2016 .

[18]  Rajeev Raman,et al.  Succinct representations of permutations and functions , 2011, Theor. Comput. Sci..

[19]  S. Srinivasa Rao,et al.  Succinct Data Structures for Families of Interval Graphs , 2019, WADS.

[20]  Valery A. Liskovets,et al.  Exact enumeration of acyclic deterministic automata , 2006, Discret. Appl. Math..

[21]  Kunihiko Sadakane,et al.  Fully Functional Static and Dynamic Succinct Trees , 2009, TALG.

[22]  Michael Domaratzki,et al.  Enumeration of Formal Languages , 2006, Bull. EATCS.

[23]  Arash Farzan,et al.  Compact Navigation and Distance Oracles for Graphs with Small Treewidth , 2011, Algorithmica.

[24]  Olivier Devillers,et al.  Succinct representations of planar maps , 2008, Theor. Comput. Sci..