Skip to main content

Search and Optimization Problems in Datalog

  • Chapter
  • First Online:
Computational Logic: Logic Programming and Beyond

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2408))

Abstract

This paper analyzes the ability of DATALOG languages to express search and optimization problems. It is first shown that \( \mathcal{N}\mathcal{P} \) search problems can be formulated as unstratified DATALOG queries under non-deterministic stable model semantics so that each stable model corresponds to a possible solution. \( \mathcal{N}\mathcal{P} \) optimization problems are then formulated by adding a max (or min) construct to select the stable model (thus, the solution) which maximizes (resp., minimizes) the result of a polynomial function applied to the answer relation. In order to enable a simpler and more intuitive formulation for search and optimization problems, it is introduced a DATALOG language in which the use of stable model semantics is disciplined to refrain from abstruse forms of unstratified negation. The core of our language is stratified negation extended with two constructs allowing nondeterministic selections and with query goals enforcing conditions to be satisfied by stable models. The language is modular as the level of expressivity can be tuned and selected by means of a suitable use of the above constructs, thus capturing significant subclasses of search and optimization queries.

Work partially supported by the Italian National Research Council (CNR) and by MURST (projects DATA-X and D2I).

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 109.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 139.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. Abiteboul, S., Simon, E., and Vianu, V., Non-deterministic languages to express deterministic transformations. In Proc. ACM Symp. on Principles of Database Systems, 1990, pp. 218–229.

    Google Scholar 

  2. Abiteboul, S., and Vianu, V., Non-determinism in logic-based languages. Annals of Mathematics and Artificial Intelligence 3, 1991, pp. 151–186.

    Article  MATH  MathSciNet  Google Scholar 

  3. Abiteboul, S., Hull, R., and Vianu, V., Foundations of Databases. Addison-Wesley, 1994.

    Google Scholar 

  4. Afrati, F., Cosmadakis, S. S., and Yannakakis, M., On Datalog vs. Polynomial Time. Proc. ACM Symp. on Principles of Database Systems, 1991, pp. 13–25.

    Google Scholar 

  5. Apt, K., Blair, H., and Walker, A., Towards a theory of declarative knowledge. In Foundations of Deductive Databases and Logic Programming, J. Minker (ed.), Morgan Kauffman, Los Altos, USA, 1988, 89–142.

    Google Scholar 

  6. Ausiello, G., Crescenzi, P., and Protasi M., Approximate solution of NP optimization problems. Theoretical Computer Science, No. 150, 1995, pp. 1–55.

    Google Scholar 

  7. Ausiello, G., Crescenzi, P., Gambosi, G., Kann, V., Marchetti-Spaccamela, A., and Protasi, M., Complexity and Approximation-Combinatorial optimization problems and their approximability properties Springer-Verlag, 1999.

    Google Scholar 

  8. Fagin, R., Generalized First-Order Spectra and Polynomial-Time Recognizable Sets. In Complexity of Computation (R. Karp, Ed.), SIAM-AMS Proc., Vol. 7, 1974, pp. 43–73.

    Google Scholar 

  9. Fenner, S., Green, F., Homer, S., Selman, A. L., Thierauf, T. and Vollmer H., Complements of Multivalued Functions. Chicago Journal of Theoretical Computer Science, 1999.

    Google Scholar 

  10. Garey, M., and Johnson, D. S., Computers and Intractability — A Guide to the Theory of NP-Completeness. W.H. Freeman, New York, USA, 1979.

    MATH  Google Scholar 

  11. Gelfond, M., and Lifschitz, V., The Stable Model Semantics for Logic Programming. Proc. 5th Int. Conf. on Logic Programming, 1988, pp. 1070–1080.

    Google Scholar 

  12. Giannotti, F., Pedreschi, D., and Zaniolo, C., Semantics and Expressive Power of Non-Deterministic Constructs in Deductive Databases. Journal of Computer and System Sciences, 62, 1, 2001, pp. 15–42.

    Article  MathSciNet  Google Scholar 

  13. Giannotti, F., Pedreschi, D., Saccà, D., and Zaniolo, C., Nondeterminism in Deductive Databases. Proc. 2nd Int. Conf. on Deductive and Object-Oriented Databases, 1991, pp. 129–146.

    Google Scholar 

  14. Greco, S., Saccà, D., and Zaniolo C., Datalog with Stratified Negation and Choice: from P to D p. Proc. Int. Conf. on Database Theory, 1995, pp. 574–589.

    Google Scholar 

  15. Greco, S., and Saccà, D., NP-Optimization Problems in Datalog. Proc. Int. Logic Programming Symp., 1997, pp. 181–195.

    Google Scholar 

  16. Greco, S., and Zaniolo, C., Greedy Algorithms in Datalog. Proc. Int. Joint Conf. and Symp. on Logic Programming, 1998, pp. 294–309.

    Google Scholar 

  17. Johnson, D. S., A Catalog of Complexity Classes. In Handbook of Theoretical Computer Science, Vol. 1, J. van Leewen (ed.), North-Holland, 1990.

    Google Scholar 

  18. Kanellakis, P. C., Elements of Relational Database Theory. In Handbook of Theoretical Computer Science, Vol. 2, J. van Leewen (ed.), North-Holland, 1991.

    Google Scholar 

  19. Kolaitis, P. G., and Thakur, M. N., Logical Definability of NP Optimization Problems. Information and Computation, No. 115, 1994, pp. 321–353.

    Google Scholar 

  20. Kolaitis, P. G., and Thakur, M. N., Approximation Properties of NP Minimization Classes. Journal of Computer and System Science, No. 51, 1995, pp. 391–411.

    Google Scholar 

  21. Leone, N., Palopoli, L., and Saccà, D. On the Complexity of Search Queries. In Fundamentals Of Information Systems (T. Plle, T. Ripke, K.D. Schewe, eds), 1999, pp. 113–127.

    Google Scholar 

  22. Lloyd, J., Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  23. Marek, W., and Truszczynski, M., Autoepistemic Logic. Journal of the ACM, Vol. 38, No. 3, 1991, pp. 588–619.

    Article  MATH  MathSciNet  Google Scholar 

  24. Papadimitriou, C. H., Computational Complexity. Addison-Wesley, Reading, MA, USA, 1994.

    MATH  Google Scholar 

  25. Panconesi, A., and Ranjan, D., Quantifiers and Approximation. Theoretical Computer Science, No. 1107, 1992, pp. 145–163.

    Google Scholar 

  26. Papadimitriou, C. H., and Yannakakis, M., Optimization, Approximation, and Complexity Classes. Journal Computer and System Sciences, No. 43, 1991, pp. 425–440.

    Google Scholar 

  27. Ramakrisnhan, R., Srivastava, D., and Sudanshan, S., CORAL — Control, Relations and Logic. In Proc. of 18th Conf. on Very Large Data Bases, 1992, pp. 238–250.

    Google Scholar 

  28. Saccà, D., The Expressive Powers of Stable Models for Bound and Unbound Queries. Journal of Computer and System Sciences, Vol. 54, No. 3, 1997, pp. 441–464.

    Article  MATH  MathSciNet  Google Scholar 

  29. Saccà, D., and Zaniolo, C., Stable Models and Non-Determinism in Logic Programs with Negation. In Proc. ACM Symp. on Principles of Database Systems, 1990, pp. 205–218.

    Google Scholar 

  30. Selman, A., A taxonomy of complexity classes of functions. Journal of Computer and System Science, No. 48, 1994, pp. 357–381.

    Google Scholar 

  31. A. Selman, Much ado about functions. Proc. of the 11th Conf. on Computational Complexity, IEEE Computer Society Press, 1996, pp. 198–212.

    Google Scholar 

  32. Ullman, J. K., Principles of Data and Knowledge-Base Systems, volume 1 and 2. Computer Science Press, New York, 1988.

    Google Scholar 

  33. Zaniolo, C, Ami, N., and Ong, K., Negation and Aggregates in Recursive Rules: the \( \mathcal{L}\mathcal{D}\mathcal{L} + + \) Approach. Proc. 3rd Int. Conf. on Deductive and Object-Oriented Databases, 1993, pp. 204–221.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Greco, S., SaccĂ , D. (2002). Search and Optimization Problems in Datalog. In: Kakas, A.C., Sadri, F. (eds) Computational Logic: Logic Programming and Beyond. Lecture Notes in Computer Science(), vol 2408. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45632-5_3

Download citation

  • DOI: https://doi.org/10.1007/3-540-45632-5_3

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-45632-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics