Ask your own question, for FREE!
Mathematics 18 Online
OpenStudy (sriram):

This is a type of question where you need to imagine & think. if you were given a number of points on the cartesian plain, how would you draw a straight line so that it passes through most of the points?

OpenStudy (anonymous):

1, no problem, 2 no problem, 3 no problem, so start with 4...

OpenStudy (sriram):

i am sorry can you explain it again

OpenStudy (anonymous):

Just thinking out loud... Obviously the cases of 1 point, 2 points and 3 points are not a problem (trivial if you like). So the first case of interest is 4 points where you can manage a line through 3 if you get lucky and only 2 if not (ie most of the time).

OpenStudy (sriram):

what would you do if u were given a set of 100 points in the form of (x,y)??

OpenStudy (anonymous):

I'd have to test them with a program....

OpenStudy (anonymous):

Have to think about the complexity of that, running time, etc... See if there is some efficient algorithm.

OpenStudy (sriram):

i want that algorithm

OpenStudy (anonymous):

It is called "Curve fitting" (finding the general equation for a set of discrete data value). Mathematica does it very well (with the Fit[] function)

OpenStudy (anonymous):

Hmm, the requirement "pass through" is not quite the same as "best fit"...

OpenStudy (anonymous):

You are absolutly right. But I presume what the OP is searching is fitting, as a 100+ points problem is very uncommon.

OpenStudy (sriram):

this is not a question to be solved in the exam. it jst checks ur imagination

OpenStudy (anonymous):

sir are we allowed to go in further dimensions ? we can fold the 2nd dimension into a 3rd dimension....like they do it in string theory ??

OpenStudy (anonymous):

For passthough, one naive algorithm would be : curr_number_point_passtrough = 0 max_number_point_passtrough = 0 bestmatch = NULL forall (a,b) in (point,point) { e = find_equation(a,b) forall c in point { if(e(a) == true) curr_number_point_passtrough++ } if(curr_number_point_passtrough > max_number_point_passtrough) { max_number_point_passtrough = curr_number_point_passtrough bestmatch = e } }

OpenStudy (anonymous):

Correction : it's " if(e(c) == true)"

OpenStudy (anonymous):

Thinking about this a bit, it's something of a problem, since you are likely going to have some outliers if the point selection is just random and you would first want to eliminate these. This would be much less of a problem for experimental data where, depending on the experiment, more points are likely to lie on or near a line.

OpenStudy (anonymous):

However, if point are distribued randomly, it is very likely that any line that cross at least two point also cross a total number of point close to the maximum number of point crossed.

OpenStudy (anonymous):

I think OP has to specify the problem a bit more. Even with relatively few random points, the likelihood is you cannot pass through a majority.

OpenStudy (anonymous):

My attempt with 100 pair of coordinates, creating linking line between 2 points : http://i.imgur.com/1MPBu.png No more than 4 point in a lign with a normal distribution of 100 pts.

OpenStudy (anonymous):

Yes, that just about says it all, really:-)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!