Random adjacent transposition shuffle (source code)

= Random adjacent transposition shuffle

On the <symmetric group> $S_n$, this <Markov chain> chooses uniformly from the identity and the $n-1$ adjacent <transpositions>, and multiplies on the right. Its <stationary distribution> is the <uniform distribution on a finite set>, because the generators are self-inverse. A fixed label's position is a <lumped Markov chain> on a <path graph> with off-diagonal <transition probabilities> $1/n$ to existing neighbours.