Sorting with Pop Stacks Lara Pudwell Sorting with Pop Stacks Stack sorting Pop stack sorting 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) Valparaiso MST Faculty Seminar March 21, 2017
Sorting with Pop Stacks Lara Pudwell Stack sorting Stack sorting Pop stack sorting 1-pop-stack sortability 2-pop-stack sortability Pop stack sorting Polyominoes on a 1-pop-stack sortability helix Width 2 2-pop-stack sortability Width 3 Wrapping up Polyominoes on a helix Width 2 Width 3 Wrapping up
Sorting with Pop Permutations Stacks Lara Pudwell Stack sorting Definitions Pop stack sorting 1-pop-stack sortability ◮ permutation – an ordering of the members of a set 2-pop-stack sortability Polyominoes on a ◮ S n – the set of all permutations of { 1 , 2 , . . . , n } . helix Width 2 Width 3 Wrapping up Example: S 3 = { 123 , 132 , 213 , 231 , 312 , 321 } . π = 15243
Sorting with Pop Permutations Stacks Lara Pudwell Stack sorting Definitions Pop stack sorting 1-pop-stack sortability ◮ permutation – an ordering of the members of a set 2-pop-stack sortability Polyominoes on a ◮ S n – the set of all permutations of { 1 , 2 , . . . , n } . helix Width 2 Width 3 Wrapping up Example: S 3 = { 123 , 132 , 213 , 231 , 312 , 321 } . π = 15243 π = 15243 contains 132.
Sorting with Pop Permutations Stacks Lara Pudwell Stack sorting Definitions Pop stack sorting 1-pop-stack sortability ◮ permutation – an ordering of the members of a set 2-pop-stack sortability Polyominoes on a ◮ S n – the set of all permutations of { 1 , 2 , . . . , n } . helix Width 2 Width 3 Wrapping up Example: S 3 = { 123 , 132 , 213 , 231 , 312 , 321 } . π = 15243 π = 15243 contains 132, but avoids 231.
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 15243 Output: S (15243) = . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 5243 1 Output: S (15243) = . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 5243 Output: S (15243) = 1 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 243 5 Output: S (15243) = 1 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 43 2 5 Output: S (15243) = 1 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 43 5 Output: S (15243) = 12 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 3 4 5 Output: S (15243) = 12 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 3 4 5 Output: S (15243) = 12 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 15243 is 1-stack sortable. Output: S (15243) = 12345
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 35142 Output: S (35142) = . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 5142 3 Output: S (35142) = . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 5142 35142 is not 1-stack sortable. Output: S (35142) = 3 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 142 35142 is not 1-stack sortable. 5 Output: S (35142) = 3 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 42 35142 is not 1-stack sortable. 1 5 Output: S (35142) = 3 . . .
Sorting with Pop Stacks Stacks Lara Pudwell Stack Operations Stack sorting A stack is a last-in first-out data-structure with two Pop stack sorting operations: 1-pop-stack sortability 2-pop-stack sortability ◮ push – remove the first element from input and put it Polyominoes on a on the top of the stack helix Width 2 ◮ pop – remove the top element from the stack and put it Width 3 Wrapping up on the end of the output. Input: 42 35142 is not 1-stack sortable. 5 Output: S (35142) = 31 . . .
Recommend
More recommend