Linear-Time Algorithm for the Length-Constrained Heaviest Path Problem in a Tree with Uniform Edge Lengths∗
نویسنده
چکیده
Given a tree T with edge lengths and edge weights, and a value B, the length-constrained heaviest path problem is to find a path in T with maximum path weight whose path length is at most B. We present a linear time algorithm for the problem when the edge lengths are uniform, i.e., all one. This algorithm with slight modification can be used to find the heaviest path of length exactly B in T in linear time. key words: length-constrained paths, heaviest paths, uniform edge lengths
منابع مشابه
Linear-Time Algorithm for the Length-Constrained Heaviest Path Problem in a Tree with Uniform Edge Lengths
Given a tree T with edge lengths and edge weights, and a value B, the length-constrained heaviest path problem is to find a path in T with maximum path weight whose path length is at most B. We present a linear time algorithm for the problem when the edge lengths are uniform, i.e., all one. This algorithm with slight modification can be used to find the heaviest path of length exactly B in T in...
متن کاملOptimal Algorithms for Finding Density-Constrained Longest and Heaviest Paths in a Tree
Let T be a tree with n nodes, in which each edge is associated with a length and a weight. The density-constrained longest (heaviest) path problem is to find a path of T with maximum path length (weight) whose path density is bounded by an upper bound and a lower bound. The path density is the path weight divided by the path length. We show that both problems can be solved in optimal O(n logn) ...
متن کاملFinding a length-constrained maximum-sum or maximum-density subtree and its application to logistics
We study the problem of finding a length-constrained maximum-density path in a tree with weight and length on each edge. This problem was proposed in [R.R. Lin, W.H. Kuo, K.M. Chao, Finding a length-constrained maximum-density path in a tree, Journal of Combinatorial Optimization 9 (2005) 147–156] and solved in O(nU ) time when the edge lengths are positive integers, where n is the number of no...
متن کاملAlgorithm for the Length-Constrained Maximum-Density Path Problem in a Tree with Uniform Edge Lengths
SUMMARY Given an edge-weighted tree with n vertices and a positive integer L, the length-constrained maximum-density path problem is to find a path of length at least L with maximum density in the tree. The density of a path is the sum of the weights of the edges in the path divided by the number of edges in the path. We present an O(n) time algorithm for the problem. The previously known algor...
متن کاملUsing spine decompositions to efficiently solve the length-constrained heaviest path problem for trees
a r t i c l e i n f o a b s t r a c t The length-constrained heaviest path (LCHP) in a weighted tree T , where each edge is assigned a weight and a length, is the path P in T with maximum total path weight and total path length bounded by a given value B. This paper presents an O (n log n) time LCHP algorithm which utilizes a data structure constructed from the spine decomposition of the input ...
متن کامل