Enumerating permutations sortable by k passes through a pop-stack
Anders Claesson Bjarki Ágúst Guðmundsson University of Iceland
1 / 20
Enumerating permutations sortable by k passes through a pop-stack - - PowerPoint PPT Presentation
Enumerating permutations sortable by k passes through a pop-stack Anders Claesson Bjarki gst Gumundsson University of Iceland 1 / 20 Theorem (Knuth, 1968) 3124 A permutation is sortable by a stack if and only if avoids 231 .
1 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
2 / 20
◮ Push: Add an element to the top of the stack. ◮ Pop: Remove the top-most element from the stack.
◮ Push: Add an element to the top of the stack. ◮ Pop: Remove all elements from the stack.
3 / 20
4 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
5 / 20
◮ A sorting trace of length 9 and order 3. ◮ Numbers within a block are in decreasing order. ◮ Adjacent numbers in different blocks form an ascent. ◮ Each perm is the “blockwise reversal” of the one above. ◮ The last permutation is the identity.
5 / 20
6 / 20
6 / 20
7 / 20
8 / 20
◮ Assume there is a sorting trace with this operation array.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above.
8 / 20
◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. ◮ Each perm is the “blockwise reversal” of the perm above. ◮ This semitrace is not a (proper) trace, so the operation
8 / 20
9 / 20
10 / 20
1 2 3 4 1 2 3 4
11 / 20
◮ For k = 1 there are no forbidden segments. ◮ For k = 2 the forbidden segments are
13 / 20
13 / 20
◮ Encode an operation array of length n and order k as a
◮ Thus operation arrays can be seen as strings in Γ ∗. ◮ A DFA for the language of operation arrays, W, is
14 / 20
◮ Let Ai be the set of symbols in Σ that represent a column
◮ The following DFA, Ri, recognizes the operation arrays that
◮ Operation arrays that have blocks of size at most 3 in all
15 / 20
◮ Recall that sorting plans are characterized by avoiding
◮ Let us encode a segment M in the same manner as we
◮ An operation array A contains the segment M if and only if
◮ The following NFA, QM, recognizes strings over Σ that
16 / 20
k
17 / 20
◮ Let pk(n) be the number of k-pop-stack-sortable
◮ Let Pk(x) =
18 / 20
19 / 20
20 / 20