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

Synopsis

• Function: isomorphism
• Usage:
isomorphism(M, N)
• Inputs:
• M, ,
• N, ,
• Outputs:
• , an isomorphism between M and N

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.0164682 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 : p = {8, 9, 13, 11, 7, 14, 0, 3, 2, 4, 6, 5, 1, 10, 12} -- random permutation of M6.groundSet o7 = {8, 9, 13, 11, 7, 14, 0, 3, 2, 4, 6, 5, 1, 10, 12} o7 : List i8 : N = matroid(M6.cache.groundSet, (circuits M6)/(c -> c/(i -> p#i)), EntryMode => "circuits") o8 = a matroid of rank 5 on 15 elements o8 : Matroid i9 : time phi = isomorphism(M6,N) -- used 0.225181 seconds o9 = HashTable{0 => 8 } 1 => 9 2 => 13 3 => 11 4 => 7 5 => 14 6 => 0 7 => 3 8 => 2 9 => 4 10 => 6 11 => 5 12 => 1 13 => 10 14 => 12 o9 : HashTable i10 : values phi === p o10 = true