English

Weighted Shortest Common Supersequence Problem Revisited

Data Structures and Algorithms 2019-09-26 v1

Abstract

A weighted string, also known as a position weight matrix, is a sequence of probability distributions over some alphabet. We revisit the Weighted Shortest Common Supersequence (WSCS) problem, introduced by Amir et al. [SPIRE 2011], that is, the SCS problem on weighted strings. In the WSCS problem, we are given two weighted strings W1W_1 and W2W_2 and a threshold Freq\mathit{Freq} on probability, and we are asked to compute the shortest (standard) string SS such that both W1W_1 and W2W_2 match subsequences of SS (not necessarily the same) with probability at least Freq\mathit{Freq}. Amir et al. showed that this problem is NP-complete if the probabilities, including the threshold Freq\mathit{Freq}, are represented by their logarithms (encoded in binary). We present an algorithm that solves the WSCS problem for two weighted strings of length nn over a constant-sized alphabet in O(n2zlogz)\mathcal{O}(n^2\sqrt{z} \log{z}) time. Notably, our upper bound matches known conditional lower bounds stating that the WSCS problem cannot be solved in O(n2ε)\mathcal{O}(n^{2-\varepsilon}) time or in O(z0.5ε)\mathcal{O}^*(z^{0.5-\varepsilon}) time unless there is a breakthrough improving upon long-standing upper bounds for fundamental NP-hard problems (CNF-SAT and Subset Sum, respectively). We also discover a fundamental difference between the WSCS problem and the Weighted Longest Common Subsequence (WLCS) problem, introduced by Amir et al. [JDA 2010]. We show that the WLCS problem cannot be solved in O(nf(z))\mathcal{O}(n^{f(z)}) time, for any function f(z)f(z), unless P=NP\mathrm{P}=\mathrm{NP}.

Keywords

Cite

@article{arxiv.1909.11433,
  title  = {Weighted Shortest Common Supersequence Problem Revisited},
  author = {Panagiotis Charalampopoulos and Tomasz Kociumaka and Solon P. Pissis and Jakub Radoszewski and Wojciech Rytter and Juliusz Straszyński and Tomasz Waleń and Wiktor Zuba},
  journal= {arXiv preprint arXiv:1909.11433},
  year   = {2019}
}

Comments

Accepted to SPIRE'19

R2 v1 2026-06-23T11:25:21.513Z