# Given a polygon with holes, find a maximum distance pair in two subsets

I am curious about the following problem:

Given a polygon with holes and two convex subsets, $S$ and $T$, find points $s \in S, t \in T$ such that the shortest path between the two points has maximal length w.r.t. all point pairs in $S$ and $T$.

Note that both $s$ and $t$ might be interior points of the corresponding regions.

If $S$ would only be a point, i.e. the start point is fixed, we could build a Shortest Path Map (continuous Dijkstra) and could thereby find the farthest point.

Does anybody have any idea how to handle the case when $S$ is not just a point?

They describe an algorithm that achieves a worst-case complexity of $O(n^{7.73})$ for a polygon of $n$ vertices, or $O(n^7 (\log n + h))$ when expressed also as a function of the number of holes $h$.
*The OP's question was changed slightly as I was preparing this answer, but I believe the added restriction to $S$ and $T$ does not make the problem any easier (in general).