The lattice of integer flows of a regular matroid

Abstract: For a finite multigraph G, let \Lambda(G) denote the lattice of integer flows of G -- this is a finitely generated free abelian group with an integer-valued positive definite bilinear form. Bacher, de la Harpe, and Nagnibeda show that if G and H are 2-isomorphic graphs then \Lambda(G) and \Lambda(H) are isometric, and remark that they were unable to find a pair of nonisomorphic 3-connected graphs for which the corresponding lattices are isometric. We explain this by examining the lattice \Lambda(M) of integer flows of any regular matroid M. Let M_\bullet be the minor of M obtained by contracting all co-loops. We show that \Lambda(M) and \Lambda(N) are isometric if and only if M_\bullet and N_\bullet are isomorphic.

\section{Introduction.}

Let $G=(V,E)$ be a (finite undirected connected multi-) graph.
Choose an arbitrary orientation for each edge of $G$, and let $D$
be the corresponding signed incidence matrix:\ $D$ is the $V$-by-$E$ matrix
with entries given by
$$
D_{ve} = \cases{
+1  & \mathrm{if}\ e\ \mathrm{points\ into}\ v\ \mathrm{but\ not\ out},\\
-1 & \mathrm{if}\ e\ \mathrm{points\ out\ of}\ v\ \mathrm{but\ not\ in},\\
0  & \mathrm{otherwise}.}
$$
The matrix $D$ defines a linear transformation $D:\RR^{E}\rightarrow\RR^{V}$.
The \emph{lattice of integer flows} of $G$ is
$\Lambda(G)=\mathrm{ker}(D)\cap\ZZ^{E}$.  This is a finitely generated
free abelian group with a positive definite integer-valued inner product
$\langle\cdot,\cdot\rangle$ induced by the Euclidean dot product on $\RR^{E}$.
Of course, the set $\Lambda(G)$ depends on the
choice of orientations defining the matrix $D$.  Reversing the
orientation of the edge $e\in E$ results in changing the sign of
the $e$-th coordinate of every element of $\Lambda(G)$.  This changes
neither the group structure nor the inner product structure of the lattice
$(\Lambda(G),+,\langle\cdot,\cdot\rangle)$.  Thus, the isometry class of this
lattice is independent of the choice of orientations of the edges, and
depends only on the isomorphism class of $G$.
(An \emph{isometry} of lattices $\Lambda$ and $\Lambda'$ is a bijection
$\psi:\Lambda\rightarrow\Lambda'$ such that both $\psi$ and $\psi^{-1}$
are abelian group homomorphisms that preserve the bilinear forms on the
lattices.)  Bacher, de~la~Harpe, and
Nagnibeda \cite{BHN} and Biggs \cite{Bi} thoroughly develop the theory of
these lattices and their many interpretations, connections, and analogues.

A natural question of reconstruction arises:\ to what extent can
properties of the graph $G$ be
determined from the isometry class of the lattice $\Lambda(G)$?
Cut-edges of $G$ contribute nothing to $\Lambda(G)$.  Proposition 5 of
Bacher, de~la~Harpe, and Nagnibeda \cite{BHN} shows that if $G$ and
$H$ are $2$-isomorphic then $\Lambda(G)$ and $\Lambda(H)$ are
isometric.   They remark (on page 197) that they were unable to find a pair
of nonisomorphic $3$-connected graphs with isometric lattices
of integer flows.  By Whitney's theorems \cite{Wh} on $2$-isomorphism of
graphs, this suggests that $\Lambda(G)$ and $\Lambda(H)$ are isometric
if and only if the graphic matroids $\EuScript{M}(G)$ and $\EuScript{M}(H)$ are isomorphic
except for co-loops.

This is indeed the case, as follows from Theorem \ref{main} below.
For any matroid $\EuScript{M}$, let $\EuScript{M}_\bullet$ denote the
minor of $\EuScript{M}$ obtained by contracting all co-loops of $\EuScript{M}$.
Let $(\EuScript{M},E)$ be a regular matroid of rank $r$ on a ground-set $E$.
Then $\EuScript{M}$ has a unique representation (over $\RR)$ as the column-matroid
of a totally unimodular (TU) matrix $M$ (modulo representation equivalence).
The \emph{lattice of integer flows} of $\EuScript{M}$ is
$\Lambda(\EuScript{M})=\mathrm{ker}(M)\cap\ZZ^{E}$.
This generalizes the construction for graphs, in which case
$M$ is the signed incidence matrix of a connected graph with any row deleted.
The isometry class of the lattice $\Lambda(\EuScript{M})$ is independent of the
choice of representing matrix $M$, and depends only on the isomorphism
class of $\EuScript{M}$.  In his foundational work on representability of
matroids, Tutte worked with a more general concept of
``chain-groups'' in which the coefficients are from any integral
domain; see \cite{Tut2}, for example.  The chain-group of
$\EuScript{M}$ with integer coefficients is, in our notation, $\Lambda(\EuScript{M}^{*})$.

\begin{THM} \label{main}
Let $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ be regular matroids.  Then
$\Lambda(\EuScript{M})$ and $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are isometric if and only
if $\EuScript{M}_\bullet$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet$ are isomorphic.
\end{THM}

\begin{CORO}
Let $G$ and $H$ be $3$-connected graphs.  Then
$\Lambda(G)$ and $\Lambda(H)$ are isometric if and only if
$G$ and $H$ are isomorphic.
\end{CORO}
\begin{proof}
Whitney \cite{Wh} shows that $3$-connected graphs $G$ and $H$ are
isomorphic if and only if $\EuScript{M}(G)$ and $\EuScript{M}(H)$ are isomorphic.
Also, since $G$ has no cut-edges $\EuScript{M}(G)$ has no co-loops, so
that $\EuScript{M}(G)_\bullet=\EuScript{M}(G)$, and similarly for $\EuScript{M}(H)$.
The corollary now follows from Theorem \ref{main}.
\end{proof}

Our strategy for proving Theorem \ref{main} is to identify metric properties
of a basis $\EuScript{B}$ of an integral lattice $\Lambda$ that correspond
to $\Lambda$ being the lattice $\Lambda(\EuScript{M})$ of integer flows of a
regular matroid $\EuScript{M}$, and to $\EuScript{B}$ being a fundamental basis $\EuScript{B}(\EuScript{M},B)$
of $\Lambda(\EuScript{M})$ consisting of signed circuits associated with a base $B$
of $\EuScript{M}$. (Since we are dealing both with lattices and with matroids we
use the word ``basis'' for a basis of a lattice, but ``base'' for what is
usually called a basis of a matroid.)

The implementation of this strategy rests on two key ideas.
The first key is a characterization of the signed circuits (or ``simple
flows'') of $\EuScript{M}$ in terms of metric data of the lattice $\Lambda(\EuScript{M})$, without
reference to their coordinates as vectors in $\ZZ^{E}$.  The second key is to
identify properties of a symmetric integer matrix $A$ which correspond to the
existence of a TU matrix $U$ such that $U^\dagger U = A$:\  we find a necessary
condition on $A$ which we call ``$g$-nonnegativity''; to any $g$-nonnegative
matrix $A$ we associate a certain $\{0,1\}$-matrix  $X(A)$;\ finally, such a $U$
exists if and only if $X(A)$ has a TU signing $U$ such that $U^\dagger U = A$.
An auxiliary result about TU matrices then enables us to complete the proof
of Theorem \ref{main}.

In Section 2 we briefly review some preliminary facts concerning
totally unimodular matrices, regular matroids, and integer flows and cuts.
In Section 3 we develop some facts about signed circuits (or simple flows),
culminating in their characterization by metric data.  In Section 4 we introduce
$g$-nonnegative, $g$-positive, and $g$-feasible matrices, and prove Theorem
\ref{main}.  In Section 5 we conclude with some subsidiary results and examples,
and two conjectures.

We thank the anonymous referees for their constructive criticism, and one
especially for the references and comments regarding Proposition
\ref{cons-decomp} and Conjecture \ref{sixth-root}.

\section{Preliminaries.}

\subsection{Totally unimodular matrices.}

For a matrix $M$ of real numbers, let $M^{\sharp}$ be the matrix of
absolute values of the entries of $M$.
A matrix $U$ with entries in $\ZZ$ is \emph{totally unimodular} (TU) if
every square submatrix of $U$ has determinant in the set $\{-1,0,+1\}$.
For a $\{0,1\}$-matrix $X$, a \emph{totally unimodular signing} of
$X$ is a TU matrix $U$ such that $U^{\sharp} = X$.
A matrix $Q$ with entries in $\ZZ$ is \emph{weakly unimodular} (WU) if
every maximal square submatrix of $Q$ has determinant in the set
$\{-1,0,+1\}$.  Let $I_s$ denote the $s$-by-$s$ identity matrix.
The proof of Lemma \ref{wu2tu} is elementary, and is omitted.

\begin{LMA} \label{wu2tu}
If an $m$-by-$s$ matrix $U$ is WU and contains $I_s$ as a submatrix,
then $U$ is TU.
\end{LMA}

\begin{LMA}[Camion, see Lemma 13.1.6 of \cite{Ox}] \label{camion}
Let $Q$ and $U$ be TU matrices such that $Q^{\sharp} = U^{\sharp}$.
Then $Q$ can be changed into $U$ by multiplying some rows and columns by
$-1$.
\end{LMA}

Theorem 13.1.3 of \cite{Ox} determines exactly which $\{0,1\}$-matrices have TU
signings, although we do not need this result until Example \ref{eg1}.

\subsection{Regular matroids.}

A \emph{regular} matroid $(\EuScript{M},E)$ is the column-matroid of
some $r$-by-$m$ TU matrix $M$ of rank $r$, represented over the real
field $\RR$.  The columns of $M$ are labelled by the set $E$. Two
$\FF$-representations $M$ and $M'$ of a matroid are \emph{equivalent} if
there is an $r$-by-$r$ matrix $F$ invertible over $\FF$, an
$E$-by-$E$ $\FF$-weighted permutation matrix $P$, and a field
automorphism $\sigma:\FF\rightarrow\FF$ such that
$$
M' = \sigma(FMP).
$$
(The column labels $E$ are also permuted according to $P$.)  Regular matroids
are \emph{uniquely representable} over any field $\FF$, meaning that any two
$\FF$-representations of a regular matroid are equivalent (Corollary 10.1.4
of \cite{Ox}).

Let $\EuScript{M}$ be represented by a TU matrix $M$.
If $B\subseteq E$ is a base of $\EuScript{M}$ then there is a signed permutation
matrix $P$ bringing the labels in $B$ into the first $r$ positions,
and a matrix $F$, invertible over $\ZZ$, such that
$$
FMP = [ I_{r}\ L ]
$$
for some $r$-by-$s$ matrix $L$, where $s=m-r$.  This is a
representation of $\EuScript{M}$ \emph{coordinatized by $B$}.
Since $M$ is TU, $F$ is invertible over $\ZZ$, and $P$ is a signed permutation
matrix, it follows that $FMP$ is WU.  From Lemma \ref{wu2tu} (and transposition)
it follows that $[I_r\ L]$ is also TU (see also Lemmas 2.2.20 and 2.2.21
of \cite{Ox}).

\subsection{Integer flows, duality, and integer cuts.}

Let $(\EuScript{M},E)$ be a regular matroid represented by the $r$-by-$m$
TU matrix $M$.  The \emph{lattice of integer flows of $\EuScript{M}$} is
$$
\Lambda(\EuScript{M}) = \ker(M) \cap \ZZ^{E},
$$
defined up to isometry.  If $B$ is a base of $\EuScript{M}$ and $M=[I_{r}\ L]$ is a
representation of $\EuScript{M}$ coordinatized by $B$, then the matrix
$$
U = \left[\begin{array}{c} -L\\  I_{s}\end{array}\right]
$$
is such that $MU=O$.  Since $M$ is TU it follows that $U$ is TU, and
since $U$ has rank $s=\dim\ker(M)$, the columns of $U$ form
an ordered basis $\EuScript{B}(\EuScript{M},B)=\{\beta_{1},\ldots,\beta_{s}\}$ of $\Lambda(\EuScript{M})$.
This is a \emph{fundamental basis of $\Lambda(\EuScript{M})$ coordinatized by $B$}.

If $\EuScript{M}$ is represented by $M=[I_{r}\ L]$ then the \emph{dual matroid}
$\EuScript{M}^{*}$ is represented by $U^{\dagger} = [-L^{\dagger}\ I_{s}]$.
If $M$ is TU then $U^\dagger$ is TU.  The \emph{lattice of integer cuts} of
a regular matroid $\EuScript{M}$, represented by $M$, is
$$
\Gamma(\EuScript{M}) = \mathrm{Row}(M)\cap \ZZ^{E},
$$
in which $\mathrm{Row}(M)$ denotes the row-space of $M$.  As a set this depends
on $M$, but it is well-defined up to isometry.  From the above, it is clear that
$\Lambda(\EuScript{M})$ and $\Gamma(\EuScript{M}^{*})$ are isometric.  Since the
definition of $\Lambda(\EuScript{M})$ implicitly involves matroid duality, some of our
arguments could be simplified slightly by considering $\Gamma(\EuScript{M})$ instead.
However, to keep things straight we will consider only $\Lambda(\EuScript{M})$,
except in Subsection 5.1.

Lemma \ref{basis-wu} is a familiar fact, but we prefer to phrase it
just the way we want.
\begin{LMA} \label{basis-wu}
Let $(\EuScript{M},E)$ be a regular matroid of rank $r$ on a set $E$ of size
$m$, and let $s=m-r$.  Let $\EuScript{B}$ be any basis for $\Lambda(\EuScript{M})$, and let
$Q$ be an $E$-by-$s$ matrix with columns given by the elements of $\EuScript{B}$.
Then $Q$ is WU.
\end{LMA}
\begin{proof}
Pick a base $B$ of $\EuScript{M}$ and let $M=[I_{r}\ L]$ represent $\EuScript{M}$
coordinatized by $B$.  Then $\EuScript{B}'=\EuScript{B}(\EuScript{M},B)$ is another basis
for $\Lambda(\EuScript{M})$, and any matrix $U$ with these columns is TU.
Since $\EuScript{B}'$ and $\EuScript{B}$ are both bases for the lattice
$\Lambda(\EuScript{M})$, the change of basis matrix $F$ such that $Q = U F$ has
$\det F=\pm 1$.  Since $U$ is WU it follows that $Q$ is WU.
\end{proof}

If $\EuScript{B}=\{\beta_{1},\ldots,\beta_{s}\}$ is any ordered set of vectors in an
inner-product space, then the \emph{Gram matrix}
$\mathrm{Gram}(\EuScript{B})=A=(a_{ij})$ of $\EuScript{B}$ is the $s$-by-$s$ matrix with entries
$a_{ij} = \langle \beta_{i},\beta_{j} \rangle$ for all $1\leq i,j\leq s$.
Two lattices $\Lambda$ and $\Lambda'$ are isometric if and only if
they have ordered bases $\EuScript{B}$ and $\EuScript{B}'$, respectively, such that
$\mathrm{Gram}(\EuScript{B})=\mathrm{Gram}(\EuScript{B}')$.

\section{Simple flows, or signed circuits.}

\subsection{Basic facts.}
Let $(\EuScript{M},E)$ be a regular matroid represented by a TU matrix $M$, and let
$\Lambda(\EuScript{M})=\ker(M)\cap\ZZ^{E}$ be its lattice of integer flows (relative to
$M$).  For a column vector $\beta\in\ZZ^{E}$, the \emph{support} of $\beta$
is the subset
$$
\mathrm{supp}(\beta) = \{e\in E:\ \beta(e)\neq 0\}
$$
of $E$.  For $\beta\in\Lambda(\EuScript{M})$ we have $M\beta = \boldsymbol{0}$, so that
if $\beta\neq\boldsymbol{0}$ then $\mathrm{supp}(\beta)$ is a dependent set in $\EuScript{M}$, and hence
contains a circuit (\emph{i.e.} a minimal dependent set) of $\EuScript{M}$.

We require the following familiar facts (and include supporting arguments
as proof sketches).

\begin{LMA} \label{fact-a}
For every $\beta\in\Lambda(\EuScript{M})$, if $\mathrm{supp}(\beta)$ is a circuit $C$
then $\beta$ spans the subspace of $\ker(M)$ consisting of vectors with
support contained in $C$.
\end{LMA}
\begin{proof}[Proof sketch.]
If there were another linearly independent vector in this subspace then we
could produce a dependent set of $\EuScript{M}$ properly contained in $C$, a
contradiction.
\end{proof}

\begin{LMA} \label{fact-b}
For every $\beta\in\Lambda(\EuScript{M})$, if $\mathrm{supp}(\beta)$ is a circuit $C$
then all nonzero coordinates of $\beta$ have the same absolute value.
\end{LMA}
\begin{proof}[Proof sketch.]
Let $M_C$ be the submatrix of $M$ supported on columns in $C$,
and write one of the columns of $M_C$ as a linear combination of the others.
This system of linear equations may be redundant -- reducing to an irredundant
subsystem, it can then be solved by Cramer's Rule, and all the
determinants involved are in $\{-1,0,+1\}$ since $M$ is TU.
\end{proof}

An element of $\Lambda(\EuScript{M})$ is a \emph{simple flow} (or signed
circuit) if it is nonzero, all of its coordinates are in the set $\{-1,0,+1\}$,
and its support is a circuit of $\EuScript{M}$.  Let $\S(\EuScript{M})$ denote the set of all simple flows in $\Lambda(\EuScript{M})$.

\begin{LMA} \label{fact-c}
For every circuit $C$ of $\EuScript{M}$ there are exactly two simple flows
$\pm\alpha_C$ with support equal to $C$.
\end{LMA}
\begin{proof}[Proof sketch.]
Since $C$ is dependent, there is a nonzero $\beta\in\ker(M)$ with
$\mathrm{supp}(\beta)\subseteq C$.  Since $C$ is a circuit, $\mathrm{supp}(\beta)=C$.
Now Lemma \ref{fact-c} follows from Lemmas \ref{fact-a} and \ref{fact-b}.
\end{proof}

\begin{LMA} \label{fact-d}
If $B$ is a base of a regular matroid $\EuScript{M}$ then every element of
$\EuScript{B}(\EuScript{M},B)$ is a simple flow in $\Lambda(\EuScript{M})$, and hence $\S(\EuScript{M})$ spans
$\Lambda(\EuScript{M})$.
\end{LMA}
\begin{proof}[Proof sketch.]
Each element of $\EuScript{B}(\EuScript{M},B)$ is supported on a circuit, as one easily verifies.
\end{proof}

\begin{LMA} \label{fact-e}
If $M'$ is another matrix that represents $\EuScript{M}$ then
an element of $\Lambda(\EuScript{M})$ is a simple flow relative to $M'$
if and only if it is a simple flow relative to $M$.
\end{LMA}
\begin{proof}[Proof sketch.]
By uniqueness of representation for regular matroids, $M'=FMP$
as in Subsection 2.2.  Note that $\beta\in\ker(M')\cap\ZZ^E$ corresponds
to $P\beta\in\ker(M)\cap\ZZ^E$, and that $P$ is a signed permutation matrix.
\end{proof}

\subsection{Consistent decompositions.}

By Lemma \ref{fact-d}, each flow in $\Lambda(\EuScript{M})$ can be expressed as a sum
of simple flows.  For $\beta\in\Lambda(\EuScript{M})$, a
\emph{consistent decomposition of $\beta$} is a multiset $\EuScript{A}$ of simple
flows such that:\\
(i)\ $\beta = \sum_{\alpha\in\EuScript{A}}\alpha$;\\
(ii)\ for all $\alpha\in\EuScript{A}$, $\mathrm{supp}(\alpha)\subseteq\mathrm{supp}(\beta)$;\\
(iii)\ for all $\alpha\in\EuScript{A}$ and $e\in E$, $\alpha(e)\beta(e)\geq 0$.

Proposition \ref{cons-decomp} is due to Tutte (Theorem 6.2 of \cite{Tut1}
or Theorem 5.43 of \cite{Tut2}).  We reproduce his proof for completeness
and the readers' convenience.

\begin{PROP}[Tutte] \label{cons-decomp}
Let $(\EuScript{M},E)$ be a regular matroid represented by a WU matrix $M$.
Then every $\beta\in\Lambda(\EuScript{M})$ has a consistent decomposition $\EuScript{A}$.
\end{PROP}
\begin{proof}
We begin by showing that if $\beta\neq\boldsymbol{0}$ then there exists a simple flow
$\alpha$ that \emph{conforms to $\beta$} in the sense that
$\mathrm{supp}(\alpha)\subseteq\mathrm{supp}(\beta)$ and $\alpha(e)\beta(e)>0$ for all
$e\in\mathrm{supp}(\alpha)$.  If there is a counterexample then there is such
a counterexample $\beta$ with $\mathrm{supp}(\beta)$ minimal.  By Lemmas
\ref{fact-a}, \ref{fact-b}, and \ref{fact-c},
$\mathrm{supp}(\beta)$ is not a circuit.  By Lemma \ref{fact-c},  again, there is
a simple flow $\alpha$ with $\mathrm{supp}(\alpha) \subseteq \mathrm{supp}(\beta)$.
Let $e\in\mathrm{supp}(\alpha)$ be such that $|\beta(e)|$ is minimal.
Replacing $\alpha$ by $-\alpha$ if necessary, we may assume that
$\alpha(e)\beta(e)>0$.  Now $\beta' = \beta-\beta(e)\alpha$ has
$\mathrm{supp}(\beta') \subset \mathrm{supp}(\beta)$.  If $\beta'=\boldsymbol{0}$ then
$\alpha$ conforms to $\beta$.  Otherwise, since $\beta$ was a minimal
counterexample, there is a simple flow $\alpha'$ conforming to $\beta'$.
From the choice of $e\in\mathrm{supp}(\alpha)$ it follows that $\alpha'$
conforms to $\beta$ as well, a contradiction.

The proposition now follows from the base case $\beta=\boldsymbol{0}$ (which
has the consistent decomposition $\EuScript{A}=\varnothing$) by an easy induction on
$||\beta||=\sum_{e\in E}|\beta(e)|$.  For the induction step, let
$||\beta||>0$ and let $\alpha$ be a simple flow conforming to $\beta$.
Then $\beta'=\beta-\alpha$ has $||\beta'||<||\beta||$, so by induction
it has a consistent decomposition $\EuScript{A}'$.   Thus,
$\EuScript{A}=\EuScript{A}\cup\{\alpha\}$ is a consistent decomposition of $\beta$.
\end{proof}

\subsection{Metric characterization.}

\begin{PROP} \label{sf-metric}
Let $(\EuScript{M},E)$ be a regular matroid represented by a WU matrix $M$.  For
any nonzero $\alpha\in\Lambda(\EuScript{M})$, the following are equivalent:\\
\textup{(a)}\ the element $\alpha$ is a simple flow of $\Lambda(\EuScript{M})$
(relative to $M$);\\
\textup{(b)}\ for all nonzero $\beta,\gamma\in\Lambda(\EuScript{M})$ such that
$\alpha=\beta+\gamma$, $\langle \beta,\gamma \rangle<0$.
\end{PROP}
\begin{proof}
First, assume that (a) holds, and let $\alpha=\beta+\gamma$ with nonzero
$\beta,\gamma\in\Lambda(\EuScript{M})$.   For every $e\in E$ we have
$\alpha(e)=\beta(e)+\gamma(e)$,  and since $\alpha(e)\in \{-1,0,+1\}$ we must
have $\beta(e)\gamma(e)\leq 0$.  Since the support of $\alpha$ is a circuit
of $\EuScript{M}$, the supports of $\beta$ and $\gamma$ cannot be disjoint
(since each contains at least one circuit of $\EuScript{M}$).
Therefore  $\langle \beta,\gamma \rangle<0$, so that (b) holds.

Conversely, assume that (a) fails to hold.  By Proposition \ref{cons-decomp},
$\alpha$ has a consistent decomposition $\EuScript{A}$.
Since $\alpha$ is nonzero, $\EuScript{A}$ is nonempty.  If $|\EuScript{A}|=1$ then $\alpha$ is
a simple flow.  Thus, assume that $|\EuScript{A}|\geq 2$, and let $\beta\in\EuScript{A}$ and
$\gamma=\alpha-\beta$.  Now $\beta$ and $\gamma$ are nonzero, $\alpha=\beta
+\gamma$, and $\beta(e)\gamma(e)\geq 0$ for all $e\in E$, from the
definition of consistent decomposition.  This shows that
$\langle \beta,\gamma \rangle \geq 0$, so that (b) fails to hold.
\end{proof}

For an arbitrary lattice $\Lambda$ we define the set of
\emph{simple elements} to be the set $\S(\Lambda)$ of nonzero elements
$\alpha\in\Lambda$ satisfying condition (b) in Proposition \ref{sf-metric}.
Lemma \ref{sf-iso} is immediate.

\begin{LMA} \label{sf-iso}
Let $\psi:\Lambda\rightarrow \Lambda'$ be an isometry of integer lattices.
Then $\psi$ restricts to a (metric-preserving) bijection from $\S(\Lambda)$
to $\S(\Lambda')$.
\end{LMA}

Lemma \ref{sf-iso} already severely constrains the possibilities for an
isometry $\psi:\Lambda(\EuScript{M})\rightarrow \Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$.  How to get an isomorphism
$\phi:\EuScript{M}_\bullet\rightarrow\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet$ from this is still not clear,
however.  This is resolved in the next section.

\section{$g$-Feasible matrices, and proof of Theorem 1.}

Let $\EuScript{B}(\EuScript{M},B)=\{\beta_{1},\ldots,\beta_{s}\}$ be a fundamental basis
of $\Lambda(\EuScript{M})$ (coordinatized by some base  $B$  and representing TU matrix $M$).
Let $U$ be the $m$-by-$s$ matrix with $\{\beta_{1},\ldots,\beta_{s}\}$ as columns.
The Gram matrix $A=U^{\dagger}U$ determines the isometry class of
$\Lambda(\EuScript{M})$.  The main effort in the proof of Theorem 1 is to reconstruct
(as far as possible) the matrix $U$ from its Gram matrix $A$.  This is
accomplished by Camion's Lemma \ref{camion} and Corollary \ref{tu-xa}
below.

\subsection{Inclusion/Exclusion.}

Let $\EuScript{C}} \newcommand{\CC}{\mathbb{C}=\{C_1,...,C_s\}$ be a collection of subsets of a finite set $E$,
and let $[s]=\{1,2,..,s\}$.  For every $S\subseteq[s]$, define
$$
\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) = \left| \bigcap_{i\in S} C_i \right|
\ \ \mathrm{and} \ \
\gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) =  \left| \bigcap_{i\in S} C_i
\setminus \bigcup_{j\in [s]\setminus S} C_j
\right|.
$$
Here, by convention, $\bigcap\varnothing = E$.  One sees that for every $S\subseteq
[s]$,
$$
\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) = \sum_{S\subseteq S'\subseteq[s]} \gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S').
$$
By Inclusion/Exclusion, it follows that for every $S\subseteq [s]$,
$$
\gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) = \sum_{S\subseteq S'\subseteq[s]} (-1)^{|S'\setminus S|}\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S').
$$
Note that $\gamma_{\EuScript{C}} \newcommand{\CC}{\mathbb{C}}(S)\geq 0$ for all $S\subseteq[s]$, from the
definition.

\subsection{$g$-Feasible matrices.}

Let $A=(a_{ij})$ be an $s$-by-$s$ symmetric matrix of integers,
with positive diagonal entries.  The three-element subsets (or
\emph{triples}) $\{h,i,j\}$ of $[s]$ are divided into three types:\
$\{h,i,j\}$ is \emph{positive}, \emph{null}, or \emph{negative} depending on whether
$$
a_{hi}\cdot a_{ij} \cdot a_{jh}
$$
is positive, zero, or negative.  Let $\Delta(A)$ denote the set of negative
triples of $[s]$.  Define a function $f_A: 2^{[s]}\rightarrow\NN$ as
follows:\ for each $S\subseteq [s]$,
$$
f_A(S) = \cases{
0 & \text{if $S=\varnothing$},\\
0 & \text{if $Y\subseteq S$ for some $Y\in\Delta(A)$},\\
a_{ii} & \text{if $S=\{i\}$},\\
\min \{ |a_{ij}|:\ \{i,j\} \subseteq S \} & \text{otherwise.} }
$$
Define a second function $g_A:2^{[s]}\rightarrow\ZZ$ by Inclusion/Exclusion:\
for each $S\subseteq [s]$,
$$
g_A(S) = \sum_{S\subseteq S'\subseteq[s]} (-1)^{|S'\setminus S|} f_A(S').
$$
The matrix $A$ is \emph{$g$-nonnegative} provided that $g_A(S)\geq 0$ for
all $\varnothing\neq S\subseteq[s]$, and is \emph{$g$-positive} if it
is $g$-nonnegative and such that $g_A(\{i\})>0$ for all $i\in [s]$.  Notice that, since $f_A(\varnothing)=0$,
if $A$ is $g$-positive and $[s]\neq\varnothing$ then
$$
g_A(\varnothing) = -\sum_{\varnothing\neq S\subseteq[s]} g_A(S) \leq -s < 0.
$$

\begin{PROP} \label{tu-gnneg}
Let $\EuScript{B}=\{\beta_1,...,\beta_s\}\subseteq\{-1,0,+1\}^E$ be a set
of column vectors, let $U$ be the $E$-by-$s$ matrix with columns
$\{\beta_1,\ldots,\beta_{s}\}$, and let $A=(a_{ij})=U^\dagger U = \mathrm{Gram}(\EuScript{B})$.
For each $i\in[s]$ let $C_i=\mathrm{supp}(\beta_i)$, and let $\EuScript{C}} \newcommand{\CC}{\mathbb{C}=\{C_1,...,C_s\}$.
If $U$ is TU then for all $\varnothing\neq S\subseteq[s]$
we have $f_A(S) = \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S)$ and $g_A(S) = \gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S)$,
so that $U^\dagger U$ is $g$-nonnegative.
\end{PROP}
\begin{proof}
We use the notation $\beta_i(e)=U_{ei}$ for the entries of the matrix $U$.
We claim that for all $\varnothing\neq S\subseteq[s]$,
$$
f_A(S) = \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S).
$$
From this it follows by Inclusion/Exclusion that for all
$\varnothing\neq S\subseteq[s]$,
$$
g_A(S) = \gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S).
$$
The combinatorial meaning of $\gamma_\EuScript{C}} \newcommand{\CC}{\mathbb{C}$ then shows that
$A$ is $g$-nonnegative.

To prove the claim, consider any nonempty $S\subseteq[s]$.

If $S=\{i\}$ then
$$
f_A(\{i\}) = a_{ii} = \langle \beta_i, \beta_{i} \rangle = |C_i| = \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(\{i\}).
$$

If $S=\{i,j\}$ then consider any $\{e,f\}\subseteq C_i\cap C_j$.
Since $U$ is TU, the submatrix $Z$ of $U$ supported on
rows $e$ and $f$ and columns $i$ and $j$ has $\det Z\in\{-1,0,+1\}$.
All four entries of $Z$ are in $\{-1,+1\}$.
Computing the determinants of all possibilities one finds that
$Z$ has an even number of $-1$s, that $\det Z = 0$, and that $Z$ has rank one.
That is,
$$
\beta_i(e) \beta_j(e) = \beta_i(f) \beta_j(f).
$$
It follows that the function $e\mapsto \beta_i(e) \beta_j(e)$ is constant on
$C_i\cap C_j$, so that $|C_i\cap C_j|=|a_{ij}|$.  Equivalently,
for any $e\in C_i\cap C_j$,
$$
a_{ij} \cdot \beta_i(e) \beta_j(e) > 0.
$$
(This is true even if $a_{ij}=0$, since then $C_i\cap C_j=\varnothing$.)
Therefore,
$$
f_A(\{i,j\}) = |a_{ij}| = |C_i\cap C_j| = \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(\{i,j\}).
$$

It remains to consider the case that $|S|\geq 3$.

First, consider any $\{h,i,j\}\subseteq S$.  If $e\in C_h\cap C_i \cap C_j$
then from the above it follows that
$$
a_{hi}a_{ij}a_{jh} \cdot \beta_h(e)^2 \beta_i(e)^2 \beta_j(e)^2 > 0,
$$
and hence that $\{h,i,j\}$ is a positive triple for $A$.
Thus, if $S$ contains a negative or a null triple $\{h,i,j\}$ then
$$
f_A(S) = 0 = |C_h\cap C_i\cap C_j|
= \left| \bigcap_{k\in S} C_k \right| = \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S).
$$

Finally, consider the case that every triple contained in $S$ is positive.
We show that $f_A(S)=\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S)$ by contradiction,
so suppose that there exists a set $S\subseteq[s]$ such that
$f_A(S)\neq\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S)$.  Then there is such a set for which $S$ is minimal
according to set inclusion;  by the above observations, $|S|=t\geq 3$.
Replacing $\beta_{i}$ by $-\beta_{i}$ as necessary, we can assume that
$a_{ij}>0$ for all $\{i,j\}\subseteq S$.
(This is proved by induction on $t$; the base case $|t|=3$ and the
induction step both rely on the fact that every triple contained in $S$
is positive.)  Then, multiplying rows of
$U$ by $-1$ as necessary, we can assume that $\beta_i(e)=1$ for all
$i\in S$ and $e\in C_i$.
Let $\{i,j\}\subset S$ be such that $a_{ij}$ is minimal.  Note that since
$A=\mathrm{Gram}(\EuScript{B})$ and each $\beta_i\in\{-1,0,+1\}^E$, we have
$a_{ij} \leq \min \{a_{ii}, a_{jj}\}$ for all $\{i,j\}\subseteq[s]$.
Also note that for every $S'\subseteq S$ with $|S'|\geq 2$, we have
$f_{A}(S')\geq f_{A}(S) = a_{ij}$.
Now
$$
\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) = \left| \bigcap_{\ell\in S} C_\ell \right|
\leq |C_i\cap C_j| = a_{ij} = f_{A}(S).
$$
Since $S$ is a minimal set for which $f_{A}(S)\neq\phi_{\EuScript{C}} \newcommand{\CC}{\mathbb{C}}(S)$,
it follows that $\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S) < f_{A}(S)$, and that for every $h\in S$,
$$
\phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S\setminus\{h\}) = f_A(S\setminus\{h\}) \geq f_{A}(S) > \phi_\EuScript{C}} \newcommand{\CC}{\mathbb{C}(S).
$$
Therefore, for every $h\in S$ there is an element
$$
e_{h}\in \left(\bigcap_{\ell\in S\setminus\{h\}} C_{\ell}\right) \setminus C_{h}.
$$
These elements are pairwise distinct.
Let $Z$ be the submatrix of $U$ supported on columns $\{\beta_{i}:\
i\in S\}$ and rows $\{e_{h}:\ h\in S\}$.  By permuting rows and
columns of $Z$ we can bring this into the form $J_{t}-I_{t}$, in which
$J_{t}$ is the $t$-by-$t$ all-ones matrix.  This is the adjacency
matrix of the complete graph $K_{t}$, which has eigenvalues
$t-1$ of multiplicity $1$ and $-1$ of multiplicity $t-1$.  Therefore, since
$t\geq 3$, we see that
$$
\det Z = \pm \det(J_{t}-I_{t}) = \pm (t-1) \not\in \{-1,0,+1\}.
$$
This contradicts the hypothesis that $U$ is TU, showing that the
defective set $S\subseteq[s]$ is impossible.  This completes the proof.
\end{proof}

Let $A=(a_{ij})$ be an $s$-by-$s$ $g$-nonnegative matrix, and let
$k= -g_{A}(\varnothing) \geq 0$.  Define a $k$-by-$s$ $\{0,1\}$-matrix $X(A)$
by saying that for each $\varnothing\neq S\subseteq[s]$, exactly $g_{A}(S)$
rows of $X(A)$ are equal to the indicator row-vector of the subset
$S\subseteq[s]$.  (Note that $X(A)$ has no zero rows.)  The
matrix $X(A)$ is defined only up to arbitrary permutation of the rows.
When $A$ is $g$-positive we usually permute the rows of $X(A)$ so that
the bottom $s$ rows form an identity submatrix $I_{s}$.

\begin{CORO} \label{tu-xa}
Let $U$ be a TU matrix, and let $A=U^{\dagger}U$ (which is
$g$-nonnegative).  Then the rows of $X(A)$ can be permuted so that
they are exactly the nonzero rows of $U^{\sharp}$.
\end{CORO}
\begin{proof}
Since $U$ is TU, we have $g_{A}(S)=\gamma_{\EuScript{C}} \newcommand{\CC}{\mathbb{C}}(S)$ for all $\varnothing\neq
S\subseteq [s]$, using the result and notation of Proposition \ref{tu-gnneg}.
Thus, for all $\varnothing\neq S\subseteq [s]$, exactly $g_{A}(S)$ rows of $U$ have
support equal to the set $S$ of columns.  By definition, the same is true of
$X(A)$.  The matrix $U$ may also have some zero rows.
\end{proof}

A symmetric matrix $A$ is \emph{$g$-feasible} if there is a TU matrix $U$
such that $U^\dagger U = A$.  By Proposition \ref{tu-gnneg}, this implies that
$A$ is $g$-nonnegative.  Corollary \ref{tu-xa} and Camion's Lemma \ref{camion}
show that if such a matrix $U$ exists then it is unique (modulo deleting zero
rows, permuting the rows, and changing the signs of some rows and columns).
This is the uniqueness result at the heart of our proof of Theorem \ref{main}.

\subsection{Proof of Theorem 1.}

One last technical detail is required.

\begin{LMA} \label{tu-gram}
Let $U$ be an $m$-by-$s$ TU matrix containing $I_s$ as a submatrix.
Then every WU matrix $Q$ such that $Q^{\dagger}Q = U^\dagger U$ is TU.
\end{LMA}
\begin{proof}
We proceed by induction on $s$.  The basis of induction, $s=1$, is
trivial since in this case if $Q$ is WU then $Q$ is TU.

For the induction step we begin by showing that all  $(s-1)$-by-$(s-1)$
minors of  $Q$  are in  $\{-1,0,+1\}$.  Let $Z'$  be a nonsingular
$(s-1)$-by-$(s-1)$ submatrix of  $Q$.  Let  $Z$  be a nonsingular
$s$-by-$s$ submatrix of  $Q$  that contains $Z'$.  Then
$\det(Z)=\pm 1$, since $Q$ is WU, so that $F = Z^{-1}$ also has
$\det(F)=\pm 1$.  Now  $QF$  is  WU  and contains  $I_s$  as a submatrix,
so  $QF$  is  TU by Lemma \ref{wu2tu}.  Permuting this $I_s$ submatrix of
$QF$ to the bottom $s$ rows, the columns of  $QF$  are a fundamental
basis of a lattice $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$  for some regular matroid  $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$.  Similarly,
the columns of  $U$  are a fundamental basis of a lattice  $\Lambda(\EuScript{M})$
for some regular matroid  $\EuScript{M}$ (after permuting the $I_s$ submatrix of $U$ to
the bottom $s$ rows).  Since  $Q^{\dagger}Q = U^\dagger U$,
it follows that $(QF)^{\dagger}QF = (UF)^{\dagger}UF$.
Thus, the $i$-th column of $UF$  is the image of the $i$-th column of
$QF$ (for each $i\in[s]$)  by means of an isometry from
$\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$  to  $\Lambda(\EuScript{M})$.  Since the columns of  $QF$  are simple
flows in  $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$  (by Lemma \ref{fact-e}), it follows from Lemma \ref{sf-iso} that
the columns of  $UF$  are simple flows in  $\Lambda(\EuScript{M})$.  Thus, by
Proposition \ref{sf-metric}, the columns of  $UF$  are  $\{-1,0,+1\}$-valued.
Since  $U$  contains  $I_s$,  $UF$  contains $I_s F = F$ as a submatrix.
Thus, the entries of $F = Z^{-1} = \mathrm{adj}(Z)/\det(Z)$  are all in the set
$\{-1,0,+1\}$. Therefore $\det(Z')=\pm 1$, as required.

Now, for any  $i\in[s]$,  let  $Q_{i}$  be the submatrix of  $Q$  obtained
by deleting column  $i$  from  $Q$, and define  $U_{i}$  similarly.
Clearly  $U_{i}$  is  TU,  $U_{i}$  contains  $I_{s-1}$ as a submatrix,
and  $Q_{i}^{\dagger}Q_{i} = U_{i}^{\dagger} U_{i}$.  The previous paragraph
shows that each $Q_{i}$  is  WU.  Finally, the induction hypothesis shows that
each  $Q_{i}$  is  TU, and since  $Q$ is also  WU  it follows that  $Q$  is  TU.
This completes the induction step, and the proof.
\end{proof}

\begin{proof}[Proof of Theorem 1.]
We begin by proving that if $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ are regular matroids for
which $\EuScript{M}_\bullet$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet$ are isomorphic, then $\Lambda(\EuScript{M})$
and $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are isometric.
Let $\phi:E(\EuScript{M}_\bullet)\rightarrow E(\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet)$ be an isomorphism,
let $r$ be the rank of $\EuScript{M}_\bullet$ and let $k=|E(\EuScript{M}_\bullet)|$.
Let $B$ be any base of $\EuScript{M}_\bullet$ and let $\phi(B)$ be the
corresponding base of $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet$.  Coordinatized by these bases,
both $\EuScript{M}_\bullet$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_\bullet$ are represented by the same $r$-by-$k$
matrix of the form $[I_r\ L]$ for some $r$-by-$s$ TU matrix $L$
(in which $s=k-r$).  Since $\EuScript{M}_{\bullet}$ has no co-loops, $L$ has no
zero rows. Let $\EuScript{M}$ have $p$ co-loops, and let $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ have $q$ co-loops.
Then $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ are represented by the matrices $M$ and $N$,
respectively, in which
$$
M = \left[ \begin{array}{ccc}
I_{p} & O_{p\times r} & O_{p\times s} \\
O_{r\times p} & I_{r} & L
\end{array}\right]
\ \ \ \mathrm{and}\ \ \
N = \left[ \begin{array}{ccc}
I_{q} & O_{q\times r} & O_{q\times s} \\
O_{r\times q} & I_{r} & L
\end{array}\right].
$$
Here, $O_{a\times b}$ denotes the $a$-by-$b$ all-zero matrix.

As in Subsection 2.3, the lattices $\Lambda(\EuScript{M})$ and $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$
have bases given by the columns of the matrices
$$
Q_{\EuScript{M}} = \left[ \begin{array}{c}
O_{p\times s} \\
-L \\
I_s
\end{array}\right]
\ \ \ \mathrm{and}\ \ \
Q_{\EuScript{N}} \newcommand{\NN}{\mathbb{N}} = \left[ \begin{array}{ccc}
O_{q\times s} \\
-L \\
I_s
\end{array}\right],
$$
respectively. One sees immediately that
$$
Q_{\EuScript{M}}^{\dagger} Q_{\EuScript{M}} = Q_{\EuScript{N}} \newcommand{\NN}{\mathbb{N}}^{\dagger} Q_{\EuScript{N}} \newcommand{\NN}{\mathbb{N}},
$$
and it follows that the lattices $\Lambda(\EuScript{M})$ and $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are
isometric.

Conversely, assume that $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ are regular matroids and let
$\psi:\Lambda(\EuScript{M})\rightarrow\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ be an isometry.  Let $s$ be the
rank of $\Lambda(\EuScript{M})$ and $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$.  Let $|E(\EuScript{M})|=m$ and
$|E(\EuScript{N}} \newcommand{\NN}{\mathbb{N})|=n$.

Let $\EuScript{B}=\EuScript{B}(\EuScript{M},B)$ be a fundamental basis of $\Lambda(\EuScript{M})$
coordinatized by a base $B$ of $\EuScript{M}$.  Let $U$ be an $m$-by-$s$ matrix
with the elements $\beta_{i}\in\EuScript{B}$ for $i\in[s]$ as columns.
Fix a TU matrix $N$ representing $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ over $\RR$, such that
$\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})=\ker(N)\cap\ZZ^{n}$.  Let $Q$ be the $n$-by-$s$ matrix
with the elements $\psi(\beta_{i})$ for $i\in[s]$ as columns.

Now $U$ is an $m$-by-$s$ TU matrix that contains $I_{s}$ as a
submatrix, and since $\psi$ is an isometry it follows that
$Q^{\dagger} Q = U^{\dagger} U$.  Since $\psi$
is an isometry and $\EuScript{B}$ is a basis for $\Lambda(\EuScript{M})$, the columns of
$Q$ form a basis for $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$.  From Lemma \ref{basis-wu} it follows
that $Q$ is WU, and then from Lemma \ref{tu-gram} it follows that $Q$ is TU.

Now both $U$ and $Q$ are TU matrices such that $A = U^{\dagger} U =
Q^{\dagger} Q$.  By Corollary \ref{tu-xa}, the rows of $U$ and of $Q$ can
be permuted so that the nonzero rows of $U^{\sharp}$ and of $Q^{\sharp}$
both agree with $X=X(A)$.  Let $k=-g_{A}(\varnothing)$ be the number of rows
of $X$, let $r = k-s$, let $p=m-k$, and let $q=n-k$.  We may assume that
the last $s$ rows of $X$ support an $I_{s}$ submatrix, so that
$X = [K^{\dagger}\ I_{s}]^{\dagger}$
for some $r$-by-$s$ matrix $K$ with no zero rows.  Thus, the matrices
$U^{\sharp}$ and $Q^{\sharp}$ have the forms
$$
U^{\sharp} = \left[ \begin{array}{c}
O_{p\times s} \\
K \\
I_s
\end{array}\right]
\ \ \ \mathrm{and}\ \ \
Q^{\sharp} = \left[ \begin{array}{ccc}
O_{q\times s} \\
K \\
I_s
\end{array}\right].
$$
By Camion's Lemma \ref{camion}, there are diagonal matrices $H$ and $F$,
invertible over $\ZZ$, such that the submatrix in the last $k$ rows of
$Q'=HQF$ equals the the submatrix in the last $k$ rows of $U$.  The
columns of $Q'$ form a basis for $\Lambda(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$, and the matrices $U$
and $Q'$ have the forms
$$
U = \left[ \begin{array}{c}
O_{p\times s} \\
-L \\
I_s
\end{array}\right]
\ \ \ \mathrm{and}\ \ \
Q' = \left[ \begin{array}{ccc}
O_{q\times s} \\
-L \\
I_s
\end{array}\right]
$$
for some $r$-by-$s$ TU matrix $L$ with no zero rows.  Thus the regular
matroids $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ are represented (over $\RR$) by the matrices
$$
M = \left[ \begin{array}{ccc}
I_{p} & O_{p\times r} & O_{p\times s} \\
O_{r\times p} & I_{r} & L
\end{array}\right]
\ \ \ \mathrm{and}\ \ \
N = \left[ \begin{array}{ccc}
I_{q} & O_{q\times r} & O_{q\times s} \\
O_{r\times q} & I_{r} & L
\end{array}\right],
$$
respectively.  From the forms of these representing matrices one sees that
$\EuScript{M}_{\bullet}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_{\bullet}$ are both represented by $[I_{r}\ L]$,
and thus are isomorphic.
\end{proof}

\section{Concluding observations.}

\subsection{The lattice of integer cuts.}

Recall the lattice $\Gamma(\EuScript{M})$ of integer cuts of a regular
matroid $\EuScript{M}$, defined in Subsection 2.3.   Theorem \ref{main} is equivalent
to each of the following two statements.  (We omit the trivial proofs by
duality).  For any matroid $\EuScript{M}$, let $\EuScript{M}^\circ$ denote the minor of $\EuScript{M}$
obtained by deleting all loops of $\EuScript{M}$.

\begin{CORO}
Let $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ be regular matroids.  Then
$\Gamma(\EuScript{M})$ and $\Gamma(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are isometric if and only
if $\EuScript{M}^\circ$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}^\circ$ are isomorphic.
\end{CORO}

\begin{CORO}
Let $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ be regular matroids.  Then
$\Lambda(\EuScript{M})$ and $\Gamma(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are isometric if and only
if $\EuScript{M}_\bullet$ and $(\EuScript{N}} \newcommand{\NN}{\mathbb{N}^\circ)^* = (\EuScript{N}} \newcommand{\NN}{\mathbb{N}^*)_\bullet$ are isomorphic.
\end{CORO}

\subsection{Lattices in general.}

For convenience, a basis $\EuScript{B}$ of a lattice $\Lambda$ is said to be
$g$-nonnegative, $g$-positive, or $g$-feasible depending on whether
$\mathrm{Gram}(\EuScript{B})$ has that property.

\begin{PROP}
Let $\Lambda$ be an integral lattice.  The following are equivalent.\\
\textup{(a)}\ $\Lambda$ has a $g$-feasible basis.\\
\textup{(b)}\ $\Lambda$ has a $g$-feasible and $g$-positive basis.\\
\textup{(c)}\ $\Lambda$ is isometric with $\Lambda(\EuScript{M})$ for some regular
matroid $\EuScript{M}$.
\end{PROP}
\begin{proof}
For (a) implies (b):\ let $\EuScript{B}$ be a $g$-feasible basis for $\Lambda$.
Let $A=\mathrm{Gram}(\EuScript{B})$, let $X=X(A)$, and let $U$ be a TU signing
of $X$ such that $U^\dagger U=A$.  Say that $U$ is an $m$-by-$s$ matrix.
Since $A$ has rank $s$, there is an invertible $s$-by-$s$ submatrix
$Z$ of $U$.  Since $U$ is TU, $\det(Z)=\pm 1$, so that $F=Z^{-1}$ is an
integer matrix and $\det(F)=\pm 1$ as well.  Now, $Q=UF$ is an
$m$-by-$s$ WU matrix that contains $I_{s}$ as a submatrix, so by
Lemma \ref{wu2tu}, $Q$ is TU.  The columns of $Q$ form a basis for $\Lambda$
(since $F$ is invertible over $\ZZ$), and $Q^{\dagger} Q$ is
$g$-positive (by Proposition \ref{tu-gnneg}, and since $Q$ contains
$I_{s}$). Since $Q^{\dagger} Q$ is clearly $g$-feasible, this proves (b).

For (b) implies (c):\ if $\EuScript{B}$ is a $g$-feasible and $g$-positive basis of $\Lambda$
then $A=\mathrm{Gram}(\EuScript{B})$ is $g$-positive and $X=X(A)$ has a TU signing $U$ such that
$U^\dagger U=A$.  The columns of $U$ form a basis $\EuScript{B}'$ of the lattice $\Lambda(\EuScript{M})$
of some regular matroid.  Now
$$
\mathrm{Gram}(\EuScript{B}')=Q^\dagger Q = A = \mathrm{Gram}(\EuScript{B}),
$$
so that $\Lambda$ and $\Lambda(\EuScript{M})$ are isometric.

Trivially (b) implies (a).  For (c) implies (b):\
assume that $\psi:\Lambda(\EuScript{M})\rightarrow \Lambda$ is
an isometry, and let $B$ be any base of $\Lambda(\EuScript{M})$.
Then $\EuScript{B}=\EuScript{B}(\EuScript{M},B)$ is a $g$-feasible and $g$-positive basis of
$\Lambda(\EuScript{M})$, so that $\psi(\EuScript{B})$ is a $g$-feasible and $g$-positive
basis of $\Lambda$.
\end{proof}

\subsection{Some examples.}

\begin{EG} \label{eg1}
A $g$-positive matrix that is not $g$-feasible.
\emph{
The matrix $A$ shown below is $g$-positive, with $X=X(A)$ as shown.
$$
A =
\left[\begin{array}{cccc}
3 & 1 & 1 & 2 \\
1 & 3 & 1 & 2 \\
1 & 1 & 3 & 2 \\
2 & 2 & 2 & 5
\end{array}\right]
\hspace{1cm}
X =
\left[\begin{array}{cccc}
1 & 1 & 1 & 1 \\
1 & 0 & 0 & 1 \\
0 & 1 & 0 & 1 \\
0 & 0 & 1 & 1 \\
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right]
$$
Theorem 13.1.3 of \cite{Ox} shows that $X$ does not have a TU signing
(by pivotting on the top-right entry.)  Thus, $A$ is not
$g$-feasible.
}\end{EG}

\begin{EG} \label{eg2}
A $g$-nonnegative matrix $A$ such that $X(A)$ has a TU signing,
but $A$ is not $g$-feasible.
\emph{
The matrix $A$ shown below is $g$-nonnegative, with $X=X(A)$ as shown.
$$
A =
\left[\begin{array}{cccc}
2  & 1 & 0 & -1 \\
1  & 2 & 1 & 0  \\
0  & 1 & 2 & 1  \\
-1 & 0 & 1 & 2
\end{array}\right]
\hspace{1cm}
X =
\left[\begin{array}{cccc}
1 & 0 & 0 & 1 \\
1 & 1 & 0 & 0 \\
0 & 1 & 1 & 0 \\
0 & 0 & 1 & 1
\end{array}\right]
$$
One checks that $X$ itself is TU.  By Camion's Lemma \ref{camion}, any
TU signing $U$ of $X$ is obtained from $X$ by multiplying some rows
and columns of $X$ by $-1$.  For any such matrix $U$, the Gram matrix
$U^{\dagger}U$ is obtained from $X^{\dagger}X$ by multiplying some
rows and the same columns by $-1$.  But $X^{\dagger}X = A^{\sharp}$,
and $A$ cannot be obtained from $A^{\sharp}$ by means of this
operation.  Thus, there is no TU signing $Q$ of $X$ such that
$Q^{\dagger}Q = A$.  (A $g$-positive example of this is $A+I_{4}$.)
}\end{EG}

\begin{EG} \label{eg3}
A matrix $Q$ such that $Q^{\dagger}Q$ is $g$-positive and
$g$-feasible, but $Q$ is not WU.
\emph{
This example relates to the hypotheses of Lemma \ref{tu-gram}.
Clearly $Q=[2]$ is not WU.   The matrix $A=Q^\dagger Q =[4]$ is
$g$-positive with $X=X(A)=[1\ 1\ 1\ 1]^\dagger$.
Clearly $X$ is TU with $X^{\dagger}X=A$, so $A$ is $g$-feasible.
}\end{EG}

\begin{EG} \label{bcc}
The body-centered cubic lattice is $\Lambda(K_4)\simeq\Gamma(K_4)$.
\emph{
To see this, let the cycles of length four in $K_4$ be $C_1$, $C_2$, and
$C_3$, and let $\alpha_i$ be a simple flow supported on $C_i$ for each
$i\in\{1,2,3\}$.  Now $\{\alpha_1, \alpha_2, \alpha_3\}$ spans a sublattice
$\Pi$ of $\Lambda(K_4)$, and has Gram matrix $4I_3$.  Thus, $\Pi$ is a
cubical lattice with minimum length $2$.  Now,  $\alpha_1+\alpha_2+\alpha_3
= 2\beta$ for some simple flow $\beta\in\Lambda(K_4)$ supported on a
three-cycle.  In fact $\Lambda(K_4)$ is the disjoint union of $\Pi$ and $\Pi+\delta$, proving the claim.  The lattices $\Lambda(K_n)$ are discussed
on pages 194--196 of
\cite{BHN}.
}\end{EG}

\begin{EG} \label{a-root}
The root lattice $\mathsf{A}_n$ is $\Lambda(\EuScript{U}_{1,n+1})\simeq\Gamma(\EuScript{U}_{n,n+1})$.
(The face-centered cubic lattice is $\mathsf{A}_3$.)
\emph{
To see this, for each $i\in[n+1]$ let $\mathbf{e}_i$ be the coordinate column
vector of length $n+1$ with all entries $0$ except for a $1$ in row $i$.
The root lattice $\mathsf{A}_n$ has as a basis the vectors
$s_i= \mathbf{e}_{i+1} - \mathbf{e}_{i}$ for all $i\in[n]$.  Since $\EuScript{U}_{1,n+1}$ is represented
by the all-ones matrix with one row and $n+1$ columns, it is easy to see that
$\{s_1,...,s_n\}$ is a basis for $\Lambda(\EuScript{U}_{1,n+1})$ as well.
The argument on page 194 of \cite{BHN} shows that these are the only root
lattices of the form $\Lambda(\EuScript{M})$ for some regular matroid.
}\end{EG}

\subsection{Sixth-root-of-unity matroids.}

Let $\omega = \mathrm{e}^{\mathrm{i}\pi/3}$ be a primitive sixth-root of unity,
and let
$$
\mathbb{E} = \{z\in\CC:\ z= a + b \omega\
\text{for some $a,b\in\ZZ$} \}
$$
be the ring (in fact a PID) of \emph{Eisenstein integers}.
A \emph{sixth-root-of-unity matrix} ($\sqrt[6]{1}$ matrix, for short)
is a matrix with entries in $\CC$ such that every square submatrix has
determinant $d$ such that either $d=0$ or $d^6=1$.  A \emph{sixth-root-of-unity
matroid} ($\sqrt[6]{1}$ matroid, for short) is one which can be represented
over $\CC$ by a $\sqrt[6]{1}$ matrix.  Clearly, regular matroids are $\sqrt[6]{1}$.
Lemma 5.8 of \cite{Whi} gives sufficient conditions for a $\sqrt[6]{1}$
matroid to be uniquely representable over $\CC$ (by a $\sqrt[6]{1}$
matrix).

For example, $\EuScript{U}_{2,4}$ is not a binary matroid (hence not regular) but it
is represented over $\CC$ by the matrix
$$
\left[\begin{array}{cccc}
1 & 0 & 1 & 1 \\
0 & 1 & 1 & \omega
\end{array}\right].
$$

The vector space of real flows of $\EuScript{U}_{2,4}$ (relative to this representation)
is the real span of the column vector $[-1\ -1\ 1\ 0]^\dagger$.  The vector
space of complex flows of $\EuScript{U}_{2,4}$ is the complex span of both
$[-1\ -1\ 1\ 0]^\dagger$ and $[-1\ -\overline{\omega}\  0\ 1]^\dagger$.
The analogue of the lattice of integer flows for a matroid $(\EuScript{M},E)$
represented over $\CC$ by a $\sqrt[6]{1}$ matrix $M$ is
the \emph{lattice of Eisenstein flows}
$$
\Lambda_\EE(\EuScript{M}) = \ker_\CC(M)\cap \EE^E.
$$
The inner product on $\Lambda_{\EE}(\EuScript{M})$ is induced by the
Hermitian inner product on $\CC^{E}$.

Such a lattice is not just an abelian group, but even an $\EE$-module.
This allows a stronger version of isometry:  $\psi:\Lambda\rightarrow\Lambda'$
is an \emph{$\EE$-isometry} if it is a bijection such that both
$\psi$ and $\psi^{-1}$ are $\EE$-module homomorphisms that preserve the
inner products on the lattices.  Clearly an $\EE$-isometry is an
isometry in the usual sense.

If $M$ and $M'$ are $\sqrt[6]{1}$ matrices representing the same
matroid $\EuScript{M}$, then $\ker_\CC(M)\cap \EE^E$ and $\ker_\CC(M')\cap
\EE^E$ are $\EE$-isometric if and only if $M$ and $M'$ are
equivalent representations of $\EuScript{M}$.  (This follows easily from the
definition of representation equivalence.)
Thus, $\EuScript{M}$ is uniquely representable by a $\sqrt[6]{1}$ matrix if and
only if the $\EE$-isometry class of $\Lambda_\EE(\EuScript{M})$ is independent of the
representing matrix $M$.  It is not too difficult to see that for a regular
matroid $\EuScript{M}$,
$$
\Lambda_\EE(\EuScript{M}) = \Lambda(\EuScript{M}) \otimes \EE,
$$
but, as the example of $\EuScript{U}_{2,4}$ shows, this does not hold for all
$\sqrt[6]{1}$ matroids.  (In fact, this equality holds if and only if
$\EuScript{M}$ is regular, since if it holds then $\Lambda_\EE(\EuScript{M})$ has an $\EE$-basis
$\EuScript{B}$ that is also a $\ZZ$-basis of $\Lambda(\EuScript{M})$.  Thus, the matrix
$Q$ formed from the column vectors in $\EuScript{B}$ is $\sqrt[6]{1}$ and real, hence TU.
Therefore $\EuScript{M}^*$ and hence $\EuScript{M}$ are regular.)

The two-sum $\EuScript{U}_{2,4}\oplus_{2}\EuScript{U}_{2,4}$ has two inequivalent
representations by $\sqrt[6]{1}$ matrices, and these yield Eisenstein
flow lattices that have bases with Gram matrices
$$
\left[
\begin{array}{rrr}
3 & 1+\omega & 1 + \omega \\
1+\overline{\omega} & 4 & 4 - \sigma \\
1+\overline{\omega} & 4 - \overline{\sigma} & 4
\end{array}
\right]
$$
in which $\omega,\sigma\in\CC$ are primitive sixth-roots of unity.
The two cases $\sigma=\omega$ and $\sigma = \overline{\omega}$ yield lattices
which are not $\EE$-isometric, but seem to be isometric.

\begin{CONJ} \label{repn-iso}
If $M$ and $M'$ are sixth-root-of-unity matrices representing the
same matroid $\EuScript{M}$, then $\ker_\CC(M)\cap \EE^E$ and $\ker_\CC(M')\cap
\EE^E$ are isometric.
\end{CONJ}

\begin{CONJ} \label{sixth-root}
Let $\EuScript{M}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}$ be sixth-root-of-unity matroids.
Then  $\Lambda_\EE(\EuScript{M})$ and $\Lambda_\EE(\EuScript{N}} \newcommand{\NN}{\mathbb{N})$ are
isometric if and only if $\EuScript{M}_{\bullet}$ and $\EuScript{N}} \newcommand{\NN}{\mathbb{N}_{\bullet}$ are isomorphic.
\end{CONJ}

One could perhaps adopt a strategy similar to the one we used to prove Theorem
\ref{main} for regular matroids.  The Gram matrix of a basis of $\Lambda_\EE(\EuScript{M})$
is in general complex Hermitian with entries in $\EE$.  If one can identify
a metric characterization of simple flows, and an appropriate generalization of
$g$-feasible matrices, then much of our argument could carry over.

Combinatorics (math.CO); Metric Geometry (math.MG)


Perfect shuffling by lazy swaps

Abstract: We characterize the minimum-length sequences of independent lazy simple transpositions whose composition is a uniformly random permutation. For every reduced word of the reverse permutation there is exactly one valid way to assign probabilities to the transpositions. It is an open problem to determine the minimum length of such a sequence when the simplicity condition is dropped.

\section{Introduction}

Let $S_n$ be the symmetric group of all permutations of $1,\ldots,n$, with composition given by $(\sigma\tau)(i):=\sigma(\tau(i))$ for $1\leq i\leq n$.  A \df{lazy transposition} with parameters $(a,b,p)$ is a random permutation $T$ that with probability $p$ equals the transposition (or swap) $t(a,b):=(a\; b)\in S_n$ exchanging the elements in positions $a$ and $b$, and otherwise equals the identity $\id\in S_n$.  Given a sequence of parameters $\SS=(a_i,b_i,p_i)_{i=1}^\ell$, let $T_1,\ldots,T_\ell$ be independent lazy transpositions, where $T_i$ has parameters $(a_i,b_i,p_i)$.  We say that $\SS$ is a (perfect) \df{transposition shuffle} (of order $n$ and length $\ell$) if the composition $T_1\cdots T_\ell$ of these random permutations is uniformly distributed on $S_n$.  We pose the following apparently unsolved question.

\begin{question}
What is the minimum possible length $L_n$ of a transposition shuffle of order $n$?  Is it the case that $L_n={n\choose 2}$ for all $n$?
\end{question}

The best bounds we know for general $n$ are
$$ \log_2 n! \leq L_n \leq {n\choose 2}.$$
The lower bound (which is of course asymptotic to $n\log_2 n$ as $n\to\infty$) follows by the obvious counting argument: a composition of $\ell$ lazy transpositions can take at most $2^\ell$ possible values, while $\#S_n=n!$.  In the other direction, we have several distinct constructions of transposition shuffles of length exactly $n\choose 2$ (for all $n$), and none shorter (for any $n$).  It can be verified by case analysis that $L_n={n \choose 2}$ for $n\leq 4$.  Computer experiments by Viktor Kiss (personal communication) suggest that the same holds for $n=5$ also.

Our main result addresses the special case
of \df{simple} transposition shuffles, by which we mean those that transpose only adjacent pairs: $b_i=a_i+1$ for all $i$.  We will characterize the simple transposition shuffles of minimum length.

For $1\leq a<n$ denote the \df{simple} transposition $t(a)=t(a,a+1)\in S_n$.  We call a sequence $(a_i)_{i=1}^\ell$ a \df{reduced word} of order $n$ if $\ell={n\choose 2}$ and if the (deterministic) composition $t(a_1)\cdots t(a_\ell)$ equals the reverse permutation $\rho:=[n,\ldots,1]$.  (It is easily verified that $n \choose 2$ is the minimum number of simple transpositions whose composition is $\rho$, and that $\rho$ is the unique permutation in $S_n$ for which this minimum is largest.  Reduced words are extensively studied -- see the later background discussion.)
We construct a simple transposition shuffle from each reduced word as follows.

\begin{construction}[Simple transposition shuffles]\label{adj}
Let $(a_i)_{i=1}^\ell$ be any reduced word.
Write $\sigma_j:=t(a_1)\cdots t(a_j)$ for the composition of the first $j$ transpositions, and let
$$(u_j,v_j):=\bigl(\sigma_{j-1}(a_j), \sigma_{j-1}(a_j+1)\bigr)
$$
be the elements transposed at step $j$.  Let
$\SS=(a_i,a_i+1,p_i)_{i=1}^\ell$ where
\begin{equation*}p_i=\frac{v_i-u_i}{v_i-u_i+1}
\tag*{\dia}
\end{equation*}
\end{construction}

\begin{thm}\label{main}
The minimum length of a simple transposition shuffle of order $n$ is $\ell={n\choose 2}$. If $(a_i)_{i=1}^\ell$ is any reduced word of order $n$, then $\SS$ as defined in \cref{adj} above is a simple transposition shuffle.  Moreover, every simple transposition shuffle of minimum length arises in this way.
\end{thm}

One consequence of \cref{main} is that in any minimum-length simple transposition shuffle, the multiset of probabilities $(p_i)_{i=1}^{\ell}$ comprises exactly $n-1$ $\tfrac12$'s, $n-2$  $\tfrac23$'s, \dots, and one $(n-1)/n$.  See \cref{examples} for examples.

Turning to general (non-simple) transposition shuffles, we will describe several other constructions below, all of length exactly $n \choose 2$, including some with rational probabilities $p_i$ that are not of the form $d/(d+1)$ for integer $d$, and others with irrational probabilities.

For $n\geq 3$ it is not possible for all the probabilities $p_i$ to equal $\tfrac12$, since then the probability of each permutation would be a dyadic rational rather than $1/n!$.  However, we will show that $\tfrac12$ must appear rather frequently.

\begin{thm}\label{half}
In any transposition shuffle $\SS=(a_i,b_i,p_i)_{i=1}^\ell$ of order $n$, we have $$\#\{i: p_i=\tfrac12\}\geq n-1.$$ If the length $\ell$ equals the (in general unknown) minimum $L_n$ then $p_1=p_{\ell}=\tfrac12$.
\end{thm}

\cref{main} implies that in a \emph{simple} transposition shuffle of minimum length, the sequence of probabilities $(p_i)_{i=1}^\ell$ cannot be altered to give another transposition shuffle.  In the general case the following weaker statement holds.

\begin{prop}\label{rigid}
In a transposition shuffle $\SS=(a_i,b_i,p_i)_{i=1}^\ell$ of order $n$ and length $L_n$, the probabilities are rigid in the sense that no single $p_i$ may be altered to give another transposition shuffle.
\end{prop}

\begin{figure}
\centering
{}\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{5}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach \x in {1,...,\n} \node at (\x,0) {$\x$};
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 2/3/{2/3}, 3/4/{3/4}, 4/5/{4/5},
1/2/{1/2}, 2/3/{2/3}, 3/4/{3/4},
1/2/{1/2}, 2/3/{2/3}, 1/2/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{5}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach \x in {1,...,\n} \node at (\x,0) {$\x$};
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 3/4/{1/2}, 2/3/{3/4}, 4/5/{2/3},
1/2/{2/3}, 3/4/{4/5}, 2/3/{3/4},
4/5/{2/3}, 1/2/{1/2}, 3/4/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill {}

 \medskip

{} \hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{5}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach \x in {1,...,\n} \node at (\x,0) {$\x$};
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 2/5/{2/3}, 3/5/{1/4}, 4/5/{1/5},
2/3/{1/2}, 1/4/{1/2}, 3/4/{1/2},
1/2/{1/2}, 2/3/{2/3}, 1/2/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{5}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach \x in {1,...,\n} \node at (\x,0) {$\x$};
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 3/4/{1/2}, 4/5/{2/3}, 3/4/{1/2},
1/3/{(6-\surd 6)/10}, 2/4/{(6+\surd 6)/10},
1/2/{1/2}, 3/4/{1/2}, 4/5/{2/3}, 3/4/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1.7,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill {}
\caption{Examples of transposition shuffles or order $5$ based on \cref{adj} (top left and top right), \cref{sweep} (bottom left), and \cref{divide} (bottom right). A lazy transposition is shown as a horizontal line connecting two positions $a_i$ and $b_i$, with the probability $p_i$ of transposing them given to the right.} \label{examples}
\end{figure}

\subsection*{Additional constructions}
Next we describe the promised further constructions, together with brief explanations of their correctness and properties.  Also see \cref{examples}.

\begin{construction}[Sweeping]\label{sweep}
We first note the following obvious inductive scheme for constructing transposition shuffles.  Fix $n$.  Call a sequence of parameters $(a_i,b_i,p_i)_{i=1}^k$ a \df{sweep} (of order $n$ and length $k$) if the composition of independent lazy transpositions of $S_n$ with these parameters, $\pi$ say, has the property that its last element $\pi(n)$ is uniformly distributed on $1,\ldots,n$.  The concatenation of any sweep of order $n$ followed by any transposition shuffle of order $n-1$ clearly gives a transposition shuffle of order $n$: the sweep randomizes the final element, then the shuffle shuffles the other elements.

One sweep of length $n-1$ is clearly
$$\bigl(1,2,\tfrac12\bigr),\bigl(2,3,\tfrac23\bigr),\ldots,\bigl(n-1,n,\tfrac{n-1}{n}\bigr).$$
Applying the inductive construction of the previous paragraph to this example gives
a simple transposition shuffle which is a special case of \cref{adj}.
Another straightforward sweep is
$$\bigl(1,n,\tfrac12\bigr),\bigl(2,n,\tfrac13\bigr),\ldots,\bigl(n-1,n,\tfrac1n\bigr).$$

Here is an inductive construction of sweeps, also of length $n-1$, generalizing the last example.  Fix a partition of $\{1,\ldots,n-1\}$ into non-empty sets $D_1,\ldots,D_r$, denote their sizes $m_j:=\#D_j$, and fix an element $d_j\in D_j$ of each.  Apply any sweep of order $m_1$ to $D_1$ in such a way that element $\pi(d_1)$ of the resulting permutation $\pi$ is the one that is uniform on $D_1$.  (Formally, modify the sweep by mapping the parameters $(a_i,b_i,p_i)$ to $(\delta(a_i),\delta(b_i),p_i)$ for each $i$, where $\delta$ is a bijection from $\{1,\ldots,m_1\}$ to $D_1$ mapping $m_1$ to $d_1$.)  Then do similarly for each of $D_2,\ldots,D_r$.  Finally apply a sequence of lazy transpositions with parameters
$$\bigl(d_1,n,\tfrac{m_1}{1+m_1}\bigr),\; \bigl(d_2,n,\tfrac{m_2}{1+m_1+m_2}\bigr),\;
\bigl(d_3,n,\tfrac{m_3}{1+m_1+m_2+m_3}\bigr),\; \ldots,\; \bigl(d_r,n,\tfrac{m_r}{n}\bigr).$$
This ensures that the probability that some element of $D_j$ ends up in location $n$ is $m_j/n$, as required. \dia
\end{construction}

Since the sweeps constructed above all have length $n-1$, the resulting shuffles have length $\sum_{i=1}^{n-1} i={n \choose 2}$.  The length of a sweep of order $n$ must be at least $n-1$, since the graph on vertices $1,\ldots,n$ with edges $\{(a_i,b_i):i=1,\ldots,k\}$ needs to be connected.  So the construction cannot help us to get transposition shuffles of length less than ${n\choose 2}$.

The probabilities $p_i$ that result from \cref{sweep} are all rational, but (unlike those of \cref{adj}) need not be of the form $d/(d+1)$ for integer $d$.  The construction can also give shuffles with $\#\{i: p_i=\tfrac12\}$ strictly greater than $n-1$.

\begin{construction}[Divide and conquer]
\label{divide}
Fix $n$ and let $h=\lfloor n/2 \rfloor$.  Call the integers $1,\ldots,h$ \df{light} and $h+1,\ldots,n$ \df{heavy}.  First apply any transposition shuffle of order $h$, to shuffle the light elements.  Follow this with any transposition shuffle of order $n-h=\lceil n/2\rceil$ on the heavy positions, to shuffle the heavy elements. (Formally, modify each lazy transposition by replacing parameters $(a_i,b_i,p_i)$ with $(a_i+h,b_i+h,p_i)$, and append these triples to the previous list.)

Now apply a sequence of lazy transpositions with parameters
$$(j, j+h, q_j), \quad j=1,\ldots,h,$$
where the probabilities $q_j$ are chosen so that the sum of $j$ independent Bernoulli random variables with parameters $q_1,\ldots,q_h$ is equal in law
to $\#\{i>h:\pi(i)\leq h\}$ where $\pi$ is a uniformly random permutation of $S_n$ -- this is a hypergeometric distribution.  The fact that this is possible is proved in \cite{hypergeom}. (Indeed, the analogous fact holds for a general hypergeometric distribution.  This amounts to the fact that hypergeometric distributions are strongly Rayleigh -- see \cite{strongly-rayleigh}).

At this point, the light and heavy elements are both shuffled, and the number of light elements in heavy positions has the correct distribution.  To complete the construction, we again apply any transposition shuffle to the light positions and apply any transposition shuffle to the heavy positions (as at the start).  This ensures that the locations of the light and heavy elements are shuffled.
\dia
\end{construction}

If the order-$h$ and order-$(n-h)$ shuffles used in \cref{divide} have lengths $\ell_h$ and $\ell_{n-h}$ respectively then the resulting transposition shuffle has length
$$2 \ell_h +2 \ell_{n-h} + h.$$
In particular, if $\ell_h={h \choose 2}$ and $\ell_{n-h}={n-h \choose 2}$ then this is exactly ${n \choose 2}$, so again the construction is of no help in beating this threshold.  On the other hand if it were known that $L_n<{n \choose 2}$ for some fixed $n$ then using \cref{sweep,divide} we could deduce that $L_n\leq (1-\epsilon){n \choose 2}$ for some $\epsilon>0$ and all sufficiently large $n$.

The probabilities $q_j$ in \cref{divide} are in general irrational (but algebraic).  The construction also gives examples of transposition shuffles of length ${n \choose 2}$ in which \emph{two} of the probabilities $p_i$ may be simultaneously altered to give another transposition shuffle (compare \cref{main,rigid}).  For example, two distinct $q_j$ can be exchanged.

\subsection*{Background}
Reduced words have been studied in depth.  For example, it is known \cite{stanley} that the number of reduced words of order $n$ is
$$
\frac{{n \choose 2}!}{1^{n-1} \, 3^{n-2} \, 5^{n-3} \cdots (2n-1)^1}
$$
and that they are in bijection with Young tableau in a certain class \cite{edelman-greene,hamaker-young}.  The uniformly random reduced word of order $n$ has remarkable structure and properties \cite{sort,dauvergne,dauvergne-virag}.

The term reduced word typically refers to a minimum-length sequence of simple transpositions whose composition is an arbitrary specified permutation \cite{saga} (not just $\rho$), and the concept can be extended to general Coxeter (and other) groups.  In \cite{sort} and elsewhere reduced words are referred to as sorting networks (see below).

\sloppypar
Closely related to transposition shuffles are permutation networks and sorting networks.
A sequence $(a_i,b_i)_{i=1}^\ell$ is a \df{permutation network} of order $n$ if for every permutation $\pi\in S_n$ there is some subsequence $j(1),\ldots,j(r)$ of $1,\ldots,\ell$ such that $t(a_{j(1)},b_{j(1)})\cdots t(a_{j(r)},b_{j(r)}) =\pi$.
Clearly if $(a_i,b_i,p_i)_{i=1}^\ell$ is a transposition shuffle then $(a_i,b_i)_{i=1}^\ell$ must be a permutation network.
Define the \df{sort} operator $s(a,b)$ by ${x\cdot s(a,b):=x'}$ where for a sequence $x=(x_1,\ldots,x_n)$ the sequence $x'$ agrees with $x$ except that $x'_a=\min(x_a,x_b)$ and $x'_b=\max(x_a,x_b)$.  A \df{sorting network} is a sequence $(a_i,b_i)_{i=1}^\ell$ such that for every permutation $\pi\in S_n$ we have $\pi \cdot s(a_1,b_1)\cdots s(a_\ell,b_\ell)=\id$.  Every sorting network is a permutation network.

There are permutation networks of order $n$ and length asymptotic to $n \log_2 n$ as $n\to \infty$ \cite{waksman}, asymptotically matching the obvious lower bound $\lceil \log_2 n!\rceil \sim n \log_2 n$.  There are sorting networks of length $O(n\log n)$ \cite{aks}, but known constructions are quite indirect and complex, with impractically large constants in the $O$ notation; on the other hand there are straightforward constructions of length $O(n \log^2 n)$ with reasonable constants \cite{batcher}.  Can these networks be turned into transposition shuffles?

Restricting attention to simple transpositions, $(a_i,a_i+1)_{i=1}^\ell$ is a sorting network if and only if it is a permutation network, and moreover this is equivalent to the condition $t(a_1)\cdots t(a_\ell)=\rho$;  see e.g.\ \cite[5.3.4]{knuthvol3}.  Thus, the minimum length of a simple permutation network (or sorting network) is ${n\choose 2}$, and the minimal examples coincide with reduced words as defined earlier.

Sorting networks have applications in distributed or hardware-optimized systems such as graphics processor units.  Transposition shuffles also appear natural for applications, since the ability to permute objects uniformly is useful for privacy or security as well as for games of chance.

To our knowledge transposition shuffles have not been considered before. The problem of ``square roots'' of uniform measure addressed in \cite{square-roots} is somewhat related, while \emph{asymptotic} shuffling under various random transposition models has been studied extensively -- see e.g.\ \cite{lpw} for a comprehensive treatment and \cite{extra} for a specific model close to the one considered here.

\section{Simple transpositions}

We divide the proof of \cref{main} into two parts.  First we show that \cref{adj} works; then we show that it exhausts the possibilities.  We will use several standard properties of reduced words.  For a reduced word $(a_i)_{i=1}^\ell$ recall that we write $\sigma_{j}=t(a_1)\cdots t(a_{j})$ for the (deterministic) permutation after $j$ steps, so that in particular $\sigma_0=\id$ and $\sigma_\ell=\rho$.  On the other hand we write $\pi_j=T_1\cdots T_j$ for the (random) composition of the first $j$ lazy transpositions, so that in a transposition shuffle $\pi_\ell$ is uniform on $S_n$.

A reduced word $(a_i)_{i=1}^\ell$ may be transformed into another via \df{moves} of the following types.
\begin{ilist}
\item \df{Commuting move:} if two consecutive elements $a_{j},a_{j+1}$ satisfy $|a_j-a_{j+1}|\geq 2$, exchange them to get the word $(a_1,\ldots,a_{j+1},a_j,\ldots,a_\ell)$.
\item \df{Braid move:} if three consecutive elements $(a_{j},a_{j+1},a_{j+2})$ are of the form $(k,k+1,k)$, replace them with $(k+1,k,k+1)$, or vice versa.
\end{ilist}

\begin{prop}[Tits, \cite{tits}]\label{tits}
Any reduced word may be transformed into any other via a sequence of moves of types (i) and (ii).
\end{prop}

\cref{tits} is a special case of a more general result \cite{tits}, which applies to reduced words of an arbitrary permutation (not just $\rho$), and to general Coxeter groups.  We remark that the result would be essentially obvious if we in addition allowed moves of the form $(k,k)\leftrightarrow()$, which change the length of the word.

We next address how to transform probabilities under braid moves.  See \cref{braid-ex} for an example.
\begin{samepage}
\begin{lemma}\label{braid}
Let $n=3$, let $(T_i)_{i=1}^3$ be independent lazy transpositions with respective parameters $(1,2,p),(2,3,q),(1,2,r)$, and let $(T'_i)_{i=1}^3$ be independent lazy transpositions with respective parameters $(2,3,p'),(1,2,q'),(2,3,r')$.  Given $p,q,r\in(0,1)$, it is possible to choose $p',q',r'\in(0,1)$ so that the compositions $T_1T_2T_3$ and $T'_1T'_2T'_3$ are equal in law if and only if $$\frac{p}{1-p}+\frac{r}{1-r}=\frac{q}{1-q},$$ in which case the unique choice is $(p',q',r')=(r,q,p)$.
\end{lemma}
\end{samepage}
\begin{figure}
\centering
{}\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{3}; \def\l{3};
\def\s{.9};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 2/3/{4/5}, 1/2/{3/4}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{3}; \def\l{3};
\def\s{.9};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\foreach[count=\i] \a/\b/\p in
{2/3/{3/4}, 1/2/{4/5}, 2/3/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
\node at (\n+1,-\s*\i) {$\p$};
};
\end{tikzpicture}
\hfill {}
\caption{A braid move.  The two sequences of independent lazy transpositions have the same effect.}
\label{braid-ex}
\end{figure}

We remark that the requirement that the probabilities lie in $(0,1)$ is needed -- otherwise there are further (degenerate) solutions such as $(p,q,r)=(1,0,0)$, $(p',q',r')=(0,1,0)$.

\begin{proof}[Proof of \cref{braid}]
It is convenient to use the parameters $P=p/(1-p)$, $Q=q/(1-q)$ etc.  The two compositions are equal in law if and only if they assign equal probabilities to each of the $3!$ permutations.  This yields the equations
\begin{align*}
PQR&=P'Q'R'&
PQ&=Q'R'&
QR&=P'Q'\\
1+PR&=1+P'R'&
Q&=P'+R'&
P+R&=Q',
\end{align*}
which are equivalent to the conditions $P+R=Q$ and $(P',Q',R')=(R,Q,P)$.
\end{proof}

\begin{proof}[Proof of \cref{main} -- correctness of construction]
Here we prove that for any reduced word, \cref{adj} gives a transposition shuffle.
We first check this in an easy case, the ``bubble sort'' word.  Let $\ell={n\choose 2}$ and take:
\begin{alignat*}{5}
(a_i)_{i=1}^{\ell} &= \bigl(1,2,\ldots,n-1,\ &&1,2,\ldots,n-2,\ &&\ldots\  &&2,1,\ &&1\bigr).\\
\intertext{The corresponding probabilities according to \cref{adj} are:}
(p_i)_{i=1}^{\ell} &= \bigl(\tfrac12,\tfrac23,\ldots,\tfrac{n-1}{n},\ &&\tfrac12,\tfrac23,\ldots,\tfrac{n-2}{n-1},\ &&\ldots\ &&\tfrac12,\tfrac23,\ &&\tfrac12\bigr).
\end{alignat*}
We check that $\SS=(a_i,a_i+1,p_i)_{i=1}^\ell$ is a transposition shuffle.  Indeed,
this is a special case of \cref{sweep}: the first $n-1$ steps form a sweep, so the permutation $\pi_{n-1}$ has uniformly random last element $\pi_{n-1}(n)$.  The remaining sequence of parameters agrees with the entire sequence for $n-1$, so by induction, their composition is a uniformly random permutation of elements $1,\ldots,n-1$, concluding the argument.

Now we apply \cref{tits}.  Suppose that $(a_i)_{i=1}^{\ell}$ and $(a'_i)_{i=1}^{\ell}$ are reduced words that are related by a single move, and let $(p_i)_{i=1}^{\ell}$ and $(p'_i)_{i=1}^{\ell}$ be the corresponding probabilities given by \cref{adj} in each case.  It suffices to show that if $(a_i,a_i+1,p_i)_{i=1}^\ell$ is a transposition shuffle then so is $(a'_i,a'_i+1,p'_i)_{i=1}^\ell$.  This clearly holds in the case of a commuting move.

For a braid move we will use \cref{braid}.  Suppose without loss of generality that the move replaces $(a_j,a_{j+1},a_{j+2})=(k,k+1,k)$ with $(a'_j,a'_{j+1},a'_{j+2})=(k+1,k,k+1)$.  Write $(u,v,w)=(\sigma_{j-1}(k),\sigma_{j-1}(k+1),\sigma_{j-1}(k+2))$ for the three (deterministic) elements involved, which satisfy $u<v<w$.  Let $(p,q,r)=(p_j,p_{j+1},p_{j+2})$ and $(p',q',r')=(p'_j,p'_{j+1},p'_{j+2})$ be the three probabilities before and after the move, and write $P=p/(1-p)$ so that $p=P/(1+P)$, etc. Then the formula for the probabilities in \cref{adj} gives
\begin{align*}
(P,Q,R)&=\bigl(v-u,w-u,w-v\bigr)\\
(P',Q',R')&=\bigl(w-v,w-u,v-u\bigr).
\end{align*}
These values satisfy the conditions of \cref{braid}.
\end{proof}

We now prepare for the uniqueness part of the proof of \cref{main}.  We parameterize the probability space as follows.  Given $(a_i,b_i,p_i)_{i=1}^\ell$ as usual, let $\omega=(\omega_i)_{i=1}^\ell$ be independent $\{0,1\}$-valued random variables with $\P(\omega_i=1)=p_i$, and let the lazy transposition $T_i$ equal $t(a_i,b_i)$ if and only if $\omega_i=1$ (and otherwise equal $\id$).  Thus, for given $(a_i,b_i)_{i=1}^\ell$, the permutations $\pi_0,\ldots,\pi_\ell$ are deterministic functions of $\omega$.  They take values $\sigma_0,\ldots,\sigma_\ell$ when $\omega$ is the all-$1$ vector.

The next lemma characterizes the ways in which element $1$ can reach position $n$ in the final permutation $\pi_\ell$.  See \cref{delete}.

\begin{samepage}
\begin{lemma}\label{traj}
For any reduced word $(a_i)_{i=1}^\ell$ of order $n$ there exists a fixed set $H\subseteq\{1,\ldots,\ell\}$ with $|H|=n-1$ such that $\pi_\ell(n)=1$ if and only if $\omega_h=1$ for all $h\in H$.  Moreover, in that case the trajectory of element $1$ satisfies (and is determined by):
$\pi_i^{-1}(1)-\pi_{i-1}^{-1}(1)=\ind[i\in H]$ for all $0< i \leq \ell$.
\end{lemma}
\end{samepage}

\begin{figure}
{} \hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{5}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\node[text=red] at (1,0) {$1$};
\node[text=red] at (5,-7.7) {$1$};
\foreach[count=\i] \a/\b/\p in
{1/2/{1/2}, 3/4/{1/2}, 2/3/{3/4}, 4/5/{2/3},
1/2/{2/3}, 3/4/{4/5}, 2/3/{3/4},
4/5/{2/3}, 1/2/{1/2}, 3/4/{1/2}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
};
\draw[line width=3,red] (1,-.35)--(1,-.7)--(2,-.7)--(2,-2.1)-
(3,-2.1)--(3,-4.2)--(4,-4.2)--(4,-5.6)--(5,-5.6)--(5,-7.35);
\end{tikzpicture}
\hfill
\begin{tikzpicture}[thick,scale=0.75]
\def\n{4}; \def\l{10};
\def\s{.7};
\foreach \x in {1,...,\n} \draw (\x,-.5*\s)--(\x,-\l*\s-.5*\s);
\node[text=red] at (1,0) {\phantom{$1$}};
\node[text=red] at (5,-7.7) {\phantom{$1$}};
\foreach \a/\b/\i in
{ 2/3/{2}, 3/4/{4},
1/2/{5},  2/3/{7},
 1/2/{9}, 3/4/{10}}
{
\node[fill=black,shape=circle,inner sep=0.75mm] (a) at (\a,-\s*\i) {};
\node[fill=black,shape=circle,inner sep=0.75mm] (b) at (\b,-\s*\i) {};
\draw (a)--(b);
};
\end{tikzpicture}
\hfill {}
\caption{An illustration of \cref{traj} and its application in the proof of \cref{main}. Left: the only way element $1$ can reach location~$n$.  Right: the lower-order reduced word obtained by deleting its trajectory.}
\label{delete}
\end{figure}

\begin{proof}
First note that in the determinisitic sequence of permutations $\sigma_0,\ldots,\sigma_\ell$, each of the $n \choose 2$ pairs of elements of $\{1,\ldots,n\}$ swaps exactly once.  In particular, element $1$ swaps with every other element exactly once, and it must move from left to right when it does so.  Let
\begin{align*}
H&=\bigl\{h: \sigma_h^{-1}(1)-\sigma_{h-1}^{-1}(1)=1\bigr\}\\
&=\bigl\{h: \sigma_{h-1}^{-1}(1)=a_h\bigr\}
\end{align*}
be the set of times when these swaps occur.  Note that no other transpositions are incident to the trajectory of $1$; that is,
\begin{equation}
\sigma_{i-1}^{-1}(1)\notin\{a_i,a_i+1\}\quad\text{for }i\notin H.
\label{inc}
\end{equation}

It follows immediately that $\pi_i^{-1}(1)=\sigma_i^{-1}(1)$ for all $i$ if and only if $\omega_h=1$ for all $h\in H$.  It remains to show that there is no other possible trajectory via which element $1$ can end at position $n$.  Suppose on the contrary that $\omega$ is such that $\pi_\ell(1)=n$ but $\pi_i^{-1}(1)\neq\sigma_i^{-1}(1)$ for some $i$.  If $\pi_i^{-1}(1)<\sigma_i^{-1}(1)$ for some $i$, consider the largest $i$ for which this holds.  Then we must have
$$1+\pi_i^{-1}(1)=\sigma_i^{-1}(1)=\pi_{i+1}^{-1}(1)=\sigma_{i+1}^{-1}(1)=k,\text{ say}.$$
But this implies that $a_{i+1}=k-1$ (and $\omega_{i+1}=1$), giving a contradiction to \eqref{inc} and the definition of $H$.  On the other hand if $\pi_i^{-1}(1)>\sigma_i^{-1}(1)$ for some $i$, considering the smallest such $i$ leads similarly to a contradiction.
\end{proof}

\begin{proof}[Proof of \cref{main} -- uniqueness]
It is clear that no simple transposition shuffle can have length less than $n\choose 2$, since it would be incapable of producing the reverse permutation $\rho$ (in which every pair of elements is reversed).

It remains to show uniqueness: for any reduced word $(a_i)_{i=1}^\ell$ there is at most one sequence of probabilities $(p_i)_{i=1}^\ell$ for which $(a_i,a_{i}+1,p_i)_{i=1}^\ell$ is a transposition shuffle.  We prove this statement by induction on the order $n$.  It is clearly true for $n\leq 2$.

Fix the reduced word, and let $H$ be the set from \cref{traj}.  By that lemma, for any transposition shuffle we must have
$$\frac1n=\P\bigl(\pi_\ell(n)=1\bigr)=\P\bigl(\omega_h=1\,\forall h\in H\bigr)=
\prod_{h\in H} p_h,$$
so this product of $p_h$'s is uniquely determined.  Moreover, conditional on the event $\pi_\ell(n)=1$, the remaining elements $[\pi_\ell(1),\ldots,\pi_\ell(n-1)]$ should form a uniformly random permutation of $2,\ldots,n$.

To make use of this last fact we delete the trajectory of element $1$ from the reduced word to get a lower-order word.  More precisely, define $(c_i)_{i=1}^\ell$ by
$$c_i:=\begin{cases}
a_i, &a_i<\sigma_{i-1}^{-1}(1);\\
a_i-1, &a_i>\sigma_{i-1}^{-1}(1)+1;\\
\infty, &i\in H,
\end{cases}$$
where we use $\infty$ as a dummy symbol.
Then the subsequence $(a'_i)_{i=1}^{\ell'}:=(c_i:i\notin H)$ obtained by deleting all occurrences of $\infty$ is a reduced word of order $n-1$ (and length $\ell':={n\choose 2}-(n-1)={n-1 \choose 2}$).  See \cref{delete}.
Now consider any $\omega\in\{0,1\}^\ell$ that satisfies $\omega_h=1$ for all $h\in H$, and define the subsequence $\omega':=(\omega_i:i\notin H)\in\{0,1\}^{\ell'}$.  Let $\pi'_{\ell'}$ be the final permutation of an order-$(n-1)$ simple transposition shuffle with word $(a'_i)_{i=1}^{\ell'}$ at the element $\omega'$ of its probability space.  Then the final permutation under the original shuffle at $\omega$ is
$$\pi_\ell=\bigl[\pi'_{\ell'}(1)+1,\ldots,\pi'_{\ell'}(n-1)+1,1\bigr].$$
Therefore, by the induction hypothesis, there is at most one possible choice of the vector of probabilities $(p_i)_{i\notin H}$ that results in the correct conditional law of the permutation $\pi_\ell$ given $\pi_\ell(n)=1$.

Now, by symmetry, we can apply the same argument to the set
$$\widehat{H}=\bigl\{h: \sigma_h^{-1}(n)-\sigma_{h-1}^{-1}(n)=-1\bigr\}$$
of times when element $n$ moves, to deduce that there is also at most one choice for the vector of probabilities $(p_i)_{i\notin \widehat{H}}$.  Now, $H\cap\widehat H$ has exactly one element: it is the unique time $k$ at which elements $1$ and $n$ swap in $\sigma_0,\ldots,\sigma_{\ell}$.  Hence there is at most one choice for $(p_i)_{i\neq k}$.  But since $\prod_{h\in H} p_h$ is determined, there is at most one choice for $p_k$ also.
\end{proof}

\section{General Transpositions}

\begin{proof}[Proof of \cref{rigid}]
We fix the parameters $(a_i,b_i)_{i=1}^\ell$ and consider dependence of the law of the final permutation $\pi_\ell$ on the probabilites $(p_i)_{i=1}^\ell$.  For any given permutation $\alpha\in S_n$ we have
$$\P(\pi_\ell=\alpha)=\sum_{\omega\in S_\alpha}\prod_{i:\omega_i=1} p_i \prod_{i:\omega_i=0} (1-p_i)$$
for some set $S_\alpha\subseteq\{0,1\}^\ell$.
Suppose we vary one probability $p_j$ while fixing the others.  Then the dependence is affine:
$$\P(\pi_\ell=\alpha)=A+B p_j,$$
where the constants $A$ and $B$ depend on $j$, $\alpha$ and $(p_i:i\neq j)$.
Suppose that the choice of probabilities $(p_i)_{i=1}^\ell$ gives a transposition shuffle, and so also do the probabilities obtained by altering $p_j$ (only) to a different value $p'_j\neq p_j$.  Then in particular
$$A+B p_j = A+B p'_j=1/n!,$$
so $B=0$, hence \emph{any} choice of $p''_j\in[0,1]$ will also give $\P(\pi_\ell=\alpha)=1/n!$.  The same argument applies for every permutation $\alpha$, so any choice of $p''_j$ gives a transposition shuffle.  But in particular we can take $p''_j=0$ and remove the $j$th lazy transposition altogether, so $\ell$ was not minimal.
\end{proof}

\begin{proof}[Proof of \cref{half}]
We first prove the statement about the first and last probabilities.  Suppose $\mathcal{S}=(a_i,b_i,p_i)_{i=1}^\ell$ is a minimum-length transposition shuffle.  Appending a lazy transposition with parameters
$(a_\ell,b_\ell,\tfrac12)$
to the sequence clearly gives another transposition shuffle.  But now the last two lazy transpositions can be replaced a single one of parameters
$(a_\ell,b_\ell, \frac12)$.  This contradicts rigidity, \cref{rigid}, unless $p_\ell=\tfrac12$.   Symmetry gives $p_1=\tfrac12$ also.

Now we turn to the claim about the number of occurrences of $\tfrac12$.  To any random permutation $\pi$ of $S_n$ we can associate the $n\times n$ matrix $M(\pi)$ with entries
$$M(\pi)_{i,j}=\P(\pi(i)=j).$$
(In other words, $M(\pi)$ is the expectation of the permutation matrix.)  If $\pi$ and $\tau$ are independent random permutations then $M(\pi\tau)=M(\pi)M(\tau)$.

In a transposition shuffle, $M(\pi_\ell)$ is the matrix with all entries $1/n$, which has rank $1$.  On the other hand, the matrix $M(T)$ of the lazy transposition with parameters $(a,b,p)$ agrees with the identity except in the intersection of rows $a$ and $b$ with columns $a$ and $b$, where it has the form
$$\left(
    \begin{array}{cc}
      1-p & p \\
      p & 1-p \\
    \end{array}
  \right).
$$
Thus $M(T)$ has rank $n$ if $p\neq\tfrac12$ and rank $n-1$ if $p=\tfrac12$.  Sylvester's rank inequality states that $n-\rank(AB)\leq n-\rank(A)+n-\rank(B)$ for $n\times n$ matrices $A,B$, so we deduce that $\{i:p_i=\tfrac12\}\geq n-1$ as required.
\end{proof}

\section*{Acknowledgements}
We thank Swee Hong Chan for helpful comments on an earlier draft, and Viktor Kiss for sharing the results of his computational experiments.

\bibliographystyle{abbrv}

Probability (math.PR); Combinatorics (math.CO)

Perfect shuffling by lazy swaps