Say I have two variables, $x$ and $y$, and I have two lists of points, say $l_1$ and $l_2$ and I need to find a continuous function $y(x)$ that goes above all the points in $l_1$ and below all points in $l_2$. Is there any good way to do this?
For example if all the same $x$ occur in both lists one method would be to take the mean of the highest value in $l_1$ and the lowest value in $l_2$ and do a minimal Chi-Square fit. Is there something better to ensure that the curve absolutely has to go above/below the given points (there is no error in those points)?
What if $l_1$ and $l_2$ do not contain the same x values?
The application is that I have a costly function that tests whether $g(x,y)$ is true or false and it is known that if $g(x,y_1)$ is true so is $g(x,y_2)$ for all $y_2>y_1$. The goals is to find the (continuous) intersection $f(x)$.
The following image should clarify the goal. The goal is to find the continuous curve between the black and the red dots.
In general the shape of the interface will be to difficult to recognize a simple analytic function that describes the curve.
Monotonicity is not always guaranteed but I am already very interested in any solution assuming monotonicity of f(x).
