Database of matroids#
This module contains the implementation and documentation for all matroids in
the database, accessible through matroids.
and
matroids.catalog.
(type those lines followed by
Tab for a list).
AUTHORS:
Michael Welsh, Stefan van Zwam (2013-04-01): initial version
Giorgos Mousa, Andreas Triantafyllos (2023-12-08): more matroids
REFERENCES:
For more information on the matroids that belong to Oxley’s matroid collection, as well as for most parametrized matroids, see [Oxl2011].
For more information on the matroids that belong to Brettell’s matroid collection, see the associated publications, [Bre2023] and [BP2023].
Note
The grouping of the matroids into collections can be viewed in the
catalog of matroids
.
- sage.matroids.database_matroids.A9(groundset=None)[source]#
Return the matroid \(A9\).
An excluded minor for \(K_2\)-representable matroids. The UPF is \(P_4\). Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.A9(); M A9: Quaternary matroid of rank 3 on 9 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.A9(); M A9: Quaternary matroid of rank 3 on 9 elements >>> M.is_valid() True
- sage.matroids.database_matroids.AF12(groundset=None)[source]#
Return the matroid \(AF12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.AF12(); M AF12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.AF12(); M AF12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.AG(n, q, x=None, groundset=None)[source]#
Return the affine geometry of dimension
n
over the finite field of orderq
.The affine geometry can be obtained from the projective geometry by removing a hyperplane.
INPUT:
n
– a positive integer; the dimension of the projective space. This is one less than the rank of the resulting matroid.q
– a positive integer that is a prime power; the order of the finite fieldx
– a string (default:None
); the name of the generator of a non-prime field, used for non-prime fields. If not supplied,'x'
is used.groundset
– a string (optional); the groundset of the matroid
OUTPUT: a linear matroid whose elements are the points of \(AG(n, q)\)
EXAMPLES:
sage: M = matroids.AG(2, 3).delete(8) sage: M.is_isomorphic(matroids.catalog.AG23minus()) True sage: matroids.AG(5, 4, 'z').size() == ((4 ^ 6 - 1) / (4 - 1) - (4 ^ 5 - 1)/(4 - 1)) True sage: M = matroids.AG(4, 2); M AG(4, 2): Binary matroid of rank 5 on 16 elements, type (5, 0)
>>> from sage.all import * >>> M = matroids.AG(Integer(2), Integer(3)).delete(Integer(8)) >>> M.is_isomorphic(matroids.catalog.AG23minus()) True >>> matroids.AG(Integer(5), Integer(4), 'z').size() == ((Integer(4) ** Integer(6) - Integer(1)) / (Integer(4) - Integer(1)) - (Integer(4) ** Integer(5) - Integer(1))/(Integer(4) - Integer(1))) True >>> M = matroids.AG(Integer(4), Integer(2)); M AG(4, 2): Binary matroid of rank 5 on 16 elements, type (5, 0)
REFERENCES:
[Oxl2011], p. 661.
- sage.matroids.database_matroids.AG23(groundset='abcdefghi')[source]#
Return the matroid \(AG(2, 3)\).
The ternary affine plane. A matroid which is not graphic, not cographic, and not regular.
EXAMPLES:
sage: M = matroids.catalog.AG23(); M AG(2, 3): Ternary matroid of rank 3 on 9 elements, type 3+ sage: M.is_valid() and M.is_3connected() and M.is_ternary() True sage: M.has_minor(matroids.catalog.K4()) False sage: import random sage: e = random.choice(list(M.groundset())) sage: M.delete(e).is_isomorphic(matroids.catalog.AG23minus()) True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.AG23(); M AG(2, 3): Ternary matroid of rank 3 on 9 elements, type 3+ >>> M.is_valid() and M.is_3connected() and M.is_ternary() True >>> M.has_minor(matroids.catalog.K4()) False >>> import random >>> e = random.choice(list(M.groundset())) >>> M.delete(e).is_isomorphic(matroids.catalog.AG23minus()) True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 653.
- sage.matroids.database_matroids.AG23minus(groundset=None)[source]#
Return the ternary affine plane minus a point.
This is a sixth-roots-of-unity matroid, and an excluded minor for the class of near-regular matroids.
EXAMPLES:
sage: M = matroids.catalog.AG23minus(); M AG23minus: Matroid of rank 3 on 8 elements with circuit-closures {2: {{'a', 'b', 'c'}, {'a', 'd', 'f'}, {'a', 'e', 'g'}, {'b', 'd', 'h'}, {'b', 'e', 'f'}, {'c', 'd', 'g'}, {'c', 'e', 'h'}, {'f', 'g', 'h'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.AG23minus(); M AG23minus: Matroid of rank 3 on 8 elements with circuit-closures {2: {{'a', 'b', 'c'}, {'a', 'd', 'f'}, {'a', 'e', 'g'}, {'b', 'd', 'h'}, {'b', 'e', 'f'}, {'c', 'd', 'g'}, {'c', 'e', 'h'}, {'f', 'g', 'h'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> M.is_valid() True
REFERENCES:
[Oxl2011], p. 653.
- sage.matroids.database_matroids.AG23minusDY(groundset=None)[source]#
Return the matroid \(AG23minusDY\).
The matroid obtained from a \(AG(2, 3)\setminus e\) by a single \(\delta-Y\) exchange on a triangle. An excluded minor for near-regular matroids. UPF is \(S\).
EXAMPLES:
sage: M = matroids.catalog.AG23minusDY(); M Delta-Y of AG(2,3)\e: Ternary matroid of rank 4 on 8 elements, type 0- sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.AG23minusDY(); M Delta-Y of AG(2,3)\e: Ternary matroid of rank 4 on 8 elements, type 0- >>> M.is_valid() True
- sage.matroids.database_matroids.AG32(groundset='abcdefgh')[source]#
Return the matroid \(AG(3, 2)\).
The binary affine cube.
EXAMPLES:
sage: M = matroids.catalog.AG32(); M AG(3, 2): Binary matroid of rank 4 on 8 elements, type (4, 0) sage: M.is_valid() and M.is_3connected() True
>>> from sage.all import * >>> M = matroids.catalog.AG32(); M AG(3, 2): Binary matroid of rank 4 on 8 elements, type (4, 0) >>> M.is_valid() and M.is_3connected() True
\(AG(3, 2)\) is isomorphic to the unique tipless binary \(4\)-spike:
sage: M.is_isomorphic(matroids.Z(4, False)) True
>>> from sage.all import * >>> M.is_isomorphic(matroids.Z(Integer(4), False)) True
and it is identically self-dual:
sage: M.equals(M.dual()) True
>>> from sage.all import * >>> M.equals(M.dual()) True
Every single-element deletion is isomorphic to \(F_7^*\) and every single-element contraction is isomorphic to \(F_7\):
sage: F7 = matroids.catalog.Fano() sage: F7D = matroids.catalog.FanoDual() sage: import random sage: e = random.choice(list(M.groundset())) sage: M.delete(e).is_isomorphic(F7D) True sage: M.contract(e).is_isomorphic(F7) True
>>> from sage.all import * >>> F7 = matroids.catalog.Fano() >>> F7D = matroids.catalog.FanoDual() >>> import random >>> e = random.choice(list(M.groundset())) >>> M.delete(e).is_isomorphic(F7D) True >>> M.contract(e).is_isomorphic(F7) True
REFERENCES:
[Oxl2011], p. 645.
- sage.matroids.database_matroids.AG32prime(groundset=None)[source]#
Return the matroid \(AG(3, 2)'\), represented as circuit closures.
The matroid \(AG(3, 2)'\) is an \(8\)-element matroid of rank-\(4\). It is a smallest non-representable matroid. It is the unique relaxation of \(AG(3, 2)\).
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.AG32prime(); M AG(3, 2)': Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: setprint(M.noncospanning_cocircuits()) [{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f', 'h'}, {'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}] sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.AG32prime(); M AG(3, 2)': Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> setprint(M.noncospanning_cocircuits()) [{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f', 'h'}, {'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}] >>> M.is_valid() True >>> M.automorphism_group().is_transitive() False
Self-dual but not identically self-dual:
sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
>>> from sage.all import * >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
Every single-element deletion is isomorphic to \(F_7^*\) or \((F_7^-)^*\) and every single-element contraction is isomorphic to \(F_7\) or \(F_7^-\):
sage: F7 = matroids.catalog.Fano() sage: F7D = matroids.catalog.FanoDual() sage: F7m = matroids.catalog.NonFano() sage: F7mD = matroids.catalog.NonFanoDual() sage: import random sage: e = random.choice(list(M.groundset())) sage: M.delete(e).is_isomorphic(F7D) or M.delete(e).is_isomorphic(F7mD) True sage: Me = M.contract(e) sage: Me.is_isomorphic(F7) or Me.is_isomorphic(F7m) True
>>> from sage.all import * >>> F7 = matroids.catalog.Fano() >>> F7D = matroids.catalog.FanoDual() >>> F7m = matroids.catalog.NonFano() >>> F7mD = matroids.catalog.NonFanoDual() >>> import random >>> e = random.choice(list(M.groundset())) >>> M.delete(e).is_isomorphic(F7D) or M.delete(e).is_isomorphic(F7mD) True >>> Me = M.contract(e) >>> Me.is_isomorphic(F7) or Me.is_isomorphic(F7m) True
REFERENCES:
[Oxl2011], p. 646.
- sage.matroids.database_matroids.AK12(groundset=None)[source]#
Return the matroid \(AK12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Not self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.AK12(); M AK12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.AK12(); M AK12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.BB9(groundset=None)[source]#
Return the matroid \(BB9\).
An excluded minor for \(K_2\)-representable matroids, and a restriction of the Betsy Ross matroid. The UPF is \(G\). Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)
EXAMPLES:
sage: BB = matroids.catalog.BB9(); BB BB9: Quaternary matroid of rank 3 on 9 elements sage: BR = matroids.catalog.BetsyRoss() sage: from itertools import combinations sage: pairs = combinations(sorted(BR.groundset()), 2) sage: for pair in pairs: ....: if BR.delete(pair).is_isomorphic(BB): ....: print(pair) ('a', 'h') ('b', 'i') ('c', 'j') ('d', 'f') ('e', 'g')
>>> from sage.all import * >>> BB = matroids.catalog.BB9(); BB BB9: Quaternary matroid of rank 3 on 9 elements >>> BR = matroids.catalog.BetsyRoss() >>> from itertools import combinations >>> pairs = combinations(sorted(BR.groundset()), Integer(2)) >>> for pair in pairs: ... if BR.delete(pair).is_isomorphic(BB): ... print(pair) ('a', 'h') ('b', 'i') ('c', 'j') ('d', 'f') ('e', 'g')
- sage.matroids.database_matroids.BB9gDY(groundset=None)[source]#
Return the matroid \(BB9gDY\).
An excluded minor for \(K_2\)-representable matroids. The UPF is \(G\). In a \(DY^*\)-equivalence class of 4 matroids, one of which can be obtained from
BB9
by a segment-cosegment exchange on \(\{a,d,i,j\}\). Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)EXAMPLES:
sage: M = matroids.catalog.BB9gDY(); M Segment cosegment exchange on BB9: Quaternary matroid of rank 5 on 9 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.BB9gDY(); M Segment cosegment exchange on BB9: Quaternary matroid of rank 5 on 9 elements >>> M.is_valid() True
- sage.matroids.database_matroids.BetsyRoss(groundset=None)[source]#
Return the Betsy Ross matroid, represented by circuit closures.
An extremal golden-mean matroid. That is, if \(M\) is simple, rank \(3\), has the Betsy Ross matroid as a restriction and is a Golden Mean matroid, then \(M\) is the Betsy Ross matroid.
EXAMPLES:
sage: M = matroids.catalog.BetsyRoss(); M BetsyRoss: Matroid of rank 3 on 11 elements with 25 nonspanning circuits sage: len(M.circuit_closures()[2]) 10 sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.BetsyRoss(); M BetsyRoss: Matroid of rank 3 on 11 elements with 25 nonspanning circuits >>> len(M.circuit_closures()[Integer(2)]) 10 >>> M.is_valid() True
- sage.matroids.database_matroids.Block_10_5(groundset=None)[source]#
Return the paving matroid whose nonspanning circuits form the blocks of a \(3-(10, 5, 3)\) design.
EXAMPLES:
sage: M = matroids.catalog.Block_10_5(); M Block(10, 5): Matroid of rank 5 on 10 elements with 36 nonspanning circuits sage: M.is_valid() and M.is_paving() True sage: BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) sage: BD.is_t_design(return_parameters=True) (True, (3, 10, 5, 3))
>>> from sage.all import * >>> M = matroids.catalog.Block_10_5(); M Block(10, 5): Matroid of rank 5 on 10 elements with 36 nonspanning circuits >>> M.is_valid() and M.is_paving() True >>> BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) >>> BD.is_t_design(return_parameters=True) (True, (3, 10, 5, 3))
- sage.matroids.database_matroids.Block_9_4(groundset=None)[source]#
Return the paving matroid whose nonspanning circuits form the blocks of a \(2-(9, 4, 3)\) design.
EXAMPLES:
sage: M = matroids.catalog.Block_9_4(); M Block(9, 4): Matroid of rank 4 on 9 elements with 18 nonspanning circuits sage: M.is_valid() and M.is_paving() True sage: BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) sage: BD.is_t_design(return_parameters=True) (True, (2, 9, 4, 3))
>>> from sage.all import * >>> M = matroids.catalog.Block_9_4(); M Block(9, 4): Matroid of rank 4 on 9 elements with 18 nonspanning circuits >>> M.is_valid() and M.is_paving() True >>> BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) >>> BD.is_t_design(return_parameters=True) (True, (2, 9, 4, 3))
- sage.matroids.database_matroids.CompleteGraphic(n, groundset=None)[source]#
Return the cycle matroid of the complete graph on \(n\) vertices.
INPUT:
n
– an integer, the number of vertices of the underlying complete graph.
OUTPUT: The graphic matroid associated with the \(n\)-vertex complete graph. This matroid has rank \(n - 1\).
EXAMPLES:
sage: # needs sage.graphs sage: from sage.matroids.advanced import setprint sage: M = matroids.CompleteGraphic(5); M M(K5): Graphic matroid of rank 4 on 10 elements sage: M.has_minor(matroids.Uniform(2, 4)) False sage: simplify(M.contract(randrange(0, ....: 10))).is_isomorphic(matroids.CompleteGraphic(4)) True sage: setprint(M.closure([0, 2, 4, 5])) {0, 1, 2, 4, 5, 7} sage: M.is_valid() True
>>> from sage.all import * >>> # needs sage.graphs >>> from sage.matroids.advanced import setprint >>> M = matroids.CompleteGraphic(Integer(5)); M M(K5): Graphic matroid of rank 4 on 10 elements >>> M.has_minor(matroids.Uniform(Integer(2), Integer(4))) False >>> simplify(M.contract(randrange(Integer(0), ... Integer(10)))).is_isomorphic(matroids.CompleteGraphic(Integer(4))) True >>> setprint(M.closure([Integer(0), Integer(2), Integer(4), Integer(5)])) {0, 1, 2, 4, 5, 7} >>> M.is_valid() True
- sage.matroids.database_matroids.D10(groundset=None)[source]#
Return the matroid \(D10\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(G\). Has a
TQ8
-minor. In a \(DY^*\)-equivalence class of \(13\) matroids.EXAMPLES:
sage: M = matroids.catalog.D10(); M D10: Quaternary matroid of rank 4 on 10 elements sage: M.has_minor(matroids.catalog.TQ8()) True
>>> from sage.all import * >>> M = matroids.catalog.D10(); M D10: Quaternary matroid of rank 4 on 10 elements >>> M.has_minor(matroids.catalog.TQ8()) True
- sage.matroids.database_matroids.D16(groundset='abcdefghijklmnop')[source]#
Return the matroid \(D_{16}\).
Let \(M\) be a \(4\)-connected binary matroid and \(N\) an internally \(4\)-connected proper minor of \(M\) with at least 7 elements. Then some element of \(M\) can be deleted or contracted preserving an \(N\)-minor, unless \(M\) is \(D_{16}\).
EXAMPLES:
sage: M = matroids.catalog.D16(); M D16: Binary matroid of rank 8 on 16 elements, type (0, 0) sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.D16(); M D16: Binary matroid of rank 8 on 16 elements, type (0, 0) >>> M.is_valid() True
REFERENCES:
- sage.matroids.database_matroids.ExtendedBinaryGolayCode(groundset='abcdefghijklmnopqrstuvwx')[source]#
Return the matroid of the extended binary Golay code.
EXAMPLES:
sage: M = matroids.catalog.ExtendedBinaryGolayCode(); M Extended Binary Golay Code: Binary matroid of rank 12 on 24 elements, type (12, 0) sage: C = LinearCode(M.representation()) sage: C.is_permutation_equivalent(codes.GolayCode(GF(2))) True sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.ExtendedBinaryGolayCode(); M Extended Binary Golay Code: Binary matroid of rank 12 on 24 elements, type (12, 0) >>> C = LinearCode(M.representation()) >>> C.is_permutation_equivalent(codes.GolayCode(GF(Integer(2)))) True >>> M.is_valid() True
See also
- sage.matroids.database_matroids.ExtendedTernaryGolayCode(groundset='abcdefghijkl')[source]#
Return the matroid of the extended ternary Golay code.
This is the unique Steiner system \(S(5, 6, 12)\).
EXAMPLES:
sage: M = matroids.catalog.ExtendedTernaryGolayCode(); M Extended Ternary Golay Code: Ternary matroid of rank 6 on 12 elements, type 6+ sage: C = LinearCode(M.representation()) sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) True sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.ExtendedTernaryGolayCode(); M Extended Ternary Golay Code: Ternary matroid of rank 6 on 12 elements, type 6+ >>> C = LinearCode(M.representation()) >>> C.is_permutation_equivalent(codes.GolayCode(GF(Integer(3)))) True >>> M.is_valid() True
The automorphism group is the \(5\)-transitive Mathieu group \(M12\):
sage: # long time sage: G = M.automorphism_group() sage: G.is_transitive() True sage: G.structure_description() ‘M12’
\(S(5, 6, 12)\) is an identically self-dual matroid:
sage: M.equals(M.dual()) True
>>> from sage.all import * >>> M.equals(M.dual()) True
Every contraction of three elements is isomorphic to \(AG(2, 3)\); every contraction of two elements and deletion of two elements is isomorphic to \(P8\):
sage: import random, itertools sage: C = list(itertools.combinations(M.groundset(), 3)) sage: elements = random.choice(C) sage: N = M.contract(elements) sage: N.is_isomorphic(matroids.catalog.AG23()) True sage: C = list(itertools.combinations(M.groundset(), 4)) sage: elements = list(random.choice(C)) sage: random.shuffle(elements) sage: N = M.contract(elements[:2]).delete(elements[2:4]) sage: N.is_isomorphic(matroids.catalog.P8()) True
>>> from sage.all import * >>> import random, itertools >>> C = list(itertools.combinations(M.groundset(), Integer(3))) >>> elements = random.choice(C) >>> N = M.contract(elements) >>> N.is_isomorphic(matroids.catalog.AG23()) True >>> C = list(itertools.combinations(M.groundset(), Integer(4))) >>> elements = list(random.choice(C)) >>> random.shuffle(elements) >>> N = M.contract(elements[:Integer(2)]).delete(elements[Integer(2):Integer(4)]) >>> N.is_isomorphic(matroids.catalog.P8()) True
See also
REFERENCES:
[Oxl2011], p. 658.
- sage.matroids.database_matroids.F8(groundset=None)[source]#
Return the matroid \(F_8\), represented as circuit closures.
The matroid \(F_8\) is an \(8\)-element matroid of rank-\(4\). It is a smallest non-representable matroid.
EXAMPLES:
sage: from sage.matroids.advanced import * sage: M = matroids.catalog.F8(); M F8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: D = get_nonisomorphic_matroids([M.contract(i) for i in M.groundset()]) sage: len(D) 3 sage: [N.is_isomorphic(matroids.catalog.Fano()) for N in D] [...True...] sage: [N.is_isomorphic(matroids.catalog.NonFano()) for N in D] [...True...] sage: M.is_valid() and M.is_paving() True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import * >>> M = matroids.catalog.F8(); M F8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> D = get_nonisomorphic_matroids([M.contract(i) for i in M.groundset()]) >>> len(D) 3 >>> [N.is_isomorphic(matroids.catalog.Fano()) for N in D] [...True...] >>> [N.is_isomorphic(matroids.catalog.NonFano()) for N in D] [...True...] >>> M.is_valid() and M.is_paving() True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 647.
- sage.matroids.database_matroids.FA11(groundset=None)[source]#
Return the matroid \(FA11\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(PT\). In a \(DY^*\)-equivalence class of \(6\) matroids. Has an
FF10
-minor (delete \(10\)).EXAMPLES:
sage: FA11 = matroids.catalog.FA11(); FA11 FA11: Quaternary matroid of rank 5 on 11 elements sage: FF10 = matroids.catalog.FF10() sage: FF10.is_isomorphic(FA11.delete(10)) True
>>> from sage.all import * >>> FA11 = matroids.catalog.FA11(); FA11 FA11: Quaternary matroid of rank 5 on 11 elements >>> FF10 = matroids.catalog.FF10() >>> FF10.is_isomorphic(FA11.delete(Integer(10))) True
- sage.matroids.database_matroids.FA15(groundset=None)[source]#
Return the matroid \(FA15\).
An excluded minor for \(O\)-representable matroids. UPF is \(PT\). In a \(DY^*\)-equivalence class of \(6\) matroids. Has an
SQ14
-minor.EXAMPLES:
sage: M = matroids.catalog.FA15(); M FA15: Quaternary matroid of rank 7 on 15 elements sage: M.has_minor(matroids.catalog.N3pp()) True
>>> from sage.all import * >>> M = matroids.catalog.FA15(); M FA15: Quaternary matroid of rank 7 on 15 elements >>> M.has_minor(matroids.catalog.N3pp()) True
- sage.matroids.database_matroids.FF10(groundset=None)[source]#
Return the matroid \(FF10\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(P_4\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.FF10(); M FF10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FF10(); M FF10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FF12(groundset=None)[source]#
Return the matroid \(FF12\).
An excluded minor for \(P_4\)-representable matroids. Self-dual. UPF is \((Q(a,b),<-1,a,b,a-2,a-1,a+1,b-1,ab-a+b,ab-a-b,ab-a-2b>)\). Has an
FF10
-minor (contract ‘c’ and delete ‘d’).EXAMPLES:
sage: M = matroids.catalog.FF12(); M FF12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True sage: FF10 = matroids.catalog.FF10() sage: FF10.is_isomorphic(M.contract('c').delete('d')) True
>>> from sage.all import * >>> M = matroids.catalog.FF12(); M FF12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True >>> FF10 = matroids.catalog.FF10() >>> FF10.is_isomorphic(M.contract('c').delete('d')) True
- sage.matroids.database_matroids.FK10(groundset=None)[source]#
Return the matroid \(FK10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.FK10(); M FK10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FK10(); M FK10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FK12(groundset=None)[source]#
Return the matroid \(FK12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.FK12(); M FK12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FK12(); M FK12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FM14(groundset=None)[source]#
Return the matroid \(FM14\).
An excluded minor for \(P_4\)-representable matroids. Self-dual. UPF is \(PT\).
EXAMPLES:
sage: M = matroids.catalog.FM14(); M FM14: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FM14(); M FM14: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FN9(groundset=None)[source]#
Return the matroid \(FN9\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids. In a \(DY^*\)-equivalence class of \(10\) matroids. UPF is \(U_1^{(2)}\). (An excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.FN9(); M FN9: Quaternary matroid of rank 3 on 9 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.FN9(); M FN9: Quaternary matroid of rank 3 on 9 elements >>> M.is_valid() True
- sage.matroids.database_matroids.FP10(groundset=None)[source]#
Return the matroid \(FP10\).
An excluded minor for \(K_2\)- and \(G\)-representable matroids (and \(H_2\)- and \(GF(5)\)-representable matroids). UPF is \(U_1^{(2)}\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.FP10(); M FP10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FP10(); M FP10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FP12(groundset=None)[source]#
Return the matroid \(FP12\).
An excluded minor for \(K_2\)- and \(G\)-representable matroids (and \(H_2\)- and \(GF(5)\)-representable matroids). UPF is \(W\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.FP12(); M FP12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FP12(); M FP12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FQ12(groundset=None)[source]#
Return the matroid \(FQ12\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(PT\). Has` a
PP9
-minor (contract \(4\) and \(7\), delete \(6\)) andFF10
-minor (contract ‘c’ and delete ‘d’).EXAMPLES:
sage: FQ12 = matroids.catalog.FQ12(); FQ12 FQ12: Quaternary matroid of rank 6 on 12 elements sage: PP9 = matroids.catalog.PP9() sage: PP9.is_isomorphic(FQ12.contract([4,7]).delete(6)) True sage: FF10 = matroids.catalog.FF10() sage: FF10.is_isomorphic(FQ12.contract('c').delete('d')) True
>>> from sage.all import * >>> FQ12 = matroids.catalog.FQ12(); FQ12 FQ12: Quaternary matroid of rank 6 on 12 elements >>> PP9 = matroids.catalog.PP9() >>> PP9.is_isomorphic(FQ12.contract([Integer(4),Integer(7)]).delete(Integer(6))) True >>> FF10 = matroids.catalog.FF10() >>> FF10.is_isomorphic(FQ12.contract('c').delete('d')) True
- sage.matroids.database_matroids.FR12(groundset=None)[source]#
Return the matroid \(FR12\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(P_4\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.FR12(); M FR12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FR12(); M FR12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FS12(groundset=None)[source]#
Return the matroid \(FS12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Rank \(5\). UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.FS12(); M FS12: Quaternary matroid of rank 5 on 12 elements sage: M.rank() 5
>>> from sage.all import * >>> M = matroids.catalog.FS12(); M FS12: Quaternary matroid of rank 5 on 12 elements >>> M.rank() 5
- sage.matroids.database_matroids.FT10(groundset=None)[source]#
Return the matroid \(FT10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.FT10(); M FT10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FT10(); M FT10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FU10(groundset=None)[source]#
Return the matroid \(FU10\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(G\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.FU10(); M FU10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.FU10(); M FU10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.FV14(groundset=None)[source]#
Return the matroid \(FV14\)
An excluded minor for \(P_4\)-representable matroids. Not self-dual. UPF is \(PT\).
EXAMPLES:
sage: M = matroids.catalog.FV14(); M FV14: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.FV14(); M FV14: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.FX9(groundset=None)[source]#
Return the matroid \(FX9\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids. UPF is \((Q(a,b), <-1,a,b,a-1,b-1,a-b,a+b,a+b-2,a+b-2ab>)\). (An excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.FX9(); M FX9: Quaternary matroid of rank 4 on 9 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.FX9(); M FX9: Quaternary matroid of rank 4 on 9 elements >>> M.is_valid() True
- sage.matroids.database_matroids.FY10(groundset=None)[source]#
Return the matroid \(FY10\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(G\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.FY10(); M FY10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.FY10(); M FY10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.FZ10(groundset=None)[source]#
Return the matroid \(FZ10\).
An excluded minor for \(K_2\)- and \(G\)-representable matroids (and \(H_2\)- and \(GF(5)\)-representable matroids). UPF is \(W\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.FZ10(); M FZ10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.FZ10(); M FZ10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.FZ12(groundset=None)[source]#
Return the matroid \(FZ12\).
An excluded minor for \(K_2\)- and \(G\)-representable matroids (and \(H_2\)- and \(GF(5)\)-representable matroids). UPF is \(W\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.FZ12(); M FZ12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.FZ12(); M FZ12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.Fano(groundset='abcdefg')[source]#
Return the Fano matroid, represented over \(GF(2)\).
The Fano matroid, or Fano plane, or \(F_7\), is a \(7\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has characteristic two.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.Fano(); M Fano: Binary matroid of rank 3 on 7 elements, type (3, 0) sage: M.automorphism_group().is_transitive() True sage: M.automorphism_group().structure_description() 'PSL(3,2)'
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.Fano(); M Fano: Binary matroid of rank 3 on 7 elements, type (3, 0) >>> M.automorphism_group().is_transitive() True >>> M.automorphism_group().structure_description() 'PSL(3,2)'
Every single-element deletion of \(F_7\) is isomorphic to \(M(K_4)\):
sage: setprint(sorted(M.nonspanning_circuits())) [{'a', 'b', 'f'}, {'a', 'c', 'e'}, {'a', 'd', 'g'}, {'b', 'c', 'd'}, {'b', 'e', 'g'}, {'c', 'f', 'g'}, {'d', 'e', 'f'}] sage: M.delete(M.groundset_list()[randrange(0, ....: 7)]).is_isomorphic(matroids.CompleteGraphic(4)) True
>>> from sage.all import * >>> setprint(sorted(M.nonspanning_circuits())) [{'a', 'b', 'f'}, {'a', 'c', 'e'}, {'a', 'd', 'g'}, {'b', 'c', 'd'}, {'b', 'e', 'g'}, {'c', 'f', 'g'}, {'d', 'e', 'f'}] >>> M.delete(M.groundset_list()[randrange(Integer(0), ... Integer(7))]).is_isomorphic(matroids.CompleteGraphic(Integer(4))) True
It is also the projective plane of order two, i.e. \(PG(2, 2)\):
sage: M.is_isomorphic(matroids.PG(2, 2)) True
>>> from sage.all import * >>> M.is_isomorphic(matroids.PG(Integer(2), Integer(2))) True
\(F_7\) is isomorphic to the unique binary \(3\)-spike:
sage: M.is_isomorphic(matroids.Z(3)) True
>>> from sage.all import * >>> M.is_isomorphic(matroids.Z(Integer(3))) True
REFERENCES:
[Oxl2011], p. 643.
- sage.matroids.database_matroids.FanoDual(groundset='abcdefg')[source]#
Return the dual of the Fano matroid.
\(F_7^*\) is a \(7\)-element matroid of rank-\(3\).
EXAMPLES:
sage: F7 = matroids.catalog.Fano() sage: F7D = matroids.catalog.FanoDual(); F7D F7*: Binary matroid of rank 4 on 7 elements, type (3, 7) sage: F7.is_isomorphic(F7D.dual()) True sage: F7D.automorphism_group().is_transitive() True sage: F7D.automorphism_group().structure_description() 'PSL(3,2)'
>>> from sage.all import * >>> F7 = matroids.catalog.Fano() >>> F7D = matroids.catalog.FanoDual(); F7D F7*: Binary matroid of rank 4 on 7 elements, type (3, 7) >>> F7.is_isomorphic(F7D.dual()) True >>> F7D.automorphism_group().is_transitive() True >>> F7D.automorphism_group().structure_description() 'PSL(3,2)'
Every single-element deletion of \(F_7^*\) is isomorphic to \(M(K_{2, 3})\):
sage: K2_3 = Matroid(graphs.CompleteBipartiteGraph(2, 3)) sage: import random sage: e = random.choice(list(F7D.groundset())) sage: F7D.delete(e).is_isomorphic(K2_3) True
>>> from sage.all import * >>> K2_3 = Matroid(graphs.CompleteBipartiteGraph(Integer(2), Integer(3))) >>> import random >>> e = random.choice(list(F7D.groundset())) >>> F7D.delete(e).is_isomorphic(K2_3) True
REFERENCES:
[Oxl2011], p. 643.
- sage.matroids.database_matroids.GK10(groundset=None)[source]#
Return the matroid \(GK10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Not self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.GK10(); M GK10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.GK10(); M GK10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.GP10(groundset=None)[source]#
Return the matroid \(GP10\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(G\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.GP10(); M GP10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.GP10(); M GP10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.GP12(groundset=None)[source]#
Return the matroid \(GP12\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(G\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.GP12(); M GP12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.GP12(); M GP12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.J(groundset='abcdefgh')[source]#
Return the matroid \(J\), represented over \(GF(3)\).
The matroid \(J\) is an \(8\)-element matroid of rank-\(4\). It is representable over a field if and only if that field has at least three elements.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.J(); M J: Ternary matroid of rank 4 on 8 elements, type 0- sage: setprint(M.truncation().nonbases()) [{'a', 'b', 'f'}, {'a', 'c', 'g'}, {'a', 'd', 'h'}] sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.has_minor(matroids.CompleteGraphic(4)) False sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.J(); M J: Ternary matroid of rank 4 on 8 elements, type 0- >>> setprint(M.truncation().nonbases()) [{'a', 'b', 'f'}, {'a', 'c', 'g'}, {'a', 'd', 'h'}] >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.has_minor(matroids.CompleteGraphic(Integer(4))) False >>> M.is_valid() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 650.
- sage.matroids.database_matroids.K33(groundset='abcdefghi')[source]#
Return the graphic matroid \(M(K_{3,3})\).
\(M(K_{3,3})\) is an excluded minor for the class of cographic matroids.
EXAMPLES:
sage: # needs sage.graphs sage: M = matroids.catalog.K33(); M M(K3, 3): Regular matroid of rank 5 on 9 elements with 81 bases sage: M.is_valid() True sage: G1 = M.automorphism_group() sage: G2 = matroids.catalog.K33dual().automorphism_group() sage: G1.is_isomorphic(G2) True
>>> from sage.all import * >>> # needs sage.graphs >>> M = matroids.catalog.K33(); M M(K3, 3): Regular matroid of rank 5 on 9 elements with 81 bases >>> M.is_valid() True >>> G1 = M.automorphism_group() >>> G2 = matroids.catalog.K33dual().automorphism_group() >>> G1.is_isomorphic(G2) True
REFERENCES:
[Oxl2011], p. 652-3.
- sage.matroids.database_matroids.K33dual(groundset='abcdefghi')[source]#
Return the matroid \(M*(K_{3, 3})\), represented over the regular partial field.
The matroid \(M*(K_{3, 3})\) is a \(9\)-element matroid of rank-\(4\). It is an excluded minor for the class of graphic matroids. It is the graft matroid of the \(4\)-wheel with every vertex except the hub being coloured.
EXAMPLES:
sage: # needs sage.graphs sage: M = matroids.catalog.K33dual(); M M*(K3, 3): Regular matroid of rank 4 on 9 elements with 81 bases sage: any(N.is_3connected() for N in M.linear_extensions(simple=True)) False sage: M.is_valid() True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> # needs sage.graphs >>> M = matroids.catalog.K33dual(); M M*(K3, 3): Regular matroid of rank 4 on 9 elements with 81 bases >>> any(N.is_3connected() for N in M.linear_extensions(simple=True)) False >>> M.is_valid() True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 652-3.
- sage.matroids.database_matroids.K4(groundset='abcdef')[source]#
The graphic matroid of the complete graph \(K_4\).
EXAMPLES:
sage: M = matroids.catalog.K4(); M M(K4): Graphic matroid of rank 3 on 6 elements sage: M.is_graphic() True
>>> from sage.all import * >>> M = matroids.catalog.K4(); M M(K4): Graphic matroid of rank 3 on 6 elements >>> M.is_graphic() True
\(M(K_4)\) is isomorphic to \(M(\mathcal{W}_3)\), the rank-\(3\) wheel:
sage: W3 = matroids.Wheel(3) sage: M.is_isomorphic(W3) True
>>> from sage.all import * >>> W3 = matroids.Wheel(Integer(3)) >>> M.is_isomorphic(W3) True
and to the tipless binary \(3\)-spike:
sage: Z = matroids.Z(3, False) sage: M.is_isomorphic(Z) True
>>> from sage.all import * >>> Z = matroids.Z(Integer(3), False) >>> M.is_isomorphic(Z) True
It has a transitive automorphism group:
sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 640.
- sage.matroids.database_matroids.K5(groundset='abcdefghij')[source]#
Return the graphic matroid \(M(K_5)\).
\(M(K_5)\) is an excluded minor for the class of cographic matroids. It is the \(3\)-dimensional Desargues configuration.
EXAMPLES:
sage: M = matroids.catalog.K5(); M M(K5): Graphic matroid of rank 4 on 10 elements sage: M.is_valid() True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.K5(); M M(K5): Graphic matroid of rank 4 on 10 elements >>> M.is_valid() True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 656.
- sage.matroids.database_matroids.K5dual(groundset='abcdefghij')[source]#
Return the matroid \(M^*(K_5)\).
\(M^*(K_5)\) is an excluded minor for the class of graphic matroids.
EXAMPLES:
sage: M = matroids.catalog.K5dual(); M M*(K5): Dual of 'Graphic matroid of rank 4 on 10 elements' sage: M.is_3connected() True sage: G1 = M.automorphism_group() sage: G2 = matroids.catalog.K5().automorphism_group() sage: G1.is_isomorphic(G2) True
>>> from sage.all import * >>> M = matroids.catalog.K5dual(); M M*(K5): Dual of 'Graphic matroid of rank 4 on 10 elements' >>> M.is_3connected() True >>> G1 = M.automorphism_group() >>> G2 = matroids.catalog.K5().automorphism_group() >>> G1.is_isomorphic(G2) True
REFERENCES:
[Oxl2011], p. 656.
- sage.matroids.database_matroids.KB12(groundset=None)[source]#
Return the matroid \(KB12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.KB12(); M KB12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.KB12(); M KB12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.KF10(groundset=None)[source]#
Return the matroid \(KF10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.KF10(); M KF10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.KF10(); M KF10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.KP8(groundset=None)[source]#
Return the matroid \(KP8\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(G\). Self-dual. Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.KP8(); M KP8: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.KP8(); M KP8: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.KQ9(groundset=None)[source]#
Return the matroid \(KQ9\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids.) Has a
TQ8
-minor` (delete \(6\)) and aKP8
-minor (delete \(8\)). UPF is \(GF(4)\).EXAMPLES:
sage: KQ9 = matroids.catalog.KQ9(); KQ9 KQ9: Quaternary matroid of rank 4 on 9 elements sage: TQ8 = matroids.catalog.TQ8() sage: TQ8.is_isomorphic(KQ9.delete(6)) True sage: KP8 = matroids.catalog.KP8() sage: KP8.is_isomorphic(KQ9.delete(8)) True
>>> from sage.all import * >>> KQ9 = matroids.catalog.KQ9(); KQ9 KQ9: Quaternary matroid of rank 4 on 9 elements >>> TQ8 = matroids.catalog.TQ8() >>> TQ8.is_isomorphic(KQ9.delete(Integer(6))) True >>> KP8 = matroids.catalog.KP8() >>> KP8.is_isomorphic(KQ9.delete(Integer(8))) True
- sage.matroids.database_matroids.KR9(groundset=None)[source]#
Return the matroid \(KR9\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids.) In a \(DY\)-equivalence class of \(4\) matroids. Has a
KP8
-minor (delete \(8\)). UPF is \(GF(4)\).EXAMPLES:
sage: KR9 = matroids.catalog.KR9(); KR9 KR9: Quaternary matroid of rank 4 on 9 elements sage: KP8 = matroids.catalog.KP8() sage: KP8.is_isomorphic(KR9.delete(8)) True
>>> from sage.all import * >>> KR9 = matroids.catalog.KR9(); KR9 KR9: Quaternary matroid of rank 4 on 9 elements >>> KP8 = matroids.catalog.KP8() >>> KP8.is_isomorphic(KR9.delete(Integer(8))) True
- sage.matroids.database_matroids.KT10(groundset=None)[source]#
Return the matroid \(KT10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.KT10(); M KT10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.KT10(); M KT10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.L8(groundset=None)[source]#
Return the matroid \(L_8\), represented as circuit closures.
The matroid \(L_8\) is an \(8\)-element matroid of rank-\(4\). It is representable over all fields with at least five elements. It is a cube, yet it is not a tipless spike.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.L8(); M L8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'e', 'g'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'd', 'f', 'h'}, {'c', 'd', 'e', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: M.equals(M.dual()) True sage: M.is_valid() # long time True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.L8(); M L8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'e', 'g'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'd', 'f', 'h'}, {'c', 'd', 'e', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> M.equals(M.dual()) True >>> M.is_valid() # long time True >>> M.automorphism_group().is_transitive() True
Every single-element contraction is isomorphic to the free extension of \(M(K_4)\):
sage: K4 = matroids.catalog.K4(range(6)) sage: Bext = [list(b) for b in K4.bases()] + [list(I)+[6] for I in ....: K4.independent_sets(2)] sage: K4ext = Matroid(bases=Bext) sage: import random sage: e = random.choice(list(M.groundset())) sage: M.contract(e).is_isomorphic(K4ext) True
>>> from sage.all import * >>> K4 = matroids.catalog.K4(range(Integer(6))) >>> Bext = [list(b) for b in K4.bases()] + [list(I)+[Integer(6)] for I in ... K4.independent_sets(Integer(2))] >>> K4ext = Matroid(bases=Bext) >>> import random >>> e = random.choice(list(M.groundset())) >>> M.contract(e).is_isomorphic(K4ext) True
REFERENCES:
[Oxl2011], p. 648.
- sage.matroids.database_matroids.LP8(groundset=None)[source]#
Return the matroid \(LP8\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids. Self-dual. UPF is \(W\). (Also an excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.LP8(); M LP8: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.LP8(); M LP8: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.M8591(groundset=None)[source]#
Return the matroid \(M8591\).
An excluded minor for \(K_2\)-representable matroids. A \(Y-\delta\) exchange on the unique triad gives
A9
. The UPF is \(P_4\).EXAMPLES:
sage: M = matroids.catalog.M8591(); M M8591: Quaternary matroid of rank 4 on 9 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.M8591(); M M8591: Quaternary matroid of rank 4 on 9 elements >>> M.is_valid() True
- sage.matroids.database_matroids.N1(groundset='abcdefghij')[source]#
Return the matroid \(N_1\), represented over \(\GF{3}\).
\(N_1\) is an excluded minor for the dyadic matroids.
EXAMPLES:
sage: M = matroids.catalog.N1(); M N1: Ternary matroid of rank 5 on 10 elements, type 0+ sage: M.is_field_isomorphic(M.dual()) True sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.N1(); M N1: Ternary matroid of rank 5 on 10 elements, type 0+ >>> M.is_field_isomorphic(M.dual()) True >>> M.is_valid() True
REFERENCES:
[Oxl2011], p. 554.
- sage.matroids.database_matroids.N2(groundset='abcdefghijkl')[source]#
Return the matroid \(N_2\), represented over \(\GF{3}\).
\(N_2\) is an excluded minor for the dyadic matroids.
EXAMPLES:
sage: M = matroids.catalog.N2(); M N2: Ternary matroid of rank 6 on 12 elements, type 0+ sage: M.is_field_isomorphic(M.dual()) True sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.N2(); M N2: Ternary matroid of rank 6 on 12 elements, type 0+ >>> M.is_field_isomorphic(M.dual()) True >>> M.is_valid() True
REFERENCES:
[Oxl2011], p. 554.
- sage.matroids.database_matroids.N3(groundset=None)[source]#
Return the matroid \(N3\).
An excluded minor for dyadic matroids (and \(GF(5)\)-representable matroids). UPF is \(GF(3)\). \(4\)- (but not \(5\)-) connected. Self-dual.
EXAMPLES:
sage: N3 = matroids.catalog.N3(); N3 N3: Ternary matroid of rank 7 on 14 elements, type 0+ sage: N3.is_isomorphic(N3.dual()) True sage: N3.is_kconnected(4) True sage: N3.is_kconnected(5) False
>>> from sage.all import * >>> N3 = matroids.catalog.N3(); N3 N3: Ternary matroid of rank 7 on 14 elements, type 0+ >>> N3.is_isomorphic(N3.dual()) True >>> N3.is_kconnected(Integer(4)) True >>> N3.is_kconnected(Integer(5)) False
- sage.matroids.database_matroids.N3pp(groundset=None)[source]#
Return the matroid \(N3pp\).
An excluded minor for \(K_2\)-representable matroids. Self-dual. Obtained by relaxing the two complementary circuit-hyperplanes of
N4
. Not \(P_4\)-representable, but \(O\)-representable, and hence representable over all fields of size at least four.EXAMPLES:
sage: M = matroids.catalog.N3pp(); M N3=: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.N3pp(); M N3=: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.N4(groundset=None)[source]#
Return the matroid \(N4\).
An excluded minor for dyadic matroids (and \(GF(5)\)-representable matroids). UPF is \(GF(3)\). \(4\)- (but not \(5\)-) connected. Self-dual.
EXAMPLES:
sage: N4 = matroids.catalog.N4(); N4 N4: Ternary matroid of rank 8 on 16 elements, type 0+ sage: N4.is_isomorphic(N4.dual()) True sage: N4.is_kconnected(4) True sage: N4.is_kconnected(5) False
>>> from sage.all import * >>> N4 = matroids.catalog.N4(); N4 N4: Ternary matroid of rank 8 on 16 elements, type 0+ >>> N4.is_isomorphic(N4.dual()) True >>> N4.is_kconnected(Integer(4)) True >>> N4.is_kconnected(Integer(5)) False
- sage.matroids.database_matroids.NestOfTwistedCubes(groundset=None)[source]#
Return the NestOfTwistedCubes matroid.
A matroid with no \(U(2,4)\)-detachable pairs (only \(\{e_i,f_i\}\) pairs are detachable).
EXAMPLES:
sage: M = matroids.catalog.NestOfTwistedCubes(); M NestOfTwistedCubes: Matroid of rank 6 on 12 elements with 57 circuits sage: M.is_3connected() True
>>> from sage.all import * >>> M = matroids.catalog.NestOfTwistedCubes(); M NestOfTwistedCubes: Matroid of rank 6 on 12 elements with 57 circuits >>> M.is_3connected() True
- sage.matroids.database_matroids.NonDesargues(groundset=None)[source]#
Return the NonDesargues matroid.
The NonDesargues matroid is a \(10\)-element matroid of rank-\(3\). It is not representable over any division ring. It is not graphic, not cographic, and not regular.
EXAMPLES:
sage: M = matroids.catalog.NonDesargues(); M NonDesargues: Matroid of rank 3 on 10 elements with 9 nonspanning circuits sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.NonDesargues(); M NonDesargues: Matroid of rank 3 on 10 elements with 9 nonspanning circuits >>> M.is_valid() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 657.
- sage.matroids.database_matroids.NonFano(groundset='abcdefg')[source]#
Return the non-Fano matroid, represented over \(GF(3)\).
The non-Fano matroid, or \(F_7^-\), is a \(7\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has characteristic other than two. It is the unique relaxation of \(F_7\).
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.NonFano(); M NonFano: Ternary matroid of rank 3 on 7 elements, type 0- sage: setprint(M.nonbases()) [{'a', 'b', 'f'}, {'a', 'c', 'e'}, {'a', 'd', 'g'}, {'b', 'c', 'd'}, {'b', 'e', 'g'}, {'c', 'f', 'g'}] sage: M.delete('f').is_isomorphic(matroids.CompleteGraphic(4)) True sage: M.delete('g').is_isomorphic(matroids.CompleteGraphic(4)) False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.NonFano(); M NonFano: Ternary matroid of rank 3 on 7 elements, type 0- >>> setprint(M.nonbases()) [{'a', 'b', 'f'}, {'a', 'c', 'e'}, {'a', 'd', 'g'}, {'b', 'c', 'd'}, {'b', 'e', 'g'}, {'c', 'f', 'g'}] >>> M.delete('f').is_isomorphic(matroids.CompleteGraphic(Integer(4))) True >>> M.delete('g').is_isomorphic(matroids.CompleteGraphic(Integer(4))) False
REFERENCES:
[Oxl2011], p. 643-4.
- sage.matroids.database_matroids.NonFanoDual(groundset='abcdefg')[source]#
Return the dual of the non-Fano matroid.
\((F_7^-)^*\) is a \(7\)-element matroid of rank-\(3\). Every single-element contraction of \((F_7 )^*\) is isomorphic to \(M(K_4)\) or \(\mathcal{W}^3\).
EXAMPLES:
sage: M = matroids.catalog.NonFanoDual(); M NonFano*: Ternary matroid of rank 4 on 7 elements, type 0- sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g']
>>> from sage.all import * >>> M = matroids.catalog.NonFanoDual(); M NonFano*: Ternary matroid of rank 4 on 7 elements, type 0- >>> sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g']
Every single-element contraction of \((F_7^-)^*\) is isomorphic to \(M(K_4)\) or \(\mathcal{W}^3\):
sage: import random sage: e = random.choice(list(M.groundset())) sage: N = M.contract(e) sage: K4 = matroids.catalog.K4() sage: W3 = matroids.catalog.Whirl3() sage: N.is_isomorphic(K4) or N.is_isomorphic(W3) True
>>> from sage.all import * >>> import random >>> e = random.choice(list(M.groundset())) >>> N = M.contract(e) >>> K4 = matroids.catalog.K4() >>> W3 = matroids.catalog.Whirl3() >>> N.is_isomorphic(K4) or N.is_isomorphic(W3) True
REFERENCES:
[Oxl2011], p. 643-4.
- sage.matroids.database_matroids.NonPappus(groundset=None)[source]#
Return the non-Pappus matroid.
The non-Pappus matroid is a \(9\)-element matroid of rank-\(3\). It is not representable over any commutative field. It is the unique relaxation of the Pappus matroid.
EXAMPLES:
sage: M = matroids.catalog.NonPappus(); M NonPappus: Matroid of rank 3 on 9 elements with 8 nonspanning circuits sage: NSC = set([('a', 'b', 'c'), ('a', 'e', 'i'), ('a', 'f', 'h'), ....: ('b', 'd', 'i'), ('b', 'f', 'g'), ('c', 'd', 'h'), ....: ('c', 'e', 'g'), ('g', 'h', 'i')]) sage: NSC == set(tuple(sorted(C)) for C in M.nonspanning_circuits()) True sage: M.is_dependent(['d', 'e', 'f']) False sage: M.is_valid() and M.is_paving() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.NonPappus(); M NonPappus: Matroid of rank 3 on 9 elements with 8 nonspanning circuits >>> NSC = set([('a', 'b', 'c'), ('a', 'e', 'i'), ('a', 'f', 'h'), ... ('b', 'd', 'i'), ('b', 'f', 'g'), ('c', 'd', 'h'), ... ('c', 'e', 'g'), ('g', 'h', 'i')]) >>> NSC == set(tuple(sorted(C)) for C in M.nonspanning_circuits()) True >>> M.is_dependent(['d', 'e', 'f']) False >>> M.is_valid() and M.is_paving() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 655.
- sage.matroids.database_matroids.NonVamos(groundset=None)[source]#
Return the non-\(V\acute{a}mos\) matroid.
The non-\(V\acute{a}mos\) matroid, or \(V_8^+\) is an \(8\)-element matroid of rank \(4\). It is a tightening of the \(V\acute{a}mos\) matroid. It is representable over some field.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.NonVamos(); M NonVamos: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'c', 'd', 'g', 'h'}, {'e', 'f', 'g', 'h'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: setprint(M.nonbases()) [{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'c', 'd', 'g', 'h'}, {'e', 'f', 'g', 'h'}] sage: M.is_dependent(['c', 'd', 'g', 'h']) True sage: M.is_valid() # long time True
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.NonVamos(); M NonVamos: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'c', 'd', 'g', 'h'}, {'e', 'f', 'g', 'h'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> setprint(M.nonbases()) [{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'c', 'd', 'g', 'h'}, {'e', 'f', 'g', 'h'}] >>> M.is_dependent(['c', 'd', 'g', 'h']) True >>> M.is_valid() # long time True
REFERENCES:
[Oxl2011], p. 72, 84.
- sage.matroids.database_matroids.NotP8(groundset='abcdefgh')[source]#
Return the matroid
NotP8
.EXAMPLES:
sage: M = matroids.catalog.P8() sage: N = matroids.catalog.NotP8(); N NotP8: Ternary matroid of rank 4 on 8 elements, type 0- sage: M.is_isomorphic(N) False sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.P8() >>> N = matroids.catalog.NotP8(); N NotP8: Ternary matroid of rank 4 on 8 elements, type 0- >>> M.is_isomorphic(N) False >>> M.is_valid() True
REFERENCES:
[Oxl1992], p.512 (the first edition).
- sage.matroids.database_matroids.O7(groundset='abcdefg')[source]#
Return the matroid \(O_7\), represented over \(GF(3)\).
The matroid \(O_7\) is a \(7\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has at least three elements. It is obtained by freely adding a point to any line of \(M(K_4)\).
EXAMPLES:
sage: M = matroids.catalog.O7(); M O7: Ternary matroid of rank 3 on 7 elements, type 0+ sage: M.delete('e').is_isomorphic(matroids.CompleteGraphic(4)) True sage: M.tutte_polynomial() y^4 + x^3 + x*y^2 + 3*y^3 + 4*x^2 + 5*x*y + 5*y^2 + 4*x + 4*y
>>> from sage.all import * >>> M = matroids.catalog.O7(); M O7: Ternary matroid of rank 3 on 7 elements, type 0+ >>> M.delete('e').is_isomorphic(matroids.CompleteGraphic(Integer(4))) True >>> M.tutte_polynomial() y^4 + x^3 + x*y^2 + 3*y^3 + 4*x^2 + 5*x*y + 5*y^2 + 4*x + 4*y
REFERENCES:
[Oxl2011], p. 644.
- sage.matroids.database_matroids.OW14(groundset=None)[source]#
Return the matroid \(OW14\).
An excluded minor for \(P_4\)-representable matroids. Self-dual. UPF is \(Orthrus\).
EXAMPLES:
sage: M = matroids.catalog.OW14(); M OW14: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.OW14(); M OW14: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.P6(groundset=None)[source]#
Return the matroid \(P_6\), represented as circuit closures.
The matroid \(P_6\) is a \(6\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has at least five elements. It is the unique relaxation of \(Q_6\). It is an excluded minor for the class of quaternary matroids.
EXAMPLES:
sage: M = matroids.catalog.P6(); M P6: Matroid of rank 3 on 6 elements with circuit-closures {2: {{'a', 'b', 'c'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f'}}} sage: len(set(M.nonspanning_circuits()).difference(M.nonbases())) == 0 True sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, nrows=5)).has_minor(M) False sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.P6(); M P6: Matroid of rank 3 on 6 elements with circuit-closures {2: {{'a', 'b', 'c'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f'}}} >>> len(set(M.nonspanning_circuits()).difference(M.nonbases())) == Integer(0) True >>> Matroid(matrix=random_matrix(GF(Integer(4), 'a'), ncols=Integer(5), nrows=Integer(5))).has_minor(M) False >>> M.is_valid() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 641-2.
- sage.matroids.database_matroids.P7(groundset='abcdefg')[source]#
Return the matroid \(P_7\), represented over \(GF(3)\).
The matroid \(P_7\) is a \(7\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has at least three elements. It is one of two ternary \(3\)-spikes, with the other being \(F_7^-\).
EXAMPLES:
sage: M = matroids.catalog.P7(); M P7: Ternary matroid of rank 3 on 7 elements, type 1+ sage: M.whitney_numbers2() [1, 7, 11, 1] sage: M.has_minor(matroids.CompleteGraphic(4)) False sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.P7(); M P7: Ternary matroid of rank 3 on 7 elements, type 1+ >>> M.whitney_numbers2() [1, 7, 11, 1] >>> M.has_minor(matroids.CompleteGraphic(Integer(4))) False >>> M.is_valid() True
REFERENCES:
[Oxl2011], p. 644-5.
- sage.matroids.database_matroids.P8(groundset='abcdefgh')[source]#
Return the matroid \(P_8\), represented over \(GF(3)\).
The matroid \(P_8\) is an \(8\)-element matroid of rank-\(4\). It is uniquely representable over all fields of characteristic other than two. It is an excluded minor for all fields of characteristic two with four or more elements.
EXAMPLES:
sage: M = matroids.catalog.P8(); M P8: Ternary matroid of rank 4 on 8 elements, type 2+ sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, nrows=5)).has_minor(M) False sage: M.bicycle_dimension() 2
>>> from sage.all import * >>> M = matroids.catalog.P8(); M P8: Ternary matroid of rank 4 on 8 elements, type 2+ >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> Matroid(matrix=random_matrix(GF(Integer(4), 'a'), ncols=Integer(5), nrows=Integer(5))).has_minor(M) False >>> M.bicycle_dimension() 2
REFERENCES:
[Oxl2011], p. 650-1.
- sage.matroids.database_matroids.P8p(groundset=None)[source]#
Return the matroid \(P8^-\).
\(P8^-\) is obtained by relaxing one of the disjoint circuit-hyperplanes of
P8
. An excluded minor for \(2\)-regular matroids. UPF is \(K_2\). Self-dual.EXAMPLES:
sage: M = matroids.catalog.P8p(); M P8-: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.P8p(); M P8-: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.P8pp(groundset=None)[source]#
Return the matroid \(P_8^=\), represented as circuit closures.
The matroid \(P_8^=\) is an \(8\)-element matroid of rank-\(4\). It can be obtained from \(P_8\) by relaxing the unique pair of disjoint circuit-hyperplanes. It is an excluded minor for \(GF(4)\)-representability. It is representable over all fields with at least five elements.
EXAMPLES:
sage: from sage.matroids.advanced import * sage: M = matroids.catalog.P8pp(); M P8'': Matroid of rank 4 on 8 elements with 8 nonspanning circuits sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: len(get_nonisomorphic_matroids([M.contract(i) for i in M.groundset()])) 1 sage: M.is_valid() and M.is_paving() True
>>> from sage.all import * >>> from sage.matroids.advanced import * >>> M = matroids.catalog.P8pp(); M P8'': Matroid of rank 4 on 8 elements with 8 nonspanning circuits >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> len(get_nonisomorphic_matroids([M.contract(i) for i in M.groundset()])) 1 >>> M.is_valid() and M.is_paving() True
REFERENCES:
[Oxl2011], p. 651.
- sage.matroids.database_matroids.P9(groundset='abcdefghi')[source]#
Return the matroid \(P_9\).
EXAMPLES:
sage: M = matroids.catalog.P9(); M P9: Binary matroid of rank 4 on 9 elements, type (1, 1) sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.P9(); M P9: Binary matroid of rank 4 on 9 elements, type (1, 1) >>> M.is_valid() True
REFERENCES:
This is the matroid referred to as \(P_9\) by Oxley in his paper “The binary matroids with no 4-wheel minor”, [Oxl1987].
- sage.matroids.database_matroids.PG(n, q, x=None, groundset=None)[source]#
Return the projective geometry of dimension
n
over the finite field of orderq
.INPUT:
n
– a positive integer; the dimension of the projective space. This is one less than the rank of the resulting matroid.q
– a positive integer that is a prime power; the order of the finite fieldx
– a string (default:None
); the name of the generator of a non-prime field, used for non-prime fields. If not supplied,'x'
is used.groundset
– a string (optional); the groundset of the matroid
OUTPUT: a linear matroid whose elements are the points of \(PG(n, q)\)
EXAMPLES:
sage: M = matroids.PG(2, 2) sage: M.is_isomorphic(matroids.catalog.Fano()) True sage: matroids.PG(5, 4, 'z').size() == (4^6 - 1) / (4 - 1) True sage: M = matroids.PG(4, 7); M PG(4, 7): Linear matroid of rank 5 on 2801 elements represented over the Finite Field of size 7
>>> from sage.all import * >>> M = matroids.PG(Integer(2), Integer(2)) >>> M.is_isomorphic(matroids.catalog.Fano()) True >>> matroids.PG(Integer(5), Integer(4), 'z').size() == (Integer(4)**Integer(6) - Integer(1)) / (Integer(4) - Integer(1)) True >>> M = matroids.PG(Integer(4), Integer(7)); M PG(4, 7): Linear matroid of rank 5 on 2801 elements represented over the Finite Field of size 7
REFERENCES:
[Oxl2011], p. 660.
- sage.matroids.database_matroids.PG23(groundset=None)[source]#
Return the matroid \(PG23\).
The second smallest projective plane. Not graphic, not cographic, not regular, not near-regular.
EXAMPLES:
sage: M = matroids.catalog.PG23(); M PG(2, 3): Ternary matroid of rank 3 on 13 elements, type 3+ sage: M.is_3connected() True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.PG23(); M PG(2, 3): Ternary matroid of rank 3 on 13 elements, type 3+ >>> M.is_3connected() True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 659.
- sage.matroids.database_matroids.PK10(groundset=None)[source]#
Return the matroid \(PK10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Not self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.PK10(); M PK10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.PK10(); M PK10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.PP10(groundset=None)[source]#
Return the matroid \(PP10\).
An excluded minor for \(P_4\)-representable matroids. UPF is \(U_1^{(2)}\). Has a
TQ8
-minor (e.g. delete ‘a’ and contract ‘e’) and aPP9
(and henceP8p
) minor (contract ‘x’).EXAMPLES:
sage: PP10 = matroids.catalog.PP10(); PP10 PP10: Quaternary matroid of rank 5 on 10 elements sage: M = PP10.delete('a').contract('e') sage: M.is_isomorphic(matroids.catalog.TQ8()) True sage: M = PP10.contract('x') sage: M.is_isomorphic(matroids.catalog.PP9()) True
>>> from sage.all import * >>> PP10 = matroids.catalog.PP10(); PP10 PP10: Quaternary matroid of rank 5 on 10 elements >>> M = PP10.delete('a').contract('e') >>> M.is_isomorphic(matroids.catalog.TQ8()) True >>> M = PP10.contract('x') >>> M.is_isomorphic(matroids.catalog.PP9()) True
- sage.matroids.database_matroids.PP9(groundset=None)[source]#
Return the matroid \(PP9\).
An excluded minor for \(K_2\)-representable matroids. A single-element extension of \(P8^-\). The UPF is \(P_4\). Has a
P8p
-minor (delete \(z\)). Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)EXAMPLES:
sage: P8p = matroids.catalog.P8p() sage: PP9 = matroids.catalog.PP9(); PP9 PP9: Quaternary matroid of rank 4 on 9 elements sage: for M in P8p.extensions(): ....: if M.is_isomorphic(PP9): ....: print(True) ....: break True sage: M = PP9.delete('z') sage: M.is_isomorphic(P8p) True
>>> from sage.all import * >>> P8p = matroids.catalog.P8p() >>> PP9 = matroids.catalog.PP9(); PP9 PP9: Quaternary matroid of rank 4 on 9 elements >>> for M in P8p.extensions(): ... if M.is_isomorphic(PP9): ... print(True) ... break True >>> M = PP9.delete('z') >>> M.is_isomorphic(P8p) True
- sage.matroids.database_matroids.Pappus(groundset=None)[source]#
Return the Pappus matroid.
The Pappus matroid is a \(9\)-element matroid of rank-\(3\). It is representable over a field if and only if that field either has 4 elements or more than 7 elements. It is an excluded minor for the class of GF(5)-representable matroids.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.Pappus(); M Pappus: Matroid of rank 3 on 9 elements with 9 nonspanning circuits sage: setprint(M.nonspanning_circuits()) [{'a', 'b', 'c'}, {'a', 'e', 'i'}, {'a', 'f', 'h'}, {'b', 'd', 'i'}, {'b', 'f', 'g'}, {'c', 'd', 'h'}, {'c', 'e', 'g'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}] sage: M.is_dependent(['d', 'e', 'f']) True sage: M.is_valid() True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.Pappus(); M Pappus: Matroid of rank 3 on 9 elements with 9 nonspanning circuits >>> setprint(M.nonspanning_circuits()) [{'a', 'b', 'c'}, {'a', 'e', 'i'}, {'a', 'f', 'h'}, {'b', 'd', 'i'}, {'b', 'f', 'g'}, {'c', 'd', 'h'}, {'c', 'e', 'g'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}] >>> M.is_dependent(['d', 'e', 'f']) True >>> M.is_valid() True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 655.
- sage.matroids.database_matroids.Psi(r, groundset=None)[source]#
Return the matroid \(\Psi_r\).
The rank-\(r\) free swirl; defined for all \(r \ge 3\).
INPUT:
r
– an integer (\(r \ge 3\)); the rank of the matroidgroundset
– a string (optional); the groundset of the matroid
OUTPUT: matroid (\(\Psi_r\))
EXAMPLES:
sage: matroids.Psi(7) Psi_7: Matroid of rank 7 on 14 elements with 105 nonspanning circuits
>>> from sage.all import * >>> matroids.Psi(Integer(7)) Psi_7: Matroid of rank 7 on 14 elements with 105 nonspanning circuits
The matroid \(\Psi_r\) is \(3\)-connected but, for all \(r \ge 4\), not \(4\)-connected:
sage: M = matroids.Psi(3) sage: M.is_4connected() True sage: import random sage: r = random.choice(range(4, 8)) sage: M = matroids.Psi(r) sage: M.is_4connected() False
>>> from sage.all import * >>> M = matroids.Psi(Integer(3)) >>> M.is_4connected() True >>> import random >>> r = random.choice(range(Integer(4), Integer(8))) >>> M = matroids.Psi(r) >>> M.is_4connected() False
\(\Psi_3 \cong U_{3, 6}\):
sage: M = matroids.Psi(3) sage: M.is_isomorphic(matroids.catalog.U36()) True
>>> from sage.all import * >>> M = matroids.Psi(Integer(3)) >>> M.is_isomorphic(matroids.catalog.U36()) True
It is identically self-dual with a transitive automorphism group:
sage: M = matroids.Psi(r) sage: M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() # long time True
>>> from sage.all import * >>> M = matroids.Psi(r) >>> M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() # long time True
REFERENCES:
[Oxl2011], p. 664.
- sage.matroids.database_matroids.Q10(groundset='abcdefghij')[source]#
Return the matroid \(Q_{10}\), represented over \(\GF{4}\).
\(Q_{10}\) is a \(10\)-element, rank-\(5\), self-dual matroid. It is representable over \(\GF{3}\) and \(\GF{4}\), and hence is a sixth-roots-of-unity matroid. \(Q_{10}\) is a splitter for the class of sixth-root-of-unity matroids.
EXAMPLES:
sage: M = matroids.catalog.Q10(); M Q10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.Q10(); M Q10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True >>> M.is_valid() True
Check the splitter property. By Seymour’s Theorem, and using self-duality, we only need to check that all 3-connected single-element extensions have an excluded minor for sixth-roots-of-unity. The only excluded minors that are quaternary are \(U_{2, 5}, U_{3, 5}, F_7, F_7^*\). As it happens, it suffices to check for \(U_{2, 5}\):
sage: S = matroids.catalog.Q10().linear_extensions(simple=True) sage: [M for M in S if not M.has_line_minor(5)] []
>>> from sage.all import * >>> S = matroids.catalog.Q10().linear_extensions(simple=True) >>> [M for M in S if not M.has_line_minor(Integer(5))] []
- sage.matroids.database_matroids.Q6(groundset='abcdef')[source]#
Return the matroid \(Q_6\), represented over \(GF(4)\).
The matroid \(Q_6\) is a \(6\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has at least four elements. It is the unique relaxation of the rank-\(3\) whirl.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.Q6(); M Q6: Quaternary matroid of rank 3 on 6 elements sage: setprint(M.hyperplanes()) [{'a', 'b', 'd'}, {'a', 'c'}, {'a', 'e'}, {'a', 'f'}, {'b', 'c', 'e'}, {'b', 'f'}, {'c', 'd'}, {'c', 'f'}, {'d', 'e'}, {'d', 'f'}, {'e', 'f'}] sage: M.nonspanning_circuits() == M.noncospanning_cocircuits() False sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.Q6(); M Q6: Quaternary matroid of rank 3 on 6 elements >>> setprint(M.hyperplanes()) [{'a', 'b', 'd'}, {'a', 'c'}, {'a', 'e'}, {'a', 'f'}, {'b', 'c', 'e'}, {'b', 'f'}, {'c', 'd'}, {'c', 'f'}, {'d', 'e'}, {'d', 'f'}, {'e', 'f'}] >>> M.nonspanning_circuits() == M.noncospanning_cocircuits() False >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 641.
- sage.matroids.database_matroids.Q8(groundset=None)[source]#
Return the matroid \(Q_8\), represented as circuit closures.
The matroid \(Q_8\) is an \(8\)-element matroid of rank-\(4\). It is a smallest non-representable matroid.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.Q8(); M Q8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: setprint(M.flats(3)) [{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e'}, {'a', 'c', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'a', 'e', 'g'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f'}, {'b', 'd', 'h'}, {'b', 'e', 'g'}, {'b', 'e', 'h'}, {'b', 'f', 'h'}, {'b', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'e', 'g'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}, {'d', 'f', 'h'}, {'e', 'g', 'h'}] sage: M.is_valid() # long time True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.Q8(); M Q8: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> setprint(M.flats(Integer(3))) [{'a', 'b', 'c', 'h'}, {'a', 'b', 'd', 'e'}, {'a', 'b', 'f', 'g'}, {'a', 'c', 'd', 'f'}, {'a', 'c', 'e'}, {'a', 'c', 'g'}, {'a', 'd', 'g', 'h'}, {'a', 'e', 'f', 'h'}, {'a', 'e', 'g'}, {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f'}, {'b', 'd', 'h'}, {'b', 'e', 'g'}, {'b', 'e', 'h'}, {'b', 'f', 'h'}, {'b', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'e', 'g'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}, {'d', 'f', 'h'}, {'e', 'g', 'h'}] >>> M.is_valid() # long time True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 647.
- sage.matroids.database_matroids.R10(groundset='abcdefghij')[source]#
Return the matroid \(R_{10}\), represented over the regular partial field.
The NonDesargues matroid is a \(10\)-element matroid of rank-5. It is the unique splitter for the class of regular matroids. It is the graft matroid of \(K_{3, 3}\) in which every vertex is coloured.
EXAMPLES:
sage: M = matroids.catalog.R10(); M R10: Regular matroid of rank 5 on 10 elements with 162 bases sage: cct = [] sage: for i in M.circuits(): ....: cct.append(len(i)) sage: Set(cct) {4, 6} sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.is_valid() True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.R10(); M R10: Regular matroid of rank 5 on 10 elements with 162 bases >>> cct = [] >>> for i in M.circuits(): ... cct.append(len(i)) >>> Set(cct) {4, 6} >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.is_valid() True >>> M.automorphism_group().is_transitive() True
Every single-element deletion is isomorphic to \(M(K_{3, 3})\), and every single-element contraction is isomorphic to \(M^*(K_{3, 3})\):
sage: K33 = matroids.catalog.K33() sage: K33D = matroids.catalog.K33dual() sage: import random sage: e = random.choice(list(M.groundset())) sage: M.delete(e).is_isomorphic(K33) True sage: M.contract(e).is_isomorphic(K33D) True
>>> from sage.all import * >>> K33 = matroids.catalog.K33() >>> K33D = matroids.catalog.K33dual() >>> import random >>> e = random.choice(list(M.groundset())) >>> M.delete(e).is_isomorphic(K33) True >>> M.contract(e).is_isomorphic(K33D) True
Check the splitter property:
sage: matroids.catalog.R10().linear_extensions(simple=True) []
>>> from sage.all import * >>> matroids.catalog.R10().linear_extensions(simple=True) []
REFERENCES:
[Oxl2011], p. 656-7.
- sage.matroids.database_matroids.R12(groundset='abcdefghijkl')[source]#
Return the matroid \(R_{12}\), represented over the regular partial field.
The matroid \(R_{12}\) is a \(12\)-element regular matroid of rank-\(6\). It induces a \(3\)-separation in its \(3\)-connected majors within the class of regular matroids. An excluded minor for the class of graphic or cographic matroids.
EXAMPLES:
sage: M = matroids.catalog.R12(); M R12: Regular matroid of rank 6 on 12 elements with 441 bases sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.R12(); M R12: Regular matroid of rank 6 on 12 elements with 441 bases >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.is_valid() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 657.
- sage.matroids.database_matroids.R6(groundset='abcdef')[source]#
Return the matroid \(R_6\), represented over \(GF(3)\).
The matroid \(R_6\) is a \(6\)-element matroid of rank-\(3\). It is representable over a field if and only if that field has at least three elements. It is isomorphic to the \(2\)-sum of two copies of \(U_{2, 4}\).
EXAMPLES:
sage: M = matroids.catalog.R6(); M R6: Ternary matroid of rank 3 on 6 elements, type 2+ sage: M.equals(M.dual()) True sage: M.is_connected() True sage: M.is_3connected() False sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.R6(); M R6: Ternary matroid of rank 3 on 6 elements, type 2+ >>> M.equals(M.dual()) True >>> M.is_connected() True >>> M.is_3connected() False >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 642.
- sage.matroids.database_matroids.R8(groundset='abcdefgh')[source]#
Return the matroid \(R_8\), represented over \(GF(3)\).
The matroid \(R_8\) is an \(8\)-element matroid of rank-\(4\). It is representable over a field if and only if the characteristic of that field is not two. It is the real affine cube.
EXAMPLES:
sage: M = matroids.catalog.R8(); M R8: Ternary matroid of rank 4 on 8 elements, type 0+ sage: M.contract(M.groundset_list()[randrange(0, ....: 8)]).is_isomorphic(matroids.catalog.NonFano()) True sage: M.equals(M.dual()) True sage: M.has_minor(matroids.catalog.Fano()) False sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.R8(); M R8: Ternary matroid of rank 4 on 8 elements, type 0+ >>> M.contract(M.groundset_list()[randrange(Integer(0), ... Integer(8))]).is_isomorphic(matroids.catalog.NonFano()) True >>> M.equals(M.dual()) True >>> M.has_minor(matroids.catalog.Fano()) False >>> M.automorphism_group().is_transitive() True
Every single-element deletion is isomorphic to (F_7^-)^* and every single-element contraction is isomorphic to F_7^-:
sage: F7m = matroids.catalog.NonFano() sage: F7mD = matroids.catalog.NonFanoDual() sage: import random sage: e = random.choice(list(M.groundset())) sage: M.delete(e).is_isomorphic(F7mD) True sage: M.contract(e).is_isomorphic(F7m) True
>>> from sage.all import * >>> F7m = matroids.catalog.NonFano() >>> F7mD = matroids.catalog.NonFanoDual() >>> import random >>> e = random.choice(list(M.groundset())) >>> M.delete(e).is_isomorphic(F7mD) True >>> M.contract(e).is_isomorphic(F7m) True
REFERENCES:
[Oxl2011], p. 646.
- sage.matroids.database_matroids.R9(groundset=None)[source]#
Return the matroid \(R_9\).
The ternary Reid geometry. The only \(9\)-element rank-\(3\) simple ternary matroids are \(R_9\), \(Q_3(GF(3)^ imes)\), and \(AG(2, 3)\). It is not graphic, not cographic, and not regular.
EXAMPLES:
sage: M = matroids.catalog.R9(); M R9: Matroid of rank 3 on 9 elements with 15 nonspanning circuits sage: M.is_valid() True sage: len(M.nonspanning_circuits()) 15 sage: M.is_simple() and M.is_ternary() True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.R9(); M R9: Matroid of rank 3 on 9 elements with 15 nonspanning circuits >>> M.is_valid() True >>> len(M.nonspanning_circuits()) 15 >>> M.is_simple() and M.is_ternary() True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 654.
- sage.matroids.database_matroids.R9A(groundset=None)[source]#
Return the matroid \(R_9^A\).
The matroid \(R_9^A\) is not representable over any field, yet none of the cross-ratios in its Tuttegroup equal 1. It is one of the 4 matroids on at most 9 elements with this property, the others being \({R_9^A}^*\), \(R_9^B\) and \({R_9^B}^*\).
EXAMPLES:
sage: M = matroids.catalog.R9A(); M R9A: Matroid of rank 4 on 9 elements with 13 nonspanning circuits sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.R9A(); M R9A: Matroid of rank 4 on 9 elements with 13 nonspanning circuits >>> M.is_valid() True
- sage.matroids.database_matroids.R9B(groundset=None)[source]#
Return the matroid \(R_9^B\).
The matroid \(R_9^B\) is not representable over any field, yet none of the cross-ratios in its Tuttegroup equal 1. It is one of the 4 matroids on at most 9 elements with this property, the others being \({R_9^B}^*\), \(R_9^A\) and \({R_9^A}^*\).
EXAMPLES:
sage: M = matroids.catalog.R9B(); M R9B: Matroid of rank 4 on 9 elements with 13 nonspanning circuits sage: M.is_valid() and M.is_paving() True
>>> from sage.all import * >>> M = matroids.catalog.R9B(); M R9B: Matroid of rank 4 on 9 elements with 13 nonspanning circuits >>> M.is_valid() and M.is_paving() True
- sage.matroids.database_matroids.RelaxedNonFano(groundset=None)[source]#
Return the relaxed NonFano matroid.
An excluded minor for \(2\)-regular matroids. UPF is \(K_2\).
EXAMPLES:
sage: M = matroids.catalog.RelaxedNonFano(); M F7=: Quaternary matroid of rank 3 on 7 elements sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.RelaxedNonFano(); M F7=: Quaternary matroid of rank 3 on 7 elements >>> M.is_valid() True
- sage.matroids.database_matroids.S8(groundset='abcdefgh')[source]#
Return the matroid \(S_8\), represented over \(GF(2)\).
The matroid \(S_8\) is an \(8\)-element matroid of rank-\(4\). It is representable over a field if and only if that field has characteristic two. It is the unique deletion of a non-tip element from the binary \(4\)-spike.
EXAMPLES:
sage: from sage.matroids.advanced import * sage: M = matroids.catalog.S8(); M S8: Binary matroid of rank 4 on 8 elements, type (2, 0) sage: M.contract('d').is_isomorphic(matroids.catalog.Fano()) True sage: M.delete('d').is_isomorphic(matroids.catalog.FanoDual()) False sage: M.delete('h').is_isomorphic(matroids.catalog.FanoDual()) True sage: M.is_graphic() False sage: D = get_nonisomorphic_matroids( ....: list(matroids.catalog.Fano().linear_coextensions(cosimple=True))) sage: len(D) 2 sage: [N.is_isomorphic(M) for N in D] [...True...] sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import * >>> M = matroids.catalog.S8(); M S8: Binary matroid of rank 4 on 8 elements, type (2, 0) >>> M.contract('d').is_isomorphic(matroids.catalog.Fano()) True >>> M.delete('d').is_isomorphic(matroids.catalog.FanoDual()) False >>> M.delete('h').is_isomorphic(matroids.catalog.FanoDual()) True >>> M.is_graphic() False >>> D = get_nonisomorphic_matroids( ... list(matroids.catalog.Fano().linear_coextensions(cosimple=True))) >>> len(D) 2 >>> [N.is_isomorphic(M) for N in D] [...True...] >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 648.
- sage.matroids.database_matroids.Sp8(groundset=None)[source]#
Return the matroid \(Sp8\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids. UPF is \(U_1^{(2)}\). Self-dual. (An excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.Sp8(); M Sp8: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.Sp8(); M Sp8: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.Sp8pp(groundset=None)[source]#
Return the matroid \(Sp8=\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids. UPF is \((GF(2)(a,b),<a,b,a+1,b+1,ab+a+b>)\). Self-dual. (An excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)
EXAMPLES:
sage: M = matroids.catalog.Sp8pp(); M Sp8=: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.Sp8pp(); M Sp8=: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.Spike(r, t=True, C3=[], groundset=None)[source]#
Return a rank-\(r\) spike.
Defined for all \(r \ge 3\); a rank-\(r\) spike with tip \(t\) and legs \(L_1, L_2, \ldots, L_r\), where \(L_i = \{t, x_i , y_i\}\). Deleting \(t\) gives a tipless rank-\(r\) spike.
The groundset is \(E = \{t, x_1, x_2, \ldots, x_r, y_1, y_2, \ldots, y_r\}\) with \(r(E) = r\).
The nonspanning circuits are \(\{L_1, L_2, \ldots, L_r\}\), all sets of the form \((L_i \cup L_j) \setminus t\) for \(1 \le i < j \le r\), and some (possibly empty) collection \(C_3\) of sets of the form \(\{z_1, z_2, \ldots, z_r\}\) where \(z_i \in \{x_i, y_i\}\) for all \(i\), and no two members of \(C_3\) have more than \(r-2\) common elements.
INPUT:
r
– an integer (\(r \ge 3\)); the rank of the spiket
– boolean (default:True
); whether the spike is tippedC3
– a list (default:[]
); a list of extra nonspanning circuits. The default (i.e. the empty list) results in a free \(r\)-spikegroundset
– a string (optional); the groundset of the matroid
OUTPUT: matroid; a rank-\(r\) spike (tipped or tipless)
EXAMPLES:
sage: M = matroids.Spike(3, False); M Free 3-spike\t: M \ {'t'}, where M is Matroid of rank 3 on 7 elements with 3 nonspanning circuits sage: M.is_isomorphic(matroids.Uniform(3, 6)) True sage: len(matroids.Spike(8).bases()) 4864 sage: import random sage: r = random.choice(range(3, 20)) sage: M = matroids.Spike(r) sage: M.is_3connected() True
>>> from sage.all import * >>> M = matroids.Spike(Integer(3), False); M Free 3-spike\t: M \ {'t'}, where M is Matroid of rank 3 on 7 elements with 3 nonspanning circuits >>> M.is_isomorphic(matroids.Uniform(Integer(3), Integer(6))) True >>> len(matroids.Spike(Integer(8)).bases()) 4864 >>> import random >>> r = random.choice(range(Integer(3), Integer(20))) >>> M = matroids.Spike(r) >>> M.is_3connected() True
Each of \(F_7\), \(F_7^-\), and \(P_7\), is a 3-spike. After inspection of the nonspanning circuits of these matroids, it becomes clear that they indeed constitute tipped 3-spikes. This can be verified by using an appropriate choice of extra circuits in \(C_3\):
sage: M = matroids.Spike(3, C3=[['x1', 'x2', 'y3'], ....: ['x1', 'x3', 'y2'], ....: ['x2', 'x3', 'y1'], ....: ['y1', 'y2', 'y3']]) sage: M.is_isomorphic(matroids.catalog.Fano()) True sage: M = matroids.Spike(3, C3=[['x1', 'x2', 'x3'], ....: ['x1', 'y2', 'y3'], ....: ['x2', 'y1', 'y3']]) sage: M.is_isomorphic(matroids.catalog.NonFano()) True sage: M = matroids.Spike(3, C3=[['x1', 'x2', 'y3'], ....: ['x3', 'y1', 'y2']]) sage: M.is_isomorphic(matroids.catalog.P7()) True
>>> from sage.all import * >>> M = matroids.Spike(Integer(3), C3=[['x1', 'x2', 'y3'], ... ['x1', 'x3', 'y2'], ... ['x2', 'x3', 'y1'], ... ['y1', 'y2', 'y3']]) >>> M.is_isomorphic(matroids.catalog.Fano()) True >>> M = matroids.Spike(Integer(3), C3=[['x1', 'x2', 'x3'], ... ['x1', 'y2', 'y3'], ... ['x2', 'y1', 'y3']]) >>> M.is_isomorphic(matroids.catalog.NonFano()) True >>> M = matroids.Spike(Integer(3), C3=[['x1', 'x2', 'y3'], ... ['x3', 'y1', 'y2']]) >>> M.is_isomorphic(matroids.catalog.P7()) True
Deleting any element gives a self-dual matroid. The tipless free spike (i.e., when \(C_3\) is empty) is identically self-dual:
sage: M = matroids.Spike(6) sage: e = random.choice(list(M.groundset())) sage: Minor = M.delete(e) sage: Minor.is_isomorphic(Minor.dual()) True sage: r = random.choice(range(3, 8)) sage: M = matroids.Spike(r, False) sage: M.equals(M.dual()) True
>>> from sage.all import * >>> M = matroids.Spike(Integer(6)) >>> e = random.choice(list(M.groundset())) >>> Minor = M.delete(e) >>> Minor.is_isomorphic(Minor.dual()) True >>> r = random.choice(range(Integer(3), Integer(8))) >>> M = matroids.Spike(r, False) >>> M.equals(M.dual()) True
REFERENCES:
[Oxl2011], p. 662.
- sage.matroids.database_matroids.T12(groundset='abcdefghijkl')[source]#
Return the matroid \(T_{12}\).
The edges of the Petersen graph can be labeled by the \(4\)-circuits of \(T_{12}\) so that two edges are adjacent if and only if the corresponding \(4\)-circuits overlap in exactly two elements. Relaxing a circuit-hyperplane yields an excluded minor for the class of matroids that are either binary or ternary.
EXAMPLES:
sage: M = matroids.catalog.T12(); M T12: Binary matroid of rank 6 on 12 elements, type (2, None) sage: M.is_valid() True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() True
>>> from sage.all import * >>> M = matroids.catalog.T12(); M T12: Binary matroid of rank 6 on 12 elements, type (2, None) >>> M.is_valid() True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() True
REFERENCES:
[Oxl2011], p. 658-9.
- sage.matroids.database_matroids.T8(groundset='abcdefgh')[source]#
Return the matroid \(T_8\), represented over \(GF(3)\).
The matroid \(T_8\) is an \(8\)-element matroid of rank-\(4\). It is representable over a field if and only if that field has characteristic three. It is an excluded minor for the dyadic matroids.
EXAMPLES:
sage: M = matroids.catalog.T8(); M T8: Ternary matroid of rank 4 on 8 elements, type 0- sage: M.truncation().is_isomorphic(matroids.Uniform(3, 8)) True sage: M.contract('e').is_isomorphic(matroids.catalog.P7()) True sage: M.has_minor(matroids.Uniform(3, 8)) False sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.T8(); M T8: Ternary matroid of rank 4 on 8 elements, type 0- >>> M.truncation().is_isomorphic(matroids.Uniform(Integer(3), Integer(8))) True >>> M.contract('e').is_isomorphic(matroids.catalog.P7()) True >>> M.has_minor(matroids.Uniform(Integer(3), Integer(8))) False >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 649.
- sage.matroids.database_matroids.TK10(groundset=None)[source]#
Return the matroid \(TK10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.TK10(); M TK10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.TK10(); M TK10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.TQ10(groundset=None)[source]#
Return the matroid \(TQ10\).
An excluded minor for \(K_2\)-representable matroids. UPF is \(G\). Self-dual. Has
TQ8
as a minor (delete ‘d’ and contract ‘c’).EXAMPLES:
sage: M = matroids.catalog.TQ10(); M TQ10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True sage: N = M.delete('d').contract('c') sage: N.is_isomorphic(matroids.catalog.TQ8()) True
>>> from sage.all import * >>> M = matroids.catalog.TQ10(); M TQ10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True >>> N = M.delete('d').contract('c') >>> N.is_isomorphic(matroids.catalog.TQ8()) True
- sage.matroids.database_matroids.TQ8(groundset=None)[source]#
Return the matroid \(TQ8\).
An excluded minor for \(2\)-regular matroids. UPF is \(K_2\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.TQ8(); M TQ8: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.TQ8(); M TQ8: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.TQ9(groundset=None)[source]#
Return the matroid \(TQ9\).
An excluded minor for \(K_2\)-representable matroids, and a single-element extension of
TQ8
. The UPF is \(G\). Uniquely \(GF(5)\)-representable. (An excluded minor for \(H_2\)-representable matroids.)EXAMPLES:
sage: TQ8 = matroids.catalog.TQ8() sage: TQ9 = matroids.catalog.TQ9(); TQ9 TQ9: Quaternary matroid of rank 4 on 9 elements sage: for M in TQ8.extensions(): ....: if M.is_isomorphic(TQ9): ....: print(True) ....: break True
>>> from sage.all import * >>> TQ8 = matroids.catalog.TQ8() >>> TQ9 = matroids.catalog.TQ9(); TQ9 TQ9: Quaternary matroid of rank 4 on 9 elements >>> for M in TQ8.extensions(): ... if M.is_isomorphic(TQ9): ... print(True) ... break True
- sage.matroids.database_matroids.TQ9p(groundset=None)[source]#
Return the matroid \(TQ9^-\).
An excluded minor for \(G\)- and \(K_2\)-representable matroids, and a single-element extension of
TQ8
. UPF is \(U_1^{(2)}\). (An excluded minor for \(H_2\)- and \(GF(5)\)-representable matroids.)EXAMPLES:
sage: TQ8 = matroids.catalog.TQ8() sage: TQ9p = matroids.catalog.TQ9p(); TQ9p TQ9': Quaternary matroid of rank 4 on 9 elements sage: for M in TQ8.extensions(): ....: if M.is_isomorphic(TQ9p): ....: print(True) ....: break True
>>> from sage.all import * >>> TQ8 = matroids.catalog.TQ8() >>> TQ9p = matroids.catalog.TQ9p(); TQ9p TQ9': Quaternary matroid of rank 4 on 9 elements >>> for M in TQ8.extensions(): ... if M.is_isomorphic(TQ9p): ... print(True) ... break True
- sage.matroids.database_matroids.TU10(groundset=None)[source]#
Return the matroid \(TU10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.TU10(); M TU10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.TU10(); M TU10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.TernaryDowling3(groundset='abcdefghi')[source]#
Return the matroid \(Q_3(GF(3)^\times)\), represented over \(GF(3)\).
The matroid \(Q_3(GF(3)^\times)\) is a \(9\)-element matroid of rank-\(3\). It is the rank-\(3\) ternary Dowling geometry. It is representable over a field if and only if that field does not have characteristic two.
EXAMPLES:
sage: M = matroids.catalog.TernaryDowling3(); M Q3(GF(3)x): Ternary matroid of rank 3 on 9 elements, type 0- sage: len(list(M.linear_subclasses())) 72 sage: M.fundamental_cycle('abc', 'd') {'a': 2, 'b': 1, 'd': 1} sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.TernaryDowling3(); M Q3(GF(3)x): Ternary matroid of rank 3 on 9 elements, type 0- >>> len(list(M.linear_subclasses())) 72 >>> M.fundamental_cycle('abc', 'd') {'a': 2, 'b': 1, 'd': 1} >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 654.
- sage.matroids.database_matroids.Terrahawk(groundset='abcdefghijklmnop')[source]#
Return the Terrahawk matroid.
The Terrahawk is a binary matroid that is a sporadic exception in a chain theorem for internally \(4\)-connected binary matroids.
EXAMPLES:
sage: M = matroids.catalog.Terrahawk(); M Terrahawk: Binary matroid of rank 8 on 16 elements, type (0, 4) sage: M.is_valid() True
>>> from sage.all import * >>> M = matroids.catalog.Terrahawk(); M Terrahawk: Binary matroid of rank 8 on 16 elements, type (0, 4) >>> M.is_valid() True
REFERENCES:
- sage.matroids.database_matroids.Theta(n, groundset=None)[source]#
Return the matroid \(\Theta_n\).
Defined for all \(n \ge 2\). \(\Theta_2 \cong U_{1,2} \bigoplus U_{1,2}\) and \(\Theta_3 \cong M(K_4)\).
INPUT:
n
– an integer (\(n \ge 2\)); the rank of the matroidgroundset
– a string (optional); the groundset of the matroid
OUTPUT: matroid (\(\Theta_n\))
EXAMPLES:
sage: matroids.Theta(30) Theta_30: Matroid of rank 30 on 60 elements with 16270 circuits sage: M = matroids.Theta(2) sage: U12 = matroids.Uniform(1, 2) sage: U = U12.direct_sum(U12) sage: M.is_isomorphic(U) True sage: M = matroids.Theta(3) sage: M.is_isomorphic(matroids.catalog.K4()) True
>>> from sage.all import * >>> matroids.Theta(Integer(30)) Theta_30: Matroid of rank 30 on 60 elements with 16270 circuits >>> M = matroids.Theta(Integer(2)) >>> U12 = matroids.Uniform(Integer(1), Integer(2)) >>> U = U12.direct_sum(U12) >>> M.is_isomorphic(U) True >>> M = matroids.Theta(Integer(3)) >>> M.is_isomorphic(matroids.catalog.K4()) True
\(\Theta_n\) is self-dual; identically self-dual if and only if \(n = 2\):
sage: M = matroids.Theta(2) sage: M.equals(M.dual()) True sage: import random sage: n = random.choice(range(3, 7)) sage: M = matroids.Theta(n) sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
>>> from sage.all import * >>> M = matroids.Theta(Integer(2)) >>> M.equals(M.dual()) True >>> import random >>> n = random.choice(range(Integer(3), Integer(7))) >>> M = matroids.Theta(n) >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
For \(n \le 3\), its automorphism group is transitive, while for \(n \ge 4\) it is not:
sage: n = random.choice(range(4, 8)) sage: M = matroids.Theta(2 + n % 2) sage: M.automorphism_group().is_transitive() True sage: M = matroids.Theta(n) sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> n = random.choice(range(Integer(4), Integer(8))) >>> M = matroids.Theta(Integer(2) + n % Integer(2)) >>> M.automorphism_group().is_transitive() True >>> M = matroids.Theta(n) >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 663-4.
- sage.matroids.database_matroids.TicTacToe(groundset=None)[source]#
Return the TicTacToe matroid.
The dual of the TicTacToe matroid is not algebraic; it is unknown whether the TicTacToe matroid itself is algebraic.
EXAMPLES:
sage: M = matroids.catalog.TicTacToe(); M TicTacToe: Matroid of rank 5 on 9 elements with 8 nonspanning circuits sage: M.is_valid() and M.is_paving() True
>>> from sage.all import * >>> M = matroids.catalog.TicTacToe(); M TicTacToe: Matroid of rank 5 on 9 elements with 8 nonspanning circuits >>> M.is_valid() and M.is_paving() True
REFERENCES:
- sage.matroids.database_matroids.TippedFree3spike(groundset=None)[source]#
Return the tipped free \(3\)-spike.
Unique 3-connected extension of
U36
. Stabilizer for \(K_2\).EXAMPLES:
sage: M = matroids.catalog.TippedFree3spike(); M Tipped rank-3 free spike: Quaternary matroid of rank 3 on 7 elements sage: M.has_minor(matroids.Uniform(3,6)) True
>>> from sage.all import * >>> M = matroids.catalog.TippedFree3spike(); M Tipped rank-3 free spike: Quaternary matroid of rank 3 on 7 elements >>> M.has_minor(matroids.Uniform(Integer(3),Integer(6))) True
- sage.matroids.database_matroids.U24(groundset='abcd')[source]#
The uniform matroid of rank \(2\) on \(4\) elements.
The \(4\)-point line; isomorphic to \(\mathcal{W}^2\) , the rank-\(2\) whirl. The unique excluded minor for the class of binary matroids.
EXAMPLES:
sage: M = matroids.catalog.U24(); M U(2, 4): Matroid of rank 2 on 4 elements with circuit-closures {2: {{'a', 'b', 'c', 'd'}}} sage: N = matroids.Uniform(2, 4) sage: M.is_isomorphic(N) True sage: M.automorphism_group().structure_description() 'S4'
>>> from sage.all import * >>> M = matroids.catalog.U24(); M U(2, 4): Matroid of rank 2 on 4 elements with circuit-closures {2: {{'a', 'b', 'c', 'd'}}} >>> N = matroids.Uniform(Integer(2), Integer(4)) >>> M.is_isomorphic(N) True >>> M.automorphism_group().structure_description() 'S4'
\(U_{2,4}\) is isomorphic to \(\mathcal{W}^2\):
sage: W2 = matroids.Whirl(2) sage: W2.is_isomorphic(M) True
>>> from sage.all import * >>> W2 = matroids.Whirl(Integer(2)) >>> W2.is_isomorphic(M) True
identically self-dual:
sage: M.equals(M.dual()) True
>>> from sage.all import * >>> M.equals(M.dual()) True
and \(3\)-connected:
sage: M.is_3connected() True
>>> from sage.all import * >>> M.is_3connected() True
REFERENCES:
[Oxl2011], p. 639.
- sage.matroids.database_matroids.U25(groundset='abcde')[source]#
The uniform matroid of rank \(2\) on \(5\) elements.
\(U_{2,5}\) is the \(5\)-point line. Dual to \(U_{3,5}\).
EXAMPLES:
sage: U25 = matroids.catalog.U25(); U25 U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures {2: {{'a', 'b', 'c', 'd', 'e'}}} sage: U25.is_graphic() or U25.is_regular() False sage: U35 = matroids.catalog.U35() sage: U25.is_isomorphic(U35.dual()) True
>>> from sage.all import * >>> U25 = matroids.catalog.U25(); U25 U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures {2: {{'a', 'b', 'c', 'd', 'e'}}} >>> U25.is_graphic() or U25.is_regular() False >>> U35 = matroids.catalog.U35() >>> U25.is_isomorphic(U35.dual()) True
REFERENCES:
[Oxl2011], p. 640.
- sage.matroids.database_matroids.U35(groundset='abcde')[source]#
The uniform matroid of rank \(3\) on \(5\) elements.
\(U_{3,5}\) is five points freely placed in the plane. Dual to \(U_{2,5}\).
EXAMPLES:
sage: U35 = matroids.catalog.U35(); U35 U(3, 5): Matroid of rank 3 on 5 elements with circuit-closures {3: {{'a', 'b', 'c', 'd', 'e'}}} sage: U35.is_graphic() or U35.is_regular() False sage: U25 = matroids.catalog.U25() sage: U35.is_isomorphic(U25.dual()) True
>>> from sage.all import * >>> U35 = matroids.catalog.U35(); U35 U(3, 5): Matroid of rank 3 on 5 elements with circuit-closures {3: {{'a', 'b', 'c', 'd', 'e'}}} >>> U35.is_graphic() or U35.is_regular() False >>> U25 = matroids.catalog.U25() >>> U35.is_isomorphic(U25.dual()) True
REFERENCES:
[Oxl2011], p. 640.
- sage.matroids.database_matroids.U36(groundset='abcdef')[source]#
The uniform matroid of rank \(3\) on \(6\) elements.
Six points freely placed in the plane; the tipless free \(3\)-spike. Identically self-dual.
EXAMPLES:
sage: U36 = matroids.catalog.U36(); U36 U(3, 6): Matroid of rank 3 on 6 elements with circuit-closures {3: {{'a', 'b', 'c', 'd', 'e', 'f'}}} sage: Z = matroids.Spike(3, False) sage: U36.is_isomorphic(Z) True sage: U36.equals(U36.dual()) True sage: U36.automorphism_group().structure_description() 'S6'
>>> from sage.all import * >>> U36 = matroids.catalog.U36(); U36 U(3, 6): Matroid of rank 3 on 6 elements with circuit-closures {3: {{'a', 'b', 'c', 'd', 'e', 'f'}}} >>> Z = matroids.Spike(Integer(3), False) >>> U36.is_isomorphic(Z) True >>> U36.equals(U36.dual()) True >>> U36.automorphism_group().structure_description() 'S6'
REFERENCES:
[Oxl2011], p. 642.
- sage.matroids.database_matroids.UA12(groundset=None)[source]#
Return the matroid \(UA12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Not self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.UA12(); M UA12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.UA12(); M UA12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.UG10(groundset=None)[source]#
Return the matroid \(UG10\).
An excluded minor for \(K_2\)- and \(P_4\)-representable matroids. Self-dual. An excluded minor for \(H_3\)- and \(H_2\)-representable matroids. Uniquely \(GF(5)\)-representable. Although not \(P_4\)-representable, it is \(O\)-representable, and hence is representable over all fields of size at least four.
EXAMPLES:
sage: M = matroids.catalog.UG10(); M UG10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.UG10(); M UG10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.UK10(groundset=None)[source]#
Return the matroid \(UK10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Not self-dual. UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.UK10(); M UK10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.UK10(); M UK10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.UK12(groundset=None)[source]#
Return the matroid \(UK12\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(I\).
EXAMPLES:
sage: M = matroids.catalog.UK12(); M UK12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.UK12(); M UK12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.UP14(groundset=None)[source]#
Return the matroid \(UP14\).
An excluded minor for \(K_2\)-representable matroids. Has disjoint circuit-hyperplanes. UPF is \(W\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.UP14(); M UP14: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.UP14(); M UP14: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.UQ10(groundset=None)[source]#
Return the matroid \(UQ10\).
An excluded minor for \(K_2\)- and \(G\)-representable matroids (and \(H_2\)- and \(GF(5)\)-representable matroids). Self-dual. UPF is \((Q(a,b), <-1,a,b,a-1,b-1,a-b,a+b,a+1,ab+b-1,ab-b+1>)\).
EXAMPLES:
sage: M = matroids.catalog.UQ10(); M UQ10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.UQ10(); M UQ10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.UQ12(groundset=None)[source]#
Return the matroid \(UQ12\).
An excluded minor for \(K_2\) and \(G\)-representable matroids (and \(H2\) and \(GF(5)\)-representable matroids). UPF is \(P_{pappus}\). Self-dual.
EXAMPLES:
sage: M = matroids.catalog.UQ12(); M UQ12: Quaternary matroid of rank 6 on 12 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.UQ12(); M UQ12: Quaternary matroid of rank 6 on 12 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.UT10(groundset=None)[source]#
Return the matroid \(UT10\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). Self-dual. UPF is \(I\).
EXAMPLES:
sage: M = matroids.catalog.UT10(); M UT10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.UT10(); M UT10: Quaternary matroid of rank 5 on 10 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.Uniform(r, n, groundset=None)[source]#
Return the uniform matroid of rank \(r\) on \(n\) elements.
All subsets of size \(r\) or less are independent; all larger subsets are dependent. Representable when the field is sufficiently large. The precise bound is the subject of the MDS conjecture from coding theory.
INPUT:
r
– a nonnegative integer; the rank of the uniform matroidn
– a nonnegative integer; the number of elements of the uniform matroidgroundset
– a string (optional); the groundset of the matroid
OUTPUT: the uniform matroid \(U_{r,n}\)
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.Uniform(2, 5); M U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures {2: {{0, 1, 2, 3, 4}}} sage: M.dual().is_isomorphic(matroids.Uniform(3, 5)) True sage: setprint(M.hyperplanes()) [{0}, {1}, {2}, {3}, {4}] sage: M.has_line_minor(6) False sage: M.is_valid() True
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.Uniform(Integer(2), Integer(5)); M U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures {2: {{0, 1, 2, 3, 4}}} >>> M.dual().is_isomorphic(matroids.Uniform(Integer(3), Integer(5))) True >>> setprint(M.hyperplanes()) [{0}, {1}, {2}, {3}, {4}] >>> M.has_line_minor(Integer(6)) False >>> M.is_valid() True
Check that bug Issue #15292 was fixed:
sage: M = matroids.Uniform(4,4) sage: len(M.circuit_closures()) 0
>>> from sage.all import * >>> M = matroids.Uniform(Integer(4),Integer(4)) >>> len(M.circuit_closures()) 0
REFERENCES:
[Oxl2011], p. 660.
- sage.matroids.database_matroids.VP14(groundset=None)[source]#
Return the matroid \(VP14\).
An excluded minor for \(K_2\)-representable matroids. Has disjoint circuit-hyperplanes. UPF is \(W\). Not self-dual.
EXAMPLES:
sage: M = matroids.catalog.VP14(); M VP14: Quaternary matroid of rank 7 on 14 elements sage: M.is_isomorphic(M.dual()) False
>>> from sage.all import * >>> M = matroids.catalog.VP14(); M VP14: Quaternary matroid of rank 7 on 14 elements >>> M.is_isomorphic(M.dual()) False
- sage.matroids.database_matroids.Vamos(groundset=None)[source]#
Return the \(V\acute{a}mos\) matroid, represented as circuit closures.
The \(V\acute{a}mos\) matroid, or \(V\acute{a}mos\) cube, or \(V_8\) is an \(8\)-element matroid of rank-\(4\). It violates Ingleton’s condition for representability over a division ring. It is not algebraic.
EXAMPLES:
sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.Vamos(); M Vamos: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'e', 'f', 'g', 'h'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} sage: setprint(M.nonbases()) [{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'e', 'f', 'g', 'h'}] sage: M.is_dependent(['c', 'd', 'g', 'h']) False sage: M.is_valid() and M.is_paving() # long time True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> from sage.matroids.advanced import setprint >>> M = matroids.catalog.Vamos(); M Vamos: Matroid of rank 4 on 8 elements with circuit-closures {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'e', 'f', 'g', 'h'}}, 4: {{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}}} >>> setprint(M.nonbases()) [{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'}, {'a', 'b', 'g', 'h'}, {'c', 'd', 'e', 'f'}, {'e', 'f', 'g', 'h'}] >>> M.is_dependent(['c', 'd', 'g', 'h']) False >>> M.is_valid() and M.is_paving() # long time True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 649.
- sage.matroids.database_matroids.WQ8(groundset=None)[source]#
Return the matroid \(WQ8\).
An excluded minor for \(G\), \(K_2\), \(H_4\), and \(GF(5)\)-representable matroids. Self-dual. UPF is \((Z[\zeta,a], <\zeta,a-\zeta>)\) where \(\zeta\) is solution to \(x^2-x+1 = 0\) and \(a\) is an indeterminate.
EXAMPLES:
sage: M = matroids.catalog.WQ8(); M WQ8: Quaternary matroid of rank 4 on 8 elements sage: M.is_isomorphic(M.dual()) True
>>> from sage.all import * >>> M = matroids.catalog.WQ8(); M WQ8: Quaternary matroid of rank 4 on 8 elements >>> M.is_isomorphic(M.dual()) True
- sage.matroids.database_matroids.Wheel(r, field=None, ring=None, groundset=None)[source]#
Return the rank-\(r\) wheel.
INPUT:
r
– a positive integer; the rank of the desired matroidring
– any ring; if provided, output will be a linear matroid over the ring or fieldring
. If the ring is \(\ZZ\), then output will be a regular matroid.field
– any field; same asring
, but only fields are allowedgroundset
– a string (optional); the groundset of the matroid
OUTPUT: the rank-\(r\) wheel matroid, represented as a regular matroid
EXAMPLES:
sage: M = matroids.Wheel(5); M Wheel(5): Regular matroid of rank 5 on 10 elements with 121 bases sage: M.tutte_polynomial() x^5 + y^5 + 5*x^4 + 5*x^3*y + 5*x^2*y^2 + 5*x*y^3 + 5*y^4 + 10*x^3 + 15*x^2*y + 15*x*y^2 + 10*y^3 + 10*x^2 + 16*x*y + 10*y^2 + 4*x + 4*y sage: M.is_valid() True sage: M = matroids.Wheel(3) sage: M.is_isomorphic(matroids.CompleteGraphic(4)) True sage: M.is_isomorphic(matroids.Wheel(3, field=GF(3))) True sage: M = matroids.Wheel(3, field=GF(3)); M Wheel(3): Ternary matroid of rank 3 on 6 elements, type 0+
>>> from sage.all import * >>> M = matroids.Wheel(Integer(5)); M Wheel(5): Regular matroid of rank 5 on 10 elements with 121 bases >>> M.tutte_polynomial() x^5 + y^5 + 5*x^4 + 5*x^3*y + 5*x^2*y^2 + 5*x*y^3 + 5*y^4 + 10*x^3 + 15*x^2*y + 15*x*y^2 + 10*y^3 + 10*x^2 + 16*x*y + 10*y^2 + 4*x + 4*y >>> M.is_valid() True >>> M = matroids.Wheel(Integer(3)) >>> M.is_isomorphic(matroids.CompleteGraphic(Integer(4))) True >>> M.is_isomorphic(matroids.Wheel(Integer(3), field=GF(Integer(3)))) True >>> M = matroids.Wheel(Integer(3), field=GF(Integer(3))); M Wheel(3): Ternary matroid of rank 3 on 6 elements, type 0+
For \(r \ge 2\), the wheel is self-dual but not identically self-dual, and for \(r \ge 4\) it has a non-transitive automorphism group:
sage: import random sage: r = random.choice(range(4, 8)) sage: M = matroids.Wheel(r) sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> import random >>> r = random.choice(range(Integer(4), Integer(8))) >>> M = matroids.Wheel(r) >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 659-60.
- sage.matroids.database_matroids.Wheel4(groundset='abcdefgh')[source]#
Return the rank-\(4\) wheel.
A regular, graphic, and cographic matroid. Self-dual but not identically self-dual.
EXAMPLES:
sage: M = matroids.catalog.Wheel4(); M Wheel(4): Regular matroid of rank 4 on 8 elements with 45 bases sage: M.is_valid() and M.is_graphic() and M.dual().is_graphic() True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.Wheel4(); M Wheel(4): Regular matroid of rank 4 on 8 elements with 45 bases >>> M.is_valid() and M.is_graphic() and M.dual().is_graphic() True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 651-2.
- sage.matroids.database_matroids.Whirl(r, groundset=None)[source]#
Return the rank-\(r\) whirl.
The whirl is the unique relaxation of the wheel.
INPUT:
r
– a positive integer; the rank of the desired matroid.groundset
– a string (optional); the groundset of the matroid
OUTPUT: the rank-\(r\) whirl matroid, represented as a ternary matroid
EXAMPLES:
sage: M = matroids.Whirl(5); M Whirl(5): Ternary matroid of rank 5 on 10 elements, type 0- sage: M.is_valid() True sage: M.tutte_polynomial() x^5 + y^5 + 5*x^4 + 5*x^3*y + 5*x^2*y^2 + 5*x*y^3 + 5*y^4 + 10*x^3 + 15*x^2*y + 15*x*y^2 + 10*y^3 + 10*x^2 + 15*x*y + 10*y^2 + 5*x + 5*y sage: M.is_isomorphic(matroids.Wheel(5)) False sage: M = matroids.Whirl(3) sage: M.is_isomorphic(matroids.CompleteGraphic(4)) False
>>> from sage.all import * >>> M = matroids.Whirl(Integer(5)); M Whirl(5): Ternary matroid of rank 5 on 10 elements, type 0- >>> M.is_valid() True >>> M.tutte_polynomial() x^5 + y^5 + 5*x^4 + 5*x^3*y + 5*x^2*y^2 + 5*x*y^3 + 5*y^4 + 10*x^3 + 15*x^2*y + 15*x*y^2 + 10*y^3 + 10*x^2 + 15*x*y + 10*y^2 + 5*x + 5*y >>> M.is_isomorphic(matroids.Wheel(Integer(5))) False >>> M = matroids.Whirl(Integer(3)) >>> M.is_isomorphic(matroids.CompleteGraphic(Integer(4))) False
For \(r \ge 3\), the whirl is self-dual but not identically self-dual:
sage: import random sage: r = random.choice(range(3, 10)) sage: M = matroids.Whirl(r) sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
>>> from sage.all import * >>> import random >>> r = random.choice(range(Integer(3), Integer(10))) >>> M = matroids.Whirl(r) >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True
Except for \(\mathcal{W}^2\), which is isomorphic to \(U_{2, 4}\), these matroids have non-transitive automorphism groups:
sage: r = random.choice(range(3, 8)) sage: M = matroids.Whirl(r) sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> r = random.choice(range(Integer(3), Integer(8))) >>> M = matroids.Whirl(r) >>> M.automorphism_group().is_transitive() False
Todo
Optional arguments
ring
andx
, such that the resulting matroid is represented overring
by a reduced matrix like[-1 0 x]
[ 1 -1 0]
[ 0 1 -1]
REFERENCES:
[Oxl2011], p. 659-60.
- sage.matroids.database_matroids.Whirl3(groundset='abcdef')[source]#
The rank-\(3\) whirl.
The unique relaxation of \(M(K_4)\). Self-dual but not identically self-dual.
EXAMPLES:
sage: W = matroids.catalog.Whirl3(); W Whirl(3): Ternary matroid of rank 3 on 6 elements, type 0- sage: W.equals(W.dual()) False sage: W.is_isomorphic(W.dual()) True sage: W.automorphism_group().is_transitive() False
>>> from sage.all import * >>> W = matroids.catalog.Whirl3(); W Whirl(3): Ternary matroid of rank 3 on 6 elements, type 0- >>> W.equals(W.dual()) False >>> W.is_isomorphic(W.dual()) True >>> W.automorphism_group().is_transitive() False
For all elements \(e\), neither \(\mathcal{W}_3 \setminus \{e\}\) nor \(\mathcal{W}_3 / \{e\}\) is \(3\)-connected:
sage: import random sage: e = random.choice(list(W.groundset())) sage: W.delete(e).is_3connected() False sage: W.contract(e).is_3connected() False
>>> from sage.all import * >>> import random >>> e = random.choice(list(W.groundset())) >>> W.delete(e).is_3connected() False >>> W.contract(e).is_3connected() False
REFERENCES:
[Oxl2011], p. 641.
- sage.matroids.database_matroids.Whirl4(groundset='abcdefgh')[source]#
Return the rank-\(4\) whirl.
A matroid which is not graphic, not cographic, and not regular. Self-dual but not identically self-dual.
EXAMPLES:
sage: M = matroids.catalog.Whirl4(); M Whirl(4): Ternary matroid of rank 4 on 8 elements, type 0+ sage: M.is_valid() True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True sage: M.automorphism_group().is_transitive() False
>>> from sage.all import * >>> M = matroids.catalog.Whirl4(); M Whirl(4): Ternary matroid of rank 4 on 8 elements, type 0+ >>> M.is_valid() True >>> M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True >>> M.automorphism_group().is_transitive() False
REFERENCES:
[Oxl2011], p. 652.
- sage.matroids.database_matroids.XY13(groundset=None)[source]#
Return the matroid \(XY13\).
An excluded minor for \(G\)-representable matroids (and \(GF(5)\)-representable matroids). UPF is \(GF(4)\).
EXAMPLES:
sage: M = matroids.catalog.XY13(); M XY13: Quaternary matroid of rank 6 on 13 elements sage: M.is_3connected() True
>>> from sage.all import * >>> M = matroids.catalog.XY13(); M XY13: Quaternary matroid of rank 6 on 13 elements >>> M.is_3connected() True
- sage.matroids.database_matroids.Z(r, t=True, groundset=None)[source]#
Return the unique rank-\(r\) binary spike.
Defined for all \(r \ge 3\).
INPUT:
r
– an integer (\(r \ge 3\)); the rank of the spiket
– boolean (default:True
); whether the spike is tippedgroundset
– a string (optional); the groundset of the matroid
OUTPUT: matroid; the unique rank-\(r\) binary spike (tipped or tipless)
EXAMPLES:
sage: matroids.Z(8) Z_8: Binary matroid of rank 8 on 17 elements, type (7, 1) sage: matroids.Z(9) Z_9: Binary matroid of rank 9 on 19 elements, type (9, None) sage: matroids.Z(20, False) Z_20\t: Binary matroid of rank 20 on 40 elements, type (20, 0)
>>> from sage.all import * >>> matroids.Z(Integer(8)) Z_8: Binary matroid of rank 8 on 17 elements, type (7, 1) >>> matroids.Z(Integer(9)) Z_9: Binary matroid of rank 9 on 19 elements, type (9, None) >>> matroids.Z(Integer(20), False) Z_20\t: Binary matroid of rank 20 on 40 elements, type (20, 0)
It holds that \(Z_3 \setminus e \cong M(K4)\), for all \(e\):
sage: import random sage: Z3 = matroids.Z(3) sage: E = sorted(Z3.groundset()); E ['t', 'x1', 'x2', 'x3', 'y1', 'y2', 'y3'] sage: e = random.choice(E) sage: Z3.delete(e).is_isomorphic(matroids.catalog.K4()) True
>>> from sage.all import * >>> import random >>> Z3 = matroids.Z(Integer(3)) >>> E = sorted(Z3.groundset()); E ['t', 'x1', 'x2', 'x3', 'y1', 'y2', 'y3'] >>> e = random.choice(E) >>> Z3.delete(e).is_isomorphic(matroids.catalog.K4()) True
\(Z_3 \cong F_7\):
sage: F7 = matroids.catalog.Fano() sage: Z3.is_isomorphic(F7) True
>>> from sage.all import * >>> F7 = matroids.catalog.Fano() >>> Z3.is_isomorphic(F7) True
\(Z_4 \setminus t \cong AG(3, 2)\):
sage: Z4 = matroids.Z(4, False) sage: Z4.is_isomorphic(matroids.catalog.AG32()) True
>>> from sage.all import * >>> Z4 = matroids.Z(Integer(4), False) >>> Z4.is_isomorphic(matroids.catalog.AG32()) True
and \(Z_4 \setminus e \cong S_8\), for all \(e \neq t\):
sage: Z4 = matroids.Z(4) sage: E = sorted(Z4.groundset()) sage: E.remove('t') sage: e = random.choice(E) sage: S8 = matroids.catalog.S8() sage: Z4.delete(e).is_isomorphic(S8) True sage: Z4.delete('t').is_isomorphic(S8) False
>>> from sage.all import * >>> Z4 = matroids.Z(Integer(4)) >>> E = sorted(Z4.groundset()) >>> E.remove('t') >>> e = random.choice(E) >>> S8 = matroids.catalog.S8() >>> Z4.delete(e).is_isomorphic(S8) True >>> Z4.delete('t').is_isomorphic(S8) False
The tipless binary spike is self-dual; it is identically self-dual if and only if r is even. It also has a transitive automorphism group:
sage: r = random.choice(range(3, 8)) sage: Z = matroids.Z(r, False) sage: Z.is_isomorphic(Z.dual()) True sage: Z.equals(Z.dual()) != (r % 2 == 1) # XOR True sage: Z.automorphism_group().is_transitive() # long time True
>>> from sage.all import * >>> r = random.choice(range(Integer(3), Integer(8))) >>> Z = matroids.Z(r, False) >>> Z.is_isomorphic(Z.dual()) True >>> Z.equals(Z.dual()) != (r % Integer(2) == Integer(1)) # XOR True >>> Z.automorphism_group().is_transitive() # long time True
REFERENCES:
[Oxl2011], p. 661-2.