Consider an infinite binary search tree in which the branches have independent random costs. Suppose that we must find an optimal (cheapest) or nearly optimal path from the root to a node at depth n. Karp and Pearl [1983] show that a bounded-lookahead backtracking algorithm A2 usually finds a nearly optimal path in linear expected time (when the costs take only the values 0 or 1). From this successful performance one might conclude that similar heuristics should be of more general use. But we find here equal success for a simpler non-backtracking bounded-lookahead algorithm, so the search model cannot support this conclusion. If, however, the search tree is generated by a branching process so that there is a possibility of nodes having no sons (or branches having prohibitive costs), then the non-backtracking algorithm is hopeless while the backtracking algorithm still performs very well. These results suggest the general guideline that backtracking becomes attractive when there is the possibility of "dead-ends" or prohibitively costly outcomes.
展开▼