Minimize function over discrete set

72 Views Asked by At

I want to solve the following optimization problem

enter image description here

where $1 \leq p \leq n, p \in \mathbb{N}$ and $c_i \in \mathbb{R}$. How can I derive a closed form solution? My approach is to relax the set $\{-1,0,1\}^n$ to $[-1,1]^n$. The corresponding lagrangian is then given by

$$ \mathcal{L}(x,\lambda,\mu,\eta) = \sum_{i=1}^n c_i x_i + \lambda\{\sum_{i=1}^n x_i^2 - p\} + \sum_{i=1}^n\mu_i\{x_i - 1\} + \sum_{i=1}^n\eta_i\{-x_i - 1\}. $$ then I can state the KKT conditions:

  1. $\nabla_x\mathcal{L} = 0$
  2. $\sum_{i=1}^n x_i^2 - p = 0$
  3. $\mu_i (x_i - 1) \leq 0$
  4. $\eta_i (-x_i - 1)\leq 0$
  5. $\mu_i, \eta_i \geq 0$
  6. $\mu_i (x_i - 1) = 0$
  7. $\eta_i (-x_i - 1) = 0$

But I think this is hopeless. Can someone please help me?