Determining whether any two graphs are isomorphic

Graphs can have arbitrary labels, but their topology may be isomorphic. In the world of data analysis, we can examine different graphical networks and identify clusters of nodes that have identical connection patterns. This helps us discover when two seemingly different graphical networks end up with the same network mapping. Maybe then we can declare a one-to-one isomorphism between the nodes and learn something profound about the nature of the graphs.

We will use the isIsomorphic function from Data.Graph.Automorphism to detect whether two graphs are identical in their connection.

In this recipe, we will let the library calculate whether the two graphs in the following diagram are isomorphic in ...

Get Haskell Data Analysis Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.