## Algorithms for Finding the Weight-Constrained k Longest Paths in a Tree and the Length-Constrained k Maximum-Sum Segments of a Sequence (2008)

Citations: | 2 - 0 self |

### BibTeX

@MISC{Liu08algorithmsfor,

author = {Hsiao-fei Liu and Kun-mao Chao},

title = {Algorithms for Finding the Weight-Constrained k Longest Paths in a Tree and the Length-Constrained k Maximum-Sum Segments of a Sequence},

year = {2008}

}

### OpenURL

### Abstract

In this work, we obtain the following new results: – Given a tree T = (V, E) with a length function ℓ: E → R and a weight function w: E → R, a positive integer k, and an interval [L, U], the Weight-Constrained k Longest Paths problem is to find the k longest paths among all paths in T with weights in the interval [L, U]. We show that the Weight-Constrained k Longest Paths problem has a lower bound Ω(V log V + k) in the algebraic computation tree model and give an O(V log V + k)-time algorithm for it. – Given a sequence A = (a1, a2,..., an) of numbers and an interval [L, U], we define the sum and length of a segment A[i, j] to be ai + ai+1 + · · · + aj and j − i + 1, respectively. The Length-Constrained k Maximum-Sum Segments problem is to find the k maximum-sum segments among all segments of A with lengths in the interval [L, U]. We show that the Length-Constrained k Maximum-Sum Segments problem can be solved in O(n + k) time. ∗Corresponding