# Question:Intersection or centroid

## Question:Intersection or centroid

Is the shortest distance to the centroid or the intersection?

Just a simple problem really.  I thought the centroid of a set (let's say 4 at this point) of points was the shortest total distance of all points.  Then I thought isn't the intersection of the lines between the points the shortest?  Maybe that intersection point is a shorter total distance than the centroid point?

Let's make it an interesting problem...

We have 4 groups of marines stuck in the Afghan desert (for simplistic purposes, for now, we'll just use an x, y grid).  A helicopter is coming in to pick them.  Where should the helicopter direct the marines for the fastest pickup?  The centroid point? or the point of intersection of the two lines connecting the opposite set of groups?  The marine positions are stationed at (0,0) (0,16km) (14km,0) and (28km, 14km).

We can use the geometry package here, but there are other ways to accomplish the same thing without using the package. It's funny (well not) but because the geometry package uses names within the commands the normal variable assigning is not needed in some places.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

So there you have it, the best point for the helicopter to rendezvous with his marines is at the intersection point.  Had the helicopter landed at the centroid, he would have forced his marines to travel a total extra distance of  =  km  .  Granted one group will have to travel farther than the rest but as a whole the groups need to regroup at the intersection for minimal total travelled distance.  5km is a fair amount by vehicle standards, but on foot at dawn is daunting and quite scary.  I have heard in the service field where a service tech was travelling in Bosnia with a group of soldiers in a jeep and it was getting dark and the soldiers were getting scared, they told the tech guy that they need to find a place to hide.  Now you could imagine being in Afghanistan, it's not a safe country at the best of times and at night that's something else entirely.  You could only imagine if it was getting dark and you were in the middle of nowhere.