Optimal algorithms for locating the longest and shortest segments satisfying a sum or an average constraint

  • Authors:
  • Kuan-Yu Chen;Kun-Mao Chao

  • Affiliations:
  • Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan;Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan and Graduate Institute of Networking and Multimedia, National Taiwan University, Taipei, Taiw ...

  • Venue:
  • Information Processing Letters
  • Year:
  • 2005

Quantified Score

Hi-index 0.89

Visualization

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.