Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maximum number of points enclosed in given perimeter

Given an array of coordinates of some points, and a rope of fixed perimeter, how could I compute the maximum number of points this rope can enclose?(I mean algorithms other than brute force)

eg: given [[0,1],[0,0],[1,1],[1,0],[100,100]] and rope of length 4, then this rope can enclose the first 4 points.

like image 705
Blanca Avatar asked Oct 29 '22 00:10

Blanca


1 Answers

Just found this link :The minimum perimeter convex hull of a subset of a point set

the most voted answer gave sources to find minimum area k-gon, so now by binary search, the complexity can be O(n^4*(logn))

like image 58
Blanca Avatar answered Jan 02 '23 21:01

Blanca