#hw3.txt, January 30, 2014, Frank Wagner #1. #Here are some examples from pages 60-90 of Garvan's Maple booklet #with(plots): #implicitplot3d(y^2-x^2=z, x=-2..2, y=-2..2, z=-4..4); #with(plots): #animate3d([r*cos(t+a),r*sin(t+a),r^2*cos(2*t)],r=0..1,t=0..2*Pi,a=0..3, #frames=10,style=patch,title=`The Rotating Saddle`); #animate3d([r*cos(t+a),r*sin(t+a),r^2*cos(2*t)+sin(a)],r=0..1,t=0..2*Pi,a=0..2*Pi, #frames=10,style=patch,title=`The Flying Pizza`); #with(linalg): #B:=matrix(2,2); #entermatrix(B); #enter element 1,1 > 12; #enter element 1,2 > 13; #enter element 2,1 > 14; #enter element 2,2 > 15; #matadd(B,B); #f := (i,j) -> x^(i*j); #A := matrix(4,4,f); #factor(det(A)); #with(linalg): #A:=matrix(2,2,[1,2,3,4]): #B:=matrix(2,2,[-2,3,-5,1]): #A+B; #evalm(%); #2. #For Hil(50), the lowest number of Digits that produces a good #agreement (<1% difference) is 75 #Considering Hil(n): #For n=10, this number is 14 #For n=20, this number is 29 #For n=30, this number is 44 #For n=40, this number is 59 #For n=60, this number is 90 #For n=70, this number is 105 #For n=80, this number is 120 #For n=90, this number is 135 #For n=100, this number is 151 #Clearly, the relationship between n and the lowest number of #Digits that produces a good agreement seems to be #Digits=1.5*n #3. with(combinat): inv1:=proc(p) local i,j,n,s: s:=0: n:=nops(p): for i from 1 to n do for j from i+1 to n do if p[i] > p[j] then s:=s+1: fi: od: od: s: end: gf:=proc(n,q) local P: P:=permute(n): add ( q^inv1(p) , p in P): end: #For n=1, gf(n,q)=1 #For n=2, gf(n,q)=1+q #For n=3, gf(n,q)=(1+q)*(q^2+q+1) #For n=4, gf(n,q)=(1+q)^2*(q^2+q+1)*(q^2+1) #For n=5, gf(n,q)=(1+q)^2*(q^2+q+1)*(q^2+1)*(q^4+q^3+q^2+q+1) #For n=6, gf(n,q)=(1+q)^3*(q^2+q+1)^2*(q^2+1)*(q^4+q^3+q^2+q+1)*(q^2-q+1) #For n=7, gf(n,q)=(1+q)^3*(q^2+q+1)^2*(q^2+1)*(q^4+q^3+q^2+q+1)*(q^2-q+1)*(q^6+q^5+q^4+q^3+q^2+q+1) #For n=8, gf(n,q)=(1+q)^4*(q^2+q+1)^2*(q^2+1)^2*(q^4+q^3+q^2+1)*(q^2-q+1)*(q^6+q^5+q^4+q^3+q^2+q+1)*(q^4+1) #A conjecture of a "nice" formula for this factored form could be: gfc:=proc(n,q): mul(((1+q^(2^i))^(floor(n/(2^(i+1))))),i=0..floor(log[2](n/2)))*mul((add(q^i,i=0..2*j))^floor(n/(2*j+1)),j=0..floor((n-1)/2))*mul(add(((-1)^i)*q^i,i=0..2*j),j=0..floor(n/6)): end: #Upon experimentation, this works for n=1,..,8, but fails for n=9.