Backtracking Algorithm
NTT Communication Science Labs.
Construct a partial solution (a subset of variables) which satisfies all of the constraints within the subset.
Expand the partial solution by adding new variables one by one.
When no value satisfies the constraints between the partial solution, the most recently added variable value is changed (backtracking).