-2

Part 1:

Given $n$ points $(x_1,y_1), \ldots, (x_n,y_n)$ on the plane, apply calculus tools to find equations on the point $(x,y)$ that minimizes the sum of distances from $(x,y)$ to the given points. You should formulate your answer in terms of vectors $r_1,r_2,\ldots,r_n$, where $r_i$ is the unit vector that points from $(x,y)$ to $(x_i,y_i)$ for all $i=1,2,\ldots,n$.

Diagram

I have tried to solve this part by finding the vector equations of the 5 points, where 2 diagonals intersect. For Eg, To find vector AC, it is the sum of AO and OC, which is in unit vector form according to the diagram, -r1+r3 .

AC= -r1 +r3 BD= -r2 + r4 CE= -r3 + r5 DA= -r4 + r1 EB= -r5 + r2

This forms like a irregular Pentagon. So, how do i find a point which minimises the sum of distances from the vertices of the pentagon?

But i do not know if this is the correct way to go about coz I had great difficulty to start with the question. Hence, it would be very helpful if you could help me with starting the question, if my method is wrong. Thank you :)

  • Hi @ Charan If you show what you did towards the solution after the problem statement is over, your chances of getting help here increase. – Narasimham Jun 30 '18 at 23:52

1 Answers1

-1

Let's solve the Math and then think about the expected result.

Defining the matrix:

$$ A = \begin{bmatrix} {x}_{1} & {y}_{1} \\ {x}_{2} & {y}_{2} \\ \vdots & \vdots \\ {x}_{n} & {y}_{n} \end{bmatrix} $$

Then the problem is given by:

$$ \arg \min_{p} \frac{1}{2} {\left\| \boldsymbol{1} {p}^{T} - A \right\|}_{F}^{2} $$

Where $ p \in \mathbb{R}^{2} $ and $ \boldsymbol{1} \in \mathbb{R}^{n} $ with $ \boldsymbol{1} = {\left[ 1, 1, \ldots, 1 \right]}^{T} $.

The above is a convex problem with respect to $ p $.
The Gradient is given by:

$$\begin{align*} \frac{\partial {\left\| \boldsymbol{1} {p}^{T} - A \right\|}_{F}^{2} }{\partial p} & = \left( x \boldsymbol{1}^{T} - {A}^{T} \right) \boldsymbol{1} \\ & \Rightarrow \frac{\partial {\left\| \boldsymbol{1} {p}^{T} - A \right\|}_{F}^{2} }{\partial p} = 0 \\ & \Rightarrow p = {\left( \boldsymbol{1}^{T} \boldsymbol{1} \right)}^{-1} {A}^{T} \boldsymbol{1} \end{align*}$$

What's the meaning of the result?
Well, it is the expected solution as $ {\left( \boldsymbol{1}^{T} \boldsymbol{1} \right)}^{-1} = \frac{1}{n} $ and $ {A}^{T} \boldsymbol{1} $ is basically the summation of elements.
So basically the solution is given by the point which is the mean of all given points.

This is expected as we now that the mean value is the value which minimizes the $ {L}_{2} $ Distance.

Royi
  • 10,663
  • 1
    The mean of the given points minimizes the sum of the square of the distances, but not the sum of the distances, which is the objective of this question. – robjohn Jul 02 '18 at 04:48
  • @robjohn, The OP question wan't clear on that so I assumed that would fit. I will derive later the answer for the $ {L}{1} $ norm of the vector of $ {r}{i} $. Needless to say the answer will be the Median. – Royi Jul 02 '18 at 05:27