\begin{tikzpicture}[ font=\footnotesize, vx/.style={circle, draw, fill=white, inner sep=0pt, minimum size=13pt}, mx/.style={rectangle, draw, fill=black!8, inner sep=0pt, minimum size=13pt}, arr/.style={-{Stealth[length=1.8mm]}}, cw/.style={arr, thick, blue!70!black}, cd/.style={arr, semithick, red!70!black, densely dashed}, ps/.style={arr, semithick, black!60, dash pattern=on 1.5pt off 1.5pt}] \def\R{1.15} \begin{scope} \foreach \a in {0,...,4} {\node[vx] (L\a) at ({90-72*\a}:\R) {$\a$};} \node[mx] (w1) at (2.75,0.35) {$w_1$}; \node[mx] (w2) at (2.75,-0.85) {$w_2$}; \node[draw, black!50, rounded corners=3pt, fit=(w1)(w2), inner sep=3pt, label={[font=\scriptsize]above:$M$}] {}; \draw[arr, black!70] (120:1.75) arc[start angle=120, end angle=60, radius=1.75] node[midway, above, font=\scriptsize] {$\rho\colon x \mapsto x+1$}; \draw[ps] (L0) to[bend left=12] (w1); \draw[ps] (w1) to[bend left=12] (L2); \draw[cw] (L0) to[bend right=8] node[pos=0.55, left, font=\scriptsize, inner sep=1pt] {class $w_1$} (L2); \draw[arr, black!60] (w1) to[bend left=25] (w2); \draw[arr, black!60] (w2) to[bend left=25] (w1); \node[font=\scriptsize, align=center] at (1.3,-1.75) {passage $0 \to w_1 \to 0 + \kappa_{w_1}$, $\kappa_{w_1} = 2$}; \end{scope} \begin{scope}[xshift=6.6cm] \foreach \a in {0,...,4} {\node[vx] (R\a) at ({90-72*\a}:\R) {$\a$};} \foreach \a in {0,...,4} { \pgfmathtruncatemacro{\nb}{mod(\a+2,5)} \pgfmathtruncatemacro{\nc}{mod(\a+1,5)} \draw[cw] (R\a) -- (R\nb); \draw[cd] (R\a) to[bend left=28] (R\nc); } \begin{scope}[shift={(1.95,0.55)}, every node/.style={anchor=west, font=\scriptsize}] \draw[cw] (0,0) -- (0.5,0); \node at (0.55,0) {class $w_1$: $a \to a + 2$}; \draw[cd] (0,-0.5) -- (0.5,-0.5); \node at (0.55,-0.5) {class $\delta = 1$: $a \to a + 1$}; \end{scope} \node[font=\scriptsize, align=center] at (0.6,-1.75) {after contraction: classes $w_1$ and $1$ on $\Z_5$}; \end{scope} \end{tikzpicture}