# References for GAP # [GAP4] # The GAP Group, # GAP -- Groups, Algorithms, and Programming, Version 4.4, 2004, # http://www.gap-system.org. # [CTblLib] # Thomas Breuer, # Manual for the GAP Character Table Library, Version 1.1, # Lehrstuhl D für Mathematik, Rheinisch Westfälische Technische # Hochschule, Aachen, Germany, 2004. tbl:=CharacterTable("Symmetric"); # For a given representation of the symmetric group (given as a # partition) calculates the dimension of the representation rsize:=function(part) local nn,ones; nn:=Sum(part); if nn=0 then return 1; else ones:=List([1..nn],j->1); return tbl.irreducibles[1][1](nn,part,ones); fi; end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of k-cycles (without 1-cycles) ksval2:=function(kk,part) local sums,parts,lengths,length,res,ll,j,ix,sign,signs,nn,ans,p,q; parts:=List([1..kk],ix->[]); signs:=List([1..kk],ix->1); length:=Size(part); p:=Int(length/kk); q:=length mod kk; sign:=(-1)^((1/4*p*(p-1)*kk*(kk-1)+1/2*p*q*(q+1)+kk*p*q) mod 2); for j in [1..length] do ll:=part[j]+(length-j); res:=ll mod kk; Add(parts[res+1],ll); signs[res+1]:=-signs[res+1]; sign:=sign*Product([0..res-1],ix->signs[ix+1]); od; #Print("parts=",parts,"\n"); lengths:=List(parts,Size); if lengths = List(Reversed([0..kk-1]),res->Int((length+res)/kk)) then for ix in [0..kk-1] do parts[ix+1]:=(parts[ix+1]-ix)/kk - Reversed([0..(lengths[ix+1]-1)]); od; #Print("parts=",parts," "); sums:=List(parts,Sum); #Print("sums=",sums," "); ans:= Factorial(Sum(sums))/Product(sums,Factorial) *Product(parts,rsize); else return 0; fi; #Print("\n"); return sign*ans; end; alphaGo:=function(nn,alpha1,alpha2,alpha3) local chars; chars:=tbl.charparam[1](nn); return Sum(chars, function(chi) local ca1,ca2,ca3; ca1:=ksval2(alpha1,chi); if ca1=0 then return 0; else ca2:=ksval2(alpha2,chi); if ca2=0 then return 0; else ca3:=ksval2(alpha3,chi); if ca3=0 then return 0; else return ca1*ca2*ca3/rsize(chi); fi; fi; fi; end ); end; # gap> result:=alphaGo(60,10,3,2); # 484875820382080204800/214568908640397642331 # # gap> time; # 472382 # 472 382 ms \approx 472 sec \approx 8 min # # result*Factorial(60) / (Factorial(30)*2^30 * Factorial(20)*3^20); # 7782675600000 # 7 782 675 600 000 # gap> result18:=alphaGo(24,6,4,3); # 29682383904/14315125825 # gap> time; # 312 # gap> result18*Factorial(24) / (Factorial(8)*3^8 * Factorial(6)*4^6); # 1649021328 # # gap> alphaGo(30,10,3,2); # 497166336/215656441 # gap> last*Factorial(30)/(Factorial(15)*2^15 * Factorial(10)*3^10); # 66600 ###### Old stuff/testing code ##### Maximum(List(tbl.charparam[1](50),chi->ksval(10,chi))); time; Maximum(List(tbl.charparam[1](50),chi->ksval2(10,chi))); time; for nn in 2*[1..10] do Print(nn," "); Print(ForAll(tbl.charparam[1](nn),chi-> twosval2(chi)=ksval2(2,chi)),"\n"); od; for nn in 3*[1..10] do Print(nn," "); Print(ForAll(tbl.charparam[1](nn),chi-> threesval2(chi)=ksval2(3,chi)),"\n"); od; for kk in [1..5] do Print("kk=",kk,"\n"); for nn in kk*[1..4] do Print("nn=",nn," "); Print(ForAll(tbl.charparam[1](nn),chi-> ksval(kk,chi)=ksval2(kk,chi)),"\n"); od; Print("\n"); od; for nn in 3*[1..10] do Print(nn," "); Print(ForAll(tbl.charparam[1](nn),chi-> threesval(chi)=threesval2(chi)),"\n"); od; for nn in 2*[1..10] do Print(nn," "); Print(ForAll(tbl.charparam[1](nn),chi-> twosval(chi)=twosval2(chi)),"\n"); od; Go:=function(nn) local chars,ones; ones:=List([1..nn],j->1); chars:=tbl.charparam[1](nn); return Sum(chars, function(chi) local c1,c2,c3,c10; c10:=ksval(10,chi); if c10=0 then return 0; else c3:=ksval2(3,chi); if c3=0 then return 0; else c1:=tbl.irreducibles[1][1](nn,chi,ones); c2:=ksval2(2,chi); return c2*c3*c10/c1; fi; fi; end ); end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of 2-cycles (without 1-cycles) twosval:=function(part) local nn,twos; nn:=Sum(part); twos:=List([1..nn/2],j->2); return tbl.irreducibles[1][1](nn,part,twos); end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of 3-cycles (without 1-cycles) threesval:=function(part) local nn,threes; nn:=Sum(part); threes:=List([1..nn/3],j->3); return tbl.irreducibles[1][1](nn,part,threes); end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of k-cycles (without 1-cycles) ksval:=function(kk,part) local nn,ks; nn:=Sum(part); ks:=List([1..nn/kk],j->kk); return tbl.irreducibles[1][1](nn,part,ks); end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of 2-cycles (without 1-cycles) twosval2:=function(part) local sum0,sum1,odds,evens,ll,j,sign; odds:=[]; evens:=[]; sign:=1; for j in [1..Size(part)] do ll:=part[j]+(Size(part)-j); if ll mod 2 = 0 then Add(evens,ll); else Add(odds,ll); if j mod 2 = 0 then sign:=-sign; fi; fi; od; if not Size(evens)-Size(odds) in [0,1] then return 0; else if Size(part) mod 4 = 3 then sign:=-sign; fi; evens:=1/2*evens-List([1..Size(evens)],j->Size(evens)-j); odds:=1/2*(odds-1)-List([1..Size(odds)],j->Size(odds)-j); sum0:=Sum(evens); sum1:=Sum(odds); return sign*rsize(evens)*rsize(odds)*Binomial(sum0+sum1,sum0); fi; end; # For a given representation of the symmetric group, given as a # partition, calculates the character value for the permutation which # is a product of 2-cycles (without 1-cycles) threesval2:=function(part) local sums,parts,lengths,length,res,ll,j,ix,sign,signs,nn,ans; length:=Size(part); parts:=[[],[],[]]; if length mod 12 in [5..10] then sign:=-1; else sign:=+1; fi; signs:=[1,1,1]; for j in [1..length] do ll:=part[j]+(length-j); res:=ll mod 3; Add(parts[res+1],ll); signs[res+1]:=-signs[res+1]; sign:=sign*Product([0..res-1],ix->signs[ix+1]); od; #Print("parts=",parts,"\n"); lengths:=List(parts,Size); if lengths = [Int((length+2)/3),Int((length+1)/3),Int(length/3)] then for ix in [0,1,2] do parts[ix+1]:=(parts[ix+1]-ix)/3 - Reversed([0..(lengths[ix+1]-1)]); od; #Print("parts=",parts," "); sums:=List(parts,Sum); #Print("sums=",sums," "); ans:= Factorial(Sum(sums))/Product(sums,Factorial) *Product(parts,rsize); else return 0; fi; #Print("\n"); return sign*ans; end;