read `AGT.txt`: Help26:=proc(): print(` GenGp(S), CtoP(C) , ParToPer(P), IndPer(pi), CIPkn(n,x) `):end: #GenGp(S): inputs a set of permutations S and outputs the group generated by it GenGp:=proc(S) local n,i,G1,G2,G3,g1,s: n:=nops(S[1]): G1:={[seq(i,i=1..n)]}: G2:=G1 union {seq(seq(Mul(g1,s), s in S),g1 in G1)}: while G1<>G2 do G3:=G2 union {seq(seq(Mul(g1,s), s in S),g1 in G2)}: G1:=G2: G2:=G3: od: G2: end: #CtoP(C): Given a permutation in cycle notation converts it to one-line notatin CtoP:=proc(C) local i,T,j,n: n:=add(nops(C[i]),i=1..nops(C)): for i from 1 to nops(C) do for j from 1 to nops(C[i])-1 do T[C[i][j]]:=C[i][j+1]: od: T[C[i][-1]]:=C[i][1]: od: [seq(T[i],i=1..n)]: end: #ParToPer(P): Given a partion P of an integer n (a member of Pars1(n,n)) outputs the "canononical permuation" of that type ParToPer:=proc(P) local n,cu,i,j,r,C,c: n:=nops(P): C:={}: cu:=1: for i from 1 to n do for j from 1 to P[i] do c:=[seq(r,r=cu..cu+i-1)]: C:=C union {c}: cu:=cu+i: od: od: CtoP(C): end: #IndPer(pi): Given a permutation pi on the set of vertices outputs the permutation on the set of edges of the complete graph on n vertices IndPer:=proc(pi) local n,Ed,i,j,T,r,T1: n:=nops(pi): Ed:=[seq(seq({i,j},j=i+1..n),i=1..n)]: for r from 1 to nops(Ed) do T1[Ed[r]]:=r: od: for r from 1 to nops(Ed) do T[Ed[r]]:={pi[Ed[r][1]],pi[Ed[r][2]]}: od: [seq(T1[T[Ed[r]]],r=1..nops(Ed))]: end: #CIPkn(n,x): The cycle-index permutation of K_n CIPkn:=proc(n,x) local S,pi: S:=permute(n): add(WtP(IndPer(pi),x), pi in S)/n!: end: