首页 | 本学科首页   官方微博 | 高级检索  
     检索      


Hardness of comparing two run-length encoded strings
Authors:Kuan-Yu Chen  Ping-Hui Hsu  Kun-Mao Chao
Institution:1. Department of Computer Science and Information Engineering, National Taiwan University, Taipei 106, Taiwan;2. Graduate Institute of Biomedical Electronics and Bioinformatics, National Taiwan University, Taipei 106, Taiwan;3. Graduate Institute of Networking and Multimedia, National Taiwan University, Taipei 106, Taiwan
Abstract:In this paper, we consider a commonly used compression scheme called run-length encoding. We provide both lower and upper bounds for the problems of comparing two run-length encoded strings. Specifically, we prove the 3sum-hardness for both the wildcard matching problem and the kk-mismatch problem with run-length compressed inputs. Given two run-length encoded strings of mm and nn runs, such a result implies that it is very unlikely to devise an o(mn)o(mn)-time algorithm for either of them. We then present an inplace algorithm running in O(mnlogm)O(mnlogm) time for their combined problem, i.e. kk-mismatch with wildcards. We further demonstrate that if the aim is to report the positions of all the occurrences, there exists a stronger barrier of Ω(mnlogm)Ω(mnlogm)-time, matching the running time of our algorithm. Moreover, our algorithm can be easily generalized to a two-dimensional setting without impairing the time and space complexity.
Keywords:Compressed pattern matching  Run-length encoding  Sequence comparison
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号