Reversing Longest Previous Factor Tables is Hard

  • Jing He
  • Hongyu Liang
  • Guang Yang
Conference paper

DOI: 10.1007/978-3-642-22300-6_41

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6844)
Cite this paper as:
He J., Liang H., Yang G. (2011) Reversing Longest Previous Factor Tables is Hard. In: Dehne F., Iacono J., Sack JR. (eds) Algorithms and Data Structures. WADS 2011. Lecture Notes in Computer Science, vol 6844. Springer, Berlin, Heidelberg

Abstract

The Longest Previous Factor (LPF) table of a string s of length n is a table of size n whose ith element indicates the length of the longest substring of s starting from position i that has appeared previously in s. LPF tables facilitate the computing of the Lempel-Ziv factorization of strings [21,22] which plays an important role in text compression. An open question from Clément, Crochemore and Rindone [4] asked whether the following problem (which we call the reverse LPF problem) can be solved efficiently: Given a table W, decide whether it is the LPF table of some string, and find such a string if so.

In this paper, we address this open question by proving that the reverse LPF problem is NP-hard. Thus, there is no polynomial time algorithm for solving it unless P = NP. Complementing with this general hardness result, we also design a linear-time online algorithm for the reverse LPF problem over input tables whose elements are all 0 or 1.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Jing He
    • 1
  • Hongyu Liang
    • 1
  • Guang Yang
    • 1
  1. 1.IInstitute for Interdisciplinary Information SciencesTsinghua UniversityBeijingChina

Personalised recommendations