Convex hull solving using a rubber band?

618 Views Asked by At

The convex hull can be found by stretching a rubber band so that it contains all the points and then releasing it.

So my question is :
lets assume that we have a robot (a theoretical robot) to solve this problem. We give it the coordinates of our points (we have $n$ points) .

  1. It uses some pins to indicate the points in a board $(O(n))$.

  2. Now we choose a point (it's not important which one we choose) then we check its distance with other points like ($ \sqrt{ x^2 + y^2 }$ ) . And we find the Max distance .

  3. Then the robot uses a rubber band and extends it in form of a circle with a radius of distance we found in step 2 and centered in the point we chose in step 2. And it releases the band .

  4. Then the robot needs to follow the rubber band to find the vertices of the convex hull in $O( m )$ where $m$ is the vertices that convex hull consists of them.($m \leq n$)

so the total order of the algorithm (this way) would be $O(n)$.

I know I did not take into account the time the rubber band needs to stretch or the time it needs for the contraction.

But assuming we have lots of points it takes much less than $O(n)$.

Is there anyway to simulate the effect of the rubber band in computer?

I know the lowest possible order for convex hull is said to be $O(n\text{lg}(n))$ due to the sorting lower band .

1

There are 1 best solutions below

0
On

Generally simulating physical effects like a contracting rubber band causes an increase in computational complexity, or at best, matches the optimal complexity. You have to consider timestepping (how big of size of steps you can take), and constraint satisfaction (how do you know when the band has touched a point). The former depends on a sort order of the points with respect to some kind of distance metric, which gets you into the $O(n\log n)$ regime or possibly slightly better with a complicated data structure. The latter typically involves checking $O(n)$ vertices at each timestep.

What you are looking for is an "output sensitive" algorithm. Such algorithms for convex hulls have been studied extensively.