Efficiency in nondeterministic control through non-forgetful backtracking

Abstract

Journal ArticleNondeterministic (ND) control has long been used to express elegant solutions to complex search problems. Programs using ND control can be executed on conventional machines through a systematic examination of trial execution paths. Among the many approaches to the enumeration of these paths is backtracking, a depth-first search of the execution path tree. Despite its implementational advantages, backtracking in its purest form suffers from a "forgetfulness" of retracted execution subpaths. This can lead to exponential run-time on problems such as top-down parsing in which the same subproblem can reoccur in slightly different global contexts. This paper presents an alternative form of ND control implementation incorporating "non-forgetfulness" into backtracking. Reoccurrences of previously searched subgoals are detected and their net computational effects recreated on demand. Since each distinct goal is pursued at most once, search problems such as general top-down parsing run in polynomial time. Moreover, in contrast to an exhaustive, bottom-up approach, goals are only pursued if appropriate in some global context. A strategy for non-forgetful backtracking is outlined in terms of coroutines and ordinary backtracking. The description of an alternative implementation of this strategy using simple coroutines is referenced. Top-down parsing is used to illustrate the application of this technique in both linguistic appearance and execution effect. Finally, some directions for further research into generalizations of these results are suggested

    Similar works