in reply to Re: Short Circuiting DFS Graph Traversal
in thread Short Circuiting DFS Graph Traversal
L F B / | \ / \ / | \ R--J--X----D--Q P M \ | / \ | | Z U--S
Let's say I am trying to find all paths between D and M. I have intentionally made a left hand side and a right hand side so all paths going to the left of D will be invalid because they will require coming back through D to get to M. Now, let's say I first start descending from D -> X and beyond and unwind back to D in failure. Now I go to D -> F -> X. I already determined that paths to X coming from D are bad so I can stop here.
Regarding your initial idea. That is called a bi-directional search and was my first inclination too assuming only the shortest path(s) were desired. Unfortunately, if there is a 3 node solution and a 7 node solution, neversaint wants both.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Short Circuiting DFS Graph Traversal
by LanX (Saint) on Oct 29, 2010 at 15:29 UTC | |
|
Re^3: Short Circuiting DFS Graph Traversal
by LanX (Saint) on Oct 30, 2010 at 00:09 UTC | |
|
Re^3: Short Circuiting DFS Graph Traversal
by LanX (Saint) on Nov 01, 2010 at 13:53 UTC | |
by Limbic~Region (Chancellor) on Nov 01, 2010 at 15:47 UTC | |
by LanX (Saint) on Nov 01, 2010 at 16:12 UTC |