Let's look at four (m) points in 3-d space- I want to generalize to n-d, but 3 should suffice for a solution ( Part 1).
a= (x1, y1, z1)
b= (x2, y2, z2)
c= (x3, y3, z3)
.
.
p= (x , y , z)
Find point q = c1* a + c2* b + c3* c + ..
where c1 + c2 + c3 +.. = 1
and c1, c2, c3, .. >= 0
s.t.
euclidean distance pq is minimized.
What algorithms can be used ? Idea or pseudocode is enough.
Part 2: solve for m points in n-dimensions :
I thought it would be trivial to generalize to m points in n dimensions, but turns out it is not straightforward. I created another problem for the general problem here: minimize euclidean distance from sets of points in n-dimensions