应用背景Asoriginallydefinedinartificialintelligence,constraintsenumeratethepossiblevaluesasetofvariablesmaytake.Informally,afinitedomainisafinitesetofarbitraryelements.Aconstraintsatisfactionproblemonsuchdomaincontainsasetofvariableswhosevaluescanonlybetakenfromthedomain,andasetofconstraints,eachconstraintspecifyingtheallowedvaluesforagroupofvariables.Asolutiontothisproblemisanevaluationofthevariablesthatsatisfiesallconstraints.Inotherwords,asolutionisawayforassigningavaluetoeachvariableinsuchawaythatallconstraintsaresatisfiedbythesevalues.关键技术Constraintprogrammingistheuseofconstraintsas