Given two sequences $A[1..n]$ and $B[1..m]$ 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 $n\times m$ grid, which is prohibitive on large inputs. We present two exact algorithms. First, we give a simple $Θ(nm)$-time baseline that computes LCBS by combining a longest common increasing subsequence (LCIS) computation on $(A,B)$ with a second LCIS computation on the reversed inputs, and then maximizing $INC(i,j)+DEC(i,j)-1$ 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 $\mathcal{M}$ of matching pairs $(i,j)$ with $A[i]=B[j]$. 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 $O(\mathcal{M}\log^{2}\mathcal{M} + \mathcal{M} + (n+m)\log(n+m))$ time and $O(\mathcal{M}\log \mathcal{M})$ space, and it improves over the dense baseline whenever $M\log^2 M\ll nm$.


翻译:给定两个定义在全序字母表上的序列$A[1..n]$和$B[1..m]$,\emph{最长公共双调子序列}(LCBS)问题要求寻找一个最长的公共子序列,该子序列在达到单个峰值元素之前严格递增,之后严格递减(允许任一阶段为空)。目前唯一明确记载的方法是在完整的$n\times m$网格上评估一个二次动态规划,这对于大规模输入而言计算代价过高。我们提出了两种精确算法。首先,我们给出一个简单的$Θ(nm)$时间基线算法,该算法通过结合在$(A,B)$上计算最长公共递增子序列(LCIS)与在反转输入上进行的第二次LCIS计算,然后对所有公共峰值最大化$INC(i,j)+DEC(i,j)-1$来计算LCBS。该方法通过父指针是可构造的。其次,我们开发了一种\emph{实例敏感}算法,其运行时间取决于匹配对$(i,j)$(满足$A[i]=B[j]$)的数量$\mathcal{M}$。我们将匹配视为一个支配序偏序集的顶点,并通过两个由正交范围最大值数据结构支持的二维支配DP过程来计算递增和递减两半,随后进行线性峰值扫描。使用标准的二维范围树(或等价结构),该算法实现了$O(\mathcal{M}\log^{2}\mathcal{M} + \mathcal{M} + (n+m)\log(n+m))$时间和$O(\mathcal{M}\log \mathcal{M})$空间,并且在$M\log^2 M\ll nm$时优于密集基线算法。

0
下载
关闭预览

相关内容

数学上,序列是被排成一列的对象(或事件);这样每个元素不是在其他元素之前,就是在其他元素之后。这里,元素之间的顺序非常重要。
专知会员服务
16+阅读 · 2021年6月4日
最新《时序分类:深度序列模型》教程,172页ppt
专知会员服务
43+阅读 · 2020年11月11日
面试题:数组中子序列的个数
七月在线实验室
15+阅读 · 2019年6月26日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
数据分析师应该知道的16种回归方法:定序回归
数萃大数据
16+阅读 · 2018年9月9日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
推荐算法:Match与Rank模型的交织配合
从0到1
15+阅读 · 2017年12月18日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月4日
Arxiv
0+阅读 · 1月14日
VIP会员
相关VIP内容
专知会员服务
16+阅读 · 2021年6月4日
最新《时序分类:深度序列模型》教程,172页ppt
专知会员服务
43+阅读 · 2020年11月11日
相关基金
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员