Graph Algorithm To Find All Paths Between N Arbitrary Vertices

Posted by russtbarnacle on Stack Overflow See other posts from Stack Overflow or by russtbarnacle
Published on 2010-04-27T17:22:28Z Indexed on 2010/04/27 17:23 UTC
Read the original article Hit count: 421

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

I'm looking for paths between a random subset of the vertices (at least 2). The paths should simple paths that only go through any vertex once.

My end goal is to have a set of routes so that you can start at one of the subset vertices and reach any of the other subset vertices. Its not necessary to pass through all the subset nodes when following a route.

All of the algorithms I've found (Dijkstra,Depth first search etc.) seem to be dealing with paths between two vertices and shortest paths.

Is there a known algorithm that will give me all the paths (I suppose these are subgraphs) that connect these subset of vertices?

© Stack Overflow or respective owner

Related posts about language-agnostic

Related posts about algorithm