Backtracking
To apply backtracking to a problem, one must give the data P for an instance of the problem that is to be solved, and six procedures, root, abandon, accept, first, next, and save. These procedures should take the instance data P as a variable and should do the following: