Skip to main content
Have a personal or library account? Click to login
Object-oriented backtracking Cover
Read online

Abstract

Several versions of the backtracking are known. In this paper, those versions are in focus which solve the problems whose problem space can be described with a special directed tree. The traversal strategies of this tree will be analyzed and they will be implemented in object-oriented style. In this way, the traversal is made by an enumerator object which iterates over all the paths (partial solutions) of the tree. Two different “acktracking enumerators” are going to be presented and the backtracking algorithm will be a linear search over one of these enumerators. Since these algorithms consist of independent objects (the enumerator, the linear search and the task which must be solved), it is very easy to exchange one component in order to solve another problem. Even the linear search could be substituted with another algorithm pattern, for example, with a counting or a maximum selection if the task had to be solved with a backtracking counting or a backtracking maximum selection.

Language: English
Page range: 144 - 161
Submitted on: Nov 2, 2017
Accepted on: Nov 27, 2017
Published online: Jan 13, 2018
Published in print: Dec 20, 2017
Published by: Sapientia Hungarian University of Transylvania
In partnership with: Paradigm Publishing Services
Publication frequency: 2 issues per year
MSC:

© 2018 Tibor Gregorics, published by Sapientia Hungarian University of Transylvania
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.