首页> 外文期刊>Theory of computing systems >Finger Search in Grammar-Compressed Strings
【24h】

Finger Search in Grammar-Compressed Strings

机译:语法压缩字符串中的手指搜索

获取原文
获取原文并翻译 | 示例

摘要

Grammar-based compression, where one replaces a long string by a small context-free grammar that generates the string, is a simple and powerful paradigm that captures many popular compression schemes. Given a grammar, the random access problem is to compactly represent the grammar while supporting random access, that is, given a position in the original uncompressed string report the character at that position. In this paper we study the random access problem with the finger search property, that is, the time for a random access query should depend on the distance between a specified index f, called the finger, and the query index i. We consider both a static variant, where we first place a finger and subsequently access indices near the finger efficiently, and a dynamic variant where also moving the finger such that the time depends on the distance moved is supported. Let n be the size the grammar, and let N be the size of the string. For the static variant we give a linear space representation that supports placing the finger in O(log N) time and subsequently accessing in O(log D) time, where D is the distance between the finger and the accessed index. For the dynamic variant we give a linear space representation that supports placing the finger in O(log N) time and accessing and moving the finger in O(log D + log log N) time. Compared to the best linear space solution to random access, we improve a O(log N) query bound to O(log D) for the static variant and to O(log D + log log N) for the dynamic variant, while maintaining linear space. As an application of our results we obtain an improved solution to the longest common extension problem in grammar compressed strings. To obtain our results, we introduce several new techniques of independent interest, including a novel van Emde Boas style decomposition of grammars.
机译:基于语法的压缩是一种简单而强大的范例,它捕获了许多流行的压缩方案,其中一种替换方式是用生成上下文的无上下文小语法来替换长字符串。给定一种语法,随机访问问题是在支持随机访问的同时紧凑地表示该语法,也就是说,给定原始未压缩字符串中的某个位置,请报告该位置的字符。在本文中,我们研究了具有手指搜索属性的随机访问问题,即随机访问查询的时间应取决于指定索引f(称为手指)与查询索引i之间的距离。我们考虑了静态变量(动态变量)和动态变量(动态变量,在该变量中首先放置手指,然后有效地访问该手指附近),在动态变量中还移动了手指,使得时间取决于所移动的距离。令n为语法大小,令N为字符串大小。对于静态变量,我们给出一个线性空间表示形式,该表示形式支持将手指放在O(log N)时间中,随后以O(log D)时间进行访问,其中D是手指与所访问的索引之间的距离。对于动态变量,我们给出了一个线性空间表示形式,该表示形式支持将手指放在O(log N)时间,并在O(log D + log log N)时间访问和移动手指。与随机访问的最佳线性空间解决方案相比,我们改进了对静态变量O(log D)和动态变量O(log D + log log N)的O(log N)查询,同时保持了线性空间。作为结果的应用,我们获得了针对语法压缩字符串中最长的公共扩展问题的改进解决方案。为了获得我们的结果,我们介绍了几种具有独立利益的新技术,包括新颖的van Emde Boas风格的语法分解。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号