Backend
Complexity of conjunctive regular path query homomorphisms
arXiv cs.DB0 views
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.
Source:https://arxiv.org/abs/2305.07271PreviousMarkov Chain CLTs: Resolving Open ProblemsNextBuilding an MBTI Cognitive Functions Test in JavaScript: Data Model and Scoring
Related posts
Planning a Corporate Website: Structure, Features, and Content
0dev.to UX

Deploy Supabase Migrations by Merging a Pull Request
0dev.to GitHub
I scraped 1,385 rhinoplasty deals from Korea's two biggest clinic apps. Here's what a nose job in Seoul actually costs in 2026
0dev.to Data
Rajkot to Delhi Flight Fares, Decoded: What Booking-Window Data Reveals for Budget Travellers
0dev.to Data
2,000 TripAdvisor reviews in 62 seconds for one cent: what one Times Square hotel's guests actually complain about
0dev.to Data
AI Travel Planner: A 12-Scenario Check Before You Trust the Itinerary
0dev.to Productivity