Matroid - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Matroids

  

Matroid

  

construct a matroid

 

Calling Sequence

Parameters

Description

Constructing a matroid from another mathematical object

Constructing a matroid directly

Constructing a matroid from a gallery of examples

Examples

References

Calling Sequence

Matroid(A)

Matroid(A,p)

Matroid(G)

Matroid(G,gsopt)

Matroid(I)

Matroid(E,opts)

Parameters

A

-

Matrix

p

-

prime number

G

-

graph

gsopt

-

(optional) equation of the form groundset=g, where g is one of the names strings, names, or integers, or a function of the form assigntox, where x is a variable name

I

-

a polynomial ideal

E

-

a list containing the elements of the ground set of a matroid

opts

-

one or more equations of the form independentsets=s, bases=s, dependentsets=s, circuits=s, rankfunction=f, flats=s, hyperplanes=s, where s is a list of subsets of E and f is a function mapping subsets of E to nonnegative integers

Description

• 

A matroid is an object which encodes independence structure on a set E. Familiar examples include linear independence, or algebraic independence. Every matroid has a collection Ind of subsets of E which are called independent sets. These subsets must satisfy several axioms (see Matroid from Independent Sets). Given Ind, we have the following definitions:

– 

Bases : a subset of E is a basis if it is a maximal independent set.

– 

Dependent Sets : a subset of E is a dependent set if it is not an independent set.

– 

Circuits : a subset of E is a circuit if it is a minimal dependent set.

– 

Rank : a subset of E has rank equal to the size of its largest independent subset.

– 

Flats : a subset of E is a flat if it is inclusionwise maximal among sets with the same rank.

– 

Hyperplanes : a subset of E is a hyperplane if it is a flat of rank one less than the rank of the matroid.

• 

The information encoded in any of the above properties of a matroid defines the matroid. To construct a matroid explicitly from this information, certain axioms must hold, as detailed in the sections below. Alternatively, one may construct a matroid from a collection of other mathematical objects - in these cases, the axioms always hold.

Constructing a matroid from another mathematical object

• 

Currently, there are three mathematical objects from which you can directly construct a matroid.

Representable (or linear) matroids - Matroids from matrices

• 

Given a matrix A with n columns, the ground set E of its matroid is the set,{1,2,..,n}, of indices of the columns. The independent sets are those subsets of E which index independent columns. If p is given, independence is considered modulo p.

Graphic matroids - Matroids from graphs

• 

Given a graph G, let M be the matroid defined by G. Then the ground set of M is the set E of edges of G, and its dependent sets are those subsets of E which contain a cycle.

• 

How exactly the ground set of M is represented is controlled by the groundset option:

– 

If groundset=strings (the default), then the ground set consists of strings. The string for an edge is obtained by joining its two vertices by an underscore. A self-loop on a vertex a is represented by the string a_a. If two edges have the same string representation, an error is raised.

– 

If groundset=names, then the ground set consists of variable names. The names are constructed in the same way as with groundset=strings. If two edges have the same name representation, an error is raised.

– 

If groundset=integers and there are n edges in G, the edges are assigned the numbers 1,2,,n. The order of the edges is determined by Maple's set ordering, which does not necessarily correspond to the order in which the edges were specified when constructing G.

– 

If groundset=assigntox, the ground set is determined the same way as with groundset=integers, and the list of edges is assigned to the variable x. If x is already assigned a value prior to constructing the matroid, you will need to quote it to prevent evaluation, like groundset=assigntox.

Algebraic matroids - Matroids from ideals

• 

Given an ideal I in a polynomial ring with n variables, the ground set E of its matroid is the set 1,2,n,.. of indices of the variables. The ideal I defines a variety V as its zero set, and the bases are those subsets of variables such that the projection of V onto those variables is finite-to-one and dominant.

Constructing a matroid directly

• 

To define a matroid directly, you provides a ground set, E, and one or more of the independent sets, bases, dependent sets, circuits, rank, flats, and hyperplanes. If you provide the rank function, you specify it as a procedure r that maps a subset of E to a nonnegative integer. The other items are provided as a list s of subsets of E.

• 

If you know more than one way to define the same matroid, you can provide them all. This may allow Maple to more efficiently do subsequent computations.

• 

For each direct construction of a matroid, certain axioms on s (or r) must hold; a different set of axioms for each of the types of information you can provide. For completeness, we give these axioms below. See [OXL] for more details.

• 

Warning: Currently, the Matroid constructor does not validate these axioms. It is the responsibility of the user to verify that the input is valid, and that, if more than one item is provided, they define the same matroid.

Constructing a matroid from independent sets

• 

A matroid is a pair M=E,I where E is the ground set and I is a collection of subsets of E called independent sets. The set I must satisfy the following three axioms:

• 

(I1) The empty set is an independent set.

• 

(I2) Every subset of an independent set is an independent set.

• 

(I3) If I1 and I2 are independent sets and I1 has more elements than I2, then there exists an element a of I1 which when added to I2, results in an independent set.

Constructing a matroid from bases

• 

A matroid is a pair M=E,B where E is the ground set and B is a collection of subsets of E called bases.  The set B must satisfy two axioms to define a matroid:

• 

(B1) B is non-empty.

• 

(B2) If B1 and B2 are bases, and a is an element in B1 but not B2, then there exists b in B2 so that replacing a with b in B1 produces a basis.

Constructing a matroid from dependent sets

• 

A matroid is a pair M=E,D where E is the ground set and D is a collection of subsets of E called dependent sets. The complement of D in the power set of E must form a collection I of subsets which satisfy the independent set axioms.

Constructing a matroid from circuits

• 

A matroid is a pair M=E,C where E is the ground set and C is a collection of subsets of E called circuits. The set C must satisfy the following three axioms:

• 

(C1) The empty set is not a circuit.

• 

(C2) If C1 and C2 are circuits and C1 is contained in C2, then C1 is equal to C2.

• 

(C3) If C1 and C2 are distinct circuits and e is an element of their intersection, then there is a circuit C3 contained in the union of C1 and C2 which does not contain e.

Constructing a matroid from a rank function

• 

A matroid is a pair M=E,r where E is the ground set and r is a function from the power set of E to the non-negative integers. The function r must satisfy the following axioms:

• 

(R1) For all S1,S2E, if S1S2 then rS1rS2.

• 

(R2) For all S1,S2E, we have rS1S2+rS1S2rS1+rS2.

• 

(R3) For all S1E and aE, we have rS1rS1arS1+1.

Constructing a matroid from flats

• 

A matroid is a pair M=E,F where E is the ground set and F is a collection of subsets of E called flats. The set F must satisfy the following axioms:

• 

(F1) E is a flat.

• 

(F2) The intersection of two flats is a flat.

• 

(F3) If F1 is a flat, then every element in its complement belongs to exactly one flat which minimally and properly contains F1 (i.e. to exactly one flat which covers F1).

Constructing a matroid from hyperplanes

• 

A matroid is a pair M=E,H where E is the ground set and H is a collection of subsets of E called hyperplanes. The set H must satisfy the following axioms:

• 

(H1) For any hyperplane H1, the only hyperplane contained in H1 is itself.

• 

(H2) Given two distinct hyperplanes H1 and H2 and an element a of the ground set not contained in their union, there exists a hyperplane H3 containing a and the intersection of H1 and H2.

Constructing a matroid from a gallery of examples

• 

A gallery of example matroids can be loaded using the command with(ExampleMatroids).

Examples

withMatroids:

withGraphTheory:

withPolynomialIdeals:

withExampleMatroids:

Create a matroid from a matrix.

AMatrix1,1,1,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,2

A111000000111100100010010001002

(1)

MMatroidA

Mthⅇ lⅈnⅇar matroⅈⅆ whosⅇ grounⅆ sⅇt ⅈs thⅇ sⅇt of column vⅇctors of thⅇ matrⅈx:111000000111100100010010001002

(2)

BBasesM

B1,2,3,4,6,1,2,3,5,6,1,3,4,5,6,2,3,4,5,6

(3)

The matroid of a matrix may differ depending on if independence is considered modulo a prime.

AMatrix1,1,0,1,1,0,1,1,1

A1−10110111

(4)

BasesMatroidA

1,2,3

(5)

BasesMatroidA,2

1,3,2,3

(6)

Create a matroid from a graph.

GGrapha,x,a,y,b,x,b,y,c,x,c,y

GGraph 1: an undirected graph with 5 vertices and 6 edge(s)

(7)

DrawGraphG

MMatroidG

Mthⅇ graphⅈc matroⅈⅆ on thⅇ graph:PLOT...

(8)

CCircuitsM

Ca_x,a_y,b_x,b_y,a_x,a_y,c_x,c_y,b_x,b_y,c_x,c_y

(9)

Create a matroid from an ideal.

Jx2y,xzy2,xyz

Jx2y,xzy2,xyz

(10)

MMatroidJ

Mthⅇ algⅇbraⅈc matroⅈⅆ on thⅇ polynomⅈal ⅈⅆⅇal:x2y,xzy2,xyz

(11)

BasesM

1,2,3

(12)

Create a matroid directly from bases.

MMatroid1,2,3,bases=1,2,1,3,2,3

Mthⅇ unⅈform matroⅈⅆ of rank 2 on 3 ⅇlⅇmⅇnts

(13)

If you know more than one way to define the same matroid, you can provide them all. This may allow Maple to more efficiently do subsequent computations. For example, if you know the circuits of this same matroid (it has only one), you can provide them as follows.

MMatroid1,2,3,bases=1,2,1,3,2,3,circuits=1,2,3

Mthⅇ unⅈform matroⅈⅆ of rank 2 on 3 ⅇlⅇmⅇnts

(14)

References

  

James G. Oxley. Matroid Theory (Oxford Graduate Texts in Mathematics). New York: Oxford University Press. 2006.

See Also

Matroids[AreIsomorphic]

Matroids[Bases]

Matroids[CharacteristicPolynomial]

Matroids[Circuits]

Matroids[Contraction]

Matroids[Deletion]

Matroids[DependentSets]

Matroids[Dual]

Matroids[ExampleMatroids]

Matroids[Flats]

Matroids[GroundSet]

Matroids[Hyperplanes]

Matroids[IndependentSets]

Matroids[IsMinorOf]

Matroids[Rank]

Matroids[SetDisplayStyle]

Matroids[TuttePolynomial]