AllDiff-LS: solving alldifferent constraints with efficient local search
Rui HAN , Minghao LIU , Yuhang DONG , Fuqi JIA , Yiyuan WANG , Feifei MA , Minghao YIN , Jian ZHANG
Front. Comput. Sci. ›› 2026, Vol. 20 ›› Issue (8) : 2008406
AllDiff-LS: solving alldifferent constraints with efficient local search
The alldifferent constraint is one of the most essential global constraints that has been used to model many classic Constraint Satisfaction Problems (CSPs). To tackle this constraint, previous work generally focuses on proposing filtering algorithms to reduce the value domain of variables, thereby pruning the backtracking search. However, due to the inherent complexity of alldifferent constraints, it remains challenging to solve CSPs containing large-scale alldifferent constraints for the existing search-based solvers. In this paper, we propose an efficient local search algorithm, called AllDiff-LS. We first represent the set of alldifferent constraints as graphs and simplify the graphs by two polynomial-time reduction rules. Afterward, we propose a new two-step strategy for selecting moves, as well as the carefully crafted tabu and restart strategies, to enable the algorithm to explore the search space more efficiently. Experiments on a representative set of benchmarks show that AllDiff-LS successfully solves more instances compared with state-of-the-art complete and heuristic methods, especially on large-scale instances, with much less running time.
alldifferent constraints / local search / constraint satisfaction problems
| [1] |
|
| [2] |
|
| [3] |
|
| [4] |
|
| [5] |
|
| [6] |
|
| [7] |
|
| [8] |
Zhang X, Li Q, Zhang W. A fast algorithm for generalized arc consistency of the alldifferent constraint. In: Proceedings of the 27th International Joint Conference on Artificial Intelligence. 2018, 1398–1403 |
| [9] |
Zhang X, Gao J, Lv Y, Zhang W. Early and efficient identification of useless constraint propagation for alldifferent constraints. In: Proceedings of the 29th International Conference on International Joint Conferences on Artificial Intelligence. 2021, 157 |
| [10] |
Li Z, Wang Y, Li Z. A bitwise GAC algorithm for alldifferent constraints. In: Proceedings of the 32nd International Joint Conference on Artificial Intelligence. 2023, 221 |
| [11] |
Zhen L, Li Z, Li Y, Li H. Eliminating the computation of strongly connected components in generalized arc consistency algorithm for alldifferent constraint. In: Proceedings of the 32nd International Joint Conference on Artificial Intelligence. 2023, 228 |
| [12] |
|
| [13] |
|
| [14] |
|
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
Wang Y, Cai S, Yin M. Two efficient local search algorithms for maximum weight clique problem. In: Proceedings of the 30th AAAI Conference on Artificial Intelligence. 2016, 805–811 |
| [19] |
Pan S, Wang Y, Yin M. A fast local search algorithm for the Latin square completion problem. In: Proceedings of the 36th AAAI Conference on Artificial Intelligence. 2022, 10327–10335 |
| [20] |
|
| [21] |
|
| [22] |
|
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
|
| [27] |
|
| [28] |
|
| [29] |
|
| [30] |
|
| [31] |
|
| [32] |
|
| [33] |
|
| [34] |
|
| [35] |
|
| [36] |
|
Higher Education Press
/
| 〈 |
|
〉 |