On the complexity of pattern matching for highly compressed Two-Dimensional texts

Piotr Berman, Marek Karpinski, Lawrence L. Larmore, Wojclech Plandowski, Wojciech Rytter

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    12 Citations (Scopus)

    Abstract

    We consider the complexity of problems related to 2-dimensional texts (2d-texts) described succinctly. In a succinct description, larger rectangular sub-texts are defined in terms of smaller parts in a way similar to that of Lempel-Ziv compression for Idimensional texts, or in shortly described strings as in [9], or in hierarchical graphs described by context-free graph grammars. A given 2d-text T with many internal repetitions can have a hierarchical description (denoted Compress(T)) which is up to exponentially smaller and which can be the only part of the input for a patternmatching algorithm which gives information about T. Such a hierarchical description is given in terms of a straight-line program, see [9] or, equivalently, a 2-dimensional grammar. We consider compressed pattern-matching, where the input consists of a 2dpattern P and of a hierarchical description of a 2d-text T1 and fully compressed pattern-matching, where the input consists of hierarchical descriptions of both the pattern P and the text T. For 1-dimensional strings there exist polynomial-time deterministic algorithms for these problems, for similar types of succinct text descriptions [2, 6, 8, 9]. We show that the complexity dramatically increases in a 2-dimensional setting. For example, compressed 2d-matching is NP-complete, fully compressed 2d-matching is ∑2p-complete, and testing a given occurrence of a two dimensional compressed pattern is co-NP-complete. On the other hand, we give efficient algorithms for the related problems of randomized equality testing and testing for a given occurrence of an uncompressed pattern. We also show the surprising fact that the compressed size of a subrectangle of a compressed 2d-text can grow exponentially, unlike the one dimensional case.

    Original languageEnglish (US)
    Title of host publicationCombinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings
    EditorsAlberto Apostolico, Jotun Hein, Alberto Apostolico
    PublisherSpringer Verlag
    Pages40-51
    Number of pages12
    ISBN (Print)9783540632207
    StatePublished - Jan 1 1997
    Event8th Annual Symposium on Combinatorial Pattern Matching, CPM 1997 - Aarhus, Denmark
    Duration: Jun 30 1997Jul 2 1997

    Publication series

    NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    Volume1264
    ISSN (Print)0302-9743
    ISSN (Electronic)1611-3349

    Other

    Other8th Annual Symposium on Combinatorial Pattern Matching, CPM 1997
    CountryDenmark
    CityAarhus
    Period6/30/977/2/97

    Fingerprint

    Pattern matching
    Pattern Matching
    Testing
    Polynomials
    NP-complete problem
    Strings
    Straight-line Programs
    Graph Grammars
    Context-free Grammar
    Text
    Deterministic Algorithm
    Grammar
    Polynomial-time Algorithm
    Equality
    Efficient Algorithms
    Compression
    Internal
    Graph in graph theory

    All Science Journal Classification (ASJC) codes

    • Theoretical Computer Science
    • Computer Science(all)

    Cite this

    Berman, P., Karpinski, M., Larmore, L. L., Plandowski, W., & Rytter, W. (1997). On the complexity of pattern matching for highly compressed Two-Dimensional texts. In A. Apostolico, J. Hein, & A. Apostolico (Eds.), Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings (pp. 40-51). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 1264). Springer Verlag.
    Berman, Piotr ; Karpinski, Marek ; Larmore, Lawrence L. ; Plandowski, Wojclech ; Rytter, Wojciech. / On the complexity of pattern matching for highly compressed Two-Dimensional texts. Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings. editor / Alberto Apostolico ; Jotun Hein ; Alberto Apostolico. Springer Verlag, 1997. pp. 40-51 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).
    @inproceedings{5a6ec463d9ed40d59acd0ffe327892a1,
    title = "On the complexity of pattern matching for highly compressed Two-Dimensional texts",
    abstract = "We consider the complexity of problems related to 2-dimensional texts (2d-texts) described succinctly. In a succinct description, larger rectangular sub-texts are defined in terms of smaller parts in a way similar to that of Lempel-Ziv compression for Idimensional texts, or in shortly described strings as in [9], or in hierarchical graphs described by context-free graph grammars. A given 2d-text T with many internal repetitions can have a hierarchical description (denoted Compress(T)) which is up to exponentially smaller and which can be the only part of the input for a patternmatching algorithm which gives information about T. Such a hierarchical description is given in terms of a straight-line program, see [9] or, equivalently, a 2-dimensional grammar. We consider compressed pattern-matching, where the input consists of a 2dpattern P and of a hierarchical description of a 2d-text T1 and fully compressed pattern-matching, where the input consists of hierarchical descriptions of both the pattern P and the text T. For 1-dimensional strings there exist polynomial-time deterministic algorithms for these problems, for similar types of succinct text descriptions [2, 6, 8, 9]. We show that the complexity dramatically increases in a 2-dimensional setting. For example, compressed 2d-matching is NP-complete, fully compressed 2d-matching is ∑2p-complete, and testing a given occurrence of a two dimensional compressed pattern is co-NP-complete. On the other hand, we give efficient algorithms for the related problems of randomized equality testing and testing for a given occurrence of an uncompressed pattern. We also show the surprising fact that the compressed size of a subrectangle of a compressed 2d-text can grow exponentially, unlike the one dimensional case.",
    author = "Piotr Berman and Marek Karpinski and Larmore, {Lawrence L.} and Wojclech Plandowski and Wojciech Rytter",
    year = "1997",
    month = "1",
    day = "1",
    language = "English (US)",
    isbn = "9783540632207",
    series = "Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)",
    publisher = "Springer Verlag",
    pages = "40--51",
    editor = "Alberto Apostolico and Jotun Hein and Alberto Apostolico",
    booktitle = "Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings",
    address = "Germany",

    }

    Berman, P, Karpinski, M, Larmore, LL, Plandowski, W & Rytter, W 1997, On the complexity of pattern matching for highly compressed Two-Dimensional texts. in A Apostolico, J Hein & A Apostolico (eds), Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 1264, Springer Verlag, pp. 40-51, 8th Annual Symposium on Combinatorial Pattern Matching, CPM 1997, Aarhus, Denmark, 6/30/97.

    On the complexity of pattern matching for highly compressed Two-Dimensional texts. / Berman, Piotr; Karpinski, Marek; Larmore, Lawrence L.; Plandowski, Wojclech; Rytter, Wojciech.

    Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings. ed. / Alberto Apostolico; Jotun Hein; Alberto Apostolico. Springer Verlag, 1997. p. 40-51 (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 1264).

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    TY - GEN

    T1 - On the complexity of pattern matching for highly compressed Two-Dimensional texts

    AU - Berman, Piotr

    AU - Karpinski, Marek

    AU - Larmore, Lawrence L.

    AU - Plandowski, Wojclech

    AU - Rytter, Wojciech

    PY - 1997/1/1

    Y1 - 1997/1/1

    N2 - We consider the complexity of problems related to 2-dimensional texts (2d-texts) described succinctly. In a succinct description, larger rectangular sub-texts are defined in terms of smaller parts in a way similar to that of Lempel-Ziv compression for Idimensional texts, or in shortly described strings as in [9], or in hierarchical graphs described by context-free graph grammars. A given 2d-text T with many internal repetitions can have a hierarchical description (denoted Compress(T)) which is up to exponentially smaller and which can be the only part of the input for a patternmatching algorithm which gives information about T. Such a hierarchical description is given in terms of a straight-line program, see [9] or, equivalently, a 2-dimensional grammar. We consider compressed pattern-matching, where the input consists of a 2dpattern P and of a hierarchical description of a 2d-text T1 and fully compressed pattern-matching, where the input consists of hierarchical descriptions of both the pattern P and the text T. For 1-dimensional strings there exist polynomial-time deterministic algorithms for these problems, for similar types of succinct text descriptions [2, 6, 8, 9]. We show that the complexity dramatically increases in a 2-dimensional setting. For example, compressed 2d-matching is NP-complete, fully compressed 2d-matching is ∑2p-complete, and testing a given occurrence of a two dimensional compressed pattern is co-NP-complete. On the other hand, we give efficient algorithms for the related problems of randomized equality testing and testing for a given occurrence of an uncompressed pattern. We also show the surprising fact that the compressed size of a subrectangle of a compressed 2d-text can grow exponentially, unlike the one dimensional case.

    AB - We consider the complexity of problems related to 2-dimensional texts (2d-texts) described succinctly. In a succinct description, larger rectangular sub-texts are defined in terms of smaller parts in a way similar to that of Lempel-Ziv compression for Idimensional texts, or in shortly described strings as in [9], or in hierarchical graphs described by context-free graph grammars. A given 2d-text T with many internal repetitions can have a hierarchical description (denoted Compress(T)) which is up to exponentially smaller and which can be the only part of the input for a patternmatching algorithm which gives information about T. Such a hierarchical description is given in terms of a straight-line program, see [9] or, equivalently, a 2-dimensional grammar. We consider compressed pattern-matching, where the input consists of a 2dpattern P and of a hierarchical description of a 2d-text T1 and fully compressed pattern-matching, where the input consists of hierarchical descriptions of both the pattern P and the text T. For 1-dimensional strings there exist polynomial-time deterministic algorithms for these problems, for similar types of succinct text descriptions [2, 6, 8, 9]. We show that the complexity dramatically increases in a 2-dimensional setting. For example, compressed 2d-matching is NP-complete, fully compressed 2d-matching is ∑2p-complete, and testing a given occurrence of a two dimensional compressed pattern is co-NP-complete. On the other hand, we give efficient algorithms for the related problems of randomized equality testing and testing for a given occurrence of an uncompressed pattern. We also show the surprising fact that the compressed size of a subrectangle of a compressed 2d-text can grow exponentially, unlike the one dimensional case.

    UR - http://www.scopus.com/inward/record.url?scp=84948995379&partnerID=8YFLogxK

    UR - http://www.scopus.com/inward/citedby.url?scp=84948995379&partnerID=8YFLogxK

    M3 - Conference contribution

    SN - 9783540632207

    T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

    SP - 40

    EP - 51

    BT - Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings

    A2 - Apostolico, Alberto

    A2 - Hein, Jotun

    A2 - Apostolico, Alberto

    PB - Springer Verlag

    ER -

    Berman P, Karpinski M, Larmore LL, Plandowski W, Rytter W. On the complexity of pattern matching for highly compressed Two-Dimensional texts. In Apostolico A, Hein J, Apostolico A, editors, Combinatorial Pattern Matching - 8th Annual Symposium, CPM 1997, Proceedings. Springer Verlag. 1997. p. 40-51. (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)).