Skip to main content
QUICK REVIEW

[Paper Review] Finding Diverse Strings and Longest Common Subsequences in a Graph

Yuto Shida, Giulia Punzi|arXiv (Cornell University)|Jan 1, 2024
Algorithms and Data CompressionComputer Science1 citations
TL;DR

This paper introduces and analyzes the Max-Sum and Max-Min Diverse Longest Common Subsequences (LCS) problems under Hamming distance, proving that both are polynomial-time solvable when the number of LCS candidates K is bounded, NP-hard when K is unbounded, and admitting a PTAS for Max-Sum. The results are established in a general DAG-based string representation model, with NP-hardness shown for explicit string inputs via a reduction from the Max-Min Diverse String Set problem.

ABSTRACT

In this paper, we study for the first time the Diverse Longest Common Subsequences (LCSs) problem under Hamming distance. Given a set of a constant number of input strings, the problem asks to decide if there exists some subset X of K longest common subsequences whose diversity is no less than a specified threshold Δ, where we consider two types of diversities of a set X of strings of equal length: the Sum diversity and the Min diversity defined as the sum and the minimum of the pairwise Hamming distance between any two strings in X, respectively. We analyze the computational complexity of the respective problems with Sum- and Min-diversity measures, called the Max-Sum and Max-Min Diverse LCSs, respectively, considering both approximation algorithms and parameterized complexity. Our results are summarized as follows. When K is bounded, both problems are polynomial time solvable. In contrast, when K is unbounded, both problems become NP-hard, while Max-Sum Diverse LCSs problem admits a PTAS. Furthermore, we analyze the parameterized complexity of both problems with combinations of parameters K and r, where r is the length of the candidate strings to be selected. Importantly, all positive results above are proven in a more general setting, where an input is an edge-labeled directed acyclic graph (DAG) that succinctly represents a set of strings of the same length. Negative results are proven in the setting where an input is explicitly given as a set of strings. The latter results are equipped with an encoding such a set as the longest common subsequences of a specific input string set.

Motivation & Objective

  • To formalize and analyze the computational complexity of finding diverse sets of longest common subsequences (LCS) under Hamming distance.
  • To investigate the parameterized complexity of the Max-Sum and Max-Min Diverse LCS problems with respect to parameters K (number of LCS candidates) and r (length of candidate strings).
  • To establish approximation and exact algorithms for the diverse LCS problems in both DAG-represented and explicitly given string inputs.
  • To prove that the Max-Sum Diverse LCS problem admits a Polynomial-Time Approximation Scheme (PTAS) when K is unbounded.
  • To show that both problems are NP-hard when K is unbounded, using a reduction from the Max-Min Diverse String Set problem.

Proposed method

  • Formalizes two diversity measures: Sum diversity (total pairwise Hamming distance) and Min diversity (minimum pairwise Hamming distance) over sets of equal-length strings.
  • Represents input strings via edge-labeled directed acyclic graphs (DAGs) to enable compact representation of exponentially many LCS candidates.
  • Uses bipartite graph matching on labeled DAGs to model common subsequences, with non-crossing matchings corresponding to valid LCSs.
  • Applies FPT-reduction techniques to show NP-hardness and FPT-reductions from the Max-Min Diverse String Set problem to the Max-Min Diverse LCS problem.
  • Constructs a PTAS for Max-Sum Diverse LCS by leveraging structural properties of LCS in DAGs and dynamic programming over subgraphs.
  • Employs a key transformation: mapping strings X_i to extended strings T_j = P_j · X_j · Q_j with fixed-length prefixes and suffixes to preserve and amplify Hamming distances.

Experimental results

Research questions

  • RQ1Is the Max-Sum Diverse LCS problem fixed-parameter tractable with respect to parameters K and r?
  • RQ2What is the computational complexity of the Max-Min Diverse LCS problem when K is bounded versus unbounded?
  • RQ3Can the Max-Sum Diverse LCS problem be approximated within any constant factor, and does it admit a PTAS?
  • RQ4How do the diversity measures (Sum and Min) behave under Hamming distance in the context of LCS selection?
  • RQ5Is there a reduction from the Max-Min Diverse String Set problem to the Max-Min Diverse LCS problem that preserves solution diversity?

Key findings

  • When K is bounded, both the Max-Sum and Max-Min Diverse LCS problems are solvable in polynomial time.
  • When K is unbounded, both problems become NP-hard, even when the input is given as a set of explicit strings.
  • The Max-Sum Diverse LCS problem admits a Polynomial-Time Approximation Scheme (PTAS), meaning it can be approximated to within any (1−ε) factor in polynomial time.
  • The Max-Min Diverse LCS problem is NP-hard even when restricted to two input strings, as shown via a reduction from the Max-Min Diverse String Set problem.
  • A key transformation maps each string X_i to an extended string T_j = P_j · X_j · Q_j of length r + 2s, such that dH(T_i, T_j) = dH(X_i, X_j) + 2s, preserving and amplifying diversity.
  • The reduction from Max-Min Diverse String Set to Max-Min Diverse LCS is both NP-reduction and FPT-reduction, establishing the hardness of the LCS variant.

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.