|
10 | 10 | # a version that only gives a representative in the isomorphism class, and
|
11 | 11 | # a version that gives the ones actually used in backtrack?
|
12 | 12 | #
|
13 |
| -InstallMethod(OrbitalGraphs, "for a permutation group", [IsPermGroup], |
| 13 | +InstallMethod(OrbitalGraphs, "for a permutation group (super basic)", [IsPermGroup], |
| 14 | +function(G) |
| 15 | + local pts, graphs, stab, innerorbits, orb, iorb; |
| 16 | + |
| 17 | + # Commented out lines give the behaviour of the original OrbitalGraphs method |
| 18 | + |
| 19 | + pts := MovedPoints(G); |
| 20 | + #pts := [1 .. LargestMovedPoint(G)]; |
| 21 | + graphs := []; |
| 22 | + for orb in Orbits(G, pts) do |
| 23 | + stab := Stabilizer(G, orb[1]); |
| 24 | + innerorbits := Orbits(stab, MovedPoints(stab)); |
| 25 | + #innerorbits := Orbits(stab, Difference(pts, [orb[1]])); |
| 26 | + for iorb in innerorbits do |
| 27 | + AddSet(graphs, EdgeOrbitsDigraph(G, [orb[1], iorb[1]])); |
| 28 | + od; |
| 29 | + od; |
| 30 | + return graphs; |
| 31 | +end); |
| 32 | + |
| 33 | +# TODO decide what to do about non-moved points |
| 34 | + |
| 35 | +InstallMethod(OrbitalGraphs, "for a permutation group (uses stab chain)", [IsPermGroup], |
14 | 36 | function(G)
|
15 | 37 | local orb, orbitsG, iorb, graph, graphlist, val, p, i, innerorblist,
|
16 | 38 | orbreps, fillRepElts, maxval;
|
@@ -60,6 +82,51 @@ function(G)
|
60 | 82 | return graphlist;
|
61 | 83 | end);
|
62 | 84 |
|
| 85 | + |
| 86 | +InstallMethod(OrbitalGraphs, "for a permutation group (no stab chain)", [IsPermGroup], |
| 87 | +function(G) |
| 88 | + local n, gens, seen, reps, graphs, root, D, orbit, schreier_gens, b, schreier_gen, innerorbits, a, i, inner; |
| 89 | + |
| 90 | + n := LargestMovedPoint(G); |
| 91 | + gens := GeneratorsOfGroup(G); |
| 92 | + seen := BlistList([1 .. n], []); |
| 93 | + reps := []; |
| 94 | + graphs := []; |
| 95 | + |
| 96 | + repeat |
| 97 | + root := First([1 .. n], x -> not seen[x]); |
| 98 | + seen[root] := true; |
| 99 | + reps[root] := (); |
| 100 | + orbit := [root]; |
| 101 | + schreier_gens := []; |
| 102 | + |
| 103 | + # Construct a basic Schreier tree for <root> and Schreier generators for stabiliser of <root> |
| 104 | + for a in orbit do |
| 105 | + for i in [1 .. Length(gens)] do |
| 106 | + b := a ^ gens[i]; |
| 107 | + if not seen[b] then |
| 108 | + reps[b] := reps[a] * gens[i]; |
| 109 | + seen[b] := true; |
| 110 | + Add(orbit, b); |
| 111 | + else |
| 112 | + schreier_gen := reps[a] * gens[i] * reps[b] ^ -1; |
| 113 | + Add(schreier_gens, schreier_gen); |
| 114 | + fi; |
| 115 | + od; |
| 116 | + od; |
| 117 | + |
| 118 | + # Compute the orbits of the stabilizer of <root>, and hence the orbital graphs |
| 119 | + if not IsTrivial(orbit) then |
| 120 | + innerorbits := Orbits(Group(schreier_gens)); |
| 121 | + for inner in innerorbits do |
| 122 | + AddSet(graphs, EdgeOrbitsDigraph(G, [orbit[1], inner[1]])); |
| 123 | + od; |
| 124 | + fi; |
| 125 | + |
| 126 | + until SizeBlist(seen) = n; |
| 127 | + return graphs; |
| 128 | +end); |
| 129 | + |
63 | 130 | InstallMethod(OrbitalClosure, "for a permutation group", [IsPermGroup],
|
64 | 131 | G -> Intersection(List(OrbitalGraphs(G), AutomorphismGroup)));
|
65 | 132 | # TODO: TwoClosure as implemented by Heiko Theißen requires the group
|
|
0 commit comments