Exhaustive Generation of Pattern-Avoiding s-Words

📅 2025-08-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the exhaustive generation of pattern-avoiding languages over multiset permutations (s-words). To overcome the limitation that classical permutation generation algorithms—such as plain changes and Algorithm J—do not generalize naturally to multisets, we introduce a “collision” operation as a substitute for traditional jump operations, and devise a greedy, rule-based generation framework: collisions are executed according to three prioritized criteria—maximum value first, maximum index first, and rightmost preference—yielding Gray-code orderings. We present the first efficient algorithm for generating s-Stirling words, construct novel Gray codes for multiple s-Catalan families—including s-Dyck paths and s-ballot sequences—and establish Hamiltonian paths on the s-permutahedron, thereby unifying the generation of several classes of mildly restricted pattern-avoiding languages. These results extend combinatorial generation theory and significantly improve both efficiency and generality in structured enumeration under multiset constraints.

Technology Category

Application Category

📝 Abstract
The most well-known Gray code of permutations is plain changes. It was discovered in the 1600s by bell-ringers who wished to order the permutations of [n] by swaps (e.g., 123, 132, 312, 321, 231, 213 for n = 3). In other words, plain changes traces a Hamilton path in the permutohedron. In 2013 it was shown that plain changes can be generated by a greedy algorithm: swap the largest value. Algorithm J replaces the swap operation with the jump operation (which moves a larger digit past one or more smaller digits) and forms the basis of the wildly successful Combinatorial Generation via Permutation Languages series of papers. Here we further generalize this line of research to languages of s-words (i.e., multiset permutations). We generalize jumps to bumps, which moves a sequential run of the same larger digit past one or more smaller digits. Algorithm B greedily applies minimum-length bumps prioritized by largest value, then largest index, then rightward before leftward (e.g. 1122, 1221, 1212, 2112, 2121, 2211 for s = (2, 2)). We show that the algorithm works for s-word languages avoiding a wide variety of tame patterns. Specific applications include efficient algorithm for generating s-Stirling words (which avoid 121) and new Gray codes for various s-Catalan objects (which avoid 132 and 121). The former result leads to Hamilton paths in every s-permutahedron.
Problem

Research questions and friction points this paper is trying to address.

Generalize permutation generation to multiset permutations
Develop greedy algorithm for pattern-avoiding s-words
Generate Gray codes for s-Stirling and s-Catalan objects
Innovation

Methods, ideas, or system contributions that make the work stand out.

Generalizes jumps to bumps for s-words
Uses greedy algorithm with prioritized bump operations
Generates pattern-avoiding s-words efficiently
🔎 Similar Papers
No similar papers found.
S
Samuel Buick
Williams College
M
Madeleine Goertz
Williams College
A
Amos Lastmann
Williams College
Kunal Pal
Kunal Pal
Williams College
H
Helen Qian
Williams College
S
Sam Tacheny
Williams College
Aaron Williams
Aaron Williams
Associate Professor of Computer Science, Williams College
AlgorithmsCombinatoricsCombinatorial GenerationComputational ComplexityVideo Game History
L
Leah Williams
Williams College
Y
Yulin Zhai
Williams College