Macaulay2 » Documentation
Packages » Matroids :: uniformMatroid
next | previous | forward | backward | up | index | toc

# uniformMatroid -- uniform matroid

- Usage:
    `U = uniformMatroid(k, n)`
- Inputs:
  - k, an integer,
  - n, an integer,
- Outputs:
  - a matroid, the uniform matroid of rank k on n elements

## Description

The uniform matroid of rank k has as bases all size k subsets. The ground set is $\{0, ..., n-1\}$.

    i1 : U35 = uniformMatroid(3,5)

    o1 = a "matroid" of rank 3 on 5 elements

    o1 : Matroid

    i2 : peek U35

    o2 = Matroid{bases => {set {0, 1, 2}, set {0, 1, 3}, set {0, 2, 3}, set {1, 2, 3}, set {4, 0, 1}, set {4, 0, 2}, set {4, 1, 2}, set {4, 0, 3}, set {4, 1, 3}, set {4, 2, 3}}}
                 cache => CacheTable{...1...}
                 groundSet => set {0, 1, 2, 3, 4}
                 rank => 3

## See also

- specificMatroid -- creates built-in matroid

## Ways to use uniformMatroid:

- `uniformMatroid(ZZ,ZZ)`

## For the programmer

The object uniformMatroid is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Matroids/doc-Matroids.m2:3093:0.