Introduction to algorithms
An efficient algorithm for the length-constrained heaviest path problem on a tree
Information Processing Letters
Information Processing Letters
Hi-index | 0.91 |
A longest nonnegative path in an edge-weighted tree is a path such that the sum of edge weights on it is nonnegative and the number of edges on it is as large as possible. In this paper we show that if a tree has a constant degree, then its longest nonnegative path can be found in O(n log n) time, where n is the number of nodes. Previously known algorithms take O(n log2 n) time.