Exact guarantees and faster algorithms for -rollercoasters
Abstract
For , a -rollercoaster is a sequence of distinct values whose maximal increasing and decreasing runs all have length at least . We discover the maximum guaranteed length of -rollercoasters appearing as subsequences of -point permutations. In particular, letting , we prove that for , for and otherwise. We prove that the guarantees are tight by constructing an -point permutation whose longest -rollercoaster has exactly points. Our proof extends Seidenberg's argument [Journal of the London Mathematical Society, 1959] for proving the Erdős--Szekeres theorem by representing points in a subsequence with respect to the lengths of longest monotonic (increasing and decreasing) subsequences that reach each point. The combinatorial proof yields a deterministic comparison-based algorithm that finds a rollercoaster of length at least in time and space for . Independently, we give an -time, -space algorithm for a longest -rollercoaster, improving the previous 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.
Create a lesson
Metadata
- Categories
- cs.DM, cs.DS
Related papers
Proper Conflict-Free Coloring on Structured Graph Classes: Bounds, Exact Algorithms, and Hardness
Shared title terminologycs.DMKamal Santra
Complexity, Bounds, and Exact Algorithms for Rainbow k-Domination in Regular Graphs
Shared title terminologycs.DMPiotr Lange
Links of minimum degree and exact covering numbers
Shared title terminologycs.DMAlfonso Gippini Requeijo
Polynomial pathwidth for graphs vertex-coverable by few shortest paths and algorithms for quasi-shortest path covers
Shared title terminologycs.DMLi-Hsuan Chen, Florent Foucaud, Ling-Ju Hung et al.
A Linear-Time Algorithm for the Unbiased Claw Game on Graphs with Maximum Degree 4
Shared title terminologycs.DMJulian Christoph Brinkmann
Perfect Italian Domination on and Near Split Graphs: Algorithms, Hardness, and Approximation
Shared title terminologycs.DMAnand Babu N B, Ashwin Jacob, Manjusha M S et al.