Maximum segment sum is back: deriving algorithms for two segment problems with bounded lengths

  • Authors:
  • Shin-Cheng Mu

  • Affiliations:
  • Academia Sinica: Taiwan, Taipei, Taiwan Roc

  • Venue:
  • PEPM '08 Proceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

It may be surprising that variations of the maximum segment sum (MSS) problem, a textbook example for the squiggolists, are still active topics for algorithm designers. In this paper we examine the new developments from the view of relational program calculation. It turns out that, while the classical MSS problem is solved by the Greedy Theorem, by applying the Thinning Theorem, we get a linear-time algorithm for MSS with upper bound on length. To derive a linear-time algorithm for the em maximum segment density problem, on the other hand, we purpose a variation of thinning based on an extended notion of monotonicity. The concepts of left-negative and right-screw segments emerge from the search for monotonicity conditions. The efficiency of the resulting algorithms crucially relies on exploiting properties of the set of partial solutions and design efficient data structures for them.