Abstract
We study an abstract optimization problem arising from biomolecular sequence analysis. For a sequence A of pairs ( a i , w i ) for i = 1 , … , n and w i > 0 , a segment A ( i , j ) is a consecutive subsequence of A starting with index i and ending with index j. The width of A ( i , j ) is w ( i , j ) = ∑ i ⩽ k ⩽ j w k , and the density is ( ∑ i ⩽ k ⩽ j a k ) / w ( i , j ) . The maximum-density segment problem takes A and two values L and U as input and asks for a segment of A with the largest possible density among those of width at least L and at most U. When U is unbounded, we provide a relatively simple, O ( n ) -time algorithm, improving upon the O ( n log L ) -time algorithm by Lin, Jiang and Chao. We then extend this result, providing an O ( n ) -time algorithm for the case when both L and U are specified.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.