×

Rollercoasters: long sequences without short runs. (English) Zbl 1419.05005

Summary: 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 subpath, 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 \(\lceil n/2\rceil\) 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,\dots,n\}\) can be computed in \(O(n\log\log n)\) time. The search for rollercoasters was motivated by the 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 an embedded caterpillar where every vertex has degree either 4 or 1 and such that the two leaves adjacent to each spine 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 \(\frac{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.

MSC:

05A05 Permutations, words, matrices
05C30 Enumeration in graph theory
51K05 General theory of distance geometry
68W40 Analysis of algorithms
11Y16 Number-theoretic algorithms; complexity

Software:

OEIS
Full Text: DOI

References:

[1] T. Ahmed and H. Snevily, Some properties of roller coaster permutations, Bull. Inst. Combin. Appl., 68 (2013), pp. 55-69. · Zbl 1297.05008
[2] N. Basset, Counting and generating permutations in regular classes, Algorithmica, 76 (2016), pp. 989-1034. · Zbl 1352.05005
[3] T. C. Biedl, T. M. Chan, M. Derka, K. Jain, and A. 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), Lecture Notes in Comput. Sci. 10692, Springer, Cham, 2017, pp. 305-317, full version in https://arxiv.org/abs/1709.01456. · Zbl 1503.68207
[4] M. Crochemore and E. Porat, Fast computation of a longest increasing subsequence and application, Inform. and Comput., 208 (2010), pp. 1054-1059. · Zbl 1214.68479
[5] R. Ehrenborg and J. Jung, Descent pattern avoidance, Adv. in Appl. Math., 49 (2012), pp. 375-390. · Zbl 1252.05002
[6] P. Erdös and G. Szekeres, A combinatorial problem in geometry, Compositio Math., 2 (1935), pp. 463-470. · Zbl 0012.27010
[7] P. M. Fenwick, A new data structure for cumulative frequency tables, Software–Practice and Experience, 24 (1994), pp. 327-336.
[8] M. L. Fredman, On computing the length of longest increasing subsequences, Discrete Math., 11 (1975), pp. 29-35. · Zbl 0312.68027
[9] E. D. Giacomo, F. Frati, R. Fulek, L. Grilli, and M. Krug, Orthogeodesic point-set embedding of trees, Comput. Geom., 46 (2013), pp. 929-944. · Zbl 1279.65027
[10] J. M. Hammersley, A few seedlings of research, in Proceedings of the 6th Berkeley Symposium on Mathematical Statistics and Probability, University of California Press, Berkeley, CA, 1972, pp. 345-394. · Zbl 0236.00018
[11] S. Kitaev, Patterns in Permutations and Words, Springer, Heidelberg, 2011. · Zbl 1257.68007
[12] S. Linton, N. Ruškuc, and V. Vatter, eds., Permutation Patterns, London Math. Soc. Lecture Note Ser. 376, Cambridge University Press, Cambridge, 2010. · Zbl 1190.05001
[13] T. Mütze and M. Scheucher, On L-shaped point set embeddings of trees: First non-embeddable examples, in Proceedings of the 26th International Symposium on Graph Drawing and Network Visualization (GD), Lecture Notes in Comput. Sci. 11282, Springer, Cham, 2018, pp. 354-360, full version in https://arxiv.org/abs/1807.11043. · Zbl 1519.68199
[14] D. Romik, The Surprising Mathematics of Longest Increasing Subsequences, Cambridge University Press, New York, 2015. · Zbl 1345.05003
[15] M. Scheucher, Orthogeodesic Point Set Embeddings of Outerplanar Graphs, Master’s thesis, Graz University of Technology, Graz, Austria, 2015.
[16] N. J. A. Sloane, The On-Line Encylopedia of Integer Sequences, available at https://oeis.org.
[17] J. M. Steele, Variations on the monotone subsequence theme of Erdös and Szekeres, in Discrete Probability and Algorithms, IMA Vol. Math. Appl. 72, D. Aldous, P. Diaconis, J. Spencer, and J. M. Steele, eds., Springer New York, 1995, pp. 111-131. · Zbl 0832.60012
[18] P. van Emde Boas, Preserving order in a forest in less than logarithmic time and linear space, Inform. Process. Lett., 6 (1977), pp. 80-82. · Zbl 0364.68053
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.