Abstract: A permutation \(\pi \) is a merge of a permutation \(\sigma \) and a permutation \(\tau \), if we can color the elements of \(\pi \) red and blue so that the red elements have the same relative order as \(\sigma \) and the blue ones as \(\tau \). We consider, for fixed hereditary permutation classes \(\mathcal {C}\) and \(\mathcal {D}\), the complexity of determining whether a given permutation \(\pi \) is a merge of an element of \(\mathcal {C}\) with an element of \(\mathcal {D}\). We develop general algorithmic approaches for identifying polynomially tractable cases of merge recognition. Our tools include a version of streaming recognizability of permutations via polynomially constructible nondeterministic automata, as well as a concept of bounded width decomposition, inspired by the work of Ahal and Rabinovich. As a consequence of the general results, we can provide nontrivial examples of tractable permutation merges involving commonly studied permutation classes, such as the class of layered permutations, the class of separable permutations, or the class of permutations avoiding a decreasing sequence of a given length. On the negative side, we obtain a general hardness result which implies, for example, that it is NP-complete to recognize the permutations that can be merged from two subpermutations avoiding the pattern 2413.
Loading