Using spine decompositions to efficiently solve the length-constrained heaviest path problem for trees

Bishnu Bhattacharyya

Abstract

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 tree. This is an improvement over the existing algorithm by Wu et al (1999), which runs in O(n log2 n) time. Our method also improves on a previous O(n log n) time algorithm by Kim (2005) for the special case of finding a longest nonnegative path in a constant degree tree in that we can handle trees of arbitrary degree within the same time bounds.