Let S be a compact orientable surface. Let A and B be two subsurfaces of S that have the same signature. How to check if there is a homeomorphism of S that sends A to B and if so, find one?


Here a subsurface of $S$ is a component of S \ simple closed curves.


I saw this question [Mapping-Class Groups of Subsurfaces of a Hyperbolic Surface](https://mathoverflow.net/questions/283567/mapping-class-groups-of-subsurfaces-of-a-hyperbolic-surface) and <https://arxiv.org/pdf/math/9906122.pdf> but I didn't find the part related to my question yet.



Construct a homeomorphism of a surface that sends a subsurface to another subsurface
We are assuming that $A$ and $B$ are both connected and contain their boundary points. (If we do not assume $A$ and $B$ are connected then the problem becomes much harder.) Let $(A\_i)$ be the closures of the components of $S - A$. Let $(B\_j)$ be closures of the components of $S - B$. Define $(g\_i, b\_i, s\_i)$ to be the genus of $A\_i$, the size $|\partial A\_i|$, and the size $|A \cap A\_i|$, respectively.


We now sort the list $(A\_i)$ using the complexities $(g, b, s)$. We do the same for the list $(B\_j)$. Finally, there is a homeomorphism of $S$ sending $A$ to $B$ if and only if the two lists of complexities are identical.


To produce an "explicit" homeomorphism is much more work. Any algorithm will be sensitive to the details of how the data (of $S$, $A$, and $B$) are presented. One technique is to carefully order the boundary components of $A$ and $B$, compute all pairwise intersection numbers, and then perform Dehn twists to reduce the intersection numbers to zero. This is morally similar to Lee Mosher's automatic structure for the mapping class group.


