###################################################################### ##Ilse: Save this file as Ilse. To use it, stay in the # ##same directory, get into Maple (by typing: maple ) # ##and then type: read Ilse : # ##Then follow the instructions given there # ## # ##Written by Doron Zeilberger, Rutgers University , # #zeilberg at math dot rutgers dot edu # ###################################################################### #Created: Oct. 6, 2008 print(`Created: Oct. 6, 2008`): print(` This is Ilse `): print(`to explore a constant-term rendition of`): print(`of Ilse Fischer's goregous approach for enumerating`): print(`monotone triangles (alias Alternating Sign Matrices)`): print(`It accompanies a possible future paper `): print(` by a non-empty subset of`): print(` {Ilse Fischer, Dan Romik, Doron Zeilberger} `): print(``): print(`Please report bugs to zeilberg at math dot rutgers dot edu`): print(``): print(`The most current version of this package`): print(` are available from`): print(`http://www.math.rutgers.edu/~zeilberg/ .`): print(`For a list of the procedures type ezra();, for help with`): print(`a specific procedure, type ezra(procedure_name); .`): print(``): with(combinat): ezra1:=proc() if args=NULL then print(` The supporting procedures are: antisymmetrizer, symmetrizer`): print( ` `): else ezra(args): fi: end: ezra:=proc() if args=NULL then print(`The main procedures are: F, Ilse , IlseS`): print(` Ker1 , Ker2, Ker3 `): elif nops([args])=1 and op(1,[args])=antisymmetrizer then print(`antisymmetrizer(f,x,k) `): print(`The antisymmetrizer of a rational function f(x[1], ..., x[k])`): print(` w.r.t. to the symmetric group`): print(`For example, try: antisymmetrizer(x[1]+2*x[2],x,2); `): elif nops([args])=1 and op(1,[args])=F then print(` F(a): Given a list of non-decreasing pos. integers `): print(` finds the number of monotone triangles with bottom `): print(` given by a, where all the rows are strict except `): print(` (possibly) the last. For example try: `): print(` F([1,3,5,8]); `): print(` F([2,4,4,6]); `): elif nops([args])=1 and op(1,[args])=Ilse then print(`Ilse(a): Using the constant-term rendition of Ilse Fischer's`): print(`nice formula. For example, try:`): print(`Ilse([1,2,3,4]);`): elif nops([args])=1 and op(1,[args])=IlseS then print(`IlseS(a,n): using the constant-term rendition of`): print(`Ilse Fischer's formula for monotone triangles`): print(`with n rows where the bottom row is symbolic`): print(`a[1], .., a[n]. For example, try:`): print(`IlseS(a,4);`): elif nops([args])=1 and op(1,[args])=Ker1 then print(`Ker1(x,n): the kernel of the Fischer formula in constant-term version`): print(`for monotone triangles with n rows, in terms of the variables`): print(`x[1], ..., x[n]. `): print(`For example, try: Ker1(x,4);`): elif nops([args])=1 and op(1,[args])=Ker2 then print(`Ker2(x,n): the kernel of the Fischer formula in constant-term version`): print(`for monotone triangles with n rows, in terms of the variables`): print(`x[1], ..., x[n], without the discrimant part. `): print(`For example, try: Ker2(x,4);`): elif nops([args])=1 and op(1,[args])=Ker3 then print(`Ker3(x,n): the kernel of the Fischer formula in constant-term version`): print(`for monotone triangles with n rows, in terms of the variables`): print(`x[1], ..., x[n], without the discrimant part but with `): print(`the (1+x[1])^a[1]*...*(1+x[n])^a[n] part with (1,2,3,..., n)`): print(`For example, try: Ker3(x,4);`): elif nops([args])=1 and op(1,[args])=symmetrizer then print(`symmetrizer(f,x,k) `): print(`The symmetrizer of a rational function f(x[1], ..., x[k])`): print(` w.r.t. to the symmetric group`): print(`For example, try: symmetrizer(x[1]+2*x[2],x,2); `): else print(`There is no ezra for`,args): fi: end: ez:=proc(): print(` Anij(n,i,j), RomikT(n), Ker1(z,n), Ilse(a), F(a) `): print(`IlseS(a,n) `): end: #read GuessRat: U:=proc(a) local n,i,j,lu:option remember: n:=nops(a): if n=1 then RETURN({[]}) : elif n=2 then RETURN({seq([i],i=a[1]..a[2])}) : else lu:=U([op(1..n-1,a)]): {seq(seq([op(lu[i]),j],j=max(lu[i][n-2]+1,a[n-1])..a[n]), i=1..nops(lu))}: fi: end: #F(a): Given a list of non-decreasing pos. integers #finds the number of monotone triangles with bottom #given by a, where all the rows are strict except #(possibly) the last. For example try: #F([1,3,5,8]); #F([2,4,4,6]); F:=proc(a) local gu,i: option remember: if nops(a)=1 then 1 else gu:=U(a): add(F(gu[i]),i=1..nops(gu)):fi:end: An:=proc(n) local i: F([seq(i,i=1..n)]):end: Ank:=proc(n,k) local i: F([seq(i,i=1..k-1),seq(i,i=k+1..n)]):end: Anij:=proc(n,k1,k2) local i: F([seq(i,i=1..k1-1),seq(i,i=k1+1..k2-1),seq(i,i=k2+1..n)]):end: Bnk:=proc(n,k): Ank(n,k)/Ank(n,k+1):end: Bnk1:=proc(n,j): Anij(n,2,j)/Ank(n,2,j+1):end: GuessASM:=proc(n,k,d) local x,y: subs({y=k, x=n-k}, GuessRat((x,y)->Bnk(x+y,y),[x,y],d,1)): end: GuessRomik1:=proc(n,k,d) local x,y: subs({y=k, x=n-k}, GuessRat((x,y)->Anij(x+y,y),[x,y],d,1)): end: RomikT:=proc(n) local i,j: [seq([seq(Bnk1(n,j),j=i+1..n)],i=1..n-1)]: end: #Ker1(x,n): the kernel of the Fischer formula in constant-term version #for monotone triangles with n rows, in terms of the variables #x[1], ..., x[n]. #For example, try: Ker1(x,4); Ker1:=proc(z,n) local p,q: option remember: mul(mul(1+z[q]+z[p]*z[q],q=p+1..n),p=1..n)* mul(mul(1/z[q]-1/z[p],q=p+1..n),p=1..n): end: #Ker2(x,n): the kernel of the Fischer formula in constant-term version #for monotone triangles with n rows, in terms of the variables #without the discriminant part #x[1], ..., x[n]. #For example, try: Ker2(x,4); Ker2:=proc(z,n) local p,q: option remember: mul(mul(1+z[q]+z[p]*z[q],q=p+1..n),p=1..n): end: #Ilse(a): Using the constant-term rendition of Ilse Fischer's #nice formula. For example, try: #Ilse([1,2,3,4]); Ilse:=proc(a) local i,g,n,z: n:=nops(a): g:=expand(Ker1(z,n)*mul((1+ z[i])^a[i],i=1..n)): for i from 1 to n do g:=coeff(g,z[i],0): od: g: end: ###########antisymmeriser####### with(combinat): #actpi is the result of the action of the permutation pi #of {1,2, ...,k} on a rational function of (x[1], ... , x[k]) actpi:=proc(f,x,pi) local g,i,y,k: k:=nops(pi): g:=f: for i from 1 to k do g:=subs(x[i]=y[pi[i]],g): od: for i from 1 to k do g:=subs(y[i]=x[i],g): od: g: end: #signpi gives the sign of a permutation pi signpi:=proc(pi): (-1)^inv(pi): end: #The symmetrizer of a rational function f(x[1], ..., x[k]) # w.r.t. to the symmetric group symmetrizer:=proc(f,x,k) local pi,j,gu,schum: schum:=0: gu:=permute(k): for j from 1 to nops(gu) do pi:=op(j,gu): schum:=schum+actpi(f,x,pi): od: factor(normal(schum/k!)): end: antisymmetrizer:=proc(f,x,k) local pi,j,gu,schum: schum:=0: gu:=permute(k): for j from 1 to nops(gu) do pi:=op(j,gu): schum:=schum+signpi(pi)*actpi(f,x,pi): od: factor(normal(schum/k!)): end: #inv is the number of inversions of a permutation pi inv:=proc(pi) local schum,i,j,k: schum:=0: k:=nops(pi): for i from 1 to k do for j from i+1 to k do if pi[i]>pi[j] then schum:=schum+1: fi: od: od: schum: end: ###########antisymmeriser####### Ilse1:=proc(a) local i,g,n,z: n:=nops(a): g:=expand(Ker1(z,n)*mul((1+1/z[i])^a[i],i=1..n))/mul(z[i],i=1..n): for i from 1 to n do g:=coeff(g,z[i],0): od: g: end: #Ker3(z,n): the kernel of the Fischer formula in constant-term version #with 1,2,,,,,n at the bottom w/o the discriminant part Ker3:=proc(x,n) local p,q,i: mul(mul(1+x[q]+x[p]*x[q],q=p+1..n),p=1..n)*mul((1+x[i])^i,i=1..n): end: #IlseS(a,n): using the constant-term rendition of #Ilse Fischer's formula for monotone triangles #with n rows where the bottom row is symbolic #a[1], .., a[n]. For example, try: #IlseS(a,4); IlseS:=proc(a,n) local i,g,z: g:=Ker1(z,n)*mul((1+z[i])^a[i],i=1..n): for i from 1 to n do g:=series(g,z[i]=0,2*n+1): g:=expand(coeff(g,z[i],0)): od: g: end: