# Regular constraint

### From Glossary

A global constraint that is defined on a fixed-length sequence of finite-domain variables and stating that the values taken by this sequence of variables belongs to a given regular language. It allows us to express relations between the variables of a sequence such as the maximum length sub-sequence of identical values.

Formally, a *deterministic finite automaton* (DFA) is described by a 5-tuple where is a finite set of states, is an alphabet, is a transition function, is the initial state, and is the set of final (or accepting) states. Given an input string, the automaton starts in the initial state and processes the string one symbol at the time, applying the transition function at each step to update the current state. If the last state reached belongs to the set of final states , then the string is accepted. All strings that are accepted by M generates the language .

Now, let be a DFA and let be a set of variables with domain for . Then .