Skip to main content
QUICK REVIEW

[Paper Review] The complexity of reverse engineering problems for conjunctive queries

Pablo Barceló, Miguel Romero|arXiv (Cornell University)|Jun 3, 2016
Machine Learning and AlgorithmsComputer Science1 references15 citations
TL;DR

This paper addresses the high complexity of reverse engineering conjunctive queries (CQs) by introducing two relaxations: using existential pebble games to approximate homomorphism tests, reducing complexity to EXPTIME for CQs of treewidth ≤k, and 'desynchronizing' direct products to characterize unions of CQs, reducing complexity to coNP. The combination yields tractable query-by-example for unions of CQs of bounded treewidth.

ABSTRACT

Reverse engineering problems for conjunctive queries (CQs), such as query by example (QBE) or definability, take a set of user examples and convert them into an explanatory CQ. Despite their importance, the complexity of these problems is prohibitively high (coNEXPTIME-complete). We isolate their two main sources of complexity and propose relaxations of them that reduce the complexity while having meaningful theoretical interpretations. The first relaxation is based on the idea of using existential pebble games for approximating homomorphism tests. We show that this characterizes QBE/definability for CQs up to treewidth $k$, while reducing the complexity to EXPTIME. As a side result, we obtain that the complexity of the QBE/definability problems for CQs of treewidth $k$ is EXPTIME-complete for each $k \geq 1$. The second relaxation is based on the idea of "desynchronizing" direct products, which characterizes QBE/definability for unions of CQs and reduces the complexity to coNP. The combination of these two relaxations yields tractability for QBE and characterizes it in terms of unions of CQs of treewidth at most $k$. We also study the complexity of these problems for conjunctive regular path queries over graph databases, showing them to be no more difficult than for CQs.

Motivation & Objective

  • Address the prohibitively high coNEXPTIME complexity of query-by-example (QBE) and definability for conjunctive queries (CQs).
  • Identify and isolate the two main sources of complexity: direct product construction and homomorphism testing.
  • Propose principled relaxations that reduce complexity while preserving theoretical meaning and correctness.
  • Extend results to conjunctive regular path queries (CRPQs) over graph databases, showing similar complexity bounds.

Proposed method

  • Use existential pebble games to approximate homomorphism tests between the direct product of example databases and negative examples.
  • Introduce the k-pebble QBE test, replacing strong homomorphism with k-consistent mappings to reduce complexity.
  • Define a 'desynchronized' version of the direct product to enable coNP-completeness for definability over unions of CQs.
  • Characterize CQ-explanations and definitions using treewidth-bounded queries via the (k+1)-pebble game for CQs and CRPQs.
  • Prove that the k-pebble test correctly captures existence of explanations/definitions for CQs and CRPQs of treewidth at most k.
  • Establish complexity bounds by showing that the k-pebble QBE/definability problems for treewidth-k CQs and CRPQs are in EXPTIME and coNP, respectively.

Experimental results

Research questions

  • RQ1What are the two main sources of complexity in reverse engineering conjunctive queries?
  • RQ2Can the homomorphism test in QBE be approximated using existential pebble games to reduce complexity?
  • RQ3Can the direct product construction be relaxed via 'desynchronization' to achieve lower complexity?
  • RQ4What is the precise complexity of QBE and definability for CQs of bounded treewidth?
  • RQ5Do similar complexity reductions hold for conjunctive regular path queries (CRPQs) over graph databases?

Key findings

  • The complexity of QBE/definability for CQs of treewidth k is EXPTIME-complete for each k ≥ 1.
  • Using the (k+1)-pebble game, the QBE test for CQs of treewidth at most k is in EXPTIME, and the problem is EXPTIME-complete.
  • The 'desynchronized' direct product approach reduces the complexity of QBE/definability for unions of CQs to coNP.
  • For CRPQs, the k-pebble QBE test characterizes explanations and definitions of treewidth at most k, with complexity bounded by EXPTIME.
  • The evaluation of a treewidth-k CQ-explanation over a database can be computed in exponential time.
  • The results extend to CRPQs, showing that their QBE and definability problems are no more complex than for CQs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.