arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.18620cs.DSmath.CO
收藏

带平顶的过山车

Rollercoasters with Plateaus

Duncan Adamson, Pamela Fleischmann, Annika Huch

AI总结:

本文研究了给定词中允许平顶的最大长度 plateau-$k$-rollercoaster 的检测、计数与枚举问题,提出了在 $O(n σk)$ 时间内确定最长序列、计数及 $O(n)$ 延迟输出的算法,并给出了求最长公共序列的 $O(N k σ)$ 时间算法。

摘要:

在本文中,我们研究了检测、计数和枚举(生成)作为某个给定词(序列、字符串)子序列出现且允许平顶的所有最大长度 plateau-$k$-rollercoaster 的问题。我们将 plateau-$k$-rollercoaster 定义为由(弱)递增和递减的 \emph{runs} 交替组成的词,每个 run 至少包含 $k$ 个 \emph{不同} 元素,允许 run 连续包含同一符号的多个副本。这与之前的工作不同,此前过山车中的 runs 仅被定义为不同值的序列。在此,我们关注的是嵌入在给定词 $w$ 中的 \emph{最大} 长度过山车,即作为 $w$ 子序列的最长过山车。我们提出的算法能够:在大小为 $σ$ 的字母表上、长度为 $n$ 的任意给定词 $w$ 中,以 $O(n σk)$ 时间确定作为子序列出现的最长 plateau-$k$-rollercoaster;以 $O(n σk)$ 时间计算 $w$ 中最大长度的 plateau-$k$-rollercoaster 数量;并在 $O(n σk)$ 预处理后以 $O(n)$ 延迟输出所有这些序列。此外,我们还提出了一种算法,能在 $O(N k σ)$ 时间内确定一组词中最长公共 plateau-$k$-rollercoaster,其中 $N$ 是该组内所有词长度的乘积。

英文摘要:

In this paper we investigate the problem of detecting, counting, and enumerating (generating) all maximum length plateau-$k$-rollercoasters appearing as a subsequence of some given word (sequence, string), while allowing for plateaus. We define a plateau-$k$-rollercoaster as a word consisting of an alternating sequence of (weakly) increasing and decreasing \emph{runs}, with each run containing at least $k$ \emph{distinct} elements, allowing the run to contain multiple copies of the same symbol consecutively. This differs from previous work, where runs within rollercoasters have been defined only as sequences of distinct values. Here, we are concerned with rollercoasters of \emph{maximum} length embedded in a given word $w$, that is, the longest rollercoasters that are a subsequence of $w$. We present algorithms allowing us to determine the longest plateau-$k$-roller\-coasters appearing as a subsequence in any given word $w$ of length $n$ over an alphabet of size $σ$ in $O(n σk)$ time, to count the number of plateau-$k$-rollercoasters in $w$ of maximum length in $O(n σk)$ time, and to output all of them with $O(n)$ delay after $O(n σk)$ preprocessing. Furthermore, we present an algorithm to determine the longest common plateau-$k$-rollercoaster within a set of words in $O(N k σ)$ where $N$ is the product of all word lengths within the set.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑