-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Source: LongestCommonSubsequence
Target: MaximumIndependentSet
Motivation: Connects string problems to graph theory; enables solving LCS via MaxIS solvers and reveals structural equivalence between subsequence ordering and graph independence.
Reference: Apostolico & Guerra, 1987; Baxter et al., 2004
Reduction Algorithm
Notation:
- Source:
$k$ strings$s_1, \ldots, s_k$ over alphabet$\Sigma$ , with lengths$n_1, \ldots, n_k$ - Target: undirected graph
$G = (V, E)$
Step 1 — Construct match nodes
A node
Step 2 — Construct conflict edges
Two nodes
In other words, there exist indices
Variable mapping: Each LCS character corresponds to a selected node; each MaxIS vertex in the independent set corresponds to a matched position tuple.
Objective:
Size Overhead
| Target metric (code name) | Polynomial (using symbols above) |
|---|---|
num_vertices |
|
num_edges |
$\leq \binom{ |
For
Validation Method
Closed-loop testing: solve LCS by brute-force (enumerate subsequences of shortest string), solve the reduced MaxIS instance, and verify that both give the same optimal value. Test on instances with varying alphabet sizes and string counts (
Example
Source instance: ABAC, BACA, alphabet
Step 1 — Match nodes:
| Node |
|
|
Character |
|---|---|---|---|
| 0 | 1 | A | |
| 0 | 3 | A | |
| 1 | 0 | B | |
| 2 | 1 | A | |
| 2 | 3 | A | |
| 3 | 2 | C |
Step 2 — Conflict edges (9 edges):
| Edge | Reason |
|---|---|
| same |
|
| crossing: |
|
| same |
|
| crossing: |
|
| crossing: |
|
| same |
|
| crossing: |
|
| same |
|
| crossing: |
MaxIS solution:
| Node | Position | Char |
|---|---|---|
| B | ||
| A | ||
| C |
Extracted LCS: BAC (length 3). Verified: B-A-C is a subsequence of both ABAC (positions 1,2,3) and BACA (positions 0,1,2).