English

A hardness result and new algorithm for the longest common palindromic subsequence problem

Data Structures and Algorithms 2016-12-23 v1

Abstract

The 2-LCPS problem, first introduced by Chowdhury et al. [Fundam. Inform., 129(4):329-340, 2014], asks one to compute (the length of) a longest palindromic common subsequence between two given strings AA and BB. We show that the 2-LCPS problem is at least as hard as the well-studied longest common subsequence problem for four strings (the 4-LCS problem). Then, we present a new algorithm which solves the 2-LCPS problem in O(σM2+n)O(\sigma M^2 + n) time, where nn denotes the length of AA and BB, MM denotes the number of matching positions between AA and BB, and σ\sigma denotes the number of distinct characters occurring in both AA and BB. Our new algorithm is faster than Chowdhury et al.'s sparse algorithm when σ=o(log2nloglogn)\sigma = o(\log^2n \log\log n).

Keywords

Cite

@article{arxiv.1612.07475,
  title  = {A hardness result and new algorithm for the longest common palindromic subsequence problem},
  author = {Shunsuke Inenaga and Heikki Hyyrö},
  journal= {arXiv preprint arXiv:1612.07475},
  year   = {2016}
}
R2 v1 2026-06-22T17:31:59.724Z