{"@context":"https:\/\/schema.org\/","@type":"ScholarlyArticle","@id":"#article16236","name":"Counting the Solutions to a Query (Invited Talk)","abstract":"In this talk, we consider the problem of counting the solutions to a query. Our first motivating scenario is the use of regular expressions to extract paths from a graph database. More specifically, given a graph database D, a regular expression r and a natural number n, consider the problem of counting the number of paths p in D such that p conforms to r and the length of p is n. This problem is known to be hard, namely #P-complete. In this talk, we show that this problem admits a fully polynomial-time randomized approximation scheme (FPRAS). Remarkably, the key idea to prove this result is to show that the fundamental problem #NFA admits an FPRAS, where #NFA is the problem of counting the number of strings of length n accepted by a non-deterministic finite automaton (NFA). While this problem is known to be #P-complete and, more precisely, SpanL-complete, it was open whether this problem admits an FPRAS. In this work, we solve this open problem and obtain as a welcome corollary that every function in SpanL admits an FPRAS.\r\nAs a second motivating scenario, we consider the widely used class of conjunctive queries over relational databases. More specifically, for every class C of conjunctive queries with bounded treewidth, we introduce the first FPRAS for counting the answers to a query in C. In fact, our FPRAS is more general, and also applies to conjunctive queries with bounded hypertree width, as well as unions of such queries. As for the case of graph databases, the key ingredient in our proof is the resolution of a fundamental counting problem from automata theory. Specifically, we show that the problem #TA admits an FPRAS, where #TA is the problem of counting the number of trees of size n accepted by a tree automaton (TA).\r\nThis talk is based on the results presented in [Marcelo Arenas et al., 2021; Marcelo Arenas et al., 2021].","keywords":["Counting","query answering","fully polynomial-time randomized approximation scheme"],"author":{"@type":"Person","name":"Arenas, Marcelo","givenName":"Marcelo","familyName":"Arenas","email":"mailto:marenas@ing.puc.cl","affiliation":"Pontificia Universidad Cat\u00f3lica de Chile, Santiago, Chile","funding":"This work was funded by ANID-Millennium Science Initiative Program-Code ICN17_002, and by Fondecyt grant 1191337."},"position":2,"pageStart":"2:1","pageEnd":"2:1","dateCreated":"2022-03-19","datePublished":"2022-03-19","isAccessibleForFree":true,"license":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode","copyrightHolder":{"@type":"Person","name":"Arenas, Marcelo","givenName":"Marcelo","familyName":"Arenas","email":"mailto:marenas@ing.puc.cl","affiliation":"Pontificia Universidad Cat\u00f3lica de Chile, Santiago, Chile","funding":"This work was funded by ANID-Millennium Science Initiative Program-Code ICN17_002, and by Fondecyt grant 1191337."},"copyrightYear":"2022","accessMode":"textual","accessModeSufficient":"textual","creativeWorkStatus":"Published","inLanguage":"en-US","sameAs":"https:\/\/doi.org\/10.4230\/LIPIcs.ICDT.2022.2","publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","isPartOf":{"@type":"PublicationVolume","@id":"#volume6423","volumeNumber":220,"name":"25th International Conference on Database Theory (ICDT 2022)","dateCreated":"2022-03-19","datePublished":"2022-03-19","editor":[{"@type":"Person","name":"Olteanu, Dan","givenName":"Dan","familyName":"Olteanu","email":"mailto:dan.olteanu@uzh.ch","affiliation":"University of Zurich, Switzerland"},{"@type":"Person","name":"Vortmeier, Nils","givenName":"Nils","familyName":"Vortmeier","email":"mailto:nils.vortmeier@uzh.ch","affiliation":"University of Zurich, Switzerland"}],"isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#article16236","isPartOf":{"@type":"Periodical","@id":"#series116","name":"Leibniz International Proceedings in Informatics","issn":"1868-8969","isAccessibleForFree":true,"publisher":"Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik","hasPart":"#volume6423"}}}