$\shape(2,5,4)=(1,3,2)$.
The word $7\,8\,6\,1\,3\,2\,4\,5,$ is $3$-universal.
The word $3\, 5\, 1\, 0\, 5\, 1\, 2\, 3$ of length $3!+2$ is 3-universal: the sequence of shapes of its factors of length 3 is: $$(2,3,1)\rightarrow (3,2,1)\rightarrow (2,1,3)\rightarrow (1,3,2)\rightarrow (3,1,2)\rightarrow (1,2,3).$$
Problem 147: Superstrings of shapes of permutations |
Two words $u$ and $v$ of the same length are said to be order-equivalent, written $u \approx v$, if $u[i] \lt u[j]\Longleftrightarrow v[i] \lt v[j]$ for all pairs of positions $i,j$ on the words. For a word $u$ of length $n$ with all letters distinct we define $\shape(u)$ as the $n$-permutation of $\{1,2,\ldots,n\}$ order-equivalent to $u$. Define $$\SHAPES_n(w)=\{\shape(u)\,\mid\, u\ \mbox{is a factor of}\ w\ \mbox{of length}\ n\}.$$
For $n\gt 2$ there is no word containing exactly once each $n$-permutation, but surprisignly in order-preserving case such a word exists for each $n$. A word of size $n!+n-1$ containing shapes of all $n$-permutations is called a universal word, it is a superstring of shapes of all $n$-permutations. Obviously $n!+n-1$ is the smallest length of such word.