Skip to main content

Simplifying Dynamic Programming via Tabling

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3057))

Included in the following conference series:

Abstract

In the dynamic programming paradigm the value of an optimal solution is recursively defined in terms of optimal solutions to subproblems. Such dynamic programming definitions can be very tricky and error-prone to specify. This paper presents a novel, elegant method based on tabled logic programming that simplifies the specification of such dynamic programming solutions. Our method introduces a new mode declaration for tabled predicates. The arguments of each tabled predicate are divided into indexed and non-indexed ones so that tabled predicates can be regarded as functions: indexed arguments represent input values and non-indexed arguments represent output values. The non-indexed arguments in a tabled predicate can be further declared to be aggregate, e.g., the minimum, so that while generating answers, the global table will dynamically maintain the smallest value for that argument. This mode declaration scheme, coupled with recursion, provides a considerably easy-to-use method for dynamic programming: there is no need to define the value of an optimal solution recursively, instead, defining a general solution suffices. The optimal value as well as its corresponding concrete solution can be derived implicitly and automatically using tabled logic programming systems. Experimental results are shown to indicate that the mode declaration improves both time and space performances in solving dynamic programming problems on tabled LP systems. Additionally, our mode declaration scheme provides an alternative implementation vehicle for preference logic programming.

This research is supported by NSF Nebraska EPSCoR grant.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Applied Logic Systems, Inc., http://www.als.com

  2. Brown, A., Mantha, S., Wakayama, T.: Preference Logics: Towards a Unified Approach to Non-Monotonicity in Deductive Reasoning. Annals of Mathematics and Artificial Intelligence 10, 233–280 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  3. Chen, W., Warren, D.S.: Query Evaluation under the Well Founded Semantics. In: ACM Symposium on Principles of Database Systems, pp. 168–179 (1993)

    Google Scholar 

  4. Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. The MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  5. Cui, B., Swift, T.: Preference Logic Grammars: Fixed Point Semantics and Application to Data Standardization. Artificial Intelligence 138(1-2), 117–147 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  6. Govindarajan, K., Jayaraman, B., Mantha, S.: Preference Logic Programming. In: Proceedings of International Conference on Logic Programming (ICLP), pp. 731–745 (1995)

    Google Scholar 

  7. Guo, H.-F., Gupta, G.: A Simple Scheme for Implementing Tabled Logic Programming Systems Based on Dynamic Reordering of Alternatives. In: Proceedings of International Conference on Logic Programming (ICLP), pp. 181–196 (2001)

    Google Scholar 

  8. Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  9. Pemmasani, G., Guo, H.-F., Dong, Y., Ramakrishnan, C.R., Ramakrishnan, I.V.: Online Justification for Tabled Logic Programs. To appear in Proceedings of International Symposium of Functional and Logic Programming (April 2004)

    Google Scholar 

  10. Ramakrishnan, Y.S., Ramakrishnan, C.R., Ramakrishnan, I.V., Smolka, S.A., Swift, T., Warren, D.S.: Efficient Model Checking using Tabled Resolution. In: Grumberg, O. (ed.) CAV 1997. LNCS, vol. 1254, pp. 143–154. Springer, Heidelberg (1997)

    Google Scholar 

  11. Rocha, R., Silva, F., Costa, V.S.: On a Tabling Engine That Can Exploit Or-Parallelism. In: ICLP Proceedings, pp. 43–58 (2001)

    Google Scholar 

  12. Roychoudhury, A., Ramakrishnan, C.R., Ramakrishnan, I.V.: Justifying proofs using memo tables. In: Second International ACM SIGPLAN conference on Principles and Practice of Declarative Programming (PPDP), pp. 178–189 (2000)

    Google Scholar 

  13. Specht, G.: Generating Explanation Trees even for Negations in Deductive Database Systems. In: Proc. of the 5th Workshop of Logic Programming Environments (1992)

    Google Scholar 

  14. Swift, T.: Tabling for Non-Monotonic Programming. Annals of Mathematics and Artificial Intelligence 25(3-4), 201–240 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  15. XSB system, http://xsb.sourceforge.net

  16. Warren, D.S.: Programming in Tabled Prolog (Draft Book), http://www.cs.sunysb.edu/~warren

  17. Neng-Fa Zhou, Y., Shen, L.: Implementation of a Linear Tabling Mechanism. In: Pontelli, E., Santos Costa, V. (eds.) PADL 2000. LNCS, vol. 1753, p. 109. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Guo, HF., Gupta, G. (2004). Simplifying Dynamic Programming via Tabling. In: Jayaraman, B. (eds) Practical Aspects of Declarative Languages. PADL 2004. Lecture Notes in Computer Science, vol 3057. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24836-1_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24836-1_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22253-8

  • Online ISBN: 978-3-540-24836-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics