Suppose that we have $n \geq 2$ distinct triplets $t_0, t_1, ..., t_{n-1}$ of real numbers, $t_i = (x_i, l_i, r_i)$.
Define $$\Delta(s) = \max_{i, j} \left[ s (x_j - x_i) + (r_j - l_i) \right]$$
The problem is, given some arbitrary target $\Delta_0$, to find $s^*$ such that $\Delta(s^*) = \Delta_0$. (NB: There may be no such $s^*$. For example, $n = 2$, and $t_0 = (0, -1, 0), t_1 = (0, 0, 1)$, then $\Delta(s)$ has constant value $2$, so the problem has a solution, infinitely many in fact, only if $\Delta_0 = 2$.)
I'm looking for an algorithm to solve this problem, or at least some search terms (keywords, author names, etc) that I may try when searching online for such an algorithm.
FWIW, for the special case I'm working with, the following additional conditions/considerations apply:
- $x_0 < x_1$;
- $l_0 = r_0 = l_1 = r_1 = 0$;
- $l_i < r_i, \forall \, i > 1$;
- only positive solutions $s^*$ are of interest;
- $\Delta_0 \geq \max_{i,j} (r_j - l_i)$.