Online Dynamic Programming Speedups ⋆

Abstract

Abstract. Consider the Dynamic Program h(n) = min1≤j≤n a(n, j) for n =1, 2,...,N. For arbitrary values of a(n, j), calculating all the h(n) requires Θ(N 2) time. It is well known that, if the a(n, j) satisfy the Monge property, then there are techniques to reduce the time down to O(N). This speedup is inherently static, i.e., it requires N to be known in advance. In this paper we show that if the a(n, j) satisfy a stronger condition, then it is possible, without knowing N in advance, to compute the values of h(n) in the order of n = 1, 2,...,N, in O(1) amortized time per h(n). This maintains the DP speedup online, in the sense that the time to compute all h(n) isO(N). A slight modification of our algorithm restricts the worst case time to be O(log N) perh(n), while maintaining the amortized time bound. For a(n, j) that satisfy our stronger condition, our algorithm is also simpler to implement than the standard Monge speedup. We illustrate the use of our algorithm on two examples from the literature. The first shows how to make the speedup of the D-medianona line problem in an online settings. The second shows how to improve the running time for a DP used to reduce the amount of bandwidth needed when paging mobile wireless users.

    Similar works