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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ahal, S., Rabinovich, Y.: On complexity of the subpattern problem. SIAM J. Discrete Math. 22(2), 629–649 (2008)
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)
Avis, D., Newborn, M.: On pop-stacks in series. Utilitas Math. 19, 129–140 (1981)
Bille, P., Gørtz, I.L.: The tree inclusion problem: in linear space and faster. ACM Trans. Algorithms 7(3), 38 (2011)
Bose, P., Buss, J.F., Lubiw, A.: Pattern matching for permutations. Inf. Process. Lett. 65(5), 277–283 (1998)
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)
Brändén, P., Claesson, A.: Mesh patterns and the expansion of permutation statistics as sums of permutation patterns, ArXiv e-prints (2011)
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)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)
Giraudo, S., Vialette, S.: Unshuffling permutations. In: Kranakis, E., et al. (eds.) LATIN 2016. LNCS, vol. 9644, pp. 509–521. Springer, Heidelberg (2016). doi:10.1007/978-3-662-49529-2_38
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)
Ibarra, L.: Finding pattern matchings for permutations. Inf. Process. Lett. 61(6), 293–295 (1997)
Kilpeläinen, P., Manilla, H.: Ordered and unordered tree inclusion. SIAM J. Comput. 24(2), 340–356 (1995)
Kitaev, S.: Patterns in Permutations and Words. Springer, Heidelberg (2013)
Rossin, D., Bouvel, M.: The longest common pattern problem for two permutations. Pure Math. Appl. 17, 55–69 (2006)
Vatter, V.: Permutation classes. In: Bóna, M. (ed.) Handbook of Enumerative Combinatorics, pp. 753–818. Chapman and Hall/CRC (2015)
Acknowledgments
We thank the anonymous reviewers whose comments and suggestions helped improve and clarify this manuscript.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing AG
About this paper
Cite this paper
Neou, B.E., Rizzi, R., Vialette, S. (2016). Pattern Matching for Separable Permutations. In: Inenaga, S., Sadakane, K., Sakai, T. (eds) String Processing and Information Retrieval. SPIRE 2016. Lecture Notes in Computer Science(), vol 9954. Springer, Cham. https://doi.org/10.1007/978-3-319-46049-9_25
Download citation
DOI: https://doi.org/10.1007/978-3-319-46049-9_25
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-46048-2
Online ISBN: 978-3-319-46049-9
eBook Packages: Computer ScienceComputer Science (R0)