#C14.txt (Oct. 24, 2016), Math640 (RU) Experimental Mathematics Help:=proc(): print(` P(n), YD(L) , DYT(T) `): end: with(combinat): #Rev(L): reverse of L Rev:=proc(L) local n,i: n:=nops(L): [seq(L[n-i+1],i=1..n)]: end: #P(n): the list of (integer) partitons of n in non-increasing order P:=proc(n) local S,i: S:=partition(n): Rev([seq(Rev(S[i]),i=1..nops(S))]): end: #YD(L): prints out the Young (Ferrers) diagram of the partition L YD:=proc(L) local i: for i from 1 to nops(L) do lprint(1$L[i]): od: end: #SYT(L): inputs a partition L and outputs the SET of all Standard Young Tableaux of shape L SYT:=proc(L) local i,L1,n,S1,s1,S: option remember: n:=convert(L, `+`): if n=0 then RETURN({[]}): fi: S:={}: for i from 1 to nops(L)-1 do if L[i]>L[i+1] then L1:=[op(1..i-1,L),L[i]-1, op(i+1..nops(L),L)]: S1:=SYT(L1): S:=S union { seq([op(1..i-1,s1), [op(s1[i]),n] , op(i+1..nops(s1),s1)], s1 in S1)}: fi: od: for i from nops(L) to nops(L) do if L[i]>1 then L1:=[op(1..i-1,L),L[i]-1]: S1:=SYT(L1): S:=S union { seq([op(1..i-1,s1), [op(s1[i]),n]], s1 in S1)}: else L1:=[op(1..i-1,L)]: S1:=SYT(L1): S:=S union { seq([op(1..i-1,s1), [n]], s1 in S1)}: fi: od: S: end: #DYT(T): prints out nicely the Young Tableau T DYT:=proc(T) local i: for i from 1 to nops(T) do lprint(op(T[i])): od: end: