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