The problem of binary optimization is discussed. By analyzing the generalized Hopfield model we obtain expressions describing the relationship between the depth of a local minimum and the size of the basin of attraction. The shape of local minima landscape is described. Based on this, we present the probability of finding a local minimum as a function of the depth of the minimum. Such a relation can be used in optimization applications: it allows one, basing on a series of already found minima, to estimate the probability of finding a deeper minimum, and to decide in favor of or against further running the program. It is shown, that the deepest minimum is defined with the gratest probability in random search. The theory is in a good agreement with experimental results.