计算机科学 > 数据库
[提交于 2023年5月12日 (v1),最后修订于 2026年11月2日 (此版本, v2)]
标题:Complexity of conjunctive regular path query homomorphisms
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:A graph database is a digraph whose arcs are labeled with symbols from a fixed alphabet. A regular graph pattern (RGP) is a digraph whose arcs are labeled with regular expressions over the alphabet. RGPs model navigational queries for graph databases called \emph{conjunctive regular path queries} (CRPQs). A match of a CRPQ in the database is witnessed by a special navigational homomorphism of the corresponding RGP to the database, where vertices of the RGP are mapped by a function $f$ to the vertices of the database, and for each arc $uv$ of the RGP, we require the existence of a walk in the database from $f(u)$ to $f(v)$, such that the word corresponding to the sequence of labels of that walk belongs to the regular language labeling the arc $uv$. We extend this definition to one of navigational homomorphisms between two RGPs, modeling a homomorphism-based form of CRPQ containment. We study the complexity of deciding the existence of such a homomorphism between RGPs. We show that this problem, in the case where general walks are considered, can still be solved by an EXPSPACE algorithm (just like general CRPQ Containment, which is known to be EXPSPACE-complete). In the case of simple paths or trails, in fact the navigational homomorphism problem considered here becomes much more tractable, as it is PSPACE-complete. We also study the problem for restricted RGPs over a unary alphabet, that arise from some applications like XPath or SPARQL. For this case, homomorphism-based CRPQ containment is in NP. We prove that certain interesting cases are in fact polynomial-time solvable.
提交历史
来自:Florent Foucaud[v1] 2023年5月12日 星期五 06:19:45 UTC (21 KB)
[v2] 2026年11月2日 星期一 23:01:28 UTC (33 KB)