angle its bigger flag and to the latter the unique edge defined by it.

The genus of a ribbon graph and its surface
-------------------------------------------

The genus $g(\Gamma)$ of a ribbon graph $\Gamma$ is given by $2g(\Gamma)+2=|V_\Gamma|-|E_{\Gamma}|+\#cycles$.

The surface $\Sigma(\Gamma)$ of a ribbon graph $\Gamma$ is the surface obtained from the realization of $\Gamma$ by thickening the edges to ribbons. I.e. replace each 0-simplex $v$ by a closed oriented disc $D(v)$ and each 1-simplex $e$ by $e\times I$ oriented in the standard fashion. Now glue the boundaries of $e\times I$ to the appropriate discs in their cyclic order according to the orientations. Notice that the genus of $\Sigma(\Gamma)$ is $g(\Gamma)$ and that $\Gamma$ is naturally embedded as the spine of this surface.

### Treelike and marked ribbon graphs

A ribbon graph together with a distinguished cycle $c_0$ is called [*treelike*]{} if

-   the graph is of genus $0$ and

-   for all cycles $c_i\neq c_0$: if $f\in c_i$ then $\imath(f)\in c_0$.

In other words each edge is traversed by the cycle $c_0$. Therefore there is a cyclic order on all (non-directed) edges, namely the cyclic order of $c_0$.

A [*marked ribbon graph*]{} is a ribbon graph together with a map $\mk:\{cycles\} 