From this post:
Suppose we are given n points A1,…,An∈R2. The task is to find a point x=(x1,x2)∈R2 such that the sum of distances to the points A1,…,An in the ℓ1-norm is minimized. Formulate this problem as a linear program.
There are at least two (primal) formulations. A variable splitting technique can look like:
min∑i,jy+i,j+y−i,jy+i,j−y−i,j=xj−Ai,jy+i,j≥0,y−i,j≥0 |
A different formulation is
min∑i,jyi,j−yi,j≤xj−Ai,j≤yi,jyi,j≥0 |
I don’t think this formulation has a name. We can drop yi,j≥0 if we want, as this is implied by −yi,j≤yi,j.
If you let mathematicians loose on this, you may end up with formulation 2 stated as:
minimize1⊤2nysubject to−y≤(1n⊗I2)x−vec(A)≤yy≥02n |
I don’t really like this type of notation: at least for me it is much less intuitive.
The first formulation has fewer equations but more variables. The second formulation has more constraints as we need to split −yi,j≤xj−Ai,j≤yi,j into xj−Ai,j≥–yi,j and xj−Ai,j≤yi,j. I don’t think there is much reason to choose one formulation above the other. Depending largely on my mood I use either version 1 or 2.
No comments:
Post a Comment