Viennot's Algorithm
Size of Permutation:   
Robinson-Schensted Correspondence and Viennot's Construction
Viennot's construction, named for Xavier Gérard Viennot, is a method of finding the ordered pair \((P, Q)\) of standard tableaux that correspond to a permutation, as predicted by the Robinson-Schensted correspondence.

Given a permutation \(\sigma\) on \(n\) letters, the process begins by plotting the points \( (i, \sigma(i))\) for \(1 \leq i \leq n\). Next, imagine a light shining from the origin towards the first quadrant of a plane, resulting in each point casting a shadow towards the north east. The boundaries of these shadows reveal the first row of the tableaux. Before removing the first set of shadows, draw new points at the new vertices of the shadow lines, and repeat the process to find the successive rows of the tableaux. The process is complete when no shadow lines have any remaining vertices.
Using the applet
Begin by choosing the size of the permutation you would like to enter. The applet supports permutations on up to 15 letters. Enter a permutation σ by clicking the blue buttons. The first number chosen is σ(1), the second is σ(2), etc.

After the permutation is entered, the applet will perform each step of the shadow construction and build the tableaux. When all steps are completed, the applet will then display the permutation in cycle notation.
About the applet
This applet was created using JavaScript and the P5 graphics library. It was last updated in February 2022.