Combinatorial generation via permutation languages Torsten Mtze - - PowerPoint PPT Presentation

combinatorial generation via permutation languages
SMART_READER_LITE
LIVE PREVIEW

Combinatorial generation via permutation languages Torsten Mtze - - PowerPoint PPT Presentation

Combinatorial generation via permutation languages Torsten Mtze (joint work with Liz Hartung, Hung P. Hoang, and Aaron Williams) Introduction In computer science, we frequently encounter different kinds of combinatorial objects Examples:


slide-1
SLIDE 1

Torsten Mütze

(joint work with Liz Hartung, Hung P. Hoang, and Aaron Williams)

Combinatorial generation via permutation languages

slide-2
SLIDE 2

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423

slide-3
SLIDE 3

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423 000 001 011

slide-4
SLIDE 4

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423 000 001 011

slide-5
SLIDE 5

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423 000 001 011

slide-6
SLIDE 6

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423 000 001 011

slide-7
SLIDE 7

Introduction

  • In computer science, we frequently encounter different

kinds of combinatorial objects

  • Examples:
  • permutations
  • binary strings
  • binary trees
  • graphs
  • spanning trees

1234 1243 1423

  • Common tasks:

counting + random sampling + exhaustive generation

000 001 011

slide-8
SLIDE 8

Exhaustive generation

  • Goal: generate all objects of a combinatorial class efficiently

[Knuth, The Art of Computer Programming Vol. 4A]

  • ultimately: each new object in constant time
  • consecutive objects differ only by `small changes‘ Gray code
slide-9
SLIDE 9

Exhaustive generation

  • Goal: generate all objects of a combinatorial class efficiently

[Knuth, The Art of Computer Programming Vol. 4A]

  • ultimately: each new object in constant time
  • consecutive objects differ only by `small changes‘ Gray code
  • binary trees by rotations [Lucas, van Baronaigien, Ruskey 93]
  • Examples:
slide-10
SLIDE 10

Exhaustive generation

  • Goal: generate all objects of a combinatorial class efficiently

[Knuth, The Art of Computer Programming Vol. 4A]

  • ultimately: each new object in constant time
  • consecutive objects differ only by `small changes‘ Gray code
  • permutations by adjacent transpositions

(Steinhaus‐Johnson‐Trotter algorithm [Johnson 63], [Trotter 62])

  • binary trees by rotations [Lucas, van Baronaigien, Ruskey 93]
  • Examples:
slide-11
SLIDE 11

Exhaustive generation

  • Goal: generate all objects of a combinatorial class efficiently

[Knuth, The Art of Computer Programming Vol. 4A]

  • ultimately: each new object in constant time
  • consecutive objects differ only by `small changes‘ Gray code
  • permutations by adjacent transpositions

(Steinhaus‐Johnson‐Trotter algorithm [Johnson 63], [Trotter 62])

  • binary trees by rotations [Lucas, van Baronaigien, Ruskey 93]
  • binary strings by bitflips (binary reflected Gray code [Gray 53])
  • Examples:
slide-12
SLIDE 12

Exhaustive generation

  • Goal: generate all objects of a combinatorial class efficiently

[Knuth, The Art of Computer Programming Vol. 4A]

  • ultimately: each new object in constant time
  • consecutive objects differ only by `small changes‘ Gray code
  • permutations by adjacent transpositions

(Steinhaus‐Johnson‐Trotter algorithm [Johnson 63], [Trotter 62])

  • set partitions by element exchanges [Kaye 76]
  • binary trees by rotations [Lucas, van Baronaigien, Ruskey 93]
  • binary strings by bitflips (binary reflected Gray code [Gray 53])
  • Examples:
slide-13
SLIDE 13

Exhaustive generation

  • many tailormade algorithms, few general approaches

[Avis, Fukuda 92], [Li, Sawada 09], [Ruskey, Sawada, Williams 12]

slide-14
SLIDE 14

Exhaustive generation

  • many tailormade algorithms, few general approaches

[Avis, Fukuda 92], [Li, Sawada 09], [Ruskey, Sawada, Williams 12]

  • This work: A general framework for exhaustive generation
slide-15
SLIDE 15

Exhaustive generation

  • many tailormade algorithms, few general approaches

[Avis, Fukuda 92], [Li, Sawada 09], [Ruskey, Sawada, Williams 12]

  • This work: A general framework for exhaustive generation
  • Results: all aforementioned algorithms as special cases

+ many new results for other families of objects

slide-16
SLIDE 16

Exhaustive generation

  • many tailormade algorithms, few general approaches

[Avis, Fukuda 92], [Li, Sawada 09], [Ruskey, Sawada, Williams 12]

  • This work: A general framework for exhaustive generation
  • Results: all aforementioned algorithms as special cases

+ many new results for other families of objects

  • Idea: Encode objects as a subset of permutations of

length

slide-17
SLIDE 17

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

slide-18
SLIDE 18

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

slide-19
SLIDE 19

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

slide-20
SLIDE 20

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

right jump

slide-21
SLIDE 21

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

left jump

slide-22
SLIDE 22

Jumps

  • Jump := move an entry in the permutation across some

neighboring smaller entries (right or left)

4 5 1 3 2 6 4 1 3 2 5 6

slide-23
SLIDE 23

Algorithm J

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
slide-24
SLIDE 24

Algorithm J

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created.

slide-25
SLIDE 25

Algorithm J

  • Example:

{1243,1423,4123,4213,2134}

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created.

slide-26
SLIDE 26

Algorithm J

  • Example:

{1243,1423,4123,4213,2134}

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created.

1243

minimal jumps

4213

slide-27
SLIDE 27

Algorithm J

  • Example:

{1243,1423,4123,4213,2134}

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created.

1243

minimal jumps not minimal

1243 4213

slide-28
SLIDE 28

Algorithm J

  • Example:

{1243,1423,4123,4213,2134} 1243 1423 4123 4213 2134 4123 4213

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created. Stop, if no jump is possible or jump direction is ambiguous.

1243 1423

slide-29
SLIDE 29

Algorithm J

  • Example:

{1243,1423,4123,4213,2134} 1243 1423 4123 4213 2134 4123 4213 4213 2134 4213

no jump possible Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created. Stop, if no jump is possible or jump direction is ambiguous.

1243 1423

slide-30
SLIDE 30

Algorithm J

  • Example:

{1243,1423,4123,4213,2134} 1243 1423 4123 4213 2134 4123 4213 4213 2134 4213

direction ambiguous no jump possible

1423

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created. Stop, if no jump is possible or jump direction is ambiguous.

1243 1423

slide-31
SLIDE 31

Algorithm J

Algorithm J attempts to generate a set of permutations

  • start with an initial permutation from
  • in the current permutation, perform a minimal jump of the

largest possible value, so that a previously unvisited permutation from is created. Stop, if no jump is possible or jump direction is ambiguous.

  • If every permutation from is visited and no ambiguity

arises, we say that Algorithm J generates (visiting twice is impossible)

  • Question: When does Algorithm J generate ?
slide-32
SLIDE 32

Tree of permutations

  • root := empty permutation
slide-33
SLIDE 33

Tree of permutations

  • root := empty permutation
  • given a permutation of length

, its children are

  • btained by inserting

into every possible position depth = all permutations

  • f length
slide-34
SLIDE 34

Tree of permutations

  • root := empty permutation
  • given a permutation of length

, its children are

  • btained by inserting

into every possible position depth = all permutations

  • f length

symbol at leftmost or rightmost position else

slide-35
SLIDE 35

Zigzag languages

  • we may prune subtrees iff their root is

symbol at leftmost or rightmost position else

  • given any such pruned tree, a set of permutations

in depth is called zigzag language

slide-36
SLIDE 36

Zigzag languages

  • we may prune subtrees iff their root is

symbol at leftmost or rightmost position else

  • given any such pruned tree, a set of permutations

in depth is called zigzag language

slide-37
SLIDE 37

Zigzag languages

  • we may prune subtrees iff their root is

symbol at leftmost or rightmost position else

  • given any such pruned tree, a set of permutations

in depth is called zigzag language

slide-38
SLIDE 38

Zigzag languages

  • we may prune subtrees iff their root is
  • given any such pruned tree, a set of permutations

in depth is called zigzag language

  • Examples:
  • prune nothing:
slide-39
SLIDE 39

Zigzag languages

  • we may prune subtrees iff their root is
  • given any such pruned tree, a set of permutations

in depth is called zigzag language

  • Examples:
  • prune nothing:
  • prune everything possible

permutations without peaks

slide-40
SLIDE 40

Zigzag languages

  • we may prune subtrees iff their root is
  • given any such pruned tree, a set of permutations

in depth is called zigzag language Theorem: Algorithm J generates any zigzag language, using the identity permutation for initialization.

slide-41
SLIDE 41

Zigzag languages

  • we may prune subtrees iff their root is
  • given any such pruned tree, a set of permutations

in depth is called zigzag language Theorem: Algorithm J generates any zigzag language, using the identity permutation for initialization. Proof: Induction over the depth.

slide-42
SLIDE 42

Zigzag languages

  • we may prune subtrees iff their root is
  • given any such pruned tree, a set of permutations

in depth is called zigzag language Theorem: Algorithm J generates any zigzag language, using the identity permutation for initialization. Proof: Induction over the depth. Remark: The number of zigzag languages is enormous

slide-43
SLIDE 43

General approach

Combinatorial

  • bjects

Set of permutations

slide-44
SLIDE 44

General approach

Combinatorial

  • bjects

Set of permutations List = Algo J( )

  • Run Algorithm J

List

slide-45
SLIDE 45

General approach

Combinatorial

  • bjects

Set of permutations List = Algo J( )

  • Run Algorithm J
  • Directly interpret

Algorithm J under the bijection Algo J Algo J List

slide-46
SLIDE 46

General approach

Combinatorial

  • bjects

Set of permutations List = Algo J( )

  • Run Algorithm J
  • Directly interpret

Algorithm J under the bijection Algo J Algo J List Minimal jumps ‚Small changes‘

slide-47
SLIDE 47

„Interesting“ zigzag languages

Applications of our framework

  • pattern‐avoiding permutations
  • lattice congruences of the weak order on
slide-48
SLIDE 48

Pattern‐avoiding permutations

  • Def: A permutation

contains a pattern , if contains a substring of entries in the same relative order as . Otherwise avoids .

534216 123

contains

slide-49
SLIDE 49

Pattern‐avoiding permutations

  • Def: A permutation

contains a pattern , if contains a substring of entries in the same relative order as . Otherwise avoids .

654321 123

avoids

534216 123

contains

slide-50
SLIDE 50

Pattern‐avoiding permutations

  • Def: A permutation

contains a pattern , if contains a substring of entries in the same relative order as . Otherwise avoids .

  • set of permutations avoiding

.

slide-51
SLIDE 51

Pattern‐avoiding permutations

  • Def: A permutation

contains a pattern , if contains a substring of entries in the same relative order as . Otherwise avoids .

  • set of permutations avoiding

.

  • A pattern

is called tame, if the largest symbol is not at the leftmost or rightmost position.

231 123

slide-52
SLIDE 52

Pattern‐avoiding permutations

  • Def: A permutation

contains a pattern , if contains a substring of entries in the same relative order as . Otherwise avoids .

  • set of permutations avoiding

.

  • A pattern

is called tame, if the largest symbol is not at the leftmost or rightmost position. Theorem: If are all tame patterns, then is a zigzag language.

231 123

slide-53
SLIDE 53

Pattern‐avoiding permutations

Tame patterns Combinatorial objects

231

Catalan families • binary trees by rotations

  • triangulations by edge flips
  • Dyck paths by hill flips
slide-54
SLIDE 54

Pattern‐avoiding permutations

Tame patterns Combinatorial objects

231

Catalan families • binary trees by rotations

  • triangulations by edge flips
  • Dyck paths by hill flips

231

Set partitions by element exchanges positions must be adjacent

slide-55
SLIDE 55

Pattern‐avoiding permutations

Tame patterns Combinatorial objects

231

Catalan families • binary trees by rotations

  • triangulations by edge flips
  • Dyck paths by hill flips

231,132 231

Set partitions by element exchanges Binary strings by bitflips (BRGC)

slide-56
SLIDE 56

Pattern‐avoiding permutations

2413,3142

Diagonal rectangulations by flips Baxter permutations Tame patterns Combinatorial objects

slide-57
SLIDE 57

Pattern‐avoiding permutations

Tame patterns Combinatorial objects In addition to classical and vincular patterns:

  • bivincular patterns [Bousquet‐Mélou et al. 10]
  • barred patterns [West 90]
  • mesh patterns [Brändén, Claesson 11]
  • monotone grid classes [Huczynska, Vatter 06]
  • geometric grid classes [Albert et al. 13]
  • etc.

2413,3142

Diagonal rectangulations by flips Baxter permutations

slide-58
SLIDE 58
  • website invented by Frank Ruskey 1995‐2003 for generating

combinatorial objects

slide-59
SLIDE 59
  • website invented by Frank Ruskey 1995‐2003 for generating

combinatorial objects

  • UVIC server shut‐down since several years
slide-60
SLIDE 60
  • website invented by Frank Ruskey 1995‐2003 for generating

combinatorial objects

  • UVIC server shut‐down since several years
  • revived jointly with Aaron Williams and Joe Sawada
  • we proudly present the new Combinatorial Object Server:

http://combos.org

slide-61
SLIDE 61
  • website invented by Frank Ruskey 1995‐2003 for generating

combinatorial objects

  • UVIC server shut‐down since several years
  • revived jointly with Aaron Williams and Joe Sawada
  • we proudly present the new Combinatorial Object Server:

http://combos.org

  • community project (open source, welcome your contributions)
slide-62
SLIDE 62

Thank you!

Aaron Liz Torsten Gray code for diagonal rectangulations tree of permutations