Macaulay2 » Documentation
Packages » EdgeIdeals :: getMaxCliques
next | previous | forward | backward | up | index | toc

getMaxCliques -- returns maximal cliques in a graph



This function returns all cliques of maximal size in a graph as a list of lists. For more details, see getCliques.

i1 : R = QQ[a..d];
i2 : G = completeGraph R

o2 = Graph{"edges" => {{a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}}}
           "ring" => R
           "vertices" => {a, b, c, d}

o2 : Graph
i3 : getMaxCliques G

o3 = {{a, b, c, d}}

o3 : List
i4 : H = graph({a*b,b*c,a*c,c*d,b*d})

o4 = Graph{"edges" => {{a, b}, {a, c}, {b, c}, {b, d}, {c, d}}}
           "ring" => R
           "vertices" => {a, b, c, d}

o4 : Graph
i5 : getMaxCliques H

o5 = {{a, b, c}, {b, c, d}}

o5 : List

See also

Ways to use getMaxCliques :

For the programmer

The object getMaxCliques is a method function.