<?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>smallestCycleSize -- returns the size of the smallest induced cycle 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="_spanning__Tree.html">next</a> | <a href="_simplicial__Complex__To__Hyper__Graph.html">previous</a> | <a href="_spanning__Tree.html">forward</a> | <a href="_simplicial__Complex__To__Hyper__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>smallestCycleSize -- returns the size of the smallest induced cycle 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>s = smallestCycleSize(G)</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>, the input</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>s</tt>, <span>an <a href="../../Macaulay2Doc/html/___Z__Z.html">integer</a></span>, the size of the smallest induced cycle</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><div>This function returns the size of the smallest induced cycle of a graph. It is based upon Theorem 2.1 in the paper "Restricting linear syzygies: algebra and geometry" by Eisenbud, Green, Hulek, and Popsecu. This theorem states that if G is graph, then the edge ideal of the complement of G satisfies property N<sub>2,p</sub>, that is, the resolution of I(G<sup>c</sup>) is linear up to the p-th step, if and only if the smallest induced cycle of G has length p+3. The algorithm looks at the resolution of the edge ideal of the complement to determine the size of the smallest cycle.</div> <table class="examples"><tr><td><pre>i1 : T = QQ[x_1..x_9];</pre> </td></tr> <tr><td><pre>i2 : g = graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9,x_9*x_1} -- a 9-cycle o2 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}} 1 2 2 3 3 4 4 5 5 6 6 7 7 8 1 9 8 9 ring => T vertices => {x , x , x , x , x , x , x , x , x } 1 2 3 4 5 6 7 8 9 o2 : Graph</pre> </td></tr> <tr><td><pre>i3 : smallestCycleSize g o3 = 9</pre> </td></tr> <tr><td><pre>i4 : h = graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9} -- a tree (no cycles) o4 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}} 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 ring => T vertices => {x , x , x , x , x , x , x , x , x } 1 2 3 4 5 6 7 8 9 o4 : Graph</pre> </td></tr> <tr><td><pre>i5 : smallestCycleSize h o5 = infinity o5 : InfiniteNumber</pre> </td></tr> <tr><td><pre>i6 : l = graph {x_1*x_2,x_2*x_3,x_3*x_4,x_4*x_5,x_5*x_6,x_6*x_7,x_7*x_8,x_8*x_9,x_9*x_1,x_1*x_4} o6 = Graph{edges => {{x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }, {x , x }}} 1 2 2 3 1 4 3 4 4 5 5 6 6 7 7 8 1 9 8 9 ring => T vertices => {x , x , x , x , x , x , x , x , x } 1 2 3 4 5 6 7 8 9 o6 : Graph</pre> </td></tr> <tr><td><pre>i7 : smallestCycleSize l o7 = 4</pre> </td></tr> </table> <div>Note that <tt>G</tt> is a tree if and only if <tt>smallestCycleSize G</tt> is <tt>infinity</tt>.</div> </div> </div> <div class="waystouse"><h2>Ways to use <tt>smallestCycleSize</tt> :</h2> <ul><li>smallestCycleSize(Graph)</li> </ul> </div> </div> </body> </html>