Let $f$ be a probability density function (positive such that $\int_{\mathbb{R}} f(x) \mathrm{d} x = 1$) and $X_0 = \{x_n\}_{1\leq n \leq N}$ be $N$ given real points. We also fix $1 \leq P \leq N$ an integer.
For $X$ a subset of $X_0$ of size $P$, we set $$f_X(x) = \frac{1}{P} \sum_{x_0 \in X} g(x-x_0),$$ where $g$ is a Gaussian of mean $0$ and variance $1$.
We consider the following optimisation problem: $$\min_{X \subset X_0} \int_{\mathbb{R}} \lvert f (x) - f_X(x) \rvert \mathrm{d} x.$$
This means that we aim at approximating $f(x)$ optimally with a density of the form $f_X$, the challenge being to adequately select $P$ points among the $N$ that are initially given.
Is there any smart way to tackle such optimization task?
NB: $g$ can be changed for any other density if the problem is easier to solve.