Tuesday, 20 November 2007

Graph algorithm to find all subgraphs that connect N arbitrary vertices

I have an graph with the following attributes:



  • Undirected

  • Not weighted

  • Each vertex has a minimum of 2 and maximum of 6 edges connected to it.

  • Vertex count will be < 100

  • Graph is static and no vertices/edges can be added/removed or edited.

I'm looking for all subgraphs between a random subset of the vertices (at least 2).



I've created a (warning! programmer art) animated gif to illustrate what i'm trying to achieve: http://imgur.com/mGVlX.gif



My end goal is to have a set of subgraphs that allow moving from one of the subset vertices (blue nodes) and reach any of the other subset vertices (blue nodes).

No comments:

Post a Comment