Efficient retrieval of approximate palindromes in a run-length encoded string

  • Authors:
  • Kuan-Yu Chen;Ping-Hui Hsu;Kun-Mao Chao

  • Affiliations:
  • Department of Computer Science and Information Engineering, National Taiwan University, Taipei 106, Taiwan;Department of Computer Science and Information Engineering, National Taiwan University, Taipei 106, Taiwan;Department of Computer Science and Information Engineering, National Taiwan University, Taipei 106, Taiwan and Graduate Institute of Biomedical Electronics and Bioinformatics, National Taiwan Univ ...

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2012

Quantified Score

Hi-index 5.23

Visualization

Abstract

In this paper, we study the palindrome retrieval problem with the input string compressed into run-length encoded form. Given a run-length encoded string rle(T), we show how to preprocess rle(T) to support subsequent queries of the longest palindrome centered at any specified position and having any specified number of mismatches between its arms. We present two algorithms for the problem, both taking time and space polynomial in the compressed string size. Let n denote the number of runs of rle(T) and let k denote the number of mismatches. The first algorithm, devised for small k, identifies the desired palindrome in O(logn+min{k,n}) time with O(nlogn) preprocessing time, while the second algorithm achieves O(log^2n) query time, independent of k, after O(n^2logn)-time preprocessing.