HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Isn't Domain of a variable nothing but a constraint?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
butnothingconstraintisnvariabledomain

Problem

In Constraint programming we have Variables and their Domains and then all the constraints, but if you at the concept of a domain of a variable it is nothing but another type of constraint, you are saying that this variable can take all these values.
Is there any particular reason why domain is defined as a different concept than constraints?

Solution

As you observe, restricting the domain of a variable has exactly the same effect as applying a unary constraint to it.

One situation where you might prefer to use unary constraints rather than restricted domains is when you want to control very tightly the relations that are allowed to be used in constraints. For example, if you want to investigate the computational complexity of CSP with a particular class of constraint languages. On the other hand, such investigations often assume that all unary relations are included in the constraint language, which is equivalent to fixing a global domain but allowing the domain of any variable to be any subset of that. (This is known as the "conservative" case because of certain algebraic properties of the constraint langauges.)

Context

StackExchange Computer Science Q#42994, answer score: 2

Revisions (0)

No revisions yet.