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

# isCM -- determines if a graph is Cohen-Macaulay

- Usage:
    `c = isCM G`
- Inputs:
  - G, a graph,
- Outputs:
  - c, a Boolean value, whether the graph is Cohen-Macaulay

## Description

This uses the edge ideal notion of Cohen-Macaulayness; a graph is called C-M if and only if its edge ideal is C-M.

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

    i2 : isCM G

    o2 = true

## See also

- edgeIdeal -- returns the edge ideal of a graph

## Ways to use isCM:

- `isCM(Graph)`

## For the programmer

The object isCM is a method function.

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