Discrete time cellular neural networks: theory and global learning algorithms