arXiv · 2611.26297
Exact guarantees and faster algorithms for $k$-rollercoasters
Abstract
For $k\ge3$, a $k$-rollercoaster is a sequence of distinct values whose maximal increasing and decreasing runs all have length at least $k$. We discover the maximum guaranteed length $f_k(n)$ of $k$-rollercoasters appearing as subsequences of $n$-point permutations. In particular, letting $q=k-1$, we prove that $f_k(n)= \lceil n/q\rceil$ for $n\ge2q^2$, $f_k(n)= 2q-\lfloor \sqrt{2q^2-n}\rfloor$ for $q^2 q^2$. Independently, we give an $O(nk\log k)$-time, $O(nk)$-space algorithm for a longest $k$-rollercoaster, improving the previous $O(nk^2)$ bound. We use the dynamic program of Gawrychowski et al. [STACS 2019, Algorithmica 2022], and process its weighted predecessor queries through monotone subsequences with finger-search trees. Both algorithms return such subsequences.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Sungmin Kim, Florin Manea. 2026-11-19. Exact guarantees and faster algorithms for $k$-rollercoasters. https://searcharxiv.org/abs/2611.26297
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.