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

vertexCovers -- returns a list of the minimal vertex covers of a graph



A vertex cover of G is a set of vertexSet which intersects with every edge of G. In other words, L is a vertex cover of a graph if and only if their does not exist an edge {u,v} such that both u and v are not in L.

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

o2 = {{1, 2}, {1, 3}, {2, 3, 4}}

o2 : List

See also

Ways to use vertexCovers :

For the programmer

The object vertexCovers is a method function.