Automata and neural networks