Online Dynamic Programming Speedups

Consider the dynamic program h ( n )=min  1≤ j ≤ n a ( n , j ), where a ( n , j ) is some formula that may (online) or may not (offline) depend on the previously computed h ( i ), for i < n . The goal is to compute all h ( n ), for 1≤ n ≤ N . It is well known that, if a ( n , j ) satisfy the Mong...

Full description

Saved in:
Bibliographic Details
Published in:Theory of computing systems Vol. 45; no. 3; pp. 429 - 445
Main Authors: Bar-Noy, Amotz, Golin, Mordecai J., Zhang, Yan
Format: Journal Article
Language:English
Published: New York Springer-Verlag 01-10-2009
Springer Nature B.V
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Consider the dynamic program h ( n )=min  1≤ j ≤ n a ( n , j ), where a ( n , j ) is some formula that may (online) or may not (offline) depend on the previously computed h ( i ), for i < n . The goal is to compute all h ( n ), for 1≤ n ≤ N . It is well known that, if a ( n , j ) satisfy the Monge property, then the SMAWK algorithm (Aggarwal et al., Algorithmica 2(1):195–208, 1987 ) can solve the offline problem in O ( N ) time; a  Θ ( N ) speedup over the naive algorithm. In this paper we extend this speedup to the online case, that is, to compute h ( n ) in the order n =1,2,…, N when (i) we do not know the values of a ( n ′, j ) for n ′> n before h ( n ) has been computed and (ii) do not know the problem size N in advance. We show that if a ( n , j ) satisfy a stronger, but sometimes still natural, property than the Monge one, then each h ( n ) can be computed in online fashion in O (1) amortized time. This maintains the speedup online, in the sense that the total time to compute all h ( n ) is O ( N ). We also show how to compute each h ( n ) in the worst case O (log  N ) time, while maintaining the amortized time bound. For a ( n , j ) satisfying our stronger property, our algorithm is also simpler than the standard SMAWK algorithm for solving the offline case. We illustrate our technique on two examples from the literature; the first is the D -median problem on a line, and the second comes from mobile wireless paging.
ISSN:1432-4350
1433-0490
DOI:10.1007/s00224-009-9166-x