Efficient algorithms for the scaled indexing problem

  • Authors:
  • Biing-Feng Wang;Jyh-Jye Lin;Shan-Chyun Ku

  • Affiliations:
  • Department of Computer Science, National Tsing Hua University, Hsinchu, Taiwan 30043, Republic of China;Department Computer Science, National Tsing Hua University, Hsinchu, Taiwan 30043, Republic of China;Department Computer Science, National Tsing Hua University, Hsinchu, Taiwan 30043, Republic of China

  • Venue:
  • Journal of Algorithms
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

A real scaled occurrence of a pattern in a text is a position of the text at which the pattern occurs in some real scale ≥ 1. The real scaled indexing problem is to preprocess a text so that all real scaled occurrences of a pattern in the text can be found efficiently. Let T be a text of length n over a finite alphabet Σ. We show that with O(n3)-time preprocessing on T. using O(n3) storage, all real scaled occurrences of a pattern P in T can be found in O(|P| + Ur) time, where Ur is the number of real scaled occurrences of P in T. The decision version of the real scaled indexing problem is to preprocess a text so that a query of the following form can be answered efficiently: "Does a pattern P have a real scaled occurrence in the text?" We show that with O(n2)-time preprocessing on T, using O(n2) storage, whether a pattern P has a real scaled occurrence in T can be determined in O(|P|) time. The discrete scaled indexing problem is a restricted version of the real scaled indexing problem, in which only discrete scales are considered. For this restricted version, we show that with O(n log n)- time preprocessing on T, using O(n log n) storage, all discrete scaled occurrences of a pattern P in T can be found in O(|P| + Ud) time, where Ud is the number of discrete scaled occurrences of P in T.