Universal Cycles for Permutations Theory and Applications

Similar documents
Combinatorial Choreography

Successor Rules for Flipping Pancakes and Burnt Pancakes

Greedy Flipping of Pancakes and Burnt Pancakes

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors.

Gray code and loopless algorithm for the reflection group D n

Generating indecomposable permutations

The Harassed Waitress Problem

MA/CSSE 473 Day 13. Student Questions. Permutation Generation. HW 6 due Monday, HW 7 next Thursday, Tuesday s exam. Permutation generation

Some algorithmic and combinatorial problems on permutation classes

Lecture 3 Presentations and more Great Groups

Quotients of the Malvenuto-Reutenauer algebra and permutation enumeration

Pin-Permutations and Structure in Permutation Classes

Gray code for permutations with a fixed number of cycles

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

EXPLAINING THE SHAPE OF RSK

RESTRICTED PERMUTATIONS AND POLYGONS. Ghassan Firro and Toufik Mansour Department of Mathematics, University of Haifa, Haifa, Israel

1 This work was partially supported by NSF Grant No. CCR , and by the URI International Engineering Program.

Patterns and random permutations II

Fast Sorting and Pattern-Avoiding Permutations

Common Mistakes. Quick sort. Only choosing one pivot per iteration. At each iteration, one pivot per sublist should be chosen.

MATH 433 Applied Algebra Lecture 12: Sign of a permutation (continued). Abstract groups.

Fifteen puzzle. Sasha Patotski. Cornell University November 16, 2015

Forward and backward DAWG matching. Slobodan Petrović

Backtracking. Chapter Introduction

An O(1) Time Algorithm for Generating Multiset Permutations

PUZZLES ON GRAPHS: THE TOWERS OF HANOI, THE SPIN-OUT PUZZLE, AND THE COMBINATION PUZZLE

Quarter Turn Baxter Permutations

Enumeration of Pin-Permutations

Equivalence classes of length-changing replacements of size-3 patterns

CSE 573 Problem Set 1. Answers on 10/17/08

Permutations. = f 1 f = I A

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 11

arxiv: v1 [math.co] 11 Jul 2016

Counting Permutations by Putting Balls into Boxes

Quarter Turn Baxter Permutations

Evacuation and a Geometric Construction for Fibonacci Tableaux

X = {1, 2,...,n} n 1f 2f 3f... nf

Module 3 Greedy Strategy

Lecture 2.3: Symmetric and alternating groups

Math 454 Summer 2005 Due Wednesday 7/13/05 Homework #2. Counting problems:

Lecture 20: Combinatorial Search (1997) Steven Skiena. skiena

Recovery and Characterization of Non-Planar Resistor Networks

From Shared Memory to Message Passing

ON THE PERMUTATIONAL POWER OF TOKEN PASSING NETWORKS.

THE SIGN OF A PERMUTATION

PD-SETS FOR CODES RELATED TO FLAG-TRANSITIVE SYMMETRIC DESIGNS. Communicated by Behruz Tayfeh Rezaie. 1. Introduction

Permutation Editing and Matching via Embeddings

Department of Electrical Engineering, University of Leuven, Kasteelpark Arenberg 10, 3001 Leuven-Heverlee, Belgium

Lectures: Feb 27 + Mar 1 + Mar 3, 2017

Analysis of Power Assignment in Radio Networks with Two Power Levels

GLOSSARY. a * (b * c) = (a * b) * c. A property of operations. An operation * is called associative if:

Pattern Avoidance in Poset Permutations

IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 55, NO. 6, JUNE

Some results on Su Doku

Variations of Rank Modulation for Flash Memories

On uniquely k-determined permutations

MA 524 Midterm Solutions October 16, 2018

Random permutations avoiding some patterns

Chained Permutations. Dylan Heuer. North Dakota State University. July 26, 2018

Rotational Puzzles on Graphs

Know how to represent permutations in the two rowed notation, and how to multiply permutations using this notation.

arxiv: v1 [cs.dm] 18 Jan 2016

ON SOME PROPERTIES OF PERMUTATION TABLEAUX

Equivalence Classes of Permutations Modulo Replacements Between 123 and Two-Integer Patterns

Constellation Labeling for Linear Encoders

DVA325 Formal Languages, Automata and Models of Computation (FABER)

A combinatorial proof for the enumeration of alternating permutations with given peak set

Introduction to Source Coding

CHAPTER 5 PAPR REDUCTION USING HUFFMAN AND ADAPTIVE HUFFMAN CODES

Bounds for Cut-and-Paste Sorting of Permutations

Connected Permutations, Hypermaps and Weighted Dyck Words. Robert Cori Mini course, Maps Hypermaps february 2008

The Place of Group Theory in Decision-Making in Organizational Management A case of 16- Puzzle

Error-Correcting Codes for Rank Modulation

RBT Operations. The basic algorithm for inserting a node into an RBT is:

LECTURE 8: DETERMINANTS AND PERMUTATIONS

Outline. Communications Engineering 1

A group-theoretic approach to inversion distance

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

Module 3 Greedy Strategy

arxiv: v1 [cs.cc] 21 Jun 2017

Determinants, Part 1

Generating trees and pattern avoidance in alternating permutations

What Does the Future Hold for Restricted Patterns? 1

CSE 21 Practice Final Exam Winter 2016

Week 3-4: Permutations and Combinations

Ma/CS 6a Class 16: Permutations

Communication Theory II

Enumeration of Two Particular Sets of Minimal Permutations

A Coloring Problem. Ira M. Gessel 1 Department of Mathematics Brandeis University Waltham, MA Revised May 4, 1989

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

Decoding Turbo Codes and LDPC Codes via Linear Programming

An improvement to the Gilbert-Varshamov bound for permutation codes

SPACE-EFFICIENT ROUTING TABLES FOR ALMOST ALL NETWORKS AND THE INCOMPRESSIBILITY METHOD

Dyck paths, standard Young tableaux, and pattern avoiding permutations

On shortening u-cycles and u-words for permutations

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

CSS 343 Data Structures, Algorithms, and Discrete Math II. Balanced Search Trees. Yusuf Pisan

On the isomorphism problem for Coxeter groups and related topics

Counting. Chapter 6. With Question/Answer Animations

Counting Subsets with Repetitions. ICS 6C Sandy Irani

Transcription:

Universal Cycles for Permutations Theory and Applications Alexander Holroyd Microsoft Research Brett Stevens Carleton University Aaron Williams Carleton University Frank Ruskey University of Victoria

Combinatorial Generation Orders of combinatorial objects and efficient algorithms that create these orders Objects often represented as strings Concentrate on objects of a fixed size and composition Connections to graph theory Efficient algorithms often reveal structure I 5 6 7 Combinatorial objects represented by binary strings

Combinatorial Generation Historic Examples Binary reflected Gray code Patent,6,58 (97) BRGC for n= Hamilton cycle in the cube

Combinatorial Generation Historic Examples de Bruijn cycle (96) de Bruijn cycle for n= Eulerian cycle in the de Bruijn graph

Combinatorial Generation Historic Examples Johnson-Trotter-Steinhaus (96s) JTS for n= Hamilton cycle in the permutohedron

Definition The Permutohedron Let [n] = {,,...,n} Let τk be the adjacenttransposition (k k+) Nodes are labeled by the permutations of [n] Edges between nodes that differ by τ k for k є [n-] For example, is adjacent to,, and The Permutohedron for n=

Hamilton Cycles The Permutohedron Hamilton cycles are (cyclic) adj-transposition Gray codes Hamilton cycle uses a τk edge for each k є [n-] JTS generated by a loopless algorithm but successor is not trivial. For example, what follows 8567? Johnson-Trotter-Steinhaus for n=

Spanning Trees The Permutohedron We will see that the spanning trees of the permutohedron are a special type of Gray code We define two spanning trees in which it is easy to determine each vertex's parent and children JTS Spanning Tree

Spanning Trees The Permutohedron The declining prefix of a permutation of [n] is the longest prefix of the form n n- n- j The inclining symbol is the symbol is j- For example, in 8765 declining prefix: 876 inclining symbol: 5 The Declining Spanning Tree

Spanning Trees The Permutohedron The declining spanning tree is defined as follows: The root is n n- n- The parent of every other vertex is obtained by swapping the inclining symbol to the left. For example, the parent of 8765 is 8765 The Declining Spanning Tree

Spanning Trees The Permutohedron The decreasing prefix of a permutation of [n] is the longest prefix of the form a b c with a > b > c >... The increasing symbol is the symbol following the decreasing prefix For example, in 7568 decreasing prefix: 75 increasing symbol: 6 The Decreasing Spanning Tree

Spanning Trees The Permutohedron The decreasing spanning tree is defined as follows: The root is n n- n- The parent of every other vertex is obtained by swapping the increasing symbol to the left. For example, the parent of 7568 is 7568 The Decreasing Spanning Tree

Rotator Graph Definition Let σk be the prefix-shift ( k) Nodes are labeled by the permutations of [n] Arcs directed from nodes to nodes that differ by σ k for k є [n] (except for k=) For example, has arcs directed to,, and σ σ σ σ σ σ σ σ σ The rotator graph for n= is a particular Cayley graph σ σ σ

Hamilton Cycles Rotator Graph Hamilton cycles are (cyclic) prefix-shift Gray codes. σ σ σ Hamilton cycles do not necessarily use a σ k arc for each k є [n] σ σ σ Restricted rotator graphs use a subset of σ σ σ n Hamilton cycle Do they exist?

Combinatorial Generation Prefix-Shift Gray Codes Corbett (99) used the rotator graph for point-topoint multiprocessor networks Corbett for n= Corbett for n=

Combinatorial Generation Prefix-Shift Gray Codes W (9) cool-lex order. First symbol a is shifted past or between the first bc with b<c. First case if a>b and second case if a>b. If no such bc then past last symbol. cool-lex for n=

Universal Cycles Definition A universal cycle is a circular string containing each string in a set L exactly once as a substring If there are no universal cycles for L then a simple encoding of each string in L can be considered Decoding a universal cycle gives its Gray code of L A de Bruijn cycle for the binary strings of length

Permutations Universal Cycles Universal cycles for the permutations of [n] do not exist when n > A single permutation is forced to repeat

Universal Cycles Permutations using Relative Order Permutations can be encoded by relative order For example, 5 has the relative order of Johnson proved n+ symbols are sufficient for the permutations of [n] However, the Gray code is not a Gray code 5 5 5 Each permutation of [] is encoded by relative order 5

Universal Cycles Permutations using Shorthand Permutations can be encoded by shorthand For example, is shorthand for Shorthand encodings are the (n-)-perms of [n] Jackson proved universal cycles exist for the k-perms of [n] when k < n Each permutation of [] is encoded by shorthand Efficient Construction? -Knuth

Shorthand Universal Cycles for Permutations Gray Code using σ n / σ n- Each shorthand substring is followed by its missing symbol or its first symbol Permutations differ by a prefix shift σ n / σ n- Gray codes using σn / σ n- correspond to shorthand universal cycles for permutations 8 8 8 7 7 7 6 6 6 5 5 5 The next symbol is or 8 8765 followed by 7658 prefix shift of length 8 8765 followed by 7658 prefix shift of length 7 8

Shorthand Universal Cycles for Permutations Binary Representation Due to the σn / σ n- Gray code the cycle can be represented by n! bits / A cycle is max-weight or min-weight if the sum of its binary representation is the maximum or minimum among all such cycles Binary representation (outer) for the universal cycle (inner)

Shorthand Universal Cycles for Permutations Periodic If n appears as every nth symbol then the cycle is periodic The sub-permutations appear between each copy of n and are the permutations of [n-] A periodic shorthand universal cycle of the form...

Shorthand Universal Cycles for Permutations Applications The σn / σ n- operations are efficient in linked lists and circular arrays The σn / σ n- Gray code allows faster exhaustive solutions to Traveling Salesman problems like Shortest Hamilton Path Min-weight is desirable 8 7 6 5 7658 increment start 8 7 6 5 8765 is followed by or 8 7 6 5 7658 increment start adj-transposition

Shorthand Universal Cycles for Permutations Applications The σn / σ n- operations are efficient in linked lists and circular arrays The σn / σ n- Gray code allows faster exhaustive solutions to Traveling Salesman problems like Shortest Hamilton Path Min-weight is desirable 8 7 Path 8765 followed by... 8 7 5 6 Path 7658-87 +8 or 5 6 8 7 5 6 Path 7658-87 - +8 +8

Constructions Recycling The Gray code of a cycle for [n] are sub-permutations of a cycle for [n+] Gray code,,,,, Sub-permutations,,,,,

Constructions Recycling Any σn / σ n- Gray code for [n] are sub-permutations of a periodic cycle for [n+] This helped answer the question of Knuth's for an efficient construction by Ruskey-Williams Recycling inserts the symbol n+ between a given order of permutations of [n] Sub-permutations,,,,,

Constructions Recycling Holroyd-Ruskey-W proved cool-lex /7-order recyclable Stevens-W proved Corbett's order is recyclable Most orders not recyclable; adj-transposition Gray codes Cool-lex and 7-order give min-weight periodic cycles,,,,, cool-lex order Sub-permutations,,,,,

Min-Weight Periodic Cycles A Local View... 7658 7658 8765 6578 8765 8765 7658 8657 8765 8765 σ n n = id 6587 5867 8765 8765 σ n σ n- - σ n σ n- - = id 5876 7586 8765 8765 8765 8756 8765 6875 5876 8765 The Cayley graph with generators σ n / σ n- has alternating cycles of length four. If C is a Hamilton cycle, then the arcs on each -cycle satisfy: (i) both σ n arcs in C and both σ n- arcs not in C, or (ii) both σ n arcs not in C and both σ n- arcs in C.

Min-Weight Periodic Cycles A Local View... 7658 7658 8765 6578 8765 8765 7658 8657 8765 8765 6587 5867 8765 8765 5876 7586 8765 8765 8765 8765 6875 5876 8765 8756 Consider the contraction of each σ n n cycle.

Min-Weight Periodic Cycles A Local View... 8765 8765 8657 τ 7 τ 8765 8765 8675 τ 6 τ τ 5 τ 8765 8756 8765 Label nodes with rotation starting with n.

Min-Weight Periodic Cycles A Local View... 765 τ 6 τ 765 765 675 τ 5 τ τ τ 765 756 765 Remove two edges and relabel to get the permutohedron. Note: The universal cycle is periodic iff it does not use these two types of edges.

Min-Weight Periodic Cycles A Global View... Shorthand universal cycles are Hamilton cycles in the σ n / σ n- Cayley graph Cayley graph of the symmetric group for n= with generators σ n / σ n-

Min-Weight Periodic Cycles A Global View... Shorthand universal cycles are Hamilton cycles in the σ n / σ n- Cayley graph Hamilton cycles enter/exit each σ n n cycle so after contraction min-weight Ham cycles=spanning tree Directed cycles using σ n are contracted

Min-Weight Periodic Cycles A Global View... Shorthand universal cycles are Hamilton cycles in the σ n / σ n- Cayley graph Hamilton cycles enter/exit each σ n n cycle so after contraction min-weight Ham cycles=spanning tree Directed cycles using σ n are contracted

Min-Weight Periodic Cycles A Global View... Shorthand universal cycles are Hamilton cycles in the σ n / σ n- Cayley graph Hamilton cycles enter/exit each σ n n cycle so after contraction min-weight Ham cycles=spanning tree Edges are removed

Min-Weight Periodic Cycles A Global View... Shorthand universal cycles are Hamilton cycles in the σ n / σ n- Cayley graph Hamilton cycles enter/exit each σ n n cycle so after contraction min-weight Ham cycles=spanning tree Remove arcs to get the permutohedron and its spanning trees are periodic Vertices relabeled to obtain the permutohedron for n-

Min-Weight Periodic Cycles Characterization Theorem: There is a simple bijection between the min-weight periodic shorthand universal cycles for permutations of [n] and spanning trees of the permutohedron for [n-] The decreasing spanning tree for the permutohedron for []

Min-Weight Periodic Cycles Characterization Theorem: There is a simple bijection between the min-weight periodic shorthand universal cycles for permutations of [n] and spanning trees of the permutohedron for [n-] The shorthand universal cycle for the permutations of [] from cool-lex order

Memoryless Gray Code Algorithm The Gray codes for the cool-lex and 7-order shorthand universal cycles for permutations can be created by simple memoryless rules Rule for creating the 7-order shorthand universal cycle Gray code Rule for creating the cool-lex shorthand universal cycle Gray code

CAT Generation of Sub-Permutations cool-lex order 7-order Corbett (Hamilton cycle)

Loopless Generation of Binary Strings Loopless algorithm for the binary representation of the shorthand universal cycle whose sub-permutations are 7-order

Open and Closed Problems An efficient construction for (periodic) max-weight shorthand universal cycles is open An efficient construction for shorthand universal cycles for the permutations of a multiset has been solved Shorthand universal cycle for the permutations of {,,,,,} ie a fixed-density de Bruijn cycle for n=6 and d=