Let be a matroid with ground set
. There are two standard ways to
remove an element from
so that the result is again a matroid, deletion
and contraction. Deletion is simply omitting the elements from a set
from
and keeping all remaining independent sets. This is denoted M \ D
(this also works in Sage). Contraction is the dual operation:
M / C == (M.dual() \ C).dual().
EXAMPLES:
sage: M = matroids.named_matroids.Fano()
sage: M \ ['a', 'c' ] == M.delete(['a', 'c'])
True
sage: M / 'a' == M.contract('a')
True
sage: M / 'c' \ 'ab' == M.minor(contractions='c', deletions='ab')
True
If a contraction set is not independent (or a deletion set not coindependent), this is taken care of:
sage: M = matroids.named_matroids.Fano()
sage: M.rank('abf')
2
sage: M / 'abf' == M / 'ab' \ 'f'
True
sage: M / 'abf' == M / 'af' \ 'b'
True
See also
The class MinorMatroid wraps around a matroid instance to represent a minor. Only useful for classes that don’t have an explicit construction of minors (such as RankMatroid and CircuitClosuresMatroid). It is also used as default implementation of the minor methods M.minor(C, D), M.delete(D), M.contract(C). For direct access to the DualMatroid constructor, run:
sage: from sage.matroids.advanced import *
See also sage.matroids.advanced.
AUTHORS:
Bases: sage.matroids.matroid.Matroid
Minor of a matroid.
For some matroid representations it can be computationally expensive to derive an explicit representation of a minor. This class wraps around any matroid to provide an abstract minor. It also serves as default implemen- tation.
Return a minor.
INPUT:
OUTPUT:
A MinorMatroid instance representing matroid / contractions \ deletions.
Warning
This class does NOT do any checks. Besides the assumptions above, we assume the following:
EXAMPLES:
sage: from sage.matroids.advanced import *
sage: M = matroids.named_matroids.Vamos()
sage: N = MinorMatroid(matroid=M, contractions=set(['a']),
....: deletions=set())
sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
M / {'a'} \ {'b', 'c'}, where M is Vamos: Matroid of rank 4 on 8
elements with circuit-closures
{3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'e', 'f', 'g', 'h'},
{'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}},
4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}}
Return the groundset of the matroid.
EXAMPLES:
sage: M = matroids.named_matroids.Pappus().contract(['c'])
sage: sorted(M.groundset())
['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i']