sorting a permutation by cut and paste moves
play

Sorting a Permutation by Cut-and-Paste Moves Daniel W. Cranston - PowerPoint PPT Presentation

Sorting a Permutation by Cut-and-Paste Moves Daniel W. Cranston Virginia Commonwealth University dcransto@dimacs.rutgers.edu Joint with Hal Sudborough and Doug West. Discrete Math Minisymposium, MathFest 6 August 2009 Definitions and an


  1. Sorting a Permutation by Cut-and-Paste Moves Daniel W. Cranston Virginia Commonwealth University dcransto@dimacs.rutgers.edu Joint with Hal Sudborough and Doug West. Discrete Math Minisymposium, MathFest 6 August 2009

  2. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere

  3. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere A | B | C | D

  4. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere A | C | B | D ր A | B | C | D

  5. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere A | C | B | D ր A | C | B R | D → A | B | C | D

  6. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere A | C | B | D ր A | C | B R | D → A | B | C | D ց A | C R | B | D

  7. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD →

  8. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11

  9. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11

  10. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8

  11. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8

  12. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3

  13. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3

  14. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3

  15. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3

  16. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13

  17. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13

  18. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13

  19. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13

  20. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Def. g ( n ): max # of moves to sort a permuation of { 1 , 2 , . . . , n }

  21. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Def. g ( n ): max # of moves to sort a permuation of { 1 , 2 , . . . , n } Obs. g ( n ) ≤ n − 1

  22. Definitions and an Example Def. cut-and-paste move: cut out a substring, reverse it if you want, paste it into the permutation anywhere ACBD or ACB R D or AC R BD ABCD → Ex. 1 2 13 7 4 10 9 5 3 6 8 12 11 1 2 13 7 4 12 11 10 9 5 3 6 8 1 2 13 7 4 12 11 10 9 8 6 5 3 1 2 8 9 10 11 12 13 7 4 6 5 3 1 2 3 5 6 4 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Def. g ( n ): max # of moves to sort a permuation of { 1 , 2 , . . . , n } Obs. g ( n ) ≤ n − 1 and g ( n ) ≥ ⌈ n / 3 ⌉

  23. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm.

  24. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities

  25. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem.

  26. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 0 | 1 C 1 | ? D A 0 | 1 C 1 | 1 B 0 | ? D

  27. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 0 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 0 | ? D

  28. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 0 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 0 | ? D

  29. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 1 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 1 | ? D

  30. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 1 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 1 | ? D

  31. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 1 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 1 | ? D Note that (0)12345 . . . n has n parity adjacencies.

  32. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 1 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 1 | ? D Note that (0)12345 . . . n has n parity adjacencies. And (0)24 . . . 531 has only 1 parity adjacency.

  33. Proving the Lower Bound g ( n ) ≥ ⌊ n / 2 ⌋ Thm. Def. parity adjacency: consecutive elements with opposite parities Each move adds at most 2 more parity adjacencies. Lem. Pf. A 0 | 0 B 1 | 1 C 1 | ? D A 0 | 1 C 1 | 0 B 1 | ? D Note that (0)12345 . . . n has n parity adjacencies. And (0)24 . . . 531 has only 1 parity adjacency. So g ( n ) ≥ ⌈ ( n − 1) / 2 ⌉ = ⌊ n / 2 ⌋ .

  34. Motivating the Upper Bound Thm. g ( n ) ≤ ⌈ 2 n / 3 ⌉ + 1 .

  35. Motivating the Upper Bound Thm. g ( n ) ≤ ⌈ 2 n / 3 ⌉ + 1 . 1 2 13 7 4 12 11 10 9 5 3 6 8

  36. Motivating the Upper Bound Thm. g ( n ) ≤ ⌈ 2 n / 3 ⌉ + 1 . 1 2 13 7 4 12 11 10 9 5 3 6 8 Def. block: maximal substring of adjacencies (size at least 2)

  37. Motivating the Upper Bound Thm. g ( n ) ≤ ⌈ 2 n / 3 ⌉ + 1 . 1 2 13 7 4 12 11 10 9 5 3 6 8 Def. block: maximal substring of adjacencies (size at least 2) Def. single: element not in a block

  38. Motivating the Upper Bound Thm. g ( n ) ≤ ⌈ 2 n / 3 ⌉ + 1 . 1 2 13 7 4 12 11 10 9 5 3 6 8 Def. block: maximal substring of adjacencies (size at least 2) Def. single: element not in a block It’s easier to merge singles than blocks. Obs.

Recommend


More recommend