9. Canonical representative of a double coset

In this and the next section we shall use tensor terminology: the points will be either indices or slots, with the convention that the permutation g acts on slots and its images are indices. That is, 3^g = 7 will now be read "the third slot contains the seventh index".

When including dummy indices in a tensor there are two different kinds of symmetries: apart from those coming from the intrinsic symmetries of the tensor slots (the group S), we have more symmetries due to exchange of names of dummy indices and to the exchange of up/down indices of a pair when a metric is present (we shall call D the group of those new symmetries). Now we need to work with the double coset S.g.D, and again we need to find a canonical representative. It is important to note that this code is prepared to work only with a special type of group D: that needed to canonicalize tensors, and that the S group acts from the left of g while the D group acts from the right of g.
The most general situation we need to handle for the D group is the following:
    - We can have dummies coming from several different vbundles. The D symmetries cannot mix them and so the D group can be reduced as a direct product of smaller groups. Therefore the strong generating sets can be easily constructed independently and then joined together.
    - Inside each vbundle there are two types of "dummies": pair-dummies, each pair having a S_2 or A_2 group or nothing, and then repeated indices, each type of repeated index having a S_n symmetry group, with n being the number of times that a given index is repeated. All pair-dummies in a vbundle can be exchanged. Therefore the D symmetry group for a vbundle is also the product of symmetric and pair-symmetric groups. (Note: sometimes I call "drummies" the combined type of dummies and "repes").
This is an important simplification because we do not need to worry about what is happenning to the generating set of the D group, but only to its base. That is, given the base of the D group we know how to construct an adequate generating set. This is done using the concepts of DummySet and RepeatedSet.

Suppose a tensor with 12 indices where there are 5 pairs of dummies of the same vbundle TM. We encode the situation in a DummySet expression. The first pair {7,11} means that the seventh index in the canonical configuration is an up-index paired with the eleventh index (which is hence a down-index). The number 0 at the end means that there is no metric:

In[287]:=

dummyset = DummySet[TM, {{7, 11}, {4, 5}, {10, 6}, {8, 9}, {12, 1}}, 0] ;

In[288]:=

SGSOfDummySet[dummyset]

Out[288]=

StrongGenSet[{7, 4, 10, 8, 12}, GenSet[Cycles[{7, 4}, {11, 5}], Cycles[{4, 10}, {5, 6}], Cycles[{10, 8}, {6, 9}], Cycles[{8, 12}, {9, 1}]]]

We include a symmetric metric with a 1 at the end (-1 would give an antisymmetric metric):

In[289]:=

dummyset = DummySet[TM, {{7, 11}, {4, 5}, {10, 6}, {8, 9}, {12, 1}}, 1] ;

In[290]:=

SGSD = SGSOfDummySet[dummyset]

Out[290]=

In[291]:=

groupD = Dimino[TranslatePerm[SGSD[[2]], {Images, 12}]] ;

In[292]:=

Length[groupD]

Out[292]=

3840

Now suppose this configuration, where the free indices 2 and 3 are at the third and fifth slots. The canonicalization process (assuming no additional symmetry in the tensor) exchanges the pair {4,5} and changes the pair {10,6} with the pair {8,9}. The pair {11,7} is also exchanged. Compare the timing of the "brute-force" method and that of Portugal's algorithm.

In[293]:=

perm = Images[{1, 5, 2, 12, 3, 9, 6, 8, 4, 11, 7, 10}] ;

In[294]:=

coset = Permute[perm, groupD] ;

In[295]:=

Timing @ Module[ {p = First[coset], i}, Do[If[PermLess[coset[[i]], p], p = coset[[i]] ; Print["Change at i=", i, " to ", p]],  {i, 2, Length @ coset}] ; p]

Change at i=2 to Images[{1, 5, 2, 12, 3, 9, 6, 8, 4, 7, 11, 10}]

Change at i=3 to Images[{1, 4, 2, 12, 3, 9, 6, 8, 5, 11, 7, 10}]

Change at i=4 to Images[{1, 4, 2, 12, 3, 9, 6, 8, 5, 7, 11, 10}]

Change at i=11 to Images[{1, 4, 2, 12, 3, 8, 6, 9, 5, 11, 7, 10}]

Change at i=12 to Images[{1, 4, 2, 12, 3, 8, 6, 9, 5, 7, 11, 10}]

Change at i=195 to Images[{1, 4, 2, 12, 3, 6, 9, 10, 5, 11, 7, 8}]

Change at i=196 to Images[{1, 4, 2, 12, 3, 6, 9, 10, 5, 7, 11, 8}]

Change at i=199 to Images[{1, 4, 2, 12, 3, 6, 8, 10, 5, 11, 7, 9}]

Change at i=200 to Images[{1, 4, 2, 12, 3, 6, 8, 10, 5, 7, 11, 9}]

Change at i=359 to Images[{1, 4, 2, 12, 3, 6, 7, 10, 5, 9, 8, 11}]

Change at i=360 to Images[{1, 4, 2, 12, 3, 6, 7, 10, 5, 8, 9, 11}]

Out[295]=

{1.5401 Second, Images[{1, 4, 2, 12, 3, 6, 7, 10, 5, 8, 9, 11}]}

The base for sorting of permutations is taken from the SGS of group S. If the base does not include all positions of dummies, then it is expanded to cover them all, sorting the missing dummies.

In[296]:=

Timing @ DoubleCosetRepresentative[perm, 12, StrongGenSet[{}, GenSet[]], {dummyset}]

Out[296]=

{0.072004 Second, Images[{1, 4, 2, 12, 3, 6, 7, 10, 5, 8, 9, 11}]}

The external C code would be even faster.

DummySet                    Head for a set of dummy indices
RepeatedSet                    Head for a set of repeated indices
SGSOfDummySet                Compute SGS for the group associated to a set of dummy indices
DoubleCosetRepresentative    Compute a canonical representative of a double coset

Canonicalization of dummy and repeated indices.


Created by Mathematica  (May 16, 2008) Valid XHTML 1.1!