\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
\newtheorem{theorem}{Theorem}
\newcommand{\fix}{\operatorname{Fix}}
\newcommand{\SYT}{\operatorname{SYT}}
\title{Fixed points of permutations with a long first row}
\author{}
\date{}
\begin{document}
\maketitle
\vspace{-3em}
\noindent
William Q. Erickson asked for the limiting proportion of fixed points of a uniform permutation whose longest increasing subsequence has length $n-m$, with $m$ fixed. His Theorem 1.5 gives the Wallis integral for two-row and hook shapes. The same limit holds for each possible shape with a first row of length $n-m$. The proof identifies the integral with the probability that a uniformly marked gap in a balanced binary word has equally many letters of each kind on its left. See \href{https://arxiv.org/html/2605.00378v2#S1.Thmtheorem6}{Erickson, Problems 1.6 and 1.7}.

\begin{theorem}
Let $m\ge1$, let $\mu$ be a partition of $m$, and suppose $n-m\ge\mu_1$. For a uniformly chosen permutation $\sigma$ of Robinson--Schensted shape $(n-m,\mu)$,
\[
 \left|\mathbb E\!\left[\frac{|\fix(\sigma)|}{n}\right]-
 \frac{4^m}{(2m+1)\binom{2m}{m}}\right|
 \le\frac{3m^2+4m}{n}.
\]
The same bound holds when $\sigma$ is uniform over all permutations whose longest increasing subsequence has length $n-m$, whenever this set is nonempty.
\end{theorem}

\begin{proof}
Write $L=n-m$. Robinson--Schensted identifies the permutations of a fixed shape with ordered pairs of standard Young tableaux of that shape. Use $P$ for the insertion tableau and $Q$ for the recording tableau. Their first-row entries are
$p_1<\cdots<p_L$ and $q_1<\cdots<q_L$, respectively. Put $D=\#\{r:p_r=q_r\}$.

Recover the permutation by reverse row insertion, using the recording labels in decreasing order. When the label is in the first row at column $r$, the algorithm pops the last entry of the current first row, in slot $r$, and outputs it as $\sigma(q_r)$. When the recording label is below the first row, the algorithm reverse-bumps an entry into the first row. This operation replaces a single entry in its existing slot by the incoming value and outputs the displaced entry. No other first-row slot changes. There are exactly $m$ such replacements. Hence at most $m$ slots can differ from their initial values when popped. The $m$ inputs outside the first row can themselves contribute at most $m$ fixed points, giving
\[
 \bigl||\fix(\sigma)|-D\bigr|\le2m.
\]

Under the uniform distribution of $\sigma$ at fixed shape, $P$ and $Q$ are independent uniform standard tableaux. To sample one, first choose a uniform $m$-subset $A\subseteq[n]$ and an independently uniform tableau of shape $\mu$. Replace its labels $1,\ldots,m$ by the elements of $A$ in increasing order, put it below the first row, and fill the first row with the complement of $A$ in increasing order. Condition on the resulting filling being standard. Every standard tableau arises from exactly one pair of choices. If $A$ misses $[m]$, the first $\mu_1$ entries in the top row are $1,\ldots,\mu_1$ and the filling is standard. The probability of failure is at most $m^2/n$ by the union bound. When such a disjoint choice cannot occur, this probability bound still holds.

Use this construction independently for both tableaux. Removing the two standardness conditions changes the expectation of $D/n\in[0,1]$ by at most $2m^2/n$. Indeed, for any random variable in $[0,1]$, conditioning on an event of positive probability changes its expectation by at most the probability of the complementary event.

We now have independent uniform $m$-subsets $A,B$ and their increasing complements. Take a uniform independent $U\in[n]$. The mean of $D/n$ equals the probability that $U$ occurs in both complements at the same rank. Except on an event of probability at most $(m^2+2m)/n$, the sets $A,B,\{U\}$ are pairwise disjoint. On this disjointness event the rank condition says exactly that the numbers of elements of $A$ and $B$ below $U$ are equal.

For $n\ge2m+1$, condition on disjointness and read the positions of $A,B,U$ in increasing order. The result is a uniform word of $m$ letters of each of two kinds with one uniformly marked gap. A gap after $j$ letters of each kind occurs in
$\binom{2j}{j}\binom{2m-2j}{m-j}$ such word-gap pairs. Since
$\sum_{j\ge0}\binom{2j}{j}x^j=(1-4x)^{-1/2}$, the total number of favorable pairs is
\[
 \sum_{j=0}^m\binom{2j}{j}\binom{2m-2j}{m-j}
 =[x^m](1-4x)^{-1}=4^m.
\]
Dividing by $(2m+1)\binom{2m}{m}$ gives the required value with cumulative error at most $(3m^2+4m)/n$. For $n<2m+1$ the bound exceeds one, so it also holds there.

The Wallis recurrence, or integration by parts, gives
\[
 \int_0^{\pi/2}\sin^{2m+1}x\,dx
 =\frac{(2m)!!}{(2m+1)!!}
 =\frac{4^m}{(2m+1)\binom{2m}{m}}.
\]
Finally, Schensted's theorem identifies the first-row length with the longest increasing subsequence length. The uniform law at a specified length is a mixture of the fixed-shape laws, each satisfying the same bound.
\end{proof}

\clearpage
\section*{A direct proof for uniform permutations of fixed subsequence length}
The following argument proves Problem 1.6 without tableaux and gives the proof implemented in Lean. Assume $n$ is large relative to the fixed $m$. Choose independent uniform $m$-element subsets $A,B\subseteq[n]$ and a uniform bijection $A\to B$. Extend it to a permutation $p$ by mapping the ordered complement of $A$ increasingly to the ordered complement of $B$. Every permutation of longest increasing subsequence length $n-m$ has such an encoding. Choose one of its longest increasing subsequences and let $A$ and $B$ be the omitted positions and values.

Call an encoding separated if $|i-j|>m$ for all $i\in A$ and $j\in B$. Independence and the union bound give
\[
 \mathbb{P}(\text{encoding is not separated})\le\frac{m^2(2m+1)}{n}.
\]
Indeed, for each of the at most $n(2m+1)$ nearby ordered pairs, the probability of membership in $A\times B$ is $(m/n)^2$.

In any increasing subsequence of length at least $n-m$, its $r$th entry occurs at a position and a value both between $r$ and $r+m$. Separation therefore excludes every position in $A$ from each such subsequence. The complement of $A$ is the unique longest increasing subsequence, of length $n-m$. Its omitted positions, omitted values, and the bijection between them are recoverable from $p$, so a separated encoding is the only encoding of its permutation.

Let $E$ be the set of all encodings, $H$ its separated subset, and $P$ the target set of permutations. Since $H$ identifies with a subset of $P$ and every target has an encoding, $|H|\le|P|\le|E|$. For any statistic taking values in $[0,1]$, the uniform averages on $E$ and $P$ differ by at most $(|E|-|H|)/|E|$. To see this, the two distributions on permutations both assign at least $1/|E|$ of their mass to each image of $H$. Remove this common mass. Each remaining distribution has mass at most $1-|H|/|E|$.

For a uniform position $U$, on the event that $A,B,\{U\}$ are pairwise disjoint, $p(U)=U$ precisely when equal numbers of elements of $A$ and $B$ fall below $U$. The marked-word calculation above gives this conditional probability exactly, and the disjointness event fails with probability at most $(m^2+2m)/n$. Combining the two errors gives
\[
 \left|\mathbb E_{p\in P}\frac{|\fix(p)|}{n}-W_{2m+1}\right|
 \le\frac{m^2(2m+1)+m^2+2m}{n}.
\]
This tends to zero at fixed $m$. The formal statement \texttt{uniform\_fixedPoint\_proportions} expresses the left-hand expectation as the sum of the individual fixed-point proportions divided by the number of permutations in $P$.
\end{document}
