Optimal pattern matching in LZW compressed strings

  • Authors:
  • Paweł Gawrychowski

  • Affiliations:
  • University of Wrocław, Wroclaw, Poland

  • Venue:
  • Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We consider the following variant of the classical pattern matching problem: given an uncompressed pattern s[1..m] and a compressed representation of a string t[1..N], does s occur in t? When t is compressed using the LZW method, we are able to detect the occurrence in optimal linear time, thus answering a question of Amir, Benson, and Farach [2]. Previous results implied solutions with complexities O(n log m + m) [2], O(n + m1+ε) [14], or (randomized) O(n log N/n + m) [8], where n is the size of the compressed representation of t. Our algorithm is simple and fully deterministic.