Finding the smallest possible "ring" that contains a given point.

25 Views Asked by At

A more detailed explanation.
Consider a 2D graph with an x and y axis. A ring can be formed by an ordered pair of non-negative integers (a, b), where a and b represent a radius from the center of the graph (0, 0), to the edge of an inner circle and the edge of an outer circle, respectively. The space between these two circles forms a ring around the center.

Image example:

The ring is formed by (7,8)

I want to find an algorithm for determining the smallest possible ordered pair of non-negative integers that form a ring that also contains a given point. Other than just trial and error and eyeballing it.

For context, this is for a machine learning problem where I am searching for hypotheses (rings) that are consistent with a set of instances (given points). So while the context is machine learning, this sub-problem seems to be a coordinate geometry problem, for which I am evidently lacking in capability.