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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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.
Abiteboul, S., and Vianu, V., Non-determinism in logic-based languages. Annals of Mathematics and Artificial Intelligence 3, 1991, pp. 151–186.
Abiteboul, S., Hull, R., and Vianu, V., Foundations of Databases. Addison-Wesley, 1994.
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.
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.
Ausiello, G., Crescenzi, P., and Protasi M., Approximate solution of NP optimization problems. Theoretical Computer Science, No. 150, 1995, pp. 1–55.
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.
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.
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.
Garey, M., and Johnson, D. S., Computers and Intractability — A Guide to the Theory of NP-Completeness. W.H. Freeman, New York, USA, 1979.
Gelfond, M., and Lifschitz, V., The Stable Model Semantics for Logic Programming. Proc. 5th Int. Conf. on Logic Programming, 1988, pp. 1070–1080.
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.
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.
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.
Greco, S., and Saccà, D., NP-Optimization Problems in Datalog. Proc. Int. Logic Programming Symp., 1997, pp. 181–195.
Greco, S., and Zaniolo, C., Greedy Algorithms in Datalog. Proc. Int. Joint Conf. and Symp. on Logic Programming, 1998, pp. 294–309.
Johnson, D. S., A Catalog of Complexity Classes. In Handbook of Theoretical Computer Science, Vol. 1, J. van Leewen (ed.), North-Holland, 1990.
Kanellakis, P. C., Elements of Relational Database Theory. In Handbook of Theoretical Computer Science, Vol. 2, J. van Leewen (ed.), North-Holland, 1991.
Kolaitis, P. G., and Thakur, M. N., Logical Definability of NP Optimization Problems. Information and Computation, No. 115, 1994, pp. 321–353.
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.
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.
Lloyd, J., Foundations of Logic Programming. Springer-Verlag, 1987.
Marek, W., and Truszczynski, M., Autoepistemic Logic. Journal of the ACM, Vol. 38, No. 3, 1991, pp. 588–619.
Papadimitriou, C. H., Computational Complexity. Addison-Wesley, Reading, MA, USA, 1994.
Panconesi, A., and Ranjan, D., Quantifiers and Approximation. Theoretical Computer Science, No. 1107, 1992, pp. 145–163.
Papadimitriou, C. H., and Yannakakis, M., Optimization, Approximation, and Complexity Classes. Journal Computer and System Sciences, No. 43, 1991, pp. 425–440.
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.
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.
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.
Selman, A., A taxonomy of complexity classes of functions. Journal of Computer and System Science, No. 48, 1994, pp. 357–381.
A. Selman, Much ado about functions. Proc. of the 11th Conf. on Computational Complexity, IEEE Computer Society Press, 1996, pp. 198–212.
Ullman, J. K., Principles of Data and Knowledge-Base Systems, volume 1 and 2. Computer Science Press, New York, 1988.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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