Back to Search
Start Over
The Longest Wave Subsequence Problem: Generalizations of the Longest Increasing Subsequence Problem.
- Source :
-
International Journal of Foundations of Computer Science . Jul2024, p1-16. 16p. - Publication Year :
- 2024
-
Abstract
- The <italic>longest increasing subsequence</italic> (LIS) problem aims to find the subsequence exhibiting an increasing trend in a numeric sequence with the maximum length. In this paper, we generalize the LIS problem to the <italic>longest wave subsequence</italic> (LWS) problem, which encompasses two versions: LWSt and LWSr. Given a numeric sequence A of distinct values and a target trend sequence T, the LWSt problem aims to identify the longest subsequence of A that preserves the trend of the prefix of T. And, the LWSr problem aims to find the longest subsequence of A within r segments, alternating increasing and decreasing subsequences. We propose two efficient algorithms for solving the two versions of the LWS problem. For the LWSt problem, the time complexity of our algorithm is O(nlog n), where n represents the length of the given numeric sequence A. Additionally, we propose an O(rnlog n)-time algorithm for solving the LWSr problem. In both algorithms, we utilize the priority queues for the insertion, deletion, and successor operations. [ABSTRACT FROM AUTHOR]
- Subjects :
- *TIME complexity
*GENERALIZATION
*PROBLEM solving
Subjects
Details
- Language :
- English
- ISSN :
- 01290541
- Database :
- Academic Search Index
- Journal :
- International Journal of Foundations of Computer Science
- Publication Type :
- Academic Journal
- Accession number :
- 178429307
- Full Text :
- https://doi.org/10.1142/s012905412450014x