Macaulay2 » Documentation
Packages » RandomIdeals :: randomBinomialEdgeIdeal
next | previous | forward | backward | up | index | toc

# randomBinomialEdgeIdeal -- Creates a binomial edge ideal from a random graph with n vertices and t edges.

- Usage:
    `(I,G) = randomBinomialEdgeIdeal(n,t)`
- Inputs:
  - n, an integer, number of vertices
  - t, an integer, number of edges
- Outputs:
  - I, an ideal, a random binomial edge ideal
  - G, a graph, the graph underlying I

## Description

The binomial edge ideal associated to a graph G is the quadratic binomial ideal generated by the set containing x_v*y_w-x_w-y_v for every edge (v,w) in G. This method returns the binomial edge ideal I of a random graph G which has n vertices and t edges.

    i1 : randomBinomialEdgeIdeal(7, 4)

    o1 = (ideal (- x y  + x y , - x y  + x y , x y  - x y , x y  - x y ),
                    3 4    4 3     3 5    5 3   4 1    1 4   6 7    7 6

         ------------------------------------------------------------------------
         Graph{"edges" => {{x , x }, {x , x }, {x , x }, {x , x }}})
                             3   4     1   4     6   7     3   5
               "ring" => QQ[x ..x ]
                             1   7
               "vertices" => {x , x , x , x , x , x , x }
                               1   2   3   4   5   6   7

    o1 : Sequence

## See also

- randomGraph -- returns a random graph
- binomialEdgeIdeal -- Binomial edge ideals
- randomToricEdgeIdeal -- Creates a toric edge ideal from a random graph with n vertices and t edges.

## Ways to use randomBinomialEdgeIdeal:

- `randomBinomialEdgeIdeal(ZZ,ZZ)`

## For the programmer

The object randomBinomialEdgeIdeal is a method function.

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