Choose one global direction and impose it on every adjacent pair. Keep , introduce , and impose for each the relation
Because the same occurs everywhere, transitivity gives either a strictly increasing whole sequence or a strictly decreasing one. Choosing independently between and at each edge would merely require adjacent values to differ and would incorrectly allow zigzags.
If a binary formulation is required, replace each ternary relation by a hidden-variable encoding. Add a variable with domain
Use three binary constraints: the sign component of equals , its first numeric component equals , and its second equals . These enforce exactly the relation above while leaving the original variable domains unchanged. Each auxiliary domain has values.
For , the projected solutions in the original variables number when , and zero otherwise. In particular gives exactly and . For , direction is irrelevant and the projected solutions number , not .

Articles by others on the same topic (0)

There are currently no matching articles.