Advertisement

# Pattern Matching for Separable Permutations

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9954)

## Abstract

Given a permutation $$\pi$$ (called the text) of size n and another permutation $$\sigma$$ (called the pattern) of size k, the NP-complete permutation pattern matching problem asks whether $$\sigma$$ occurs in $$\pi$$ as an order-isomorphic subsequence. In this paper, we focus on separable permutations (those permutations that avoid both 2413 and 3142, or, equivalently, that admit a separating tree). The main contributions presented in this paper are as follows.

• We simplify the algorithm of Ibarra (Finding pattern matchings for permutations, Information Processing Letters 61 (1997), no. 6) to detect an occurrence of a separable permutation in a permutation and show how to reduce the space complexity from $$O(n^3 k)$$ to $$O(n^3 \log k)$$.

• In case both the text and the pattern are separable permutations, we give a more practicable $$O(n^2 k)$$ time and O(nk) space algorithm. Furthermore, we show how to use this approach to decide in $$O(n k^3 \ell ^2)$$ time whether a separable permutation of size n is a disjoint union of two given permutations of size k and $$\ell$$.

• Given a permutation of size n and a separable permutation of size k, we propose an $$O(n^ 6k)$$ time and $$O(n^4 \log k)$$ space algorithm to compute the largest common separable permutation that occurs in the two input permutations. This improves upon the existing $$O(n^8)$$ time algorithm by Rossin and Bouvel (The longest common pattern problem for two permutations, Pure Mathematics and Applications 17 (2006)).

• Finally, we give a $$O(n^6 k)$$ time and space algorithm to detect an occurrence of a bivincular separable permutation in a permutation. (Bivincular patterns generalize classical permutations by requiring that positions and values involved in an occurrence may be forced to be adjacent).

## References

1. 1.
Ahal, S., Rabinovich, Y.: On complexity of the subpattern problem. SIAM J. Discrete Math. 22(2), 629–649 (2008)
2. 2.
Albert, M.H., Aldred, R.E.L., Atkinson, M.D., Holton, D.A.: Algorithms for pattern involvement in permutations. In: Eades, P., Takaoka, T. (eds.) ISAAC 2001. LNCS, vol. 2223, pp. 355–366. Springer, Heidelberg (2001)
3. 3.
Avis, D., Newborn, M.: On pop-stacks in series. Utilitas Math. 19, 129–140 (1981)
4. 4.
Bille, P., Gørtz, I.L.: The tree inclusion problem: in linear space and faster. ACM Trans. Algorithms 7(3), 38 (2011)
5. 5.
Bose, P., Buss, J.F., Lubiw, A.: Pattern matching for permutations. Inf. Process. Lett. 65(5), 277–283 (1998)
6. 6.
Bouvel, M., Rossin, D., Vialette, S.: Longest common separable pattern among permutations. In: Ma, B., Zhang, K. (eds.) CPM 2007. LNCS, vol. 4580, pp. 316–327. Springer, Heidelberg (2007)
7. 7.
Brändén, P., Claesson, A.: Mesh patterns and the expansion of permutation statistics as sums of permutation patterns, ArXiv e-prints (2011)Google Scholar
8. 8.
Bruner, M.-L., Lackner, M.: A fast algorithm for permutation pattern matching based on alternating runs. In: Fomin, F.V., Kaski, P. (eds.) SWAT 2012. LNCS, vol. 7357, pp. 261–270. Springer, Heidelberg (2012)
9. 9.
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
10. 10.
Giraudo, S., Vialette, S.: Unshuffling permutations. In: Kranakis, E., et al. (eds.) LATIN 2016. LNCS, vol. 9644, pp. 509–521. Springer, Heidelberg (2016). doi:
11. 11.
Guillemot, S., Marx, D.: Finding small patterns in permutations in linear time. In: Chekuri, C. (ed.) Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), SIAM 2014, Portland, Oregon, USA, pp. 82–101 (2014)Google Scholar
12. 12.
Ibarra, L.: Finding pattern matchings for permutations. Inf. Process. Lett. 61(6), 293–295 (1997)
13. 13.
Kilpeläinen, P., Manilla, H.: Ordered and unordered tree inclusion. SIAM J. Comput. 24(2), 340–356 (1995)
14. 14.
Kitaev, S.: Patterns in Permutations and Words. Springer, Heidelberg (2013)
15. 15.
Rossin, D., Bouvel, M.: The longest common pattern problem for two permutations. Pure Math. Appl. 17, 55–69 (2006)
16. 16.
Vatter, V.: Permutation classes. In: Bóna, M. (ed.) Handbook of Enumerative Combinatorics, pp. 753–818. Chapman and Hall/CRC (2015)Google Scholar

## Copyright information

© Springer International Publishing AG 2016

## Authors and Affiliations

• Both Emerite Neou
• 1
Email author
• Romeo Rizzi
• 2
• Stéphane Vialette
• 1
1. 1.Université Paris-Est, LIGM (UMR 8049), CNRS, UPEM, ESIEE Paris, ENPCMarne-la-ValléeFrance
2. 2.Department of Computer ScienceUniversità degli Studi di VeronaVeronaItaly