Abstract
Evaluating conjunctive queries (CQs) is NP-hard in general; however, acyclic CQs or nearest acyclic CQs can be evaluated in polynomial time. Many structural methods for characterising such classes are proposed in the literature. However, exploiting these methods to answer CQs is not efficient in practice when the relations have a realistic size. In this work, we propose a new method called HSJ-Solver for evaluating CQs and for solving constraint satisfaction problems (CSPs) represented by a generalised hypertree decomposition (GHD). Experiments carried out on CSP benchmarks show that using HSJ-Solver significantly improves the achieved performance.
Similar content being viewed by others
References
Phokion G, Moshe Y (2000) Conjunctive-Query containment and constraint satisfaction. J Comput Syst Sci 61:302–332
Robertson N, Seymour P D (1986) Graph minors.ii. algorithmic aspects of treewidth. J Algorithms 7:309–322
Gyssens M, Jeavons P, Cohen D A (1994) Decomposing constraint satisfaction problems using database techniques. Artif Intell 66:57–89
Gottlob G, Leone N, Scarcello F (2000) A comparison of structural CSP decomposition methods. Artif Intell 124:243–282
Cohen DA, Jeavons P, Gyssens M (2005) A unified theory of structural tractability for constraint satisfaction and spread cut decomposition. In: Proceedings of the 19th international joint conference on artificial intelligence, pp 72-77
Adler I, Gottlob G, Grohe M (2005) Hypertree width and related hypergraph invariants. In: The 3rd European conference on combinatorics, graph theory and applications (EuroComb 05), pp 5–10
Grohe M, Marx D (2006) Constraint solving via fractional edge covers. In: Proceedings of SODA 2006, pp 289-298
Habbas Z, Amroun K, Singer D (2016) Generalized Hypertree Decomposition for solving non binary CSP with compressed table constraints. RAIRO J 50:241–267
Amroun K, Habbas Z, Aggoune-Mtalaa W (2016) A compressed generalized hypertree decomposition-based solving technique for non binary constraint satisfaction problems. AI Communications J 29(2):371–392
Abiteboul S, Hull R, Vianu V (1995) FoundationsofDatabases. Addison-Wesley Reading
Ullman J D (1989) Principles of Database and Knowledge Base Systems, Computer Science Press. 1 edition
Yannakakis M (1981) Algorithms for Acyclic Database Schemes. In: Proceedings of Very Large Data Bases’81. pp 82-92
Fagin R (1983) Degrees of acyclicity for hypergraphs and relational database schemes. J ACM. 30:514–550
Beeri C, Fagin R, Maier D, Yannakakis M (1983) On the desirability of Acyclic database schemes. J ACM 30:479–513
Montanari U (1974) Networks of constraints: Fundamental properties and applications to pictures processing. Inform Sci 7:95–132
Maier D (1986) The theory of relational databases rochville. Md. Computer Science Press
Marc H G (1979) On the universal relation. Technical report, University of Toronto
Bernstein PA, Goodman N (1981) The power of natural semijoins. SIAM J Comput 10 (4):751–771
Gottlob G, Grohe M, Musliu N, Samer M, Scarcello F (2005) Hypertree decomposition: structure, algorithms and applications. In: Conference: Proceedings of the 31st international conference on Graph-Theoretic Concepts in Computer Science. pp 1-15
Gottlob G, Leone N, Scarcello F (1999) On tractable queries and constraints. In: Proceedings of the 10th international conference on database and expert systems applications. pp 1–15
Gottlob G, Samer M (2009) A Backtracking-Based Algorithm for hypertree decomposition. ACM Journal of Experimental Algorithmics (JEA), 13
Dermaku A, Ganzow T, Gottlob G, McMahan B, Musliu N, Samer M (2008) Heuristic Methods for hypertree decompositions. In: Proceeding of the 7th Mexican International Conference on Artificial Intelligence: Advances in Artificial Intelligence. pp 1-11
Noll LC, Fowler G, Vo P, Hash FNV http://www.isthe.com/chongo/tech/comp/fnv/index.html Accessed on august 21, 19
Lecoutre C, Likitvivatanavong C, Roland H C (2015) STR3: A path-optimal filtering algorithm for table constraints. Artif Intell 220:1–27
Demeulenaere J, Hartert R, Lecoutre C, Perez G, Perron L, Régin JC, Schaus P (2016) Compact-table: efficiently filtering table constraints with reversible sparse bit-sets. In: Poceedings of the 22th international conference on principles and practice of constraint programming. pp 207-223
IMDB (2022) http://imdb.com Accessed on July 22, 2022
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Younsi, Z., Amroun, K., Bouarab-Dahmani, F. et al. HSJ-Solver: a new method based on GHD for answering conjunctive queries and solving constraint satisfaction problems. Appl Intell 53, 17226–17239 (2023). https://doi.org/10.1007/s10489-022-04361-y
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10489-022-04361-y