0

我想在圣人中定义新图。令 G 为有限群。该图的顶点是子群并且两个顶点是相邻的当且仅当两个子群之和为 G。

我无法在 sage 中定义此图。有什么建议吗?我有差距,但我不知道我可以在圣人中改变什么?

Summands := function(G) 

local n, i, sgl, l, A, B, D;

获取所有子组的列表

sgl := List(LatticeSubgroups(G)!.conjugacyClassesSubgroups, Representative);

n 是 |G| 的除数数

n := Size(DivisorsInt(Size(G)));

D := [];

if IsOddInt(n) then l := QuoInt(n + 1, 2);
           else l := QuoInt(n, 2);
fi;

for i in [1..l] do
  for A in Filtered(sgl, function(g) return Size(g) = DivisorsInt(Size(G))[i]; end) do
    for B in Filtered(sgl, function(g) return Size(g) = DivisorsInt(Size(G))[n+1-i]; end) do
        Add(D, [A, B]);
    od;
  od;
od;

return D;
end;
4

1 回答 1

0

Here are Sage equivalents to some of these commands. Incidentally, we use GAP for the group calculations!

sage: D = DihedralGroup(5)
sage: D.subgroups()
[Permutation Group with generators [()], Permutation Group with generators [(2,5)(3,4)], Permutation Group with generators [(1,2)(3,5)], Permutation Group with generators [(1,3)(4,5)], Permutation Group with generators [(1,4)(2,3)], Permutation Group with generators [(1,5)(2,4)], Permutation Group with generators [(1,2,3,4,5)], Permutation Group with generators [(1,5,4,3,2), (1,5)(2,4)]]
sage: divisors(D.cardinality())
[1, 2, 5, 10]

To make graphs in Sage, you can pass dictionaries of lists or other things; see

sage: Graph?

for more information on that.

Edit - left in to make comments comprehensible:

By the way, it looks like you are trying to make a list of pairs of subgroups A and B such that |A||B|=ord(G). Is that necessarily the same as groups whose sum (whatever you mean by that - direct sum?) is the original group? I'm thinking for instance of even a group of order four; summing any two subgroups of order two may not be isomorphic to the original group - for instance, if the two subgroups are the same one if you mean some sort of ambient sum (does this even make sense?), or if you use direct sum but the group is the cyclic group of order 4, not the Klein four group.

于 2012-10-16T12:49:54.040 回答