Skip to main content

Advanced Techniques for Dynamic Programming

  • Reference work entry
  • First Online:

Abstract

This is an overview over dynamic programming with an emphasis on advanced methods. Problems discussed include path problems, construction of search trees, scheduling problems, applications of dynamic programming for sorting problems, server problems, as well as others. This chapter contains an extensive discussion of dynamic programming speedup. There exist several general techniques in the literature for speeding up naive implementations of dynamic programming. Two of the best known are the Knuth-Yao quadrangle inequality speedup and the SMAWK/LARSCH algorithm for finding the row minima of totally monotone matrices. The chapter includes “ready to implement” descriptions of the SMAWK and LARSCH algorithms. Another focus is on dynamic programming, online algorithms, and work functions.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   3,400.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   549.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Use the leftmost rule to break ties.

Recommended Reading

  1. P.K. Agarwal, S. Sen, Selection in monotone matrices and computing kth nearest neighbors. J. Algorithms 20(3), 581–601 (1996); A preliminary version appeared, in Proceedings of the 4th Scandinavian Workshop on Algorithm Theory (1994), pp. 13–24

    Article  MathSciNet  MATH  Google Scholar 

  2. A. Aggarwal, J.K. Park, Notes on searching in multidimensional monotone arrays, in Proceedings of the 29th Annual Symposium on Foundations of Computer Science (IEEE Computer Society, Washington, DC, 1988), pp. 497–512

    Google Scholar 

  3. A. Aggarwal, M.M. Klawe, S. Moran, P.W. Shor, R.E. Wilber, Geometric applications of a matrix-searching algorithm. Algorithmica 2(1), 195–208 (1987); A preliminary version appeared, in Proceedings of the 2nd Annual Symposium on Computational Geometry (1986), pp. 285–292

    Article  MathSciNet  MATH  Google Scholar 

  4. A. Aggarwal, A. Bar-Noy, S. Khuller, D. Kravets, B. Schieber, Efficient minimum cost matching and transportation using the quadrangle inequality. J. Algorithms 19(1), 116–143 (1995); A preliminary version appeared, in Proceedings of the 33rd Annual Symposium on Foundations of Computer Science (1992), pp. 583–592

    Article  MathSciNet  MATH  Google Scholar 

  5. A. Aggarwal, D. Kravets, J.K. Park, S. Sen, Parallel searching in generalized Monge arrays. Algorithmica 19(3), 291–317 (1997); A preliminary version appeared, in Proceedings of the 2nd Annual ACM Symposium on Parallel Algorithms and Architectures (1990), pp. 259–268

    Article  MathSciNet  MATH  Google Scholar 

  6. S. Albers, P. Brucker, The complexity of one-machine batching problems. Discret. Appl. Math. 47, 87–10 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  7. A. Apostolico, M. Atallah, L. Larmore, S. McFaddin, Efficient parallel algorithms for string editing and related problems. SIAM J. Comput. 19(5), 968–988 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  8. A.N. Arslan, O. Egecioglu, Dynamic programming based approximation algorithms for sequence alignment with constraints. INFORMS J. Comput. 16(4), 441–458 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  9. M.J. Atallah, S. Rao Kosaraju, L.L. Larmore, G.L. Miller, S-H. Teng, Constructing trees in parallel, in Proceedings of the 1st Annual ACM Symposium on Parallel Algorithms and Architectures (ACM, New York, 1989) , pp. 421–431

    Google Scholar 

  10. S. Baase, A. van Gelder, Computer Algorithms (Addison Wesley, Reading, 2000)

    Google Scholar 

  11. V. Bafna, P.A. Pevzner, Sorting by transposition. SIAM J. Discret. Math. 11, 224–240 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  12. P.Baptiste, Batching identical jobs. Math. Methods Oper. Res. 52, 355–367 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  13. P. Baptiste, A. Jouglet, On minimizing total tardiness in a serial batching problem. Oper. Res. 35, 107–115 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  14. A. Bar-Noy, R.E. Ladner, Efficient algorithms for optimal stream merging for media-on-demand. SIAM J. Comput. 33(5), 1011–1034 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  15. W. Bein, M. Chrobak, L.L. Larmore, The 3-server problem in the plane, in Proceedings of 7th European Symposium on Algorithms (ESA). Volume 1643 of Lecture Notes in Computer Science (Springer, Berlin/New York, 1999), pp. 301–312

    Google Scholar 

  16. W. Bein, M. Chrobak, L.L. Larmore, The 3-server problem in the plane. Theoret. Comput. Sci. 287, 387–391 (2002)

    Article  MathSciNet  Google Scholar 

  17. W. Bein, L.L. Larmore, S. Latifi, I. Hal Sudborough, Block sorting is hard. Int. J. Found. Comput. Sci. 14(3), 425–437 (2003)

    Article  MATH  Google Scholar 

  18. W. Bein, P. Brucker, L.L. Larmore, J.K. Park, The algebraic Monge property and path problems. Discret. Appl. Math. 145(3), 455–464 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  19. W. Bein, J. Noga, J. Wiegley, Approximation for batching via priorities. Sci. Ann. Comput. Sci. XVII, 1–18 (2007)

    MathSciNet  Google Scholar 

  20. W. Bein, L. Epstein, L.L. Larmore, J. Noga, Optimally competitive list batching. Theoret. Comput. Sci. 410(38–40), 3631–3639 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  21. W. Bein, M. Golin, L. Larmore, Y. Zhang, The Knuth-Yao quadrangle-inequality speedup is a consequence of total-monotonicity. Trans. Algorithms 6(1) (2009)

    Google Scholar 

  22. W. Bein, L.L. Larmore, L. Morales, I. Hal Sudborough, A quadratic time 2-approximation algorithm for block sorting. Theor. Comput. Sci. 410, 711–717 (2009)

    Article  MATH  Google Scholar 

  23. W. Bein, L.L. Larmore, J. Noga, R. Reischuk, Knowledge state algorithms. Algorithmica 60(3), 653–678 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  24. R. Bellman, The theory of dynamic programming. Bull. Am. Math. Soc. 60:503–516 (1954)

    Article  MATH  Google Scholar 

  25. R. Bellman, Dynamic Programming, Dover Paperback edition 2003 edn. (Princeton University Press, Princeton, 1957)

    MATH  Google Scholar 

  26. R. Bellman, A.O. Esogbue, I. Nabeshima, Mathematical Aspects of Scheduling and Applications (Pergamon, Oxford/New York, 1982)

    MATH  Google Scholar 

  27. M. Bellmore, G.L. Nemhauser, The traveling salesman problem: A survey. Oper. Res. 16(3), 538–558 (1968)

    Article  MathSciNet  MATH  Google Scholar 

  28. D.P. Bertsekas, Dynamic Programming and Optimal Control, 2nd edn. (Athena Scientific, Belmont, 2000)

    Google Scholar 

  29. A. Borchers, P. Gupta, Extending the quadrangle inequality to speed-up dynamic programming. Inf. Process. Lett. 49(6), 287–290 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  30. A. Borodin, R. El-Yaniv, Online Computation and Competitive Analysis (Cambridge University Press, Cambridge/New York , 1998)

    MATH  Google Scholar 

  31. P.G. Bradford, M.J. Golin, L.L. Larmore, W. Rytter, Optimal prefix-free codes for unequal letter costs: Dynamic programming with the Monge property. J. Algorithms 42(2), 277–303 (2002); A preliminary version appeared, in Proceedings of the 6th Annual European Symposium on Algorithms (1998), pp. 43–54

    Article  MathSciNet  MATH  Google Scholar 

  32. G. Brassard, P. Bratley, Fundamentals of Algorithms (Prentice Hall, Englewood, 1996)

    Google Scholar 

  33. P. Brucker, Scheduling Algorithms 5th edn. (Springer, Berlin/New York, 2007)

    MATH  Google Scholar 

  34. P. Brucker, J. Hurink, Solving a chemical batch scheduling problem by local search. Ann. Oper. Res. 96, 17–38 (2000)

    Article  MATH  Google Scholar 

  35. P. Brucker, S. Knust, Complex Scheduling (Springer, Berlin, 2006)

    MATH  Google Scholar 

  36. P. Brucker, A. Gladky, H. Hoogeveen, M. Kovalyov, C. Potts, T. Tautenhahn, S. van de Velde, Scheduling a batch processing machine. J. Sched. 1(1), 31–54 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  37. P. Brucker, M. Kovalyov, Y. Shafransky, F. Werner, Batch scheduling with deadline on parallel machines. Ann. Oper. Res. 83, 23–40 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  38. R.E. Burkard, B. Klinz, R. Rudolf, Perspectives of Monge properties in optimization. Discret. Appl. Math. 70(2), 95–161 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  39. R.E. Burkard, V.G. Deineko, R. van Dal, J.A.A. van der Veen, G.J. Woeginger, Well-solvable special cases of the TSP: A survey. SIAM Rev. 40(3), 496–546 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  40. R.E. Burkard, V.G. Deineko, G.J. Woeginger, The travelling salesman problem on permuted Monge matrices. J. Comb. Optim. 2(4), 333–350 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  41. M. Chrobak, L.L. Larmore, An optimal online algorithm for k servers on trees. SIAM J. Comput. 20, 144–148 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  42. M. Chrobak, L.L. Larmore, The server problem and on-line games, in On-line Algorithms, ed. by L.A. McGeoch, D.D. Sleator. Volume 7 of DIMACS Series in Discrete Mathematics and Theoretical Computer Science (AMS/ACM, Providence, RI, 1992), pp. 11–64

    Google Scholar 

  43. M. Chrobak, L.L. Larmore, Metrical task systems, the server problem, and the work function algorithm, in Online Algorithms: The State of the Art, ed. by A. Fiat, G.J. Woeginger (Springer, Berlin/New York, 1998), pp. 74–94

    Chapter  Google Scholar 

  44. M. Chrobak, H. Karloff, T.H. Payne, S. Vishwanathan, New results on server problems. SIAM J. Discret. Math. 4, 172–181 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  45. T. Corman, C. Leiserson, R. Rivest, C. Stein, Introduction to Algorithms, 2nd edn. (McGraw Hill, New York, 2001)

    Google Scholar 

  46. A. Dan, D. Sitaram, P. Shahabuddin, Scheduling policies for an on-demand video server with batching, in Proceedings of the second ACM international conference on Multimedia (ACM, New York, 1994), pp. 15–23

    Google Scholar 

  47. S. Dasgupta, C. Papadimitriou, U. Vazirani, Algorithms (McGraw Hill, Boston, 2008)

    Google Scholar 

  48. E.V. Denardo, Dynamic Programming: Models and Applications (Dover, Mineola, 2003)

    Google Scholar 

  49. D.R. Dooly, S.A. Goldman, S.D. Scott, On-line analysis of the TCP acknowledgment delay problem. J. ACM 48(2), 243–273 (2001)

    Article  MathSciNet  Google Scholar 

  50. S.E. Dreyfus, A.M. Law, The art and theory of dynamic programming (Academic, New York, 1977)

    MATH  Google Scholar 

  51. D. Eppstein, Sequence comparison with mixed convex and concave costs. J. Algorithms 11(1), 85–101 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  52. D. Eppstein, Z. Galil, R. Giancarlo, G.F. Italiano, Sparse dynamic programming I: Linear cost functions. J. ACM 39(3), 519–545 (1992); A preliminary version appeared, in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms, (1990), pp. 513–522

    Article  MathSciNet  MATH  Google Scholar 

  53. D. Eppstein, Z. Galil, R. Giancarlo, G.F. Italiano, Sparse dynamic programming II: Convex and concave cost functions. J. ACM 39(3), 546–567 (1992); A preliminary version appeared, in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), pp. 513–522

    Article  MathSciNet  MATH  Google Scholar 

  54. R. Fleischer, M.J. Golin, Y. Zhang, Online maintenance of k-medians and k-covers on a line. Algorithmica 45(4), 549–567 (2006); A preliminary version appeared, in Proceedings of the 9th Scandinavian Workshop on Algorithm Theory (2004), pp. 102–113

    Article  MathSciNet  MATH  Google Scholar 

  55. R.F. Floyd, Algorithm 97: Shortest path. Commun. ACM 5(6), 345 (1962)

    Article  Google Scholar 

  56. Z. Galil, R. Giancarlo, Speeding up dynamic programming with applications to molecular biology. Theor. Comput. Sci. 64(1), 107–118 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  57. Z. Galil, K. Park, Dynamic programming with convexity, concavity and sparsity. Theor. Comput. Sci. 92(1), 49–76 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  58. W.H. Gates, C.H. Papadimitriou, Bounds for sorting by prefix reversal. Discret. Math. 27, 47–57 (1979)

    Article  MathSciNet  Google Scholar 

  59. E.N. Gilbert, E.F. Moore, Variable length encodings. Bell Syst. Tech. J. 38, 933–967 (1959)

    Article  MathSciNet  Google Scholar 

  60. D. Gusfield, Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology (Cambridge University Press, Cambridge, 1997)

    Book  MATH  Google Scholar 

  61. R. Hassin, A. Tamir, Improved complexity bounds for location problems on the real line. Oper. Res. Lett. 10(7), 395–402 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  62. H. Heydari, I. Hal Sudborough, On the diameter of the pancake network. J. Algorithms 25(1), 67–94 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  63. D.S. Hirschberg, L.L. Larmore, The least weight subsequence problem. SIAM J. Comput. 16(4), 628–638 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  64. H. Hoogeveen, A. Vestjens, Optimal on-line algorithms for single-machine scheduling, in Proceedings of 5th Conference Integer Programming and Combinatorial Optimization (IPCO) (Springer Verlag, London, 1996), pp. 404–414

    Google Scholar 

  65. T.C. Hu, A.C. Tucker, Optimal computer search trees and variable-length alphabetical codes. SIAM J. Appl. Math. 21(4), 514–532 (1971)

    Article  MathSciNet  MATH  Google Scholar 

  66. A. Karlin, On the performance on competitive algorithms in practice, in Online Algorithms: The State of the Art, ed. by A. Fiat, G.J. Woeginger (Springer, 1998), pp. 373–382

    Chapter  Google Scholar 

  67. A. Karlin, C. Kenyon, D. Randall, Dynamic TCP acknowledgment and other stories about e/(e-1). Algorithmica 36(3), 209–224 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  68. A. Karlin, M. Manasse, L. Rudolph, D. Sleator, Competitive snoopy caching. Algorithmica 3, 79–119 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  69. M.M. Klawe, Superlinear bounds for matrix searching problems. J. Algorithms 13(1), 55–78 (1992); A preliminary version appeared; in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), pp. 485–493

    Article  MathSciNet  MATH  Google Scholar 

  70. M.M. Klawe, D.J. Kleitman, An almost linear time algorithm for generalized matrix searching. SIAM J. Discret. Math. 3(1), 81–97 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  71. D.E. Knuth, Optimum binary search trees. Acta Inf. 1, 14–25 (1971)

    Article  MATH  Google Scholar 

  72. E. Koutsoupias, C. Papadimitriou, On the k-server conjecture. J. ACM 42, 971–983 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  73. D. Kravets, J.K. Park, Selection and sorting in totally monotone arrays. Theory Comput. Syst. 24(3), 201–220, (1991); A preliminary version appeared, in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), pp. 494–502

    MathSciNet  MATH  Google Scholar 

  74. R. Kuik, M. Salomon, L.N. van Wassenhove, Batching decisions: structure and models. Eur. J. Oper. Res. 75, 243–263 (1994)

    Article  Google Scholar 

  75. L.L. Larmore, D.S. Hirschberg, A fast algorithm for optimal length-limited Huffman codes. J. ACM 37(3), 464–473 (1990); A preliminary version appeared, in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), pp. 310–318

    Article  MathSciNet  MATH  Google Scholar 

  76. L.L. Larmore, T.M. Przytycka, Parallel construction of trees with optimal weighted path length, in Proceedings of the 3rd Annual ACM Symposium on Parallel Algorithms and Architectures (ACM Press, New York, 1991), pp. 71–80

    Google Scholar 

  77. L.L. Larmore, B. Schieber, On-line dynamic programming with applications to the prediction of rna secondary structure. J. Algorithms 12, 490–515 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  78. L.L. Larmore, B. Schieber, On-line dynamic programming with applications to the prediction of RNA secondary structure. J. Algorithms 12(3), 490–515 (1991); A preliminary version appeared, in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), pp. 503–512

    Article  MathSciNet  MATH  Google Scholar 

  79. E. Lawler, J. Lensta, A.H.G Rinooy Kan, D. Smoys (eds.), The Traveling Salesman: A Guided Tour of Combinatorial Optimization (Wiley, New York, 1985)

    MATH  Google Scholar 

  80. M. Mahajan, R. Rama, V. Raman, S. Vijayakumar, Approximate block sorting. Int. J. Found. Comput. Sci. 12(2), 337–356 (2006)

    Article  MathSciNet  Google Scholar 

  81. M. Mahajan, R. Rama, S. Vijayakumar, Block sorting: a characterization and some heuristics. Nord. J. Comput. 14(1), 25 (2007)

    MathSciNet  Google Scholar 

  82. M. Manasse, L.A. McGeoch, D. Sleator, Competitive algorithms for server problems. J. Algorithms 11, 208–230 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  83. S. Meyn, Control Techniques for Complex Networks (Cambridge University Press, Cambridge, MA, 2007)

    Book  Google Scholar 

  84. J.K. Park, The Monge array: an abstraction and its applications. PhD thesis, Massachusetts Institute of Technology, 1991

    Google Scholar 

  85. C.N. Potts, L.N. van Wassenhove, Integrating scheduling with batching and lot-sizing: A review of algorithms and complexity. J. Oper. Res. Soc. 43, 395–406 (1992)

    MATH  Google Scholar 

  86. B. Schieber, Computing a minimum weight k-link path in graphs with the concave Monge property. J. Algorithms 29(2), 204–222 (1998); A preliminary version appeared, in Proceedings of the 6th Annual ACM-SIAM Symposium on Discrete Algorithms (1995), pp. 405–411

    Article  MathSciNet  MATH  Google Scholar 

  87. M. Sniedovich, Dynamic Programming: Foundations and Principles. (Taylor and Francis, Boca Raton, FL, 2010)

    Book  Google Scholar 

  88. N. Stokey, R.E. Lucas, E. Prescott, Recursive Methods in Economic Dynamics (Harvard University Press, Cambridge, MA, 1989)

    MATH  Google Scholar 

  89. A. Tamir, An O(pn 2) algorithm for the p-median and related problems on tree graphs. Oper. Res. Lett. 19(2), 59–64 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  90. A. Viterbi, Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Trans. Inf. Theory 13, 260–269 (1967)

    Article  MATH  Google Scholar 

  91. M.L. Wachs, On an efficient dynamic programming technique of F. F. Yao. J. Algorithms 10(4), 518–530 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  92. S. Warshall, A theorem on boolean matrices. J. ACM 9(1) 11–12 (1962)

    Article  MathSciNet  MATH  Google Scholar 

  93. R.L. Wessner, Optimal alphabetic search trees with restricted maximal height. Inf. Process. Lett. 4(4), 90–94 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  94. R. Wilber, The concave least-weight subsequence problem revisited. J. Algorithms 9(3), 418–425 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  95. G.J. Woeginger, Monge strikes again: Optimal placement of web proxies in the Internet. Oper. Res. Lett. 27(3), 93–96 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  96. F.F. Yao, Efficient dynamic programming using quadrangle inequalities, in Proceedings of the 12th Annual ACM Symposium on Theory of Computing (ACM Press, New York, 1980), pp. 429–435

    Google Scholar 

  97. F.F. Yao, Speed-up in dynamic programming. SIAM J. Matrix Anal. Appl. 3(4), 532–540 (1982)

    MATH  Google Scholar 

  98. G. Zhang, X. Cai, C.Y. Lee, C.K. Wong, Minimizing makespan on a single batch processing machine with nonidentical job sizes. Naval Res. Logist. 48, 226–240 (2001)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This chapter is dedicated to Lawrence L. Larmore, a great mentor. A sabbatical (academic year 2006/07) granted by the University of Nevada, Las Vegas, which benefited this book chapter, is acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wolfgang Bein .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer Science+Business Media New York

About this entry

Cite this entry

Bein, W. (2013). Advanced Techniques for Dynamic Programming. In: Pardalos, P., Du, DZ., Graham, R. (eds) Handbook of Combinatorial Optimization. Springer, New York, NY. https://doi.org/10.1007/978-1-4419-7997-1_28

Download citation

Publish with us

Policies and ethics