So I asked a similar question to this on Math Stack Exchange a couple of weeks ago, did a bounty, and I didn't receive any answers.

I am struggling a bit with a part of my research (on CS). 

Suppose I have a finite set $X$, and two functions $f,g:X \rightarrow \mathbb{R}_{\geq 0}$. These functions are particularly unique, meaning that $\forall x,y \in X, f(x)\neq f(y) \Rightarrow |f(x)-f(y)|>\epsilon$ for some fixed $\epsilon$. In other words, If the functions are not equal then they are at least apart a distance of $\epsilon$.

Now here is where I am interested, Let's say I fix a line $y_{x_1}(x)=f(x_1)+g(x_1)x$ and a point $C^*$ on the x-axis. Now I consider a second line $y_{x_2}(x)=f(x_2)+g(x_2)x$ and vary $x_2$ over all the elements in $X-\{x : f(x)=f(x_1),g(x)=g(x_1) \}$. Let us say that each of these lines, $y_{x_i}$ intersect $y_{x_1}$ at point $(x_{1i},y_{1i} )$. Now I am interested to find the minimum possible distance from $C^*$ to any of the $x_{1i}$.

Now if this problem was for simply any functions $f,g$ with the unique condition dropped, then the problem would trivially reduce to $0$ since I can find a line $y_{x_i}$ that intersect $y_{x_1}$ at exactly $C^*$ by varying $f(x_1)$ and $g(x_1)$ slightly. However, the functions in place here have the annoying condition that you have to change $f$ and $g$ with at least a perturbation of size $\epsilon$. This $\epsilon$ might not be enough to make the lines intersect **at $C^*$**.

So My question is, is there any sort of "Calculus" per say, that handles with such functions which are almost continuous, but can't be changed except by at least some small perturbation?