skip to main content
research-article

The Knuth-Yao quadrangle-inequality speedup is a consequence of total monotonicity

Published: 28 December 2009 Publication History

Abstract

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 algorithm for finding the row-minima of totally monotone matrices. Although both of these techniques use a quadrangle inequality and seem similar, they are actually quite different and have been used differently in the literature.
In this article we show that the Knuth-Yao technique is actually a direct consequence of total monotonicity. As well as providing new derivations of the Knuth-Yao result, this also permits to solve the Knuth-Yao problem directly using the SMAWK algorithm. Another consequence of this approach is a method for solving online versions of problems with the Knuth-Yao property. The online algorithms given here are asymptotically as fast as the best previously known static ones. For example, the Knuth-Yao technique speeds up the standard dynamic program for finding the optimal binary search tree of n elements from Θ(n3) down to O(n2), and the results in this article allow construction of an optimal binary search tree in an online fashion (adding a node to the left or the right of the current nodes at each step) in O(n) time per step.

References

[1]
Aggarwal, A., Klawe, M. M., Moran, S., Shor, P. W., and Wilber, R. E. 1987. Geometric applications of a matrix-searching algorithm. Algorithmica 2, 1, 195--208.
[2]
Aggarwal, A., and Park, J. K. 1988. Notes on searching in multidimensional monotone arrays. In Proceedings of the 29th Annual Symposium on Foundations of Computer Science. IEEE Computer Society, Los Alamitos, CA, 497--512.
[3]
Atallah, M. J., Kosaraju, S. R., Larmore, L. L., Miller, G. L., and Teng, S.-H. 1989. Constructing trees in parallel. In Proceedings of the 1th Annual ACM Symposium on Parallel Algorithms and Architectures. ACM, New York, 421--431.
[4]
Bar-Noy, A., and Lander, R. E. 2004. Efficient algorithms for optimal stream merging for media-on-demand. SIAM J. Comput. 33, 5, 1011--1034.
[5]
Bein, W. W., Brucker, P., Larmore, L. L., and Park, J. K. 2005. The algebraic Monge property and path problems. Discr. Appl. Math. 145, 3, 455--464.
[6]
Borchers, A., and Gupta, P. 1994. Extending the quadrangle inequality to speed-up dynamic programming. Inf. Process. Lett. 49, 6, 287--290.
[7]
Burkard, R. E., Klinz, B., and Rudolf, R. 1996. Perspectives of Monge properties in optimization. Discr. Appl. Math. 70, 2, 95--161.
[8]
Galil, Z., and Park, K. 1992. Dynamic programming with convexity, concavity and sparsity. Theor. Comput. Sci. 92, 1, 49--76.
[9]
Gilbert, E. N., and Moore, E. F. 1959. Variable length encodings. Bell Syst. Tech. J. 38, 933--967.
[10]
Knuth, D. E. 1971. Optimum binary search trees. Acta Inf. 1, 14--25.
[11]
Larmore, L. L., and Schieber, B. 1991. On-Line dynamic programming with applications to the prediction of RNA secondary structure. J. Algor. 12, 3, 490--515. A preliminary version appeared in Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms. 503--512, 1990.
[12]
Rao, S. K., Sadayappan, P., Hwang, F. K., and Shor, P. W. 1992. The rectilinear Steiner arborescence problem. Algorithmica 7, 2-3, 277--288.
[13]
Said, A. 2005. Efficient alphabet partitioning algorithms for low-complexity entropy coding. In Proceedings of the Data Compression Conference. IEEE Computer Society, Los Alamitos, CA, 183--192.
[14]
Wachs, M. L. 1989. On an efficient dynamic programming technique of F. F. Yao. J. Algor. 10, 4, 518--530.
[15]
Wessner, R. L. 1976. Optimal alphabtic search trees with restricted maximal height. Inf. Process. Lett. 4, 4, 90--94.
[16]
Wilber, R. 1988. The concave least-weight subsequence problem revisited. J. Algor. 9, 3, 418--425.
[17]
Woeginger, G. J. 2000. Monge strikes again: Optimal placement of Web proxies in the Internet. Oper. Res. Lett. 27, 3, 93--96.
[18]
Yao, F. F. 1980. Efficient dynamic programming using quadrangle inequalities. In Proceedings of the 12th Annual ACM Symposium on Theory of Computing. ACM, New York, 429--435.
[19]
Yao, F. F. 1982. Speed-Up in dynamic programming. SIAM J. Matrix Anal. Appl. (formerly SIAM J. Algebraic Discr. Methods) 3, 4, 532--540.

Cited By

View all
  • (2024)A Tight Threshold Bound for Search Trees with 2-Way ComparisonsTheory and Applications of Models of Computation10.1007/978-981-97-2340-9_9(99-110)Online publication date: 13-May-2024
  • (2021)(Near-)linear-time randomized algorithms for row minima in Monge partial matrices and related problemsProceedings of the Thirty-Second Annual ACM-SIAM Symposium on Discrete Algorithms10.5555/3458064.3458152(1465-1482)Online publication date: 10-Jan-2021
  • (2021)Dynamic Programming for Sequential Deterministic Quantization of Discrete Memoryless ChannelsIEEE Transactions on Communications10.1109/TCOMM.2021.306283869:6(3638-3651)Online publication date: Jun-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Algorithms
ACM Transactions on Algorithms  Volume 6, Issue 1
December 2009
374 pages
ISSN:1549-6325
EISSN:1549-6333
DOI:10.1145/1644015
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 28 December 2009
Accepted: 01 October 2007
Received: 01 September 2007
Published in TALG Volume 6, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Dynamic programming
  2. binary search tree
  3. online computation
  4. totally monotone

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)20
  • Downloads (Last 6 weeks)1
Reflects downloads up to 22 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)A Tight Threshold Bound for Search Trees with 2-Way ComparisonsTheory and Applications of Models of Computation10.1007/978-981-97-2340-9_9(99-110)Online publication date: 13-May-2024
  • (2021)(Near-)linear-time randomized algorithms for row minima in Monge partial matrices and related problemsProceedings of the Thirty-Second Annual ACM-SIAM Symposium on Discrete Algorithms10.5555/3458064.3458152(1465-1482)Online publication date: 10-Jan-2021
  • (2021)Dynamic Programming for Sequential Deterministic Quantization of Discrete Memoryless ChannelsIEEE Transactions on Communications10.1109/TCOMM.2021.306283869:6(3638-3651)Online publication date: Jun-2021
  • (2021)Scheduling with gaps: new models and algorithmsJournal of Scheduling10.1007/s10951-021-00691-wOnline publication date: 21-Jul-2021
  • (2019)Dynamic Programming for Quantization of q-ary Input Discrete Memoryless Channels2019 IEEE International Symposium on Information Theory (ISIT)10.1109/ISIT.2019.8849759(450-454)Online publication date: Jul-2019
  • (2018)Speeding up dynamic programming in the line-constrained k-medianTheory of Computing Systems10.1007/s00224-017-9780-y62:6(1351-1365)Online publication date: 1-Aug-2018
  • (2017)Maximizing the overall end-user satisfaction of data broadcast in wireless mesh networksJournal of Discrete Algorithms10.1016/j.jda.2017.07.00245(14-25)Online publication date: Jul-2017
  • (2016)Speeding up Dynamic Programming in the Line-Constrained k-medianCombinatorial Algorithms10.1007/978-3-319-44543-4_23(293-305)Online publication date: 9-Aug-2016
  • (2015)Optimal Competitiveness for the Rectilinear Steiner Arborescence ProblemProceedings, Part II, of the 42nd International Colloquium on Automata, Languages, and Programming - Volume 913510.1007/978-3-662-47666-6_54(675-687)Online publication date: 6-Jul-2015
  • (2014)Optimal Competitiveness for Symmetric Rectilinear Steiner Arborescence and Related ProblemsAutomata, Languages, and Programming10.1007/978-3-662-43951-7_44(520-531)Online publication date: 2014
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media