Ok, maybe my guess that _weak_invariant was to blame, was wrong. It seems 
like it's the isomorphism test for regular matroids. Look:

Mnew = RegularMatroid(groundset=range(12), matrix=Matrix(ZZ,
[[ 1, 0, 0, 0, 1, 0, 0,-1,-1, 0, 1, 0],
 [ 0, 1, 0, 0,-1, 1, 0, 0, 0, 0, 0, 0],
 [ 0, 0, 1, 0, 0,-1, 1, 0, 1, 0,-1, 0],
 [ 0, 0, 0, 1, 0, 0,-1, 1, 0, 0, 0, 0],
 [ 0, 0, 0, 0, 0, 1,-1, 0, 0, 1, 1, 0],
 [ 0, 0, 0, 0, 1, 0, 0,-1,-1, 0, 0, 1]]))

Nnew = RegularMatroid(groundset=range(12), matrix=Matrix(ZZ,
[[1,0,0,0,0,0,1,1,0,0,1,0],
 [0,1,0,0,0,0,1,0,1,0,1,0],
 [0,0,1,0,0,0,1,0,0,1,1,0],
 [0,0,0,1,0,0,1,1,0,0,0,1],
 [0,0,0,0,1,0,1,0,1,0,0,1],
 [0,0,0,0,0,1,1,0,0,1,0,1]]))
 
print Mnew._weak_invariant()
print Nnew._weak_invariant()
print Mnew.is_isomorphic(Nnew)

-4449946732485601636
-7774345140401701701
True


BM = BasisMatroid(Mnew)
print BM._weak_invariant()
print BM


-4449946732485601636
Matroid of rank 6 on 12 elements with 432 bases


BN = BasisMatroid(Nnew)
print BN._weak_invariant()
print BN


-7774345140401701701
Matroid of rank 6 on 12 elements with 432 bases


BM.is_isomorphic(BN)


False


So it seems is_isomorphic() gives false positives for regular matroids. To show 
they really are different:


len(Mnew.circuits()) - len(Nnew.circuits())


-7


This means my earlier advice, of going to BinaryMatroid instances for 
isomorphism tests, would circumvent the bug.


--Stefan.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"sage-matroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to