Sophie

Sophie

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

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>isConnectedGraph -- determines if a graph is connected</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_is__Edge.html">next</a> | <a href="_is__Connected.html">previous</a> | <a href="_is__Edge.html">forward</a> | <a href="_is__Connected.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>isConnectedGraph -- determines if a graph is connected</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>b = isConnectedGraph G</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>G</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>b</tt>, <span>a <a href="../../Macaulay2Doc/html/___Boolean.html">Boolean value</a></span>, <tt>true</tt> if <tt>G</tt> is connected, <tt>false</tt> otherwise</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>This function checks if the given graph <tt>G</tt> is connected. A graph is said to be connected if it has exactly one connected component.</p>
<p>Isolated vertices form their own connected components and will cause this method return <tt>false</tt>. This is in contrast to <a href="_is__Connected.html" title="determines if a (hyper)graph is connected">isConnected</a> in which isolated vertices are not in any 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 : S = QQ[a..e];</pre>
</td></tr>
<tr><td><pre>i2 : G = graph {a*b,b*c,c*d,d*e,a*e} -- the 5-cycle (connected)

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

o2 : Graph</pre>
</td></tr>
<tr><td><pre>i3 : H = graph {a*b,b*c,c*a,d*e} -- a 3-cycle and a disjoint edge (not connected)

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

o3 : Graph</pre>
</td></tr>
<tr><td><pre>i4 : isConnectedGraph G

o4 = true</pre>
</td></tr>
<tr><td><pre>i5 : isConnectedGraph H

o5 = false</pre>
</td></tr>
</table>
<p>In the following example, the graph <tt>G</tt> has the isolated vertex <tt>e</tt>. As <tt>d</tt> forms its own connected component, this graph is not connected.</p>
<div/>
<table class="examples"><tr><td><pre>i6 : S = QQ[a..e];</pre>
</td></tr>
<tr><td><pre>i7 : G = graph {a*b,b*c,c*d,a*d} -- 4-cycle with isolated vertex (not connected)

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

o7 : Graph</pre>
</td></tr>
<tr><td><pre>i8 : isolatedVertices G

o8 = {e}

o8 : List</pre>
</td></tr>
<tr><td><pre>i9 : isConnectedGraph G

o9 = false</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="_isolated__Vertices.html" title="returns all vertices not contained in any edge">isolatedVertices</a> -- returns all vertices not contained in any edge</span></li>
<li><span><a href="_num__Connected__Graph__Components.html" title="returns the number of connected components in a graph">numConnectedGraphComponents</a> -- returns the number of connected components in a graph</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>isConnectedGraph</tt> :</h2>
<ul><li>isConnectedGraph(HyperGraph)</li>
</ul>
</div>
</div>
</body>
</html>