Analytic solution of a neural network theory based on an Ising spin system analogy