Sorting with two ordered stacks in series
The permutations that can be sorted by two stacks in series are considered, subject to the condition that each stack remains ordered. A forbidden characterisation of such permutations is obtained and the number of permutations of each length is determined by a generating function. (C) 2002 Elsevier Science B.V. All rights reserved.
stacks permutations forbidden patterns enumeration