# Comparing network graphs [closed]

I started out with a grid graph, performed some operations on it, and ended up with a set of networks; for example, , , ,

I need to compare these graphs.

A thought that I had was to compare them with the original grid graph; how similiar they are. How do I do that in Mathematica?

Also note that the number of vertices could be different for different cases. In this example the first and third output has 44 vertices but the second output has 47 vertices. It would appear that the second output is the best of the three presented ( it somewhat preserves the grid structure and has higher number of vertices) . I'm looking for a way to quantify it.

Heres the graph matrices

• Please post the code to generate such Graph. Aug 6 at 7:33
• This is not a Mathematica question and IMO it is not a good fit here. You should look up the concept of graph matching and once you have a specific method that you are trying to implement, you can ask about it again. Mathematica has no built in graph matching functionality. Aug 6 at 9:22
• Define "compare." Aug 6 at 16:44
• – D.W.
Aug 6 at 20:54
• I’m voting to close this question because it has been cross-posted on other sites where it is likely a better fit. 2 days ago

I was able to import you graphs with:

mat1 = Import["mat1.mtx"]
mat2 = Import["mat2.mtx"]
mat3 = Import["mat3.mtx"]


and then turn them into graphs and visualize them with:

graph1 = AdjacencyGraph[mat1]


With graphs={graph1,graph2,graph3}
you can apply graph measurements to each. but as others have stated it is not clear what you what to compare.

VertexCount /@ graphs
(*{44, 47, 44}*)

EdgeCount /@ graphs
(*{62, 73, 64}*)

IsomorphicGraphQ /@ Subsets[graphs, {2}]
(*{False, False, False}*)