The quotient can be defined for automata or transducers of any type, that is, over any kind of alphabet and with any kind of weight semiring.
The quotient of an automaton
A with respect to an equivalence on its states
is an automaton B obtained from
A by merging equivalent states.
The quotient is consistant if the
equivalence is congruent with the transitions, i.e. if,
for every pair (p,q) of equivalent states, the two
following properties hold:
Then, the quotient of A with respect to the equivalence ≡ is the automaton B where
The co-quotient of an automaton A with respect to an equivalence ≡ is the transposition of the quotient of the transposition of A with respect to ≡. To be consistent, ≡ must be congruent with the reverse transitions of A.
The minimal co-quotient of A is the co-quotient with respect to the coarsest equivalence congruent with the reverse transitions of A.
Note that the quotient does not involve product of weights. In particular, even if the semiring of weights is non commutative -- the consistency of transposition can then be problematic -- the co-quotient of A is well defined and equivalent to A.
Two algorithms which computes the coarsest equivalence congruent with the transitions of a given automaton A are implemented in Awali. Both algorithms are refinement algorithms. They usually start with an equivalence where all states with the same final weight are equivalent, and split equivalence classes until the equivalence is congruent with the transitions.
In Awali, final weights are represented as special transitions whose target is the post-final state; the equivalence is therefore initialised as the class of all (normal) states, the singleton containing the pre-initial state, and the singleton containing the post-initial state.
At each round, for every class C and every state p in this class, the signature of p is computed: the signature of p is a list of triples (D,a,k) where k (different from zero) is the sum of the weights of the transitions with source p and label a to a state of class D. The signatures are weakly sorted such that there is no duplicate and two lists with the same set of entries are equal. The class C is then split into subclasses characterised by signatures.
If there is no splitting during a round, the algorithm ends.