In this part of the lecture, we prove a Myhill-Nerode style theorem for weighted automata, which says that for every weighted automaton, there is a canonical one that recognises the same language, and is minimal in a certain sense. One way of stating the minimality condition is to use homomorphisms of weighted automata, as defined below.
Homomorphisms of weighted automata. Suppose that we have two weighted automata and over the same input alphabet . A homomorphism from to is defined to be a linear function from the state space of , call it , to the state space of , call it , which is consistent with the structure of the two automata, in the following sense. The initial state of is mapped to the initial state of , and the following diagrams commute for every
where are the output functions of the respective automata, and are the transition functions.
If there is such a homomorphism, then the functions computed by the two automata are the same, as can be shown by induction on the length of the input word. An isomorphism is a homomorphism whose inverse is also a homomorphism. It is not difficult to show that if a homomorphism is a bijection, as a function on state spaces, then it is an isomorphism.
We now state the minimisation theorem for weighted automata. Call an automaton reachable if every state in its state space is a finite linear combination of reachable states, i.e. states that can be reached by reading input words.
Theorem. Let be a function computed by a weighted automaton. There exists a weighted automaton, called the syntactic automaton of , which computes and such that every reachable weighted automaton computing admits a homomorphism into the syntactic automaton.
Proof. The proof is essentially the same as for the classical Myhill-Nerode theorem.
Define the continuation of a word to be the function
which we will denote by . Before defining the syntactic automaton, we define a bigger automaton, called the continuation automaton. States of the continuation automaton are vectors in , which is a vector space, albeit of infinite dimension. The initial state is the continuation of the empty word. The output function maps a state to its value on the empty word. The transition function
is simply a permutation of coordinates:
It is easy to see that this function is linear, and that it maps a continuation to the continuation . Note how the choice of the function only plays a role in the definition of the initial state of the automaton.
Define the syntactic automaton to be the continuation automaton with the state space restricted to finite linear combinations of continuations. We need to show that this automaton is well-defined, i.e. the transition functions stay within the state space. This is because the transition functions are linear, and they map continuations to continuations.
We now show that every reachable weighted automaton recognising admits a homomorphism into the syntactic automaton. Let be be such a weighted automaton, and let be its states. We first show that there is a homomorphism into the continuation automaton, and then we show that the image of the homomorphism is actually the syntactic automaton. Define a function
which maps a state to the function that maps to the value of the automaton after reading , assuming that the initial state was changed to . This is clearly a linear function, and it is not difficult to see that it is a homomorphism.
It remains to show that the image of is actually the syntactic automaton. Since any homomorphism maps reachable states to reachable states, it follows that the image of is included in the states of the syntactic automaton (because of the assumption that was reachable). Finally, the homomorphism has the property that if is an input word, then the state of after reading is mapped to the continuation , and therefore is surjective.
Leave a Reply