# Is it possible to count the total number of local minima for a scalar, multivariate function?

We can assume the function is differentiable, but it is also non-convex and setting the gradient equal to zero has no analytical solution.

We can also assume that the domain is bounded, namely the variables in the domain sum to unity: $$x_1 + x_2 + ... + x_n \leq 1$$ and $$0 \leq x_i \leq 1$$. The maximum number of local minima is equal to the number of variables (dimensions), $$n$$.

I was thinking of using some sampling method like either just sampling the entire space or using some MCMC method; however, if there is some noise that is finer than the grid spacing then even this won't work (something like this: http://users.iems.northwestern.edu/~ama132/images/test1.svg)

Could there be some computational methods from machine/deep learning that might be helpful here? Or maybe some analytical methods from computer science? I think the part I'm struggling with is making sure I've counted ALL the local minima (critical points is also fine).

If it helps, the function I'm considering is quite simple. It's just the sum of an entropy term with an energy term, namely, $$f(x_1, x_2, ..., x_n) = \sum\limits_{i=1}^n x_ilogx_i + \frac{1}{2}\sum\limits_{i=1}^n\sum\limits_{j=1}^n x_iX_{ij}x_j$$, where $$X$$ is a symmetric interaction matrix of real number scalars with diagonal zero.