Checking if dual of matroid is graphic fails

asked 2022-07-08 17:49:50 +0200

Sq gravatar image

updated 2022-07-09 06:25:59 +0200

slelievre gravatar image

I want to check whether the dual of a matroid is graphic.

Example:

G1 = Graph([[1, 2], [2, 3], [3, 4], [4, 5], [5, 1],
            [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]])
M1 = Matroid(G1)
M2 = M1.dual()
M2.is_graphic()

This raises an error in the last line, saying that is_graphic is not defined for DualMatroids:

AttributeError: 'DualMatroid' object has no attribute 'is_graphic'

There should be a straightforward/standard way of solving this.

edit retag flag offensive close merge delete

Comments

The method is_graphic is only implemented for linear matroids. It does not exist on your M1 either.

FrédéricC gravatar imageFrédéricC ( 2022-07-09 07:50:54 +0200 )edit