automaton for head normalization