Math
Backtracking: queens and sudoku
Follow recursive backtracking for N queens and full 9×9 Sudoku, compare pruning and variable ordering, and enumerate queen solutions.

Try this
Watch choices, rejected branches and retreats in a real recursive search. Queens exclude shared columns and diagonals. Sudoku uses row, column and 3×3 constraints; MRV chooses the most constrained empty cell.
Equations used in the module
Equations Queens: qᵢ ≠ qⱼ and |qᵢ−qⱼ| ≠ |i−j| Sudoku: every row, column and 3×3 box contains 1…9 Backtracking explores a partial assignment, then undoes it MRV chooses an unfilled variable with the fewest legal values


