Diego Figueira ; Rémi Morvan - Semantic Tree-Width and Path-Width of Conjunctive Regular Path Queries

lmcs:12567 - Logical Methods in Computer Science, March 5, 2025, Volume 21, Issue 1 - https://doi.org/10.46298/lmcs-21(1:21)2025
Semantic Tree-Width and Path-Width of Conjunctive Regular Path QueriesArticle

Authors: Diego Figueira ; Rémi Morvan

We show that the problem of whether a query is equivalent to a query of tree-width $k$ is decidable, for the class of Unions of Conjunctive Regular Path Queries with two-way navigation (UC2RPQs). A previous result by Barceló, Romero, and Vardi [SIAM Journal on Computing, 2016] has shown decidability for the case $k=1$, and here we extend this result showing that decidability in fact holds for any arbitrary $k\geq 1$. The algorithm is in 2ExpSpace, but for the restricted but practically relevant case where all regular expressions of the query are of the form $a^*$ or $(a_1 + \dotsb + a_n)$ we show that the complexity of the problem drops to $\Pi^P_2$.
We also investigate the related problem of approximating a UC2RPQ by queries of small tree-width. We exhibit an algorithm which, for any fixed number $k$, builds the maximal under-approximation of tree-width $k$ of a UC2RPQ. The maximal under-approximation of tree-width $k$ of a query $q$ is a query $q'$ of tree-width $k$ which is contained in $q$ in a maximal and unique way, that is, such that for every query $q''$ of tree-width $k$, if $q''$ is contained in $q$ then $q''$ is also contained in $q'$.
Our approach is shown to be robust, in the sense that it allows also to test equivalence with queries of a given path-width, it also covers the previously known result for $k=1$, and it allows to test for equivalence of whether a (one-way) UCRPQ is equivalent to a UCRPQ of a given tree-width (or path-width).


Volume: Volume 21, Issue 1
Secondary volumes: Selected Papers of the 26th International Conference on Database Theory (ICDT 2023)
Published on: March 5, 2025
Accepted on: January 7, 2025
Submitted on: November 17, 2023
Keywords: Computer Science - Logic in Computer Science, Computer Science - Databases, Computer Science - Formal Languages and Automata Theory
Funding:
    Source : OpenAIRE Graph
  • Efficient querying of incomplete and inconsistent data; Funder: French National Research Agency (ANR); Code: ANR-18-CE40-0031

1 Document citing this article

Consultation statistics

This page has been seen 1435 times.
This article's PDF has been downloaded 573 times.