# Find a line in 3D which has minimum property

by Tal Rofe   Last Updated October 11, 2018 18:20 PM

Given N lines in the 3D, I need to give algorithm which solves the following:

Find a line L such that:

Let $$l_1, l_2, l_3,...,l_N$$ be the N lines.

Let $$d(l_i, L)$$ the distance between $$l_i$$ to $$L$$.

Let $$S=\sum_{i=1}^N d(l_i, L)$$

Find L which minimizes S

Any algorithm is acceptable

I thought about bringing the Machine Learning into this Q. Using the ML's algorithms may help. I know there is an algoritm solves a problem that is similar to mine, just that in this problem the lines are points in 3D, not lines. So maybe I can transform the lines in my problem to points which represents the lines, and then solve the problem using the solution to the problem I mentioned.

Tags :