Does there exist a pre-defined function in jgraphx or any other such Java based visualization library that takes-in 2 labelled graphs as input and outputs/highlights the set of nodes which differ between these 2 input graphs?
Asked
Active
Viewed 87 times
1
-
1Interesting problem, but it might be helpful to describe (or draw!) an example of what you would like to see as the 'difference'. One problem that I can see is that there may be multiple differences between graphs, since there can be multiple common subgraphs – gilleain May 26 '16 at 07:46
-
Further to what gilleain said: Maybe a better way to get what you want is to ask for a largest-possible graph that is an induced subgraph of both graphs. Every vertex not in this subgraph is "different" between the two graphs. This is probably a hard problem: Certainly you can solve it by looking for a maximum clique in the product graph formed by creating a vertex v' for each vertex v in either input graph, and adding an (undirected) edge (u', v') whenever both u and v exist in both input graphs and are either neighbours in both or non-neighbours in both. – j_random_hacker May 26 '16 at 11:12