The Longest Common Bitonic Subsequence: A Match-Sensitive Dynamic Programming Approach
Abstract
Given two sequences and over a totally ordered alphabet, the \emph{Longest Common Bitonic Subsequence} (LCBS) problem asks for a longest common subsequence that is strictly increasing up to a single peak element and strictly decreasing thereafter (allowing either phase to be empty). The only explicitly documented approach evaluates a quadratic dynamic program over the full grid, which is prohibitive on large inputs. We present two exact algorithms. First, we give a simple -time baseline that computes LCBS by combining a longest common increasing subsequence (LCIS) computation on with a second LCIS computation on the reversed inputs, and then maximizing over all common peaks. The method is constructive via parent pointers. Second, we develop an \emph{instance-sensitive} algorithm whose running time depends on the number of matching pairs with . We view matches as vertices of a dominance-ordered poset and compute the increasing and decreasing halves by two 2D dominance DP passes supported by orthogonal range-maximum data structures, followed by a linear peak scan. With a standard 2D range tree (or equivalent), this yields time and space, and it improves over the dense baseline whenever .
Cite
@article{arxiv.2511.08958,
title = {The Longest Common Bitonic Subsequence: A Match-Sensitive Dynamic Programming Approach},
author = {Md. Tanzeem Rahat and Md. Manzurul Hasan},
journal= {arXiv preprint arXiv:2511.08958},
year = {2026}
}
Comments
12 pages, 2 figres, In the process of submission to 37th Annual Symposium on Combinatorial Pattern Matching