in reply to Re^12: Finding All Paths From a Graph From a Given Source and End Node
in thread Finding All Paths From a Graph From a Given Source and End Node
I have a network containing about 2500 edges (directed) and I am looking at being able to work out all the routes downstream from a given beginning node.
Hm. What is your terminating condition?
A directed graph can contain loops:
a->b->c ^ | | v e<-d
If your starting node is (a), when do you decide you've reach the (an) end?
Every time around the b->c->d->e->b loop, could be seen as another route. The only logical basis I can see for breaking that impasse is a rule along the lines of "Stop when there is no possibility of reaching a so far unvisited node. And that could be quite difficult to program efficiently.
As so often, more info required?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^14: Finding All Paths From a Graph From a Given Source and End Node
by eMBR_chi (Acolyte) on May 21, 2011 at 17:37 UTC | |
by BrowserUk (Patriarch) on May 22, 2011 at 02:58 UTC | |
by eMBR_chi (Acolyte) on May 22, 2011 at 08:18 UTC | |
by BrowserUk (Patriarch) on May 22, 2011 at 09:22 UTC | |
by eMBR_chi (Acolyte) on Jun 04, 2011 at 19:58 UTC | |
|