IntegerVectorsModPermutationGroup
General software features
IntegerVectorsModPermutationGroup is an enumeration engine of integer vectors up to the action of a permutation group.
Let n a positif integer and G a permutation group, subgroup of the symmetric group of order n. This Sage module IntegerVectorsModPermutationGroup allows to enumerate tuples of length n modulo the action by position of G. This problem generalizes the enumeration of unlabelled graphs up to an isomorphism. One can also add some constraints like the sum of the entries or their maximum size.
This module is completly integrated in Sage since the version 4.7.
Exemple
Exemple for the cyclic group over 4 elements:
sage: G = PermutationGroup([[(1,2,3,4)]]); G
Permutation Group with generators [(1,2,3,4)]
sage: G.cardinality()
4
sage: S = IntegerVectorsModPermutationGroup(G); S
Integer vectors of length 4 enumerated up to the action of Permutation Group with generators [(1,2,3,4)]
sage: S.cardinality()
+Infinity
sage: it = iter(S)
sage: for i in range(25): v = it.next(); print v, " : ", S.orbit(v)
....:
[0, 0, 0, 0] : set([[0, 0, 0, 0]])
[1, 0, 0, 0] : set([[1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 1]])
[2, 0, 0, 0] : set([[2, 0, 0, 0], [0, 0, 2, 0], [0, 0, 0, 2], [0, 2, 0, 0]])
[1, 1, 0, 0] : set([[1, 0, 0, 1], [0, 0, 1, 1], [1, 1, 0, 0], [0, 1, 1, 0]])
[1, 0, 1, 0] : set([[0, 1, 0, 1], [1, 0, 1, 0]])
[3, 0, 0, 0] : set([[0, 0, 3, 0], [0, 3, 0, 0], [3, 0, 0, 0], [0, 0, 0, 3]])
[2, 1, 0, 0] : set([[0, 2, 1, 0], [0, 0, 2, 1], [1, 0, 0, 2], [2, 1, 0, 0]])
[2, 0, 1, 0] : set([[0, 1, 0, 2], [0, 2, 0, 1], [1, 0, 2, 0], [2, 0, 1, 0]])
[2, 0, 0, 1] : set([[2, 0, 0, 1], [0, 1, 2, 0], [1, 2, 0, 0], [0, 0, 1, 2]])
[1, 1, 1, 0] : set([[1, 1, 1, 0], [1, 1, 0, 1], [1, 0, 1, 1], [0, 1, 1, 1]])
[4, 0, 0, 0] : set([[4, 0, 0, 0], [0, 4, 0, 0], [0, 0, 4, 0], [0, 0, 0, 4]])
[3, 1, 0, 0] : set([[0, 0, 3, 1], [1, 0, 0, 3], [0, 3, 1, 0], [3, 1, 0, 0]])
[3, 0, 1, 0] : set([[0, 3, 0, 1], [0, 1, 0, 3], [3, 0, 1, 0], [1, 0, 3, 0]])
[3, 0, 0, 1] : set([[0, 0, 1, 3], [3, 0, 0, 1], [0, 1, 3, 0], [1, 3, 0, 0]])
[2, 2, 0, 0] : set([[0, 2, 2, 0], [2, 2, 0, 0], [2, 0, 0, 2], [0, 0, 2, 2]])
[2, 1, 1, 0] : set([[2, 1, 1, 0], [1, 0, 2, 1], [1, 1, 0, 2], [0, 2, 1, 1]])
[2, 1, 0, 1] : set([[0, 1, 2, 1], [1, 0, 1, 2], [2, 1, 0, 1], [1, 2, 1, 0]])
[2, 0, 2, 0] : set([[2, 0, 2, 0], [0, 2, 0, 2]])
[2, 0, 1, 1] : set([[1, 2, 0, 1], [2, 0, 1, 1], [0, 1, 1, 2], [1, 1, 2, 0]])
[1, 1, 1, 1] : set([[1, 1, 1, 1]])
[5, 0, 0, 0] : set([[0, 0, 0, 5], [5, 0, 0, 0], [0, 5, 0, 0], [0, 0, 5, 0]])
[4, 1, 0, 0] : set([[0, 0, 4, 1], [1, 0, 0, 4], [0, 4, 1, 0], [4, 1, 0, 0]])
[4, 0, 1, 0] : set([[0, 4, 0, 1], [1, 0, 4, 0], [0, 1, 0, 4], [4, 0, 1, 0]])
[4, 0, 0, 1] : set([[4, 0, 0, 1], [1, 4, 0, 0], [0, 0, 1, 4], [0, 1, 4, 0]])
[3, 2, 0, 0] : set([[3, 2, 0, 0], [0, 0, 3, 2], [2, 0, 0, 3], [0, 3, 2, 0]])