A constraint is some form of condtion that a solution or state has to satisfy. Often it is expressed in the form an equality or inequality between variables (e.g. cost < 100, cost = number × price). Sometimes the constraints are the main aspect of interest, for examplem "can I pack all of the grocery in the fridge?", in which case it is called a constraint satisfaction problem. In other occasions we may have an optmisation problem such as "how can I feed four people as cheaply as possible?", but where there are additional constraints such as "Jill is vegan" and "Tom has a nut allergy".
Used in glossary entries: constraint satisfaction