New answers tagged

1

BFS and DFS are usually applied to unweighted graphs (or, equivalently, to graphs where the edges have all the same weights). In this case, BFS is optimal, i.e., assuming a finite branching factor, it eventually finds the optimal solution, but it doesn't mean that it takes a short time, in fact, it might well be the opposite, depending on the search space. ...


1

Either one. The BFS algorithm and DFS algorithm do not specify. Typically, it's programmed as left-to-right, just because that's the way programmers think about trees. It doesn't have to be. Note that DFS isn't "deepest node first" either. Imagine that nodes H and I in your tree did not exist; D, J, K, E, B would be a perfectly valid DFS traversal ...


2

(Disclaimer: although I have never seen a formal definition of unknown search space, here is my attempt to define it based on my knowledge of search and search algorithms in machine learning and evolutionary algorithms; I am aware of a definition of unknown environment (see chapter 2, p. 44, of Norvig and Russell's AI book), but that definition is different ...


Top 50 recent answers are included