简体   繁体   中英

Finding equal subgraphs

Given:

  • a directed Graph
  • Nodes have labels
  • the same label can appear more than once
  • edges don't have labels

I want to find the set of largest (connected) subgraphs which are equal taking the labels of the nodes into account.

The graph could be huge (millions of nodes) does anyone know an efficient solution for this?

I'm looking for algorithm and ideally a Java implementation.

Update: Since this problem is most likely NP-complete. I would also be interested in an algorithm that produces an approximated solution.

This seems to be close at least: Frequent Subgraphs

I strongly suspect that's NP-hard.

Even if all the labels are the same that's at least as hard as graph isomorphism. (Join the two graphs together as a single disconnected graph; are the largest equal subgraphs the two original graphs?)

If identical labels are relatively rare it might be tractable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM