Fast and Longest Rollercoasters

Author:

Gawrychowski Paweł,Manea FlorinORCID,Serafin Radosław

Abstract

AbstractFor$$k\ge 3$$k3, ak-rollercoasteris a sequence of numbers whose every maximal contiguous subsequence, that is increasing or decreasing, has length at leastk; 3-rollercoasters are called simply rollercoasters. Given a sequence of distinct real numbers, we are interested in computing its maximum-length (not necessarily contiguous) subsequence that is ak-rollercoaster. Biedl et al. (in: ICALP, volume 107 of LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, pp 18:1–18:15, 2018) have shown that each sequence ofndistinct real numbers contains a rollercoaster of length at least$$\lceil n/2\rceil $$n/2for$$n>7$$n>7, and that a longest rollercoaster contained in such a sequence can be computed in$$O(n\log n)$$O(nlogn)-time (or faster, in$$O(n \log \log n)$$O(nloglogn)time, when the input sequence is a permutation of$$\{1,\ldots ,n\}$${1,,n}). They have also shown that every sequence of$$n\geqslant (k-1)^2+1$$n(k-1)2+1distinct real numbers contains ak-rollercoaster of length at least$$\frac{n}{2(k-1)}-\frac{3k}{2}$$n2(k-1)-3k2, and gave an$$O(nk\log n)$$O(nklogn)-time (respectively,$$O(n k\log \log n)$$O(nkloglogn)-time) algorithm computing a longestk-rollercoaster in a sequence of lengthn(respectively, a permutation of$$\{1,\ldots ,n\}$${1,,n}). In this paper, we give an$$O(nk^2)$$O(nk2)-time algorithm computing the length of a longestk-rollercoaster contained in a sequence ofndistinct real numbers; hence, for constantk, our algorithm computes the length of a longestk-rollercoaster in optimal linear time. The algorithm can be easily adapted to output the respectivek-rollercoaster. In particular, this improves the results of Biedl et al. (2018), by showing that a longest rollercoaster can be computed in optimal linear time. We also present an algorithm computing the length of a longestk-rollercoaster in$$O(n \log ^2 n)$$O(nlog2n)-time, that is, subquadratic even for large values of$$k\le n$$kn. Again, the rollercoaster can be easily retrieved. Finally, we show an$$\Omega (n \log k)$$Ω(nlogk)lower bound for the number of comparisons in any comparison-based algorithm computing the length of a longestk-rollercoaster.

Funder

Georg-August-Universität Göttingen

Publisher

Springer Science and Business Media LLC

Subject

Applied Mathematics,Computer Science Applications,General Computer Science

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Approximate Cartesian Tree Pattern Matching;Lecture Notes in Computer Science;2024

2. Longest bordered and periodic subsequences;Information Processing Letters;2023-08

3. Computing Longest Lyndon Subsequences and Longest Common Lyndon Subsequences;Algorithmica;2023-05-06

4. Subsequences in Bounded Ranges: Matching and Analysis Problems;Lecture Notes in Computer Science;2022

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3