Combinatorial generation via permutation languages
Elizabeth J. Hartung, Hung Phuc Hoang, Torsten Mütze, Aaron Williams
Abstract
In this work we present a general and versatile algorithmic framework for exhaustively generating a large variety of different combinatorial objects, based on encoding them as permutations. This approach provides a unified view on many known results and allows us to prove many new ones. In particular, we obtain the following four classical Gray codes as special cases: the Steinhaus-Johnson-Trotter algorithm to generate all permutations of an n-element set by adjacent transpositions; the binary reflected Gray code to generate all n-bit strings by flipping a single bit in each step; the Gray code for generating all n-vertex binary trees by rotations due to Lucas, Roelants van Baronaigien, and Ruskey; the Gray code for generating all partitions of an n-element ground set by element exchanges due to Kaye.
We present two distinct applications for our new framework: The first main application is the generation of pattern-avoiding permutations, yielding new Gray codes for different families of permutations that are characterized by the avoidance of certain classical patterns, (bi)vincular patterns, barred patterns, boxed patterns, Bruhat-restricted patterns, mesh patterns, monotone and geometric grid classes, and many others. We also obtain new Gray codes for all the combinatorial objects that are in bijection to these permutations, in particular for five different types of geometric rectangulations, also known as floorplans, which are divisions of a square into n rectangles subject to certain restrictions.
The second main application of our framework are lattice congruences of the weak order on the symmetric group Sn. Recently, Pilaud and Santos realized all those lattice congruences as (n -1)-dimensional polytopes, called quotientopes, which generalize hypercubes, associahedra, permutahedra etc. Our algorithm generates the equivalence classes of each of those lattice congruences, by producing a Hamilton path on the skeleton of the corresponding quotientope, yielding a constructive proof that each of these highly symmetric graphs is Hamiltonian. We thus also obtain a provable notion of optimality for the Gray codes obtained from our framework: They translate into walks along the edges of a polytope.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers6
- Counting Small Permutation PatternsChaim Even-Zohar, Calvin LengSODA 2021 · 16 citations
- Efficient generation of elimination trees and graph associahedraJean Cardinal, Arturo Merino, Torsten MützeSODA 2022 · 9 citations
- Listing faces of polytopesNastaran Behrooznia, Sofia Brenner, Arturo Merino, Torsten Mütze et al.SODA 2026 · 3 citations
- Zigzagging through acyclic orientations of chordal graphs and hypergraphsJean Cardinal, Hung Phuc Hoang, Arturo Merino, Torsten MützeSODA 2023 · 3 citations
- Traversing combinatorial 0/1-polytopes via optimizationArturo Merino, Torsten MützeFOCS 2023 · 2 citations
Related papers
- Facet-HamiltonicityHugo A. Akitaya, Jean Cardinal, Stefan Felsner, Linda Kleist et al.SODA 2025
- Traversing regions of supersolvable hyperplane arrangements and their lattice quotientsSofia Brenner, Jean Cardinal, Thomas McConville, Arturo Merino et al.SODA 2026 · 3 citations
- Generating pivot Gray codes for spanning trees of complete graphs in constant amortized timeBowie Liu, Dennis Wong, Chan-Tong Lam, Sio-Kei ImSODA 2026 · 1 citation
- Learning Distributions over Permutations and Rankings with Factorized RepresentationsDaniel Severo, Brian Karrer, Niklas NolteICLR 2026 · 1 citation
- Factoring Pattern-Free Permutations into Separable onesEdouard Bonnet, Romain Bourneuf, Colin Geniet, Stéphan ThomasséSODA 2024 · 2 citations
