Finding Maximal 2-Dimensional Palindromes

This paper extends the problem of palindrome searching into a higher dimension, addressing two definitions of 2D palindromes. The first definition implies a square, while the second definition (also known as a centrosymmetric factor), can be any rectangular shape. We describe two algorithms for searching a 2D text for maximal palindromes, one for each type of 2D palindrome. The first algorithm is optimal; it runs in linear time, on par with Manacher's linear time 1D palindrome algorithm. The second algorithm searches a text of size n_1 x n_2 (n_1 >= n_2) in O(n_2) time for each of its n_1 x n_2 positions. Since each position may have up to O(n_2) maximal palindromes centered at that location, the second result is also optimal in terms of the worst-case output size.

[1]  M. Farach Optimal suffix tree construction with large alphabets , 1997, Proceedings 38th Annual Symposium on Foundations of Computer Science.

[2]  Raffaele Giancarlo A Generalization of the Suffix Tree to Square Matrices, with Applications , 1995, SIAM J. Comput..

[3]  Gregory Kucherov,et al.  Searching for Gapped Palindromes , 2008, CPM.

[4]  Laurent Vuillon,et al.  Palindromes and Two-Dimensional Sturmian Sequences , 2001, J. Autom. Lang. Comb..

[5]  Amihood Amir,et al.  Approximate On-line Palindrome Recognition, and Applications , 2014, CPM.

[6]  Shunsuke Inenaga,et al.  Palindrome Pattern Matching , 2011, CPM.

[7]  Radu Horaud,et al.  Shape Palindromes: Analysis of Intrinsic Symmetries in 2D Articulated Shapes , 2011, SSVM.

[8]  Shunsuke Inenaga,et al.  Palindrome pattern matching , 2013, Theor. Comput. Sci..

[9]  Amihood Amir,et al.  Two-Dimensional Dictionary Matching , 1992, Inf. Process. Lett..

[10]  Zvi Galil,et al.  Parallel Detection of all Palindromes in a String , 1995, Theor. Comput. Sci..

[11]  Zvi Galil,et al.  A Linear-Time On-Line Recognition Algorithm for ``Palstar'' , 1978, JACM.

[12]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[13]  Yo-Sub Han,et al.  Online Multiple Palindrome Pattern Matching , 2014, SPIRE.

[14]  F.G.B. De Natale,et al.  A symmetry-based approach to facial features extraction , 1997, Proceedings of 13th International Conference on Digital Signal Processing.

[15]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[16]  Kuan-Yu Chen,et al.  Finding All Approximate Gapped Palindromes , 2009, ISAAC.

[17]  Glenn K. Manacher,et al.  A New Linear-Time ``On-Line'' Algorithm for Finding the Smallest Initial Palindrome of a String , 1975, JACM.

[18]  Zvi Galil,et al.  Optimal Parallel Algorithms for Periods, Palindromes and Squares (Extended Abstract) , 1992, ICALP.

[19]  Ayumi Shinohara,et al.  Efficient algorithms to compute compressed longest common substrings and compressed palindromes , 2009, Theor. Comput. Sci..

[20]  Kuan-Yu Chen,et al.  Efficient retrieval of approximate palindromes in a run-length encoded string , 2012, Theor. Comput. Sci..

[21]  Volker Heun,et al.  Space-Efficient Preprocessing Schemes for Range Minimum Queries on Static Arrays , 2011, SIAM J. Comput..

[22]  Nahum Kiryati,et al.  Detecting Symmetry in Grey Level Images: The Global Optimization Approach , 1996, Proceedings of 13th International Conference on Pattern Recognition.