Papers
Topics
Authors
Recent
Search
2000 character limit reached

Longest Run Subsequence Problem

Updated 10 July 2026
  • 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 s∈Σ∗s \in \Sigma^*, for a maximum-length subsequence tt such that each symbol a∈Σa \in \Sigma appears in tt in at most one run, equivalently, all occurrences of aa in tt form a single contiguous block in tt. 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 Σ\Sigma be a finite alphabet and let s∈Σ∗s \in \Sigma^* be a string of length nn, written tt0. A run of tt1 is any interval tt2, tt3, such that tt4, and tt5 and tt6. An tt7-run is a run whose symbol is tt8 (Dondi et al., 2020).

A subsequence tt9 of a∈Σa \in \Sigma0 is specified by strictly increasing indices a∈Σa \in \Sigma1 with a∈Σa \in \Sigma2. Runs in the subsequence are defined with respect to adjacency within a∈Σa \in \Sigma3: a run in a∈Σa \in \Sigma4 is a maximal block of equal symbols appearing consecutively in a∈Σa \in \Sigma5, not necessarily consecutive in a∈Σa \in \Sigma6. The LRS optimization problem asks for a maximum-length subsequence a∈Σa \in \Sigma7 of a∈Σa \in \Sigma8 such that each symbol a∈Σa \in \Sigma9 appears in tt0 in at most one run. The decision version, parameterized by a target length tt1, asks whether there exists a subsequence tt2 of length at least tt3 such that, for every tt4, the occurrences of tt5 in tt6 are contained in a single run.

An equivalent characterization uses run-length encoding. Any LRS solution tt7 decomposes into at most one run per symbol, and the sequence of run symbols is repetition-free. Thus tt8'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 tt9, an optimal LRS is aa0, which selects non-maximal runs for aa1 and aa2 and omits aa3 (Dondi et al., 2020).

A later formulation compresses the input into its maximal constant-letter substrings aa4, ordered by occurrence in aa5, where each run aa6 has letter aa7 and length aa8. Under this view, if an optimal LRS subsequence includes any letter from a given run in aa9, it includes all letters of that run. Hence a valid LRS solution can be expressed as a subset tt0 subject to the condition that if tt1 with tt2 and tt3, then there is no tt4 with tt5 and tt6. The objective becomes

tt7

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 tt8 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 tt9 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 tt0, via an algorithm that uses exponential space, yielding time tt1 for some computable tt2 (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 tt3 be the number of runs in a chosen subsequence. Then LRS is FPT parameterized by tt4. They also established kernelization lower bounds: LRS admits no polynomial kernel when parameterized by tt5 unless NP tt6 coNP/poly, and, since tt7, the same lower bound follows for parameter tt8 (Dondi et al., 2020).

At the same time, there is a simple positive kernelization result for the solution-length parameter tt9. If Σ\Sigma0, one occurrence per symbol yields a solution of length Σ\Sigma1. If some symbol occurs at least Σ\Sigma2 times, then a run of that symbol of length Σ\Sigma3 is a solution. Otherwise Σ\Sigma4 and each symbol occurs fewer than Σ\Sigma5 times, so the total instance size is at most Σ\Sigma6. Thus LRS admits a polynomial kernel of size Σ\Sigma7 when parameterized by Σ\Sigma8 (Dondi et al., 2020).

The approximation landscape is similarly mixed. A simple Σ\Sigma9-approximation is obtained by comparing two candidates: the solution taking one occurrence per symbol, of length s∈Σ∗s \in \Sigma^*0, and the longest s∈Σ∗s \in \Sigma^*1-run, of length equal to the maximum symbol frequency. The better of these is a s∈Σ∗s \in \Sigma^*2-approximation, which yields a s∈Σ∗s \in \Sigma^*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 s∈Σ∗s \in \Sigma^*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 s∈Σ∗s \in \Sigma^*5-occurrence constraints, specifically s∈Σ∗s \in \Sigma^*6, and s∈Σ∗s \in \Sigma^*7 when s∈Σ∗s \in \Sigma^*8 (Blum et al., 19 Aug 2025).

4. Randomized FPT algorithm parameterized by the number of runs

The FPT algorithm for parameter s∈Σ∗s \in \Sigma^*9 is based on a reduction to nn0-Multilinear Detection (k-MLD) through an arithmetic-circuit encoding. The theorem states: there exists a randomized algorithm that, given nn1 and integers nn2, decides if there exists a run subsequence of length nn3 with exactly nn4 runs in time

nn5

and polynomial space. By iterating over nn6, this solves the version with target length at least nn7 (Dondi et al., 2020).

The construction introduces one variable nn8 per alphabet symbol nn9, and dynamic-programming circuit nodes tt00 encoding the statement that there exists an LRS subsequence within tt01 of length tt02 with exactly tt03 runs. The root is tt04. The recurrence is

tt05

The base cases are

tt06

The recurrence has a direct combinatorial interpretation. The term tt07 skips position tt08. The summation adds a new terminal run on symbol tt09, of length tt10, after a feasible prefix with tt11 runs and length tt12. Multiplication by tt13 marks the use of symbol tt14; 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 tt15 of length tt16 consisting of tt17 runs over distinct symbols tt18 if and only if the circuit contains a degree-tt19 multilinear monomial tt20 in tt21, and hence in tt22 for tt23, tt24, tt25. The algorithm then invokes the Koutis–Williams randomized algorithm for k-MLD, which solves k-MLD on a circuit tt26 in randomized time tt27 and space tt28. Since the circuit size is tt29, iterating over all tt30 yields total time tt31 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 tt32, given tt33 instances tt34, equalized by length tt35, alphabet size tt36, and target tt37, all alphabets are relabeled to tt38, and a new instance is built over

tt39

with string

tt40

and target

tt41

The separator blocks force any feasible solution to use exactly one run on tt42 and one run on tt43, and to be contained within exactly one block tt44. Hence tt45 has an LRS of length at least tt46 if and only if at least one original instance does. Since tt47, the cross-composition implies that LRS admits no polynomial kernel parameterized by tt48 unless NP tt49 coNP/poly (Dondi et al., 2020).

The corollary for parameter tt50 is immediate from tt51: LRS has no polynomial kernel parameterized by the number of runs unless NP tt52 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 tt53, edge-related symbols tt54, tt55, separators tt56, and separator triplets tt57. Canonical subsequences can be enforced so that each vertex gadget contributes either tt58 or an tt59-heavy block, and edge gadgets enforce consistency: adjacent vertices cannot both contribute tt60. The reduction has constants tt61 and tt62, and therefore LRS with at most two occurrences per symbol is APX-hard and admits no PTAS unless tt63 (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 tt64 for each run tt65: tt66 The objective is

tt67

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: tt68 If tt69, the right-hand side is tt70, 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 tt71, the selected run indices carrying tt72 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 tt73, 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, tt74 and tt75, initialized to tt76. For a candidate run tt77 with letter tt78, insertion is allowed only if, for every tt79, the three conditions

tt80

tt81

tt82

all hold. If accepted, tt83 and tt84 are updated. The fitness is

tt85

Evaluation cost is tt86, and measured decoding times are generally well below tt87 ms, with only a few evaluations for tt88 slightly exceeding tt89 ms (Blum et al., 19 Aug 2025).

The reported BRKGA parameters are population size tt90, elite fraction tt91, mutant fraction tt92, and crossover probability tt93. The MMAS comparator uses one pheromone per run, learning rate tt94, tt95 solution constructions per iteration, and determinism rate tt96. CPLEX 22.1 is used on the ILP model in sequential mode, under the same time limit tt97 CPU seconds per instance (Blum et al., 19 Aug 2025).

The experiments use tt98 uniformly random instances: for each tt99 and a∈Σa \in \Sigma00, a∈Σa \in \Sigma01 instances are generated. Across all a∈Σa \in \Sigma02 instances, BRKGA obtains the best solution quality on average and outperforms MMAS and CPLEX with statistical significance. For a∈Σa \in \Sigma03, BRKGA and MMAS reach the same average best values, but MMAS requires notably more time. As a∈Σa \in \Sigma04 increases, MMAS degrades markedly relative to BRKGA. For the shortest strings, a∈Σa \in \Sigma05 with a∈Σa \in \Sigma06, 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 a∈Σa \in \Sigma07 and a∈Σa \in \Sigma08 (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 a∈Σa \in \Sigma09 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 a∈Σa \in \Sigma10, 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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Longest Run Subsequence Problem.