The Complexity of Regular Expressions and Property Paths in SPARQL

被引:33
|
作者
Losemann, Katja [1 ]
Martens, Wim [1 ]
机构
[1] Univ Bayreuth, Inst Informat, D-93440 Bayreuth, Germany
来源
ACM TRANSACTIONS ON DATABASE SYSTEMS | 2013年 / 38卷 / 04期
关键词
Theory; Graph databases; query evaluation; regular expressions; GRAPHS;
D O I
10.1145/2494529
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The World Wide Web Consortium (W3C) recently introduced property paths in SPARQL 1.1, a query language for RDF data. Property paths allow SPARQL queries to evaluate regular expressions over graph-structured data. However, they differ from standard regular expressions in several notable aspects. For example, they have a limited form of negation, they have numerical occurrence indicators as syntactic sugar, and their semantics on graphs is defined in a nonstandard manner. We formalize the W3C semantics of property paths and investigate various query evaluation problems on graphs. More specifically, let x and y be two nodes in an edge-labeled graph and r be an expression. We study the complexities of: (1) deciding whether there exists a path from x to y that matches r and (2) counting how many paths from x to y match r. Our main results show that, compared to an alternative semantics of regular expressions on graphs, the complexity of (1) and (2) under W3C semantics is significantly higher. Whereas the alternative semantics remains in polynomial time for large fragments of expressions, the W3C semantics makes problems (1) and (2) intractable almost immediately. As a side-result, we prove that the membership problem for regular expressions with numerical occurrence indicators and negation is in polynomial time.
引用
收藏
页数:39
相关论文
共 50 条
  • [1] SPARQL with Property Paths
    Kostylev, Egor V.
    Reutter, Juan L.
    Romero, Miguel
    Vrgoc, Domagoj
    SEMANTIC WEB - ISWC 2015, PT I, 2015, 9366 : 3 - 18
  • [2] SPARQL with property paths on the Web
    Hartig, Olaf
    Pirro, Giuseppe
    SEMANTIC WEB, 2017, 8 (06) : 773 - 795
  • [3] Query Planning for Evaluating SPARQL Property Paths
    Yakovets, Nikolay
    Godfrey, Parke
    Gryz, Jarek
    SIGMOD'16: PROCEEDINGS OF THE 2016 INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, 2016, : 1875 - 1889
  • [4] Processing SPARQL queries with regular expressions in RDF databases
    Lee, Jinsoo
    Pham, Minh-Duc
    Lee, Jihwan
    Han, Wook-Shin
    Cho, Hune
    Yu, Hwanjo
    Lee, Jeong-Hoon
    BMC BIOINFORMATICS, 2011, 12
  • [5] Processing SPARQL queries with regular expressions in RDF databases
    Jinsoo Lee
    Minh-Duc Pham
    Jihwan Lee
    Wook-Shin Han
    Hune Cho
    Hwanjo Yu
    Jeong-Hoon Lee
    BMC Bioinformatics, 12
  • [6] COMPLEXITY MEASURES FOR REGULAR EXPRESSIONS
    EHRENFEUCHT, A
    ZEIGER, P
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1976, 12 (02) : 134 - 146
  • [7] The Complexity of Regular(-Like) Expressions
    Holzer, Markus
    Kutrib, Martin
    DEVELOPMENTS IN LANGUAGE THEORY, 2010, 6224 : 16 - 30
  • [8] THE COMPLEXITY OF REGULAR(-LIKE) EXPRESSIONS
    Holzer, Markus
    Kutrib, Martin
    INTERNATIONAL JOURNAL OF FOUNDATIONS OF COMPUTER SCIENCE, 2011, 22 (07) : 1533 - 1548
  • [9] Descriptional Complexity of Deterministic Regular Expressions
    Losemann, Katja
    Martens, Wim
    Niewerth, Matthias
    MATHEMATICAL FOUNDATIONS OF COMPUTER SCIENCE 2012, 2012, 7464 : 643 - 654
  • [10] A Context-Based Semantics for SPARQL Property Paths Over the Web
    Hartig, Olaf
    Pirro, Giuseppe
    SEMANTIC WEB: LATEST ADVANCES AND NEW DOMAINS, ESWC 2015, 2015, 9088 : 71 - 87