#C25.txt, Dec. 1, 2016, Math640 (Fall 2016), ExpMath, Littlewood-Richardson coeffs. Help:=proc(): print(`aLg(L,x,m), sLg(L,x,m) , LWc(L,M,N),P(n), Tabs1BE(L,k,maxLine),TabsBE(L,k) `): print(`Tabs1BEg(L,M,k,maxLine) `): end: #################################################Start stuff from Brian## #written by Bryan Ek (who won a dollar in the contest for the fastest program) #Tabs1BE(L,k,maxLine): Inputs partition L, positive integer k>=nops(L) and maxLine. #Outputs the set of all (column-strict) tableaux of shape L using {1,..,k}. #k is guaranteed to be in the tableaux but must appear at or "below" the maxLine. Tabs1BE:=proc(L,k,maxLine) local n,S,i,L1: option remember: n:=nops(L): if kL[i+1] then L1:=[op(1..i-1,L),L[i]-1,op(i+1..n,L)]: S:=S union {seq([op(1..i-1,s1),[op(s1[i]),k],op(i+1..n,s1)],s1 in {seq(op(Tabs1BE(L1,j,1)),j=n..(k-1)),op(Tabs1BE(L1,k,i))})}: fi: od: if L[n]=1 then#i=n at this point. L1:=L[1..n-1]: S union {seq([op(s1),[k]],s1 in {seq(op(Tabs1BE(L1,j,1)),j=n-1..(k-1))})}: else L1:=[op(1..n-1,L),L[n]-1]: S union {seq([op(1..n-1,s1),[op(s1[n]),k]],s1 in {seq(op(Tabs1BE(L1,j,1)),j=n..(k-1)),op(Tabs1BE(L1,k,n))})}: fi: end: ############################## #TabsBE(L,k): Inputs partition L and positive integer k. k>=nops(L) otherwise you receive the emptyset. #Outputs the set of all (column-strict) tableaux of shape L using {1,..,k}. TabsBE:=proc(L,k): {seq(op(Tabs1BE(L,j,1)),j=nops(L)..k)}: end: with(linalg): 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: #aLg(L,x,m): inputs a partition L of n, say, a variable x, and m>=n outputs #the numerator of the famous Schur polynomial s_L(x[1], ...., x[m]) aLg:=proc(L,x,m) local i,j,n,L1,del: n:=convert(L,`+`): if m=n outputs #the famous Schur polynomial s_L(x[1], ...., x[m]) sLg:=proc(L,x,m) : normal(aLg(L,x,m)/aLg([0$m],x,m)): end: #LWc(L,M,N): inputs partitions L,M,and N such that |N|+|M|=|L| and outputs #The Littlewood-Richardon coeff., namely the coeff. of s_L in the product s_M*s_N #Done directly from the definition LWc:=proc(L,M,N) local x,i,l,m,n,f,L1: l:=convert(L,`+`): m:=convert(M,`+`): n:=convert(N,`+`): if n+m<>l then RETURN(0): fi: #coeff of sLg(L,x,l) in sLg(M,x,l)*sLg(N,x,l) f:=expand(sLg(M,x,l)*aLg(N,x,l)): L1:=[op(L),0$(l-nops(L))]: L1:=[seq(L1[i]+l-i,i=1..l)]: for i from 1 to l do f:=coeff(f,x[i],L1[i]): od: f: end: