Sorting with Pop Stacks Lara Pudwell Sorting with Pop Stacks Stacks Pop stacks 1-Pop-stack sortability 2-Pop-stack sortability Polyominoes on a helix Lara Pudwell Width 2 Width 3 faculty.valpo.edu/lpudwell Wrapping up joint work with Rebecca Smith (SUNY - Brockport) 15th International Conference on Permutation Patterns Reykjavik University June 29, 2017
Sorting with Pop Stack sortable permutations Stacks Lara Pudwell Theorem (Knuth, 1973) Stacks π ∈ S n is 1-stack sortable iff π avoids 231. There are Pop stacks � 2 n 1-Pop-stack sortability � 2-Pop-stack sortability n C n = n + 1 such permutations. Polyominoes on a helix Width 2 Width 3 Wrapping up
Sorting with Pop Stack sortable permutations Stacks Lara Pudwell Theorem (Knuth, 1973) Stacks π ∈ S n is 1-stack sortable iff π avoids 231. There are Pop stacks � 2 n 1-Pop-stack sortability � 2-Pop-stack sortability n C n = n + 1 such permutations. Polyominoes on a helix Width 2 Width 3 Theorem (West, 1990) Wrapping up π ∈ S n is 2-stack sortable iff π avoids 2341 and 35241. Theorem (Zeilberger, 1992) 2 ( 3 n )! There are ( n + 1 )!( 2 n + 1 )! 2-stack sortable permutations of length n .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 21534 Output: P ( 21534 ) = . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 1534 2 Output: P ( 21534 ) = . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 534 1 2 Output: P ( 21534 ) = . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 534 Output: P ( 21534 ) = 12 . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 34 5 Output: P ( 21534 ) = 12 . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 4 3 5 Output: P ( 21534 ) = 12 . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 4 21534 is not 1-pop-stack sortable. Output: P ( 21534 ) = 1235 . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 21534 is not 1-pop-stack sortable. 4 Output: P ( 21534 ) = 1235 . . .
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. Input: 21534 is not 1-pop-stack sortable. Output: P ( 21534 ) = 12354
Sorting with Pop Pop stacks Stacks Lara Pudwell Pop Stack Operations Stacks A pop stack is a last-in first-out data-structure with two Pop stacks operations: 1-Pop-stack sortability 2-Pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a helix on the top of the stack, Width 2 Width 3 ◮ pop – remove all elements from the stack and put them Wrapping up on the end of the output. In general, if π 1 · · · π i is the longest decreasing prefix of π , write R = π i + 1 · · · π n so that π = π 1 · · · π i R . P ( π 1 · · · π i R ) = π i · · · π 1 P ( R ) .
Sorting with Pop Pop-stack sortable permutations Stacks If P ( π ) = 12 · · · n , then π is layered. Lara Pudwell Stacks Pop stacks 1-Pop-stack sortability 2-Pop-stack sortability Polyominoes on a helix Width 2 Width 3 Wrapping up Theorem (Avis and Newborn, 1981) π ∈ S n is 1-pop-stack sortable iff π avoids 231 and 312. There are 2 n − 1 such permutations.
Sorting with Pop Compositions Stacks Lara Pudwell Stacks Definition Pop stacks 1-Pop-stack sortability Composition of n – an ordered arrangement of positive 2-Pop-stack sortability integers whose sum is n Polyominoes on a helix Width 2 Width 3 Example: n = 3 Wrapping up 3 2+1 1+2 1+1+1
Sorting with Pop 2-Pop-stack sortability Stacks Lara Pudwell Definition Stacks A permutation π ∈ S n is 2-pop-stack sortable if and only if Pop stacks P ( P ( π )) = 1 · · · n . 1-Pop-stack sortability 2-Pop-stack sortability Polyominoes on a Notation helix Width 2 If P ( P ( π )) = 1 · · · n , write π ∈ P 2 , n . Width 3 Let P 2 = � n ≥ 1 P 2 , n . Wrapping up Example: 21534 ∈ P 2 , 5 because P ( P ( 21534 )) = P ( 12354 ) = 12345 .
Sorting with Pop 2-Pop-stack sortability Stacks Lara Pudwell Definition Stacks A permutation π ∈ S n is 2-pop-stack sortable if and only if Pop stacks P ( P ( π )) = 1 · · · n . 1-Pop-stack sortability 2-Pop-stack sortability Polyominoes on a Notation helix Width 2 If P ( P ( π )) = 1 · · · n , write π ∈ P 2 , n . Width 3 Let P 2 = � n ≥ 1 P 2 , n . Wrapping up Example: 21534 ∈ P 2 , 5 because P ( P ( 21534 )) = P ( 12354 ) = 12345 . Definition A block of a permutation is a maximal contiguous decreasing subsequence. Example: π = 21534 has blocks B 1 = 21, B 2 = 53, B 3 = 4.
Sorting with Pop 2-Pop-stack sortability Stacks Lara Pudwell Claim Stacks π with blocks B 1 , . . . , B ℓ is 2-pop-stack sortable iff Pop stacks either max ( B i ) < min ( B i + 1 ) or max ( B i ) = min ( B i + 1 ) + 1 1-Pop-stack sortability for 1 ≤ i ≤ ℓ − 1. 2-Pop-stack sortability Polyominoes on a helix P ( π ) π Width 2 Width 3 Wrapping up B 1 B 2 B 3 B 1 B 2 B 3
Sorting with Pop 2-Pop-stack sortability Stacks Lara Pudwell Claim Stacks π with blocks B 1 , . . . , B ℓ is 2-pop-stack sortable iff Pop stacks either max ( B i ) < min ( B i + 1 ) or max ( B i ) = min ( B i + 1 ) + 1 1-Pop-stack sortability for 1 ≤ i ≤ ℓ − 1. 2-Pop-stack sortability Polyominoes on a helix P ( π ) π Width 2 Width 3 Wrapping up B 1 B 2 B 3 B 1 B 2 B 3 Theorem (P and Smith, 2017+) π is 2-pop-stack sortable iff π avoids 2341, 3412, 3421, 4123, 4231, 4312, 41352, and 41352.
Sorting with Pop 2-Pop-stack sortability Stacks Lara Pudwell Lemma Stacks π with blocks B 1 , . . . , B ℓ is 2-pop-stack sortable iff Pop stacks either max ( B i ) < min ( B i + 1 ) or max ( B i ) = min ( B i + 1 ) + 1 for 1-Pop-stack sortability 2-Pop-stack sortability 1 ≤ i ≤ ℓ − 1. Polyominoes on a helix Width 2 ◮ Given a composition c , let f ( c ) be the number of pairs Width 3 of adjacent summands that aren’t both 1. Wrapping up Example: f ( 1 + 2 + 1 + 1 ) = 2.
Recommend
More recommend