Abstract
Deterministic finite automata are one of the simplest and most practical models of computation studied in automata theory. Their 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 \(\varSigma \) using \((\sigma -1) n\log n (1+o(1))\) bits, which can determine, given an input string x over \(\varSigma \), whether \(\mathcal {D}\) accepts x in optimal O(|x|) time. We also consider the case when there are \(N < \sigma n\) non-failure transitions, and obtain various time-space trade-offs in both the cases. When the input deterministic finite automaton \(\mathcal {A}\) is acyclic, not only we can improve the above space bound significantly to \((\sigma -1) (n-1)\log n+ O(n + \log ^2 \sigma )\) bits, we can also check if an input string x over \(\varSigma \) can be accepted by \(\mathcal {A}\) optimally in O(|x|) 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 \(\varSigma \) 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.
Highlights
Automata theory is a branch of theoretical computer science that deals exclusively with the definitions, properties and applications of different mathematical models of computation
Despite having so many applications in practically motivated problems, we are not aware of, to the best of our knowledge, any study of DFAs and NFAs from the point of view of succinct data structures where the goal is to store an arbitrary element from a set Z of objects using the information theoretic minimum log(|Z|) + o(log(|Z|)) bits of space while still being able to support the relevant set of queries efficiently, which is what we focus on in this paper
The classical representation of DFAs/NFAs consists of explicitly writing the transition function δ in a two dimensional array J[0..n − 1][1..σ] having n rows corresponding to the n states of the DFA/NFA and σ columns corresponding to the alphabet Σ such that J[i][j] = δ(qi, j) where qi ∈ Q, j ∈ Σ
Summary
Automata theory is a branch of theoretical computer science that deals exclusively with the definitions, properties and applications of different mathematical models of computation. These models play a major role in multiple applied areas of computer science. One of the most basic and fundamental models that is studied in automata theory since long time back is called the finite automata. It primarily comes in two different types, deterministic. Let us formally define DFA and NFA in a nutshell as these are our primary subjects of study in this article.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.