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

# searchRepresentation -- search for a representation of a matroid over a finite field

- Usage:
    `searchRepresentation(M, k)`
- Inputs:
  - M, a matroid,
  - k, a Galois field,
- Optional inputs:
  - Attempts => ..., default value 1000
- Outputs:
  - a matrix, a purported representation of M

## Description

This function performs a brute-force search for a representation of a matroid, over a given finite field (essentially repeatedly testing random candidates until one is found).

The maximum number of attempts is specified by the optional argument Attempts (default 1000).

Over GF(2), this function is guaranteed to (quickly) find a representation, if one exists. (Over larger finite fields, there is no such guarantee.)

    i1 : searchRepresentation(uniformMatroid(2, 4), GF 2)

    i2 : searchRepresentation(matroid completeGraph 5, GF 3, Attempts => 2000)

    o2 = | 1 1 1 1 0  0  0 0  0 0 |
         | 1 0 0 0 1  1  1 0  0 0 |
         | 0 1 0 0 -1 0  0 1  1 0 |
         | 0 0 1 0 0  -1 0 -1 0 1 |

                      4           10
    o2 : Matrix (GF 3)  <-- (GF 3)

## See also

- setRepresentation -- stores user-defined representation
- getRepresentation -- retrieves stored representation

## Ways to use searchRepresentation:

- `searchRepresentation(Matroid,GaloisField)`

## For the programmer

The object searchRepresentation is a method function with options.

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