The non-commuting, non-generating graph of a nilpotent group

For a nilpotent group $G$, let $\Xi(G)$ be the difference between the complement of the generating graph of $G$ and the commuting graph of $G$, with vertices corresponding to central elements of $G$ removed. That is, $\Xi(G)$ has vertex set $G \setminus Z(G)$, with two vertices adjacent if and only if they do not commute and do not generate $G$. Additionally, let $\Xi^+(G)$ be the subgraph of $\Xi(G)$ induced by its non-isolated vertices. We show that if $\Xi(G)$ has an edge, then $\Xi^+(G)$ is connected with diameter $2$ or $3$, with $\Xi(G) = \Xi^+(G)$ in the diameter $3$ case. In the infinite case, our results apply more generally, to any group with every maximal subgroup normal. When $G$ is finite, we explore the relationship between the structures of $G$ and $\Xi(G)$ in more detail.


Introduction
A number of graphs have been defined on the set of elements of a group, aiming to capture some aspect of the group structure in graph-theoretic terms. Prominent among these is the commuting graph, in which two elements are joined by an edge if and only if they commute. This graph is trivially connected with diameter at most 2, since the identity is connected to all other vertices. However, if we remove the central elements of the group, then the commuting graph is no longer obviously connected, and indeed it fails to be connected for some groups. Giudici and Parker [8] showed that, even if it is connected, its diameter may be unbounded. On the other hand, Morgan and Parker [13] showed that if a group has trivial centre, then any connected component of its commuting graph has diameter at most 10. The commuting graph of a group G fits into a hierarchy of graphs as follows. Each graph now has vertex set G \ {1}, and the rules for adjacency of vertices x and y are as follows: • the power graph: one of x and y is a power of the other; • the enhanced power graph: x and y are powers of some element z; • the commuting graph: [x, y] = 1; • the non-generating graph: x, y = G; • the complete graph: all pairs are adjacent.
Observe that each graph is a spanning subgraph of the next (except for the third and fourth when G is 2-generated and abelian). This allows us to refine questions about connectedness, and ask, for instance, whether the difference between consecutive graphs in the hierarchy is connected (often with specified vertices removed). For example, the difference between the complete and non-generating graphs of G is the generating graph Γ(G), where x and y are adjacent if and only if x, y = G. For convenience, we will write Γ + (G) to denote the subgraph of Γ(G) induced by its non-isolated vertices.
The most basic question is whether the difference between consecutive graphs has any edges at all, for |G| > 2. Finite groups whose power graph and enhanced power graph are equal, or whose enhanced power graph and commuting graph are equal, were determined by Aalipour et al. [1]. The commuting graph and the non-generating graph of a non-abelian group are equal if and only if the group is minimal non-abelian, i.e., every proper subgroup of the group is abelian. Finally, Γ(G) has no edges if and only if G is not 2-generated.
More complicated questions regarding connectedness have also been asked and resolved in the case of Γ(G). For example, Breuer, Guralnick and Kantor [5,Theorem 1.2] proved that if G is a non-abelian finite simple group, then Γ(G) is extremely "dense", in the sense that it is connected with diameter 2. More recently, Burness, Guralnick and Harper [6,Corollary 6] generalised this result: if G is a finite group, then Γ(G) either has an isolated vertex or is connected with diameter at most 2.
The structure of Γ(G) is less predictable, however, when isolated vertices are involved. For example, Crestani and Lucchini [7,Theorem 1.3] showed that although Γ + (G) is connected when G is a 2-generated direct power of SL(2, 2 p ), with p an odd prime, G can be chosen so that the diameter of Γ + (G) is arbitrarily large. On the other hand, Lucchini [11,Corollary 4] proved that if G is finite and nilpotent, then Γ + (G) is connected with diameter at most 2.
This motivates the present paper, which considers the non-commuting, non-generating graph Ξ(G) of a group G, i.e., the difference between the non-generating graph and the commuting graph of G. In this case, we remove all vertices corresponding to central elements of G, as otherwise these would always be isolated. Thus Ξ(G) is the graph whose vertices are G \ Z(G), with vertices x and y adjacent if and only if [x, y] = 1 and x, y = G. In addition, we write Ξ + (G) to denote the subgraph of Ξ(G) induced by its non-isolated vertices.
We will focus in this paper on the case where G is a (not necessarily finite) nilpotent group, and describe the possible diameters of the connected components of Ξ(G). As the unique nontrivial connected component of the generating graph of a finite 2-generated nilpotent group G is always extremely dense, one may expect that the same is not necessarily true for Ξ(G), which is a proper subgraph of the complement of this generating graph. However, the first of our main theorems shows that this is actually the case for any nilpotent group.
We will in fact prove that the conclusion of this theorem holds whenever G is a group with every maximal subgroup normal. This is a weaker condition than nilpotency, as illustrated by the infinite 2-generated 3-group constructed by Gupta and Sidki [10]. Indeed, every maximal subgroup of this group is normal [17,Theorem 4.3]; however, the group has no finite presentation [19], and is therefore not nilpotent. For further discussion of groups with every maximal subgroup normal, see, for example [14,15].
It is clear that, for an arbitrary group G, the graph Ξ(G) is empty if and only if G is abelian. As mentioned above, Ξ(G) has vertices but no edges if and only if G is minimal non-abelian. Since a non-central element of a group is centralised by at most one maximal subgroup, a minimal non-abelian group is necessarily 2-generated.
The finite minimal non-abelian groups were classified by Miller and Moreno [12] in 1903 (see also [18]). In particular, any such group is either a p-group, for some prime p, or a non-nilpotent group whose order is divisible by exactly two primes. A concise description of the finite minimal non-abelian p-groups is given in [21,Theorem 2.4]. On the other hand, a classification of infinite minimal non-abelian groups is not complete. Well-known examples are the Tarski monsters, which are simple groups where every proper nontrivial subgroup is cyclic of fixed prime order p. Ol'shanskiȋ [16] proved that a Tarski monster exists for each prime p > 10 75 .
The relationship between G and Ξ(G) is less clear when Ξ(G) has edges. The remaining two main theorems of this paper provide a detailed overview of this relationship in the case where G is a finite nilpotent group. We let Φ(G) denote the Frattini subgroup of G.  Using Magma [4], we can show that the groups numbered (16,7), (243, 3) and (32, 6) in the Small Groups Library [3] are groups of the smallest order satisfying (iii)(a), (b) and (c), respectively. Theorem 1.3. Let G be a finite nilpotent group whose order is divisible by at least two primes. Then one of the following occurs. Note that the group P in case (iii)(b) of the above theorem may be minimal non-abelian. The structure of this paper is as follows. In §2, we prove several preliminary results about the graph Ξ(G). Next, in §3, we derive useful properties of groups that contain a normal maximal subgroup. This section concludes with a proof of Theorem 1.1. We then prove Theorem 1.2 in §4. Finally, in §5, we investigate the structure of Ξ(G) when G is a direct product of groups, and in particular prove Theorem 1.3.

Preliminary results
We now prove several elementary but useful results about the non-commuting, non-generating graph of an arbitrary group G. Note that if x and y are vertices of a graph, then we write d(x, y) to denote the distance in the graph between x and y.
Proof. Suppose, for a contradiction, that Ξ(G) has a connected component X of diameter 1.
Observe that an element of G \ Z(G) and its inverse have the same set of neighbours in Ξ(G), and are not adjacent. This implies that |h| = 2 for each h ∈ X.
Let x, y ∈ X. Then {x, y} is an edge of Ξ(G), and it follows easily that {x, xy} is also an edge. Hence xy ∈ X. Thus x, y and xy all have order 2, and we conclude that [x, y] = (xy) 2 = 1. Therefore, {x, y} is not an edge of Ξ(G), a contradiction.
In order to deduce additional properties of Ξ(G), we will briefly consider the non-commuting graph of G. This graph has vertex set G \ Z(G), with two vertices adjacent if and only if they do not commute. Thus the graph is the complement of the commuting graph (with central elements removed). Abdollahi, Akbari and Maimani proved the following result, using similar arguments to those in the proof of Proposition 2.1 above, as well as the fact that the union of two proper subgroups of G is a proper subset of G.
We are now able to derive two useful corollaries involving Ξ(G). Next, notice that if G is not 2-generated, then Ξ(G) is equal to the non-commuting graph of G. We therefore obtain the following corollary of Proposition 2.2.

Corollary 2.4. Suppose that G is non-abelian and not
Hence to prove our main theorems, we need only consider non-abelian 2-generated groups that are not minimal non-abelian.
Remark 2.5. Suppose that G is finite, non-abelian and nilpotent. The non-commuting, nongenerating graph of the direct product of G and a finite cyclic group is described in Theorem 1.3. We can also determine the structure of Ξ(G × Z). Observe that G contains a non-cyclic Sylow subgroup P . Let k be the smallest size of a generating set for P . Then k > 1, and Burnside's Basis Theorem implies that P/Φ(P ) is isomorphic to the elementary abelian group C k p for some prime p.
we conclude that the smallest size of a generating set for G × Z is at least k + 1 > 2. Hence Corollary 2.4 shows that Ξ(G × Z) is connected with diameter 2.

The final result in this section generalises the observation that every vertex of Ξ(G) is isolated if and only if G is minimal non-abelian.
Proposition 2.6. Suppose that G is non-abelian and 2-generated, and let g ∈ G \ Z(G). Then g is an isolated vertex of Ξ(G) if and only if: As G is finitely generated, each of its proper subgroups lies in some maximal subgroup. Thus g is isolated if and only if each maximal subgroup containing g also centralises g. Since g is centralised by at most one maximal subgroup, either (i) and (ii) both hold (and g is isolated) or g is non-central in at least one maximal subgroup (and is not isolated).
Note that if G is finitely generated but not 2-generated, then each element of G lies in more than one maximal subgroup.

Groups with normal maximal subgroups
In this section, we derive some of the most important tools that we will use to prove our main theorems. We will conclude the section with a proof of Theorem 1.1. Proof. Assume, for a contradiction, that G contains an abelian maximal subgroup L. It is clear

This is a contradiction, as
Our next result, together with Proposition 2.6, allows us to better characterise isolated vertices of Ξ(G) in the case where every maximal subgroup of G is normal. Our next result provides upper bounds (and in some cases exact values) for distances between certain non-isolated vertices of Ξ(G), and in fact between any two non-isolated vertices when every maximal subgroup of G is normal. If M is indeed the unique maximal subgroup of G that contains but does not centralise y, then the neighbourhood of y in Ξ(G) is a subset of M. However, since x ∈ Z(M), no element of M is a neighbour of x. Thus d(x, y) > 2, and so d(x, y) = 3.
Suppose instead that there exists a maximal subgroup K of G that contains but does not centralise y, with K = M. Then K ∩ M and C K (y) are proper subgroups of K, and so there exists an element s ∈ K that does not lie in M or C G (y). It is clear that {s, y} is an edge of Ξ(G). In addition, since x ∈ Z(M), we conclude as in the proof of Case (c) that x is adjacent in Ξ(G) to each element of G \ M, and in particular to s. Thus (x, s, y) is a path in Ξ(G), and hence d(x, y) ≤ 2.
We are now able to prove a more general version of Theorem 1.1. Proof. Suppose that Ξ(G) contains an edge, so that G is non-abelian and not minimal nonabelian. We may also assume that G is 2-generated, as otherwise Ξ(G) is connected with diameter 2 by Corollary 2.4. Let x and y be non-isolated vertices of Ξ(G). Then Proposition 2.6 shows that G contains maximal subgroups L and M such that x ∈ L \ Z(L) and y ∈ M \ Z(M). As these maximal subgroups are normal in G, applying Lemma 3.3 to the 4-tuple (x, L, y, M) gives d(x, y) ≤ 3. The theorem's first conclusion now follows from Proposition 2.1, which shows that no connected component of Ξ(G) has diameter 1.
Suppose now that Ξ(G) has an isolated vertex g. To complete the proof, we will show that diam(Ξ + (G)) = 2. We observe from Proposition 2.6 that g lies in a unique maximal subgroup K of G, and that g ∈ Z(K). Moreover, as K G, Proposition 3.2 shows that K is abelian. It therefore follows from Proposition 3.1 that each non-abelian maximal subgroup M of G satisfies Z(M) ≤ Z(G). Thus Lemma 3.3 yields diam(Ξ + (G)) = 2. Theorem 1.1 now follows immediately.

Finite p-groups
In this section, we determine the diameters of the connected components of Ξ(G) when G is a finite p-group, with p a prime, and in particular prove Theorem 1.2. Corollary 2.4 implies that it suffices to consider the case where G is non-abelian and 2-generated. We therefore begin by deducing information about non-abelian, finite, 2-generated p-groups.
The "equality" statement in part (iii) of the following lemma is well known (for example, see [21,Lemma 2.3]).   (iii)-(iv) Let M be a maximal subgroup of G, and let x ∈ M \ Φ(G). Then by (ii), M is the unique maximal subgroup of G containing x. As the abelian group x, Z(G) is a proper subgroup of G, it follows that M contains Z(G). As this holds for every maximal subgroup of G, we conclude that Z(G) ≤ Φ(G). Now, if Z(G) = Φ(G), then Φ(G), x is abelian, and is equal to M by (i). This again holds for every maximal subgroup of G, and so G is minimal non-abelian.
If instead there exists y ∈ Φ(G) \ Z(G), then at most one maximal subgroup of G centralises y. As y lies in each maximal subgroup of G, it follows that at most one of these maximal subgroups is abelian, and in particular G is not minimal non-abelian.
We are now able to prove our second main theorem.
Proof of Theorem 1.2. Lemma 4.1 shows that if G is non-abelian, 2-generated and not minimal non-abelian, then G contains at most one abelian maximal subgroup, and Z(G) < Φ(G). Hence, in this case, each maximal subgroup of G contains Z(G). Therefore, exactly one of (i), (ii) and (iii) holds.
(i) This is clear.

Direct products of groups
In this section, we explore the structure of the non-commuting, non-generating graph of a direct product of groups. In particular, we conclude with a proof of Theorem 1.3.
Let G and H be arbitrary groups, with g 1 , g 2 ∈ G and h 1 , h 2 ∈ H. Observe that if [g 1 , g 2 ] = 1 or [h 1 , h 2 ] = 1, then the elements (g 1 , h 1 ) and (g 2 , h 2 ) of G × H do not commute and are therefore non-central. In particular, these elements are vertices of Ξ(G × H). Additionally, if g 1 , g 2 = G or h 1 , h 2 = H, then (g 1 , h 1 ), (g 2 , h 2 ) = G × H. Therefore, relatively weak conditions are required for two vertices of Ξ(G × H) to be adjacent. We utilise this fact to prove the following two results. Proof. Let (g 1 , h 1 ), (g 2 , h 2 ) ∈ (G × H) \ (Z (G × H)). Observe that if g 1 , g 2 ∈ Z(G), then h 1 , h 2 / ∈ Z(H), and vice versa. We split the proof into three (not all mutually exclusive) cases. By Proposition 2.1, it suffices in each case to find a path of length 2 in Ξ(G) between (g 1 , h 1 ) and (g 2 , h 2 ).
. This case only occurs if H is non-abelian, and we conclude as in Case (a) that d((g 1 , h 1 ), (g 2 , h 2 )) ≤ 2.
Case (c): Exactly one of g 1 and g 2 is central in G, and exactly one of h 1 and h 2 is central in H. We will assume without loss of generality that h 1 ∈ Z(H), so that h 2 / ∈ Z(H). Then, since (g 1 , h 1 ), (g 2 , h 2 ) / ∈ Z(G × H), we deduce that g 1 / ∈ Z(G) and g 2 ∈ Z(G). Let s ∈ G \ C G (g 1 ) and t ∈ H \ C G (h 2 ). The non-abelian group G properly contains the abelian group g 2 , s , and similarly, h 1 , t < H. Thus ((g 1 , h 1 ), (s, t), (g 2 , h 2 )) is a path in Ξ(G × H).
The above result shows that the non-commuting, non-generating graph behaves very differently to the generating graph in the context of 2-generated direct powers of non-abelian groups. Indeed, as mentioned in §1, Crestani and Lucchini proved that there is no upper bound for the diameter of Γ + (G), for G such a direct power.
In the following proposition and its proof, we use the symbol d to denote distances in both Ξ(G) and Ξ(G × H). In each case, it will be clear which graph contains the relevant vertices. Additionally, if x and y are vertices of a graph that lie in distinct connected components, then we write d(x, y) = ∞.
Proposition 5.2. Suppose that G is non-abelian and H is cyclic. Additionally, let g 1 and g 2 be distinct elements of G \ Z(G), and let h 1 , h 2 ∈ H. Then the following statements hold.
Hence if Ξ(G) is connected with diameter k, then Ξ(G × H) is connected with diameter at most k.
(i) This is clear if d(g 1 , g 2 ) = ∞. Otherwise, we obtain the result by setting r to be a path in Ξ(G) of minimal length with x 1 = g 1 and x k = g 2 .
(ii) This is clear if h 1 = h 2 . Otherwise, note that (g 1 , h 1 ) and (g 1 , h 2 ) commute, and hence are not adjacent in Ξ(G × H). The result now follows by setting r to be the path (g 1 , x 2 , g 1 ), with x 2 some neighbour of g 1 in Ξ(G).
Suppose finally that Ξ(G) is connected with diameter k, and recall from Proposition 2.1 that k ≥ 2. Since {(g, h) | g ∈ G \ Z(G), h ∈ H} is the set of vertices of Ξ(G × H), it follows from (i) and (ii) that Ξ(G × H) is connected with diameter at most k.
It is easy to show, using Burnside's Basis Theorem, that the direct product of a finite d 1generated p-group and a finite d 2 -generated p-group is (d 1 +d 2 )-generated. Thus no non-abelian 2-generated finite p-group can be expressed as a nontrivial direct product. It will follow from Theorem 1.3 that if H is a finite cyclic group and G is a finite nilpotent group such that Ξ(G) is connected, then diam(Ξ(G × H)) = diam(Ξ(G)) if and only if diam(Ξ(G × H)) = 3 and |G| and |H| have a common prime divisor. However, this is not always the case if G is not nilpotent. For example, the non-commuting, non-generating graph of the symmetric group S 4 is connected with diameter 3, as is the graph Ξ(S 4 × C 3 ). On the other hand, diam(Ξ(S 4 × C 2 )) = 2 (note that S 4 × C 2 is 2-generated).
We now wish to determine which vertices of Ξ(G × H) are isolated. Proposition 2.6 suggests that a classification of the maximal subgroups of G × H will aid us in this task. The next result, which is a consequence of Goursat's Lemma [9, §11-12], gives such a classification. In what follows, we assume the convention that if H is an infinite group, then each positive integer divides |H|. We are now able to describe the isolated vertices of Ξ(G × H).
Corollary 5.5. Let G and H be groups, with G non-abelian, and let g ∈ G and h ∈ H. Additionally, let L be the set of maximal subgroups L of G such that L G and |G : L| divides |H|. Then (g, h) is an isolated vertex of Ξ(G × H) if and only if all of the following hold: Proof. Recall from Corollary 2.4 that the non-commuting, non-generating graph of a group that is not 2-generated has no isolated vertices. Hence if G is not 2-generated, then (ii) does not hold, and if H is not 2-generated, then (i) does not hold. In either of these cases, G × H is not 2-generated, and hence Ξ(G × H) has no isolated vertices. We may therefore assume that G and H are 2-generated.
Suppose first that (g, h) is an isolated vertex of Ξ(G × H). Then Proposition 2.6 implies that G × H has a unique maximal subgroup K containing (g, h), and (g, h) ∈ Z(K). Hence by Theorem 5.4, (i) and (iii) hold, and g lies in a unique maximal subgroup M G of G. Since (g, h) lies in the maximal subgroup M G × H of G × H, we conclude that K = M G × H. In addition, since (g, h) ∈ Z(K), we deduce that g ∈ Z(M G ). Proposition 2.6 therefore yields (ii).
Conversely, suppose that (i), (ii) and (iii) all hold. Then it follows from Proposition 2.6 that g lies in a unique maximal subgroup M G of G, and g ∈ Z(M G ). Hence Theorem 5.4 implies that M G ×H is the unique maximal subgroup of G ×H containing (g, h). Since (g, h) ∈ Z(M G ×H), the vertex (g, h) is isolated in Ξ(G) by Proposition 2.6.
Proof of Theorem 1.3. Observe that exactly one of (i), (ii) and (iii) holds. We may therefore consider each case separately.
(i) This is clear.
(ii) This is an immediate consequence of Lemma 5.1.
(iii)(a) As Ξ(P ) is not the empty graph, Theorem 1.1 implies that Ξ(P ) is connected with diameter 2 or 3. Hence Propositions 2.1 and 5.2 show that Ξ(G) is connected, with 1 < diam(Ξ(G)) ≤ diam(Ξ(P )). It therefore suffices to find a pair of vertices of Ξ(G) of distance 3 in the case diam(Ξ(P )) = 3. Here, Theorem 1.2 shows that P is 2-generated, and that there exists a non-abelian maximal subgroup M of P with Z(P ) < Z(M). As |P | and |H| are coprime, G is also 2-generated.
Let a ∈ M \ (Φ(P ) ∪ Z(M)), b ∈ Z(M) \ Z(P ) and x ∈ H, with x = H. By Lemma 4.1(ii), M is the unique maximal subgroup of P containing a. As |P | is coprime to |H|, the set L in Theorem 5.4 is empty, and so M × H is the unique maximal subgroup of G containing (a, x). Additionally, (b, x) lies in Z(M × H), while (a, x) does not. Since Ξ(P ) contains no isolated vertices, we conclude from Proposition 2.6 that there exists a maximal subgroup L of P with b ∈ L \ Z(L), and hence (b, x) ∈ (L × H) \ Z(L × H). Applying Lemma 3.3 to the 4-tuple ((b, x), L × H, (a, x), M × H) therefore yields d((a, x), (b, x)) = 3.
(iii)(b) Since |P | is coprime to |H|, the set L in Corollary 5.5 is empty. Hence this corollary shows that the set of isolated vertices of Ξ(G) is as required. In particular, Ξ(G) = Ξ + (G) and Ξ + (G) is not empty (note that if x ∈ P \ Z(P ), then (x, 1) is a vertex of Ξ + (G)). Theorem 1.1 therefore implies that Ξ + (G) is connected with diameter 2.