// AutTest is modified from Dr. S. Allen Broughton's // ThetaQuest as part of tileclass.mgm AutTest := function(G,a,b,ta,tb) aP := {@ : i in [1..(Order(a)-1)] @}; bP := {@ : i in [1..(Order(b)-1)] @}; W := {@@}; W1 := W; W2 := W; P1 := aP; P2 := bP; while #W lt #G do W1 := {@ : g in P1, x in W1 @}; W2 := {@ : g in P2, x in W2 @}; W := W join (W1 join W2); P3 := P1; P1 := P2; P2 := P3; end while; X := {@ z[1]:z in W @}; thX := {@ z[2]:z in W @}; LaX := {@ a*x :x in X @}; LbX := {@ b*x :x in X @}; LtaX := {@ ta*x :x in X @}; LtbX := {@ tb*x :x in X @}; if not (#X eq #G) then return false; end if; if not (#thX eq #G) then return false; end if; iY := [Position(X,z):z in thX]; iLa := [Position(X,z):z in LaX]; iLb := [Position(X,z):z in LbX]; iLta := [Position(X,z):z in LtaX]; iLtb := [Position(X,z):z in LtbX]; S := SymmetricGroup(#G); th := S!iY; La := S!iLa; Lb := S!iLb; Lta := S!iLta; Ltb := S!iLtb; if (La^th eq Lta) and (Lb^th eq Ltb) then return true; else return false; end if; end function; Graph := function(G, l, m, n) aleph := []; beis := []; K := {@ g : g in G @}; for p in K do if Order(p) eq l then for q in K do if Order(q) eq m then if Order(q^-1*p^-1) eq n then if #G eq #sub then aleph := Append(aleph,p); beis := Append(beis,q); end if; end if; end if; end for; end if; end for; Alpha := [aleph[1]]; Beta := [beis[1]]; for w in [2..#aleph] do automorphic := false; for k in [1..#Alpha] do if automorphic then break k; end if; automorphic := AutTest(G,Alpha[k],Beta[k],aleph[w],beis[w]); end for; if not automorphic then Alpha := Append(Alpha,aleph[w]); Beta := Append(Beta,beis[w]); end if; end for; for w in [1..#Alpha] do a := Alpha[w]; b := Beta[w]; c := b^-1*a^-1; S, V, E := EmptyGraph(3*#G); for k in [1..#G] do S := S + {V!k, V!(k + #G)} + {V!k, V!(k + 2*#G)} + {V!(k + #G), V!(k + 2*#G)}; S := S + {V!k, V!(Position(K, K[k]*a) + #G)} + {V!k, V!(Position(K, K[k]*c^-1) + 2*#G)} + {V!(k + #G), V!(Position(K, K[k]*b) + 2*#G)}; end for; //print "Graph Made"; ia := a^-1; ib := b^-1; ic := c^-1; aP := {@ : k in [1..(l-1)] @}; bP := {@ : k in [1..(m-1)] @}; cP := {@ : k in [1..(n-1)] @}; P := {@@}; P1 := P; P2 := P; W1 := aP; W2 := cP; while #P lt #G do P1 := {@ : g in W1, x in P1 @}; P2 := {@ : g in W2, x in P2 @}; P := P join (P1 join P2); W3 := W1; W1 := W2; W2 := W3; end while; Q := {@@}; Q1 := Q; Q2 := Q; W1 := aP; W2 := bP; while #Q lt #G do Q1 := {@ : g in W1, x in Q1 @}; Q2 := {@ : g in W2, x in Q2 @}; Q := Q join (Q1 join Q2); W3 := W1; W1 := W2; W2 := W3; end while; R := {@@}; R1 := R; R2 := R; W1 := bP; W2 := cP; while #R lt #G do R1 := {@ : g in W1, x in R1 @}; R2 := {@ : g in W2, x in R2 @}; R := R join (R1 join R2); W3 := W1; W1 := W2; W2 := W3; end while; //print "Theta's found!"; Rp := []; Rq := []; Rr := []; for p in P do if p[1] eq p[2] then Rp := Append(Rp,V!(Position(K,p[1]))); end if; if p[1] eq p[2]*ia^-1 then Rp := Append(Rp,V!(Position(K,p[1]) + #G)); end if; if p[1] eq p[2]*ic then Rp := Append(Rp,V!(Position(K,p[1]) + 2*#G)); end if; end for; for q in Q do if q[1] eq q[2] then Rq := Append(Rq,V!(Position(K,q[1]) + #G)); end if; if q[1] eq q[2]*ia then Rq := Append(Rq,V!(Position(K,q[1]))); end if; if q[1] eq q[2]*ib^-1 then Rq := Append(Rq,(Position(K,q[1]) + 2*#G)); end if; end for; for r in R do if r[1] eq r[2] then Rr := Append(Rr,V!(Position(K,r[1]) + 2*#G)); end if; if r[1] eq r[2]*ic^-1 then Rr := Append(Rr,V!(Position(K,r[1]))); end if; if r[1] eq r[2]*ib then Rr := Append(Rr,V!(Position(K,r[1]) + #G)); end if; end for; Rp := {r : r in Rp}; Rq := {r : r in Rq}; Rr := {r : r in Rr}; //print "Fixed points found!"; //print "a = ", a; //print "b = ", b; //print "c = ", c; if IsConnected(S - Rp) then //print "The tiling does not seperate along the p reflection."; else //print "The tiling seperates along the p reflection."; end if; if IsConnected(S - Rq) then //print "The tiling does not seperate along the q reflection."; else //print "The tiling seperates along the q reflection."; end if; if IsConnected(S - Rr) then //print "The tiling does not seperate along the r reflection."; else //print "The tiling seperates along the r reflection."; end if; end for; return <#G,#Alpha,"G">; //return ""; end function;