Online dynamic programming speedups

  • Authors:
  • Amotz Bar-Noy;Mordecai J. Golin;Yan Zhang

  • Affiliations:
  • Brooklyn College, Brooklyn, NY;Hong Kong University of Science and Technology, Kowloon, Hong Kong;Hong Kong University of Science and Technology, Kowloon, Hong Kong

  • Venue:
  • WAOA'06 Proceedings of the 4th international conference on Approximation and Online Algorithms
  • Year:
  • 2006

Quantified Score

Hi-index 0.06

Visualization

Abstract

Consider the Dynamic Program h(n) = min 1≤j≤na(n,j) for n = 1, 2, ..., N. For arbitrary values of a(n,j), calculating all the h(n) requires Θ(N2) 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) is O(N). A slight modification of our algorithm restricts the worst case time to be O(logN) per h(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-median on a 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.