Help:=proc(): if args=NULL then print(`The main procedures are: rPar, rPar1, Children, rPP`): print(` `): elif nops([args])=1 and op(1,[args])=rPar then print(`rPar(M,K,r2): the set of resticted r2-partitions of length M (where 0 is allowed) with the first part equal to K.`): print(`Try: `): print(`rPar(3,2,-1);`): elif nops([args])=1 and op(1,[args])=rPar1 then print(`rPar1(M,K,r2): the set of resticted r2-partitions of length M (where 0 is allowed) with parts <= K.`): print(`Try: `): print(`rPar1(3,2,-1)`): elif nops([args])=1 and op(1,[args])=Children then print(`Children(p1,r1,r2): outputs all members p2 of rPar(M,K,r2) (M:=nops(p1),K:=p1[1]) such that p1 p2 are legal first two columns of an (r1,r2)-plane partition.`): print(`Try: `): print(`Children([1,2],0,-1)`): elif nops([args])=1 and op(1,[args])=rPP then print(`rPP(M,N,K,r1,r2,q): outputs the generating function of (r1,r2)-plane partition whose base in an M by N rectangle and whose first entry is equal to K (with weight q^(sum of parts).`): print(`Try: `): print(`rPP(2,2,1,0,0,q)`): else print(`There is no Help for`,args): fi: end: #rPar(M,K,r2): the set of resticted r-partitions of length M (where 0 is allowed) with the first part equal to K. rPar:=proc(M,K,r2) local M1,K1,p,S: option remember: S:={}: if M=1 then RETURN({[K]}): fi: for K1 from 0 to K-r2 do S:=S union {seq([K,op(p)], p in rPar(M-1,K1,r2))}: od: S: end: #rPar1(M,K,r2): the set of resticted r-partitions of length M (where 0 is allowed) with the first part equal to K and all other parts no greater than K. rPar1:=proc(M,K,r2) local M1,K1,p,S: option remember: S:={}: if M=1 then RETURN({[K]}): fi: for K1 from 0 to K-r2 do if K1<=K then S:=S union {seq([K,op(p)], p in rPar1(M-1,K1,r2))}: fi: od: S: end: Children:=proc(p1,r1,r2) local p,s,K1,ch,i,S,S1,K,M: option remember: K:=p1[1]: M:=nops(p1): if M=1 then RETURN({seq([i],i=0..K-r1)}): fi: S:={}: p:=p1[2..nops(p1)]: S1:=Children(p,r1,r2): for K1 from 0 to K-r1 do for ch in S1 do if K1-ch[1]>=r2 then S:=S union {[K1,op(ch)]}: fi: od: od: S: end: #inputs non-negative integers M, N, K, an integer (pos., neg. or zero) r and a variable (or number) q, #and outputs the generating function (with weight q^(Sum of parts)/the product of the parts). rPP:=proc(M,N,K,r1,r2,q) local gen,p1: option remember: gen:=0: for p1 in rPar(M,K,r2) do gen:=gen+rPP1(p1,N,r1,r2,q): od: gen: end: rPP1:=proc(p1,N,r1,r2,q) local S,gen,p2: option remember: gen:=0: if N=1 then RETURN(q^(convert(p1,`+`))): fi: S:=Children(p1,r1,r2): for p2 in S do gen:=gen+q^(convert(p1,`+`))*rPP1(p2,N-1,r1,r2,q): od: expand(gen): end: #PL(a,b,c) the number of plane partitions whose Young tableaux fit inside an axb rectangle and whose integers do not exceed c (MacMahon box formula) PL:=proc(a,b,c) local i, j, k: mul(mul(mul((i+j+k-1)/(i+j+k-2),k=1..c),j=1..b),i=1..a): end: