# Algorithm to Assign Values Based on Constraints

I have variables x y and z, and I have the values that they can be assigned to, I.E. x can be assigned 1,2, or 3, y can be 1, and z can be 2. The problem is a constraint that says once a value has been taken by a variable, no other variables can have that value.

The issue that I am running into is if I start with x, how can I efficiently tell that it's value should be 3?

• Is the set of possible values can contain an infinite number of elements? – user3563894 Sep 3 '18 at 16:06
• Also, how the set of possible values is represented by? – user3563894 Sep 3 '18 at 16:09
• Set of values is finite, and I am not sure I understand your second question. – Crispies Sep 3 '18 at 16:14
• Can we assume that the set of values is represented by a set $S=\{v_1,v_2,\ldots,v_n \}$? – user3563894 Sep 3 '18 at 16:16
• And is there a single constraint as described above, or there are multiple constraints, and one of them is that "once a value has been taken by a variable, no other variables can have that value"? – user3563894 Sep 3 '18 at 16:19