Longest Run Subsequence Problem
- The Longest Run Subsequence problem is defined as finding a maximum-length subsequence where each symbol appears in a single contiguous block.
- It is NP-hard yet fixed-parameter tractable under parameters like alphabet size and number of runs, with strong kernelization lower bounds.
- Algorithmic approaches range from exact ILP formulations and greedy decoders to randomized FPT strategies and metaheuristics, with practical use in genome assembly.
The Longest Run Subsequence (LRS) problem asks, for a string , for a maximum-length subsequence such that each symbol appears in in at most one run, equivalently, all occurrences of in form a single contiguous block in . Introduced in the context of the scaffolding phase of genome assembly, the problem lies at the intersection of subsequence optimization, run-structured combinatorics, and parameterized complexity. Its known theory combines NP-hardness, fixed-parameter tractability under several parameterizations, kernelization lower bounds, approximation and inapproximability results, and both exact and metaheuristic solution approaches (Dondi et al., 2020).
1. Formal definition and equivalent views
Let be a finite alphabet and let be a string of length , written 0. A run of 1 is any interval 2, 3, such that 4, and 5 and 6. An 7-run is a run whose symbol is 8 (Dondi et al., 2020).
A subsequence 9 of 0 is specified by strictly increasing indices 1 with 2. Runs in the subsequence are defined with respect to adjacency within 3: a run in 4 is a maximal block of equal symbols appearing consecutively in 5, not necessarily consecutive in 6. The LRS optimization problem asks for a maximum-length subsequence 7 of 8 such that each symbol 9 appears in 0 in at most one run. The decision version, parameterized by a target length 1, asks whether there exists a subsequence 2 of length at least 3 such that, for every 4, the occurrences of 5 in 6 are contained in a single run.
An equivalent characterization uses run-length encoding. Any LRS solution 7 decomposes into at most one run per symbol, and the sequence of run symbols is repetition-free. Thus 8's run-length encoding uses each symbol at most once. This formulation makes clear that a run picked in the solution need not be maximal in the input string, and not every symbol must appear. For example, for 9, an optimal LRS is 0, which selects non-maximal runs for 1 and 2 and omits 3 (Dondi et al., 2020).
A later formulation compresses the input into its maximal constant-letter substrings 4, ordered by occurrence in 5, where each run 6 has letter 7 and length 8. Under this view, if an optimal LRS subsequence includes any letter from a given run in 9, it includes all letters of that run. Hence a valid LRS solution can be expressed as a subset 0 subject to the condition that if 1 with 2 and 3, then there is no 4 with 5 and 6. The objective becomes
7
This run-based simplification is the basis for later ILP and metaheuristic methods (Blum et al., 19 Aug 2025).
2. Genome-assembly motivation and relation to adjacent problems
LRS was introduced recently in the context of the scaffolding phase of genome assembly. In scaffolding, bins in one assembly are matched to contigs in another. Errors and structural variations cause a contig to appear scattered across bins. LRS seeks a longest subsequence of contig matches in which every contig appears in at most one contiguous block, filtering out inconsistent mappings and suggesting a plausible partition into contigs. This directly captures the expectation that, in a correctly scaffolded ordering, each contig should appear as a single block (Dondi et al., 2020).
The problem is distinct from classical order-constrained subsequence problems. Longest Increasing Subsequence imposes an order constraint on subsequences, whereas LRS imposes a run-contiguity constraint per symbol. It is also distinct from standard run-length encoded string problems, where runs are computational units for problems such as LCS on run-length encoded inputs. LRS operates on a single string and restricts the subsequence to at most one run per symbol, which makes selection combinatorial and NP-hard (Dondi et al., 2020).
The restriction is also different from problems based on repeated motifs. The Longest Subsequence-Repeated Subsequence problem allows repeated units 8 that are arbitrary subsequences and does not restrict a letter to appear in only one block globally, whereas LRS requires at most one run per symbol. This difference is structurally important: LSRS is reported as polynomial-time solvable in 9 for the unconstrained version, while LRS is NP-hard (Lafond et al., 2023). This suggests that the global uniqueness-of-run constraint, rather than mere block structure, is the principal source of hardness.
3. Complexity landscape
The basic complexity status is established by two strands of results. First, LRS is NP-hard, as shown by Schrinner et al. in WABI 2020. Second, the problem is fixed-parameter tractable when parameterized by the alphabet size 0, via an algorithm that uses exponential space, yielding time 1 for some computable 2 (Dondi et al., 2020).
Dondi and Sikora strengthened the parameterized picture by proving fixed-parameter tractability with respect to a smaller parameter, namely the number of runs in the solution. Let 3 be the number of runs in a chosen subsequence. Then LRS is FPT parameterized by 4. They also established kernelization lower bounds: LRS admits no polynomial kernel when parameterized by 5 unless NP 6 coNP/poly, and, since 7, the same lower bound follows for parameter 8 (Dondi et al., 2020).
At the same time, there is a simple positive kernelization result for the solution-length parameter 9. If 0, one occurrence per symbol yields a solution of length 1. If some symbol occurs at least 2 times, then a run of that symbol of length 3 is a solution. Otherwise 4 and each symbol occurs fewer than 5 times, so the total instance size is at most 6. Thus LRS admits a polynomial kernel of size 7 when parameterized by 8 (Dondi et al., 2020).
The approximation landscape is similarly mixed. A simple 9-approximation is obtained by comparing two candidates: the solution taking one occurrence per symbol, of length 0, and the longest 1-run, of length equal to the maximum symbol frequency. The better of these is a 2-approximation, which yields a 3 factor in the worst case. Against this upper bound stands a strong negative result: even when each symbol appears at most twice in the input string, LRS remains APX-hard, ruling out a PTAS unless 4 (Dondi et al., 2020).
A later paper places these results into a broader algorithmic picture, noting additionally that Asahiro et al. provided approximation algorithms under 5-occurrence constraints, specifically 6, and 7 when 8 (Blum et al., 19 Aug 2025).
4. Randomized FPT algorithm parameterized by the number of runs
The FPT algorithm for parameter 9 is based on a reduction to 0-Multilinear Detection (k-MLD) through an arithmetic-circuit encoding. The theorem states: there exists a randomized algorithm that, given 1 and integers 2, decides if there exists a run subsequence of length 3 with exactly 4 runs in time
5
and polynomial space. By iterating over 6, this solves the version with target length at least 7 (Dondi et al., 2020).
The construction introduces one variable 8 per alphabet symbol 9, and dynamic-programming circuit nodes 00 encoding the statement that there exists an LRS subsequence within 01 of length 02 with exactly 03 runs. The root is 04. The recurrence is
05
The base cases are
06
The recurrence has a direct combinatorial interpretation. The term 07 skips position 08. The summation adds a new terminal run on symbol 09, of length 10, after a feasible prefix with 11 runs and length 12. Multiplication by 13 marks the use of symbol 14; multilinearity then enforces that each symbol is used in at most one run globally.
Correctness is captured by the key lemma: there exists a run subsequence of 15 of length 16 consisting of 17 runs over distinct symbols 18 if and only if the circuit contains a degree-19 multilinear monomial 20 in 21, and hence in 22 for 23, 24, 25. The algorithm then invokes the Koutis–Williams randomized algorithm for k-MLD, which solves k-MLD on a circuit 26 in randomized time 27 and space 28. Since the circuit size is 29, iterating over all 30 yields total time 31 and polynomial space (Dondi et al., 2020).
This algorithm is algebraic rather than combinatorial in the usual DP sense. A plausible implication is that its main significance is structural: it shows that the decisive combinatorial bottleneck is the number of symbol-blocks in the solution, not the input alphabet alone.
5. Kernelization lower bounds and hard restricted variants
The kernelization lower bounds are obtained by OR-cross-composition from unparameterized LRS to its parameterized variants. For parameter 32, given 33 instances 34, equalized by length 35, alphabet size 36, and target 37, all alphabets are relabeled to 38, and a new instance is built over
39
with string
40
and target
41
The separator blocks force any feasible solution to use exactly one run on 42 and one run on 43, and to be contained within exactly one block 44. Hence 45 has an LRS of length at least 46 if and only if at least one original instance does. Since 47, the cross-composition implies that LRS admits no polynomial kernel parameterized by 48 unless NP 49 coNP/poly (Dondi et al., 2020).
The corollary for parameter 50 is immediate from 51: LRS has no polynomial kernel parameterized by the number of runs unless NP 52 coNP/poly. These results sharply separate fixed-parameter tractability from kernelizability for the most natural structural parameters.
The APX-hardness result shows that the difficulty persists under a severe frequency restriction. When each symbol appears at most twice in the input string, LRS remains APX-hard via an L-reduction from Maximum Independent Set on cubic graphs. The construction uses vertex symbols 53, edge-related symbols 54, 55, separators 56, and separator triplets 57. Canonical subsequences can be enforced so that each vertex gadget contributes either 58 or an 59-heavy block, and edge gadgets enforce consistency: adjacent vertices cannot both contribute 60. The reduction has constants 61 and 62, and therefore LRS with at most two occurrences per symbol is APX-hard and admits no PTAS unless 63 (Dondi et al., 2020).
A later paper uses this restricted-case hardness as part of a practical algorithmic motivation: exact methods such as ILP and DP may solve only modest-size instances, making heuristics and metaheuristics natural for scalability (Blum et al., 19 Aug 2025).
6. Exact formulations, heuristic methods, and empirical performance
A compact integer linear programming model, reported from Schrinner et al., uses one binary variable 64 for each run 65: 66 The objective is
67
and validity is enforced by constraints stating that if two selected runs of the same letter are chosen, then no selected run of a different letter may lie between them: 68 If 69, the right-hand side is 70, so all intervening foreign-letter runs are forbidden; if at least one endpoint is unselected, the constraint becomes nonbinding. This model enforces that, for each letter 71, the selected run indices carrying 72 form a contiguous block (Blum et al., 19 Aug 2025).
The same paper presents a Biased Random Key Genetic Algorithm (BRKGA) and a Max–Min Ant System (MMAS) for LRS. In the BRKGA, an individual is a vector 73, one key per run. Decoding sorts runs by non-increasing key and greedily adds them if validity is preserved. The validity check is implemented with per-letter lower and upper bounds, 74 and 75, initialized to 76. For a candidate run 77 with letter 78, insertion is allowed only if, for every 79, the three conditions
80
81
82
all hold. If accepted, 83 and 84 are updated. The fitness is
85
Evaluation cost is 86, and measured decoding times are generally well below 87 ms, with only a few evaluations for 88 slightly exceeding 89 ms (Blum et al., 19 Aug 2025).
The reported BRKGA parameters are population size 90, elite fraction 91, mutant fraction 92, and crossover probability 93. The MMAS comparator uses one pheromone per run, learning rate 94, 95 solution constructions per iteration, and determinism rate 96. CPLEX 22.1 is used on the ILP model in sequential mode, under the same time limit 97 CPU seconds per instance (Blum et al., 19 Aug 2025).
The experiments use 98 uniformly random instances: for each 99 and 00, 01 instances are generated. Across all 02 instances, BRKGA obtains the best solution quality on average and outperforms MMAS and CPLEX with statistical significance. For 03, BRKGA and MMAS reach the same average best values, but MMAS requires notably more time. As 04 increases, MMAS degrades markedly relative to BRKGA. For the shortest strings, 05 with 06, CPLEX produced slightly better solutions within the time limit than BRKGA. CPLEX solved only the smallest or easiest cases to near-optimality, and its optimality gaps grew rapidly with 07 and 08 (Blum et al., 19 Aug 2025).
These results do not alter the formal complexity picture, but they clarify the present methodological split. Exact formulations remain useful on small instances, while large-instance practice currently relies on run-compressed representations and extremely fast validity-preserving decoding.
7. Open directions
The open problems explicitly highlighted include improving approximation algorithms beyond the trivial 09 bound and closing the gap with APX-hardness; evaluating the practical competitiveness of the randomized multilinear-detection FPT algorithm against ILP formulations and heuristics; and further exploration of parameterizations and structural restrictions that might yield efficient exact or approximation algorithms (Dondi et al., 2020).
The later BRKGA study isolates a concrete practical limitation: performance on short strings with large 10, where CPLEX can still be competitive, and the absence of domain-informed heuristic information for improving the decoder beyond pure greedy feasibility. This suggests that the empirical frontier is no longer only about raw search power, but also about the quality of structure-aware decoding and hybrid exact-heuristic strategies (Blum et al., 19 Aug 2025).
Taken together, the current state of LRS is unusually well stratified. The formal side provides precise separations between NP-hardness, FPT solvability, kernel lower bounds, and APX-hardness. The algorithmic side provides both algebraic FPT machinery and run-based practical solvers. The remaining questions concern how closely these two perspectives can be brought together without weakening either exactness or scalability.