application: matroid

Matroids encode the concept of "(in)dependence" in an abstract way. You can define matroids via vector configurations or graphs, do basic conversions between different descriptions and perform basic operations such as deletions and contractions.


imports from: common, graph
uses: polytope, topaz, tropical

Objects

User Functions

  •  
  •  
    matroid_test (bases)

    Tests whether the given bases do actually form the bases of a matroid.

    Parameters
    Array<Set<Int>>bases
    Options
    Boolprint
    if set to true the output tells which condition fails; default value is 0
  •  
    tropical_matroid_polytope (m, v) → tropical::TropicalPolytope

    Produce the tropical matroid polytope from a matroid m. Each vertex corresponds to a basis of the matroid, the non-bases coordinates get value 0, the bases coordinates gets value v, default is -1.

    Parameters
    Matroidm
    Rationalv
    value for the bases
    Returns
    tropical::TropicalPolytope
  •  
    contraction (m, element) → Matroid

    The matroid obtained from a matroid m by contraction of element .

    Parameters
    Matroidm
    Intelement
    index of element to be contracted
    Returns
    Matroid
  •  
  •  
    deletion (m, element) → Matroid

    The matroid obtained from a matroid m by deletion of element .

    Parameters
    Matroidm
    Intelement
    index of element to be deleted
    Returns
    Matroid
  •  
    dual (m) → Matroid

    Produces the dual of a given matroid m.

    Parameters
    Matroidm
    Returns
    Matroid
  •  
  •  
    matroid_from_graph (g) → Matroid

    Creates a graphical matroid from a graph g.

    Parameters
    graph::Graphg
    Returns
    Matroid
  •  
    matroid_from_matroid_polytope (p) → Matroid

    Creates a matroid from the corresponding matroid polytope p.

    Parameters
    polytope::Polytopep
    Returns
    Matroid
  •  
    uniform_matroid (r, n) → Matroid

    Creates the uniform matroid of rank r with n elements.

    Parameters
    Intr
    Intn
    Returns
    Matroid