# Lexicographic Ordering constraint

is a global constraint that allows the comparison of sequences of variables. Given two sequences $LaTeX: x$ and $LaTeX: y$ of $LaTeX: n$ variables, $LaTeX: \langle x_1 \dots x_n \rangle$ and $LaTeX: \langle y_1 \dots y_n \rangle$, let $LaTeX: x \preceq_{lex} y$ denote the lexicographic ordering constraint. The constraint holds iff $LaTeX: n = 0$ or $LaTeX: x_1 < y_1$ or $LaTeX: x_1 = y_1$ and $LaTeX: \langle x_2 \dots x_n \rangle \preceq_{lex} \langle y_2 \dots y_n \rangle$.