5.188. lex_between
| DESCRIPTION | LINKS | AUTOMATON |
- Origin
- Constraint
lex_between(LOWER_BOUND,VECTOR,UPPER_BOUND)
- Synonym(s)
- Argument(s)
-
LOWER_BOUND collection(var−int) VECTOR collection(var−dvar) UPPER_BOUND collection(var−int) - Restriction(s)
-
required(LOWER_BOUND,var) required(VECTOR,var) required(UPPER_BOUND,var) |LOWER_BOUND|=|VECTOR| |UPPER_BOUND|=|VECTOR| lex_lesseq(LOWER_BOUND,VECTOR) lex_lesseq(VECTOR,UPPER_BOUND) - Purpose
The vector VECTOR is lexicographically greater than or equal to the fixed vector LOWER_BOUND and lexicographically smaller than or equal to the fixed vector UPPER_BOUND.
- Example
-
(
)〈5,2,3,9〉, 〈5,2,6,2〉, 〈5,2,6,3〉 The lex_between constraint holds since:
- Usage
This constraint does usually not occur explicitly in practice. However it shows up indirectly in the context of the lex_chain_less and the lex_chain_lesseq constraints: in order to have a complete filtering algorithm for the lex_chain_less and the lex_chain_lesseq constraints one has to come up with a complete filtering algorithm for the lex_between constraint. The reason is that the lex_chain_less as well as the lex_chain_lesseq constraints both compute feasible lower and upper bounds for each vector they mention. Therefore one ends up with a lex_between constraint for each vector of the lex_chain_less and lex_chain_lesseq constraints.
- Algorithm
- Reformulation
The lex_between(LOWER_BOUND,VECTORS,UPPER_BOUND) constraint can be expressed as the conjunction lex_lesseq(LOWER_BOUND,VECTORS) ∧ lex_lesseq(VECTORS,UPPER_BOUND).
- Systems
- See also
lex_less, lex_lesseq, lex_greater, lex_greatereq, lex_chain_less, lex_chain_lesseq.
- Key words
characteristic of a constraint: vector, automaton, automaton without counters.
constraint network structure: Berge-acyclic constraint network.
- Automaton
Figure 5.188.1 depicts the automaton associated with the lex_between constraint. Let Li, Vi and Ui respectively be the var attributes of the ith items of the LOWER_BOUND, the VECTOR and the UPPER_BOUND collections. To each triple (Li,Vi,Ui) corresponds a signature variable Si as well as the following signature constraint:
(Li<Vi)∧(Vi<Ui)⇔Si=0 ∧
(Li<Vi)∧(Vi=Ui)⇔Si=1 ∧
(Li<Vi)∧(Vi>Ui)⇔Si=2 ∧
(Li=Vi)∧(Vi<Ui)⇔Si=3 ∧
(Li=Vi)∧(Vi=Ui)⇔Si=4 ∧
(Li=Vi)∧(Vi>Ui)⇔Si=5 ∧
(Li>Vi)∧(Vi<Ui)⇔Si=6 ∧
(Li>Vi)∧(Vi=Ui)⇔Si=7 ∧
(Li>Vi)∧(Vi>Ui)⇔Si=8.
Figure 5.188.1. Automaton of the lex_between constraint

Figure 5.188.2. Hypergraph of the reformulation corresponding to the automaton of the lex_between constraint
