Small-space 2D compressed dictionary matching

  • Authors:
  • Shoshana Neuburger;Dina Sokol

  • Affiliations:
  • Department of Computer Science, The Graduate Center, City University of New York, New York, NY;Department of Computer and Information Science, Brooklyn College of the City University of New York, Brooklyn, NY

  • Venue:
  • CPM'10 Proceedings of the 21st annual conference on Combinatorial pattern matching
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

The dictionary matching problem seeks all locations in a text that match any of the patterns in a dictionary. In the compressed dictionary matching problem, the input is in compressed form. In this paper we introduce the 2-dimensional compressed dictionary matching problem in Lempel-Ziv compressed images, and present an efficient solution for patterns whose rows are all periodic. Given k patterns, each of (uncompressed) size m×m, and a text of (uncompressed) size n×n, all in 2D-LZ compressed form, our algorithm finds all occurrences of the patterns in the text. The algorithm is strongly inplace, i.e., the extra space it uses is proportional to the optimal compression of the dictionary, which is O(km). The preprocessing time of the algorithm is O(km2), linear in the uncompressed dictionary size, and the time for performing the search is linear in the uncompressed text size, independent of the dictionary size. Our algorithm is general in the sense that it can be used for any 2D compression scheme which can be sequentially decompressed in small space.