Macaulay2 » Documentation
Packages » Graphs :: edgeIdeal
next | previous | forward | backward | up | index | toc

# edgeIdeal -- returns the edge ideal of a graph

- Usage:
    `I = edgeIdeal G`
- Inputs:
  - G, a graph,
- Outputs:
  - I, an ideal, the edge ideal of a graph G

## Description

The edge ideal of a graph G is the ideal generated by the minimal nonfaces of the independence complex of G.

    i1 : G = graph({{1, 2}, {1, 3}, {2, 3}, {3, 4}},EntryMode=>"edges");

    i2 : edgeIdeal G

    o2 = monomialIdeal (x x , x x , x x , x x )
                         1 2   1 3   2 3   3 4

    o2 : MonomialIdeal of QQ[x ..x ]
                              1   4

## See also

- coverIdeal -- Returns the vertex cover ideal of a graph
- independenceComplex -- constructs the independence complex of a graph

## Ways to use edgeIdeal:

- `edgeIdeal(Graph)`

## For the programmer

The object edgeIdeal is a method function.

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