On Finding Longest Palindromic Subsequences Using Longest Common Subsequences

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

Abstract

Two standard textbook problems illustrating dynamic programming are to find the longest common subsequence (LCS) between two strings and to find the longest palindromic subsequence (LPS) of a single string. A popular claim is that the longest palindromic subsequence in a string can be computed as the longest common subsequence between the string and the reversed string. We prove that the correctness of this claim depends on how the longest common subsequence is computed. In particular, we prove that the classical dynamic programming solution by Wagner and Fischer [JACM 1974] for finding an LCS in fact does find an LPS, while a slightly different LCS backtracking strategy makes the algorithm fail to always report a palindrome.

Original languageEnglish
Title of host publication32nd Annual European Symposium on Algorithms, ESA 2024
EditorsTimothy Chan, Johannes Fischer, John Iacono, Grzegorz Herman
PublisherDagstuhl Publishing
Publication dateSept 2024
Article number35
ISBN (Electronic)9783959773386
DOIs
Publication statusPublished - Sept 2024
Event32nd Annual European Symposium on Algorithms, ESA 2024 - London, United Kingdom
Duration: 2 Sept 20244 Sept 2024

Conference

Conference32nd Annual European Symposium on Algorithms, ESA 2024
Country/TerritoryUnited Kingdom
CityLondon
Period02/09/202404/09/2024
SeriesLeibniz International Proceedings in Informatics, LIPIcs
Volume308
ISSN1868-8969

Keywords

  • dynamic programming
  • longest common subsequence
  • Palindromic subsequence

Fingerprint

Dive into the research topics of 'On Finding Longest Palindromic Subsequences Using Longest Common Subsequences'. Together they form a unique fingerprint.

Cite this