On the Complexity of String Matching for Graphs

被引:8
|
作者
Equi, Massimo [1 ]
Makinen, Veli [1 ]
Tomescu, Alexandru I. [1 ]
Grossi, Roberto [2 ]
机构
[1] Univ Helsinki, Dept Comp Sci, POB 68,Pietari Kalmin Katu 5, Helsinki 00014, Finland
[2] Univ Pisa, Dipartimento Informat, Largo B Pontecorvo 3, I-56127 Pisa, Italy
基金
欧洲研究理事会; 芬兰科学院;
关键词
Exact pattern matching; graph query; graph search; labeled graphs; string matching; string search; Strong Exponential Time Hypothesis; heterogeneous networks; variation graphs; EDIT DISTANCE CANNOT; TIME UNLESS SETH; PATTERN;
D O I
10.1145/3588334
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Exact string matching in labeled graphs is the problem of searching paths of a graph G = (V, E) such that the concatenation of their node labels is equal to a given pattern string P[1..m]. This basic problem can be found at the heart of more complex operations on variation graphs in computational biology, of query operations in graph databases, and of analysis operations in heterogeneous networks. We prove a conditional lower bound stating that, for any constant epsilon > 0, an O(|E|(1-epsilon) m) time, or an O(|E| m(1-epsilon)) time algorithm for exact string matching in graphs, with node labels and pattern drawn from a binary alphabet, cannot be achieved unless the Strong Exponential Time Hypothesis (SETH) is false. This holds even if restricted to undirected graphs with maximum node degree 2-that is, to zig-zag matching in bidirectional strings, or to deterministic directed acyclic graphs whose nodes have maximum sum of indegree and outdegree 3. These restricted cases make the lower bound stricter than what can be directly derived from related bounds on regular expression matching (Backurs and Indyk, FOCS'16). In fact, our bounds are tight in the sense that lowering the degree or the alphabet size yields linear time solvable problems. An interesting corollary is that exact and approximate matching are equally hard (i.e., quadratic time) in graphs under SETH. In comparison, the same problems restricted to strings have linear time vs quadratic time solutions, respectively (approximate pattern matching having also a matching SETH lower bound (Backurs and Indyk, STOC'15)).
引用
收藏
页数:25
相关论文
共 50 条
  • [41] String decompositions of graphs
    Kaneko, A
    Watanabe, M
    ARS COMBINATORIA, 1998, 49 : 225 - 236
  • [42] String matching on the internet
    Brönnimann, H
    Memon, N
    Shanmugasundaram, K
    COMBINATORIAL AND ALGORITHMIC ASPECTS OF NETWORKING, 2005, 3405 : 75 - 89
  • [43] APPROXIMATE STRING MATCHING
    HALL, PAV
    DOWLING, GR
    COMPUTING SURVEYS, 1980, 12 (04) : 381 - 402
  • [44] String Range Matching
    Karkkainen, Juha
    Kempa, Dominik
    Puglisi, Simon J.
    COMBINATORIAL PATTERN MATCHING, CPM 2014, 2014, 8486 : 232 - 241
  • [45] Parallel String Matching
    Pfaffe, Philip
    Tillmann, Martin
    Lutteropp, Sarah
    Scheirle, Bernhard
    Zerr, Kevin
    EURO-PAR 2016: PARALLEL PROCESSING WORKSHOPS, 2017, 10104 : 187 - 198
  • [46] GENERALIZED STRING MATCHING
    ABRAHAMSON, K
    SIAM JOURNAL ON COMPUTING, 1987, 16 (06) : 1039 - 1051
  • [47] STRING MATCHING WITH CONSTRAINTS
    CROCHEMORE, M
    LECTURE NOTES IN COMPUTER SCIENCE, 1988, 324 : 44 - 58
  • [48] On String Matching with Mismatches
    Nicolae, Marius
    Rajasekaran, Sanguthevar
    ALGORITHMS, 2015, 8 (02): : 248 - 270
  • [49] The complexity of string partitioning
    Condon, Anne
    Manuch, Jan
    Thachuk, Chris
    JOURNAL OF DISCRETE ALGORITHMS, 2015, 32 : 24 - 43
  • [50] On the complexity of string folding
    Paterson, M
    Przytycka, T
    DISCRETE APPLIED MATHEMATICS, 1996, 71 (1-3) : 217 - 230