Sophie

Sophie

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

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>connectedComponents -- returns the connected components of a hypergraph</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_connected__Graph__Components.html">next</a> | <a href="___Connected_sp__Components_sp__Tutorial.html">previous</a> | <a href="_connected__Graph__Components.html">forward</a> | <a href="___Connected_sp__Components_sp__Tutorial.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>connectedComponents -- returns the connected components of a hypergraph</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>L = connectedComponents 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></span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><tt>L</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, of lists of vertices. Each list of vertices is a connected component of H.</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>This function returns the connected components of a hypergraph. A connected component of a hypergraph is any maximal set of vertices which are pairwise connected by a non-trivial path. Isolated vertices, which are those not appearing in any edge, do not appear in any connected components. This is in contrast to <a href="_connected__Graph__Components.html" title="returns the connected components of a graph">connectedGraphComponents</a> in which isolated vertices form their own connected components. See the <a href="___Connected_sp__Components_sp__Tutorial.html" title="clarifying the difference between graph and hypergraph components">Connected Components Tutorial</a> for more information.</p>
<div/>
<table class="examples"><tr><td><pre>i1 : R = QQ[a..l];</pre>
</td></tr>
<tr><td><pre>i2 : H = hyperGraph {a*b*c, c*d, d*e*f, h*i, i*j, l}

o2 = HyperGraph{edges => {{a, b, c}, {c, d}, {d, e, f}, {h, i}, {i, j}, {l}}}
                ring => R
                vertices => {a, b, c, d, e, f, g, h, i, j, k, l}

o2 : HyperGraph</pre>
</td></tr>
<tr><td><pre>i3 : L = connectedComponents H

o3 = {{a, b, c, d, e, f}, {h, i, j}, {l}}

o3 : List</pre>
</td></tr>
<tr><td><pre>i4 : apply(L, C -> inducedHyperGraph(H,C))

o4 = {HyperGraph{edges => {{a, b, c}, {c, d}, {d, e, f}}},
                 ring => QQ[a, b, c, d, e, f]             
                 vertices => {a, b, c, d, e, f}           
     ------------------------------------------------------------------------
     HyperGraph{edges => {{h, i}, {i, j}}}, HyperGraph{edges => {{l}} }}
                ring => QQ[h, i, j]                    ring => QQ[l]
                vertices => {h, i, j}                  vertices => {l}

o4 : List</pre>
</td></tr>
</table>
<p>In the following example, hypergraph <tt>H</tt> contains the isolated vertex <tt>d</tt> and the vertex <tt>c</tt> which is in an edge of size one. Notice that <tt>d</tt> does not appear in any connected component while <tt>c</tt> does.</p>
<div/>
<table class="examples"><tr><td><pre>i5 : R = QQ[a,b,c,d];</pre>
</td></tr>
<tr><td><pre>i6 : H = hyperGraph {a*b, c}

o6 = HyperGraph{edges => {{a, b}, {c}}  }
                ring => R
                vertices => {a, b, c, d}

o6 : HyperGraph</pre>
</td></tr>
<tr><td><pre>i7 : connectedComponents H

o7 = {{a, b}, {c}}

o7 : List</pre>
</td></tr>
<tr><td><pre>i8 : isolatedVertices H

o8 = {d}

o8 : List</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="___Connected_sp__Components_sp__Tutorial.html" title="clarifying the difference between graph and hypergraph components">Connected Components Tutorial</a> -- clarifying the difference between graph and hypergraph components</span></li>
<li><span><a href="_connected__Graph__Components.html" title="returns the connected components of a graph">connectedGraphComponents</a> -- returns the connected components of a graph</span></li>
<li><span><a href="_is__Connected.html" title="determines if a (hyper)graph is connected">isConnected</a> -- determines if a (hyper)graph is connected</span></li>
<li><span><a href="_num__Connected__Components.html" title="returns the number of connected components in a (hyper)graph">numConnectedComponents</a> -- returns the number of connected components in a (hyper)graph</span></li>
<li><span><a href="_isolated__Vertices.html" title="returns all vertices not contained in any edge">isolatedVertices</a> -- returns all vertices not contained in any edge</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>connectedComponents</tt> :</h2>
<ul><li>connectedComponents(HyperGraph)</li>
</ul>
</div>
</div>
</body>
</html>