Hellow everyone
I downloaded a notebook about Cactus Graph downloaded from http://mathworld.wolfram.com/CactusGraph.html.I want to get all cacti Graph of order 8.
But I don’t know how to use the program from it. what should I do ?
thanks
The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.
int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]
You will find all of them up to 7 vertices in GraphData. Note that GraphData is just a database. It contains all undirected simple graphs up to 7 vertices, but only certain specific instances above 7.
Get all cactus graphs from the database:
GraphData["Cactus"]
Get all 8-vertex cactus graphs from the database:
Select[GraphData[8], GraphData[#, "Cactus"] &]
Is that all of them? To check, let’s write a function to test if a graph is a cactus.
Now we want to generate all non-isomorphic 8-vertex graphs and filter the list. I like to use the geng tool from the nauty suite for this. I have it installed at /opt/local/bin/geng. Adjust the next command with wherever you installed this tool.
Thanks, but I am intrested to generate all non-isomorphic 8-vertex graphs and filter the list
how do I use the geng tool from the nauty suite for this, and I will try.
It turns out that the bottleneck is not even the generation of non-isomorphic graphs, or filtering for cacti, but simply reading the Graph6 format. Import[..., "Graph6"] is slower than it should be.
I just implemented a 5x faster custom Graph6 reader for IGraph/M. Now we can have all 11-vertex cacti in under a minute. This Graph6 importer will be included in the next version of IGraph/M.
Thanks for your very detailed solution, When I click on the url About – Szabolcs Horvát, and I follow his instructions and install IGraph/M in my mathematica, it is good and easy. and I can use this useful tools.
But I tried several times to install nauty26r11 tool , and I have failed.
My computer system is Windows 10, is it incompatibility ?
How to install the useful graph tool ? I am very eager to use it.
Where are the installation instructions? Thank you again
I’m afraid that nauty needs to be compiled from source, and that, like most scientific tools, it is not very Windows-friendly.
I rarely use Windows, so I cannot give you precise instructions. But it seems to me that the easiest way to compile it would be to use https://www.msys2.org/ which provides a Unix-line command line, and makes it possible to install the typical tools. It may be necessary to install autoconf in addition to the gcc compiler. Then it would be possible to follow the instructions in nauty’s README file.
The latest public version of IGraph/M now supports importing Graph6, Sparse6 and Digraph6 with good performance. Note that Mathematica does not have a built-in support for Digraph6 and is slower when importing the other two formats.
In 2022, I compiled the source code of nauty into Windows binaries using Cygwin, and it is now ready to run under Windows. Before that, I had Linux installed on my computer.