1 Introduction

A groupoid (magma) \((S,\cdot )\) is power-associative if the the subalgebra generated by any element is associative [2]. The undirected power graph \({\mathscr {G}}(S)\) of S has vertex set S, and uv is an edge in \({\mathscr {G}}(S)\) if there is an integer \(m>1\) such that \(u=v^m\) or \(v=u^m\) [1, 4]. It is the underlying graph of the directed power graph \(\mathbf {{\mathscr {G}}}(S)\) [5] with directed edges (uv) whenever v is a power of u. At least in the case of Abelian groups, there is a very close connection between the group G and its power graph \({\mathscr {G}}(G)\): As shown in [3], two Abelian groups are isomorphic if and only of their power graphs are isomorphic.

A graph G is Hamiltonian if there is a cycle that contains all its vertices. The question which condition a power graph is Hamiltonian has attracted some attention in the past. We briefly review the main results relevant for this contribution. For finite p-groups, a complete characterization is available:

Proposition 1

[7] Let G be a finite p-group, then \({\mathscr {G}}(G)\) is Hamiltonian if and only if \(\vert G \vert \ne 2\) and G is cyclic.

Furthermore, if p is an odd prime, then \({\mathscr {G}}(G)\) is 2-connected if and only if it is Hamiltonian [7]. For cyclic groups, \({\mathscr {G}}({\mathbb {Z}}_n)\) is Hamiltonian for all \(n\ge 3\) [4]. On the other hand, \({\mathscr {G}}(G)\) is not Hamiltonian for Abelian groups of order \(2^{m}\) with \(m>1\) that are not cyclic [4]. Trivially, \({\mathscr {G}}(G)\) is Hamiltonian if it is a complete graph and \(|G|\ge 3\). Therefore, the following characterization of power graphs that are complete is useful and interesting:

Proposition 2

[4] Let G be a finite group. Then, \({\mathscr {G}}(G)\) is complete if and only if G is a cyclic group of order 1 or \(p^{m}\), for some prime number p and for some \(m\in {\mathbb {N}}\).

Characterizations of Hamiltonian power graphs for groups of the form \(G=({\mathbb {Z}}_p)^{n}\oplus \mathbb ({Z}_q)^{m}\) with distinct primes p and q and \(m, n \in {\mathbb {N}}\) can be found in [6].

2 Power graphs of Abelian groups

We denote the identity element of G by 0 since we are interested here in abelian groups. Furthermore, we write \(\langle x \rangle \) for the (abelian) subgroup generated by a single element \(x\in G\). It is easy to see that the identity 0 is adjacent to all other group elements in \({\mathscr {G}}(G)\). The subgraph of \({\mathscr {G}}(G)\) obtained by removing 0 and its incident edges will be denoted by \({\mathscr {G}}^{*}(G)\), and we write \({\mathscr {G}}_{x}={\mathscr {G}}(\langle x \rangle )\). We denote the greatest common divisor of r natural numbers \(q_{1}\), \(q_{2}\),...,\(q_{r}\) by \([q_{1},q_{2},\dots ,q_{r}]\). Furthermore, we write \(q_{2}\vert q_{1}\) if \(q_2\) divides \(q_1\).

Naturally, the investigation of the power graphs of Abelian groups will make use of the Fundamental Theorem for Abelian Groups, see, e.g.  [8]:

Theorem 1

Every finite Abelian group G is the direct product \(G={\mathbb {Z}}_{q_1}\oplus {\mathbb {Z}}_{q_2}\oplus \dots \oplus {\mathbb {Z}}_{q_{\ell }}\) of cyclic groups whose sizes \(q_j\) are powers of prime numbers. Up to reordering, the number of factors \(\ell \) and the powers \(q_j\) are uniquely determined by G.

We will also make use of the following well-known consequence of the Chinese remainder theorem:

Lemma 1

For \(j,k\in {\mathbb {N}}\), \({\mathbb {Z}}_{jk}\simeq {\mathbb {Z}}_{j}\oplus {\mathbb {Z}}_{k}\) if and only if j and k are coprime.

The fundamental theorem for abelian groups implies some simple sufficient conditions for the existence of Hamiltonian cycles:

Lemma 2

Let G be an abelian group with \(\ell \) different cyclic groups \({\mathbb {Z}}_{q_i}\) in its product representation, where \(q_i = p_{i}^{k_{i}}\) and \(p_i\ge 3\) for all \(1\le i \le \ell \). Then, \({\mathscr {G}}(G)\) is Hamiltonian whenever \([p_{i}, p_{j}]=1\) for all ij.

Proof

Using Lemma 1, G can be written as \(G={\mathbb {Z}}_{p_{1}^{k_{1}} p_{2}^{k_{2}} \ldots p_{r}^{k_{r}}}\) and by Proposition 2, \({\mathscr {G}}(G)\) is complete and thus Hamiltonian. \(\square \)

The Invariant factor decomposition allows us to write G in the form

$$\begin{aligned} G={\mathbb {Z}}_{n_{1}}\oplus \dots \oplus {\mathbb {Z}}_{n_{j_{1}}} \end{aligned}$$
(1)

where \(j_{1}\) and \(n_{i}\) are the unique integers satisfying \(j_{1}\ge 1\), \(n_{i}\ge 2\) and \(n_{i}\vert n_{i+1}\) for \(1\le i \le j_{1}-1\). The \(n_{i}\)’s in the last equation are called the invariant factor of G. For later reference, we note that for \(j_{1}=2\), Eq. (1) reduces to

$$\begin{aligned} G= {\mathbb {Z}}_{p_{s}^{k_{i}}\dots p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}} p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}}\ \end{aligned}$$
(2)

where \(p_{i}\) is prime and \(k'_{i}\ge k_{i}\) for \(i\in \{1,\dots ,s, s+1,\dots ,l\}\).

The following result, by [9], will be useful to identify paths in power graphs:

Theorem 2

[9] The system of congruences \(a_{i}x \equiv b_{i} \mod m_{i}\), with \(m_i \ne 0\) and \(i\in \{1,\dots ,r\}\) admits a solution if and only if:

  1. (1)

    \([a_{i},m_{i}] \mid b_{i}\) for \(i\in \{1,\dots ,r\}\)

  2. (2)

    \([a_{i}m_{j},a_{j}m_{i}] \mid a_{i}b_{j}-a_{j}b_{i}\) for \(i\in \{1,\dots ,r\}\).

The next lemma provides key adjacencies that will be part on the main structure of the Hamiltonian cycle in the power graphs of some abelian groups.

Lemma 3

Let \(G= {\mathbb {Z}}_{p_{s}^{k_{s}}\dots p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}}\), \((x,y)\in G\) where

\(x=p_{x}p_{s}^{k_{s}(x)}\dots p_{1}^{k_{1}(x)}\), \(y=p_{y}p_{l}^{k_{l}(y)}\dots p_{1}^{k_{1}(y)}\), with \([p_{x},p_{1},\dots ,p_{s}]=1=[p_{y},p_{1},\dots ,p_{l}]\). Then, (xy) and \((x,y+p_{l}^{q_{l}}\dots p_{1}^{q_{1}})\) are adjacent in \({\mathscr {G}}(G)\) where

$$\begin{aligned} q_{j} = \left\{ \begin{array}{lcl} k_{j}(y) &{} if &{} j>s \text { and } k_{j}(y)\le k'_{j}\\ k'_{j} &{} if &{} j>s \text { and } k_{j}(y)> k'_{j}\\ k_{j}-k_{j}(x)+ k_{j}(y) &{} if &{} 1\le j\le s \text { and } k_{j}-k_{j}(x)+ k_{j}(y)\le k'_{j}\\ k'_{j} &{} if &{} 1\le s\le i \text { and } k_{j}-k_{j}(x)+ k_{j}(y)> k'_{j} \end{array}\right. \end{aligned}$$

Proof

By construction, (xy) and \((x,y+p_{l}^{q_{l}}\dots p_{1}^{q_{1}})\) are adjacent whenever the following system of congruences has a solution:

$$\begin{aligned} \begin{aligned} n x&\equiv x \mod (p_{s}^{k_{s}} \dots p_{1}^{k_{1}}) \\ n y&\equiv y+ p_{l}^{q_{l}}\dots p_{1}^{q_{1}} \mod (p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}) \end{aligned} \end{aligned}$$

By Theorem 2, this system of congruences has solution whenever the following conditions are true.

  1. 1.

    \([x, p_{s}^{k_{s}}\dots p_{1}^{k_{1}}] \vert x\) and \([y,p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}] \mid y+ p_{l}^{q_{l}}\dots p_{1}^{q_{1}} \)

  2. 2.

    \([xp_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}, y p_{s}^{k_{s}}\dots p_{1}^{k_{1}}] \mid xp_{l}^{q_{l}}\dots p_{1}^{q_{1}}\)

The first part of the first condition is clearly true. The second part is true because \([y,p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}} p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}] = p_{l}^{k_{l}(y)}\dots p_{1}^{k_{1}(y)}\).

The second conditions are fulfilled, because we know that

\([xp_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}, y p_{s}^{k_{s}}\dots p_{1}^{k_{1}}] = p_{l}^{k_{l}(y)}\dots p_{s+1}^{k_{s+1}(y)} p_{s}^{q'_{s}}\dots p_{l}^{q'_{l}}\),

where \(q'_{j}=\) min \(\{k_{j}(x)+k'_{j},k_{j}(y)+k_{j}\}\) for \(1\le j\le s\). \(\square \)

3 Hamiltonian graphs for \(\varvec{G}={\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\)

Let us consider groups of the form

$$\begin{aligned} G={\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\ \end{aligned}$$
(3)

where the \(p_{i}\) are prime numbers and pairwise coprime. For G, we define the sets

$$\begin{aligned} {\mathscr {H}}_{i} {:}{=}\{(x,y)\in G \vert k_{1}(x)=i, \wedge y\in {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\} \end{aligned}$$
(4)

, and for a fixed \(x\in {\mathbb {Z}}_{p_{1}^{k_{1}}}\) with \(k_{1}(x)=i\), we set

$$\begin{aligned} N_{x}^{i}(y) {:}{=}\{(x,y+ mp_{1}^{q_{1}(y)})\vert 0\le m< p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}-q_{1}(y)} \} \end{aligned}$$
(5)

First we note that for G, Lemma 3 specializes to

Corollary 1

Let \(G= {\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\), \((x,y)\in G\), where \(x=p_{x}p_{1}^{k_{1}(x)}\), \(y=p_{y}p_{l}^{k_{l}(y)}\dots p_{1}^{k_{1}(y)}\), with \([p_{x},p_{1}]=1=[p_{y},p_{1},\dots ,p_{l}]\). Then, (xy) and \((x,y+p_{l}^{q_{l}}\dots p_{1}^{q_{1}})\) are adjacent in \({\mathscr {G}}(G)\) where

$$\begin{aligned} q_{j}= \left\{ \begin{array}{lcl} k_{j}(y) &{} if &{} j>1 \text { and } k_{j}(y)\le k'_{j}\\ k'_{j} &{} if &{} j>1 \text { and } k_{j}(y)> k'_{j}\\ k_{1}-k_{1}(x)+ k_{1}(y) &{} if &{} j=1 \text { and } k_{1}-k_{1}(x)+ k_{1}(y)\le k'_{1}\\ k'_{1} &{} if &{} j=1 \text { and } k_{1}-k_{1}(x)+ k_{1}(y)> k'_{1} \\ \end{array} \right. \end{aligned}$$
(6)

Lemma 4

If \(G= {\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\) and \((x,y)\in G\), then the subgraph induced by \(N_{x}^{i}(y)\) is Hamiltonian.

Proof

For each \(2\le j \le l\) and for every \((x,y')\in N_{x}^{i}(y)\), we define

$$\begin{aligned} r_{j}(y') {:}{=}\left\{ \ \begin{array}{lcl} k_{j}(y') &{} if &{} 0\le k_{j}(y')\le k'_{j}\\ k'_{j} &{} if &{} k_{j}(y')\ge k'_{j}\\ \end{array} \right. \end{aligned}$$
(7)

Furthermore, we define the following subsets

$$\begin{aligned} V_{p_{l}^{r_{l}}\dots p_{2}^{r_{2}}}{:}{=}\{(x,y')\in N_{x}^{i}(y)\vert r_{i}(y')=r_{i} \} \end{aligned}$$

in \(N_{x}^{i}(y)\), where \(0\le r_{j} \le k'_{j}\) for \(2\le r \le l\).

First, we note that \(k_{1}(y)=k_{1}(y')\) for all \((x,y')\in N_{x}^{i}(y)\). To prove this, let \(p_{y}\in {\mathbb {N}}\) such that \([p_{y},p_{1},p_{2},\dots ,p_{l}]=1\). We compute \(y'=y+mp_{1}^{q_{1}(y)}= p_{y}p_{l}^{k_{l}(y)}\dots p_{1}^{k_{1}(y)}+mp_{1}^{q_{1}(y)}= p_{1}^{k_{1}(y)}(p_{y}p_{l}^{k_{l}(y)}\dots p_{2}^{k_{2}(y)}+mp_{1}^{k_{1}-i})\). The assertion now follows from \([p_{y}p_{l}^{k_{l}(y)}\dots p_{2}^{k_{2}(y)},p_{1}]=1\).

Therefore, using the last note and Corollary 1, we can conclude that the subgraph induced by each of the sets \(V_{q}\) is complete and, of course, Hamiltonian. Furthermore, it is easy to see that the sets \(V_{q}\) are pairwise disjoint and their disjoint union equals \(N_{x}^{i}(y)\).

Claim: If \(s\vert r\), then each vertex in \(V_{s}\) is adjacent to all the vertices in \(V_{r}\).

To prove this claim, consider \((x,y_{1})\in V_{s}\) and \((x,y_{2})\in V_{r}\) with \(y_{1}= p_{y_{1}}p_{l}^{k_{l}(y_{1})}\dots p_{1}^{k_{1}(y_{1})}\) and \(y_{2}= p_{y_{2}}p_{l}^{k_{l}(y_{2})}\dots p_{1}^{k_{1}(y_{2})}\), where \(0\le k_{i}(y_{1})\le k_{i}(y_{2})\). Using Lemma 3, we observer that \((x,y_{1})\) and \((x,y_{2})\) are adjacent if the following system of linear congruences has solution:

$$\begin{aligned} \begin{aligned} n x&\equiv x \mod (p_{s}^{k_{s}}\dots p_{1}^{k_{1}}) \\ n y_{1}&\equiv y_{2} \mod (p_{l}^{k'_{l}}\dots p_{s+1}^{k'_{s+1}}p_{s}^{k'_{s}}\dots p_{1}^{k'_{1}}) \end{aligned} \end{aligned}$$

The following two conditions are clearly sufficient for the existence of a solution:

  1. 1.

    \([x, p_{1}^{k_{1}}] \vert x\) and \([y_{1},p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y_{2}\)

  2. 2.

    \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y_{1} p_{1}^{k_{1}} ] \mid x(y_{2}-y_{1})\)

Since the two conditions are clearly satisfied, the claim is true.

It is important to note that each element in \(V_{1}\) is adjacent to any other element in \(N_{x}^{i}(y)\).

Any Hamiltonian cycle in the subgraph within \(V_{s}\) can be extended to a Hamiltonian cycle in \(V_{r}\cup V_{s}\) in the following way: Let \(C_{s}\) and \(C_{r}\) be the Hamiltonian cycles in the subgraphs induced by \(V_{r}\) and \(V_{s}\), respectively, and let \(e_{s}=(u_{s},v_{s})\in E(C_{s})\) and \(e_{r}=(u_{r},v_{r})\in E(C_{r})\) edges in each of Hamiltonian cycles. If we remove the two edges in each cycle, we get two Hamiltonian trajectories in the subgraphs induced by \(V_{s}\) and \(V_{r}\), respectively. We denote these by \(T_{V_{s}}\) and \(T_{V_{r}}\). By the claim, there are edges \((v_{s},v_{r})\) and \((u_{s},u_{r})\) in \(E({\mathscr {G}}(G))\), so a Hamiltonian cycle in the subgraph induced by \(V_{r}\cup V_{s}\) is:

\(u_{s}\rightarrow T_{V_{s}}\rightarrow v_{s} \rightarrow v_{r} \rightarrow T_{V_{r}}\rightarrow u_{r}\rightarrow u_{s}.\)

This construction is sketched in Fig. 1.

Fig. 1
figure 1

Extension of the Hamiltonian cycle in \(V_{j}\) to a Hamiltonian cycle in \(V_{j}\cup V_{i}\)

In order to construct a Hamiltonian cycle in the subgraph induced by \(N_{x}^{i}(y)\), we can arrange the different sets \(V_{q}\) as a tree. Each of the vertices in the tree is the Hamiltonian sets \(V_{q}\), its root is \(V_{1}\), and the edges in the tree are the extension of the Hamiltonian cycles that we show in Fig. 1. The tree has l branches, and the first element in the branches adjacent to \(V_{1}\) is the set \(V_{p_{i}}\), where \(2\le i\le l\). If we take into account the natural partial order carried by a tree, when we are in the branch with initial vertex \(V_{p_{i}}\), then an element in this branch \(V_{p_{i}^{k'_{i}}\dots p_{s}^{r_{s}}}\) has as predecessor the set \(V_{p_{i}^{k'_{i}}\dots p_{s}^{r_{s}-1}}\) if \(r_{s}\le 2\) and \(V_{p_{i}^{k'_{i}}\dots p_{s-1}^{k'_{s-1}}}\) if \(r_{s}=1\); the successor is \(V_{p_{i}^{k'_{i}}\dots p_{s}^{r_{s}+1}}\) when \(r_{s}< k'_{s}\) or \(V_{p_{i}^{k'_{i}}\dots p_{s}^{k'_{s}}p_{s+1}}\) when \(r_{s}=k'_{s}\). See Fig. 2.

Fig. 2
figure 2

Tree arrangement of the sets \(V_{q}\)

The leaves of the tree are \(V_{p_{l}^{k'_{l}}p_{l-1}^{k'_{l-1}}\dots p_{k'_{1}}}\), \(V_{p_{l-1}^{k'_{l-1}}\dots p_{k'_{1}}}\),...,\(V_{p_{2}^{k'_{2}}}\), \(V_{p_{1}^{k'_{1}}}\). Note that the leaf \(V_{p_{s}^{k'_{s}}\dots p_{k'_{1}}}\) is adjacent by the claim to the vertex \(V_{p_{s-1}}\); therefore, it can serve as extension that connect these two vertices. Constructing the Hamiltonian cycle in \(N_{x}^{i}(y)\) therefore follows a depth-first traversal of the tree. The Hamiltonian trajectories \(T_{V_{j}}\) in \(V_{j}\) with starting point \(u_{j}\) and end point \(v_{j}\in V_{j}\) therefore can be combined to a Hamiltonian cycles in the following manner: \(W{:}{=}u_{1}\rightarrow u_{p_{l}}\rightarrow T_{V_{p_{l}}}\rightarrow v_{p_{l}}\rightarrow u_{p_{l}^{2}}\rightarrow T_{p_{l}^{2}} \rightarrow v_{p_{l}^{2}}\rightarrow \dots \rightarrow u_{p_{l}^{k'_{l}}}\rightarrow T_{V_{p_{l}^{k'_{l}}}} \rightarrow v_{p_{l}^{k'_{l}}}\rightarrow u_{p_{l}^{k'_{l}}p_{l-1}}\rightarrow T_{V_{p_{l}^{k'_{l}}p_{l-1}}}\rightarrow v_{p_{l}^{k'_{l}}p_{l-1}} \rightarrow \dots \rightarrow u_{p_{l}^{k'_{l}}p_{l-1}^{k'_{l-1}}.\dots p_{1}^{k'_{1}}} \rightarrow T_{V_{p_{l}^{k'_{l}}p_{l-1}^{k'_{l-1}}\dots p_{1}^{k'_{1}}}}\rightarrow v_{p_{l}^{k'_{l}}p_{l-1}^{k'_{l-1}}\dots p_{1}^{k'_{1}}}\rightarrow u_{p_{l-1}} \rightarrow T_{V_{p_{l-1}}}\rightarrow v_{p_{l-1}}\rightarrow u_{p_{l-1}^{2}}\rightarrow \dots \rightarrow u_{p_{l-1}^{k'_{l-1}}\dots p_{1}^{k'_{1}}}\rightarrow T_{V_{p_{l-1}^{k'_{l-1}}\dots p_{1}^{k'_{1}}}}\rightarrow v_{p_{l-1}^{k'_{l-1}}\dots p_{1}^{k'_{1}}} \rightarrow \dots v_{p_{3}^{k'_{3}}p_{2}^{k'_{2}}}\rightarrow u_{p_{2}}\rightarrow T_{V_{p_{2}}}\rightarrow v_{p_{2}}\rightarrow \dots \rightarrow v_{p_{2}^{k'_{2}}}\rightarrow v_{1}\rightarrow T_{V_{1}}\rightarrow u_{1}\).

The extension of the sets \(V_{p_{2}^{k'_{2}}} \cup V_{1}\) is possible because each vertex in \(V_{1}\) is adjacent with all the vertices in \(N_{x}^{i}(y)\). Since the \(T_{V_{p_{l-1}}}\) traverse different vertex sets, no edge appears twice. Furthermore, W covers all vertices of the \(V_j\), and no inner vertex of W appears more than once. Thus, W is a Hamiltonian cycle in \(N_{x}^{i}(y)\). \(\square \)

The Hamiltonian graph \({\mathscr {G}}_{N_{x}^{i}(y)}\) contains all vertices (xy), with a fixed x and a fixed \(k_{1}(y)\). The next step is to extend the construction of these Hamiltonian cycles to a single Hamiltonian cycle on \({\mathscr {H}}_{i}\). To this end, we will need the following technical result.

Lemma 5

Let \(G= {\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\), \((x,y), (x',y')\in G\) with \(k_{1}(x)=k_{1}(x')=i\), \(y=p_{y}p_{1}^{k_{1}(y)}\) such that \([p_{y},p_{l},\dots ,p_{1}]=1\) and let \((x',y_{1})\in N_{x'}^{i}(y)\). If (xy) and \((x',y')\) are adjacent in \({\mathscr {G}}(G)\), then (xy) and \((x',y_{1})\) are adjacent in \({\mathscr {G}}(G)\).

Proof

Let \(x=p_{x}p_{1}^{k_{1}(x)}\) with \([p_{x},p_{1}]=1\) and \(p_{xy}=[p_{y},p_{x}]\). We know that \(y_{1}=y'+mp_{1}^{q_{1}(y')}\), with \(0\le m < p_{l}^{k'_{l}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}-q_{1}(y')}}\). In order to prove that \((x', y_{1})\) and (xy) are adjacent, we check whether the following system of linear congruences has a solution:

$$\begin{aligned} \begin{aligned} n x&\equiv x' \mod p_{1}^{k_{1}} \\ n y&\equiv y'+ mp_{1}^{q_{1}(y')} \mod (p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}) \end{aligned} \end{aligned}$$

The following two conditions are clearly sufficient for the existence of a solution:

  1. 1.

    \([x, p_{1}^{k_{1}}] \vert x'\) and \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'+mp_{1}^{q_{1}(y')}\)

  2. 2.

    \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ] \mid xy'+xmp_{1}^{q_{1}(y')}-yx'\)

Since (xy) and \((x',y')\) are adjacent, we know that \([x, p_{1}^{k_{1}}] \vert x'\), \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'\) and \(p_{1}^{k_{1}(y)}\mid p_{1}^{q_{1}(y')}\). Taking this into account, the first part of the first condition is true, and the second part is fulfilled, because \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}]=p_{1}^{k_{1}(y)}\) and clearly \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'\) and \(p_{1}^{k_{1}(y)}\vert p_{1}^{q_{1}(y')}\).

It is clear that \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ] \mid xy'-yx'\) because (xy) and \((x',y')\) are adjacent, besides \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]=p_{xy}p_{1}^{k_{1}(x)+k_{1}(y)}\) so \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]\mid xp_{1}^{q_{1}(y')}\), and the second condition holds. \(\square \)

Let \(S_{i}=\{x'\in {\mathbb {Z}}_{p_{1}^{k_{1}}} : k_{1}(x)=i\}=\{x'=mx : [m,p_{1}]=1 \}\). We can easily note that there is a path \(P_{x}=(x,y) (x_{1},y_{1})\dots (x_{\vert S_{i}\vert }, y_{\vert S_{i}\vert })\) such that \((x_{r},y_{r})=(n_{1}^{r} x, n_{1}^{r} y)\) with \([n_{1},p_{1},p_{2},\dots ,p_{l}]=1\). With this notation, we define

$$\begin{aligned} N_{{\mathscr {H}}_{i}}(y){:}{=}\bigcup _{r=1}^{\vert S_{i}\vert } N_{x_{r}}^{i}(y_{r})\cup N_{x}^{i}(y) \end{aligned}$$
(8)

Lemma 6

Let \(G= {\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\) and \((x,y)\in G\), with \(y=p_{y}p_{1}^{k_{1}(y)}\) and \([p_{y},p_{l},\dots p_{2},p_{1}]=1\). Then, the subgraph induced by \(N_{{\mathscr {H}}_{i}}(y)\) is Hamiltonian in \({\mathscr {G}}(G)\).

Proof

We introduce the following notation for a class of vertices that will be useful to construct a Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i}}(y)\). If \(v=(x,y)\) and \(v'=(x, y+mp_{1}^{q_{1}(y)})\), then \(v'\in N_{x}^{i}(y)\) and v and \(v'\) are adjacent in the Hamiltonian cycle in \(N_{x}^{i}(y)\). Analogously, for \(v_{r}=(x_{r}, y_{r}+m_{r}p_{1}^{q_{1}(y)})\) and \(v'_{r}=(x_{r}, y_{r}+m'_{r}p_{1}^{q_{1}(y)})\) we choose \(v_{r}\) and \(v'_{r}\) to be adjacent in the Hamiltonian cycle in \(N_{x_{r}}^{i}(y_{r})\). Moreover, if \(v_{r+1}\in N_{x_{r+1}}^{i}(y_{r+1})\) with \(v_{r+1}=n_{1}v'_{r}=(x_{r+1}, y_{r+1}+n_{1}m'_{r}p_{1}^{q_{1}(y)})\), then \(v'_{r}\) and \(v_{r+1}\) are adjacent.

Let \(T_{v_{r}v'_{r}}\) be the Hamiltonian path in \(N_{(x)}^{i}(y)\), with initial vertex \(v_{r}\) and final vertex \(v'_{r}\). Such a path exists because of Lemma 4. The Hamiltonian cycle in \(N_{{\mathscr {H}}_{i}}(y)\) is:

\(v=(x,y)\rightarrow T_{(v v')} \rightarrow v_{1}\rightarrow T_{(v_{1}v'_{1})}\rightarrow v_{2} \rightarrow T_{(v_{2}v'_{2})}\rightarrow \dots \rightarrow v_{\vert S_{i}\vert } \rightarrow T_{(v_{\vert S_{i}\vert }v'_{\vert S_{i}\vert } )} \rightarrow v \)

\(v'_{\vert S_{i}\vert }\) and v are adjacent by Lemma 5, taking into account that \(v'_{\vert S_{i}\vert }\in N_{x_{\vert S_{i}\vert }}(y_{\vert S_{i}\vert })\) and v, \(v_{\vert S_{i}\vert }\) are adjacent. \(\square \)

The next theorem counts the number of disjoint Hamiltonian cycles in the subgraphs generated by \(N_{{\mathscr {H}}_{i}}(y)\), with \(y=p_{y}p_{1}^{k_{1}(y)}\), such that their disjoint union is \({\mathscr {H}}_{i}\).

Theorem 3

Let \(G=Z_{p_{1}^{k_{1}}}\oplus Z_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\) and \([p_{y},p_{1},p_{2},\dots ,p_{l}]=1\) then

  1. (1)

    For all \(x\in {\mathbb {Z}}_{p_{1}^{k_{1}}}\), \(N_{{\mathscr {H}}_{i}}(y) \cap N_{{\mathscr {H}}_{i}}(y')= \emptyset \) if and only if \((x,y)\notin N_{{\mathscr {H}}_{i}}(y')\).

  2. (2)

    For each \(0\le k_{1}(y) \le k'_{1}-k_{1}+i-1\), there are \((p_{1}-1) p_{1}^{k_{1}-i-1}\) different \(N_{{\mathscr {H}}_{i}}(y)\) sets with \(y=p_{y}p_{1}^{k_{1}(y)}\).

  3. (3)

    For \(k'_{1}-k_{1}+i\le k_{1}(y)\le k'_{1}-1\), there are \((p_{1}-1)p_{1}^{k'_{1}-k_{1}(y)-1}\) different \(N_{{\mathscr {H}}_{i}}(y)\) sets with \(y=p_{y}p_{1}^{k_{1}(y)}\).

  4. (4)

    For \(k_{1}(y)=k'_{1}\), there is only a single \(N_{{\mathscr {H}}_{i}}(y)\) set with \(y=p_{y}p_{1}^{k'_{1}}\).

  5. (5)

    There are \((k'_{1}-k_{1}+i)(p_{1}-1)p_{1}^{k_{1}-i-1} + \sum _{k_{1}(y)=k'_{1}-k_{1}+i}^{k'_{1}-1} (p_{1}-1)p_{1}^{k'_{1}-k_{1}(y)-1} + 1\) disjoint Hamiltonian subgraphs whose union is \(H_{i}\).

Proof

(1)   Suppose that \((x,y)\notin N_{{\mathscr {H}}_{i}}(y')\) and there is \((x_{1},y_{1})\in N_{{\mathscr {H}}_{i}}(y) \cap N_{{\mathscr {H}}_{l}}(x,y')\). Then, the following system of linear congruences has a solution:

$$\begin{aligned} \begin{aligned} x_{1}&= m_{2}p_{1}^{i}\\ y_{1}&= y+ mp_{1}^{q_{1}(y)}\\ y_{1}&= y'+ m'p_{1}^{q_{1}(y')}\\ \end{aligned} \end{aligned}$$

with \([m_{2},p_{1}]=1\), \(0\le m\le p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}-q_{1}(y)}\) and \(0\le m'\le p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}-q_{1}(y')}\). Without loss of generality, we assume that \(\min \{q_{1}(y), q_{1}(y')\}=q_{1}(y)\), then

\(y= y' +(m'p_{1}^{q_{1}(y')-q_{1}(y)}-m)p_{1}^{q_{1}(y)}\) with \((x,y)\in N_{{\mathscr {H}}_{i}}(y')\), which is a contradiction.

(2)   Let \(0\le k_{1}(y)\le k'_{1}-k_{1}+i-1\). There are \((p_{1}-1)\) vertices of the form \((x,y)\in {\mathscr {H}}_{i}\), with a fixed x, such that \(y=p_{y}p_{1}^{k_{1}(y)}\), in the discrete interval \([np_{1}^{k_{1}(y)+1}, (n+1)p_{1}^{k_{1}(y)+1}]\) with \([n,p_{1}]=1\) or \([n+1,p_{1}]=1\). Furthermore, there are \(p_{1}^{q_{1}(y)}/p_{1}^{k_{1}(y)+1}= p_{1}^{k_{1}-i+k_{1}(y)}/p_{1}^{k_{1}(y)+1}= p_{1}^{k_{1}-i-1}\) disjoint intervals of the form \([np_{1}^{k_{1}(y)+1}, (n+1)p_{1}^{k_{1}(y)+1}]\) in the interval \([0,p_{1}^{k_{1}-i+k_{1}(y)}]\). We conclude that there are \((p_{1}-1) p_{1}^{k_{1}-i-1}\) different \(N_{{\mathscr {H}}_{i}}(y)\) with \(y=p_{y}p_{1}^{k_{1}(y)}\).

(3)   For \(k'_{1}-k_{1}+i\le k_{1}(y)\le k'_{1}-1\), \(q_{1}(y)=k'_{1}\), there are \((p_{1}-1)\) vertices of the form \((x,y)\in {\mathscr {H}}_{i}\) with \(y=p_{y}p_{1}^{k_{1}(y)}\) and a fixed x, in the discrete interval \([np_{1}^{k_{1}(y)+1}, (n+1)p_{1}^{k_{1}(y)+1}]\) with \((n,p_{1})=1\) or \((n+1,p_{1})=1\). Moreover, there are \(p_{1}^{k'_{1}}/p_{1}^{k_{1}(y)+1} = p_{1}^{k'_{1}-k_{1}(y)-1}\) intervals of the form \([np_{1}^{k_{1}(y)+1}, (n+1)p_{1}^{k_{1}(y)+1}]\) in the interval \([0,p_{1}^{k'_{1}}]\). Therefore, there are \((p_{1}-1) p_{1}^{k'_{1}-k_{1}(y)-1}\) different \(N_{{\mathscr {H}}_{i}}(y)\) with \(y=p_{y}p_{1}^{k_{1}(y)}\).

(4)   The vertices in \({\mathscr {H}}_{i}\) with \(k_{1}(y)=k'_{1}\) are \((x,mp_{1}^{k'_{1}})\) with \(0\le m\le p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}-1\) and \(q_{1}(y)=p_{1}^{k'_{1}}\). Therefore, they are contained in \(N_{{\mathscr {H}}_{i}}(x,0)\).

(5)   The first part of the result follows from statements (1)-(4). If we fix \(x=p_{1}^{i}\) and the sum of the elements of the different sets \(N_{{\mathscr {H}}_{i}}(y)\) with \(y=p_{y}p_{1}^{k_{1}(y)}\) and \(0\le k_{1}(y) \le k'_{1}\) is \(p_{1}^{k'_{l}}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}}\), the result would be proved because for every \(x=mp_{1}^{i}\) with \([m,p_{1}]=1\) the analysis is the same. Taking into account that each set \(N_{(x)}^{i}(y)\) has \(p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}-q_{1}(y)}\) vertices, we obtain

$$\begin{aligned} \begin{aligned}&(p_{1}-1)p_{1}^{k_{1}-l-1} \sum _{r=0}^{k'_{1}-k_{1}+i-1} (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}) p_{1}^{k'_{1}-q_{1}(p_{1}^{k_{1}(y)})}\\&\qquad + \sum _{k_{1}(y)=k'_{1}-k_{1}+i}^{k'_{1}-1} (p_{1}-1)p_{1}^{k'_{1}-k_{1}(y)-1}(p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})p_{1}^{k'_{1}-q_{1}(p_{1}^{k_{1}(y)})}+ (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})\\&\quad = (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})(p_{1}-1) (\sum _{k_{1}(y)=k_{1}-i+1}^{k_{1}-1} p_{1}^{k_{1}(y)}+ \sum _{k_{1}(y)=0}^{k_{1}-i}p_{1}^{k_{1}(y)} + \frac{1}{p_{1}-1}) \\&\quad = (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})(p_{1}-1)(\sum _{k_{1}(y)=0}^{k'_{1}-1} p_{1}^{r}+\frac{1}{p_{1}-1})\\&\quad = (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})(p_{1}-1)(\frac{p_{1}^{k'_{1}}-1}{p_{1}-1} +\frac{1}{p_{1}-1}) \\&\quad = (p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}})p_{1}^{k'_{1}} \end{aligned} \end{aligned}$$

\(\square \)

Theorem 3 provides us with detailed information on the Hamiltonian cycles that cover \({\mathscr {H}}_{i}\). The next two results will identify vertices at which these Hamiltonian cycles can be joined together.

Definition 1

Let \((x,y)\in {\mathscr {H}}_{i}\) with \(y=p_{y}p_{1}^{k_{1}(y)}\), \(x=p_{x}p_{1}^{i}\), \([p_{y},p_{l},\dots ,p_{1}]=1\), \([p_{x},p_{1}]=1\) and \((x',y')\in {\mathscr {H}}_{r}\), with \(r>i\), such that \((x',y')=(p_{x}p_{1}^{r}, p_{y}p_{1}^{k_{1}(y)+r-i})\). Clearly, (xy) and \((x',y')\) are adjacent in \({\mathscr {G}}(G)\). We define the set

$$\begin{aligned} N_{i,r}(x,y) {:}{=}\{ (x',y'+mp_{1}^{q_{1}(y)}) \vert 0\le m\le p_{l}^{k'_{l}}\dots p_{2}p_{1}^{k'_{1}-q_{1}(y)}\} \end{aligned}$$

Theorem 4

Let \(G={\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\), \(y=p_{y}p_{1}^{k_{1}(y)}\), \(x=p_{x}p_{1}^{i}\) with \(\small {[p_{y},p_{2},\dots , p_{l}]=1}\), \([p_{x},p_{1}]=1\) and \(p_{xy}=[p_{x},p_{y}]\). Then,

  1. (1)

    For each \((x,y)\in {\mathscr {H}}_{i}\), (xy) is adjacent to all vertices in \(N_{i,r}(x,y)\).

  2. (2)

    For \(0\le k_{1}(y)< k'_{1}-r+i\)

    $$\begin{aligned} N_{i,r}(x,y)= N_{i,r}(x,y+p_{1}^{q_{1}(y)-r+i})\,. \end{aligned}$$
  3. (3)

    For \(k'_{1}-r+i\le k_{1}(y)\le k'_{1}\),

    $$\begin{aligned} N_{{\mathscr {H}}_{i,r}}(x,y)= \{(p_{x}p_{1}^{r},mp_{1}^{k'_{1}})\vert 0\le m\le p_{l}^{k'_{l}} \dots p_{2}^{k'_{2}}-1 \}\,. \end{aligned}$$
  4. (4)

    For \(r=k_{1}\), \(N_{i,k_{1}}(x,y)=\{(0,mp_{1}^{k'_{1}})\vert 0\le m\le p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}-1\}\).

Proof

(1)   Let \((x',y')\in {\mathscr {H}}_{r}\) such that (xy) and \((x',y')\) adjacent, then (xy) is adjacent to all vertices in \(N_{i,r}(x,y)\) if the following system of linear congruences has solution:

$$\begin{aligned} \begin{aligned} nx&= x' \mod (p_{1}^{k_{1}}) \\ ny&= y'+mp_{1}^{q_{1}(y)} \mod (p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}})\\ \end{aligned} \end{aligned}$$

The following two conditions are clearly sufficient for the existence of a solution:

  1. 1.

    \([x, p_{1}^{k_{1}}] \vert x'\) and \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'+mp_{1}^{q_{1}(y)}\)

  2. 2.

    \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ] \mid xy'+xmp_{1}^{q_{1}(y)}-yx'.\)

Because (xy) and \((x',y')\) are adjacent, we know that \([x, p_{1}^{k_{1}}] \vert x'\), \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'\) and \(p_{1}^{k_{1}(y)}\mid p_{1}^{q_{1}(y)}\). Taking this into account, the first part of the first condition is true, and the second part is fulfilled, because \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}]=p_{1}^{k_{1}(y)}\) and clearly \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid y'\) and \(p_{1}^{k_{1}(y)}\vert p_{1}^{q_{1}(y)}\).

It is clear that \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ] \mid xy'-yx'\) because (xy) and \((x',y')\) are adjacent, besides \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]=p_{xy}p_{1}^{k_{1}(x)+k_{1}(y)}\) so \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]\mid xp_{1}^{q_{1}(y)}\), and the second condition holds.

(2)   Clearly, \((x,y+p_{1}^{q_{1}(y)-r+i})\) and \((x',y' + p_{1}^{q_{1}(y)})\) are adjacent due to \((x',y' + p_{1}^{q_{1}(y)})=p_{1}^{r-i}(x,y+p_{1}^{q_{1}(y)-r+i})\), and \((x',p_{1}^{r-i}y + p_{1}^{q_{1}(y)})\in N_{i,r}(x,y)\). Using statement (1), we obtain

$$\begin{aligned} N_{i,r}(x,y)= N_{i,r}(x,y+p_{1}^{q_{1}(y)-r+i}) \end{aligned}$$

(3)   If (xy) and \((x',0)\) are adjacent, then the following system of linear congruences has a solution:

$$\begin{aligned} \begin{aligned} nx&= x' \mod (p_{^{k_{1}}}) \\ ny&= 0 \mod (p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}})\\ \end{aligned} \end{aligned}$$

Again, the following two conditions are clearly sufficient for the existence of a solution:

  1. 1.

    \([x, p_{1}^{k_{1}}] \vert x'\) and \([y,p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}] \mid 0\)

  2. 2.

    \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ] \mid yx'\)

Because (xy) and \((x',y')\) are adjacent, we know that the second part \([x, p_{1}^{k_{1}}] \vert x'\) is clearly fulfilled.

For the second condition, we notice that \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]=p_{xy}p_{1}^{k_{1}(x)+k_{1}(y)}\) so \([xp_{l}^{k'_{l}}\dots p_{1}^{k'_{1}} \varvec{,} y p_{1}^{k_{1}} ]\mid yx'\), due to \(k_{1}(x')>k_{1}(x)\). The second condition holds.

On the other hand, we note that \(k_{1}-i+k_{1}(y)\ge k'_{1}-r+i-i+k_{1}\ge k'_{1}-r+k_{1}\ge k'_{1}\). Therefore, \(q_{1}(y)=k'_{1}\) and \(N_{i,r}(x,y)=(x',mp_{1}^{k'_{1}})\).

(4) is now an immediate consequence of (3). \(\square \)

The subgraph induced by \({\mathscr {H}}_{k_{1}}\) is isomorphic to \({\mathscr {G}}({\mathbb {Z}}_{p_{1}^{k_{1}}})\), i.e., a clique. Moreover, we have \({\mathscr {H}}_{k_{1}}= \bigcup _{r=0}^{k'_{1}} N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{r})\) and \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{r})= \big \{(0,p_{1}^{r}),(0,2p_{1}^{r}),\dots \dots , (0,(p_{1}-1)p_{1}^{r}),(0,(p_{1}+1)p_{1}^{r}),\dots , (0,(p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}-r}-1)p_{1}^{r})\big \}\), and in particular \(N_{{\mathscr {H}}_{k_{1}}} (p_{1}^{k'_{1}})=\{(0,0), (0,p_{1}^{k'_{1}}),\dots ,(0,(p_{l})^{k'_{l}}\dots p_{2}^{k'_{2}})p_{1}^{k'_{1}})\}\). Next we introduce some sets of vertices that will be useful in the subsequent discussion:

$$\begin{aligned} \begin{aligned} {\mathscr {T}}_{i}^{j}&{:}{=}\bigcup _{m=0}^{k_{1}-i} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y) \text { if } 0\le j \le k'_{1}-k_{1}+i \\ {\mathscr {T}^\prime }_{i}^{j}&{:}{=}\bigcup _{m=0}^{k'_{1}-j} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y) \text { if } k'_{1}-k_{1}+i+1\le j \le k'_{1}\\ \end{aligned} \end{aligned}$$

Theorem 5

Let \(\displaystyle G={\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}}\dots p_{1}^{k'_{1}}}\). Then,

  1. (1)

    For \(0\le j \le k'_{1}-k_{1}+i\), the subgraph generated by \({\mathscr {T}}_{i}^{j}\) is Hamiltonian.

  2. (2)

    For \(k'_{1}-k_{1}+i+1\le j \le k'_{1}\), the subgraph generated by \({\mathscr {T}^\prime }_{i}^{j}\) is Hamiltonian.

Proof

Claim 1. \(N_{r,r+1}(x,y)= N_{p_{1}x}^{r+1}(p_{1}y)\subseteq N_{{\mathscr {H}}_{r+1}}(p_{1}y)\).

This is true because of Definition 1 and that \(q_{1}(y)=q_{1}(p_{1}y)\) with \((x,y)\in {\mathscr {H}}_{r}\) and \((p_{1}x,p_{1}y)\in {\mathscr {H}}_{r+1}\).

As an immediate consequence of claim 1 and Theorem 4(1), we obtain

Claim 2. The subgraph generated by the sets \(N_{p_{1}^{r}x}^{r}(p_{1}^{r}y)\subset N_{{\mathscr {H}}_{r} (p_{1}^{r}y)}\) and \(N_{r,r+1}(p_{1}^{r}x,p_{1}^{r}y)= N_{p_{1}^{r+1}x}^{r+1}(p_{1}^{r+1}y)\subset N_{{\mathscr {H}}_{r+1} (p_{1}^{r+1}y)}\) is complete and has cardinality \(p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}p_{1}^{k'_{1}-k_{1}-i+r+j}\).

We now proceed to show the first statement.

Case 1: \(j-i+k_{1}-1\le k'_{1}\).

Subcase 1: \(0\le j \le k'_{1}-k_{1}+i-1\). Consider the vertex set

$$\begin{aligned} V^* {:}{=}\bigcup _{m=0}^{1} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\ \end{aligned}$$

By Theorem 3 (2), there are \((p_{1}-1)p_{1}^{k_{1}-i-1}\) disjoint Hamiltonian subgraphs generated by the set \(\bigcup _{k_{1}(y)=j} N_{{\mathscr {H}}_{i}}(y)\), and by Theorem 4 (2), we can build a Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\cup (\bigcup _{r=0}^{p_{1}-1} N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1}))\).

To construct a Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\cup (\bigcup _{r=0}^{p_{1}-1} N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1}))\), let \(v, v'\in N_{{\mathscr {H}}_{i}}(y)\) be two adjacent vertices in the Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i}}(y)\) and let \(v_{r}, v'_{r}\in N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1})\) be two adjacent vertices in the Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1})\). Let \(u,u_{1},\dots ,u_{p_{1}}\) be consecutive vertices along the Hamiltonian path in \(N_{p_{1}x}^{i+1}(p_{1}y)\) that are also contained in the Hamiltonian cycle in the subgraph generated by the set \(N_{{\mathscr {H}}_{i}}(p_{1}y)\). Such a set of vertices exist by construction of the Hamiltonian cycle in \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\) in Lemma 6 and because \(\vert N_{p_{1}x}^{i+1}(p_{1}y) \vert > p_{1}\). Now, let \(T_{y+rp_{1}^{q_{1}(y)-1}}\) be the Hamiltonian path in \(N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1})\) with initial vertex \(v_{r}\) and final vertex \(v'_{r}\) and \(T_{p_{1}y}\) be a path that is part of the Hamiltonian cycle in \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\) with initial vertex \(u_{p_{1}}\) and final vertex u. A Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\cup (\bigcup _{r=0}^{p_{1}-1} N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1}))\) can now be constructed as sketched in Figure 3). More formally, it is of the form \(v\rightarrow T_{y} \rightarrow v' \rightarrow u_{1} \rightarrow v_{1}\rightarrow T_{y+p_{1}^{q_{1}(y)-1}} \rightarrow v'_{1} \rightarrow u_{2} \rightarrow v_{2} \rightarrow T_{y+2p_{1}^{q_{1}(y)-1}}\rightarrow v'_{2} \rightarrow u_{3}\rightarrow \dots \rightarrow u_{p_{1}} \rightarrow T_{p_{1}y} \rightarrow u\rightarrow v\). The adjacencies between u and v and between \(u_{r}\) and \(v_{r}\) are guaranteed by claim 2.

Fig. 3
figure 3

Hamiltonian cycle in \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\cup (\bigcup _{r=0}^{p_{1}-1} N_{{\mathscr {H}}_{i}}(y+rp_{1}^{q_{1}(y)-1}))\)

An analogous construction for each set \(N_{{\mathscr {H}}_{i+1}}(p_{1}y)\) with \(k_{1}(y)=j+1\) yields \((p_{1}-1)p_{1}^{k_{1}-i-2}\) Hamiltonian cycles that cover all vertices of \(V^*\). We then consider the \((p_{1}-1)p_{1}^{k_{1}-i-2}\) cycles that cover \(V^*\) and perform the same construction for \(N_{{\mathscr {H}}_{i+2}}(p_{1}^{2}y)\). This yields \((p_{1}-1)p_{1}^{k_{1}-i-3}\) disjoint Hamiltonian cycles that cover \(\bigcup _{m=0}^{2} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\). Proceeding in this manner, we obtain at step \(k_{1}-i-1\) a collection of \(p-1\) disjoint cycles that cover \( \bigcup _{m=0}^{k_{1}-i-1} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\). Similar to the previous paragraph, the resulting Hamiltonian cycle in \({\mathscr {T}}_{i}^{j}\) is: \(u_{1} \rightarrow v_{1}\rightarrow T_{p_{1}^{k_{1}-i-1}y}\rightarrow v'_{1} \rightarrow u_{2}\rightarrow v_{2}\rightarrow T_{p_{1}^{k_{1}-i-1}y +p_{1}^{q_{1}(y)}}\rightarrow v'_{2}\rightarrow u_{3}\rightarrow \dots \rightarrow v_{p_{1}-1}\rightarrow T_{p_{1}^{k_{1}-i-1}y+(p_{1}-1)p_{1}^{q_{1}(y)}}\rightarrow v'_{p_{1}-1}\rightarrow u_{p_{1}}\rightarrow T_{p_{1}^{k_{1}-i}y} \rightarrow u_{1}\), where \(v_{r}, v'_{r}\in N_{{\mathscr {H}}_{k_{1}-1}}(y+rp_{1}^{q_{1}(y)-1})\) are two adjacent vertices in the Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{k_{1}-1}}(y+rp_{1}^{q_{1}(y)-1})\). As before, let \(u,u_{1},\dots ,u_{p_{1}}\) be consecutive vertices in the Hamiltonian path in \(N_{p_{1}^{k_{1}-i}x}^{k_{1}-i}(p_{1}^{k_{1}-i}y)\) that are also part of the Hamiltonian cycle in the subgraph generated by the set \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}-i}y)\). Such a set of vertices exist because the subgraph generated by \({\mathscr {H}}_{k_{1}}\) is complete and because \(\vert N_{{\mathscr {H}}_{k_{1}}}^{i+1}(p_{1}^{j+k_{1}-i}) \vert > p_{1}\). Let \(T_{y+rp_{1}^{q_{1}(y)-1}}\) be the Hamiltonian path in \(N_{{\mathscr {H}}_{k_{1}-1}}(y+rp_{1}^{q_{1}(y)-1})\) with initial vertex \(v_{r}\) and final vertex \(v'_{r}\) and \(T_{p_{1}y}\) be a path, part of the Hamiltonian cycle in the subgraph generated by \({\mathscr {H}}_{k_{1}}\), with initial vertex \(u_{p_{1}}\) and final vertex \(u_{1}\).

Subcase 2: \(j=k'_{1}-k_{1}+i\). We can use exactly the same procedure because \((p_{1}-1)p_{1}^{k'_{1}-j-1}=(p_{1}-1)p_{1}^{k_{1}-i-1}\).

Case 2: \(j+k_{1}-i \ge k'_{1}\). First, we note that \(k'_{1}-j\le k'_{1}-k'_{1}+k_{1}-i=k_{1}-i\). The initial steps are exactly the same as in case 1. In the step \(k'_{1}-1-j\), therefore, we obtain \(p_{1}-1\) disjoint cycles that cover the vertex set \(\bigcup _{m=0}^{k'_{1}-1-j} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\). We next construct a Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i+k'_{1}-j}}(p_{1}^{k'_{1}-j}y)\cup (\bigcup _{r=1}^{p_{1}-1} N_{r})\), where \(N_{r}\) is one of the \(p_{1}-1\) cycles that cover the set \(\bigcup _{m=0}^{k'_{1}-2-j} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\). To this end, consider two vertices \(v_{r}, v'_{r}\in N_{i+k'_{1}-1-j}(p_{1}^{k'_{1}-1-j}y+rp_{1}^{k'_{1}-1})\subset N_{r}\) that are adjacent along the cycle covering \(N_{r}\). Furthermore, let \(u_{1},\dots ,u_{p_{1}}\) be consecutive vertices in the Hamiltonian path in \(N_{{\mathscr {H}}_{i+k'_{1}-j}}(p_{1}^{k'_{1}-j}y)\). Let \(T_{r}\) be the Hamiltonian path in \(N_{r}\), with initial vertex \(v_{r}\) and final vertex \(v'_{r}\) and T be a path, part of the Hamiltonian cycle in \(N_{{\mathscr {H}}_{i+k'_{1}-j}}(p_{1}^{k'_{1}-j}y)\) with initial vertex \(u_{p_{1}}\) and final vertex \(u_{1}\). A Hamiltonian cycle in the subgraph generated by \(N_{{\mathscr {H}}_{i+k'_{1}-j}}(p_{1}^{k'_{1}-j}y)\cup (\bigcup _{r=0}^{p_{1}-1} \bigcup _{m=0}^{k'_{1}-1-j} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)\) can now be obtained as follows: \(v_{1}\rightarrow T_{1} \rightarrow v'_{1} \rightarrow u_{1} \rightarrow v_{2}\rightarrow T_{2} \rightarrow v'_{2} \rightarrow u_{2} \rightarrow v_{3} \rightarrow T_{3}\rightarrow v'_{3} \rightarrow u_{3}\rightarrow \dots \rightarrow u_{p_{1}} \rightarrow T \rightarrow u_{1}\rightarrow v_{1}\). As a consequence of Theorem 3(4), we obtain a Hamiltonian cycle that covers the set of vertices \(\bigcup _{m=0}^{k'_{1}-j} \bigcup _{k_{1}(p_{1}^{m}y)=j+m} N_{{\mathscr {H}}_{m+i}}(p_{1}^{m}y)={\mathscr {T}^\prime }_{i}^{j}\). \(\square \)

Theorem 6

If \(G={\mathbb {Z}}_{p_{1}^{k_{1}}}\oplus {\mathbb {Z}}_{p_{l}^{k'_{l}} \dots p_{1}^{k'_{1}}}\), then \({\mathscr {G}}(G)\) is Hamiltonian.

Proof

It is easy to note that \(G=(\bigcup _{r=0}^{k'_{1}-k_{1}} {\mathscr {T}}_{0}^{r})\cup (\bigcup _{r=k'_{1}-k_{1}+1}^{k'_{1}} {\mathscr {T}^\prime }_{0}^{r})\cup (\bigcup _{r=1}^{k_{1}}{\mathscr {T}}_{r}^{0})\).

Claim. The subgraphs induced by the vertex sets (i) \({\mathscr {T}}_{0}^{r}\) and \({\mathscr {T}}_{0}^{r+1}\) with \(0\le r \le k'_{1}-k_{1}\), (ii) \({\mathscr {T}^\prime }_{0}^{r}\) and \({\mathscr {T}^\prime }_{0}^{r+1}\) with \(k'_{1}-k_{1}+1 \le r \le k'_{1}\), and (iii) \({\mathscr {T}}_{r}^{0}\) and \({\mathscr {T}}_{r+1}^{0}\) with \(0\le r\le k_{1}\) each contain a clique of cardinality \(p_{l}^{k'_{l}}\dots p_{2}^{k'_{2}}\).

This is true because of the claim 2 in Theorem 5, and the fact that, for the first case, \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}+r})\subset {\mathscr {T}}_{0}^{r}\), \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}+r+1})\subset {\mathscr {T}}_{0}^{r}\), for the second case, \(N_{{\mathscr {H}}_{k'_{1}-r}}(p_{1}^{k'_{1}})\subset {\mathscr {T}^\prime }_{r}^{0}\), \(N_{{\mathscr {H}}_{k'_{1}-r-1}}(p_{1}^{k'_{1}})\subset {\mathscr {T}}_{r+1}^{0}\) and, for the third case, \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}-r})\subset {\mathscr {T}}_{0}^{r}\). \(N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}-r-1})\subset {\mathscr {T}}_{0}^{r}\).

Now, we can construct the Hamiltonian cycle in \({\mathscr {G}}(G)\) as follows. Let \(v_{i}^{j}, {v'}_{i}^{j}\in {\mathscr {T}}_{i}^{j}\) or \(v_{i}^{j}, {v'}_{i}^{j} \in {\mathscr {T}^\prime }_{i}^{j}\), be pairs of adjacent vertices in the Hamiltonian cycle in the subgraph generated by \( {\mathscr {T}}_{i}^{j}\) or \({\mathscr {T}^\prime }_{i}^{j}\), respectively. Let \(T_{i}^{j}\) be the Hamiltonian path in \({\mathscr {T}}_{i}^{j}\) with initial vertex \(v_{i}^{j}\) and final vertex \({v'}_{i}^{j}\) and \({T'}_{i}^{j}\) be the Hamiltonian path in \({\mathscr {T}^\prime }_{i}^{j}\) with initial vertex \(v_{i}^{j}\) and final vertex \({v'}_{i}^{j}\). For the first case, \(v_{0}^{r},{v'}_{0}^{r}\in N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}+r})\subset {\mathscr {T}}_{0}^{r}\), for the second case \(v_{0}^{r},{v'}_{0}^{r}\in N_{{\mathscr {H}}_{k'_{1}-r}}(p_{1}^{k'_{1}})\subset {\mathscr {T}^\prime }_{0}^{r}\) and for the third case, \(v_{0}^{r},{v'}_{0}^{r}\in N_{{\mathscr {H}}_{k_{1}}}(p_{1}^{k_{1}-r})\subset {\mathscr {T}}_{r}^{0}\), these three pair of vertices are adjacent in \({\mathscr {G}}(G)\) because of the claim. Finally, let T be the path in the subgraph generated by \({\mathscr {H}}_{k_{1}}\) with the vertices that were not used at the end of the process in the construction of the Hamiltonian cycle. A Hamiltonian cycle in \({\mathscr {G}}(G)\) can now be composed as follows:

\((0,0)\rightarrow v_{0}^{k'_{1}}\rightarrow {T'}_{0}^{k'_{1}}\rightarrow {v'}_{0}^{k'_{1}}\rightarrow v_{0}^{k'_{1}-1}\rightarrow {T'}_{0}^{k'_{1}-1}\rightarrow {v'}_{0}^{k'_{1}-1}\rightarrow \dots \rightarrow v_{0}^{k'_{1}-k_{1}+1 }\rightarrow {T'}_{0}^{k'_{1}-k_{1}+1}\rightarrow {v'}_{0}^{k'_{1}-k_{1}+1}\rightarrow v_{0}^{k'_{1}-k_{1}}\rightarrow {T'}_{0}^{k'_{1}-k_{1}}\rightarrow {v'}_{0}^{k'_{1}-k_{1}}\rightarrow \dots \rightarrow v_{0}^{1}\rightarrow T_{0}^{1}\rightarrow {v'}_{0}^{1}\rightarrow v_{0}^{0}\rightarrow T_{0}^{0}\rightarrow {v'}_{0}^{0}\rightarrow v_{1}^{0}\rightarrow T_{1}^{0}\rightarrow {v'}_{1}^{0}\rightarrow \dots \rightarrow v_{k_{1}}^{0} \rightarrow T_{k_{1}}^{0}\rightarrow {v'}_{k_{1}}^{0}\rightarrow T\rightarrow (0,0).\) \(\square \)