O problema da subsequência comum máxima sem repetições

Christian Tjandraatmadja2010 · DOI

Abstract

This research explores the Repetition-Free Longest Common Subsequence (RFLCS) problem, a variation of the classic Longest Common Subsequence (LCS) problem where the resulting subsequence must contain no repeated symbols. While the standard LCS problem is solvable in polynomial time, the repetition-free constraint renders the problem NP-hard and APX-hard. This work investigates the problem's structure through the lenses of graph theory and polyhedral combinatorics, ultimately developing a high-performance branch-and-cut solver. By utilizing novel linear inequalities called "Extended Stars" and efficient separation algorithms, the proposed method significantly outperforms standard integer programming formulations, particularly on large-scale sequences.

Introduction

In computational biology and sequence analysis, finding similarities between strings is a fundamental task. The classic Longest Common Subsequence (LCS) problem—finding the longest string that can be derived from two input sequences by deleting characters—is a staple of computer science, efficiently solved via dynamic programming. However, real-world biological data often involves "gene families," where multiple copies of the same gene appear in a genome. To compare such genomes accurately, scientists often require a common sequence where each gene is represented at most once.

This requirement defines the Repetition-Free Longest Common Subsequence (RFLCS) problem. Unlike its predecessor, RFLCS is computationally difficult. The addition of the "at most once" constraint transforms the problem into an NP-hard challenge, meaning no known polynomial-time algorithm can find an optimal solution for all cases. This research bridges the gap between theoretical complexity and practical necessity by providing a robust toolkit for exact and approximate solutions.

Methodology

1. Conflict Graphs and Independent Sets

The problem is modeled by transforming sequence matches into a graph-theoretic framework. Each node in a "conflict graph" represents a potential match (a pair of indices where both sequences share the same character). Edges are drawn between nodes if the matches are incompatible—either because they "cross" (violating the relative order of the sequences) or because they involve the same character (violating the repetition-free rule). Finding the RFLCS is thus equivalent to finding the Maximum Independent Set in this conflict graph.

2. Polyhedral Combinatorics and Branch-and-Cut

To solve the problem exactly, the research employs Integer Programming (IP). The core of the optimization lies in identifying "facets"—the strongest possible linear inequalities that define the boundaries of the feasible solution space.

  • Extended Stars: The author identifies a novel class of inequalities termed "Extended Stars." It is mathematically proven that these inequalities are facet-defining, providing the "tightest" possible constraints for the solver.
  • Separation Algorithms: A branch-and-cut algorithm works by iteratively adding constraints that are violated by the current fractional solution. To do this efficiently, the author adapted the classic Hunt-Szymanski algorithm to serve as a custom separation routine, identifying violated Extended Star constraints faster than standard dynamic programming approaches.

3. Heuristics and Pruning

Because the search space for NP-hard problems grows exponentially, reducing the number of variables is critical. The author developed a "Marriage Bound" heuristic. By pre-calculating LCS values for all prefixes and suffixes of the sequences, the algorithm can estimate the maximum possible length of a subsequence passing through any given match. If this estimate is lower than a known good solution, the variable is pruned. In practice, this technique can remove over 50% of the variables before the main solver begins.

Experimental Results

The algorithms were evaluated using synthetic datasets consisting of randomly generated sequences with varying lengths ($n$) and alphabet sizes ($|\Sigma|$).

  • Computational Efficiency: The optimized branch-and-cut solver demonstrated significant performance gains. For sequences of length $n=512$, the custom solver was frequently 10x to 100x faster than baseline IP formulations.
  • The Small Alphabet Challenge: The research highlighted that the problem is paradoxically more difficult when the alphabet is small (e.g., DNA's 4-letter alphabet). Small alphabets lead to a higher density of character occurrences, which causes an explosion in the number of edges in the conflict graph.
  • Heuristic Performance: The Marriage Bound heuristic proved to be highly effective, consistently finding solutions near the true optimum. This makes it a viable alternative for sequences up to $n=15,000$, where exact solvers become computationally prohibitive.

Conclusion and Future Work

This work provides a comprehensive framework for tackling the RFLCS problem, combining theoretical proofs of facet-defining inequalities with practical algorithmic optimizations. While the branch-and-cut approach handles sequences of several thousand characters, the "small alphabet wall" remains a significant hurdle.

Future research directions include investigating whether a constant-factor approximation algorithm exists for RFLCS—a major open question in the field. Additionally, extending this framework to accommodate sequence reversals (common in genomic evolution) would further enhance its utility in bioinformatics applications.

Summary updated

Abstract

\n Exploramos o seguinte problema: dadas duas sequências X e Y sobre um alfabeto finito, encontre uma subsequência comum máxima de X e Y sem símbolos repetidos. Estudamos a estrutura deste problema, particularmente do ponto de vista de grafos e de combinatória poliédrica. Desenvolvemos algoritmos de aproximação e heurísticas para este problema. O enfoque deste trabalho está na construção de um algoritmo baseado na técnica branch-and-cut, aproveitando-nos de um algoritmo de separação eficiente e de heurísticas e técnicas para encontrarmos uma solução ótima mais cedo. Também estudamos um problema mais fácil no qual este problema é baseado: dadas duas sequências X e Y sobre um alfabeto finito, encontre uma subsequência comum máxima de X e Y. Exploramos este problema do ponto de vista de combinatória poliédrica e descrevemos vários algoritmos conhecidos para resolvê-lo.\n
BibTeX
@misc{tjandraatmadja2010o,
  author = {Christian Tjandraatmadja},
  title = {{O problema da subsequência comum máxima sem repetições}},
  year = {2010},
  doi = {10.11606/d.45.2010.tde-13092010-093911},
}
Figure