Co-lexicographically Ordering Automata and Regular Languages - Part I
-
Published:2023-08-12
Issue:4
Volume:70
Page:1-73
-
ISSN:0004-5411
-
Container-title:Journal of the ACM
-
language:en
-
Short-container-title:J. ACM
Author:
Cotumaccio Nicola1ORCID,
D’Agostino Giovanna2ORCID,
Policriti Alberto2ORCID,
Prezza Nicola3ORCID
Affiliation:
1. Gran Sasso Science Institute, Italy and Dalhousie University, Canada
2. University of Udine, Italy
3. Ca’ Foscari University of Venice, Italy
Abstract
The states of a finite-state automaton 𝒩 can be identified with collections of words in the prefix closure of the regular language accepted by 𝒩. But words can be ordered, and among the many possible orders a very natural one is the co-lexicographic order. Such naturalness stems from the fact that it suggests a transfer of the order from words to the automaton’s states. This suggestion is, in fact, concrete and in a number of articles automata admitting a
total
co-lexicographic (
co-lex
for brevity) ordering of states have been proposed and studied. Such class of ordered automata —
Wheeler automata
— turned out to require just a constant number of bits per transition to be represented and enable regular expression matching queries in constant time per matched character.
Unfortunately, not all automata can be totally ordered as previously outlined. In the present work, we lay out a new theory showing that all automata can always be
partially
ordered, and an intrinsic measure of their complexity can be defined and effectively determined, namely, the minimum width
p
of one of their admissible
co-lex partial orders
–dubbed here the automaton’s
co-lex width
. We first show that this new measure captures
at once
the complexity of several seemingly-unrelated hard problems on automata. Any NFA of co-lex width
p
: (i) has an equivalent powerset DFA whose size is exponential in
p
rather than (as a classic analysis shows) in the NFA’s size; (ii) can be encoded using just Θ(log
p
) bits per transition; (iii) admits a linear-space data structure solving regular expression matching queries in time proportional to
p
2
per matched character. Some consequences of this new parameterization of automata are that PSPACE-hard problems such as NFA equivalence are FPT in
p
, and quadratic lower bounds for the regular expression matching problem do not hold for sufficiently small
p
.
Having established that the co-lex width of an automaton is a fundamental complexity measure, we proceed by (i) determining its computational complexity and (ii) extending this notion from automata to regular languages by studying their smallest-width accepting NFAs and DFAs. In this work we focus on the deterministic case and prove that a canonical minimum-width DFA accepting a language ℒ–dubbed the Hasse automaton ℋ of ℒ–can be exhibited. ℋ provides, in a precise sense, the best possible way to (partially) order the states of any DFA accepting ℒ, as long as we want to maintain an operational link with the (co-lexicographic) order of ℒ’s prefixes. Finally, we explore the relationship between two conflicting objectives: minimizing the width and minimizing the number of states of a DFA. In this context, we provide an analogue of the Myhill-Nerode Theorem for co-lexicographically ordered regular languages.
Funder
European Union
National Recovery and Resilience Plan (NRRP),
Italian Ministry of University and Research funded by the European Union - NextGenerationEU
Italian Ministry of University and Research
National Biodiversity Future Center - NBFC
Publisher
Association for Computing Machinery (ACM)
Subject
Artificial Intelligence,Hardware and Architecture,Information Systems,Control and Systems Engineering,Software
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献