English

Linear Algorithms for Computing the Lyndon Border Array and the Lyndon Suffix Array

Data Structures and Algorithms 2015-06-24 v1

Abstract

We consider the problem of finding repetitive structures and inherent patterns in a given string \ss\s{s} of length nn over a finite totally ordered alphabet. A border \su\s{u} of a string \ss\s{s} is both a prefix and a suffix of \ss\s{s} such that \su\ss\s{u} \not= \s{s}. The computation of the border array of a string \ss\s{s}, namely the borders of each prefix of \ss\s{s}, is strongly related to the string matching problem: given a string \sw\s{w}, find all of its occurrences in \ss\s{s}. A {\itshape Lyndon word} is a primitive word (i.e., it is not a power of another word) which is minimal for the lexicographical order of its conjugacy class (i.e., the set of words obtained by cyclic rotations of the letters). In this paper we combine these concepts to introduce the \emph{Lyndon Border Array} Lβ\mathcal L \beta of \ss\s{s}, whose ii-th entry Lβ(\ss)[i]\mathcal L \beta(\s{s})[i] is the length of the longest border of \ss[1\ddi]\s{s}[1 \dd i] which is also a Lyndon word. We propose linear-time and linear-space algorithms for computing Lβ(\ss)\mathcal L \beta (\s{s}). %in the case of both binary and bounded alphabets. Further, we introduce the \emph{Lyndon Suffix Array}, and by modifying the efficient suffix array technique of Ko and Aluru \cite{KA03} outline a linear time and space algorithm for its construction.

Keywords

Cite

@article{arxiv.1506.06983,
  title  = {Linear Algorithms for Computing the Lyndon Border Array and the Lyndon Suffix Array},
  author = {Ali Alatabbi and Jacqueline W. Daykin and M. Sohel Rahman},
  journal= {arXiv preprint arXiv:1506.06983},
  year   = {2015}
}
R2 v1 2026-06-22T09:58:35.096Z