1. A computer implemented method for storing and recognizing patterns using an associative memory, the method comprising the steps of: a) accepting an input address pattern ũ; b) computing an associative memory by computing an inhibitory memory matrix (A I ) by coding synaptic weights 0 and −1 according to the following equation: 
 A I =−(A P −A), wherein A is a memory matrix according to a Willshaw associative memory format constructed from a set of address pattern vector (u μ ) of length m and content pattern vector (v μ ) of length n, the set having M number of pattern pairs and A P being a random matrix of size, m×n; c) compressing the matrix A I or pruning synapses with weight 0; d) computing a vector of retrieval results ũ*A I ; e) applying a threshold calculated as follows: 
 Θ I =Θ−0, where Θ is a set of thresholds for the underlying Willshaw associative memory (A), and θ is a vector of input activities, and the random matrix A P describes a diluted neural network structure in which only a fraction of synapses is realized between neurons of the neural network structure; f) computing a set of sparse random patterns (w μ ), the random patterns having size n I and having I I active components, wherein the size n I is calculated according to the following formula: n 1 ≈ M ⁢ ⁢ k ⁢ ⁢ l 1 m ⁢ ⁢ ln ⁢ ⁢ k , where k is the average of the sum of 1's in an input address vector (u μ ) over a given set of input address vectors (u μ ); g) computing a sparse random matrix (W I ) using the M pairs of sparse random patterns (w μ ); h) computing a compressed lookup-table (cLUT) using the sparse random matrix (W I ); i) selecting a retrieval result from the vector of retrieval results for output; and j) outputing the retrieval result.