Faster Prefix-Sorting Algorithms for Deterministic Finite Automata

04/21/2023
by   Sung-Hwan Kim, et al.
0

Sorting is a fundamental algorithmic pre-processing technique which often allows to represent data more compactly and, at the same time, speeds up search queries on it. In this paper, we focus on the well-studied problem of sorting and indexing string sets. Since the introduction of suffix trees in 1973, dozens of suffix sorting algorithms have been described in the literature. In 2017, these techniques were extended to sets of strings described by means of finite automata: the theory of Wheeler graphs [Gagie et al., TCS'17] introduced automata whose states can be totally-sorted according to the co-lexicographic (co-lex in the following) order of the prefixes of words accepted by the automaton. More recently, in [Cotumaccio, Prezza, SODA'21] it was shown how to extend these ideas to arbitrary automata by means of partial co-lex orders. This work showed that a co-lex order of minimum width (thus optimizing search query times) on deterministic finite automata (DFAs) can be computed in O(m^2 + n^5/2) time, m being the number of transitions and n the number of states of the input DFA. In this paper, we exhibit new combinatorial properties of the minimum-width co-lex order of DFAs and exploit them to design faster prefix sorting algorithms. In particular, we describe two algorithms sorting arbitrary DFAs in O(mn) and O(n^2log n) time, respectively, and an algorithm sorting acyclic DFAs in O(mlog n) time. Within these running times, all algorithms compute also a smallest chain partition of the partial order (required to index the DFA). We present an experiment result to show that an optimized implementation of the O(n^2log n)-time algorithm exhibits a nearly-linear behaviour on large deterministic pan-genomic graphs and is thus also of practical interest.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/09/2023

Sorting Finite Automata via Partition Refinement

Wheeler nondeterministic finite automata (WNFAs) were introduced as a ge...
research
02/04/2019

On Prefix-Sorting Finite Automata

Being able to efficiently test the membership of a word in a formal lang...
research
09/04/2018

A class of orders with linear? time sorting algorithm

In this article, we give a precise mathematical meaning to `linear? time...
research
07/14/2023

Random Wheeler Automata

Wheeler automata were introduced in 2017 as a tool to generalize existin...
research
06/22/2023

Faster Compression of Deterministic Finite Automata

Deterministic finite automata (DFA) are a classic tool for high throughp...
research
03/25/2021

Accelerating Big-Data Sorting Through Programmable Switches

Sorting is a fundamental and well studied problem that has been studied ...
research
05/04/2023

Prefix Sorting DFAs: a Recursive Algorithm

In the past thirty years, numerous algorithms for building the suffix ar...

Please sign up or login with your details

Forgot password? Click here to reset