basic use of the generic backtracking engine for list and graph algorithms