Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
428727 | Information Processing Letters | 2009 | 4 Pages |
Abstract
Given a real number sequence A=(a1,a2,…,an), an average lower bound L, and an average upper bound U, the Average-Constrained Maximum-Sum Segment problem is to locate a segment A(i,j)=(ai,ai+1,…,aj) that maximizes ∑i⩽k⩽jak subject to . In this paper, we give an O(n)-time algorithm for the case where the average upper bound is ineffective, i.e., U=∞. On the other hand, we prove that the time complexity of the problem with an effective average upper bound is Ω(nlogn) even if the average lower bound is ineffective, i.e., L=−∞.
Related Topics
Physical Sciences and Engineering
Computer Science
Computational Theory and Mathematics