Next Article in Journal
Variational Multiscale Nonparametric Regression: Algorithms and Implementation
Next Article in Special Issue
Re-Pair in Small Space
Previous Article in Journal
A Deep Gaussian Process-Based Flight Trajectory Prediction Approach and Its Application on Conflict Detection
Previous Article in Special Issue
Efficient Data Structures for Range Shortest Unique Substring Queries
Article

Computing Maximal Lyndon Substrings of a String

by 1,† and 2,*,†
1
Department of Computing and Software, McMaster University, Hamilton, ON L8S 4K1, Canada
2
Department of Mathematical and Computational Sciences, University of Toronto Mississauga, Mississauga, ON L5L 1C6, Canada
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Algorithms 2020, 13(11), 294; https://doi.org/10.3390/a13110294
Received: 23 September 2020 / Revised: 4 November 2020 / Accepted: 10 November 2020 / Published: 12 November 2020
(This article belongs to the Special Issue Combinatorial Methods for String Processing)
There are two reasons to have an efficient algorithm for identifying all right-maximal Lyndon substrings of a string: firstly, Bannai et al. introduced in 2015 a linear algorithm to compute all runs of a string that relies on knowing all right-maximal Lyndon substrings of the input string, and secondly, Franek et al. showed in 2017 a linear equivalence of sorting suffixes and sorting right-maximal Lyndon substrings of a string, inspired by a novel suffix sorting algorithm of Baier. In 2016, Franek et al. presented a brief overview of algorithms for computing the Lyndon array that encodes the knowledge of right-maximal Lyndon substrings of the input string. Among those presented were two well-known algorithms for computing the Lyndon array: a quadratic in-place algorithm based on the iterated Duval algorithm for Lyndon factorization and a linear algorithmic scheme based on linear suffix sorting, computing the inverse suffix array, and applying to it the next smaller value algorithm. Duval’s algorithm works for strings over any ordered alphabet, while for linear suffix sorting, a constant or an integer alphabet is required. The authors at that time were not aware of Baier’s algorithm. In 2017, our research group proposed a novel algorithm for the Lyndon array. Though the proposed algorithm is linear in the average case and has O(nlog(n)) worst-case complexity, it is interesting as it emulates the fast Fourier algorithm’s recursive approach and introduces τ-reduction, which might be of independent interest. In 2018, we presented a linear algorithm to compute the Lyndon array of a string inspired by Phase I of Baier’s algorithm for suffix sorting. This paper presents the theoretical analysis of these two algorithms and provides empirical comparisons of both of their C++ implementations with respect to the iterated Duval algorithm. View Full-Text
Keywords: combinatorics on words; string algorithms; regularities in strings; suffix sorting; Lyndon substrings; Lyndon arrays; right-maximal Lyndon substrings; tau-reduction algorithm; Baier’s sort algorithm; iterative Duval algorithm combinatorics on words; string algorithms; regularities in strings; suffix sorting; Lyndon substrings; Lyndon arrays; right-maximal Lyndon substrings; tau-reduction algorithm; Baier’s sort algorithm; iterative Duval algorithm
Show Figures

Graphical abstract

MDPI and ACS Style

Franek, F.; Liut, M. Computing Maximal Lyndon Substrings of a String. Algorithms 2020, 13, 294. https://doi.org/10.3390/a13110294

AMA Style

Franek F, Liut M. Computing Maximal Lyndon Substrings of a String. Algorithms. 2020; 13(11):294. https://doi.org/10.3390/a13110294

Chicago/Turabian Style

Franek, Frantisek, and Michael Liut. 2020. "Computing Maximal Lyndon Substrings of a String" Algorithms 13, no. 11: 294. https://doi.org/10.3390/a13110294

Find Other Styles
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Back to TopTop