research33 min studyLesson 933 in Mathematics

The Robinson–Schensted–Knuth correspondence

Track row insertion and recording tableaux, preserving multiplicities and recovering subsequence information.

On this page

What you’ll understand

  • Perform row insertion with the first strictly larger bumping rule.
  • Construct and invert the recording tableau for a permutation.
  • State the matrix-biword extension and its alphabet ordering.

The Robinson–Schensted–Knuth correspondence records an ordered sequence through a pair of tableaux of one common shape. The insertion tableau retains reorganized values; the recording tableau remembers where new boxes appeared. Keeping both is essential: sorting values alone loses their original order. We use row insertion with weakly increasing rows and strictly increasing columns. A value bumps the leftmost entry strictly larger than itself, so equal entries remain together in a row rather than being pushed downward.

Insertion is a local rule with a global shape

To insert a value a into a row, replace the first entry greater than a by a and insert the displaced value into the next row. If no entry is greater, append a at the row end and stop. Eventually a new box is created. The bumping inequalities ensure that the resulting diagram is a partition and that column strictness survives. This preservation is a theorem about the specified rule; replacing greater than by greater than or equal changes the convention and the resulting subsequence statistic.

For a permutation w of 1 through n, start with empty P and Q. Insert successive values of w into P; put the insertion time i into Q at the single new box. Both tableaux are standard, since each input value and each time appears once. They have the same shape but generally different entries. The common first-row length is the length of a longest increasing subsequence of w, and the first-column length is the length of a longest decreasing subsequence, with subsequences preserving positions rather than requiring consecutive entries.

w∈Sn⟷(P,Q),shape⁡(P)=shape⁡(Q)=λ⊢n,n!=∑λ⊢n(fλ)2w\in S_n\longleftrightarrow(P,Q),\qquad \operatorname{shape}(P)=\operatorname{shape}(Q)=\lambda\vdash n,\qquad n!=\sum_{\lambda\vdash n}(f^\lambda)^2
The permutation correspondence is bijective. fλ counts standard tableaux of shape λ, so counting tableau pairs gives the factorial identity.↔ Scroll wide equations horizontally.

The recording tableau makes the operation reversible

For permutations, locate the largest recording label n, remove its corner box from Q, and remove the value in the corresponding box of P. Move that value upward by reverse insertion: in the row above, replace the rightmost entry smaller than the carried value and carry the displaced entry upward. The value exiting the first row is the final input. Repeating reconstructs the word backward. The corner location and strict inequality make this a deterministic inverse rather than a guess at a possible original order.

For a matrix of nonnegative integers, form a multiset of pairs (i,j) containing each pair with its matrix multiplicity. Sort pairs by increasing i and, among equal i, increasing j. Insert the lower entries j and record upper entries i in new boxes. Now both P and Q are semistandard, and their contents are the matrix column sums and row sums respectively. The total number of boxes is the sum of all entries. This lexicographic ordering is part of ordinary RSK, not an optional preprocessing choice.

∏i=1r∏j=1s(1−xiyj)−1=∑λsλ(x1,…,xr)sλ(y1,…,ys)\prod_{i=1}^{r}\prod_{j=1}^{s}(1-x_i y_j)^{-1}=\sum_\lambda s_\lambda(x_1,\ldots,x_r)s_\lambda(y_1,\ldots,y_s)
The Cauchy identity counts nonnegative integer matrices by row and column weights through the RSK bijection. It is a formal power-series identity.↔ Scroll wide equations horizontally.

Repeated letters and shape statistics require care

For a general word, recording the distinct insertion times still gives a standard Q, whereas P may contain repeats. Under this row convention, its first row measures the longest weakly increasing subsequence; its first column measures the longest strictly decreasing subsequence. The distinction disappears for permutations but matters immediately for a constant word: every equal value appends, producing one row. A claim about strictly increasing subsequences for arbitrary repeated words would therefore be false.

The shape forgets information even though the full pair is reversible. Two words can have the same insertion tableau but different recording tableaux, and many pairs can share a shape. In algebraic combinatorics this controlled loss is useful: grouping matrices or permutations by shape factors an enumeration into two tableau counts. It is also a warning when interpreting an algorithmic output: a shape is a statistic, P is a richer invariant, and the ordered pair carries the information needed for inversion.

Insert the permutation 3,1,4,2

Compute both standard tableaux for w=3142, and check its longest increasing subsequence length.

  1. Insert 3, creating P=[3] and recording 1. Insert 1: it bumps 3 to a second row, so P has rows [1] and [3]; Q has rows [1] and [2].

  2. Insert 4 at the end of the first row. Record 3 there. Then insert 2: it bumps 4 from the first row into the second row, where 4 appends after 3.

  3. The final P has rows [1,2] and [3,4]; Q has rows [1,3] and [2,4]. The subsequences 1,4 and 1,2 have length two, and checking the four triples shows that none is increasing.

The result

The common shape is (2,2), and its first-row length two agrees with the longest increasing subsequence.

Explore the model

Interactive lab

Interactive lab · probability

RSK partitions a fixed-content word class

Pause, reset, then set p=0.5 and n=3. The one-success bar is 3/8, counting 112,121,211 after identifying success with 2. Predict that row insertion gives shape (3) once and shape (2,1) twice. Compute those three insertions manually and compare their total with the bar count times eight. The instrument does not perform insertion or display tableaux.

RSK partitions a fixed-content word classThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA bijection preserves the whole fixed-content count while distributing words among shapes and recording tableaux.

Check your understanding

Under the insertion convention in this lesson, where does a value a bump an entry in a row?

Try it yourself

Insert the word 2,1,2 and give P, Q and the longest weakly increasing subsequence length.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Track the first row after inserting 2 then 1. For the final 2, ask whether any entry in that row is strictly larger; do not bump merely because of equality.

Compare with the solution

After inserting 2, P=[2]. Inserting 1 bumps 2 into row two, giving rows [1] and [2], with recording labels 1 above 2. The final 2 appends to row one, giving P rows [1,2] and [2], and Q rows [1,3] and [2]. The common shape is (2,1). Both the subsequence formed by the first and third values, 2,2, and the subsequence 1,2 have weakly increasing length two; no length-three weakly increasing subsequence exists because the original word descends from 2 to 1.

Take it with you

  • Strictly larger forward bumps preserve weak rows and strict columns.
  • Insertion and recording tableaux together recover the original permutation.
  • Repeated words use weakly increasing and strictly decreasing subsequence statistics.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.