HelpOldOldOld:=proc(): print(`Par(n), Par1(n,k), GuessPol(L,n) `): print(` Mamas(n), f(L), Guess2(a,b1) , Guess3(a,b1,c1) `): end: HelpOldOld:=proc(): print(`Children(L), Nes1(L), Nes(L) `): print(`Y(n,k), SeqY(n,k), Yr(n,k,r), SeqYr(n,k,r) , F(L),PY(Y), PSY(S)`): print(` YFF(L) , ProveYFF(k) , HLF(L) `): end: HelpOld:=proc(): print(` HL(L,i,j) , Ins1(Y,i,row1) `): print(`Ins(Y,i)`): end: Help:=proc(): print(`RS(pi), PYTss(n), CP(A,B), TestRS(n) , invers(pi) `): print(` DEL1(Y,row1,bumpee)`): end: with(combinat): #Par(n): the set of integer-partitions of n Par:=proc(n) local k: option remember: {seq( op(Par1(n,k)),k=1..n)}: end: #Par1(n,k): the set of partitions of n whose #largest part is k Par1:=proc(n,k) local k1,beth,b,S: option remember: if n=1 then if k=1 then RETURN({[1]}): else RETURN({}): fi: fi: if n=k then RETURN({[n]}): fi: if k<=0 or k>n then RETURN({}): fi: S:={}: for k1 from 1 to k do beth:=Par1(n-k,k1): S:=S union {seq([k,op(b)], b in beth)}: od: S: end: #par(n): the number of integer-partitions of n par:=proc(n) local k: option remember: add(par1(n,k),k=1..n): end: #par1(n,k): the number of partitions of n whose #largest part is k par1:=proc(n,k) local S,k1: option remember: if n=1 then if k=1 then RETURN(1): else RETURN(0): fi: fi: if n=k then RETURN(1): fi: if k<=0 or k>n then RETURN(0): fi: add(par1(n-k,k1),k1=1..k): end: #GuessPol1(L,d,n): guesses a polynomial of degree d in n for # the list L, such that L[i]=P[i] for i>=s0 for example, try: #GuessPol1([(seq(i,i=1..10),1,n,1); GuessPol1:=proc(L,d,n) local P,i,a,eq,var: if d>=nops(L)-3 then ERROR(`the list is too small`): fi: P:=add(a[i]*n^i,i=0..d): var:={seq(a[i],i=0..d)}: eq:={seq(subs(n=i,P)-L[i],i=1..d+4)}: var:=solve(eq,var): if var=NULL then RETURN(FAIL): fi: subs(var,P): end: #GuessPol(L,n): guesses a polynomial of degree d in n for # the list L, such that L[i]=P[i] for i>=1 for example, try: #GuessPol([(seq(i,i=1..10),n); GuessPol:=proc(L,n) local d,gu: for d from 0 to nops(L)-4 do gu:=GuessPol1(L,d,n): if gu<>FAIL then RETURN(factor(gu)): fi: od: FAIL: end: #Mamas(L): all the shapes obtained from L by #nibbling a corner Mamas:=proc(L) local i,k,S: if L=[] then RETURN({}): fi: S:={}: k:=nops(L): for i from 1 to k-1 do if L[i]>L[i+1] then S:=S union {[op(1..i-1,L),L[i]-1,op(i+1..k,L)]}: fi: od: if L[k]>=2 then S:=S union {[op(1..k-1,L),L[k]-1]}: else S:=S union {[op(1..k-1,L)]}: fi: S: end: f:=proc(L) local S,s: option remember: if L=[] then RETURN(1): fi: S:=Mamas(L): add(f(s), s in S): end: #Guess2(a,b1): guesses a poly. expression in a #for the number of 2-rowed Young tableaux whose #bottom row has b1 boxes #(b1 pos. integer, a a symbol) Guess2:=proc(a,b1) local a1: subs(a=a-(b1-1), GuessPol([seq(f([a1,b1]),a1=b1..2*b1+5)],a)): end: #Guess3(a,b1,c1): guesses a poly. expression in a #for the number of 3-rowed Young tableaux whose #middle row has b1 boxes and #bottom row has c1 boxes #(b1 pos. integer,c1, b1>=c1, a a symbol) Guess3:=proc(a,b1,c1) local a1: if b1L[i] then S:=S union { [op(1..i-1,L), L[i]+1, op(i+1..nops(L),L)]}: fi: od: S:=S union {[op(L),1]}: S: end: #Nes1(L): the ratio of Sum(f(L1), L1 child of L) and f(L) #for a partition L Nes1:=proc(L) local i,C: C:=Children(L): add(f(brian),brian in C)/f(L): end: Nes:=proc(n) local S: S:=Par(n): {seq(evalb(Nes1(s)=n+1), s in S)}: end: NES:=proc(N) local n: evalb({seq(evalb(Nes(n)={true}),n=1..N)}={true}) : end: #NES is verifying the GOING-UP RECURRENCE # (n+1) f(L)= Sum(f(L1), L1 in Children(L)) #Y(n,k): the total number of f(L)^k L in Par(n) Y:=proc(n,k) local A: A:=Par(n): add(f(L)^k, L in A): end: #SeqY(N,k): the sequence of Y(n,k) for n=1.. N SeqY:=proc(N,k) local n: [seq(Y(n,k),n=1..N)]:end: #Yr(n,k,r): the total number of f(L)^k L in Par1(n,k) Yr:=proc(n,k,r) local L: add( add(f(L)^k, L in Par1(n,r1)) ,r1=1..r ): end: #SeqY(N,k): the sequence of Y(n,k) for n=1.. N SeqYr:=proc(N,k,r) local n: [seq(Yr(n,k,r),n=1..N)]:end: #F(L):the set of Stan. YT of shape L F:=proc(L) local A,L1,n,A1,i,Lara,a1: option remember: Lara:=nops(L): n:=convert(L,`+`): if L=[] then RETURN({[]}): fi: A:={}: 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)]: A1:=F(L1): A1:= {seq( [ op(1..i-1,a1), [op(a1[i]),n],op(i+1..nops(a1),a1)], a1 in A1)}: A:=A union A1: fi: od: if L[Lara]>1 then L1:=[op(1..Lara-1,L),L[Lara]-1]: A1:=F(L1): A1:= {seq( [ op(1..Lara-1,a1), [op(a1[Lara]),n]], a1 in A1)}: A:=A union A1: else L1:=[op(1..Lara-1,L)]: A1:=F(L1): A1:= {seq( [ op(1..Lara-1,a1),[n] ], a1 in A1)}: A:=A union A1: fi: A: end: #PY(Y): inputs a tableaux and prints it nicely PY:=proc(Y) local i: for i from 1 to nops(Y) do lprint(op(Y[i])): od: end: #PSY(S): prints out nicely all the tableaux of the set S PSY:=proc(S) local s: for s in S do PY(s): print(``): od: end: #YFF(L): The Rowland conjectured explicit formula for #the number of SYT of shape L YFF:=proc(L) local i,j,M: convert(L,`+`)!/mul( (L[i]+nops(L)-i)!,i=1..nops(L))* mul(mul(L[i]-L[j]+j-i,j=i+1..nops(L)),i=1..nops(L)): end: #ProveYYF(k): Proves (completely rigorously the Y-F-Rowland #formula for k rows ProveYFF:=proc(k) local E,a,E1,i: E:=YFF([seq(a[i],i=1..k)]): E1:=YFF([seq(a[i],i=1..k-1)]): evalb(simplify( { normal(subs(a[k]=0,E)-E1), seq(subs(a[i+1]=a[i]+1,E),i=1..k-1), normal(simplify(1-add(subs(a[i]=a[i]-1,E)/E ,i=1..k)))})= {0}): end: #HL(L,i,j): inputs a shape L and int. i, and j #outputs the hooklength of the (i,j) box in L #(the number of boxes below and to the right) #plus itself HL:=proc(L,i,j) local co,k,i1: co:=L[i]-j+1: for i1 from i+1 to nops(L) while L[i1]>= j do co:=co+1: od: co: end: HLF:=proc(L) local i,j,n: n:=convert(L,`+`): n!/mul( mul(HL(L,i,j),j=1..L[i]),i=1..nops(L)): end: #Ins1(Y,i,row1): inputs a Young tableau with all different pos. integers #and an integer i (not already in Y) and outputs the #modified tableau obtained by inserting i at its due place #at row1 followed (if applicable) by the bumped integer Ins1:=proc(Y,i,row1) local j,bumpee: for j from 1 to nops(Y[row1]) while Y[row1][j]{} do aek:=Ins1(Y1, bumpee, row1): Y1:=aek[1]: bumpee:=aek[2]: od: if bumpee<>{} then RETURN([op(Y1),[bumpee]] ,row1): else RETURN(Y1,row1-1): fi: end: #RS(pi): The Robinson-Schenstead Algorithm that inputs #a permutation and outputs a pair of SYT of the same shape RS:=proc(pi) local n,Y1,Y2,i,baxter,j: n:=nops(pi): Y1:=[]: Y2:=[]: for i from 1 to n do baxter:=Ins(Y1,pi[i]): Y1:=baxter[1]: j:=baxter[2]: if j<=nops(Y2) then Y2:=[op(1..j-1,Y2), [op(Y2[j]),i], op(j+1..nops(Y2),Y2)]: else Y2:=[op(Y2),[i]]: fi: od: [Y1,Y2]: end: #CP(A,B): The set of pairs [a,b], where a is in A and b is in B CP:=proc(A,B) local a,b: { seq( seq ( [a,b], a in A), b in B) }: end: #The set of pairs of SYT of the same shape with n boxes PYTss:=proc(n) local beth,L,emilie,brian: beth:=Par(n): emilie:={}: for L in beth do brian:=F(L): emilie:=emilie union CP(brian,brian): od: emilie: end: #TestRS(n): Verifies (empirically) that the output #RS on permute(n) is indeed what it is suppposed to be # TestRS:=proc(n) local pi: evalb( {seq( RS(pi), pi in permute(n))}=PYTss(n)): end: invers:=proc(pi) local T,i: for i from 1 to nops(pi) do T[pi[i]]:=i: od: [seq( T[i],i=1..nops(pi))]: end: DEL1:=proc(Y,row1,bumpee) local R,FormerBumpee,i: R:=Y[row1]: for i from 1 to nops(R) while R[i]