Recurrent neural networks: A constructive algorithm, and its properties