![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
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:
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? Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^13: Finding All Paths From a Graph From a Given Source and End Node
by BrowserUk
|
|