All-different keeps rows where each variable has a distinct value. This is CP-SAT-style exhaustive search on tiny data; real solvers use propagation and clause learning.

Example

All-different keeps rows where each variable has a distinct value. This is an exhaustive-search view on tiny data; unlike a real CP-SAT solver, it does not propagate constraints or learn clauses.

highlighted = computed this step

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\hlmath{\text{all different=yes}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\hlmath{\text{all different=yes}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yesA=2 B=1 C=3all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\text{all different=yes}\\\text{A=2 B=1 C=3}&\hlmath{\text{all different=yes}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yesA=2 B=1 C=3all different=yesA=2 B=3 C=1all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\text{all different=yes}\\\text{A=2 B=1 C=3}&\text{all different=yes}\\\text{A=2 B=3 C=1}&\hlmath{\text{all different=yes}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yesA=2 B=1 C=3all different=yesA=2 B=3 C=1all different=yesA=3 B=1 C=2all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\text{all different=yes}\\\text{A=2 B=1 C=3}&\text{all different=yes}\\\text{A=2 B=3 C=1}&\text{all different=yes}\\\text{A=3 B=1 C=2}&\hlmath{\text{all different=yes}}\end{array}

Build the concrete table

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yesA=2 B=1 C=3all different=yesA=2 B=3 C=1all different=yesA=3 B=1 C=2all different=yesA=3 B=2 C=1all different=yes\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\text{all different=yes}\\\text{A=2 B=1 C=3}&\text{all different=yes}\\\text{A=2 B=3 C=1}&\text{all different=yes}\\\text{A=3 B=1 C=2}&\text{all different=yes}\\\text{A=3 B=2 C=1}&\hlmath{\text{all different=yes}}\end{array}

Read the table verdict

Compute the highlighted logic-table value.

A=1 B=2 C=3all different=yesA=1 B=3 C=2all different=yesA=2 B=1 C=3all different=yesA=2 B=3 C=1all different=yesA=3 B=1 C=2all different=yesA=3 B=2 C=1all different=yesverdict6 feasible assignments\begin{array}{c|c}\text{A=1 B=2 C=3}&\text{all different=yes}\\\text{A=1 B=3 C=2}&\text{all different=yes}\\\text{A=2 B=1 C=3}&\text{all different=yes}\\\text{A=2 B=3 C=1}&\text{all different=yes}\\\text{A=3 B=1 C=2}&\text{all different=yes}\\\text{A=3 B=2 C=1}&\text{all different=yes}\\\text{verdict}&\hlmath{\text{6 feasible assignments}}\end{array}
logic-computation Every row is intentionally ordered and pinned to the lesson specification.