Блог пользователя shas19

Автор shas19, история, 8 лет назад, По-английски

Given N points I need to find Closest point among all the given points to all the given points in plane in less than O(n^2).

The distance used is Euclidean distance.

I came to know that for any metric distance we can use kd-Tree to solve such problems. (I may be wrong)

I also came to know that for chebychev distance the problem can be solved using orthogonal range querying and manhattan distance problem can also be converted into chebychev distance problem.

Is there any way to solve Euclidean distance problem more easily with some other trick?

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by shas19 (previous revision, new revision, compare).

»
8 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Voronoi diagram? :D

»
8 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

You can use Voronoi diagram to solve the problem. Nearest points are neighbour cells in it. But this solution considered to be true hell.

Another one solution is to choose some random set of directions and for all point try to find the answer among closest points in these directions.

Also, take a look: link

There also was problem on SPOJ or something like that, but I don't remember it :)

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Deleted.

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    My Russian isn't that great, but I believe this is an explanation for the closest pair of points, not the closest point to every point.