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.
P-Tableau (Insertion Tableau)
Q-Tableau (Recording Tableau)
code
(note: parameters in the code might differ from the ones in
simulation results below)
-
Link to code
(This simulation is interactive, written in JavaScript, see the source code of this page at the link)
-
Link to code
(C++ code for WASM module (handles permutations up to size 10000))
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).
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