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

# Online Help

###### All Products    Maple    MapleSim

Matroids

 Rank
 return the rank of a matroid, or a rank of a subset of its ground set

 Calling Sequence Rank(M) Rank(M,S)

Parameters

 M - S - set describing a subset of the ground set of $M$.

Description

 • The rank of a matroid is the cardinality of a maximal independent subset of its ground set. Equivalently, the rank of a matroid is the size of each of its bases.
 • The rank of a subset $S$ of the ground set $E$ of a matroid is the cardinality of a maximal independent subset of $S$.

Examples

 > $\mathrm{with}\left(\mathrm{Matroids}\right):$

Define a matroid via the column space of a matrix and determine the ranks of several subsets of the columns.

 > $A≔\mathrm{Matrix}\left(\left[\left[1,1,0,0\right],\left[-1,0,1,0\right],\left[0,-1,-1,0\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cccc}{1}& {1}& {0}& {0}\\ {-1}& {0}& {1}& {0}\\ {0}& {-1}& {-1}& {0}\end{array}\right]$ (1)
 > $M≔\mathrm{Matroid}\left(A\right)$
 ${M}{≔}⟨\begin{array}{c}{thⅇ linⅇar matroiⅆ whosⅇ grounⅆ sⅇt is thⅇ sⅇt of column vⅇctors of thⅇ matrix:}\\ \left[\begin{array}{cccc}{1}& {1}& {0}& {0}\\ {-1}& {0}& {1}& {0}\\ {0}& {-1}& {-1}& {0}\end{array}\right]\end{array}⟩$ (2)
 > $r≔\mathrm{Rank}\left(M\right)$
 ${r}{≔}{2}$ (3)
 > $\mathrm{r14}≔\mathrm{Rank}\left(M,\left\{1,4\right\}\right)$
 ${\mathrm{r14}}{≔}{1}$ (4)
 > $\mathrm{r4}≔\mathrm{Rank}\left(M,\left\{4\right\}\right)$
 ${\mathrm{r4}}{≔}{0}$ (5)
 > $\mathrm{r1234}≔\mathrm{Rank}\left(M,\mathrm{convert}\left(\mathrm{GroundSet}\left(M\right),\mathrm{set}\right)\right)$
 ${\mathrm{r1234}}{≔}{2}$ (6)

References

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

 See Also