## 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

### Citations

8523 |
Introduction to Algorithms
- Cormen, Leiserson, et al.
- 2001
(Show Context)
Citation Context ...2 for each v ∈ V ′ , we can construct, in total O(V log V ) time, the root of H(v1,i) for all v1,i. Then we place these roots into a balanced 2-heap of size up to O(V log V ) by the heapify operation =-=[15]-=- in linear time, i.e., in O(V log V ) time. Note that each H(v1,i) is a 2-heap, so we have conceptually built a 4-heap for the set ⋃ v∈V ′ ⋃ |v.list1| i=1 V (H(v1,i)). Now by Theorem 3, we can apply F... |

368 | Time bounds for selection - Blum, Pratt, et al. - 1972 |

330 |
Fast algorithms for finding nearest common ancestors
- Harel, Tarjan
(Show Context)
Citation Context ... V + k) time. 2.1 Preliminaries To achieve the time bound of O(V log V + k), we make use of Frederickson and Johnson’s [21] representation of intervertex distances of a tree, range maxima query (RMQ) =-=[5, 19, 25]-=-, and Frederickson’s [18] algorithm for finding the maximum k elements in a heap-ordered tree. In the following, we briefly review these data structures and algorithms. Definition 1: Let T = (V, E) be... |

289 | Finding the k Shortest Paths
- Eppstein
- 1998
(Show Context)
Citation Context ... + k log k)-time algorithm [4] for finding the k largest elements of X + Y . In the following, we first show how to find the k largest elements of X + Y in O(n + k) time by using Eppstein’s algorithm =-=[16]-=-, and then we show how to cope with the weight-constrained case in O(n log n + k) time by using our algorithm. Lemma 3: [Eppstein [16]] Given a directed acyclic graph G = (V, E) with a length function... |

215 | bounds for algebraic computation trees - Lower - 1983 |

183 | The LCA problem revisited
- Bender, Farach-Colton
(Show Context)
Citation Context ... V + k) time. 2.1 Preliminaries To achieve the time bound of O(V log V + k), we make use of Frederickson and Johnson’s [21] representation of intervertex distances of a tree, range maxima query (RMQ) =-=[5, 19, 25]-=-, and Frederickson’s [18] algorithm for finding the maximum k elements in a heap-ordered tree. In the following, we briefly review these data structures and algorithms. Definition 1: Let T = (V, E) be... |

34 |
Programming pearls: algorithm design techniques
- Bentley
- 1984
(Show Context)
Citation Context ...r [23] and finds applications to pattern recognition [23, 34], biological sequence analysis [1], and data mining [22]. The Maximum-Sum Segment problem is linear-time solvable using Kadane’s algorithm =-=[7]-=-. A variety of generalizations of the Maximum-Sum Segment problem have been proposed to fulfill more requirements. In the following, let us introduce two of them, which are closely related to our stud... |

29 |
An algorithm for identifying regions of a dna sequence that satisfy a content requirement
- Huang
- 1994
(Show Context)
Citation Context ...nd the maximum-sum segment among all segments of A with lengths in the interval [L, U] and is solvable in O(n) time [17, 31]. The Length-Constrained MaximumSum Segment problem was formulated by Huang =-=[26]-=- and motivated by its application to finding GC-rich segments of a DNA sequence. A DNA sequence is composed of four letters A, C, G, and T. Given a DNA sequence, biologists often need to identify the ... |

24 |
Finding kth paths and p-centers by generating and searching good data structures
- Frederickson, Johnson
- 1983
(Show Context)
Citation Context ...gest Paths problem is to find the k longest paths from all paths in T . Megiddo et al. [33] proposed an O(V log 2 V )-time algorithm for finding the k th longest path. Later, Frederickson and Johnson =-=[21]-=- improved the time complexity to O(V log V ). After finding the kth longest path, the k longest paths can be constructed with additional O(k) time from the computed information. Hence, the Tree k Long... |

21 | Theoretical and practical improvements on the rmq-problem, with applications to lca and lce - Fischer, Heun - 2006 |

19 |
An optimal algorithm for selection in a min-heap
- Frederickson
- 1993
(Show Context)
Citation Context ...endently by Brodal and Jørgensen [10] in solving the k Maximum-Sum Segments problem. Both of us construct in O(n) time a heap that implicitly stores all feasible solutions and then run Frederickson’s =-=[18]-=- heap selection algorithm on this heap to find the k best feasible solutions in O(k) time. As a byproduct, we show that our algorithms can be used as a basis for delivering more efficient algorithms f... |

18 | Longest biased interval and longest non-negative sum interval
- Allison
(Show Context)
Citation Context ...o find a segment of A that maximizes the sum. The Maximum-Sum Segment problem was first presented by Grenader [23] and finds applications to pattern recognition [23, 34], biological sequence analysis =-=[1]-=-, and data mining [22]. The Maximum-Sum Segment problem is linear-time solvable using Kadane’s algorithm [7]. A variety of generalizations of the Maximum-Sum Segment problem have been proposed to fulf... |

18 |
An O(n log 2 n) algorithms for the kth longest path in a tree with applications to location problems
- Megiddo, Tamir, et al.
- 1981
(Show Context)
Citation Context ...ur study in this paper. One is the Tree k Longest Paths problem. Given T and a positive integer k, the Tree k Longest Paths problem is to find the k longest paths from all paths in T . Megiddo et al. =-=[33]-=- proposed an O(V log 2 V )-time algorithm for finding the k th longest path. Later, Frederickson and Johnson [21] improved the time complexity to O(V log V ). After finding the kth longest path, the k... |

17 |
Algorithms for the problem of k maximum sums and a vlsi algorithm for the k maximum subarrays problem
- Bae, Takaoka
- 2004
(Show Context)
Citation Context ...teger k, the k Maximum-Sum Segments problem is to locate the k segments whose sums are the k largest among all possible sums. The k Maximum-Sum Segments problem was first presented by Bae and Takaoka =-=[2]-=-. Since then, this problem has drawn a lot of attention [3, 6, 10, 13, 31, 32], and recently an optimal O(n + k)-time algorithm was given by Brodal and Jørgensen [10]. The other is the Length-Constrai... |

17 |
Efficient algorithms for k maximum sums
- Bengtsson, Chen
- 2004
(Show Context)
Citation Context ...e k segments whose sums are the k largest among all possible sums. The k Maximum-Sum Segments problem was first presented by Bae and Takaoka [2]. Since then, this problem has drawn a lot of attention =-=[3, 6, 10, 13, 31, 32]-=-, and recently an optimal O(n + k)-time algorithm was given by Brodal and Jørgensen [10]. The other is the Length-Constrained Maximum-Sum Segment problem. Given A and two integers L, U with 1 ≤ L ≤ U ... |

16 | On the range maximumsum segment query problem”, Discrete Applied Mathematics
- Chen, Chao
- 2007
(Show Context)
Citation Context ...ickly. A range maximum-sum segment query specifies two intervals [i, j] and [k, l], and the goal is to find a pair of indices (x, y) with i � x � j and k � y � ℓ that maximizes S[x, y]. Chen and Chao =-=[11]-=- have showed that RMSQ is linearly equivalent to RMQ. For ease of explanation, in the following description of the algorithm we use RMSQ instead of RMQ. Theorem 6: [Chen and Chao [11]] The RMSQ proble... |

15 | Improved algorithms for the k-maximum subarray problem
- Bae, Takaoka
(Show Context)
Citation Context ...e k segments whose sums are the k largest among all possible sums. The k Maximum-Sum Segments problem was first presented by Bae and Takaoka [2]. Since then, this problem has drawn a lot of attention =-=[3, 6, 10, 13, 31, 32]-=-, and recently an optimal O(n + k)-time algorithm was given by Brodal and Jørgensen [10]. The other is the Length-Constrained Maximum-Sum Segment problem. Given A and two integers L, U with 1 ≤ L ≤ U ... |

14 | An optimal algorithm for the maximum-density segment problem
- Chung, Lu
(Show Context)
Citation Context ...asible segments. Length-Constrained Maximum-Density Segment problem is to find a feasible segment with density equal to δmax. The Length-Constrained Maximum-Density Segment problem is well studied in =-=[14, 24, 26, 27, 29, 30]-=- and can be solved in linear time by [14, 24]. Let nδmax be the total number of feasible segments with density equal to δmax. If we are not satisfied by finding only one feasible segments with density... |

13 | Lineartime algorithms for computing maximumdensity sequence segments with bioinformatics applications
- Goldwasser, Kao, et al.
(Show Context)
Citation Context ...asible segments. Length-Constrained Maximum-Density Segment problem is to find a feasible segment with density equal to δmax. The Length-Constrained Maximum-Density Segment problem is well studied in =-=[14, 24, 26, 27, 29, 30]-=- and can be solved in linear time by [14, 24]. Let nδmax be the total number of feasible segments with density equal to δmax. If we are not satisfied by finding only one feasible segments with density... |

12 |
Pattern Analysis
- Grenander
- 1978
(Show Context)
Citation Context ... ai+ai+1+· · ·+aj and j −i+1, respectively. The Maximum-Sum Segment problem, given A, is to find a segment of A that maximizes the sum. The Maximum-Sum Segment problem was first presented by Grenader =-=[23]-=- and finds applications to pattern recognition [23, 34], biological sequence analysis [1], and data mining [22]. The Maximum-Sum Segment problem is linear-time solvable using Kadane’s algorithm [7]. A... |

11 |
MAVG: locating non-overlapping maximum average segments in a given sequence
- Lin, Huyang, et al.
(Show Context)
Citation Context ...asible segments. Length-Constrained Maximum-Density Segment problem is to find a feasible segment with density equal to δmax. The Length-Constrained Maximum-Density Segment problem is well studied in =-=[14, 24, 26, 27, 29, 30]-=- and can be solved in linear time by [14, 24]. Let nδmax be the total number of feasible segments with density equal to δmax. If we are not satisfied by finding only one feasible segments with density... |

11 |
Randomized algorithm for the sum selection problem
- Lin, Lee
- 2007
(Show Context)
Citation Context ...e k segments whose sums are the k largest among all possible sums. The k Maximum-Sum Segments problem was first presented by Bae and Takaoka [2]. Since then, this problem has drawn a lot of attention =-=[3, 6, 10, 13, 31, 32]-=-, and recently an optimal O(n + k)-time algorithm was given by Brodal and Jørgensen [10]. The other is the Length-Constrained Maximum-Sum Segment problem. Given A and two integers L, U with 1 ≤ L ≤ U ... |

9 |
Optimal algorithms for locating the longest or shortest segments satisfying a sum or average constraint
- Chen, Chao
(Show Context)
Citation Context ...Sum-Constrained k Longest Segments In biological sequence analysis, several researchers have devoted to the problem of finding the longest segment whose sum is not less than a specified lower bound L =-=[1, 12, 35]-=-. Allison [1] gave an algorithm which runs in linear time if the input sequence is a 0-1 sequence and L is a rational number. For real number sequences and real number lower bound, Wang and Xu [35] pr... |

9 |
Linear-time algorithm for finding a maximum-density segment of a sequence
- Kim
(Show Context)
Citation Context |

9 | SEGID: Identifying interesting segments in (multiple) sequence alignments, Bioinformatics 19
- Wang, Xu
- 2003
(Show Context)
Citation Context ...Sum-Constrained k Longest Segments In biological sequence analysis, several researchers have devoted to the problem of finding the longest segment whose sum is not less than a specified lower bound L =-=[1, 12, 35]-=-. Allison [1] gave an algorithm which runs in linear time if the input sequence is a 0-1 sequence and L is a rational number. For real number sequences and real number lower bound, Wang and Xu [35] pr... |

7 |
Efficient algorithms for the sum selection problem and k maximum sums problem
- Lin, Lee
- 2006
(Show Context)
Citation Context |

7 |
An efficient algorithm for the length-constrained heaviest path Problem on a tree, Information Processing
- Wu, Chao, et al.
- 1999
(Show Context)
Citation Context ... Weight-Constrained Longest Paths problem is to find the longest path among all paths in T with weights in the interval [L, U]. The Weight-Constrained Longest Path problem was formulated by Wu et al. =-=[36]-=- and motivated as follows. Given a tree network with length and weight on each edge, we want to maintain the network by choosing a path and renewing the old and shabby edges of this path. The length a... |

6 | A linear time algorithm for the k maximal sums problem
- Brodal, Jørgensen
- 2007
(Show Context)
Citation Context |

5 |
Generalized selection and ranking
- Frederickson, Johnson
- 1980
(Show Context)
Citation Context ... V (x, y) = VX(x)+VY (y) for all (x, y) ∈ X ×Y . For convenience, we just use x + y to denote VX(x) + VY (y), and we call a set associated with a value function a valued set. Frederickson and Johnson =-=[20]-=- gave an optimal algorithm for finding the kth largest element in X + Y in O(m + p log(k/p)) time, where m = |X| ≤ |Y | = n and p = min{k, m}. Recently Bae and Takaoka proposed an efficient O(n + k lo... |

3 |
Spanning Trees and Optimization Problems, Chapman and Hall/CRC
- Wu, Chao
- 2004
(Show Context)
Citation Context ...ngest Path problem (also known as the Tree Diameter problem) is to find the longest path in T . The Tree Longest Path problem is a fundamental problem in dealing with trees and solvable in O(V ) time =-=[37]-=-. In the following, we introduce two generalizations of the Tree Longest Path problem, which are closely related to our study in this paper. One is the Tree k Longest Paths problem. Given T and a posi... |

2 |
Morishlta and T Tokuyama, Data mining with optimized two-dimensional association rules, A
- Fukuda, Morimoto, et al.
- 2001
(Show Context)
Citation Context ... that maximizes the sum. The Maximum-Sum Segment problem was first presented by Grenader [23] and finds applications to pattern recognition [23, 34], biological sequence analysis [1], and data mining =-=[22]-=-. The Maximum-Sum Segment problem is linear-time solvable using Kadane’s algorithm [7]. A variety of generalizations of the Maximum-Sum Segment problem have been proposed to fulfill more requirements.... |

2 |
Finding a longest nonnegative path in a constant degree tree
- Kim
- 2005
(Show Context)
Citation Context ...is to find the longest path subject to the weight constraints. Wu et al. [36] proposed an O(V log 2 V )-time algorithm for the case where the edge weight lower bound is ineffective, i.e., L = −∞. Kim =-=[28]-=- gave an O(V log V )- time algorithm to cope with the case where the tree has a constant degree and a uniform edge weight and the edge weight lower bound is ineffective. In this paper, we study the We... |

1 |
Wen-Chin Tien and Kun-Mao Chao. Improved Algorithms for the k Maximum-Sums Problems
- Cheng, Chen
- 2006
(Show Context)
Citation Context |