<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx</link><description>I said last time that I was interested in finding colourings for graphs that have lots of fully connected subgraphs, aka "cliques". For instance, I'd like to find a four-colouring for this sixteen-node graph: 
 
 Yuck. What a mess. 
 What this graph</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10159958</link><pubDate>Mon, 02 May 2011 09:08:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10159958</guid><dc:creator>AlexOld</dc:creator><description>&lt;p&gt;The Status property fails (returns Solved) in degenerate case when required number of colours = 1. Some check must be added. I think Eric would do it in the most elegant way.&lt;/p&gt;
&lt;p&gt;The whole job is just marvellous (breathtaking). Thank you very much, Eric.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10159958" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10071358</link><pubDate>Mon, 04 Oct 2010 20:15:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10071358</guid><dc:creator>EugenUS</dc:creator><description>&lt;p&gt;@Eris - awesome post.&lt;/p&gt;
&lt;p&gt;@All - anybody knows other blogs where somebody would explain other algorithms from real world with a step by step implementation. I hate those blogs with theory only. &amp;nbsp;:) Eric rules with his posts.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10071358" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10059741</link><pubDate>Thu, 09 Sep 2010 11:49:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10059741</guid><dc:creator>Visitor</dc:creator><description>&lt;p&gt;@Greg - if you claim that graph coloring is solvable by doing transitive closure with matrices please present the solution or leave a reference. Or even just for Sudoku. Not kidding - it&amp;#39;s considered to be NP-complete and transitive closure is computable in N^3, so just in case that there might be a golden shortcut in some corner of the internet - one never knows :-)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059741" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10051225</link><pubDate>Tue, 17 Aug 2010 23:43:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10051225</guid><dc:creator>Greg</dc:creator><description>&lt;p&gt;There is an optimized way of doing this by using a square matrix to represent transitions between nodes and then using matrix multiplication to find the transitive closure of the matrix. &amp;nbsp;The memory footprint, upper bound on the number of multiplications and performance information is known ahead of time for this implementation.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10051225" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10046595</link><pubDate>Thu, 05 Aug 2010 15:33:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10046595</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Now what;s the chances for a solver for next weeks lotto?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10046595" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10045928</link><pubDate>Wed, 04 Aug 2010 14:27:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10045928</guid><dc:creator>Micah</dc:creator><description>&lt;p&gt;@configurator: Toget an exception for a non-unique solution you would use:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return solution.Single();&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10045928" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10045356</link><pubDate>Tue, 03 Aug 2010 13:01:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10045356</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;rofl what a nice surprise. a sudoku solver is a nine-colorer of some specific graph.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10045356" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10044655</link><pubDate>Sun, 01 Aug 2010 13:35:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10044655</guid><dc:creator>configurator</dc:creator><description>&lt;p&gt;@Brian: Or change the line in Solve():&lt;/p&gt;
&lt;p&gt;from&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return solutions.FirstOrDefault();&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return solutions.First();&lt;/p&gt;
&lt;p&gt;if you want an exception for non-unique solutions&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10044655" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10044021</link><pubDate>Thu, 29 Jul 2010 21:17:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10044021</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;@oldnewthing: That&amp;#39;s boring. &amp;nbsp;All it takes to do that is to mark the first solution found as invalid, thus forcing the backtracker to search for an alternative solution.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10044021" width="1" height="1"&gt;</description></item><item><title>re: Graph Colouring, Part Five</title><link>http://blogs.msdn.com/b/ericlippert/archive/2010/07/29/graph-colouring-part-five.aspx#10043961</link><pubDate>Thu, 29 Jul 2010 19:36:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10043961</guid><dc:creator>Raymond Chen - MSFT</dc:creator><description>&lt;p&gt;Exercise: Extend this program so it also reports whether the solution is unique, a detail often lost in Sudoku puzzle creation.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10043961" width="1" height="1"&gt;</description></item></channel></rss>