FUNCTION: Word2Tab - convert a word into a tableau
CALLING SEQUENCE:
- Word2Tab(w)
- TAB[Word2Tab](w)
-
PARAMETERS:
- w = any word
SYNOPSIS:
- The Word2Tab function inserts a word [x1, x2, ...] into an empty tableau
from the right. It first inserts x1, then x2, and so on.
- The insertion algorithm is due to Schensted.
- When called with the 'nil' option as second argument, the Word2Tab
function nilplactically inserts the word into the empty tableau.
Whenever the word is not a reduced decomposition, it returns [].
- Whenever there is a conflict between the function name Word2Tab and
another name used in the same session, use the long form TAB['Word2Tab'].
EXAMPLES:
> with(TAB):
> Tab2Mat( Word2Tab(w[5,6,2,4,3,7,1]) );
[ 5 ]
[ ]
[ 4 ]
[ ]
[ 2 6 ]
[ ]
[ 1 3 7 ]
> Word2Tab(w[1,2,1,3,2,1], 'nil');
[[3], [2, 3], [1, 2, 3]]
SEE ALSO: Bump Tab2Mat Tab2Word