# Complexity of conjunctive regular path query homomorphisms

DevFeed: [Complexity of conjunctive regular path query homomorphisms](<https://devfeed.tech/articles/complexity-of-conjunctive-regular-path-query-homomorphisms-115952.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2305.07271>)

Author: Laurent Beaudou, Florent Foucaud, Florent R. Madelaine, Lhouari Nourine, Anantha Padmanabha, Ga\\'etan Richad

Published: 2026-11-04T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>)

Topics: [graph-database](<https://devfeed.tech/topics/graph-database.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>)

Tags: [abstract](<https://devfeed.tech/tags/abstract.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [alphabet](<https://devfeed.tech/tags/alphabet.md>), [also](<https://devfeed.tech/tags/also.md>), [applications](<https://devfeed.tech/tags/applications.md>), [arc](<https://devfeed.tech/tags/arc.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [based](<https://devfeed.tech/tags/based.md>), [can](<https://devfeed.tech/tags/can.md>), [cases](<https://devfeed.tech/tags/cases.md>), [complete](<https://devfeed.tech/tags/complete.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [cs-dm](<https://devfeed.tech/tags/cs-dm.md>), [cs-fl](<https://devfeed.tech/tags/cs-fl.md>), [cs-lo](<https://devfeed.tech/tags/cs-lo.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [extend](<https://devfeed.tech/tags/extend.md>), [f](<https://devfeed.tech/tags/f.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [form](<https://devfeed.tech/tags/form.md>), [query](<https://devfeed.tech/tags/query.md>), [regular](<https://devfeed.tech/tags/regular.md>)

## AI overview

The paper studies whether one regular graph pattern (RGP) has a navigational homomorphism to another, a homomorphism-based form of conjunctive regular path query (CRPQ) containment. With general walks, the problem is solvable in EXPSPACE. Restricting witnesses to simple paths or trails yields PSPACE-completeness. For restricted RGPs over a unary alphabet, the problem is in NP, and the authors identify certain cases that are solvable in polynomial time; the excerpt does not specify which cases.

## Source excerpt

arXiv:2305.07271v2 Announce Type: replace Abstract: 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.