TITLE: Polynomial threading through a monotone corridor
QUESTION [6 upvotes]: I have a need to find a polynomial of minimal degree that connects
two points and stays within a given
"corridor," by which I mean an $x$-monotone polygon.
Here is an example:

 
 
 
 
 
 


The point $s=(0,3)$ needs to be connected to the point $t=(3,1)$ while
remaining inside the $x$-monotone polygon $P$ illustrated.
(Here "$x$-monotone" means that every vertical line meets the polygon
in an interval or the empty set.)
In the case illustrated, a cubic curve suffices,
and no quadratic (or linear) curve suffices.

Q. Given data as depicted (start & end points $s$ & $t$,
  an $n$-vertex $x$-monotone polygon $P$),
  is there an algorithm to find a polynomial of minimal degree that
  connects $s$ to $t$ and remains within $P$?

Even an inefficient algorithm sketch would be appreciated,
as I am not seeing any algorithm.

REPLY [5 votes]: A much more efficient approach can be based on semidefinite programming feasibility testing. Namely, it is well-known that global nonnegativity of a
degree $2d$ polynomial $g(x)$ is equivalent to existence of a decomposition of $g$ into a sum of squares of polynomials, which in turn is equivalent to existence of a postitive semidefinite $(d+1)\times (d+1)$ Hankel matrix $H$ so that $g(x)=X^\top HX$, where $X$ is the vector of monomials $X=(1,x,x^2,\dots,x^d)$. The condition $g(x)=X^\top H X$ is a positive semidefinite feasibility problem (each coefficient of $g$ gives a linear equation on entries of $H$, and $H$ must be p.s.d.). 
In our case we need certificates of nonnegativity (or non-positivity, which is the same up to sign thing) of polynomials of the
form $g(x):=f(x)-ax-b$ on intervals $\alpha \leq x<\beta$.
Change of variable $x\to \frac{\alpha+\beta bt^2}{1+t^2}$ allows one to 
specify the latter as global nonnegativity of the rational function $g\left(\frac{\alpha+\beta bt^2}{1+t^2}\right)$, which is equivalent, after clearing denominators, to global nonnegativity of certain polynomial $\tilde{g}(t^2)$, with coefficients linear functions of coefficients of $f$.
Thus, for every segment $i$ of our region we get a polynomial $\tilde{g}_i(t^2)$, global nonnegativity (or nonpositivity) of which we encode
as above, ending up with a semidefinite programming feasilility problem with block-diagonal matrix, each block Hankel, and free variables corresponding to coefficients of $f$.