0

Given we have 2 trees and their coordinates on xy plane is : $(-2,1)$, $(0,2)$ and their weights are $3$ and $4$ respectively. We want to plant a new tree with the condition that the weighted sum of the absolute distances from the existing trees will be minimized. Without including the weights I formulate as below:

$$\min. (|x1 + 2| + |x2 -1|) + (|x1| + |x2 - 2|) $$

where $(x1,x2)$ are the coordinates of the tree that will be planted.
How could I include the weights of the existing trees in the formula?
One way I can think of is as below:

$$\min. 3(|x1 + 2| + |x2 -1|) + 4(|x1| + |x2 - 2|)$$

Although I can't intuitively get how this would be the logical way.

moli
  • 69

1 Answers1

2

Yes, that is the correct formula for weighted sum of absolute distances. The optimal $(x_1,x_2)$ turns out to be $(0,2)$, with objective value $3(2+1)+4(0)=9$.

RobPratt
  • 45,619