Message Boards Message Boards

How to find all possible paths tracing as many edges between two vertices?

Posted 9 years ago

Suppose I have an undirected graph

G = Graph[{1 <-> 2, 2 <-> 3, 2 <-> 3, 3 <-> 4}]

enter image description here

I used FindPath[G,1,4,Infinity,All] and obtained the result

{{1, 2, 3, 4}}

But the expected result should be


Is there any way to get all possible paths even though any number of edges are present in between two vertices?

If you cross post the same question on multiple forums, please always mention this and include links. This is so people will be aware of any existing solutions ...

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract