What is the n queens problem as a constraint problem?
Answer: A
Making one variable per column, with the row as its value, builds the column constraint into the representation and leaves only the row and diagonal constraints to state. The square by square model has far more variables and propagates worse. Constraints are not variables, and a single variable discards all structure. Encoding part of the problem into the representation, so that it cannot be violated at all, is one of the most effective modelling techniques available.
Please log in or register to report this question.