Everyone!
I want to use Iterative deepening DFS to find all simple paths between two points in graph. I read the algorithm and understand it why it is good for searching. But there is one thing i need to figure out, that it seems this algorithm is not very suitable for to find all simple paths between two points. Since there are paths which is much shorter while there are paths which are longer. so how to decided when to stop?
I am running a program right now with these things in mind. The program is like that
IDDFS(target, source)
{
int depth=1;
bool m_bool=FALSE;
while(!m_bool)
{
depth++;
m_bool=dfs(target,source,allpaths,depth);
/*
dfs is recursive, and when return true, that means find a simple
path
*/
}
}
Now, this program has something wrong, I am trying to fix it. Meanwhile, I would like to have advice on that. could Iterative deepening DFS can be used to find simple paths with relatively fast speed on large graphics? if yes, please share your experience. if no, then please suggest me what algorithm is best?
Thanks in advance!