Solving String Problems on Graphs Using the Labeled Direct Product

被引:4
作者
Rizzo, Nicola [1 ]
Tomescu, Alexandru, I [1 ]
Policriti, Alberto [2 ]
机构
[1] Univ Helsinki, Dept Comp Sci, Helsinki, Finland
[2] Univ Udine, Dept Math Comp Sci & Phys, Udine, Italy
基金
芬兰科学院; 欧洲研究理事会;
关键词
Longest repeated substring; Longest common substring; String algorithm; Graph algorithm; Motif discovery; Fine-grained complexity; SUFFIX TREE; FINITE AUTOMATA; AMBIGUITY; COMPLEXITY;
D O I
10.1007/s00453-022-00989-x
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Suffix trees are an important data structure at the core of optimal solutions to many fundamental string problems, such as exact pattern matching, longest common substring, matching statistics, and longest repeated substring. Recent lines of research focused on extending some of these problems to vertex-labeled graphs, either by using efficient ad-hoc approaches which do not generalize to all input graphs, or by indexing difficult graphs and having worst-case exponential complexities. In the absence of an ubiquitous and polynomial tool like the suffix tree for labeled graphs, we introduce the labeled direct product of two graphs as a general tool for obtaining optimal algorithms in the worst case: we obtain conceptually simpler algorithms for the quadratic problems of string matching (SMLG) and longest common substring (LCSP) in labeled graphs. Our algorithms run in time linear in the size of the labeled product graph, which may be smaller than quadratic for some inputs, and their run-time is predictable, because the size of the labeled direct product graph can be precomputed efficiently. We also solve LCSP on graphs containing cycles, which was left as an open problem by Shimohira et al. in 2011. To show the power of the labeled product graph, we also apply it to solve the matching statistics (MSP) and the longest repeated string (LRSP) problems in labeled graphs. Moreover, we show that our (worst-case quadratic) algorithms are also optimal, conditioned on the Orthogonal Vectors Hypothesis. Finally, we complete the complexity picture around LRSP by studying it on undirected graphs.
引用
收藏
页码:3008 / 3033
页数:26
相关论文
共 42 条
  • [1] Akutsu T., 1993, Combinatorial Pattern Matching. 4th Annual Symposium, CPM 93 Proceedings, P1, DOI 10.1007/BFb0029792
  • [2] Wheeler languages
    Alanko, Jarno
    D'Agostino, Giovanna
    Policriti, Alberto
    Prezza, Nicola
    [J]. INFORMATION AND COMPUTATION, 2021, 281
  • [3] GENERAL ALGORITHMS FOR TESTING THE AMBIGUITY OF FINITE AUTOMATA AND THE DOUBLE-TAPE AMBIGUITY OF FINITE-STATE TRANSDUCERS
    Allauzen, Cyril
    Mohri, Mehryar
    Rastogi, Ashish
    [J]. INTERNATIONAL JOURNAL OF FOUNDATIONS OF COMPUTER SCIENCE, 2011, 22 (04) : 883 - 904
  • [4] Pattern matching in hypertext
    Amir, A
    Lewenstein, M
    Lewenstein, N
    [J]. JOURNAL OF ALGORITHMS-COGNITION INFORMATICS AND LOGIC, 2000, 35 (01): : 82 - 99
  • [5] [Anonymous], 2007, Pattern Discovery in Bioinformatics: Theory and Algorithms
  • [6] Which Regular Expression Patterns are Hard to Match?
    Backurs, Arturs
    Indyk, Piotr
    [J]. 2016 IEEE 57TH ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE (FOCS), 2016, : 457 - 466
  • [7] AMBIGUITY IN GRAPHS AND EXPRESSIONS
    BOOK, R
    EVEN, S
    GREIBACH, S
    OTT, G
    [J]. IEEE TRANSACTIONS ON COMPUTERS, 1971, C 20 (02) : 149 - +
  • [8] Bowe Alexander, 2012, Algorithms in Bioinformatics. Proceedings of the12th International Workshop, WABI 2012, P225, DOI 10.1007/978-3-642-33122-0_18
  • [9] The suffix tree of a tree and minimizing sequential transducers
    Breslauer, D
    [J]. THEORETICAL COMPUTER SCIENCE, 1998, 191 (1-2) : 131 - 144
  • [10] Burrows M., 1994, 124 DIG SYST RES CTR