enumerating permutations sortable by k passes through a
play

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. Enumerating permutations sortable by k passes through a pop-stack Anders Claesson Bjarki Ágúst Guðmundsson University of Iceland 1 / 20

  2. Theorem (Knuth, 1968) 3124 A permutation π is sortable by a stack if and only if π avoids 231 . Theorem (Avis & Newborn, 1981) 3124 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 / 20

  3. Theorem (Knuth, 1968) 124 A permutation π is sortable by a stack if and only if π avoids 231 . 3 Theorem (Avis & Newborn, 1981) 124 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 3 2 / 20

  4. Theorem (Knuth, 1968) 24 A permutation π is sortable by a stack 1 if and only if π avoids 231 . 3 Theorem (Avis & Newborn, 1981) 24 A permutation π is sortable by a pop-stack 1 if and only if π avoids 231 and 321 . 3 2 / 20

  5. Theorem (Knuth, 1968) 1 24 A permutation π is sortable by a stack if and only if π avoids 231 . 3 Theorem (Avis & Newborn, 1981) 13 24 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 / 20

  6. Theorem (Knuth, 1968) 1 4 A permutation π is sortable by a stack 2 if and only if π avoids 231 . 3 Theorem (Avis & Newborn, 1981) 13 4 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 2 / 20

  7. Theorem (Knuth, 1968) 12 4 A permutation π is sortable by a stack if and only if π avoids 231 . 3 Theorem (Avis & Newborn, 1981) 132 4 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 / 20

  8. Theorem (Knuth, 1968) 123 4 A permutation π is sortable by a stack if and only if π avoids 231 . Theorem (Avis & Newborn, 1981) 132 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 4 2 / 20

  9. Theorem (Knuth, 1968) 123 A permutation π is sortable by a stack if and only if π avoids 231 . 4 Theorem (Avis & Newborn, 1981) 1324 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 / 20

  10. Theorem (Knuth, 1968) 1234 A permutation π is sortable by a stack if and only if π avoids 231 . Theorem (Avis & Newborn, 1981) 1324 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . 2 / 20

  11. Theorem (Knuth, 1968) 1234 A permutation π is sortable by a stack if and only if π avoids 231 . Theorem (Avis & Newborn, 1981) 1324 A permutation π is sortable by a pop-stack if and only if π avoids 231 and 321 . Theorem (Pudwell & Smith, 2017) A permutation π is sortable by two passes through a pop-stack if and only if π avoids 2341 , 3412 , 3421 , 4123 , 4231 , 4312 , 4¯ 1352 and 413¯ 52 . 2 / 20

  12. Theorem (Knuth, 1968) √ 1 − 1 − 4 x A permutation π is sortable by a stack if and only if π avoids 231 . 2 x Theorem (Avis & Newborn, 1981) A permutation π is sortable by a pop-stack x − 1 if and only if π avoids 231 and 321 . 2 x − 1 Theorem (Pudwell & Smith, 2017) A permutation π is sortable by two passes x 3 + x 2 + x − 1 through a pop-stack if and only if π avoids 2 x 3 + x 2 + 2 x − 1 2341 , 3412 , 3421 , 4123 , 4231 , 4312 , 4¯ 1352 and 413¯ 52 . 2 / 20

  13. Stacks vs pop-stacks A stack is a LIFO data structure with two operations: ◮ Push: Add an element to the top of the stack. ◮ Pop: Remove the top-most element from the stack. A pop-stack is a LIFO data structure with two operations: ◮ Push: Add an element to the top of the stack. ◮ Pop: Remove all elements from the stack. We’ll insist that elements on the stack are increasing when read from top to bottom and sort greedily w.r.t. the push operation. 3 / 20

  14. How many permutations are sortable by k passes through a pop-stack? x − 1 k = 1 2 x − 1 x 3 + x 2 + x − 1 k = 2 2 x 3 + x 2 + 2 x − 1 k ≥ 3 Rational? 4 / 20

  15. 5 1 2 4 7 8 6 3 9 5 / 20

  16. 5 1 2 4 7 8 6 3 9 5 / 20

  17. 5 1 2 4 7 8 6 3 9 5 / 20

  18. 5 1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 / 20

  57. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 5 / 20

  58. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 5 / 20

  59. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 8 5 / 20

  60. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 8 5 / 20

  61. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 8 9 5 / 20

  62. 5 1 2 4 7 8 6 3 9 1 5 2 4 7 3 6 8 9 1 2 5 4 3 7 6 8 9 1 2 3 4 5 6 7 8 9 ◮ 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

  63. 7 5 2 4 9 1 8 6 3 2 5 7 4 1 9 3 6 8 2 5 1 4 7 3 9 6 8 2 1 5 4 3 7 6 9 8 1 2 3 4 5 6 7 8 9 A sorting trace Its sorting plan a d d a a d a d d a a a a d d a d a a a 0 , 9 , 10 , 5 , 5 , 10 , 5 , 10 , 9 , 0 a a d a a d a d a a a d a d d a d a d a The same sorting plan . . . and its encoding 6 / 20

  64. 7 5 2 4 9 1 8 6 3 2 5 7 4 1 9 3 6 8 2 5 1 4 7 3 9 6 8 2 1 5 4 3 7 6 9 8 1 2 3 4 5 6 7 8 9 A sorting trace Its sorting plan 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 , 9 , 10 , 5 , 5 , 10 , 5 , 10 , 9 , 0 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 1 0 The same sorting plan . . . and its encoding 6 / 20

  65. Basic bijections k -pop-stack-sortable permutations sort using pop-stack take topmost permutation sorting traces drop numbers append id, then blockwise rev. sorting plans Bijection between k -pop-stack-sortable permutations of [ n ] and sorting plans of length n and order k 7 / 20

  66. An operation array of length 9 and order 3: 8 / 20

  67. An operation array of length 9 and order 3: ◮ Assume there is a sorting trace with this operation array. 8 / 20

  68. An operation array of length 9 and order 3: 1 2 3 4 5 6 7 8 9 ◮ Assume there is a sorting trace with this operation array. ◮ The last permutation must be the identity. 8 / 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend