hide
Free keywords:
-
Abstract:
Let $A=\langle a_1,\dots,a_n\rangle$ and
$B=\langle b_1,\dots,b_m \rangle$ be two sequences with $m \ge n$,
whose elements are drawn from a totally ordered set.
We present an algorithm that finds a longest
common increasing subsequence of $A$ and $B$ in $O(m\log m+n\ell\log n)$
time and $O(m + n\ell)$ space, where $\ell$ is the length of the output.
A previous algorithm by Yang et al. needs $\Theta(mn)$ time and space,
so ours is faster for a wide range of values of $m,n$ and $\ell$.