Help15:=proc(): print(` RS1(Y,i),MakeRoom(Y,n,i), RSleft(pi), RS(pi) `): end: #C15.txt; March 12, 2026 with(combinat): #RS(pi): The LEFT SYT corresponding to pi RS:=proc(pi) local Yl,i,Yr, eaea,p: if pi=[] then RETURN([[],[]]): fi: Yl:=[[pi[1]]]: Yr:=[[1]]: for i from 2 to nops(pi) do eaea:=RS1(Yl,pi[i]): Yl:=eaea[1]: p:=eaea[2]: if p<=nops(Yr) then Yr:=[op(1..p-1,Yr),[op(Yr[p]),i],op(p+1..nops(Yr),Yr)]: else Yr:=[op(Yr),[i]]: fi: od: [Yl, Yr]: end: #RSleft(pi): The LEFT SYT corresponding to pi RSleft:=proc(pi) local Y,i: Y:=[]: for i from 1 to nops(pi) do Y:=RS1(Y,pi[i])[1]: od: Y: end: MakeRoom:=proc(Y,n,i) local j: subs({seq(j=j+1,j=i..n)},Y): end: RS1:=proc(Y,i) local k,NewY,lucy,bumpee,i1,j: if Y=[] then RETURN([[i]],1): fi: k:=nops(Y): lucy:=RS11(Y[1],i): NewY[1]:=lucy[1]: bumpee:=lucy[2]: if bumpee=0 then RETURN([NewY[1],op(2..k,Y)],1): fi: for i1 from 2 to k while bumpee<>0 do lucy:=RS11(Y[i1],bumpee): NewY[i1]:=lucy[1]: bumpee:=lucy[2]: if bumpee=0 then RETURN([seq(NewY[j],j=1..i1),op(i1+1..k,Y)],i1): fi: od: [seq(NewY[j],j=1..k),[bumpee]],k+1: end: #Old stuff Help14:=proc(): print(` NuSYT(L), SYTpairs(n) , NuSYTpairs(n), RS11(a,i) `): end: #RS11(a,i): inputs an INCREASING list of positive integers, a, and another positive integer i #outputs a pair a1,j, where (usually a1 is of the same length as a) and i is put where it #belongs and j is the entry that it bumped, unless i is larger than all the members of a #(i.e. larger than a[-1]) then a1 is [op(a),i], and j is 0 RS11:=proc(a,i) local k,j: k:=nops(a): for j from 1 to k while a[j]L[i+1] then L1:=[op(1..i-1,L),L[i]-1,op(i+1..k,L)]: S:=S+NuSYT(L1): fi: od: if L[k]>1 then L1:=[op(1..k-1,L),L[k]-1]: S:=S+ NuSYT(L1): else L1:=[op(1..k-1,L)]: S:=S+NuSYT(L1): fi: S: end: #Very old stuff #C13.txt Help13:=proc(): print(` PFG(L), SYT(L), PSYT(n) `): end: Help12:=proc(): print(`Park(n,k), Par(n), ParN(n,k)`): end: ParN:=proc(n,k) local s,S,T: S:=Par(n):T:={}: for s in S do if s[1]=k then T:=T union {s}: fi: od: T: end: #Park(n,k): The set of partitions of n into exactly k parts Park:=proc(n,k) local S,k1,S1,s1: option remember: if nL[i+1] then L1:=[op(1..i-1,L),L[i]-1,op(i+1..k,L)]: S1:=SYT(L1): S:=S union {seq( [op(1..i-1,s1),[op(s1[i]),n],op(i+1..k,s1)] ,s1 in S1)}: fi: od: if L[k]>1 then L1:=[op(1..k-1,L),L[k]-1]: S1:=SYT(L1): S:=S union {seq( [op(1..k-1,s1),[op(s1[k]),n]] ,s1 in S1)}: else L1:=[op(1..k-1,L)]: S1:=SYT(L1): S:=S union {seq( [op(1..k-1,s1), [n]] ,s1 in S1)}: fi: S: end: #PSYT(Y): prints the SYT Y PSYT:=proc(Y) local i: for i from 1 to nops(Y) do lprint(op(Y[i])): od: end: