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.

Related Questions

Math Pattern question

Updated October 18, 2017 19:20 PM

Longest path of a matrix

Updated April 25, 2018 07:20 AM

Problem implementing a QR factorization

Updated May 04, 2015 01:08 AM

How page rank relates to the power iteration method

Updated April 10, 2015 20:08 PM