Sophie

Sophie

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

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>isLeaf -- determines if an edge (or vertex) is a leaf 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="_isolated__Vertices.html">next</a> | <a href="_is__Graph.html">previous</a> | <a href="_isolated__Vertices.html">forward</a> | <a href="_is__Graph.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>isLeaf -- determines if an edge (or vertex) is a leaf 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>b = isLeaf(G,N)</tt><br/><tt>b = isLeaf(H,n)</tt><br/><tt>b = isLeaf(H,V)</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>G</tt>, <span>a <a href="___Graph.html">graph</a></span></span></li>
<li><span><tt>H</tt>, <span>a <a href="___Hyper__Graph.html">hypergraph</a></span></span></li>
<li><span><tt>n</tt>, <span>an <a href="../../Macaulay2Doc/html/___Z__Z.html">integer</a></span>, an index of an edge</span></li>
<li><span><tt>V</tt>, <span>a <a href="../../Macaulay2Doc/html/___Ring__Element.html">ring element</a></span>, a vertex</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 edge <tt>n</tt> is a leaf or if vertex <tt>V</tt> has degree 1</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>An edge in a graph is a leaf if it contains a vertex of degree one. An edge <tt>E</tt> in a hypergraph is a leaf if there is another edge <tt>B</tt> with the property that for all edges <tt>F</tt> (other than <tt>E</tt>), the intersection of <tt>F</tt> with <tt>E</tt> is contained in the interesection of <tt>B</tt> with <tt>E</tt>.</p>
<div>A vertex of a graph is a leaf if it has degree one. A vertex of a hypergraph is a leaf if it is contained in precisely one edge which is itself is leaf.</div>
<table class="examples"><tr><td><pre>i1 : R = QQ[a..f];</pre>
</td></tr>
<tr><td><pre>i2 : G = graph {a*b,b*c,c*a,b*d};</pre>
</td></tr>
<tr><td><pre>i3 : isLeaf(G, d)

o3 = true</pre>
</td></tr>
<tr><td><pre>i4 : isLeaf(G, getEdgeIndex(G, {b,d}))

o4 = true</pre>
</td></tr>
<tr><td><pre>i5 : isLeaf(G, a)

o5 = false</pre>
</td></tr>
<tr><td><pre>i6 : isLeaf(G, getEdgeIndex(G, {a,b}))

o6 = false</pre>
</td></tr>
<tr><td><pre>i7 : H = hyperGraph {a*b*c,b*d,c*e,b*c*f};</pre>
</td></tr>
<tr><td><pre>i8 : K = hyperGraph {a*b*c,b*d,c*e};</pre>
</td></tr>
<tr><td><pre>i9 : isLeaf(H, a)

o9 = true</pre>
</td></tr>
<tr><td><pre>i10 : isLeaf(H, getEdgeIndex(H, {a,b,c}))

o10 = true</pre>
</td></tr>
<tr><td><pre>i11 : isLeaf(K, a)

o11 = false</pre>
</td></tr>
<tr><td><pre>i12 : isLeaf(K, getEdgeIndex(K, {a,b,c}))

o12 = false</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_is__Forest.html" title="determines whether a (hyper)graph is a forest">isForest</a> -- determines whether a (hyper)graph is a forest</span></li>
<li><span><a href="_is__Good__Leaf.html" title="determines if an edge is a good leaf">isGoodLeaf</a> -- determines if an edge is a good leaf</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>isLeaf</tt> :</h2>
<ul><li>isLeaf(Graph,ZZ)</li>
<li>isLeaf(HyperGraph,RingElement)</li>
<li>isLeaf(HyperGraph,ZZ)</li>
</ul>
</div>
</div>
</body>
</html>