Solution (source code)

= Solution

A <deck transformation> is a homeomorphism $h:X\to X$ satisfying $p\circ h=p$. A connected cover is regular when its deck group acts transitively on each fiber. In the usual connected, locally path-connected covering-space setting, this is equivalent to normality of $p_*\pi_1(X)$ in $\pi_1(Y)$.

A two-sheeted cover corresponds to an index-two <subgroup>, which is normal: its two left and right cosets are the <subgroup> and its complement. If $\pi_1(Y)$ is abelian, every <subgroup> is normal. These observations prove both regularity assertions.

For examples over the wedge of two <circles>, label their generators $a,b$ and use three sheets numbered $1,2,3$. A permutation describes the lift of each oriented base edge. For a regular cover take $a=(123)$ and $b=1$: the covering <graph> has an oriented three-cycle of $a$-edges and a $b$-loop at each vertex. Cyclic rotation of the vertices is a transitive deck group $C_3$. For a nonregular cover take $a=(123)$ and $b=(12)$: the same $a$-cycle is accompanied by a $b$-edge in each direction between 1 and 2, and a $b$-loop at 3. It is connected. A deck permutation must commute with both generators, whose image is all $S_3$; their centralizer is trivial. Thus its deck group is not transitive and the cover is nonregular. Each vertex has exactly one entering and one leaving edge of each label, verifying that these <graphs> really are three-sheeted covers.