# relabel -- relabel a matroid

## Synopsis

• Usage:
relabel(M, H)
relabel(M, L)
relabel M
• Inputs:
• M, ,
• H, ,
• L, a list,
• Outputs:
• , a matroid isomorphic to M

## Description

This method yields another matroid isomorphic to the input matroid M with labels specified by a hash table, or list of options. The keys of the hash table should be (a subset of) $\{0, ..., n-1\}$ where n is the number of elements in the groundSet of M. Since any unused elements are assumed to remain unchanged, the set of values should coincide with the set of keys.

Alternatively, the images of $\{0, ..., n-1\}$ (in order) can be specified (as a list, whose elements are not options). If neither a list nor hash table is provided, then a random permutation is chosen.

 i1 : Q6 = specificMatroid "Q6" o1 = a matroid of rank 3 on 6 elements o1 : Matroid i2 : M = relabel_Q6 {3 => 0, 0 => 3} o2 = a matroid of rank 3 on 6 elements o2 : Matroid i3 : (nonbases Q6, nonbases M) o3 = ({set {0, 1, 2}, set {0, 3, 4}}, {set {1, 2, 3}, set {0, 3, 4}}) o3 : Sequence i4 : (M == Q6, areIsomorphic(M, Q6)) o4 = (false, true) o4 : Sequence i5 : nonbases relabel Q6 o5 = {set {0, 3, 5}, set {1, 4, 5}} o5 : List