$\DeclareMathOperator{\MCG}{\operatorname{MCG}}$Consider a bordered, punctured, orientable surface $S$. Associated to it there is its mapping class group $\MCG(S)$. One way to concretely think about it is in terms of generators and relations, which can be done in many ways. Typically one chooses a set of closed simple curves on $S$, defines associated Dehn twists and half-twists and then gives set of relations among them in terms of how curves intersect on $S$.


Recently I discovered that there is a very different presentation of the mapping class group in terms of its actions on (isotopy classes of) triangulations on the surface, see for example Penner's book on decorated Teichmuller theory. Essentially, the idea is that a MCG element takes a triangulation to another one with the same combinatorics. Since triangulations are acted transitively by a set of moves (flips, quasi-flips and further generalization used in the context of cluster algebras), each mapping class group element is corresponds to a sequence of flips which connects two combinatorially equivalent triangulations. Furthermore, if one adds 2-dimensional faces corresponding to the so-called pentagon identities, the complex whose vertices are (isotopy classes of) triangulations and whose edges are flips one gets a simply connected 2-dim CW-complex.


By choosing any vertex in this complex, one can then think of the mapping class group as the set of paths that join this vertex to any other vertex labelled by a combinatorially equivalent triangulation, modulo the contractible paths (which are a combination of the pentagon identities).


My question is, is there an explicit/algorithmic way to produce a sequence-of-flips representative for a given Dehn twist?



Representation of the mapping class group in terms of flips on triangulations
Yes there is an entirely constructive process to produce a sequence of flips (and a relabelling) from a labelled triangulation $\mathcal{T}$ to its image $D\_\gamma(\mathcal{T})$ under a Dehn twist about a curve $\gamma$. You will need to specify $\gamma$ combinatorially, for example, by specifying the number of time it intersects each edge of $\mathcal{T}$. This is implemented within [curver](https://pypi.org/project/curver/) in the [`encode_twist`](https://github.com/MarkCBell/curver/blob/master/curver/kernel/curve.py#L20-L34) method of a (multi)curve.


The trick is to first consider the case in which $\gamma$ appears very simply on $\mathcal{T}$. For example, orienting $\gamma$ and following along it you see that it enters each triangle and turns either left or right to exit. Assume that it only performs a single left turn (in which case we say that $\mathcal{T}$ is a *short* triangulation for $\gamma$). In this case it is easy to produce a sequence of flips: flip the edge in between $\gamma$ turning left and turning right (to get a new short triangulation), identify the new edge where $\gamma$ goes from turning left to turning right and flip that, and repeat this process (approximately) $\iota(\gamma, \mathcal{T})$ times. This forms the base case that [curver implements](https://github.com/MarkCBell/curver/blob/master/curver/kernel/twist.py#L28-L31), but it also has some more advanced patterns to allow it to compute powers of twists in log space.


If $\gamma$ does not appear simply on $\mathcal{T}$ then we can use a *shortening* process to find a short triangulation for $\gamma$. It turns out that there is a always a flip which reduces $\iota(\gamma, \mathcal{T})$. Again [curver implements](https://github.com/MarkCBell/curver/blob/master/curver/kernel/lamination.py#L634-L760) this process, again with some more advanced tricks to allow it to take advantage of accelerating twists. So by repeatedly applying using this you can produce a "conjugating" path to get to a base case triangulation, apply the base case implementation and then follow the "conjugating" path back. This is actually what is being [done here](https://github.com/MarkCBell/curver/blob/master/curver/kernel/curve.py#L20-L34).


