Displays a Standard Young Tableau as a grid of numbered cells or a color-coded heatmap for large shapes. Uses the Greene-Nijenhuis-Wilf hook walk algorithm to sample uniformly random SYT. Draw shapes interactively, enter partition notation, or use Plancherel/staircase presets, then click Generate SYT.
Skip to simulation visualization
Generate Random Standard Young Tableaux
About the Hook-Walk Algorithm
The hook-walk algorithm (Greene-Nijenhuis-Wilf) generates uniformly random Standard Young Tableaux (SYT) of any given shape. This is a fundamental tool in algebraic combinatorics with applications to representation theory, symmetric functions, and random matrix theory.
How it works:
- Start with an empty Young diagram of the given shape
- For each number k from N down to 1:
- Pick a random starting cell uniformly from all empty cells
- Perform a random walk within the hook: move right or down with probabilities proportional to arm and leg lengths
- Stop when reaching a corner cell (arm = leg = 0)
- Place k at that corner and remove it from the diagram
Properties:
- Uniform sampling: Each SYT of the given shape has equal probability
- Efficient: O(N√N) time complexity for N boxes
- Scalable: Handles shapes up to 100,000 boxes using WASM
Shape input methods:
- Draw Shape: Click cells on the interactive grid to draw Young diagrams by hand
- Manual notation: Enter row lengths like
5,5,5or100^50 - Plancherel measure: Sample random partitions by discretizing the Vershik-Kerov limit shape Ω(x) = (2/π)[x√(1-x²) + arcsin(x)]
Visualization:
- Small tableaux (≤200 boxes): Individual numbers displayed in cells
- Large tableaux (>200 boxes): Heat map showing value distribution by deciles
Draw only the outline; interior is auto-filled.
Current boxes: 0
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 (samples SYT up to 100 000 boxes))