This method computes all isomorphisms between M and N: in particular, this method returns an empty list iff M and N are not isomorphic.
To compute only a single isomorphism, use isomorphism. To test if two matroids are isomorphic, use areIsomorphic.
To save space, the isomorphisms are given as lists (as opposed to hash tables). One way to interpret the output of this method is: given two isomorphic matroids, this method returns a permutation representation of the automorphism group of that matroid, inside the symmetric group on the ground set.
i1 : M = matroid({a,b,c},{{a,b},{a,c}}) o1 = a matroid of rank 2 on 3 elements o1 : Matroid |
i2 : U23 = uniformMatroid(2,3) o2 = a matroid of rank 2 on 3 elements o2 : Matroid |
i3 : getIsos(M, U23) -- not isomorphic o3 = {} o3 : List |
i4 : getIsos(M, M) o4 = {{0, 1, 2}, {0, 2, 1}} o4 : List |
i5 : getIsos(U23, U23) -- the full symmetric group S3 o5 = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0}} o5 : List |
We can verify that the Fano matroid (the projective plane over the field of two elements) has automorphism group of order 168, and give a permutation representation for this nonabelian simple group (= PGL(3, F_2)) inside the symmetric group S_7:
i6 : F7 = specificMatroid "fano" o6 = a matroid of rank 3 on 7 elements o6 : Matroid |
i7 : time autF7 = getIsos(F7, F7); -- used 0.055661 seconds |
i8 : #autF7 o8 = 168 |
The object getIsos is a method function.