Algorithm to cover maximal number of points with one circle of given radius

后端 未结 10 1542
Happy的楠姐
Happy的楠姐 2020-12-23 14:19

Let\'s imagine we have a plane with some points on it. We also have a circle of given radius.

I need an algorithm that determines such position of the circle that it

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 14:25

    The problem reverts back to finding the global optimum of a function f :R x R -> N. The input for f is the center point of the circle, and the value, of course, is the number of included points from the set. The graph of the function will be discontinuous, staircase-like.

    You could start by testing the function in each point corresponding to a point in the set, order the points by decreasing values of f, then intensify search around those points (for example moving out along a spiral).

    Another option is to consider all intersection points of segments connecting any pairs of points in the set. Your optimal point will be at one of these intersections I think, but their number is probably too big to consider.

    You may also hybridise options 1 and 2, and consider intersections of the segments generated from points around 'good set points'.

    Anyhow, unless the number of set points is low (allowing you to check all intersections), I don't think you can guarantee to find the optimum (just a good solution).

提交回复
热议问题