Message Boards Message Boards

How do I color a DIMACS graph ?

Here is my code.

g = Import["http://mat.gsia.cmu.edu/COLOR/instances/homer.col", 
  "DIMACS"];

MinimumVertexColoring[g]

O/p is

MinimumVertexColoring[ "The whole graph is displayed here"]

Please let me know. I have just started using Mathematica

POSTED BY: Rushang Karia

MinimumVertexColoring is a Combinatorica function available in the Combinatorica package. To use it, you will need to

  1. Load the combinatorica package (<<Combinatorica`)
  2. Convert your graph into a combinatorica graph. (http://reference.wolfram.com/mathematica/GraphUtilities/ref/ToCombinatoricaGraph.html)

The default kind of Graph in Mathematica is a different object than the combinatorica graph. So the function won't know what to do with the graph unless it's a combinatorica graph.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract