Elsevier

Journal of Algorithms

Volume 49, Issue 2, November 2003, Pages 240-261
Journal of Algorithms

Inplace 2D matching in compressed images

https://doi.org/10.1016/S0196-6774(03)00088-9Get rights and content

Abstract

The compressed matching problem is the problem of finding all occurrences of a pattern in a compressed text. In this paper we discuss the 2-dimensional compressed matching problem in Lempel–Ziv compressed images. Given a pattern P of (uncompressed) size m×m, and a text T of (uncompressed) size n×n, both in 2D-LZ compressed form, our algorithm finds all occurrences of P in T. The algorithm is strongly inplace, that is, the amount of extra space used is proportional to the best possible compression of a pattern of size m2. The best compression that the 2D-LZ technique can obtain for a file of size m2 is O(m). The time for performing the search is O(n2) and the preprocessing time is O(m3). Our algorithm is general in the sense that it can be used for any 2D compression which can be sequentially decompressed in small space.

References (24)

  • A. Amir et al.

    Efficient two dimensional compressed matching

  • A. Amir et al.

    Two-dimensional periodicity and its application

    SIAM J. Comput.

    (1998)
  • A. Amir et al.

    An alphabet independent approach to two dimensional pattern matching

    SIAM J. Comput.

    (1994)
  • A. Amir et al.

    Let sleeping files lie: Pattern matching in z-compressed files

    J. Comput. System Sci.

    (1996)
  • A. Amir et al.

    Optimal two-dimensional compressed matching

    J. Algorithms

    (1997)
  • A. Amir et al.

    Inplace run-length 2-dimensional compressed search

    Theoret. Comput. Sci.

    (2003)
  • E. Antebi, Error free compression of Markov pictures, Master's thesis, The Technion—Israel Institute of Technology,...
  • P. Berman et al.

    On the complexity of pattern matching for highly compressed two dimensional texts

  • M. Crochemore et al.

    Two-dimensional pattern matching in linear time and small space

  • M. Farach et al.

    String matching in Lempel–Ziv compressed strings

  • Z. Galil et al.

    Alphabet-independent two-dimensional witness computation

    SIAM J. Comput.

    (1996)
  • L. Gasieniec et al.

    Randomized efficient algorithms for compressed strings: The finger-print approach

  • Cited by (0)

    1

    Partially supported by NSF grant CCR-01-04494 and ISF grant 282/01. Part of this work was done when the author was at AT&T Labs-Research, Shannon Laboratory.

    2

    Partially supported by NSF grant CCR-0104307, by NATO Science Programme grant PST.CLG.977017, by the Israel Science Foundation grant 282/01, by the FIRST Foundation of the Israel Academy of Science and Humanities, and by IBM Faculty Partnership Award.

    3

    Partially supported by an Israel Ministry of Industry and Commerce Magnet grant (KITE) and an AT&T travel grant.

    View full text