Displays a canvas with colored pipes crossing through an N-by-M rectangular grid, where crosses and bumps form a pipe dream. Shows the resulting permutation as a matrix plot below. Adjust rows, columns, crossing probability, and Demazure reduction, then zoom and pan to explore the pipe configuration.
This simulation generates pipe dreams (also known as RC-graphs) on an $N \times M$ grid.
Pipe dream construction:
- Pipes enter from the left edge (labeled $1, 2, \ldots, N$ from top to bottom) and the bottom edge (labeled $N+1, N+2, \ldots, N+M$ from left to right)
- Each cell is randomly assigned as a cross ($+$, with probability $p$) or a bump (elbow, with probability $1-p$)
- At a cross, pipes pass straight through; at a bump, pipes turn 90 degrees
Demazure reduction: When enabled, if two pipes that have already crossed try to cross again (i.e., the left pipe has a larger label than the bottom pipe), the cross is forced to become a bump. This ensures each pair of pipes crosses at most once, producing a reduced pipe dream.
The output permutation is read from the top edge (left to right) followed by the right edge (top to bottom).
Statistics
Click "Generate" to create a pipe dream.
Output Permutation
Permutation Matrix
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/WASM) -
Link to code(C++ source code compiled to WebAssembly)
references
-
Colin Defant. Permutons from Demazure Products •
https://arxiv.org/abs/2505.15630(opens in new tab)