Skip to main content
QUICK REVIEW

[Paper Review] Optimal LZ-End Parsing Is Hard

Hideo Bannai, Mitsuru Funakoshi|arXiv (Cornell University)|Jan 1, 2023
Natural Language Processing TechniquesComputer Science1 citations
TL;DR

This paper proves that computing the optimal LZ-End parsing—defined as the minimum-number-of-phrases parsing under the LZ-End constraints—is NP-complete via a reduction from the vertex cover problem. It further presents a MAX-SAT formulation for exact computation and establishes a lower bound of 2 on the approximation ratio of greedy LZ-End parsing relative to the optimal parsing, showing the ratio asymptotically approaches 2 for certain binary strings.

ABSTRACT

LZ-End is a variant of the well-known Lempel-Ziv parsing family such that each phrase of the parsing has a previous occurrence, with the additional constraint that the previous occurrence must end at the end of a previous phrase. LZ-End was initially proposed as a greedy parsing, where each phrase is determined greedily from left to right, as the longest factor that satisfies the above constraint~[Kreft & Navarro, 2010]. In this work, we consider an optimal LZ-End parsing that has the minimum number of phrases in such parsings. We show that a decision version of computing the optimal LZ-End parsing is NP-complete by showing a reduction from the vertex cover problem. Moreover, we give a MAX-SAT formulation for the optimal LZ-End parsing adapting an approach for computing various NP-hard repetitiveness measures recently presented by [Bannai et al., 2022]. We also consider the approximation ratio of the size of greedy LZ-End parsing to the size of the optimal LZ-End parsing, and give a lower bound of the ratio which asymptotically approaches $2$.

Motivation & Objective

  • To determine the computational complexity of finding the optimal LZ-End parsing, defined as the parsing with the minimum number of phrases under LZ-End constraints.
  • To develop an exact computation method for the optimal LZ-End parsing using MAX-SAT formulation.
  • To analyze the approximation ratio between the greedy LZ-End parsing and the optimal parsing, particularly its worst-case performance.

Proposed method

  • Reduces the vertex cover problem to the decision version of optimal LZ-End parsing to prove NP-completeness.
  • Constructs a MAX-SAT instance with O(n²) variables and O(n²) clauses to encode the constraints of valid LZ-End parsings.
  • Uses soft clauses and cardinality constraints to encode phrase selection and referencing rules in the parsing.
  • Imposes constraints ensuring that each phrase either starts a new symbol or references a suffix ending at a phrase boundary.
  • Employs a linear-size encoding for cardinality constraints to keep the CNF size manageable.
  • Analyzes a family of binary strings to derive a lower bound on the ratio between greedy and optimal parsing sizes.

Experimental results

Research questions

  • RQ1Is the problem of computing the optimal LZ-End parsing NP-complete?
  • RQ2Can the optimal LZ-End parsing be computed exactly using a MAX-SAT formulation?
  • RQ3What is the worst-case approximation ratio between the greedy LZ-End parsing and the optimal parsing?
  • RQ4Can the ratio between the size of the greedy parsing and the optimal parsing exceed 2 asymptotically?

Key findings

  • The decision problem of computing the optimal LZ-End parsing is NP-complete, proven via a reduction from the vertex cover problem.
  • A MAX-SAT formulation with O(n²) variables and O(n²) clauses enables exact computation of the optimal LZ-End parsing.
  • For a family of binary strings, the ratio between the size of the greedy LZ-End parsing (ze) and the optimal parsing (zend) asymptotically approaches 2.
  • The lower bound of 2 on the ratio ze/zend is tight under the conjecture that ze ≤ 2zno holds for all strings.
  • The construction shows that the greedy parsing can be arbitrarily far from optimal, with the gap approaching a factor of 2.
  • The result implies that the greedy LZ-End parsing cannot be guaranteed to be a constant-factor approximation better than 2 in the worst case.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.