Optimal Two-Dimensional Compressed Matching

Amihood Amir, Gary Benson, Martin Farach

Research output: Contribution to journalArticlepeer-review

17 Scopus citations


Recent proliferation of digitized data and the unprecedented growth in the volume of stored and transmitted data motivated the definition of the compressed matching paradigm. This is the problem of efficiently finding a pattern P in a compressed text T without the need to decompress. We present the first optimal two-dimensional compressed matching algorithm. The compression under consideration is the two dimensional run-length compression, used by FAX transmission. We achieve optimal time by proving new properties of two-dimensional periodicity. This enables performing duels in which no witness is required. At the heart of the dueling idea lies the concept that two overlapping occurrences of a pattern in a text can use the content of a predetermined text position or witness in the overlap to eliminate one of them. Finding witnesses is a costly operation in a compressed text, thus the importance of witness-free dueling.

Original languageEnglish (US)
Pages (from-to)354-379
Number of pages26
JournalJournal of Algorithms
Issue number2
StatePublished - Aug 1997

ASJC Scopus subject areas

  • Control and Optimization
  • Computational Mathematics
  • Computational Theory and Mathematics


Dive into the research topics of 'Optimal Two-Dimensional Compressed Matching'. Together they form a unique fingerprint.

Cite this