Message Boards Message Boards

IGraph/M: graph theory and network analysis with Mathematica

Posted 9 years ago
POSTED BY: Szabolcs Horvát
30 Replies

Version 0.6.5 is now released, just in time for Christmas! :-) Please upgrade to this release, especially if you are using Mathematica 13.2.

POSTED BY: Szabolcs Horvát

Hi Szabolcs, Thank you for your reply. You understood correctly, I am looking for a kind of "signal propagation" feature on IGraph/M or Mathematica build in. But your explanation really helps to clarify what I can do and what I cannot do with them. For the moment, I can use the graph to visualization and analysis purposes and just compute the functions on regular algorithmic way. To perform analysis on complex network IGraph/M will be very handle, which is quite cool. Thank you again.

POSTED BY: Flavio Castilho
POSTED BY: Szabolcs Horvát

Hi Szabolcs, your package is very interesting, congrats. I am new in Mathematica and was wondering if is it possible to build with it (or Mathematica build in functions) what NetGraph does but not restricted to layers. Something like Slots and Signals from QT or Unreal engine blueprints where the graph is the processing flow of a complex collection of arbitrary or customized deterministic functions. When we use FunctionLayer or ThreadingLayer, to map such arbitrary function on a vertex it not works properly and has the overhead of the learning engine. For example mapping Outer will works but with severe restrictions. Something likes the idea in the graph below. Any thoughts? Thanks.

Graph[{1 -> 3, 2 -> 3, 3 -> 5, 4 -> 5}, 
 VertexLabels -> {1 -> "Array A", 2 -> "Array B", 
   3 -> "Array D = Plus[A,B]", 4 -> "Array C", 
   5 -> "Array E = Times[C,D]"}]
POSTED BY: Flavio Castilho

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial columns Staff Picks http://wolfr.am/StaffPicks and Publication Materials https://wolfr.am/PubMat and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team

IGraph/M 0.6.1, fixing some issues that unexpectedly crept into 0.6.0. Please use this version, especially on Linux.

Update: 0.6.2 is out, please upgrade. This is another bugfix-only release.

Update: 0.6.3 is released now!

POSTED BY: Szabolcs Horvát

IGraph/M 0.6 is now released, with the much-requested support for Apple Silicon based Macs. The changelog is on GitHub: https://github.com/szhorvat/IGraphM/releases/tag/v0.6.0

This release contains new features, as well as many internal robustness improvements. Please use only this release with Mathematica 12.2 or later.

A highlight of this release is the included interactive graph editor, thanks to Kuba Podkalicki! All feedback regarding this or other features is very welcome.

enter image description here

POSTED BY: Szabolcs Horvát

Bravo!

POSTED BY: Michael Sollami

IGraph/M 0.5 is now released. It brings both new features and bugfixes. Please upgrade.

If you use this software in your work, please cite it.

POSTED BY: Szabolcs Horvát
POSTED BY: Szabolcs Horvát

Great work!

POSTED BY: Anton Antonov

IGraph/M 0.3.113 is released, with many bug fixes, and some new functionality. http://szhorvat.net/mathematica/IGraphM

There is now an inline version of the documentation: http://szhorvat.net/mathematica/IGDocumentation/ Please let me know about any problems you notice.

Prerelease testers are requested to try this version with Mathematica 12.1 and email me about any problems.

POSTED BY: Szabolcs Horvát

IGraph/M 0.3.112 is now released with some critical bug fixes and new functions. Please upgrade.

There are new functions for testing graph symmetry and regularity. Here's a demonstration:

Graph symmetry and regularity table

Needs["IGraphM`"]

graphs = {StarGraph[4], IGSquareLattice[{2, 3}, "Periodic" -> True], 
   HypercubeGraph[3], GraphData[{"Rook", {4, 4}}], 
   GraphData["ShrikhandeGraph"], GraphData["HoltGraph"], 
   GraphData["Tutte12Cage"], GraphData[{"Paulus", {25, 1}}]};

functions = <|"regular" -> IGRegularQ, 
   "strongly regular" -> IGStronglyRegularQ, 
   "distance regular" -> IGDistanceRegularQ, 
   "vertex transitive" -> IGVertexTransitiveQ, 
   "edge transitive" -> IGEdgeTransitiveQ, 
   "arc transitive" -> IGEdgeTransitiveQ@*DirectedGraph, 
   "distance transitive" -> IGDistanceTransitiveQ|>;

TableForm[
  Through[Values[functions][#]] & /@ graphs, 
  TableHeadings -> {Show[#, ImageSize -> 60] & /@ graphs, Keys[functions]}, 
  TableDirections -> Row
]
POSTED BY: Szabolcs Horvát

IGraph/M 0.3.109 is now released. Please upgrade to this version if you have Mathematica 12.0! (And upgrade even if you don't, to get all the bug fixes.)

https://github.com/szhorvat/IGraphM

POSTED BY: Szabolcs Horvát

New version released with a critical fix for IGBlissIsomorphicQ for coloured graphs. Please update.

See the release page for a list of changes:

UPDATE: There's a new release that improves compatibility with various Linux distributions, and also has other fixes. Please upgrade! Remember that it's always easy with the auto-upgrade script.

POSTED BY: Szabolcs Horvát

IGraph/M 0.3.99 is now released, with a simplified installation procedure. Now it only takes a single line of Mathematica code to automatically download and install the package (please click through to the website so I can keep the installation instructions in a central location).

This release brings many features developed specifically for IGraph/M, and not previously available in the core igraph library. It also includes several new features exclusive to IGraph/M (not available in other igraph interfaces). At this point, IGraph/M also provides alternatives for most Combinatorica feature that do not yet have built-in equivalents in Mathematica.

Some highlights:

Efficient minimum graph colouring and chromatic number computation (implemented in almost pure WL code!). Here's a little demo:

We apply a Mycelski construction to a cycle graph twice, then compute a minimum colouring, and finally visualize this colouring.

Nest[IGMycielskian, CycleGraph[4], 2] // 
  Graph[#, GraphStyle -> "BasicBlack", VertexSize -> Large] & //
  IGVertexMap[ColorData[101], VertexStyle -> IGMinimumVertexColoring]

Mathematica graphics

Computing the chromatic number would have been as easy as

IGChromaticNumber[%]
(* 4 *)

Also check that it's triangle free:

IGTriangleFreeQ[%%]
(* True *)

We now have easy and flexible lattice generation:

IGLatticeMesh["CairoPentagonal"]

Mathematica graphics

Improved mesh-graph conversion. Let's compute the face-face adjacency graph (i.e. the dual lattice) while keeping vertex coordinates.

IGMeshCellAdjacencyGraph[%, 2, VertexCoordinates -> Automatic]

Mathematica graphics

Let's take that graph and find a random spanning tree to generate a nice maze.

IGRandomSpanningTree[%, GraphStyle -> "Web", 
 VertexCoordinates -> GraphEmbedding[%]]

Mathematica graphics

Now take the degree sequence of that tree and generate another tree (i.e. connected graph) with the same degree sequence.

IGRealizeDegreeSequence[VertexDegree[%]] // TreeGraphQ
(* True *)

Compute a minimum colouring of a pinwheel tiling.

mesh = IGLatticeMesh["Pinwheel", {3, 3}, MeshCellStyle -> {1 -> White}];
SetProperty[{mesh, {2, All}}, MeshCellStyle -> ColorData[11] /@ IGMinimumVertexColoring@IGMeshCellAdjacencyGraph[mesh, 2]]

Mathematica graphics

Compute the chromatic index (edge chromatic number) of a large graph.

IGChromaticIndex@RandomGraph[{100, 200}] // Timing
(* {0.040686, 10} *)

There are many more examples in the documentation, and many more new functions. Here I chose to show a few visually interesting ones.

As always, all feedback is welcome, and any help with the package is appreciated: testing, editing the documentation, contributing examples, or if you're feeling up to it, adding new functions.

POSTED BY: Szabolcs Horvát
POSTED BY: Szabolcs Horvát
POSTED BY: Szabolcs Horvát

Prerelease 0.3.91 is now available. If you tried the previous prerelease, please upgrade.

This release includes bug fixes, documentation improvements, and a few new functions.

Let me know if you find any problems, or have any suggestions.

POSTED BY: Szabolcs Horvát

Hi Szabolcs, Your package looks really awesome! I just installed the latest on my Windows 10 with MM11.1.1.0 and it runs fine. The documentation is also very nice. What an effort and work! The warnings are all correct and documented (I ran the whole documentation). The only unexpected "red" was:

DendrogramPlot[cl1["HierarchicalClusters"], 
 LeafLabels -> (Rotate[#, Pi/2] &), ImageSize -> 750, 
 AspectRatio -> 1/2]

enter image description here

Can't wait to play with this Package!

POSTED BY: l van Veen

Don't worry about the red colouring here. This is only because the builtin HierarchicalClustering package hasn't been updated to make use of SyntaxInformation. These options work correctly. The highlighting can be safely ignored.

POSTED BY: Szabolcs Horvát

Pre-release 0.3.90, leading up to 0.4, is now available:

Let me know if you find any problems, or have any suggestions.

This release has several utility functions for working with graph properties and weighted graphs.

POSTED BY: Szabolcs Horvát

IGraph/M 0.3.0 is now available.

This release fixes compatibility with Mathematica 11.1.

It also introduces new functions, performance improvements, bug fixes and polish. Upgrading is recommended for all users.

POSTED BY: Szabolcs Horvát

IGraph/M 0.2.1 is now released. This is a bugfix release. It can be downloaded from https://github.com/szhorvat/IGraphM/releases as usual.

Two bugs which could cause wrong results to be returned are fixed. If you use any of the affected functions, please upgrade.

The following changes require special mention:

  • IGFeedbackArcSet could return wrong results for some graphs. This is now fixed.
  • The "RemovedEdges" property returned by IGCommunitiesEdgeBetweenness could be incorrect for some graphs. This is now fixed. Other properties were not affected.
  • The Hierarchical Clustering package is no longer auto-loaded by IGraph/M to avoid shadowing DistanceMatrix, a new builtin added in Mathematica 10.3. Load this package manually (<<HierarchicalClustering`) to work with the "HierarchicalClusters" property of IGClusterData objects.

A number of other small bugs were also fixed.

POSTED BY: Szabolcs Horvát

IGraph/M 0.2.0 is released now with many improvements. It can be downloaded from https://github.com/szhorvat/IGraphM/releases as usual.

Highlights for this release:

  • Significant performance improvements for many functions
  • New and extended functions for shortest path calculations (extended IGDistanceMatrix, IGDistanceCounts, IGDistanceHistogram, IGDiameter, IGFindDiameter)
  • Support for weighted clique calculations (IGWeightedCliques, IGMaximalWeightedCliques, IGLargestWeightedCliques, IGWeightedCliqueNumber)
  • Additional new functions
  • Syntax highlighting for functions
  • Raspberry Pi support
  • Compatibility with Mathematica 10.4 on OS X.
  • Bug fixes

I would appreciate any testing people can do on platforms I didn't have access to (priorities in decreasing order: Linux, Windows, OS X, pre-10.3 Mathematica versions).

POSTED BY: Szabolcs Horvát
POSTED BY: Szabolcs Horvát

IGraph/M version 0.1.3 is released now, with expanded coverage for igraph functions and a lot of polish for the already covered ones.

Highlights for this release:

  • Community detection algorithms
  • Automorphism group for vertex coloured graphs; multigraph isomorphism
  • Additional centrality measures with support for weighted graphs
POSTED BY: Szabolcs Horvát

Hello, I did give it a spin on windows 7 64 and 10.1 kernel. All functions work in your documentation (manually opened) The only error appears when I use IGDocument[] to open the documentation.

FileNameJoin::optx: Unknown option Saveable in FileNameJoin[{E:\WolframApps\igraphmtest\IGraphM-0.1.1\IGraphM-0.1.1\IGraphM\,Documentation,IGDocumentation.nb},Saveable->False]. >>

nice work!

Thank you for letting me know! This is now fixed in version 0.1.2. There are few changes in this version; its main purpose was to fix a bug on Windows where some functions were not working at all.

POSTED BY: Szabolcs Horvát
POSTED BY: Szabolcs Horvát
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