Skip to main content
Log in

First-order definable counting-only queries

  • Published:
Annals of Mathematics and Artificial Intelligence Aims and scope Submit manuscript

Abstract

Many data sources can be represented easily by collections of sets of objects. For several practical queries on such collections of sets of objects, the answer does not depend on the precise composition of these sets, but only on the number of sets to which each object belongs. This is the case k= 1 for the more general situation where the query answer only depends on the number of sets to which each collection of at most k objects belongs. We call such queries k-counting-only. Here, we focus on k-SyCALC, i.e., k-counting-only queries that are first-order definable. As k-SyCALC is semantically defined, however, it is not surprising that it is already undecidable whether a first-order query is in 1-SyCALC. Therefore, we introduce SimpleCALC-k, a syntactically defined (strict) fragment of k-SyCALC. It turns out that many practical queries in k-SyCALC can already be expressed in SimpleCALCk. We also define the query language GCountk, which expresses counting-only queries directly by using generalized counting terms, and show that this language is equivalent to SimpleCALC-k. We prove that the k-counting-only queries form a non-collapsing hierarchy: for every k, there exist (k+ 1)-counting-only queries that are not k-counting-only. This result specializes to both SimpleCALCk and k-SyCALC. Finally, we establish a strong dichotomy between 1-SyCALC and SimpleCALCk on the one hand and 2-SyCALC on the other hand by showing that satisfiability, validity, query containment, and query equivalence are decidable for the former two languages, but not for the latter one.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Abiteboul, S., Hull, R., Vianu, V. (eds.): Foundations of Databases: The Logical Level, 1st edn. Addison-Wesley Longman Publishing Co. Inc, Reading (1995)

  2. Anderson, I.: Combinatorics of Finite Sets. Dover Publications, New York (2011)

    Google Scholar 

  3. Bachmair, L., Ganzinger, H., Waldmann, U.: Set constraints are the monadic class. In: Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science, pp. 75–83 (1993)

  4. Badia, A., Van Gucht, D., Gyssens, M.: Querying with Generalized Quantifiers, pp 235–258. Springer, Boston (1995)

    Google Scholar 

  5. Bancilhon, F.: On the completeness of query languages for relational data bases. In: Winkowski, J. (ed.) Mathematical Foundations of Computer Science 1978, Proceedings, 7th Symposium, Zakopane, Poland, September 4-8, 1978, Lecture Notes in Computer Science. https://doi.org/10.1007/3-540-08921-7_60, vol. 64, pp 112–123. Springer (1978)

    Chapter  Google Scholar 

  6. Bayer, A.E., Smart, J.C., McLaughlin, G.W.: Mapping intellectual structure of a scientific subfield through author cocitations. J. Amer. Soc. Inf. Sci. 41(6), 444–452 (1990)

    Article  Google Scholar 

  7. Calders, T., Goethals, B.: Non-derivable itemset mining. Data Min. Knowl. Disc. 14(1), 171–206 (2007)

    Article  MathSciNet  Google Scholar 

  8. Fletcher, G.H.L., Van Den Bussche, J., Van Gucht, D., Vansummeren, S.: Towards a theory of search queries. ACM Trans. Database Syst. 35(4), 28:1–28:33 (2010)

    Article  Google Scholar 

  9. Goethals, B.: Survey on Frequent Pattern Mining. Technical report, University of Helsinki (2003)

  10. Grädel, E., Otto, M.: On logics with two variables. Theor. Comput. Sci. 224 (1–2), 73–113 (1999)

    Article  MathSciNet  Google Scholar 

  11. Grohe, M.: Finite variable logics in descriptive complexity theory. Bull. Symb. Log. 4, 345–398 (1998)

    Article  MathSciNet  Google Scholar 

  12. Gyssens, M., Hellings, J., Paredaens, J., Van Gucht, D., Wijsen, J., Wu, Y.: Calculi for symmetric queries. J. Comput. Syst. Sci. 105, 54–86 (2019)

    Article  MathSciNet  Google Scholar 

  13. Gyssens, M., Paredaens, J., Van Gucht, D., Wijsen, J., Wu, Y.: An approach towards the study of symmetric queries. Proc. VLDB Endow. 7(1), 25–36 (2013)

    Article  Google Scholar 

  14. Han, J., Pei, J., Yin, Y., Mao, R.: Mining frequent patterns without candidate generation: a frequent-pattern tree approach. Data Min. Knowl. Disc. 8(1), 53–87 (2004)

    Article  MathSciNet  Google Scholar 

  15. Hellings, J., Gyssens, M., Van Gucht, D., Wu, Y.: First-order definable counting-only queries. In: Foundations of Information and Knowledge Systems, pp. 225–243. Springer International Publishing (2018)

  16. Kuske, D., Schweikardt, N.: First-order logic with counting. In: 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pp. 1–12 (2017)

  17. Lewis, H.R.: Complexity results for classes of quantificational formulas. J. Comput. Syst. Sci. 21(3), 317–353 (1980)

    Article  MathSciNet  Google Scholar 

  18. Libkin, L.: Elements of Finite Model Theory. Springer, Berlin (2004)

    Book  Google Scholar 

  19. Paredaens, J.: On the expressive power of the relational algebra. Inf. Process. Lett. 7(2), 107–111 (1978). https://doi.org/10.1016/0020-0190(78)90055-8

    Article  MathSciNet  Google Scholar 

  20. Paredaens, J., Van Gucht, D.: Converting nested algebra expressions into flat algebra expressions. ACM Trans. Database Syst. 17(1), 65–93 (1992). https://doi.org/10.1145/128765.128768

    Article  MathSciNet  Google Scholar 

  21. Peters, S., Westerståhl, D.: Quantifiers in Language and Logic. Oxford University Press, London (2008). https://doi.org/10.1093/acprof:oso/9780199291267.001.0001

    Book  Google Scholar 

  22. Quine, W.V.: Selected Logic Papers. Harvard University Press, Cambridge (1995)

    Google Scholar 

  23. Sayrafi, B., Van Gucht, D.: Differential constraints. In: Proceedings of the Twenty-fourth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 348–357. ACM (2005)

  24. Sayrafi, B., Van Gucht, D., Gyssens, M.: Measures in Databases and Data Mining. Tech. Rep. TR602, Indiana University. https://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR602 (2004)

  25. Thomas, S.J., Fischer, P.C.: Nested relational structures. Adv. Comput. Res. 3, 269–307 (1986)

    Google Scholar 

  26. Väänänen, J.: Generalized Quantifiers, an Introduction. In: Generalized Quantifiers and Computation: 9th European Summer School in Logic, Language, and Information, pp. 1–17. Springer, Berlin (1999)

    Google Scholar 

  27. Vianu, V., Van Gucht, D.: Computationally complete relational query languages. In: Liu, L., Özsu, M.T. (eds.) Encyclopedia of Database Systems. 1st edn., pp 1–7. Springer, New York (2017)

    Google Scholar 

  28. Westerståhl, D.: Generalized quantifiers. In: Zalta, E. N. (ed.) The Stanford Encyclopedia of Philosophy, winter 2016 edn. Metaphysics Research Lab, Stanford University (2016)

Download references

Acknowledgments

This is a revised and extended version of the conference paper ‘First-order definable counting-only queries’, presented at the 10th International Symposium on Foundations of Information and Knowledge Systems, Budapest, Hungary (FoIKS 2018) [15].

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marc Gyssens.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This material is based on work supported by the National Science Foundation under Grant No. NSF 1438990.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hellings, J., Gyssens, M., Van Gucht, D. et al. First-order definable counting-only queries. Ann Math Artif Intell 87, 109–136 (2019). https://doi.org/10.1007/s10472-019-09652-8

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10472-019-09652-8

Keywords

Mathematics Subject Classification (2010)

Navigation