allDifferent
alldifferent is a global constraint used in constraint programming and constraint satisfaction problems to enforce that a given set of variables take pairwise distinct values. Formally, for variables X1, X2, ..., Xn with finite domains D1, D2, ..., Dn, the constraint requires Xi ≠ Xj for all i ≠ j.
The primary purpose of the alldifferent constraint is to prune the search space by removing values that
Computationally, the propagation is polynomial-time, with typical implementations using maximum matching techniques. While the cost can
Applications of alldifferent appear in scheduling, timetabling, Sudoku and Latin squares, resource allocation, and other combinatorial