Consider vector $\mathbf x = (x_1,x_2,\cdots,x_n)$, $a$ a scalar, $\mathbf b = (b_0,\cdots,b_0)$ and $k < n$.

I want to transform $\mathbf x$ ($\mathbf y = a\mathbf x+\mathbf b$) such that if I set $k$ elements of the resulting vector ($\mathbf y$) to zero, it is modified as less as possible.

Or equivalently, what is the best transformation of type $\mathbf y=a\mathbf x+\mathbf b$ such that, projecting $\mathbf y$ into $k$-sparse vectors, leads to minimum change (in $\ell$-2 norm sense)? (Also what values of $\mathbf y$ are set to zero?)

Edit: Actually, this problem arouse from this original problem: Find $k$-sparse vector $\mathbf x \in \mathbb R_+^n$ which its periodic auto-correlation function (PACF) has constant sidelobes i.e. $c_1=c_2=\cdots=c_n$, where $c_n = \sum_m \tilde x_{n+m}\tilde x_m$.

One way to numerically do this is minimizing $\sum_{l=1}^{n-1}(c_l-c_{l+1})^2$ (without considering sparsity constraint) and finding a non-sparse $\mathbf x$ , then making it $k$-sparse using the transform stated in the question (since the property of constant sidelobes is preserved under this transform). So I'm looking for the best transform of this kind.