1
$\begingroup$

When solving a linear programming problem in MATLAB using linprog of the form

$$ \min c^T x $$

subject to

$$ Ax \leq b, \; \left\| x \right\|_{1} = 1 $$

if we need to enforce the additional constraint that $L_1$ norm of $x$ is $1$, or $\|x\|_1=1$, how can this be converted into a set of inequations of the above form so that the trivial solution $x=0$ can be avoided?

3 Answers 3

2

Unfortunately, this problem cannot be formulated as an LP, since the constraint $\| x \|_{1}=1$ describes a non-convex set and the feasible set of linear programming problem is always a convex set.

  • 0
    Would you agree with the answer below?2017-01-02
  • 0
    @Linalg's answer below gives you a couple of work arounds. Neither amounts to formulating the original problem as an LP. Sumit's answer is incorrect, since the author of the question isn't trying to minimize $\ x \|_{1}$.2017-01-02
  • 0
    Could you tell me how this constraint is a non-convex set? Conventionally all norms are convex sets.2017-01-04
  • 0
    $x=(1,0,0)$ has $\| x \|_{1}=1$. $y=(-1,0,0)$ has $\| y \|_{1}=1$. $(1/2)x+(1/2)y=(0,0,0)$ is a convex combination of $x$ and $y$ which has norm 0. Thus the set of vectors with norm 1 isn't a convex set. Note that the set of vectors with $\| x \|_{1} \leq 1$ is a convex set.2017-01-04
  • 0
    @Sumit: you are confusing convex _functions_ and convex _sets_. Norms are indeed convex _functions_. But the set described by $\|x\|_1 = 1$ is not a convex _set_.2017-08-05
  • 0
    Thanks @MichaelGrant for clarifying.2017-08-06
2

As Brian notes, the problem is not convex. There are two workarounds for this.

  1. It seems like the right hand side of $||x||_1=1$ is arbitrary. Maybe you can replace it with $x_1=1$ (if you know that $x_1\geq 0$)? Or solve two problems: one with $x_1=1$ and one with $x_1=-1$? This only works if you know $x_1 \neq 0$.

  2. You can use binary variables to deal with the nonconvexity: $$ \sum y_i = 1$$ $$ y_i = x_i + s_i$$ $$ y_i = -x_i + t_i$$ $$ 0 \leq s_i \leq M b_i$$ $$ 0 \leq t_i \leq M (1-b_i)$$ $$ y_i \geq 0$$ $$ b_i \in \{0,1\}$$ The big-M constraints set either $s_i=0$ or $t_i=0$. Consequently, $y_i = x_i$ or $y_i = -x_i$. Since $y_i\geq 0$, we obtain $y_i = |x_i|$.

-1

We have

$\|x\|_1= |x_1| + |x_2| + ... + |x_n|$

which is equivalent to

$ \max\{x_1,-x_1\}+\max\{x_2,-x_2\}+...+\max\{x_n,-x_n\}$

So $\|x\|_1=1$ can be substituted as

$y_i \geq x_i$

$y_i \geq -x_i$

$y_i \geq 0$

Then the minimum $L_1$ norm solution for $x$ is given by $y$.

  • 0
    Your solution is only valid when $y$ is minimized. If you add a constraint $\sum y_i=1$, you do not exclude $x=0$, since $y_1=1$, $ y_i=0$ ($i\geq2$) is a feasible solution.2017-01-02