next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Matroids :: isomorphism(Matroid,Matroid)

isomorphism(Matroid,Matroid) -- computes an isomorphism between isomorphic matroids

Synopsis

Description

This method computes a single isomorphism between M and N, if one exists, and returns null if no such isomorphism exists.

The output is a HashTable, where the keys are elements of the groundSet of M, and their corresponding values are elements of (the ground set of) N.

To obtain all isomorphisms between two matroids, use getIsos.

i1 : M = matroid({a,b,c},{{a,b},{a,c}})

o1 = a "matroid" of rank 2 on 3 elements

o1 : Matroid
i2 : isomorphism(M, uniformMatroid(2,3)) -- not isomorphic
i3 : (M5, M6) = (5,6)/completeGraph/matroid

o3 = (a "matroid" of rank 4 on 10 elements, a "matroid" of rank 5 on 15
     ------------------------------------------------------------------------
     elements)

o3 : Sequence
i4 : minorM6 = minor(M6, set{8}, set{4,5,6,7})

o4 = a "matroid" of rank 4 on 10 elements

o4 : Matroid
i5 : time isomorphism(M5, minorM6)
     -- used 0.0499812 seconds

o5 = HashTable{0 => 1}
               1 => 0
               2 => 3
               3 => 2
               4 => 6
               5 => 5
               6 => 4
               7 => 9
               8 => 8
               9 => 7

o5 : HashTable
i6 : isomorphism(M5, M5)

o6 = HashTable{0 => 0}
               1 => 1
               2 => 2
               3 => 3
               4 => 4
               5 => 5
               6 => 6
               7 => 7
               8 => 8
               9 => 9

o6 : HashTable
i7 : N = relabel M6

o7 = a "matroid" of rank 5 on 15 elements

o7 : Matroid
i8 : time phi = isomorphism(N,M6)
     -- used 1.50519 seconds

o8 = HashTable{0 => 8  }
               1 => 1
               2 => 5
               3 => 2
               4 => 6
               5 => 4
               6 => 0
               7 => 12
               8 => 3
               9 => 10
               10 => 7
               11 => 11
               12 => 9
               13 => 13
               14 => 14

o8 : HashTable

See also

Ways to use this method: