Table of Contents
Fetching ...

Rollercoasters with Plateaus

Duncan Adamson, Pamela Fleischmann, Annika Huch

TL;DR

This work addresses detecting, counting, and enumerating maximum-length plateau-$k$-rollercoasters as subsequences of a word, where plateau runs may contain repeated symbols but must include at least $k$ distinct letters. It develops a DP-based framework using tables $L_w^{k,h,\xi}$, a rollercoaster count table $R_w^k$, and a next-element graph $\mathrm{NEG}(w)$ to efficiently compute the longest plateau-$k$-rollercoaster in $O(n\sigma k)$ time and enumerate all maximum solutions with $O(n)$ delay after $O(n\sigma k)$ preprocessing; it also extends to counting and enumerating all maximums via dedicated structures. The paper further generalizes to the longest common plateau-$k$-rollercoaster across a set of words, achieving $O(Nk\sigma)$ time where $N=\prod_{w\in\mathcal{W}}|w|$, enabling coherent cross-word pattern discovery. These results advance the understanding of plateau-based subsequence patterns and offer practical tools for combinatorial sequence analysis and related applications. All mathematical constructs are expressed using $...$ notation to maintain formal rigor.

Abstract

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.

Rollercoasters with Plateaus

TL;DR

This work addresses detecting, counting, and enumerating maximum-length plateau--rollercoasters as subsequences of a word, where plateau runs may contain repeated symbols but must include at least distinct letters. It develops a DP-based framework using tables , a rollercoaster count table , and a next-element graph to efficiently compute the longest plateau--rollercoaster in time and enumerate all maximum solutions with delay after preprocessing; it also extends to counting and enumerating all maximums via dedicated structures. The paper further generalizes to the longest common plateau--rollercoaster across a set of words, achieving time where , enabling coherent cross-word pattern discovery. These results advance the understanding of plateau-based subsequence patterns and offer practical tools for combinatorial sequence analysis and related applications. All mathematical constructs are expressed using notation to maintain formal rigor.

Abstract

In this paper we investigate the problem of detecting, counting, and enumerating (generating) all maximum length plateau--rollercoasters appearing as a subsequence of some given word (sequence, string), while allowing for plateaus. We define a plateau--rollercoaster as a word consisting of an alternating sequence of (weakly) increasing and decreasing \emph{runs}, with each run containing at least \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 , that is, the longest rollercoasters that are a subsequence of . We present algorithms allowing us to determine the longest plateau--roller\-coasters appearing as a subsequence in any given word of length over an alphabet of size in time, to count the number of plateau--rollercoasters in of maximum length in time, and to output all of them with delay after preprocessing. Furthermore, we present an algorithm to determine the longest common plateau--rollercoaster within a set of words in where is the product of all word lengths within the set.
Paper Structure (7 sections, 13 theorems, 12 equations, 1 table, 3 algorithms)

This paper contains 7 sections, 13 theorems, 12 equations, 1 table, 3 algorithms.

Key Result

lemma thmcounterlemma

Given a word $w \in \Sigma^n$ and $i, k, h \in [n]$, then $L_w^{k, h,\xi}[i]$ can be determined in $O(\sigma)$ time from $L_w^{k, h',\xi'}[j]$, for all $\xi' \in \{\uparrow, \downarrow\}, h' \in [k], j \in [i - 1]$.

Theorems & Definitions (39)

  • definition thmcounterdefinition
  • remark thmcounterremark
  • definition thmcounterdefinition
  • remark thmcounterremark
  • remark thmcounterremark
  • definition thmcounterdefinition
  • remark thmcounterremark
  • remark thmcounterremark
  • lemma thmcounterlemma
  • proof
  • ...and 29 more