RSK for Permutations     permutations

Leonid Petrov


Simulation Info

RSK for Permutations     permutations

Leonid Petrov

Displays a permutation matrix and two Standard Young Tableaux (P and Q) built step by step via the RSK correspondence. Shows animated or instant row-bumping insertion with color-coded cells. Enter a permutation or generate random ones with uniform or block-structured sampling, then run forward RSK with adjustable animation speed.

RSK Algorithm Interactive Visualization

About the RSK Algorithm

The Robinson-Schensted-Knuth (RSK) correspondence is a bijection between permutations and pairs of Standard Young Tableaux (SYT) of the same shape.

This visualization demonstrates both directions:

  • Forward RSK: Permutation → (P-tableau, Q-tableau)
  • Inverse RSK: (P-tableau, Q-tableau) → Permutation

For large permutations (N > 100), the simulation automatically uses a WebAssembly module for optimal performance.

Current Permutation

P-Tableau (Insertion Tableau)

Q-Tableau (Recording Tableau)


code

(note: parameters in the code might differ from the ones in simulation results below)

Dear colleagues:

Feel free to use code (unless otherwise specified next to the corresponding link), data, and visualizations to illustrate your research in talks and papers, with attribution (CC BY-SA 4.0 (opens in new tab)). Some images are available in very high resolution upon request. I can also produce other simulations upon request - email me at lenia.petrov@gmail.com
This material is based upon work supported by the National Science Foundation under Grant DMS-2153869