Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 1872

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>vertexCovers -- list the minimal vertex covers of a (hyper)graph</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_vertices.html">next</a> | <a href="_vertex__Cover__Number.html">previous</a> | <a href="_vertices.html">forward</a> | <a href="_vertex__Cover__Number.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>vertexCovers -- list the minimal vertex covers of a (hyper)graph</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>c = vertexCovers(H)</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>H</tt>, <span>a <a href="___Hyper__Graph.html">hypergraph</a></span>, the input</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><tt>c</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, of the minimal vertex covers of <tt>H</tt>.  The vertex covers are represented as monomials.</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><div>This function returns the minimal vertex covers of a (hyper)graph. A vertex cover is a subset of the vertices such that every edge of the (hyper)graph has non-empty intersection with this set.  The minimal vertex covers are given by the minimal generators of the cover ideal of <tt>H</tt>.</div>
<table class="examples"><tr><td><pre>i1 : S = QQ[a..d];</pre>
</td></tr>
<tr><td><pre>i2 : g = graph {a*b,b*c,c*d,d*a} -- the four cycle

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

o2 : Graph</pre>
</td></tr>
<tr><td><pre>i3 : vertexCovers g

o3 = {a*c, b*d}

o3 : List</pre>
</td></tr>
<tr><td><pre>i4 : coverIdeal g

o4 = monomialIdeal (a*c, b*d)

o4 : MonomialIdeal of S</pre>
</td></tr>
<tr><td><pre>i5 : flatten entries gens coverIdeal g == vertexCovers g

o5 = true</pre>
</td></tr>
<tr><td><pre>i6 : S = QQ[a..e];</pre>
</td></tr>
<tr><td><pre>i7 : h = hyperGraph {a*b*c,a*d,c*e,b*d*e}

o7 = HyperGraph{edges => {{a, b, c}, {a, d}, {c, e}, {b, d, e}}}
                ring => S
                vertices => {a, b, c, d, e}

o7 : HyperGraph</pre>
</td></tr>
<tr><td><pre>i8 : vertexCovers(h)

o8 = {a*b*c, c*d, a*e, b*d*e}

o8 : List</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_cover__Ideal.html" title="creates the cover ideal of a (hyper)graph">coverIdeal</a> -- creates the cover ideal of a (hyper)graph</span></li>
<li><span><a href="_vertex__Cover__Number.html" title="find the vertex covering number of a (hyper)graph">vertexCoverNumber</a> -- find the vertex covering number of a (hyper)graph</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>vertexCovers</tt> :</h2>
<ul><li>vertexCovers(HyperGraph)</li>
</ul>
</div>
</div>
</body>
</html>