Reversing Longest Previous Factor Tables is Hard

نویسندگان

  • Jing He
  • Hongyu Liang
  • Guang Yang
چکیده

The Longest Previous Factor (LPF) table of a string s of length n is a table of size n whose i 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 [20, 21] 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.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Efficient Algorithms for Two Extensions of LPF Table: The Power of Suffix Arrays

Suffix arrays provide a powerful data structure to solve several questions related to the structure of all the factors of a string. We show how they can be used to compute efficiently two new tables storing different types of previous factors (past segments) of a string. The concept of a longest previous factor is inherent to Ziv-Lempel factorisation of strings in text compression as well as in...

متن کامل

Efficient algorithms for three variants of the LPF table

The concept of a longest previous factor (LPF) is inherent to Ziv-Lempel factorization of strings in text compression, as well as in statistics of repetitions and symmetries. It is expressed in the form of a table --LPF[i] is the maximum length of a factor starting at position i, that also appears earlier in the given text. We show how to compute efficiently three new tables storing different v...

متن کامل

MATHEMATICAL ENGINEERING TECHNICAL REPORTS Use of Primal-Dual Technique in the Network Algorithm for Two-Way Contingency Tables

The network algorithm of Mehta and Patel is one of the most efficient algorithms to execute a generalized Fisher’s exact test in two-way contingency tables. In this article an efficient algorithm for solving the longest path problem in the network algorithm is proposed. The efficiency of the proposed algorithm relies on the primal dual technique for convex network flow problems and the use of m...

متن کامل

Inapproximability results for the inverse shortest paths problem with integer lengths and unique shortest paths

We study the complexity of two Inverse Shortest Paths (ISP) problems with integer arc lengths and the requirement for uniquely determined shortest paths. Given a collection of paths in a directed graph, the task is to find positive integer arc lengths such that the given paths are uniquely determined shortest paths between their respective terminals. The first problem seeks for arc lengths that...

متن کامل

Hammersley's Interacting Particle Process and Longest Increasing Subsequences

In a famous paper 8] Hammersley investigated the length L n of the longest increasing subsequence of a random n-permutation. Implicit in that paper is a certain one-dimensional continuous-space interacting particle process. By studying a hydrodynamical limit for Hammersley's process we show by fairly \soft" arguments that limn ?1=2 EL n = 2. This is a known result, but previous proofs (Vershik-...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011