Usenet.com

www.Usenet.com

Group Index

Sci Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: An algorithm for listing all paths from a source node to a destination node



Siddharth S Malu <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> I have seen algorithms for listing all spanning trees of a network, 
> which is also exponential. It might be helpful in some cases, where the 
> each tree is evaluated on different scores.
> Something similar might apply for paths. Comments from OP?

Lots(Network net, Path start, Node fini)
{
if(fini in start) emit(start)
else {
   foreach Node n, a successor of start.end() {
      if(n not in start) Lots(net, start + n, fini);
   }
} 
}

In the intial call, pass a path consisting of the source node.
This still won't get all paths.
Paths with cycles will be eliminated.
If there is one, there is an infinity of them.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.