Optimal algorithms for locating the longest and shortest segments satisfying a sum or an average constraint
Resource
Information Processing Letters 96 (6): 197-201
Journal
Information Processing Letters
Journal Volume
96
Journal Issue
6
Pages
197-201
Date Issued
2005
Author(s)
Chen, K.-Y.
Abstract
We study several fundamental problems arising from biological sequence analysis. Given a sequence of real numbers, we present two linear-time algorithms, one for locating the "longest" sum-constrained segment, and the other for locating the "shortest" sum-constrained segment. These two algorithms are based on the same framework and run in an online manner, hence they are capable of handling data stream inputs. Our algorithms also yield online linear-time solutions for finding the longest and shortest average-constrained segments by a simple reduction. © 2005 Elsevier B.V. All rights reserved.
Subjects
Algorithms; Longest segment; Sequence analysis; Shortest segment
Type
journal article