TY - GEN
T1 - Two-dimensional pattern matching in linear time and small space
AU - Crochemore, Maxime
AU - Gąsieniec, Leszek
AU - Rytter, Wojciech
AU - Plandowski, Wojciech
N1 - Publisher Copyright:
© Springer-Verlag Berlin Heidelberg 1995.
PY - 1995
Y1 - 1995
N2 - We present the first known (alphabet independent) algorithm for two-dimensional pattern matching which works in linear time and small space simultaneously. The searching phase of our algorithm works in O(1) space and is followed by pattern preprocessing performed in O(log m) space. Up to now there was not known even any efficient sublinear space algorithm for this problem. The main tools in our algorithm are several 2-dimensional variations of deterministic sampling, originally used in parallel pattern matching: small, frame and wide samples. Another novel idea used in our algorithm is the technique of zooming sequences: the sequences of nonperiodic decreasing parts of the pattern (samples) of similar regular shapes. Their regularity allows to encode the zooming sequences in small memory (logarithmic number of bits) while nonperiodicity allows to make shifts (kill positions as candidates for a match) in a way amortizing the work. The preprocessing phase is recursive, its structure is similar to the linear time algorithm for the selection problem. The stack of the recursion consists of logarithmic number of integers. Our algorithm is rather complicated, but all known alphabet-independent linear time algorithms (even with unrestricted space) for 2d-matching are quite complicated, too.
AB - We present the first known (alphabet independent) algorithm for two-dimensional pattern matching which works in linear time and small space simultaneously. The searching phase of our algorithm works in O(1) space and is followed by pattern preprocessing performed in O(log m) space. Up to now there was not known even any efficient sublinear space algorithm for this problem. The main tools in our algorithm are several 2-dimensional variations of deterministic sampling, originally used in parallel pattern matching: small, frame and wide samples. Another novel idea used in our algorithm is the technique of zooming sequences: the sequences of nonperiodic decreasing parts of the pattern (samples) of similar regular shapes. Their regularity allows to encode the zooming sequences in small memory (logarithmic number of bits) while nonperiodicity allows to make shifts (kill positions as candidates for a match) in a way amortizing the work. The preprocessing phase is recursive, its structure is similar to the linear time algorithm for the selection problem. The stack of the recursion consists of logarithmic number of integers. Our algorithm is rather complicated, but all known alphabet-independent linear time algorithms (even with unrestricted space) for 2d-matching are quite complicated, too.
UR - http://www.scopus.com/inward/record.url?scp=84947719729&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84947719729&partnerID=8YFLogxK
U2 - 10.1007/3-540-59042-0_72
DO - 10.1007/3-540-59042-0_72
M3 - Conference contribution
AN - SCOPUS:84947719729
SN - 3540590420
SN - 9783540590422
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 181
EP - 192
BT - STACS 1995 - 12th Annual Symposium on Theoretical Aspects of Computer Science, Proceedings
A2 - Mayr, Ernst W.
A2 - Puech, Claude
PB - Springer Verlag
T2 - 12th Annual Symposium on Theoretical Aspects of Computer Science, STACS 1995
Y2 - 2 March 1995 through 4 March 1995
ER -