Rollercoasters and Caterpillars
A rollercoaster is a sequence of real numbers for which every maximal contiguous subsequence - increasing or decreasing - has length at least three. By translating this sequence to a set of points in the plane, a rollercoaster can be defined as an x-monotone polygonal path for which every maximal sub-path, with positive- or negative-slope edges, has at least three vertices. Given a sequence of distinct real numbers, the rollercoaster problem asks for a maximum-length (not necessarily contiguous) subsequence that is a rollercoaster. It was conjectured that every sequence of n distinct real numbers contains a rollercoaster of length at least ceil[n/2] for n>7, while the best known lower bound is Omega(n/log n). In this paper we prove this conjecture. Our proof is constructive and implies a linear-time algorithm for computing a rollercoaster of this length. Extending the O(n log n)-time algorithm for computing a longest increasing subsequence, we show how to compute a maximum-length rollercoaster within the same time bound. A maximum-length rollercoaster in a permutation of {1,...,n} can be computed in O(n log log n) time.
The search for rollercoasters was motivated by orthogeodesic point-set embedding of caterpillars. A caterpillar is a tree such that deleting the leaves gives a path, called the spine. A top-view caterpillar is one of maximum degree 4 such that the two leaves adjacent to each vertex lie on opposite sides of the spine. As an application of our result on rollercoasters, we are able to find a planar drawing of every n-vertex top-view caterpillar on every set of 25/3(n+4) points in the plane, such that each edge is an orthogonal path with one bend. This improves the previous best known upper bound on the number of required points, which is O(n log n). We also show that such a drawing can be obtained in linear time, when the points are given in sorted order.
sequences
alternating runs
patterns in permutations
caterpillars
Theory of computation~Algorithm design techniques
18:1-18:15
Regular Paper
https://arxiv.org/abs/1801.08565
Therese
Biedl
Therese Biedl
School of Computer Science, University of Waterloo, Canada
Supported by NSERC.
Ahmad
Biniaz
Ahmad Biniaz
School of Computer Science, University of Waterloo, Canada
Supported by NSERC Postdoctoral Fellowship.
Robert
Cummings
Robert Cummings
School of Computer Science, University of Waterloo, Canada
Anna
Lubiw
Anna Lubiw
School of Computer Science, University of Waterloo, Canada
Supported by NSERC.
Florin
Manea
Florin Manea
Department of Computer Science, Kiel University, D-24098 Kiel, Germany
Supported by DFG.
Dirk
Nowotka
Dirk Nowotka
Department of Computer Science, Kiel University, D-24098 Kiel, Germany
Supported by DFG.
Jeffrey
Shallit
Jeffrey Shallit
School of Computer Science, University of Waterloo, Canada
Supported by NSERC Grant # 105829/2013.
10.4230/LIPIcs.ICALP.2018.18
Tanbir Ahmed and Hunter Snevily. Some properties of roller coaster permutations. Bulletin of the Institute of Combinatorics and its Applications, 68:55-69, 2013.
Nicolas Basset. Counting and generating permutations in regular classes. Algorithmica, 76(4):989-1034, 2016.
Therese C. Biedl, Ahmad Biniaz, Robert Cummings, Anna Lubiw, Florin Manea, Dirk Nowotka, and Jeffrey Shallit. Rollercoasters and caterpillars. CoRR, abs/1801.08565, 2018. URL: http://arxiv.org/abs/1801.08565.
http://arxiv.org/abs/1801.08565
Therese C. Biedl, Timothy M. Chan, Martin Derka, Kshitij Jain, and Anna Lubiw. Improved bounds for drawing trees on fixed points with L-shaped edges. In Proceedings of the 25th International Symposium on Graph Drawing and Network Visualization (GD), volume 10692 of Lecture Notes in Computer Science, pages 305-317. Springer, 2017. Full version in arXiv:1709.01456.
Maxime Crochemore and Ely Porat. Fast computation of a longest increasing subsequence and application. Information and Computation, 208(9):1054-1059, 2010.
R. Ehrenborg and J. Jung. Descent pattern avoidance. Advances in Applied Mathematics, 49:375-390, 2012.
Paul Erdős and George Szekeres. A combinatorial problem in geometry. Compositio Mathematica, 2:463-470, 1935.
Peter M. Fenwick. A new data structure for cumulative frequency tables. Software - Practice and Experience, 24(3):327-336, 1994.
Michael L. Fredman. On computing the length of longest increasing subsequences. Discrete Mathematics, 11(1):29-35, 1975.
Emilio Di Giacomo, Fabrizio Frati, Radoslav Fulek, Luca Grilli, and Marcus Krug. Orthogeodesic point-set embedding of trees. Computational Geometry: Theory and Applications, 46(8):929-944, 2013.
John M. Hammersley. A few seedlings of research. In Proceedings of the 6th Berkeley Symposium on Mathematical Statistics and Probability, pages 345-394. University of California Press, 1972.
Sergey Kitaev. Patterns in Permutations and Words. Springer, 2011.
S. Linton, N. Ruškuc, and V. Vatter, editors. Permutation Patterns. London Mathematical Society Lecture Note Series, vol. 376, Cambridge, 2010.
Dan Romik. The Surprising Mathematics of Longest Increasing Subsequences. Cambridge, 2015.
Manfred Scheucher. Orthogeodesic point set embeddings of outerplanar graphs. Master’s thesis, Graz University of Technology, 2015.
N. J. A. Sloane et al. The On-Line Encylopedia of Integer Sequences. URL: https://oeis.org.
https://oeis.org
J. Michael Steele. Variations on the monotone subsequence theme of Erdős and Szekeres. In David Aldous, Persi Diaconis, Joel Spencer, and J. Michael Steele, editors, Discrete Probability and Algorithms, pages 111-131. Springer New York, 1995.
Peter van Emde Boas. Preserving order in a forest in less than logarithmic time and linear space. Information Processing Letters, 6(3):80-82, 1977.
Therese Biedl, Ahmad Biniaz, Robert Cummings, Anna Lubiw, Florin Manea, Dirk Nowotka, and Jeffrey Shallit
Creative Commons Attribution 3.0 Unported license
https://creativecommons.org/licenses/by/3.0/legalcode