skip to main content
research-article

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

Published:28 December 2009Publication History
Skip Abstract Section

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.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Borchers, A., and Gupta, P. 1994. Extending the quadrangle inequality to speed-up dynamic programming. Inf. Process. Lett. 49, 6, 287--290. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Burkard, R. E., Klinz, B., and Rudolf, R. 1996. Perspectives of Monge properties in optimization. Discr. Appl. Math. 70, 2, 95--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Galil, Z., and Park, K. 1992. Dynamic programming with convexity, concavity and sparsity. Theor. Comput. Sci. 92, 1, 49--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Gilbert, E. N., and Moore, E. F. 1959. Variable length encodings. Bell Syst. Tech. J. 38, 933--967.Google ScholarGoogle ScholarCross RefCross Ref
  10. Knuth, D. E. 1971. Optimum binary search trees. Acta Inf. 1, 14--25.Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Wachs, M. L. 1989. On an efficient dynamic programming technique of F. F. Yao. J. Algor. 10, 4, 518--530. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Wessner, R. L. 1976. Optimal alphabtic search trees with restricted maximal height. Inf. Process. Lett. 4, 4, 90--94.Google ScholarGoogle ScholarCross RefCross Ref
  16. Wilber, R. 1988. The concave least-weight subsequence problem revisited. J. Algor. 9, 3, 418--425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Woeginger, G. J. 2000. Monge strikes again: Optimal placement of Web proxies in the Internet. Oper. Res. Lett. 27, 3, 93--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

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

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • 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

            Copyright © 2009 ACM

            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: 1 October 2007
            • Received: 1 September 2007
            Published in talg Volume 6, Issue 1

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader