Question: Given is a large paper with n different points with coordinates (x 1 , y 1 ),(x 2 , y 2 ), . . .

Given is a large paper with n different points with coordinates (x1, y1),(x2, y2), . . . ,(xn, yn). Notice that by folding the paper along a single line we can make some of the points align. For example, if the points are (1,2), (2,1), and (4,3), then if we fold along the line going through the origin at the 45 degree angle, the points (1,2) and (2,1) will align. Design an O(n2 log n) algorithm that finds the maximum number of pairs of points that can be aligned.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!