Abstract
A graph database is a digraph whose arcs are labelled with symbols from a fixed alphabet. A regular graph pattern (RGP) is a digraph whose edges are labelled with regular expressions over the alphabet. RGPs model navigational queries for graph databases, more precisely, conjunctive regular path queries. A match of a navigational RGP query in the database is witnessed by a special navigational homomorphism of the RGP to the database. We study the complexity of deciding the existence of a homomorphism between two RGPs. Such homomorphisms model a strong type of containment between two navigational RGP queries. We show that this problem can be solved by an EXPTIME algorithm (while general query containment in this context is EXPSPACE-complete). We also study the problem for restricted RGPs over a unary alphabet, that arise from some applications like XPath, and prove that certain interesting cases are polynomial-time solvable.
The authors acknowledge the support received from the Agence Nationale de la Recherche of the French government throught the program “Investissements d’Avenir” (16-IDEX-0001 CAP 20-25), the IFCAM project “Applications of graph homomorphisms” (MA/IFCAM/18/39), and by the ANR project HOSIGRA (ANR-17-CE40-0022).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
There exist more complicated examples where, furthermore, the two non-isomorphic n-cores have the same size.
- 2.
This is not true for all acyclic RGPs: there are trees T such that Hom(T) is NP-hard [6]. Thus, for the corresponding \(\{a\}\)-RGP Q(T), RGPHom(Q(T)) is NP-hard.
References
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading (1974)
Angles, R., et al.: G-CORE: a core for future graph query languages. In: SIGMOD Conference 2018. ACM (2018). https://doi.org/10.1145/3183713.3190654
Baeza, P.B.: Querying graph databases. In: PODS 2013 (2013). https://doi.org/10.1145/2463664.2465216
Barceló, P., Romero, M., Vardi, M.Y.: Semantic acyclicity on graph databases. SIAM J. Comput. 45(4), 1339–1376 (2016). https://doi.org/10.1137/15M1034714
Bulatov, A.A.: A dichotomy theorem for nonuniform CSPs. In: FOCS 2017 (2017). https://doi.org/10.1109/FOCS.2017.37
Bulin, J.: On the complexity of \(H\)-coloring for special oriented trees. Eur. J. Comb. 69, 54–75 (2018). https://doi.org/10.1016/j.ejc.2017.10.001
Calvanese, D., De Giacomo, G., Lenzerini, M., Vardi, M.Y.: Containment of conjunctive regular path queries with inverse. In: KR 2000 (2000)
Czerwinski, W., Martens, W., Niewerth, M., Parys, P.: Optimizing tree patterns for querying graph- and tree-structured data. SIGMOD Rec. 46(1), 15–22 (2017). https://doi.org/10.1145/3093754.3093759
Feder, T., Vardi, M.Y.: The computational structure of monotone monadic SNP and constraint satisfaction: a study through datalog and group theory. SIAM J. Comput. 28(1), 57–104 (1998). https://doi.org/10.1137/S0097539794266766
Florescu, D., Levy, A.Y., Suciu, D.: Query containment for conjunctive queries with regular expressions. In: PODS 1998 (1998). https://doi.org/10.1145/275487.275503
Hell, P., Nesetril, J.: On the complexity of H-coloring. J. Comb. Theory Ser. B 48(1), 92–110 (1990). https://doi.org/10.1016/0095-8956(90)90132-J
Hell, P., Nesetril, J.: The core of a graph. Discrete Math. 109(1–3), 117–126 (1992). https://doi.org/10.1016/0012-365X(92)90282-K
Hunt, H.B., Rosenkrantz, D.J., Szymanski, T.G.: On the equivalence, containment, and covering problems for the regular and context-free languages. J. Comput. Syst. Sci. 12, 222–268 (1976)
Jeavons, P., Cohen, D.A., Cooper, M.C.: Constraints, consistency and closure. Artif. Intell. 101(1–2), 251–265 (1998). https://doi.org/10.1016/S0004-3702(98)00022-8
Kimelfeld, B., Sagiv, Y.: Revisiting redundancy and minimization in an XPath fragment. In: EDBT 2008 (2008). https://doi.org/10.1145/1353343.1353355
Kolaitis, P.G., Vardi, M.Y.: Conjunctive-query containment and constraint satisfaction. J. Comput. Syst. Sci. 61(2), 302–332 (2000). https://doi.org/10.1006/jcss.2000.1713
Mendelzon, A.O., Wood, P.T.: Finding regular simple paths in graph databases. SIAM J. Comput. 24(6), 1235–1258 (1995). https://doi.org/10.1137/S009753979122370X
Miklau, G., Suciu, D.: Containment and equivalence for a fragment of XPath. J. ACM 51(1), 2–45 (2004). https://doi.org/10.1145/962446.962448
Romero, M., Barceló, P., Vardi, M.Y.: The homomorphism problem for regular graph patterns. In: LICS 2017 (2017). https://doi.org/10.1109/LICS.2017.8005106
Sedgewick, R., Wayne, K.: Algorithms, 4th edn. Addison-Wesley, Reading (2011)
Stockmeyer, L.J., Meyer, A.R.: Word problems requiring exponential time: preliminary report. In: STOC 1973 (1973). https://doi.org/10.1145/800125.804029
Zhuk, D.: A proof of CSP dichotomy conjecture. In: FOCS 2017 (2017). https://doi.org/10.1109/FOCS.2017.38
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Beaudou, L., Foucaud, F., Madelaine, F., Nourine, L., Richard, G. (2019). Complexity of Conjunctive Regular Path Query Homomorphisms. In: Manea, F., Martin, B., Paulusma, D., Primiero, G. (eds) Computing with Foresight and Industry. CiE 2019. Lecture Notes in Computer Science(), vol 11558. Springer, Cham. https://doi.org/10.1007/978-3-030-22996-2_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-22996-2_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-22995-5
Online ISBN: 978-3-030-22996-2
eBook Packages: Computer ScienceComputer Science (R0)