http://www.youtube.com/watch?v=IPy9-zVEhVY
The idea that DFS is more cognitively plausible is pretty well understood. In trying to do a problem P,
you may split it into sub-problems p1...pk; and start doing p1. You may decide p1 is too hard still and
split it into p11, p12...p1j and start working on p11 (see the depth first nature?).
The advantage of going this way is that you need only a *STACK* to keep track of your goals (remember that LIFO--last in first out
queue--is really a stack). So you put P first on the stack. On top of it put p1...pk in order. now you remove top of the stack (p1) and put all its
subproblems p11..p1j on the stack. When all of those get done, the next one to be picked will be p2.
Rao
No comments:
Post a Comment