1 Introduction

The directed power graph of a group is the simple digraph whose vertex set is the universe of the group and in which \(x\rightarrow y\) if \(y\in \langle x\rangle \); the power graph of a group is the underlying simple graph. The directed power graph of a group was introduced by Kelarev and Quinn [17]. As explained in [2], the definition given in [17] also covers undirected graphs, and it applies to semigroups, too. The power graphs of semigroups were first studied in [18,19,20] and were also considered by Chakrabarty, Ghosh and Sen [11]. The power graph has been studied by many authors, including [1, 3,4,5, 7,8,9,10, 12, 13, 23,24,27]. The reader is referred to the survey [2] for more details. The investigation of graphs associated with various algebraic constructions is important because graphs of this type have many useful applications (see [16, 21]) and are related to automata theory (see [14, 15]).

Besides the above-mentioned definition of the power graph, many authors, including [17], often define the power graph as the graph in which two vertices are adjacent if there exists a positive integer n such that \(y=x^n\) or \(x=y^n\); we call this graph the N-power graph of the group. Besides this definition, authors of [9] brought the definition of the power graph by which two vertices are adjacent if there is a nonzero integer n such that \(y=x^n\) or \(x=y^n\), and the graph defined in this manner we call the \(Z^\pm \)-power graph. All three of these definitions of the power graph produce the same graph. It is also easily seen that, in the case of torsion-free groups, the power graph and the \(Z^\pm \)-power graph determine each other. In Sect. 3, it is proved that the power graph, the N-power graph and the \(Z^\pm \)-power graph of any group determine each other.

In Sect. 4, the power graph of a torsion-free group is investigated. Cameron, Guerra and Jurina [9] showed that, if in a torsion-free group G every element is contained in a unique maximal cyclic subgroup, and if \(\mathcal {G}( G)\cong \mathcal {G}( H)\), then G and H have isomorphic directed power graphs. They also showed that, if G and H are both torsion-free groups of nilpotency class 2, and if G and H have isomorphic power graphs, then they have isomorphic directed power graphs too. The authors of [9] asked whether this implication also holds when at least one of the groups is torsion-free and of nilpotency class 2, and Sect. 4 answers this question affirmatively. Besides, in [9] it was proved that there is no group non-isomorphic to \(\mathbb {Z}\) whose power graph is isomorphic to \(\mathcal {G}(\mathbb {Z})\). In Sect. 4, it is proved that, if a group G has the power graph isomorphic to \(\mathcal {G}(\mathbb {Q})\), then G is isomorphic to the group of rationals.

2 Basic notions and notations

Graph \(\varGamma \) is a structure \(\big (V(\varGamma ),E(\varGamma )\big )\), or simply (VE), where V is a set, and \(E\subseteq V^{[2]}\); here, \(V^{[2]}\) denotes the set of all two-element subsets of V. The set V is called the set of vertices, and E is called the set of edges of \(\varGamma \). We say that vertices x and y are adjacent in \(\varGamma \) if \(\{x,y\}\in E\), in which case we write \(x\sim _\varGamma y\), or simply \(x\sim y\). Graph \(\varDelta =(V_1,E_1)\) is said to be a subgraph of graph \(\varGamma =(V_2,E_2)\) if \(V_1\subseteq V_2\) and \(E_1\subseteq E_2\). \(\varDelta \) is an induced subgraph of \(\varGamma \) if \(V_1\subseteq V_2\) and \(E_1=E_2\cap V_1^2\). In this case, we also say that graph \(\varDelta \) is induced by \(V_1\) in \(\varGamma \), and we write \(\varDelta =\varGamma [V_1]\). The strong product of graphs \(\varGamma \) and \(\varDelta \) is the graph \(\varGamma \boxtimes \varDelta \) such that

$$\begin{aligned}&(x_1,y_1)\sim _{\vec {\varGamma }\boxtimes \varDelta }(x_2,y_2)\text { if }(x_1=x_2\wedge y_1\sim _\varDelta y_2)\\&\quad \vee (x_1\sim _\varGamma x_2\wedge y_1= y_2)\\&\quad \vee (x_1\sim _\varGamma x_2\wedge y_1\sim _\varDelta y_2). \end{aligned}$$

Directed graph (or digraph) \(\vec {\varGamma }\) is a structure \(\big (V(\vec {\varGamma }),E(\vec {\varGamma })\big )\), or simply (VE), where V is a set, and E is an irreflexive relation on V. Here V and E are the set of vertices and the set of directed edges, respectively. A directed edge of a digraph is also called an arc. For vertices x and y of \(\varGamma \) such that \((x,y)\in E\), we say that there is a directed edge from x to y, and we denote this fact by \(x\rightarrow _{\vec \varGamma } y\), or simply by \(x\rightarrow y\). In this case, we also say that y is a direct successor of x, and that x is a direct predecessor of y.

For \(x,y\in G\), where G is a group, we shall write \(x\approx _{G} y\), or simply \(x\approx y\), if \(\langle x\rangle =\langle y\rangle \). Also, o(x) denotes the order of an element x of a group. A loop is a groupoid which has the identity element, and in which equations \(ax=b\) and \(xa=b\) have unique solutions for every a and b. We say that a loop is power-associative if each of its subloops generated by a single element is a group. A groupoid is said to be power-associative if each of its subgroupoids generated by a single element is a semigroup; notice that a loop being power-associative is a stronger property than it being power-associative as a groupoid. Moufang loops, Bol loops and Bruck loops are some examples of power-associative loops. For more information about power-associative loops, the reader is referred to [6].

Definition 1

The directed power graph of a group G is the digraph \(\vec {\mathcal {G}}( G)\) whose vertex set is G, and in which there is a directed edge from x to y, \(x\ne y\), if there exists \(n\in \mathbb {Z}\) such that \(y=x^n\). If there is a directed edge from x to y in \(\vec {\mathcal {G}}( G)\), we write \(x\rightarrow _{ G} y\) or simply \(x\rightarrow y\).

The power graph of a group G is the graph \(\mathcal {G}( G)\) whose vertex set is G, and whose vertices x and y, \(x\ne y\), are adjacent if there exists \(n\in \mathbb {Z}\) such that \(y=x^n\) or \(x=y^n\). If x and y are adjacent in \(\mathcal {G}( G)\), we write \(x{\mathop {\sim }\limits ^{{p}}}_{ G} y\) or simply \(x\mathop {\sim }\limits ^{{p}}y\).

It is easily seen that the directed power graph of a group determines the power graph. Cameron [7] proved that the power graph of a finite group determines its directed power graph too. Cameron, Guerra and Jurina [9] proved the same result for some classes of torsion-free groups as well.

For a graph \(\varGamma \) and its vertex x, \(\overline{N}_{\varGamma }(x)\) denotes the closed neighborhood of x in the graph \(\varGamma \). We write \(x\equiv _\varGamma y\) if \(\overline{N}_\varGamma (x)=\overline{N}_\varGamma (y)\), where x and y are vertices of \(\varGamma \). If \(\varGamma \) is the power graph of a group G, then we write \(x\equiv _G y\) instead of \(x\equiv _{\mathcal {G}(G)}y\). Notice that, for any element x of a group G, we have \(x\equiv _G x^{-1}\). Moreover, whenever \(\langle x\rangle =\langle y\rangle \), for elements x and y of G, \(x\equiv _G y\) holds.

For a group G, the set

$$\begin{aligned} {{\,\mathrm{Cen}\,}}\big (\mathcal {G}( G)\big )=\{x\in G\mid x\sim _{\varGamma } y\text { for all }y\in G\setminus \{x\}\} \end{aligned}$$

we call the center of the power graph \(\mathcal {G}( G)\). Notice that in the power graph of a group the identity element is adjacent to all other vertices of the graph. Therefore, the eccentricity of each of these graphs is 1. Because of that, in the case of the power graph, it is justifiable to call the set of vertices, that are adjacent to all vertices of the graph other than itself, its center.

Let us also note that the definitions of the directed power graph and the power graph can be applied not only on groups but on power-associative loops, too, in the same manner. In this case, the center of the power graph is defined in the same way.

3 On different definitions of the power graph

In this section, the relation between three different notions of power graphs is investigated. Namely, by Definition 1, which is consistent with the definitions from [1] and [9], for elements x and y of a group G, there exists a directed edge from x to y in \(\vec {\mathcal {G}}( G)\) if there exists \(n\in \mathbb {Z}\) such that \(y=x^n\). Also, by the same definition, x and y are adjacent in \(\mathcal {G}( G)\) if there exists \(n\in \mathbb {Z}\) such that \(y=x^n\) or \(x=y^n\). Let us introduce the definition of the power graph that was introduced in [17]. To avoid any confusion, we bring the terms of the N-power graph and the directed N-power graph.

Definition 2

The directed N -power graph of a group G is the digraph \(\vec {\mathcal {G}}^+( G)\) whose vertex set is G, and in which there is a directed edge from x to y, \(x\ne y\), if there exists \(n\in \mathbb {N}\) such that \(y=x^n\). If there is a directed edge from x to y in \(\vec {\mathcal {G}}^+( G)\), we write \(x{\mathop {\rightarrow }\limits ^{+}}_{ G} y\) or simply \(x\mathop {\rightarrow }\limits ^{+}y\).

The N-power graph of a group G is the graph \(\mathcal {G}^+( G)\) whose vertex set is G, and whose vertices x and y, \(x\ne y\), are adjacent if there exists \(n\in \mathbb {N}\) such that \(y=x^n\) or \(x=y^n\). If x and y are adjacent in \(\mathcal {G}^+( G)\), we write \(x{\mathop {\sim }\limits ^{{p_+}}}_{ G} y\) or simply \(x\mathop {\sim }\limits ^{{p_+}}y\).

An advantage of the above definition is that it can be applied to any power-associative groupoid where inverse elements, or even the identity element, might not exist. Furthermore, for torsion groups, the N-power graph is the same as the power graph.

Further, in [9] the authors used another version of the definition in which they insisted on the exponent from the expression \(y=x^n\) to be a nonzero integer. In this paper, the graph defined in this manner is called the \(Z^\pm \)-power graph.

Definition 3

The directed \(Z^\pm \) -power graph of a group G is the digraph \(\vec {\mathcal {G}}^{\pm }( G)\) whose vertex set is G, and in which there is a directed edge from x to y, \(x\ne y\), if there exists \(n\in \mathbb {Z}\setminus \{0\}\) such that \(y=x^n\). If there is a directed edge from x to y in \(\vec {\mathcal {G}}^\pm ( G)\), we write \(x{\mathop {\rightarrow }\limits ^{\pm }}_{ G} y\) or simply \(x\mathop {\rightarrow }\limits ^{\pm }y\).

The \(Z^\pm \) -power graph of a group G is the graph \(\mathcal {G}^{\pm }( G)\) whose vertex set is G, and in which x and y, \(x\ne y\), are adjacent if there exists \(n\in \mathbb {Z}\setminus \{0\}\) such that \(y=x^n\) or \(x=y^n\). If x and y are adjacent in \(\mathcal {G}^\pm ( G)\), we write \(x{\mathop {\sim }\limits ^{{p_\pm }}}_{ G} y\) or simply \(x\mathop {\sim }\limits ^{{p_\pm }}y\).

The above version of the definition of the power graphs helped authors of [9] to make their arguments simpler while studying the power graphs of torsion-free groups. (Note that, for torsion-free groups, the power graph and the \(Z^\pm \)-power graph determine each other.) Besides, it is easily noticed that the directed power graph and the directed \(Z^\pm \)-power graph of a group determine each other. In this section, it is proved that the power graph, the N-power graph and the \(Z^\pm \)-power graph of any power-associative loop determine each other.

Lemma 1

Let G be a power-associative loop such that \(|{{\,\mathrm{Cen}\,}}\big (\mathcal {G}( G)\big )|>1\). Then the following conditions hold:

  1. 1.

    G is the infinite cyclic group, or all elements of the loop G have finite orders.

  2. 2.

    \( G\cong (\mathbb {Z},+)\) if and only if G is a union of countably many \(\equiv _{ G}\)-classes of cardinality 2 and one \(\equiv _{ G}\)-class of cardinality 3.

Proof

Let G be a power-associative loop, and let \(|{{\,\mathrm{Cen}\,}}\big (\mathcal {G}( G)\big )|>1\). Notice that in the power graph no non-identity element of finite order is adjacent to an element of infinite order. Therefore, either all non-identity elements of G have finite order, or all elements of G are of infinite order. Suppose that G does not contain any non-identity element of finite order. Since \(|{{\,\mathrm{Cen}\,}}\big (\mathcal {G}( G)\big )|>1\), then there exists \(x\in G\setminus \{e_{ G}\}\) which is adjacent in \(\mathcal {G}( G)\) with all elements of \(G\setminus \{x\}\). Let us show that then \( G=\langle x\rangle \). If \( G\ne \langle x\rangle \), then there exist \(y\in G\setminus \langle x\rangle \) and \(n\in \mathbb {Z}\setminus \{-1,0,1\}\) such that \(x=y^n\). Then, for \(m\in \mathbb {N}\) relatively prime to n, we have \(x\not \!\!\!\mathop {\sim }\limits ^{{p}}y^m\), which is a contradiction. Therefore, G contains only elements of finite order or \( G\cong (\mathbb {Z},+)\), and thus, we have obtained conclusion 1. of the lemma.

If \( G\cong (\mathbb {Z},+)\) is generated by x, then \(\{x,x^{-1},e_{ G}\}\) is an \(\equiv _{ G}\)-class of cardinality 3. Let \(y\in G\setminus \{x,x^{-1},e_{ G}\}\). Obviously, \(y\equiv _{ G} y^{-1}\). Suppose that there exists \(z\not \in \{ y,y^{-1}\}\) such that \(z\equiv _{ G} y\). Then, there exists \(n\in \mathbb {Z}\setminus \{-1,0,1\}\) such that \(z=y^n\) or \(y=z^n\). Then, for m relatively prime to n, it follows \(z\not \!\!\!\mathop {\sim }\limits ^{{p}}y^m\mathop {\sim }\limits ^{{p}}y\) or \(y\not \!\!\!\mathop {\sim }\limits ^{{p}}z^m\mathop {\sim }\limits ^{{p}}z\), which is a contradiction. Therefore, any non-identity element of G, which is not a generator of G, is contained in an \(\equiv _{ G}\)-class of cardinality 2. This proves one implication of conclusion 2. of the lemma. In order to prove the other implication as well, suppose that \( G\not \cong (\mathbb {Z},+)\), which, by conclusion 1., implies that G contains only elements of finite order. If G had an element x of order \(n>6\), then \(\langle x\rangle \) would have at least 4 generators, and these generators of \(\langle x\rangle \) would have the same closed neighborhoods in \(\mathcal {G}( G)\). Therefore, G contains only elements of order at most 6. Further, because \(\mathcal {G}(\mathbb {Z})\) has infinitely many \(\equiv _{\mathbb {Z}}\)-classes of cardinality 2, \(\mathcal {G}(G)\) also has infinitely many \(\equiv _G\)-classes of cardinality 2. Thus, G contains infinitely many elements of order 3 or infinitely many elements of order 6. If G has an element of order 6, then \(\{e_G\}\) is an \(\equiv _G\)-class, and the same follows if G has at least two distinct subgroups of order 3. Therefore, \(\mathcal {G}( G)\) contains an \(\equiv _{ G}\)-class of cardinality 1, which is a contradiction. This way we obtain conclusion 2., and thus, the lemma has been proved. \(\square \)

Theorem 1

Let G and H be power-associative loops. Then \(\mathcal {G}( G)\cong \mathcal {G}( H)\) if and only if \(\mathcal {G}^{\pm }( G)\cong \mathcal {G}^{\pm }( H)\).

Proof

Let G be power-associative loop, and let \(\varGamma =\mathcal {G}( G)\), \(\varGamma ^{\pm }=\mathcal {G}^{\pm }( G)\), \(\vec {\varDelta }=\mathcal {G}( H)\), and \(\varDelta ^{\pm }=\mathcal {G}^{\pm }( H)\). By definitions of the \(Z^\pm \)-power graph and the power graph, we have

$$\begin{aligned}&\varGamma ^{\pm }\subseteq \varGamma \text { and }\\&\quad E(\varGamma )\setminus E(\varGamma ^{\pm })=\big \{\{e,x\}\mid x\in G\text { and }o(x)=\infty \big \}, \end{aligned}$$

and similar conditions hold for \(\varDelta \) and \(\varDelta ^{\pm }\).

If \(|{{\,\mathrm{Cen}\,}}(\varGamma )|>1\), then, by Lemma 1, if \( G\cong (\mathbb {Z},+)\), it follows that \( H\cong (\mathbb {Z},+)\), which trivially implies the stated equivalence. Similarly, if \( G\not \cong (\mathbb {Z},+)\), then G and H do not have any element of infinite order. Then \(\varGamma =\varGamma ^{\pm }\) and \(\varDelta =\varDelta ^{\pm }\), so the equivalence holds in this case, too.

Suppose now that \(|{{\,\mathrm{Cen}\,}}(\varGamma )|=1\). Let \(\varGamma \cong \varDelta \), and let \(\varphi :G\rightarrow H\) be an isomorphism from \(\varGamma \) to \(\varDelta \). Let us show that \(\varphi \) is an isomorphism from \(\varGamma ^{\pm }\) to \(\varDelta ^{\pm }\), too. Let \(x,y\in G\), and let \(x\mathop {\sim }\limits ^{{p_\pm }}y\). Obviously, then \(\varphi (x)\mathop {\sim }\limits ^{{p}}\varphi (y)\). Suppose that \(\varphi (x)\not \!\!\mathop {\sim }\limits ^{{p_\pm }}\varphi (y)\). Then, without loss of generality, the order of \(\varphi (x)\) is infinite and \(\varphi (y)=e_{ H}\). Then \(\varphi (x)\) is contained in a connected component of \(\varDelta \setminus \{e_{ H}\}\) whose vertex set is a union of countably many \(\equiv _{\varDelta }\)-classes of cardinality two, and which contains an infinite clique. Obviously, similar condition holds for x, too. Suppose that the order of x is finite. Then connected component \(\varPhi \) of \(\varGamma \setminus \{e_{ G}\}\) containing x has no element of order greater than 6, because, if it did contain such an element z, then \([z]_{\equiv _G}\) would be an \(\equiv _G\)-class of cardinality at least \(\varphi \big (o(z)\big )>2\). It follows that \(\varPhi \) does not contain any infinite clique. Therefore, the order of x is infinite. Obviously, \(y=e_{ G}\) because \(\varphi (y)=e_{ H}\in {{\,\mathrm{Cen}\,}}\big (\mathcal {G}( H)\big )\). Therefore, \(x\not \!\!\!\mathop {\sim }\limits ^{{p_\pm }}y\), which is a contradiction. This proves that \(\varphi (x)\mathop {\sim }\limits ^{{p_\pm }}\varphi (y)\). Similarly, \(\varphi (x)\mathop {\sim }\limits ^{{p_\pm }}\varphi (y)\) implies \(x\mathop {\sim }\limits ^{{p_\pm }}y\).

It remains to show that, if \(|{{\,\mathrm{Cen}\,}}(\varGamma )|=1\), then \(\varGamma ^\pm \cong \varDelta ^\pm \) implies that \(\varGamma \cong \varDelta \). Let \(\varGamma ^{\pm }\cong \varDelta ^{\pm }\), and let \(\varphi :G\rightarrow H\) be an isomorphism from \(\varGamma ^{\pm }\) to \(\varDelta ^{\pm }\). It is possible that \(\varphi (e_{ G})\ne e_{ H}\), so let \(\hat{\varphi }(x)=\tau \big (\varphi (x)\big )\), where \(\tau :H\rightarrow H\) is the transposition of \(e_{ H}\) and \(\varphi (e_{ G})\) if \(\varphi (e_{ G})\ne e_{ H}\), and the identity mapping otherwise. Because a connected component \(\varPhi \) of \(\varDelta ^{\pm }\) contains only elements of infinite order if and only if \(V(\varPhi )\) is a union of countably many \(\equiv _{\varDelta ^{\pm }}\)-classes of cardinality 2 and \(\varPhi \) contains an infinite clique, then \(\varphi (e_{ G})\) is contained in the connected component which contains only elements of finite order, i.e., the same connected component that contains \(e_{ H}\). Therefore, \(\hat{\varphi }\) is an isomorphism from \(\varGamma ^{\pm }\) to \(\varDelta ^{\pm }\), which maps the element \(e_G\) to \(e_H\). Let us show that \(\hat{\varphi }\) is an isomorphism from \(\varGamma \) to \(\varDelta \). Let \(x,y\in G\), and let \(x\mathop {\sim }\limits ^{{p}}y\). If \(x\mathop {\sim }\limits ^{{p_\pm }}y\), then obviously it follows that \(\hat{\varphi }(x)\mathop {\sim }\limits ^{{p}}\hat{\varphi }(y)\). Suppose that \(x\not \!\!\!\mathop {\sim }\limits ^{{p_\pm }}y\). Then, without loss of generality, \(x=e_{ G}\in {{\,\mathrm{Cen}\,}}\big (\mathcal {G}( G)\big )\), and because \(\hat{\varphi }(x)=e_{ H}\in {{\,\mathrm{Cen}\,}}\big (\mathcal {G}(H)\big )\), it follows that \(\hat{\varphi }(x)\mathop {\sim }\limits ^{{p}}\hat{\varphi }(y)\). In the same manner, it is proved that \(\hat{\varphi }(x)\mathop {\sim }\limits ^{{p}}\hat{\varphi }(y)\) implies that \(x\mathop {\sim }\limits ^{{p}}y\). Therefore, \(\hat{\varphi }\) is an isomorphism from \(\varGamma \) to \(\varDelta \). Thus, the theorem has been proved. \(\square \)

With the previous theorem, we proved that the power graph and the \(Z^\pm \)-power graph of a power-associative loop carry the same amount of information about the original structure. Let us show that the same result holds for the \(Z^\pm \)-power graph and the N-power graph.

Lemma 2

Let G be a power-associative loop. Then, for each element \(x\in G\) of infinite order, x and \(x^{-1}\) lie in different connected components of \(\mathcal {G}^+( G)\).

Proof

Let \(x\in G\) be an element of infinite order. For natural numbers n and m, let \(S(x,n,m)=\{y\mid x^n=y^m\}\), and let \(\overline{S}(x)=\bigcup _{n,m\in \mathbb {N}}S(x,n,m)\). Let us show that the set \(\overline{S}(x)\) induces a connected component of \(\mathcal {G}^+( G)\). Let \(y\in \overline{S}(x)\). Then \(y\in S(x,n,m)\) for some \(n,m\in \mathbb {N}\), and suppose that \(z\mathop {\sim }\limits ^{{p_+}}y\) for some \(z\in G\). If \(z\mathop {\rightarrow }\limits ^{+}y\), i.e., \(y=z^k\) for some \(k\in \mathbb {N}\), then \(z\in \overline{S}(x)\) because \(z\in S(x,n,mk)\). So suppose that \(y\mathop {\rightarrow }\limits ^{+}z\). Then \(z=y^k\) for some \(k\in \mathbb {N}\). This implies that \(z\in S(x,nk,mk)\subseteq \overline{S}(x)\). Therefore, because \(\overline{S}(x)\) induces a connected subgraph of \(\mathcal {G}^+( G)\), it follows that \(\overline{S}(x)\) induces a connected component of \(\mathcal {G}^+( G)\), while clearly \(x^{-1}\not \in \overline{S}(x)\). This proves the lemma. \(\square \)

We remind the reader that, for graphs \(\varGamma \) and \(\varDelta \), \(\varGamma \boxtimes \varDelta \) denotes the strong graph product of \(\varGamma \) and \(\varDelta \), and, for \(X\subseteq V(\varGamma )\), \(\varGamma [X]\) denotes the subgraph induced by X in \(\varGamma \). In this paper, \(P_2\) denotes the path with two vertices.

Lemma 3

Let G be power-associative loop. For each connected component \(\varPhi \) of \(\varGamma ^\pm =\mathcal {G}^\pm ( G)\) which contains only elements of infinite order, there exist connected components \(\varPsi _1\) and \(\varPsi _2\) of \(\mathcal {G}^+( G)\) which satisfy the following conditions:

  1. 1.

    \(V(\varPhi )=V(\varPsi _1)\cup V(\varPsi _2)\);

  2. 2.

    \(\varPsi _1\cong \varPsi _2\);

  3. 3.

    \(\varPhi \cong \varPsi _1\boxtimes P_2\);

  4. 4.

    \(\varPsi _1\cong \varPhi /\mathord {\equiv _{\varGamma ^\pm }}\).

Proof

Let us denote graphs \(\mathcal {G}^+( G)\) and \(\mathcal {G}^\pm ( G)\) by \(\varGamma ^+\) and \(\varGamma ^\pm \), respectively. Let \(x\in G\) be an element of infinite order, and let \(T(x,n,m)=\{y\mid y^m=x^n\}\), for any \(x\in G\), \(n\in \mathbb {Z}\setminus \{0\}\), and \(m\in \mathbb {N}\). Let \(\overline{T}(x)=\bigcup _{n\in \mathbb {Z}\setminus \{0\},m\in \mathbb {N}}T(x,n,m)\). It is easily seen that \(\overline{T}(x)\) induces a connected subgraph of \(\mathcal {G}^\pm ( G)\). Also, similarly to the proof of Lemma 2, if \(z\mathop {\sim }\limits ^{{p_\pm }}y\) for some \(y\in \overline{T}(x)\), then \(z\in \overline{T}(x)\). Therefore, \(\overline{T}(x)\) induces a connected component of \(\varGamma ^\pm \). Now, it is easily seen that \(\overline{T}(x)=\overline{S}(x)\cup \overline{S}(x^{-1})\), where \(\overline{S}(x)\) is the set defined in the proof of Lemma 2. As seen in the proof of Lemma 2, \(\overline{S}(x)\) and \(\overline{S}(x^{-1})\) induce different connected components of \(\varGamma ^+\). Thus, each connected component of \(\varGamma ^\pm \) which contains only elements of infinite order is a union of two connected components \(\varPsi _1\) and \(\varPsi _2\) of \(\varGamma ^+\), where \(\varPsi _2\) contains inverses of elements of \(V(\varPsi _1)\). This way we obtain conclusion 1. of the lemma.

Let \(\varPhi \) be the connected component of \(\varGamma ^\pm \) induced by \(V(\varPsi _1)\cup V(\varPhi _2)\). Since the mapping \(x\mapsto x^{-1}\) is an automorphism of \(\varGamma ^+\) which maps \(V(\varPsi _1)\) onto \(V(\varPsi _2)\), connected components \(\varPsi _1\) and \(\varPsi _2\) are isomorphic. This proves statement 2. of the lemma. Further, since x and \(x^{-1}\) have the same closed neighborhood in \(\varGamma ^\pm \) for every \(x\in G\), and since \(\varPsi _1\) and \(\varPsi _2\) are induced subgraphs of \(\varPhi \), then \(\varPhi \cong \varPsi _1\boxtimes P_2\). Additionally, \(V(\varPhi )\) is union of \(\equiv _{\varGamma ^\pm }\)-classes of cardinality 2, each of which contains an element of infinite order and its inverse. Therefore, \(\varPsi _1\) has one vertex from each \(\equiv _{\varGamma ^\pm }\)-class contained in \(V(\varPhi )\), so \(\varPsi _1\) is isomorphic to the graph constructed by replacing each \(\equiv _{\varGamma ^\pm }\)-class contained in \(\varPhi \) with one vertex. Thus, conclusions 3. and 4. have been obtained as well, which finishes our proof. \(\square \)

Theorem 2

Let G and H be power-associative loops. Then \(\mathcal {G}^+( G)\cong \mathcal {G}^+( H)\) if and only if \(\mathcal {G}^\pm ( G)\cong \mathcal {G}^\pm ( H)\).

Proof

Let us denote graphs \(\mathcal {G}^+( G)\), \(\mathcal {G}^\pm ( G)\), \(\mathcal {G}^+( H)\) and \(\mathcal {G}^\pm ( H)\) by \(\varGamma ^+\), \(\varGamma ^\pm \), \(\varDelta ^+\) and \(\varDelta ^\pm \), respectively. Let \(G^{<\infty }\) and \(H^{<\infty }\) be the sets of all elements of finite order of loops G and H.

Suppose that \(\mathcal {G}^+( G)\cong \mathcal {G}^+( H)\). The set \(G^{<\infty }\) induces a connected component of graphs \(\varGamma ^+\) and \(\varGamma ^\pm \). Moreover, \(G^{<\infty }\) induces the only connected component of \(\varGamma ^+\), which is not a union of \(\equiv _{\varGamma ^+}\)-classes of cardinality 1 or which does not contain any infinite clique. Since similar condition holds for the connected component of \(\varDelta ^+\) induced by \(H^{<\infty }\), then \(\varGamma ^\pm [G^{<\infty }]=\varGamma ^+[G^{<\infty }]\cong \varDelta ^+[H^{<\infty }]=\varDelta ^\pm [H^{<\infty }]\). Now, let \(\varPhi \) be a connected component \(\varGamma ^\pm \) which contains only elements of infinite order, and let \(\kappa \) be the cardinality of the set of all connected components of \(\varGamma ^\pm \) isomorphic to \(\varPhi \). By Lemma 3, \(\varPhi \) is induced by vertices of two isomorphic connected components \(\varPsi _1\) and \(\varPsi _2\) of \(\varGamma ^+\), so the cardinality of the set of all connected components of \(\varGamma ^+\) isomorphic to \(\varPsi _1\) is \(2\kappa \). Since \(\varGamma ^+\cong \varDelta ^+\), then \(\varDelta ^+\) has exactly \(2\kappa \) connected components isomorphic to \(\varPsi _1\), so, by Lemma 3, graph \(\varDelta ^\pm \) contains \(\kappa \) connected components isomorphic to \(\varPhi \). Similar result holds for each connected component of \(\varDelta ^\pm \). Therefore, since \(\varGamma ^\pm \) and \(\varDelta ^\pm \) have the same, up to isomorphism, connected components, and, for each connected component \(\varPhi \) of \(\varGamma ^\pm \), the cardinality of the set of all connected components of \(\varGamma ^\pm \) isomorphic to \(\varPhi \) is equal to the cardinality of the set of all connected components of \(\varDelta ^\pm \) isomorphic to \(\varPhi \), it follows that \(\varGamma ^\pm \) and \(\varDelta ^\pm \) are isomorphic.

The other implication is proved in a similar manner. Let \(\mathcal {G}^\pm ( G)\cong \mathcal {G}^\pm ( H)\). Now \(G^{<\infty }\) is the only connected component of \(\varGamma ^\pm \) which is not a union of \(\equiv _{\varGamma ^\pm }\)-classes of cardinality 2 or does not contain an infinite clique, and similar condition holds for the connected component of \(\varDelta ^\pm \) induced by \(H^{<\infty }\). Therefore, \(G^{<\infty }\) and \(H^{<\infty }\) induce isomorphic connected components of \(\varGamma ^+\) and \(\varDelta ^+\), respectively. Now, let \(\varPsi \) be a connected component of \(\varGamma ^+\) which contains only elements of infinite order. By Lemma 2, there exists a cardinal \(\kappa \) such that the cardinality of the set of all connected components of \(\varGamma ^+\) isomorphic to \(\varPsi \) is equal to \(2\kappa \). By Lemma 3, \(\varGamma ^\pm \) contains \(\kappa \) connected components isomorphic to \(\varPsi \boxtimes P_2\), where \(P_2\) is the path with 2 vertices, so \(\varDelta ^\pm \), too, contains \(\kappa \) connected components isomorphic to \(\varPsi \boxtimes P_2\). Therefore, by Lemma 3, graph \(\varDelta ^+\) contains \(2\kappa \) connected components isomorphic to \(\varPsi \). Thus, \(\varDelta ^+\) and \(\varGamma ^+\) contain, up to isomorphism, the same connected components, and for each connected component \(\varPsi \) of \(\varGamma ^+\), the cardinality of the set of all connected components of \(\varGamma ^+\) isomorphic to \(\varPsi \) is equal to the set of all connected components of \(\varDelta ^+\) isomorphic to \(\varPsi \). It follows that \(\varGamma ^+\cong \varDelta ^+\), which finishes our proof. \(\square \)

The following corollary, which is the main result of this section, follows immediately from Theorem 1 and Theorem 2.

Corollary 1

Let G and H be power-associative loops. Then the following conditions are equivalent:

  1. 1.

    G and H have isomorphic power graphs;

  2. 2.

    G and H have isomorphic \(Z^\pm \)-power graphs;

  3. 3.

    G and H have isomorphic N-power graphs.

4 The power graph of a torsion-free group

Cameron, Guerra and Jurina [9] proved that, if torsion-free groups of nilpotency class 2 have isomorphic power graphs, then the two groups have isomorphic directed power graph. They asked whether the same result holds if at least one of the groups is torsion-free of nilpotency class 2. This section answers this question affirmatively.

We start this section by introducing several notations and some results from [9] which are going to be useful for proving the main result of this section. For a graph \(\varGamma \), by \(S_{\varGamma }(x,y)\) we denote the set:

$$\begin{aligned} S_\varGamma (x,y)=\overline{N}_\varGamma (y)\setminus \overline{N}_\varGamma (x), \end{aligned}$$

where \(\overline{N}_\varGamma (x)\) denotes the closed neighborhood of x in \(\varGamma \). Also, for a group G, by \(S_{ G}(x,y)\) we denote \(S_{\mathcal {G}^\pm ( G)}(x,y)\). \(S_G(x,y)\) is a useful construction because, by [9, Lemma 4.1], if G is the infinite cyclic group, then \(x\mathop {\rightarrow }\limits ^{\pm }y\) if and only if the set \(S_G(x,y)\) is finite.

The complement of a graph \(\varGamma =(V,E)\) is the graph \(\overline{\varGamma }=(V,V^{[2]}\setminus E)\). In this section, for an element x of a group G, by \(I_{ G}(x)\), \(O_{ G}(x)\) and \(M_{ G}(x)\) we denote the set of all its direct predecessors without \(x^{-1}\), the set of all its direct successors without \(x^{-1}\), and the set of all its neighbors without \(x^{-1}\) in \(\vec {\mathcal {G}}^\pm ( G)\), respectively, i.e.,

$$\begin{aligned} I_{ G}(x)&=\{y\in V\setminus \{x^{-1}\}\mid y{\mathop {\rightarrow }\limits ^{\pm }}_{ G} x\},\\ O_{ G}(x)&=\{y\in V\setminus \{x^{-1}\}\mid x{\mathop {\rightarrow }\limits ^{\pm }}_{ G} y\}\text { and}\\ M_{ G}(x)&=I_{ G}(x)\cup O_{ G}(x). \end{aligned}$$

Sometimes we may denote \(I_{ G}(x)\), \(O_{ G}(x)\) and \(M_{ G}(x)\) shortly by I(x), O(x) and M(x), respectively. Further, for a group G and its \(Z^\pm \)-power graph \(\varGamma ^\pm =\mathcal {G}^\pm ( G)\), we introduce the following denotations:

$$\begin{aligned}&\mathcal {I}_{ G}(x)=\varGamma ^\pm [I(x)],\qquad \mathcal {O}_{ G}(x)=\varGamma ^\pm [O(x)],\qquad \mathcal {M}_{ G}(x)=\varGamma ^\pm [M(x)],\\&\overline{\mathcal {I}}_{ G}(x)=\overline{\varGamma ^\pm }[I(x)],\qquad \overline{\mathcal {O}}_{ G}(x)=\overline{\varGamma ^\pm }[O(x)],\qquad \overline{\mathcal {M}}_{ G}(x)=\overline{\varGamma ^\pm }[M(x)], \end{aligned}$$

for the respective induced subgraphs of \(\mathcal {G}^\pm ( G)\) or its complement. Sometimes we write shortly \(\mathcal {I}(x)\), \(\mathcal {O}(x)\), \(\mathcal {M}(x)\), \(\overline{\mathcal {I}}(x)\), \(\overline{\mathcal {O}}(x)\) and \(\overline{\mathcal {M}}(x)\). Note that, for a non-identity element x of a torsion-free group G, the element \(x^{-1}\) is recognizable by the fact that it is the only vertex which has the same closed neighborhood in \(\mathcal {G}^\pm ( G)\) as the vertex x.

By [9, Lemma 3.3], for a torsion-free group G and its non-identity element x, \(\overline{\mathcal {O}}_G(x)\) is a connected component of \(\overline{\mathcal {M}}_G(x)\). Also, by [9, Lemma 3.4], if G and H are torsion-free groups, and if \(\varphi :G\rightarrow H\) is an isomorphism from \(\mathcal {G}^\pm (G)\) to \(\mathcal {G}^\pm (H)\), then \(\overline{\mathcal {M}}_G(x)\cong \overline{\mathcal {M}}_H\big (\varphi (x)\big )\), and, moreover, \(\overline{\mathcal {O}}_G(x)\cong \overline{\mathcal {O}}_H\big (\varphi (x)\big )\) and \(\overline{\mathcal {I}}_G(x)\cong \overline{\mathcal {I}}_H\big (\varphi (x)\big )\). However, let us note that \(\varphi \) may not map \(O_G(x)\) onto \(O_H\big (\varphi (x)\big )\).

The transposed digraph of a directed graph \(\vec \varGamma \) is the digraph \({\vec \varGamma }^T\) such that \(x\rightarrow _{\vec \varGamma ^T} y\) if \(y\rightarrow _{\vec \varGamma }x\). For digraphs \(\vec \varGamma =(V_1,E_1)\) and \(\vec \varDelta =(V_2,E_2)\), bijection \(\varphi :V_1\rightarrow V_2\) is an anti-isomorphism from \(\vec \varGamma \) to \(\vec \varDelta \) if \(\varphi \) is an isomorphism from \(\vec \varGamma \) to \(\vec \varDelta ^T\). Interestingly, an isomorphism between the \(Z^\pm \)-power graphs of groups may be anti-isomorphism between their directed \(Z^\pm \)-power graphs. For example, the mapping \(\varphi _a:\mathbb {Q}\rightarrow \mathbb {Q}\) defined as

$$\begin{aligned} \varphi _a(x)={\left\{ \begin{array}{ll} 0,&{}x= 0 \\ \displaystyle \frac{a^2}{x},&{}x\ne 0. \end{array}\right. } \end{aligned}$$

is an anti-isomorphism from \(\mathcal {G}^\pm (\mathbb {Q})\) onto itself (see [9, Lemma 6.1]).

Before we move on with the proof of Lemma 4, let us introduce a well-known theorem about locally cyclic groups. Its proof can be found in [22, Chapter VIII, Section 30].

Theorem 3

Every torsion-free abelian group of rank 1 is isomorphic to a subgroup of the additive group of rational numbers.

In other words, a torsion-free group is locally cyclic if and only if it is isomorphic to a subgroup of the group of rational numbers.

Lemma 4

Let G be a torsion-free locally cyclic group such that \(\mathcal {O}_{ G}(x)\cong \mathcal {I}_{ G}(x)\) for all \(x\in G\). Then \( G\cong (\mathbb {Q},+)\).

Proof

Suppose that \( G\not \cong (\mathbb {Q},+)\) and that \(\mathcal {I}_{ G}(x)\cong \mathcal {O}_{ G}(x)\) for all \(x\in G\). By Theorem 3, any torsion-free locally cyclic group can be embedded into the group of rational numbers. Notice that \(\mathbb {Q}\) is isomorphic to none of its proper subgroups, because, for every prime number p, every equation \(px=a\) with the unknown x has a solution in \(\mathbb {Q}\). Also, every subgroup of the group of rational numbers is isomorphic to a subgroup of \(\mathbb {Q}\) which contains 1. Namely, if \(q\in G\) for \(G\le (\mathbb {Q},+)\), then the mapping \(\varphi _q: x\mapsto \frac{x}{q}\) is a group isomorphism from G to \(\varphi (G)\), and \(\varphi (G)\) contains 1. Therefore, without loss of generality, one can assume that \( G<(\mathbb {Q},+)\), and that \(1\in G\). One can also notice that there is a prime number p such that \(\frac{1}{p^k}\not \in G\) for some \(k\in \mathbb {N}\), and, without loss of generality, we can assume that \(\frac{1}{p}\in G\).

Let m be the maximal natural number such that \(\frac{1}{p^{m}}\in G\). Notice that such natural number does exist, because \(\frac{1}{p^k}\not \in G\) implies that \(\frac{1}{p^{k+1}}\not \in G\). Let \(\preceq \) be the preorder on \(O_{ G}(1)\) such that \(x\preceq y\) if \(x\rightarrow y\) or \(x=y\). Let us introduce the preorder \(\preceq \) on \(I_{ G}(1)\) such that \(x\preceq y\) if \(y\rightarrow x\) or \(x=y\). One can easily see that classes of the preordered set \((O_{ G}(1),\preceq )\) are two-element sets \(\{n,-n\}\), where \(n\in \mathbb {N}\setminus \{1\}\) and that classes of the preordered set \((I_{ G}(1),\preceq )\) are two-element sets of form \(\{\frac{1}{n},-\frac{1}{n}\}\), for \(n\in \mathbb {N}\setminus \{1\}\). Further, notice that minimal classes of \((O_{ G}(1),\preceq )\) are the ones containing prime numbers and that minimal classes of \((I_{ G}(1),\preceq )\) are the ones containing the multiplicative inverses of prime numbers.

Notice that, for all \(x,y\in O_{ G}(1)\) adjacent in \(\mathcal {G}^\pm ( G)\), holds \(x\rightarrow y\) if and only if \(S_{\mathcal {O}_{ G}(1)}(x,y)\) is a finite set. Also, for \(x,y\in I_{ G}(1)\) holds \(y\rightarrow x\) if and only if the set \(S_{\mathcal {I}_{ G}(1)}(x,y)\) is finite. Let \(\varphi : O_{ G}(1)\rightarrow I_{ G}(1)\) be an isomorphism from \(\mathcal {O}_{ G}(1)\) to \(\mathcal {I}_{ G}(1)\). By the above discussion, \(\varphi \) is a preorder isomorphism from \((O_{ G}(1),\mathord \preceq )\) to \((I_{ G}(1),\preceq )\). Notice that in \((O_{ G}(1),\preceq )\) each element of any minimal class is contained in some infinite ascending chain L such that every two elements of \(L^\downarrow =\{z\in O_{ G}(1)\mid z\preceq x\text { for some } x\in L\}\) are comparable. Namely, if x is an element of a minimal class of \((O_{ G}(1),\preceq )\), then x or \(-x\) is a prime number. Then, the sequence \(x,x^2,x^3,\dots \) makes up an ascending chain L, and, for each \(y\in L^\downarrow \), y or \(-y\) is a power of the prime number \(|x|\). Since \((O_{ G}(1),\preceq )\) and \((I_{ G}(1),\preceq )\) are isomorphic preordered sets, it follows that the same holds for \((I_{ G}(1),\preceq )\). However, because G does not contain all powers of \(\frac{1}{p}\), \(\frac{1}{p}\) is contained in no infinite ascending chain L of the preordered set \((I_{ G}(1),\preceq )\) such that every two elements of \(L^\downarrow \) are comparable. This is in contradiction with the fact that preordered sets \((O_{ G}(1),\preceq )\) and \((I_{ G}(1),\preceq )\) are isomorphic. This proves the lemma. \(\square \)

Cameron, Guerra and Jurina proved in [9] that, for any group G, \(\mathcal {G}^\pm (G)\cong \mathcal {G}^\pm (\mathbb {Q})\) implies \(\vec {\mathcal {G}}^\pm (G)\cong \vec {\mathcal {G}}^\pm (\mathbb {Q}^n)\). Furthermore, any isomorphism \(\varphi \) from \(\mathcal {G}^\pm (G)\) to \(\mathcal {G}^\pm (\mathbb {Q})\) and any \(C\subseteq G\) which induces a connected component of \(\mathcal {G}^\pm (\mathbf{G})\), the restriction of \(\varphi \) on C is an isomorphism or an anti-isomorphism (see [9, Theorem 1.5]). As we are going to show, this result, together with Lemma 4, implies that no group non-isomorphic to the group of rational numbers has the power graph isomorphic to \(\mathcal {G}(\mathbb {Q})\).

Corollary 2

Let G be a group such that \(\mathcal {G}^\pm ( G)\cong \mathcal {G}^\pm (\mathbb {Q})\). Then \( G\cong (\mathbb {Q},+)\).

Proof

Because \(\mathcal {G}^\pm ( G)\cong \mathcal {G}^\pm (\mathbb {Q})\), then, by [9, Theorem 1.5], \(\vec {\mathcal {G}}^\pm ( G)\cong \vec {\mathcal {G}}^\pm (\mathbb {Q})\). It follows that G is a locally cyclic group such that, for all \(x\in G\), holds \(\mathcal {O}_{ G}(x)\cong \mathcal {I}_{ G}(x)\). Therefore, by Lemma 4, it follows that G is isomorphic to the group of rational numbers. \(\square \)

As seen before, for torsion-free groups G and H, an isomorphism \(\varphi \) from \(\mathcal {G}^\pm ( G)\) to \(\mathcal {G}^\pm ( H)\), and elements \(x,y\in G\) such that \(x\mathop {\rightarrow }\limits ^{\pm }y\), we might not be able to tell whether \(\varphi (x)\mathop {\rightarrow }\limits ^{\pm }\varphi (y)\) or \(\varphi (y)\mathop {\rightarrow }\limits ^{\pm }\varphi (x)\). However, with the following lemma, we will be able to prove that, for any connected component \(\varGamma \) of \(\mathcal {G}^\pm ( G)\), \(\varphi \) either preserves or reverses directions of all arcs of \(\varGamma \).

Lemma 5

Let G be a torsion-free group, and let \(x,y,z\in G\) be such that \(x,y\in O_{ G}(z)\), \(x{\mathop {\rightarrow }\limits ^{\pm }}_{ G}y\), and \(y\not \in \{x,x^{-1}\}\). Let H be a group, and let \(\varphi : G\rightarrow H\) be an isomorphism from \(\mathcal {G}^\pm ( G)\) to \(\mathcal {G}^\pm ( H)\). Then

\(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) if and only if \(\varphi \big (O_{ G}(z)\big )= O_{ H}\big (\varphi (z)\big )\).

Proof

Because, by [9, Lemma 3.3], \(O_{ G}(z)\) and \(O_{ H}\big (\varphi (z)\big )\) induce connected components of \(\overline{\mathcal {M}}_{ G}(z)\) and \(\overline{\mathcal {M}}_{ H}\big (\varphi (z)\big )\), respectively, it follows, by [9, Lemma 3.4], that \(\varphi \big (O_{ G}(z)\big )= O_{ H}\big (\varphi (z)\big )\) if and only if \(\varphi (x),\varphi (y)\in O_{ H}\big (\varphi (z)\big )\). Therefore, it is sufficient to prove that \(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) if and only if \(\varphi (x),\varphi (y)\in O_{ H}\big (\varphi (z)\big )\).

Since G is a torsion-free group, by [9, Lemma 3.1], G has an isolated vertex. Because \(\mathcal {G}^\pm (G)\cong \mathcal {G}^\pm (H)\), H has an isolated vertex too. Therefore, by [9, Lemma 3.1], group H is torsion-free, too. Since \(\{x,x^{-1}\}\), \(\{y,y^{-1}\}\) and \(\{z,z^{-1}\}\) are pairwise disjoint sets, then elements x, y and z have distinct closed neighborhoods. Therefore, \(\varphi (x)\), \(\varphi (y)\) and \(\varphi (z)\) have distinct closed neighborhoods, which implies that \(\{\varphi (x),\varphi (x^{-1})\}\), \(\{\varphi (y),\varphi (y^{-1})\}\) and \(\{\varphi (z),\varphi (z^{-1})\}\) are pairwise disjoint sets.

Suppose that \(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\), and suppose that \(\varphi (x),\varphi (y)\in I_{ H}\big (\varphi (z)\big )\). Then it follows that \(\varphi (x),\varphi (y){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (z)\). By [9, Lemma 3.3], \(\overline{\mathcal {O}}_{ G}(z)\) is a connected component of \(\overline{\mathcal {M}}_{ G}(z)\), so the subgraph of \(\overline{\mathcal {M}}_{ H}\big (\varphi (z)\big )\) induced by \(\varphi \big (O_{ G}(z)\big )\) is connected and isomorphic to \(\overline{\mathcal {O}}_{ G}(z)\). By [9, Lemma 4.1], the set \(S_{\mathcal {O}_{ G}(z)}(y,x)\) is infinite, which implies that \(S_{\varphi (\mathcal {O}_{ G}(z))}\big (\varphi (y),\varphi (x)\big )\) is infinite. However, from \(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) and \(\varphi (y){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (z)\) it follows that \(S_{\varphi (\mathcal {O}_{ G}(z))}\big (\varphi (y),\varphi (x)\big )\) is finite, which is a contradiction. Thus, \(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) implies \(\varphi (x),\varphi (y)\in O_{ H}\big (\varphi (z)\big )\), and it remains to prove the other implication as well.

Suppose that \(\varphi (x),\varphi (y)\in O_{ H}\big (\varphi (z)\big )\), which implies that \(\varphi \big (O_{ G}(z)\big )=O_{ H}\big (\varphi (z)\big )\). Suppose now that \(\varphi (x)\not \!\!\!{\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\). That implies \(\varphi (y){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (x)\), i.e., \(\varphi (z){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) and \(\varphi (y){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (x)\). By [9, Lemma 4.1], \(S_{\mathcal {O}_{ H}(\varphi (z))}\big (\varphi (y),\varphi (x)\big )\) is finite. On the other hand, the fact that \(S_{\mathcal {O}_{ G}(z)}(y,x)\) is infinite implies that \(S_{\varphi (\mathcal {O}_{ G}(z))}\big (\varphi (y),\varphi (x)\big )=S_{\mathcal {O}_{ H}(\varphi (z))}\big (\varphi (y),\varphi (x)\big )\) is infinite, which is a contradiction. Thus, the lemma has been proved. \(\square \)

Now we are ready to prove the main result of this paper.

Theorem 4

Let G be a torsion-free group of nilpotency class 2, and let H be a group such that \(\mathcal {G}^\pm ( G)\cong \mathcal {G}^\pm ( H)\). Then \(\vec {\mathcal {G}}^\pm ( G)\cong \vec {\mathcal {G}}^\pm ( H)\).

Proof

Let \(\varphi : G\rightarrow H\) be an isomorphism from \(\mathcal {G}^\pm ( G)\) to \(\mathcal {G}^\pm ( H)\). Then \(\varphi \) maps every connected component of \(\mathcal {G}^\pm ( G)\) onto some connected component of \(\mathcal {G}^\pm ( H)\). Also, by [9, Lemma 3.1], the group H is torsion-free, too. Let C induce a non-trivial connected component of \(\mathcal {G}^\pm ( G)\), and let us denote \(\varphi (C)\) by D. By [9, Lemma 7.1], \(C\cup \{e_{ G}\}\) is the universe of a locally cyclic subgroup of G. That locally cyclic subgroup we shall denote by \(\hat{ C}\). Let \(x,y\in C\) be such that \(x{\mathop {\rightarrow }\limits ^{\pm }}_{ G} y\) and \(y\not \in \{x,x^{-1}\}\).

Let us show that \(\varphi |_C\) is an isomorphism or an anti-isomorphism from graph \(\big (\vec {\mathcal {G}}^\pm ( G)\big )[C]\) to \(\big (\vec {\mathcal {G}}^\pm ( H)\big )[D]\). Let \(u,v\in C\), and let \(u{\mathop {\rightarrow }\limits ^{\pm }}_{ G}v\). Since \(\varphi \) is an isomorphism from \(\varGamma \) to \(\varDelta \), then \(\varphi (u){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (v)\) or \(\varphi (v){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (u)\). Obviously, if \(v\in \{u,u^{-1}\}\), then so does \(\varphi (v)\in \{\varphi (u),\varphi (u^{-1})\}\) because in this case \(u\equiv _{\mathcal {G}^\pm ( G)} v\) and \(\varphi (u)\equiv _{\mathcal {G}^\pm ( H)}\varphi (v)\). So suppose that \(v\not \in \{u,u^{-1}\}\). Because \(\hat{ C}\) is a locally cyclic subgroup of G, there exists \(w\in C\) such that \(x,u\in \langle w\rangle \). Suppose that \(w\not \in \{x,x^{-1},u,u^{-1}\}\). In this case, by Lemma 5, \(\varphi (x){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (y)\) if and only if \(\varphi \big (O_{ G}(w)\big )= O_{ H}\big (\varphi (w)\big )\). Furthermore, by the same lemma, these conditions are equivalent to \(\varphi (u){\mathop {\rightarrow }\limits ^{\pm }}_{ H}\varphi (v)\). Similarly, we can prove the assertion when \(w\in \{x,x^{-1},u,u^{-1}\}\). Namely, in this case at least one of the two equivalences holds by [9, Lemma 3.3] and [9, Lemma 3.4], instead of by Lemma 5. So \(\varphi |_C\) is an isomorphism or an anti-isomorphism from \(\big (\vec {\mathcal {G}}^\pm ( G)\big )[C]\) to \(\big (\vec {\mathcal {G}}^\pm ( H)\big )[D]\).

Next we prove that \(\big (\vec {\mathcal {G}}^\pm ( G)\big )[C]\cong \big (\vec {\mathcal {G}}^\pm ( H)\big )[D]\), which obviously holds if \(\varphi |_C\) is an isomorphism. If \(\varphi |_C\) is an anti-isomorphism, then, for each \(x\in C\), \(O_{ G}(x)\) is being mapped onto \(I_{ H}\big (\varphi (x)\big )\), and \(I_{ G}(x)\) is being mapped onto \(O_{ H}\big (\varphi (x)\big )\). It follows that \(\mathcal {O}_{ G}(x)\cong \mathcal {O}_{H}\big (\varphi (x)\big )\cong \mathcal {I}_{ G}(x)\), which, by Lemma 4, implies \(\hat{ C}\cong (\mathbb {Q},+)\). Then, by [9, Lemma 6.1], it follows that \(\big (\vec {\mathcal {G}}^\pm ( G)\big )[C]\cong \big (\vec {\mathcal {G}}^\pm ( H)\big )[D]\).

Now we proved that, for every set \(C\subseteq G\) inducing a connected component of \(\mathcal {G}^\pm ( G)\), we have that \(\big (\vec {\mathcal {G}}^\pm ( G)\big )[C]\cong \big (\vec {\mathcal {G}}^\pm ( H)\big )\big [\varphi (C)\big ]\). Thus, groups G and H have isomorphic directed \(Z^\pm \)-power graphs, which proves the theorem. \(\square \)