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
来源
PROCEEDINGS OF THE TWENTY-SECOND ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS | 2011年
基金
美国国家科学基金会; 以色列科学基金会;
关键词
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
相关论文
共 61 条
[21]   Approximate string matching: A simpler faster algorithm [J].
Cole, R ;
Hariharan, R .
SIAM JOURNAL ON COMPUTING, 2002, 31 (06) :1761-1782
[22]   A subquadratic sequence alignment algorithm for unrestricted scoring matrices [J].
Crochemore, M ;
Landau, GM ;
Ziv-Ukelson, M .
SIAM JOURNAL ON COMPUTING, 2003, 32 (06) :1654-1673
[23]  
Delpratt O'Neil., 2008, EDBT '08, P49
[24]  
Ellen F., 1999, CONSTANT TIME OPERAT
[25]  
Farach M., 1996, Combinatorial Pattern Matching. 7th Annual Symposium, CPM 96. Proceedings, P130
[26]   Compressing and Indexing Labeled Trees, with Applications [J].
Ferragina, Paolo ;
Luccio, Fabrizio ;
Manzini, Giovanni ;
Muthukrishnan, S. .
JOURNAL OF THE ACM, 2009, 57 (01)
[27]   SURPASSING THE INFORMATION-THEORETIC BOUND WITH FUSION TREES [J].
FREDMAN, ML ;
WILLARD, DE .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1993, 47 (03) :424-436
[28]   TRANS-DICHOTOMOUS ALGORITHMS FOR MINIMUM SPANNING-TREES AND SHORTEST PATHS [J].
FREDMAN, ML ;
WILLARD, DE .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1994, 48 (03) :533-551
[29]  
Gage Philip, 1994, C Users J, DOI DOI 10.5555/177910.177914
[30]  
Gasieniec L, 2005, IEEE DATA COMPR CONF, P458