[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The clip of Ricky Ricardo showing DFS ;-) and cognitive plausibility of DFS

is here 


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.