Solving Riddle: Find Closest 2 Points on a Plane in O(N)

  • Context: Undergrad 
  • Thread starter Thread starter Atlas
  • Start date Start date
  • Tags Tags
    Plane Points
Click For Summary

Discussion Overview

The discussion revolves around a riddle concerning the computational problem of finding the two closest points among N points on a plane, with the goal of achieving a time complexity better than O(N²). Participants explore potential solutions and the feasibility of such an improvement.

Discussion Character

  • Exploratory, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant presents the riddle and seeks assistance in finding a solution.
  • Another participant humorously suggests a simplistic approach by randomly picking points.
  • Some participants express skepticism about the existence of a solution that meets the time complexity requirement.
  • A participant mentions a "simple" solution that operates in O(N * log²(N)) and a more complex one that achieves O(N * log(N)).
  • One participant poses a theoretical question about minimizing an arbitrary function of two points, suggesting that it may lead to a Θ(n²) complexity.
  • A link to an external resource claiming to provide a solution is shared by another participant.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the existence of a solution better than O(N²), and multiple competing views regarding the complexity of potential solutions are present.

Contextual Notes

Some assumptions about the nature of the points and the definition of "closest" may not be explicitly stated, and the discussion does not resolve the mathematical steps or complexities involved in the proposed solutions.

Atlas
Messages
5
Reaction score
0
Here's a riddle I'm having trouble solving:
There are N points on a plane. Find the two points that are closest, in time better than O(N^2).

Any idea?
Thanks :)
 
Mathematics news on Phys.org
randomly pick point p. then choose point P+1... :-P
 
Nice problem. Are you sure there is a solution? I'll think on it some more if you know that it can be solved (well, I'll think on it anyways).
 
I know there's a so-called "simple" solution that requires O(N * log^2(N)), and a more complex one that requires O(N * log(N)).
 
Here's a hint:

If the problem was "Given an arbitrary function f(P, Q) of two points, find the pair of points that minimizes f(P, Q)", can you prove that the best algorithm is Θ(n²)?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K