Track row-by-row candidate columns for a 4-queens search. This is a small deterministic example, not solver engineering.

Example

Track row-by-row candidate columns for a 4-queens search.

highlighted = computed this step

Step 1 — Row candidates

Compute the highlighted combinatorics value.

row, allowed columns(0, (0, 1, 2, 3))\begin{array}{c|c}\text{row, allowed columns}&\hlmath{\text{(0, (0, 1, 2, 3))}}\end{array}

Step 2 — Row candidates

Compute the highlighted combinatorics value.

row, allowed columns(1, (3))\begin{array}{c|c}\text{row, allowed columns}&\hlmath{\text{(1, (3))}}\end{array}

Step 3 — Row candidates

Compute the highlighted combinatorics value.

row, allowed columns(2, (0))\begin{array}{c|c}\text{row, allowed columns}&\hlmath{\text{(2, (0))}}\end{array}

Step 4 — Row candidates

Compute the highlighted combinatorics value.

row, allowed columns(3, (2))\begin{array}{c|c}\text{row, allowed columns}&\hlmath{\text{(3, (2))}}\end{array}
combinatorics-search Every row is intentionally ordered and pinned to the lesson specification.