Sophie

Sophie

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

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>inducedGraph -- returns the induced subgraph of a graph</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_induced__Graph_lp..._cm_sp__Original__Ring_sp_eq_gt_sp..._rp.html">next</a> | <a href="_independence__Number.html">previous</a> | <a href="_induced__Graph_lp..._cm_sp__Original__Ring_sp_eq_gt_sp..._rp.html">forward</a> | <a href="_independence__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>inducedGraph -- returns the induced subgraph of a 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>h = inducedGraph(G, L)</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>L</tt>, <span>a <a href="../../Macaulay2Doc/html/___List.html">list</a></span>, of vertices (i.e. variables in the ring of <tt>G</tt>)</span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><tt>h</tt>, <span>a <a href="___Graph.html">graph</a></span>, the induced subgraph of <tt>G</tt> whose edges are contained in <tt>L</tt></span></li>
</ul>
</div>
</li>
<li><div class="single"><a href="../../Macaulay2Doc/html/_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_induced__Graph_lp..._cm_sp__Original__Ring_sp_eq_gt_sp..._rp.html">OriginalRing => ...</a>,  -- use OriginalRing inside inducedGraph or inducedHyperGraph</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div><p>This function returns the induced subgraph of a graph on a specified set of vertices. This function enables the user to create subgraphs of the original graph. <tt>inducedGraph</tt> accepts a <a href="___Graph.html" title="a class for graphs">Graph</a> as input and returns a <a href="___Graph.html" title="a class for graphs">Graph</a> as well. Use <a href="_induced__Hyper__Graph.html" title="returns the induced subgraph of a (hyper)graph">inducedHyperGraph</a> for a <a href="___Hyper__Graph.html" title="a class for hypergraphs">HyperGraph</a> instead.</p>
<p>The default option is for the ring of the induced subgraph to contain only variables in <tt>L</tt>. Then the current ring must be changed before working with the induced subgraph. We use this setup to avoid having a lot of isolated vertices in the induced graph. However, one can set the option <a href="___Original__Ring.html" title="optional argument for inducedHyperGraph">OriginalRing</a> to <tt>true</tt> if one wants to give the induced graph the same ring as the original graph.</p>
<div/>
<table class="examples"><tr><td><pre>i1 : R = QQ[a,b,c,d,e];</pre>
</td></tr>
<tr><td><pre>i2 : G = graph {a*b,b*c,c*d,d*e,e*a} -- graph of the 5-cycle

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

o2 : Graph</pre>
</td></tr>
<tr><td><pre>i3 : H1 = inducedGraph(G,{b,c,d,e})

o3 = Graph{edges => {{b, c}, {c, d}, {d, e}}}
           ring => QQ[b, c, d, e]
           vertices => {b, c, d, e}

o3 : Graph</pre>
</td></tr>
<tr><td><pre>i4 : H2 = inducedGraph(G,{a,b,d,e})

o4 = Graph{edges => {{a, b}, {a, e}, {d, e}}}
           ring => QQ[a, b, d, e]
           vertices => {a, b, d, e}

o4 : Graph</pre>
</td></tr>
<tr><td><pre>i5 : use ring H1

o5 = QQ[b, c, d, e]

o5 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i6 : inducedGraph(H1,{c,d,e})

o6 = Graph{edges => {{c, d}, {d, e}}}
           ring => QQ[c, d, e]
           vertices => {c, d, e}

o6 : Graph</pre>
</td></tr>
<tr><td><pre>i7 : use ring G

o7 = R

o7 : PolynomialRing</pre>
</td></tr>
<tr><td><pre>i8 : inducedGraph(G,{b,c,d,e},OriginalRing=>true) --H1 but in bigger ring

o8 = Graph{edges => {{b, c}, {c, d}, {d, e}}}
           ring => R
           vertices => {a, b, c, d, e}

o8 : Graph</pre>
</td></tr>
</table>
<div>Equivalently, one can use <a href="_change__Ring.html" title="replaces vertices with variables of a different ring">changeRing</a> (and <a href="_graph.html" title="constructor for Graph">graph</a>) to move the induced graph back into the original ring.</div>
<table class="examples"><tr><td><pre>i9 : R = QQ[a,b,c,d,e];</pre>
</td></tr>
<tr><td><pre>i10 : G = graph {a*b,b*c,c*d,d*e,e*a} -- graph of the 5-cycle

o10 = Graph{edges => {{a, b}, {b, c}, {c, d}, {a, e}, {d, e}}}
            ring => R
            vertices => {a, b, c, d, e}

o10 : Graph</pre>
</td></tr>
<tr><td><pre>i11 : H = inducedGraph(G,{b,c,d})

o11 = Graph{edges => {{b, c}, {c, d}}}
            ring => QQ[b, c, d]
            vertices => {b, c, d}

o11 : Graph</pre>
</td></tr>
<tr><td><pre>i12 : graph changeRing(H,R,{b,c,d})

o12 = Graph{edges => {{d, c}, {c, b}}  }
            ring => R
            vertices => {a, b, c, d, e}

o12 : Graph</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_change__Ring.html" title="replaces vertices with variables of a different ring">changeRing</a> -- replaces vertices with variables of a different ring</span></li>
<li><span><a href="_delete__Edges.html" title="returns the (hyper)graph with specified edges removed">deleteEdges</a> -- returns the (hyper)graph with specified edges removed</span></li>
<li><span><a href="_induced__Hyper__Graph.html" title="returns the induced subgraph of a (hyper)graph">inducedHyperGraph</a> -- returns the induced subgraph of a (hyper)graph</span></li>
</ul>
</div>
<div class="waystouse"><h2>Ways to use <tt>inducedGraph</tt> :</h2>
<ul><li>inducedGraph(Graph,List)</li>
</ul>
</div>
</div>
</body>
</html>