Find the radius of the smallest circle that can contain all the points if placed correctly.

157 Views Asked by At

Assume the coordinates of $n$ points are given (plane). Find the radius of the smallest circle that can contain all the points if placed correctly.

It's actually a programming problem. I didn't post it on Stack Overflow since my problem is not about coding but algorithm. I cannot think of an efficient and correct algorithm. Some tries below:

  1. I started by calculating the center of mass (actually there is no mass that means it is found by the arithmetic mean of points). Then, found the longest distance between the center and the given points which I thought to be radius after all. But it seems the radius will not be well-defined in this case.
  2. I started by calculating all distances between each two points then took the largest to be the diameter of the circle. But then I found counterexamples that this method fails.

Whatever I have in my mind I cannot prove it mathematically to ensure it works in general.

Any help is appreciated.