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

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

Hi.

As always the question can be stated fairly easily:

Given a set of points on a 2D plane, how to find a point (x, y) on that plane such that sum of the euclidean distances between the chosen point and the given points is minimum (among all possible choices of (x, y))?

How about finding the same thing in a 3-Dimensional space?

Thank you for the time you put on reading this and thanks in advance for sharing your solution/idea.

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

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

I misunderstood the problem, Ignore

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

    because you don't care about the points inside the CH

    wtf?

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

      I meant you don't care about the points in the set which are inside the convex hull.

      It's so because the diameter will always be a pair of the Convex Hull's vertexes.

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

        But the diameter has nothing to do with the problem in this entry...

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

          Lol, just understood that I misunderstood the problem :D

          Sorry the solution is to a completely different problem.

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

    You minimize the maximal distance between the center but not the sum of them. The solution of the original problem is to run two ternary searches: on x and y coordinates, one into another. The proof is based on the fact that the sum of the convex functions is a convex function.

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

      Should the two ternary searches be independent or should they be nested?

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

        When in the first ternary search you fix some x, then you run ternary search on y in fact on the segment [(x,  - ∞), (x,  + ∞)].

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

Why is simple ternary search the bad idea?

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

    This would mean that the point we are looking for is (x, y), where x and y are the "center"s of the projection of the set of points onto the x axis and y axis respectively. Right? Can you prove the correctness?

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

This point is called Fermat-Weber point. For n=3 we get famous Torricelli point. But in my opinion for other n it is #P complete problem.

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

    But anyway, for each ε there exists an algorithm polynomial on , finding the point with precision ε. I think that for ε = 0 you simply can't output precise answer, when it is irrational, so I don't think we can consider this problem as a #P problem, or we need to find a way to express the answer in the other form.

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

What if we want to find one of the given points that have minimum sum?