{"@context":"https:\/\/schema.org\/","@type":"ScholarlyArticle","@id":"#article11028","name":"Rollercoasters and Caterpillars","abstract":"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.\nThe 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.","keywords":["sequences","alternating runs","patterns in permutations","caterpillars"],"author":[{"@type":"Person","name":"Biedl, Therese","givenName":"Therese","familyName":"Biedl","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC."},{"@type":"Person","name":"Biniaz, Ahmad","givenName":"Ahmad","familyName":"Biniaz","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC Postdoctoral Fellowship."},{"@type":"Person","name":"Cummings, Robert","givenName":"Robert","familyName":"Cummings","affiliation":"School of Computer Science, University of Waterloo, Canada"},{"@type":"Person","name":"Lubiw, Anna","givenName":"Anna","familyName":"Lubiw","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC."},{"@type":"Person","name":"Manea, Florin","givenName":"Florin","familyName":"Manea","affiliation":"Department of Computer Science, Kiel University, D-24098 Kiel, Germany","funding":"Supported by DFG."},{"@type":"Person","name":"Nowotka, Dirk","givenName":"Dirk","familyName":"Nowotka","affiliation":"Department of Computer Science, Kiel University, D-24098 Kiel, Germany","funding":"Supported by DFG."},{"@type":"Person","name":"Shallit, Jeffrey","givenName":"Jeffrey","familyName":"Shallit","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC Grant # 105829\/2013."}],"position":18,"pageStart":"18:1","pageEnd":"18:15","dateCreated":"2018-07-04","datePublished":"2018-07-04","isAccessibleForFree":true,"license":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/legalcode","copyrightHolder":[{"@type":"Person","name":"Biedl, Therese","givenName":"Therese","familyName":"Biedl","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC."},{"@type":"Person","name":"Biniaz, Ahmad","givenName":"Ahmad","familyName":"Biniaz","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC Postdoctoral Fellowship."},{"@type":"Person","name":"Cummings, Robert","givenName":"Robert","familyName":"Cummings","affiliation":"School of Computer Science, University of Waterloo, Canada"},{"@type":"Person","name":"Lubiw, Anna","givenName":"Anna","familyName":"Lubiw","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC."},{"@type":"Person","name":"Manea, Florin","givenName":"Florin","familyName":"Manea","affiliation":"Department of Computer Science, Kiel University, D-24098 Kiel, Germany","funding":"Supported by DFG."},{"@type":"Person","name":"Nowotka, Dirk","givenName":"Dirk","familyName":"Nowotka","affiliation":"Department of Computer Science, Kiel University, D-24098 Kiel, Germany","funding":"Supported by DFG."},{"@type":"Person","name":"Shallit, Jeffrey","givenName":"Jeffrey","familyName":"Shallit","affiliation":"School of Computer Science, University of Waterloo, Canada","funding":"Supported by NSERC Grant # 105829\/2013."}],"copyrightYear":"2018","accessMode":"textual","accessModeSufficient":"textual","creativeWorkStatus":"Published","inLanguage":"en-US","sameAs":"https:\/\/doi.org\/10.4230\/LIPIcs.ICALP.2018.18","publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","citation":["http:\/\/arxiv.org\/abs\/1801.08565","https:\/\/oeis.org"],"isPartOf":{"@type":"PublicationVolume","@id":"#volume6310","volumeNumber":107,"name":"45th International Colloquium on Automata, Languages, and Programming (ICALP 2018)","dateCreated":"2018-07-04","datePublished":"2018-07-04","editor":[{"@type":"Person","name":"Chatzigiannakis, Ioannis","givenName":"Ioannis","familyName":"Chatzigiannakis"},{"@type":"Person","name":"Kaklamanis, Christos","givenName":"Christos","familyName":"Kaklamanis"},{"@type":"Person","name":"Marx, D\u00e1niel","givenName":"D\u00e1niel","familyName":"Marx"},{"@type":"Person","name":"Sannella, Donald","givenName":"Donald","familyName":"Sannella"}],"isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#article11028","isPartOf":{"@type":"Periodical","@id":"#series116","name":"Leibniz International Proceedings in Informatics","issn":"1868-8969","isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#volume6310"}}}