Do you know where your variables are? | |
PerlMonks |
Question about recursively generated iteratorsby perlfan (Vicar) |
on Sep 21, 2007 at 14:56 UTC ( [id://640382]=perlquestion: print w/replies, xml ) | Need Help?? |
perlfan has asked for the wisdom of the Perl Monks concerning the following question:
I've been going over the posts and tutorials here on this subject, and I have made it to the point where I can code a very straightforward example of very simple recursion.
However, I am trying to figure out how one may use this method (if at all) for a more complicated recursive algorithm. In essence what I'd like to do is find all acyclic paths in a digraph using the recursive depth first search method. In otherwords, the recursion pattern looks more like the depth first traversal of a tree than a simple straight line like my simple example above. I am sure locked away in the great explanations I've found on this site is the key, but I need to be hit with a really big clue stick. I think for this discussion, the recursive depth first traversal of a tree that returns a full root-to-leaf path would be an appropriate example...btw, I am assuming that this can be done with rgi's, but I could be wrong there, too. TIA
Back to
Seekers of Perl Wisdom
|
|