Computing the Longest Previous Factor

  • Authors:
  • Maxime Crochemore;Lucian Ilie;Costas S. Iliopoulos;Marcin Kubica;Wojciech Rytter;Tomasz Waleń

  • Affiliations:
  • Department of Informatics, King's College London, London WC2R 2LS, UK and Université Paris-Est, France;Department of Computer Science, University of Western Ontario, London, Ontario, N6A 5B7, Canada;Department of Informatics, King's College London, London WC2R 2LS, UK and Digital Ecosystems & Business Intelligence Institute, Curtin University of Technology, Perth WA 6845, Australia;Institute of Informatics, Warsaw University, ul. Banacha 2, 02-097 Warszawa, Poland;Institute of Informatics, Warsaw University, ul. Banacha 2, 02-097 Warszawa, Poland and Department of Math. and Informatics, Copernicus University, Torun, Poland;Institute of Informatics, Warsaw University, ul. Banacha 2, 02-097 Warszawa, Poland

  • Venue:
  • European Journal of Combinatorics
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Longest Previous Factor array gives, for each position i in a string y, the length of the longest factor (substring) of y that occurs both at i and to the left of i in y. The Longest Previous Factor array is central in many text compression techniques as well as in the most efficient algorithms for detecting motifs and repetitions occurring in a text. Computing the Longest Previous Factor array requires usually the Suffix Array and the Longest Common Prefix array. We give the first time-space optimal algorithm that computes the Longest Previous Factor array, given the Suffix Array and the Longest Common Prefix array. We also give the first linear-time algorithm that computes the permutation that applied to the Longest Common Prefix array produces the Longest Previous Factor array.