Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2463664.2467795acmconferencesArticle/Chapter ViewAbstractPublication PagespodsConference Proceedingsconference-collections
research-article

A trichotomy for regular simple path queries on graphs

Published: 22 June 2013 Publication History

Abstract

Regular path queries (RPQs) select vertices connected by some path in a graph. The edge labels of such a path have to form a word that matches a given regular expression. We investigate the evaluation of RPQs with an additional constraint that prevents multiple traversals of the same vertices. Those regular simple path queries (RSPQs) quickly become intractable, even for basic languages such as (aa)* or a*ba*.
In this paper, we establish a comprehensive classification of regular languages with respect to the complexity of the corresponding regular simple path query problem. More precisely, we identify for which languages RSPQs can be evaluated in polynomial time, and show that evaluation is NP-complete for languages outside this fragment. We thus fully characterize the frontier between tractability and intractability for RSPQs, and we refine our results to show the following trichotomy: evaluation of RSPQs is either AC0, NL-complete or NP-complete in data complexity, depending on the language L. The fragment identified also admits a simple characterization in terms of regular expressions.
Finally, we also discuss the complexity of deciding whether a language L belongs to the fragment above. We consider several alternative representations of L: DFAs, NFAs or regular expressions, and prove that this problem is NL-complete for the first representation and PSPACE-complete for the other two. As a conclusion we extend our results from edge-labeled graphs to vertex-labeled graphs.

References

[1]
S. Abiteboul and V. Vianu. Regular path queries with constraints. J. Comput. Syst. Sci., 58(3):428--452, 1999.
[2]
N. Alon, R. Yuster, and U. Zwick. Color-Coding. J. ACM, 42(4):844--856, 1995.
[3]
M. Arenas, S. Conca, and J. Pérez. Counting beyond a yottabyte, or how sparql 1.1 property paths will prevent adoption of the standard. In WWW, pages 629--638, 2012.
[4]
E. M. Arkin, C. H. Papadimitriou, and M. Yannakakis. Modularity of Cycles and Paths in Graphs. J. ACM, 38(2):255--274, 1991.
[5]
G. Bagan, A. Bonifati, and B. Groz. A trichotomy for regular simple path queries on graphs. CoRR, abs/1212.6857, 2012.
[6]
P. Barceló, L. Libkin, and J. L. Reutter. Querying graph patterns. In PODS, pages 199--210. ACM, 2011.
[7]
C. L. Barrett, R. Jacob, and M. V. Marathe. Formal-language-constrained path problems. SIAM Journal on Computing, 30(3):809--837, 2000.
[8]
D. Berwanger, A. Dawar, P. Hunter, S. Kreutzer, and J. Obdrzálek. The dag-width of directed graphs. J. Comb. Theory, Ser. B, 102(4):900--923, 2012.
[9]
D. Calvanese, G. D. Giacomo, M. Lenzerini, and M. Y. Vardi. Answering regular path queries using views. In ICDE, pages 389--398, 2000.
[10]
D. Calvanese, G. D. Giacomo, M. Lenzerini, and M. Y. Vardi. Rewriting of regular expressions and regular path queries. J. Comput. Syst. Sci., 64(3):443--465, 2002.
[11]
D. Calvanese, G. D. Giacomo, M. Lenzerini, and M. Y. Vardi. Reasoning on regular path queries. SIGMOD Record, 32(4):83--92, 2003.
[12]
D. Calvanese, G. D. Giacomo, M. Lenzerini, and M. Y. Vardi. An automata-theoretic approach to regular xpath. In DBPL, pages 18--35, 2009.
[13]
B. Courcelle. Graph rewriting: An algebraic and logic approach. In Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics (B), pages 193--242. 1990.
[14]
I. F. Cruz, A. O. Mendelzon, and P. T. Wood. A graphical query language supporting recursion. In SIGMOD Conference, pages 323--330, 1987.
[15]
W. Fan, J. Li, S. Ma, N. Tang, and Y. Wu. Adding regular expressions to graph reachability and pattern queries. In ICDE, pages 39--50. IEEE Computer Society, 2011.
[16]
J. Flum and M. Grohe. Parameterized Complexity Theory (Texts in Theoretical Computer Science. An EATCS Series). 2006.
[17]
M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
[18]
C. Gutierrez, C. A. Hurtado, A. O. Mendelzon, and J. Pérez. Foundations of semantic web databases. J. Comput. Syst. Sci., 77(3):520--541, 2011.
[19]
R. H. Gäting. GraphDB: A Data Model and Query Language for Graphs in Databases. In Proc. 20th Int. Conf. on Very Large Data Bases, pages 297--308, 1994.
[20]
P. Hunter and S. Kreutzer. Digraph measures: Kelly decompositions, games, and orderings. Theor. Comput. Sci., 399(3):206--219, 2008.
[21]
N. Immerman. Nondeterministic space is closed under complementation. SIAM J. Comput., 17(5):935--938, 1988.
[22]
N. Immerman. Descriptive complexity. Springer, 1999.
[23]
R. Jin, H. Hong, H. Wang, N. Ruan, and Y. Xiang. Computing label-constraint reachability in graph databases. In SIGMOD Conference, pages 123--134, 2010.
[24]
T. Johnson, N. Robertson, P. D. Seymour, and R. Thomas. Directed tree-width. J. Comb. Theory, Ser. B, 82(1):138--154, 2001.
[25]
A. Koschmieder and U. Leser. Regular path queries on large graphs. In SSDBM, pages 177--194, 2012.
[26]
A. S. Lapaugh and C. H. Papadimitriou. The even-path problem for graphs and digraphs. Networks}, 14(4):507--513, 1984.
[27]
U. Leser. A query language for biological networks. In ECCB/JBI, page 39, 2005.
[28]
L. Libkin and D. Vrgoc. Regular Path Queries on Graphs with Data. In ICDT 2012, pages 74--85, 2012.
[29]
K. Losemann and W. Martens. The complexity of evaluating path expressions in sparql. In PODS, pages 101--112. ACM, 2012.
[30]
A. O. Mendelzon and P. T. Wood. Finding Regular Simple Paths in Graph Databases. SIAM J. Comput., 24(6):1235--1258, 1995.
[31]
Z. P. Nedev. Finding an Even Simple Path in a Directed Planar Graph. SIAM J. Comput., 29:685--695, 1999.
[32]
Z. P. Nedev and P. T. Wood. A polynomial-time algorithm for finding regular simple paths in outerplanar graphs. J. Algorithms, 35(2):235--259, 2000.
[33]
F. Olken. Graph data management for molecular biology. OMICS, 7(1):75--78, 2003.
[34]
C. H. Papadimitriou. Computational complexity. Addison-Wesley, 1994.
[35]
N. Robertson and P. D. Seymour. Graph Minors .XIII. The Disjoint Paths Problem. J. Comb. Theory, Ser. B, 63(1):65--110, 1995.
[36]
R. Ronen and O. Shmueli. Soql: A language for querying and creating data in social networks. In ICDE, pages 1595--1602, 2009.
[37]
W. L. Ruzzo, J. Simon, and M. Tompa. Space-bounded hierarchies and probabilistic computations. J. Comput. Syst. Sci.}, 28(2):216--230, 1984.
[38]
A. Schrijver. Finding k Disjoint Paths in a Directed Planar Graph. SIAM J. Comput., 23(4):780--788, 1994.
[39]
M. P. Schützenberger. On finite monoids having only trivial subgroups. Information and Control, 8(2):190--194, 1965.
[40]
L. J. Stockmeyer and A. R. Meyer. Word problems requiring exponential time: Preliminary report. In STOC, pages 1--9, 1973.
[41]
C. B. Ward and N. M. Wiegand. Complexity results on labeled shortest path problems from wireless routing metrics. Computer Networks, 54(2):208--217, 2010.

Cited By

View all
  • (2024)Complex-Path: Effective and Efficient Node Ranking with Paths in Billion-Scale Heterogeneous GraphsProceedings of the VLDB Endowment10.14778/3685800.368582017:12(3973-3986)Online publication date: 8-Nov-2024
  • (2024)Efficient Regular Simple Path Queries under Transitive Restricted ExpressionsProceedings of the VLDB Endowment10.14778/3654621.365463617:7(1710-1722)Online publication date: 1-Mar-2024
  • (2024)Path Querying in Graph Databases: A Systematic Mapping StudyIEEE Access10.1109/ACCESS.2024.337197612(33154-33172)Online publication date: 2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PODS '13: Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGAI symposium on Principles of database systems
June 2013
334 pages
ISBN:9781450320665
DOI:10.1145/2463664
  • General Chair:
  • Richard Hull,
  • Program Chair:
  • Wenfei Fan
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 June 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. automata
  2. complexity
  3. graphs
  4. paths
  5. regular languages
  6. regular simple paths

Qualifiers

  • Research-article

Conference

SIGMOD/PODS'13
Sponsor:

Acceptance Rates

PODS '13 Paper Acceptance Rate 24 of 97 submissions, 25%;
Overall Acceptance Rate 642 of 2,707 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)0
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Complex-Path: Effective and Efficient Node Ranking with Paths in Billion-Scale Heterogeneous GraphsProceedings of the VLDB Endowment10.14778/3685800.368582017:12(3973-3986)Online publication date: 8-Nov-2024
  • (2024)Efficient Regular Simple Path Queries under Transitive Restricted ExpressionsProceedings of the VLDB Endowment10.14778/3654621.365463617:7(1710-1722)Online publication date: 1-Mar-2024
  • (2024)Path Querying in Graph Databases: A Systematic Mapping StudyIEEE Access10.1109/ACCESS.2024.337197612(33154-33172)Online publication date: 2024
  • (2024)RPQBench: A Benchmark for Regular Path Queries on Graph DataWeb Information Systems Engineering – WISE 202410.1007/978-981-96-0567-5_25(351-367)Online publication date: 3-Dec-2024
  • (2024)PathFinder: Returning Paths in Graph QueriesThe Semantic Web – ISWC 202410.1007/978-3-031-77850-6_8(135-154)Online publication date: 11-Nov-2024
  • (2023)Representing Paths in Graph Database Pattern MatchingProceedings of the VLDB Endowment10.14778/3587136.358715116:7(1790-1803)Online publication date: 8-May-2023
  • (2023)The Fine-Grained Complexity of CFL ReachabilityProceedings of the ACM on Programming Languages10.1145/35712527:POPL(1713-1739)Online publication date: 11-Jan-2023
  • (2023)A Reachability Index for Recursive Label-Concatenated Graph Queries2023 IEEE 39th International Conference on Data Engineering (ICDE)10.1109/ICDE55515.2023.00013(67-81)Online publication date: Apr-2023
  • (2022)Towards Theory for Real-World DataProceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/3517804.3526066(261-276)Online publication date: 12-Jun-2022
  • (2022)The Complexity of Regular Trail and Simple Path Queries on Undirected GraphsProceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/3517804.3524149(165-174)Online publication date: 12-Jun-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media