<?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>chromaticNumber -- computes the chromatic number 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="_clique__Complex.html">next</a> | <a href="_change__Ring_lp..._cm_sp__Maximal__Edges_sp_eq_gt_sp..._rp.html">previous</a> | <a href="_clique__Complex.html">forward</a> | <a href="_change__Ring_lp..._cm_sp__Maximal__Edges_sp_eq_gt_sp..._rp.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>chromaticNumber -- computes the chromatic number 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>c = chromaticNumber 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>c</tt>, <span>an <a href="../../Macaulay2Doc/html/___Z__Z.html">integer</a></span>, the chromatic number of <tt>H</tt></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><div>Returns the chromatic number, the smallest number of colors needed to color the vertices of a graph. This method is based upon a result of Francisco-Ha-Van Tuyl that relates the chromatic number to an ideal membership problem.</div> <table class="examples"><tr><td><pre>i1 : S = QQ[a..f];</pre> </td></tr> <tr><td><pre>i2 : c4 = cycle(S,4) -- 4-cycle; chromatic number = 2 o2 = Graph{edges => {{a, b}, {b, c}, {c, d}, {a, d}}} ring => S vertices => {a, b, c, d, e, f} o2 : Graph</pre> </td></tr> <tr><td><pre>i3 : c5 = cycle(S,5) -- 5-cycle; chromatic number = 3 o3 = Graph{edges => {{a, b}, {b, c}, {c, d}, {d, e}, {a, e}}} ring => S vertices => {a, b, c, d, e, f} o3 : Graph</pre> </td></tr> <tr><td><pre>i4 : k6 = completeGraph S -- complete graph on 6 vertices; chormatic number = 6 o4 = Graph{edges => {{a, b}, {a, c}, {a, d}, {a, e}, {a, f}, {b, c}, {b, d}, {b, e}, {b, f}, {c, d}, {c, e}, {c, f}, {d, e}, {d, f}, {e, f}}} ring => S vertices => {a, b, c, d, e, f} o4 : Graph</pre> </td></tr> <tr><td><pre>i5 : chromaticNumber c4 o5 = 2</pre> </td></tr> <tr><td><pre>i6 : chromaticNumber c5 o6 = 3</pre> </td></tr> <tr><td><pre>i7 : chromaticNumber k6 o7 = 6</pre> </td></tr> </table> </div> </div> <div class="single"><h2>Caveat</h2> <div><div>This method should not be used with a hypergraph that has an edge of cardinality one since no coloring is possible.</div> </div> </div> <div class="waystouse"><h2>Ways to use <tt>chromaticNumber</tt> :</h2> <ul><li>chromaticNumber(HyperGraph)</li> </ul> </div> </div> </body> </html>