Random Access to Grammar-Compressed Strings

被引:0
|
作者
Bille, Philip [1 ]
Landau, Gad M. [2 ,3 ,4 ,5 ,6 ,7 ]
Raman, Rajeev [8 ]
Sadakane, Kunihiko [9 ]
Satti, Srinivasa Rao [10 ]
Weimann, Oren [11 ]
机构
[1] Tech Univ Denmark, DTU Informat, Lyngby, Denmark
[2] Univ Haifa, Dept Comp Sci, Haifa, Israel
[3] NYU Poly, Dept Comp Sci & Engn, Brooklyn, NY 11201 USA
[4] Natl Sci Fdn, Arlington, VA 22230 USA
[5] Israel Sci Fdn, Jerusalem, Israel
[6] Israel Korea Scientif Res Cooperat, Seongnam 13558, South Korea
[7] US Israel Binatl Sci Fdn, Jerusalem, Israel
[8] Univ Leicester, Dept Comp Sci, Leicester LE1 7RH, Leics, England
[9] Natl Inst Informat, Tokyo, Japan
[10] Seoul Natl Univ, Sch Comp Sci & Engn, Seoul 151, South Korea
[11] Weizmann Inst Sci, Dept Comp Sci & Appl Math, IL-76100 Rehovot, Israel
基金
美国国家科学基金会; 以色列科学基金会;
关键词
ALGORITHMS;
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Let S be a string of length N compressed into a context-free grammar S of size n. We present two representations of S achieving O(log N) random access time, and either O(n . alpha(k)(n)) construction time and space on the pointer machine model, or O(n) construction time and space on the RAM. Here, alpha(k)(n) is the inverse of the k(th) row of Ackermann's function. Our representations also efficiently support decompression of any substring in S: we can decompress any substring of length m in the same complexity as a single random access query and additional O(m) time. Combining these results with fast algorithms for uncompressed approximate string matching leads to several efficient algorithms for approximate string matching on grammar-compressed strings without decompression. For instance, we can find all approximate occurrences of a pattern P with at most k errors in time O(n(min{|P|k, k(4) + |P|} + log N) + occ), where occ is the number of occurrences of P in S. Finally, we are able to generalize our results to navigation and other operations on grammar-compressed trees. All of the above bounds significantly improve the currently best known results. To achieve these bounds, we introduce several new techniques and data structures of independent interest, including a predecessor data structure, two "biased" weighted ancestor data structures, and a compact representation of heavy-paths in grammars.
引用
收藏
页码:373 / 389
页数:17
相关论文
共 50 条
  • [1] RANDOM ACCESS TO GRAMMAR-COMPRESSED STRINGS AND TREES
    Bille, Philip
    Landau, Gad M.
    Raman, Rajeev
    Sadakane, Kunihiko
    Satti, Srinivasa Rao
    Weimann, Oren
    SIAM JOURNAL ON COMPUTING, 2015, 44 (03) : 513 - 539
  • [2] Data Structure Lower Bounds on Random Access to Grammar-Compressed Strings
    Verbin, Elad
    Yu, Wei
    COMBINATORIAL PATTERN MATCHING, 2013, 7922 : 247 - 258
  • [3] Access, Rank, and Select in Grammar-compressed Strings
    Belazzougui, Djamal
    Cording, Patrick Hagge
    Puglisi, Simon J.
    Tabei, Yasuo
    ALGORITHMS - ESA 2015, 2015, 9294 : 142 - 154
  • [4] Bookmarks in Grammar-Compressed Strings
    Cording, Patrick Hagge
    Gawrychowski, Pawel
    Weimann, Oren
    STRING PROCESSING AND INFORMATION RETRIEVAL, SPIRE 2016, 2016, 9954 : 153 - 159
  • [5] Algorithms on Grammar-Compressed Strings
    Landau, Gad M.
    COMBINATORIAL PATTERN MATCHING, 22ND ANNUAL SYMPOSIUM, CPM 2011, 2011, 6661 : 1 - 1
  • [6] Finger Search in Grammar-Compressed Strings
    Bille, Philip
    Christiansen, Anders Roy
    Cording, Patrick Hagge
    Li Gortz, Inge
    THEORY OF COMPUTING SYSTEMS, 2018, 62 (08) : 1715 - 1735
  • [7] Detecting regularities on grammar-compressed strings
    Tomohiro, I
    Matsubara, Wataru
    Shimohira, Kouji
    Inenaga, Shunsuke
    Bannai, Hideo
    Takeda, Masayuki
    Narisawa, Kazuyuki
    Shinohara, Ayumi
    INFORMATION AND COMPUTATION, 2015, 240 : 74 - 89
  • [8] Detecting Regularities on Grammar-Compressed Strings
    Tomohiro, I
    Matsubara, Wataru
    Shimohira, Kouji
    Inenaga, Shunsuke
    Bannai, Hideo
    Takeda, Masayuki
    Narisawa, Kazuyuki
    Shinohara, Ayumi
    MATHEMATICAL FOUNDATIONS OF COMPUTER SCIENCE 2013, 2013, 8087 : 571 - 582
  • [9] Finger Search in Grammar-Compressed Strings
    Philip Bille
    Anders Roy Christiansen
    Patrick Hagge Cording
    Inge Li Gørtz
    Theory of Computing Systems, 2018, 62 : 1715 - 1735
  • [10] Pattern Matching on Grammar-Compressed Strings in Linear Time
    Ganardi, Moses
    Gawrychowskit, Pawel
    PROCEEDINGS OF THE 2022 ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, SODA, 2022, : 2833 - 2846