A Myhill-Nerode Theorem for Generalized Automata, with Applications to Pattern Matching and Compression
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "A Myhill-Nerode Theorem for Generalized Automata, with Applications to Pattern Matching and Compression".
Title and authors: Tom: Before we get into the details of how they fix that set W, let’s talk about what this paper actually claims in its title and who wrote it. It’s about establishing a Myhill-Nerode theorem specifically for generalized automata and then applying those ideas to pattern matching and compression techniques.
Jane: Exactly, it connects this abstract structural theory with something practical, which is really exciting for anyone working on string algorithms or pattern searching on complex data structures.
Lu: The core idea is showing that there are four equivalent ways to characterize a language L: being recognized by a W-GNFA, having a finite index Myhill-Nerode equivalence relation, being representable as unions of certain equivalence classes on W, or being recognized by a W-GDFA >
Meng: So the paper is essentially proving that these different ways of describing the same language are all fundamentally linked through this new theorem. That feels like it provides a much stronger foundation than what we have now for generalized models.
Lalam: And if any of those conditions hold, it guarantees you can find a unique minimal W-GDFA recognizing that language, which is a huge win for implementation >
The paper's summary: Tom: The main thrust of the paper is this theorem where they establish equivalences between four different conditions for a language L. One condition is just being recognized by a W-GNFA, another one involves the Myhill-Nerode equivalence having finite index, and then there are structural properties related to an equivalence relation on W or recognition by a W-GDFA >
Jane: What this means for us in practice is that if you can check any one of those conditions, you automatically satisfy all the others, which simplifies the whole analysis of these languages immensely. It’s like having a master checklist instead of four separate tests >
Lu: They also touch on the concept of determinism in generalized automata and how isomorphism works for Generalized Deterministic Automata, extending it beyond classical DFAs to see if every regular language has a unique minimal GDFA up to isomorphism >
Meng: That extension is important because when you're building production systems, knowing that two different models are just isomorphic means you only need to build one implementation and reuse the knowledge >
Lalam: The paper also confirms that even without epsilon transitions, which are usually a source of expressive power, generalized automata can still represent regular languages more compactly than conventional ones by allowing arbitrarily long string labels on edges >
The paper's improvements: Tom: The authors point out some improvements they made to the original framework. They introduce a condition that if the language L is recognized by a W-GNFA and the set W is locally bounded, then you can find a unique minimal W-GDFA recognizing L >
Jane: That sounds like it adds some necessary constraints for finding that uniqueness we talked about earlier. It moves us closer to knowing exactly when we can rely on that unique minimal automaton existing >
Lu: The real power of this work comes in the application part, where they use these results to tackle pattern matching problems and compression techniques related to these generalized automata >
Meng: They show that for Wheeler generalized automata, which are a specific type of model, you can encode them very efficiently using structures derived from the Burrows-Wheeler Transform >
Lalam: And this encoding isn't just theoretical; it leads to a space complexity bound of e log sigma (one + o(one)) plus O(e) bits, which is quite tight for representing these complex structures > <ref:2302.06506#pg3>
Conclusion: Tom: So to wrap up, the paper "A Myhill-Nerode Theorem for Generalized Automata, with Applications to Pattern Matching and Compression" gives us a unified way to look at languages recognized by generalized automata by linking four different properties together >
Jane: It provides a solid theoretical backbone for understanding when and how we can find the most compact representation of these languages, especially when they involve string labels on edges >
Lu: The application to Wheeler generalized automata is where it gets really interesting because it enables efficient pattern matching queries in time proportional to m log log sigma >
Meng: From a deployment standpoint, the space bound of e log sigma (one + o(one)) plus O(e) bits means we can handle these patterns with very little memory overhead when running them on large datasets > <ref:2302.06506#pg3>
Lalam: And they show that you can even retrieve the original automaton up to isomorphism if you only have its Burrows-Wheeler Transform, which is a really neat way to compress the representation >
NICOLA COTUMACCIO
University of Helsinki
cs.FL, cs.DS, cs.LO
Submitted: 2023-02-13
Updated: 2026-11-24
License: http://creativecommons.org/licenses/by-nc-nd/4.0/
Importance score: 90/100
The gist: The paper introduces a Myhill-Nerode theorem for generalized automata, extending classical results to models where edges can be labeled with strings…
Key concepts
- W-GNFA
- A W-GNFA is a type of generalized non-deterministic finite automaton where the edges are labeled with strings. This model generalizes standard NFAs by allowing more complex transitions, which is necessary to handle the string labeling aspect of the theorem.
- Myhill-Nerode Equivalence ($\equiv_{L,W}$)
- This concept relates to how different prefixes of a language behave. The paper shows that if this equivalence relation has a finite index within the set W, it implies strong structural properties about the language L and its minimal automaton.
- Wheeler GDFAs
- These are generalized deterministic finite automata specifically tailored for pattern matching problems. They are used to solve complex string matching queries efficiently by leveraging structures derived from the Burrows-Wheeler Transform of the automaton.
Terminology
Summary
The paper introduces a Myhill-Nerode theorem for generalized automata, extending classical results to models where edges can be labeled with strings, utilizing a set W(A) to address non-uniqueness in minimal generalized deterministic automata. p. 0 Introduction
The class of regular languages can be defined starting from non-deterministic finite automata
(NFAs). In his monumental work [Eil74] on automata theory (which dates back to 1974),
Eilenberg proposed a natural generalization of NFAs where edges can be labeled not only
Key words and phrases: Generalized automata, Myhill-Nerode theorem, minimal automaton, BurrowsWheeler Transform, FM-index. (3) There exists a right-invariant equivalence relation ∼ on W of finite index such that L is
the union of some ∼-classes. (4) L is recognized by a W-GDFA. Moreover, if one of the above statements is true (and so all the above statements are
true), then there exists a unique minimal W-GDFA recognizing L (that is, two W-GDFAs
recognizing L having the minimum number of states among all W-GDFAs recognizing L
must be isomorphic). In particular, we will show that there is no loss of generality in assuming that W ⊆ Σ
∗
is a locally bounded set such that L ∪ {ϵ} ⊆ W ⊆ Pref(L), because these are necessary
conditions for the existence of a W-GNFA (Lemma 3.Where the paper says it
Where the paper says it
Where the paper says it
The second part applies these results to Wheeler generalized automata (Wheeler GDFAs). p. 0 In the second part of the paper, we show that the set W(A) leads to applications for
pattern matching and data compression. Wheeler automata [TCS 2017, SODA 2020] are a
popular class of automata that can be compactly stored using e log σ(1 + o(1)) + O(e) bits
(e being the number of edges, σ being the size of the alphabet) in such a way that pattern
matching queries can be solved in O(m log log σ) time (m being the length of the pattern). In the second part of the paper, we show that the set W(A) leads to applications for
pattern matching and data compression. Wheeler automata [TCS 2017, SODA 2020] are a
popular class of automata that can be compactly stored using e log σ(1 + o(1)) + O(e) bits
(e being the number of edges, σ being the size of the alphabet) in such a way that pattern
matching queries can be solved in O(m log log σ) time (m being the length of the pattern). The BWT
of a string is a permutation of the string characters that allows compressing the original
string, and the FM-index is a data structure for solving pattern matching queries directly on
the BWT-representation of the string. The Burrows-Wheeler Transform and the FM-index
have established a new paradigm in bioinformatics, where the huge increase in genomic data
requires the development of space-efficient algorithms [SD10]. The pattern matching problem on text can be efficiently solved in O(n + m) time (n being
the length of the text, m being the length of the pattern) by using the Knuth-Morris-Pratt
algorithm [KMP77]. The SMLG problem is more challenging, and the complexity can be
affected by the specific variant of the pattern matching problem under consideration or the
class of graphs to which the problem is restricted. Wheeler NFAs are also of relevant theoretical interest:
for example, the powerset construction applied to a Wheeler NFA leads to a linear blow-up
in the number of states of the equivalent DFA, and the equivalent DFA is Wheeler [ADPP21];
on arbitrary NFAs, the blow-up can be exponential. The missing step is to determine whether it is possible to generalize the Burrows-Wheeler
Transform and the FM-index to generalized automata, so that the resulting data structures
can also be applied to Elastic Founder graphs and other classes of graphs where labels can
be arbitrary strings. In the second part of the paper, we show that the set W(A) leads to applications for
pattern matching and data compression. Wheeler automata [TCS 2017, SODA 2020] are a
popular class of automata that can be compactly stored using e log σ(1 + o(1)) + O(e) bits
(e being the number of edges, σ being the size of the alphabet) in such a way that pattern
matching queries can be solved in O(m log log σ) time (m being the length of the pattern). A MYHILL-NERODE THEOREM FOR GENERALIZED AUTOMATA,
WITH APPLICATIONS TO PATTERN MATCHING AND
COMPRESSION
NICOLA COTUMACCIO
Department of Computer Science, University of Helsinki, Pietari Kalmin katu 5, P. Box 68,
Helsinki, 00014, Finland
e-mail address: nicola. For example, Elastic Founder graphs can be used to represent multiple sequence alignments
(MSA), a central model of biological evolution, and on Elastic Founder graphs the SMLG
problem can be solved in linear time under a number of assumptions which only have a
limited impact on the generality of the model [ENA+23, RM22]. The pattern matching problem on texts has been revolutionized by the invention of the
Burrows-Wheeler Transform (BWT) [BW94] and the FM-index [FM00, FM05]. The pattern matching problem on text can be efficiently solved in O(n + m) time (n being
the length of the text, m being the length of the pattern) by using the Knuth-Morris-Pratt
algorithm [KMP77]. The SMLG problem is more challenging, and the complexity can be
affected by the specific variant of the pattern matching problem under consideration or the
class of graphs to which the problem is restricted.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Additionally, the paper notes that the class of languages recognized by some Wheeler GDFA is strictly larger than the class of Wheeler languages (regular languages recognized by some Wheeler NFA), defining this new set as generalized Wheeler languages. p. 0 More precisely,
a Wheeler generalized automata can be stored using e log σ(1 + o(1)) + O(e) bits so that
pattern matching queries can be solved in O(m log log σ) time, where e is the total length
of all edge labels. Introduction
The class of regular languages can be defined starting from non-deterministic finite automata
(NFAs). A MYHILL-NERODE THEOREM FOR GENERALIZED AUTOMATA,
WITH APPLICATIONS TO PATTERN MATCHING AND
COMPRESSION
NICOLA COTUMACCIO
Department of Computer Science, University of Helsinki, Pietari Kalmin katu 5, P. Box 68,
Helsinki, 00014, Finland
e-mail address: nicola. COTUMACCIO
with characters but with (possibly empty) finite strings, the so-called generalized nondeterministic finite automata (GNFAs). While classical automata are only a special case
of generalized automata, it is immediate to realize that generalized automata can only
recognize regular languages, because it is well-known that epsilon transitions do not add
expressive power [HMU06], and a string-labeled edge can be decomposed into a path of
edges labeled only with characters. If
we allowed a GNFA to have infinitely many edges, then any nonempty (possibly non-regular)
language would be recognized by a GNFA with two states, where the first state is initial, the
second state is final, all edges go from the first state to the second state, and a string labels
an edge if and only if it is in the language. By requiring a GNFA to have finitely many
edges, the class of recognized languages is exactly the class of regular languages, because it
is easy to transform a GNFA into a NFA with ϵ-transitions (that is, an NFA where edges can
also be labeled with the empty string ϵ) that recognizes the same language by proceeding
as follows: for every edge (u
′
, u, ρ) ∈ E, with ρ = r1, .Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Minimal Automaton Uniqueness for Generalized Deterministic Automata: The system can find a unique minimal W-GDFA recognizing a language L if L is recognized by a W-GNFA and the set W is locally bounded, as established by Theorem 3.16.
-
Efficient Pattern Matching on Wheeler GDFAs: The system can solve the String Matching in Labeled Graphs (SMLG) problem for Wheeler GDFAs in O(m log log sigma) time using an encoding derived from the Burrows-Wheeler Transform of the automaton, as shown in Theorem 1.3 and Section 4.6.
-
Space Efficient Encoding for Wheeler GDFAs: The system can encode a Wheeler r-GDFA using e log sigma (1 + o(1)) + O(e) bits, which is sufficient to solve SMLG queries and recognition queries in O(m log log sigma) time, as detailed in Theorem 4.19.
-
Online SMLG Query Processing: The system can solve the SMLG problem for a Wheeler GDFA online by iteratively solving the problem for every prefix of the pattern, which is crucial for efficient query processing during string matching, as noted in Section 4.6.3 and Theorem 4.19.
-
Automaton Identification from BWT Encoding: The system can retrieve a Wheeler GDFA up to isomorphism given only its Burrows-Wheeler Transform (BWT), leveraging the encoding properties established in Theorem 4.5, allowing for compact storage of complex automata structures.
Abstract
The model of generalized automata, introduced by Eilenberg in 1974, allows representing a regular language more concisely than conventional automata by allowing edges to be labeled not only with characters, but also strings. Giammarresi and Montalbano introduced a notion of determinism for generalized automata [STACS 1995]. While generalized deterministic automata retain many properties of conventional deterministic automata, the uniqueness of a minimal generalized deterministic automaton is lost. In the first part of the paper, we show that the lack of uniqueness can be explained by introducing a set W(A) associated with a generalized automaton A. In this way, we derive for the first time a full Myhill-Nerode theorem for generalized automata, which contains the textbook Myhill-Nerode theorem for conventional automata as a degenerate case. In the second part of the paper, we show that the set W(A) leads to applications for pattern matching and data compression. We show that a Wheeler generalized automata can be stored using e σ(1 + o(1)) + O(e) bits so that pattern matching queries can be solved in O(m σ) time, where e is the total length of all edge labels, e is the number of edges, σ is the size of the alphabet and m is the length of the pattern.
Related papers
- Quantitative Verification of Infinite-State Networks
- Star Complexity of Parikh Images of Languages over Infinite Alphabets
- A Unary-to-Nonunary Transition in the Accepting-State Spectrum of Right Quotient for Permutation Automata
- Positive-Data Learning of Fixed-Observation Linear MCFGs from Working Binary Presentations
- On the Separability Problem of VASS Reachability Languages
- Exact Accepting-State Spectrum for Reversal of Permutation Automata