Skip to main content
QUICK REVIEW

[Paper Review] Stack-sorting for Words

Colin Defant, Noah Kravitz|arXiv (Cornell University)|Sep 24, 2018
semigroups and automata theoryComputer Science5 citations
TL;DR

This paper introduces two new stack-sorting operators, $τ$-hare and $τ$-tortoise, which generalize West's stack-sorting map to words with repeated letters. It establishes that the tortoise operator can sort certain words arbitrarily faster than the hare operator, develops a generalized theory of valid hook configurations to compute preimage counts, and proves that $ε$-uniform words avoiding $231$ and $221$ are enumerated by the $(\ell+1)$-Catalan number.

ABSTRACT

We introduce operators $\mathsf{hare}$ and $\mathsf{tortoise}$, which act on words as natural generalizations of West's stack-sorting map. We show that the heuristically slower algorithm $\mathsf{tortoise}$ can sort words arbitrarily faster than its counterpart $\mathsf{hare}$. We then generalize the combinatorial objects known as valid hook configurations in order to find a method for computing the number of preimages of any word under these two operators. We relate the question of determining which words are sortable by $\mathsf{hare}$ and $\mathsf{tortoise}$ to more classical problems in pattern avoidance, and we derive a recurrence for the number of words with a fixed number of copies of each letter (permutations of a multiset) that are sortable by each map. In particular, we use generating trees to prove that the $\ell$-uniform words on the alphabet $[n]$ that avoid the patterns $231$ and $221$ are counted by the $(\ell+1)$-Catalan number $\frac{1}{\ell n+1}{(\ell+1)n\choose n}$. We conclude with several open problems and conjectures.

Motivation & Objective

  • To extend West's stack-sorting map from permutations to words with repeated letters.
  • To define and analyze two new stack-sorting operators, $τ$-hare and $τ$-tortoise, differing in how equal elements interact in the stack.
  • To develop a generalized theory of valid hook configurations to compute the number of preimages of any word under these operators.
  • To relate sortable words under these operators to classical pattern-avoidance problems and derive enumerative results.
  • To investigate the fertility (number of preimages) of words and conjecture that all non-negative integers arise as fertilities under both operators.

Proposed method

  • Define the $τ$-hare and $τ$-tortoise operators as natural generalizations of West's stack-sorting map to words, with distinct rules for handling equal elements in the stack.
  • Introduce the concept of normalized words and exceptional words to analyze edge cases in the sorting process.
  • Generalize the notion of valid hook configurations to handle multisets and compute preimage counts under the two operators.
  • Use generating trees and recursive decomposition to derive a recurrence for the number of sortable words with a fixed multiset of letters.
  • Prove that $ε$-uniform words avoiding the patterns $231$ and $221$ are counted by the $(\ell+1)$-Catalan number $\frac{1}{\ell n+1}\binom{(\ell+1)n}{n}$.
  • Analyze the asymptotic behavior of exceptional words and conjecture that the ratio of exceptional to normalized words is increasing with length.

Experimental results

Research questions

  • RQ1How do the $τ$-hare and $τ$-tortoise operators compare in sorting speed for words with repeated letters?
  • RQ2What is the number of preimages of a given word under the $τ$-hare and $τ$-tortoise operators?
  • RQ3Which words are sortable by the $τ$-hare and $τ$-tortoise operators, and how does this relate to classical pattern-avoidance?
  • RQ4Are all non-negative integers achievable as fertilities (i.e., number of preimages) under these operators?
  • RQ5What is the asymptotic density of exceptional words (those that do not sort correctly under the standard rules) among normalized words?

Key findings

  • The $τ$-tortoise operator can sort certain words arbitrarily faster than the $τ$-hare operator, demonstrating a significant performance advantage.
  • The number of $ε$-uniform words on the alphabet $[n]$ that avoid the patterns $231$ and $221$ is given by the $(\ell+1)$-Catalan number $\frac{1}{\ell n+1}\binom{(\ell+1)n}{n}$.
  • The set of exceptional normalized words of length $m$ is non-empty for $m \geq 7$, with $|\mathcal{E}_7| = 4$, $|\mathcal{E}_8| = 172$, and $|\mathcal{E}_9| = 5001$.
  • The ratio of exceptional to normalized words increases with $m$, suggesting a positive limiting density, and the authors conjecture that $\lim_{m\to\infty} |\mathcal{E}_m|/|\mathcal{NW}_m|$ exists.
  • Every non-negative integer arises as the fertility (number of preimages) of some word under both the $τ$-hare and $τ$-tortoise operators.
  • The authors conjecture that there are infinitely many positive integers that are not fertilities of any permutation under these operators, and pose open questions about fertility in $2$-uniform words.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.