Next Article in Journal
On Ulam Stability of a Partial Differential Operator in Banach Spaces
Next Article in Special Issue
Multi-View Learning-Based Fast Edge Embedding for Heterogeneous Graphs
Previous Article in Journal
Dynamic Analysis of Delayed Two-Species Interaction Model with Age Structure: An Application to Larch-Betula Platyphylla Forests in the Daxing’an Mountains, Northeast China
Previous Article in Special Issue
Efficient and Effective Directed Minimum Spanning Tree Queries
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Square of Some Generalized Hamming Graphs

1
Department of Applied Mathematics, Xi’an University of Science and Technology, Xi’an 710054, China
2
Modern Industrial Innovation Practice Center, Dongguan Polytechnic College, Dongguan 523109, China
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(11), 2487; https://doi.org/10.3390/math11112487
Submission received: 13 April 2023 / Revised: 24 May 2023 / Accepted: 25 May 2023 / Published: 28 May 2023
(This article belongs to the Special Issue Advances in Graph Theory: Algorithms and Applications)

Abstract

:
In this paper, we study the square of generalized Hamming graphs by the properties of abelian groups, and characterize some isomorphisms between the square of generalized Hamming graphs and the non-complete extended p-sum of complete graphs. As applications, we determine the eigenvalues of the square of some generalized Hamming graphs.
MSC:
05C50; 05C25

1. Introduction

All graphs considered in this paper are finite, undirected and simple. Let G be a graph with vertex set V ( G ) and edge set E ( G ) . The adjacency matrix of G of order n, denoted by A ( G ) , is a 0 1 matrix of order n with entries a i j such that a i j = 1 if the ith and jth vertices are adjacent and a i j = 0 otherwise. The eigenvalues of A ( G ) are called the eigenvalues of G, and the collection of eigenvalues of G with multiplicities is called the spectrum of G. A graph is integral [1,2] if all its eigenvalues are integers.
Let m 1 , , m r be positive integers and D = { d 1 , , d s } be a set of integers with 1 d i r for each i. The generalized Hamming graph  H ( m 1 , , m r ; D ) is a graph with a vertex set of the abelian group Z m 1 Z m r such that two elements of Z m 1 Z m r are adjacent if and only if the Hamming distance between them belongs to D, where the Hamming distance between the two elements x = ( x 1 , , x r ) and y = ( y 1 , , y r ) of Z m 1 Z m r is defined as d ( x , y ) = | { i : x i y i , 1 i r } | . The Hamming weight of x is defined to be w ( x ) = d ( x , 0 ) , where 0 = ( 0 , , 0 ) is the identity element of the abelian group Z m 1 Z m r . The Hamming weight w ( β ) of β = ( β 1 , , β n ) Z 2 n is similarly understood and easily seen to be equal to i = 1 n β i .
Hamming graphs are an important class of Cayley graphs [3,4,5]. These graphs have been and still are studied intensively because of their symmetry properties and their connections to communication networks, quantum physics, coding theory, and other areas (see, e.g., [3,6,7]). However, only few results on generalized Hamming graphs have been obtained so far. In 2010, Sander studied the eigenspaces of H ( p 1 , , p r ; { 1 , , d } ) for distinct primes p 1 , , p r [8]. In the same year, Klotz and Sander observed that H ( m 1 , , m r ; D ) is an integral Cayley graph [9]. In 2022, Li, Liu, and Zhang provided a few sufficient conditions for the existence of perfect state transfer in generalized hamming graphs [7].
Let G 1 , , G n be graphs and B Z 2 n \ { ( 0 , 0 , , 0 ) } , where as usual Z 2 = { 0 , 1 } denotes the group of integers modulo 2. The non-complete extended p-sum (NEPS) of G 1 , , G n with basis B, denoted by NEPS ( G 1 , , G n ; B ) , is the graph with vertex set V ( G 1 ) × × V ( G n ) such that two vertices ( x 1 , , x n ) and ( y 1 , , y n ) are adjacent if and only if there exists β = ( β 1 , , β n ) B such that x i = y i when β i = 0 , and x i is adjacent to y i in G i when β i = 1 . We call G 1 , , G n the factors of NEPS ( G 1 , , G n ; B ) . This notion is a generalization of several graph operations such as tensor product, Cartesian product, and strong product. See [10,11,12,13,14,15] for more properties of this operation. In 2013, Klotz and Sander showed that H ( m 1 , , m r ; D ) is an NEPS of the complete graphs K m 1 , , K m r (a complete graph is a graph in which every pair of vertices are adjacent) [16], and in this paper, we will provide the eigenvalue of the square of generalized Hamming graphs through NEPS.
Let G be a graph and ρ ( x , y ) denote the d i s t a n c e between two vertices x , y of G. That is, ρ ( x , y ) is the length of the shortest path between x and y in G or if no path between them exists. For a positive integer k, the kth power  G k of G, is the graph obtained from G by adding an edge between each pair of vertices with distance at most k. The second power G 2 is usually called the square of G. Graph powers are useful in distributed computing (see [17]) and designing algorithms for certain combinatorial optimization problems. Das and Guo produced bounds on the largest and second-largest Laplacian eigenvalues of G 2 and T 2 for any graph G and tree T [18], and they gave bounds on the spectral radii of G k and T k  [19]. Klotz and Sander proved that distance powers of integral Cayley graphs over an abelian group are also integral Cayley graphs over the same group [20]. Liu and Li computed the energies of distance powers of unitary Cayley graphs, and characterized which distance powers of unitary Cayley graphs are Ramanujan graphs [21]. Naser gave the diameter of random Cayley graph [22]. For more results, we refer the reader to papers [23,24,25,26,27].
The main goal of this paper is to study the square of generalized Hamming graphs. The remainder of this paper is organized as follows. The theories about Hamming graph and Cayley graph are introduced in Section 2. Section 3 characterizes isomorphisms between H ( m 1 , , m r ; D ) 2 and NEPS of complete graphs K m 1 , , K m r . This relation is remarkable, since it allows us to define the square of some generalized Hamming graphs purely combinatorially (via NEPS). NEPS of complete graphs can reveals some new access to structural properties of the square of some generalized Hamming graphs. As applications, Section 4 determines the eigenvalues of the square of some generalized Hamming graphs.

2. Preliminaries

We consider only Cayley graphs over abelian groups. Let Γ be a finite abelian group with the operation written additively. Let S be a subset of Γ such that S : = { s : s S } = S and 0 S , where 0 is the identity element of Γ . The Cayley graph over Γ with connection set S, denoted by Cay ( Γ , S ) , is a graph with vertex set Γ such that the two vertices a , b Γ are adjacent if and only if a b S . As usual, for A 1 , , A l Γ , where l 1 , denote A 1 + + A l = { a 1 + + a l : a i A i , 1 i l } , and set l A = A 1 + + A l with each A i = A and 0 A = { 0 } . For N N { } , define:
S ( N ) = n N S ( n ) ,
where:
S ( n ) = n S \ ( l = 0 n 1 l S ) , S ( ) = Γ \ S ,
where S is the subgroup of Γ generated by S.
Theorem 1
(see [20] [Theorem 3]). Let Cay ( Γ , S ) be an integral Cayley graph over a finite abelian group Γ. Let N N { } . Then:
Cay ( Γ , S ) N Cay ( Γ , S ( N ) ) .
In particular, Cay ( Γ , S ) N is an integral Cayley graph.
Notation 1.
In the sequel we assume that m 1 , , m r 2 are integers and D = { d 1 , , d s } is a set of integers with 1 d i r for each i, where r and s are positive integers.
Lemma 1
(see [9] [Proposition 14]). Let Γ = Z m 1 Z m r and S = { x Γ : w ( x ) D } . Then:
H ( m 1 , , m r ; D ) Cay ( Γ , S ) .
By Theorem 1 and Lemma 1, we obtain the following result.
Lemma 2.
Let Γ and S be as in Lemma 1, and let k 1 be an integer. Then:
H ( m 1 , , m r ; D ) k Cay ( Γ , S ) k .
Theorem 2.
Let Γ = Z m 1 Z m r , and let S be the set of elements of Γ with Hamming weights in D. Set B = { β ( x ) : x S } , where β ( x ) = ( β 1 , , β r ) Z 2 r with β i = 1 if x i 0 and β i = 0 if x i = 0 . Then:
Cay ( Γ , S ) NEPS ( K m 1 , , K m r ; B ) .
Proof. 
It was shown in [16] [Example 2.8] that H ( m 1 , , m r ; D ) is an NEPS of the complete graphs K m 1 , , K m r . By Lemma 1, H ( m 1 , , m r ; D ) Cay ( Γ , S ) . Hence, both Cay ( Γ , S ) and NEPS ( K m 1 , , K m r ; B ) have vertex set Γ .
Let x and y be distinct elements of Γ . Then, x and y are adjacent in Cay ( Γ , S ) if and only if w ( x y ) D , which in turn is true if and only if β i = 1 when x i y i and β i = 0 when x i = y i . From this and the definition of B the result follows immediately. □

3. Squares of Generalized Hamming Graphs and NEPS of Complete Graphs

3.1. The Square of H ( m 1 , , m r ; D ) with Each m i 3

In this section, we determine the isomorphism between H ( m 1 , , m r ; D ) 2 with all m i 3 and a certain NEPS of K m 1 , , K m r .
Theorem 3.
Suppose that m 1 , , m r 3 . Let D = { d 1 , , d s } and 1 d i r for each i. Denote d = max 1 i s d i . Set:
B 1 = β Z 2 r \ { 0 } : 1 w ( β ) min { 2 d , r } .
Then:
H ( m 1 , , m r ; D ) 2 NEPS ( K m 1 , , K m r ; B 1 ) .
In particular, if d r / 2 , then H ( m 1 , , m r ; D ) 2 K m 1 m 2 m r .
Proof. 
Let Γ = Z m 1 Z m r and D = { d 1 , , d s } . Let S = { x Γ \ { 0 } : w ( x ) D } . By Lemma 2 and Theorem 1,
H ( m 1 , , m r ; D ) 2 Cay ( Γ ; S ) 2 Cay ( Γ ; S ( { 1 , 2 } ) ) ,
where S ( { 1 , 2 } ) = S ( 1 ) S ( 2 ) = S { 2 S \ { 0 } } (see (1) and (2)). Thus, by Theorem 2, it suffices to prove the following: for any x Γ \ { 0 } , x S ( { 1 , 2 } ) holds if and only if it satisfies:
1 w ( x ) min { 2 d , r } .
We achieve this in the next two claims.
Claim 1. Every x S ( { 1 , 2 } ) satisfies (3).
By the definition of S, this is obviously true when x S . Henceforth we assume that x 2 S \ { 0 } . Then, there exist y , z S such that x = y + z . Define:
l ( y , z ) = | { i : y i 0 , z i 0 , 1 i r } | .
Case 1.  w ( y ) = w ( z ) = d i , where i { 1 , 2 , , s } .
Assume that 2 d i r . Then, 2 d i r l ( y , z ) d i . If l ( y , z ) = d i , and then 1 w ( x ) d i . If 2 d i r l ( y , z ) < d i , then 2 ( d i l ( y , z ) ) w ( x ) 2 d i l ( y , z ) , which implies that 2 w ( x ) r .
Assume that 2 d i < r . Then, 0 l ( y , z ) d i . If l ( y , z ) = d i , and then 1 w ( x ) d i . If 0 l ( y , z ) < d i , then 2 ( d i l ( y , z ) ) w ( x ) 2 d i l ( y , z ) , which implies that 2 w ( x ) 2 d i .
In either case, we have 1 w ( x ) min { 2 d i , r } .
Case 2.  ( w ( y ) , w ( z ) ) = ( d i , d j ) or ( d j , d i ) , where i , j { 1 , 2 , , s } and i j .
Without loss of generality, we may assume that d i d j and ( w ( y ) , w ( z ) ) = ( d i , d j ) . Assume that d i + d j r . Then, d i + d j r l ( y , z ) d i . If l ( y , z ) = d i , then d j d i w ( x ) d j . If d i + d j r l ( y , z ) < d i , then d i + d j 2 l ( y , z ) w ( x ) d i + d j l ( y , z ) , which implies that d j d i + 2 w ( x ) r .
Assume that d i + d j r . Then, 0 l ( y , z ) d i . If l ( y , z ) = d i , then d j d i w ( x ) d j . If 0 l ( y , z ) < d i , then d i + d j 2 l ( y , z ) w ( x ) d i + d j l ( y , z ) , which implies that d j d i + 2 w ( x ) d i + d j .
In either case, we have 1 < d j d i + 2 w ( x ) min { d i + d j , r } .
It is readily seen that (3) holds in either of Cases 1 and 2 above. This proves Claim 1.
Claim 2. Every x Γ \ { 0 } that satisfies (3) is an element of S ( { 1 , 2 } ) .
Suppose that x Γ \ { 0 } satisfies (3).
Case 1.  2 d r .
Set w : = w ( x ) 2 d . Suppose that x i 1 , x i 2 , , x i w 0 with 1 i 1 < i 2 < < i w r .
Case 1.1.  1 w d .
Since Z m i is a cyclic group of order m i 3 for each i, there exist y i a , z i a Z m i \ { 0 } such that x i a = y i a + z i a for 1 a w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { 1 , 2 , , r } \ { i 1 , , i w } . Choose j 1 , , j d w { 1 , 2 , , r } \ { i 1 , , i w } with j 1 < j 2 < < j d w . Then, x j a = y j a + z j a = 0 for a { 1 , 2 , , d w } . Define y and z such that y t = y t and z t = z t if t { i 1 , , i w } { j 1 , , j d w } and y t = z t = 0 otherwise. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
Case 1.2.  d + 1 w 2 d .
In this case, there exist y i a , z i a Z m i \ { 0 } such that x i a = y i a + z i a for 1 a w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { 1 , 2 , , r } \ { i 1 , , i w } . Choose 2 d w terms from { i 1 , , i w } , say, i w d + 1 < < i d . Then, x i a = y i a + z i a for a { w d + 1 , w d + 2 , , d } . Define y such that y t = x t if t { i 1 , , i w d } , y t = y t if t { i w d + 1 , , i d } , and y t = 0 for all other t. Define z in such a way that z t = z t if t { i w d + 1 , , i d } , z t = x t if t { i d + 1 , , i w } , and z t = 0 for all other t. Then, w ( y ) = w ( z ) = d and x = y + z , and therefore x S ( { 1 , 2 } ) .
Case 2.  2 d > r .
Similar to Case 1, one can show x S ( { 1 , 2 } ) in this case.
So far we have proved Claims 1 and 2 and thus completed the proof. □

3.2. The Square of H ( 2 , , 2 ; D )

In this section, we determine the isomorphism between H ( 2 , , 2 ; D ) 2 and a certain NEPS of K 2 , , K 2 . Denote:
1 = ( 1 , , 1 ) , H ( r 2 ; D ) = H ( 2 , , 2 r ; D ) , NEPS ( r K 2 ; B ) = NEPS ( K 2 , , K 2 r ; B ) .
Theorem 4.
Let r 1 be an integer and D = { d 1 , , d s } with 1 d i r for each i. Let:
B 2 = { β Z 2 r \ { 0 } : w ( β ) D L S } ,
where:
L = d i + d j 2 h i j d i , d j D and d i + d j r , h i j { 0 , 1 , 2 , , min { d i , d j } } \ { 0 }
and:
S = d i + d j 2 h i j d i , d j D and d i + d j > r , h i j { d i + d j r , d i + d j r + 1 , , min { d i , d j } } \ { 0 } .
Then:
H ( r 2 ; D ) 2 NEPS ( r K 2 ; B 2 ) .
In particular,
(a)
If  2 d i r for 1 i r , then:
H ( r 2 ; D ) 2 NEPS ( r K 2 ; B 3 ) ,
where B 3 = { β Z 2 r \ { 0 } : w ( β ) D L } ;
(b)
If  2 d i > r for 1 i r , then:
H ( r 2 ; D ) 2 NEPS ( r K 2 ; B 4 ) ,
where B 4 = { β Z 2 r \ { 0 } : w ( β ) D S } .
Proof. 
Denote S = { x Z 2 r \ { 0 } : w ( x ) D } . By Lemma 2 and Theorem 1, we have:
H ( r 2 ; D ) 2 Cay ( Z 2 r ; S ) 2 Cay ( Z 2 r ; S ( { 1 , 2 } ) ) ,
where S ( { 1 , 2 } ) = S { 2 S \ { 0 } } by (1) and (2). By Theorem 2, it suffices to prove:
S ( { 1 , 2 } ) = x Z 2 r \ { 0 } : w ( x ) D L S .
The proof of this consists of the following two claims.
Claim 1.  S ( { 1 , 2 } ) x Z 2 r \ { 0 } : w ( x ) D L S .
Let x S ( { 1 , 2 } ) . If x S , then Claim 1 is true, as w ( x ) = d . Assume that x 2 S \ { 0 } in the sequel. Then, there exist y , z S such that x = y + z . Define:
l ( y , z ) = | { i : y i 0 , z i 0 , 1 i r } | .
Case 1.  d i + d j r .
When d i d j , we have 0 l ( y , z ) min { d i , d j } and w ( x ) = w ( y ) + w ( z ) 2 l ( y , z ) = d i + d j 2 l ( y , z ) .
When d i = d j , we have 0 l ( y , z ) d i . If l ( y , z ) = d i , then w ( x ) = 0 and so x = 0 , which is a contradiction. If 0 l ( y , z ) < d i , we have w ( x ) = w ( y ) + w ( z ) 2 l ( y , z ) = 2 d i 2 l ( y , z ) .
In either case, we have w ( x ) L .
Case 2.  d i + d j > r .
When d i d j , we have d i + d j r l ( y , z ) min { d i , d j } and w ( x ) = w ( y ) + w ( z ) 2 l ( y , z ) = d i + d j 2 l ( y , z ) .
When d i = d j , we have 2 d i r l ( y , z ) d i . If l ( y , z ) = d i , then w ( x ) = 0 and so x = 0 , which is a contradiction. If 2 d i r < l ( y , z ) < d i , then w ( x ) = w ( y ) + w ( z ) 2 l ( y , z ) = 2 d i 2 l ( y , z ) .
In either case, we have w ( x ) S .
In summary, we have w ( x ) D L S and Claim 1 is proven.
Claim 2.  { x Z 2 r \ { 0 } : w ( x ) D L S } S ( { 1 , 2 } ) .
Let x Z 2 r \ { 0 } be such that w ( x ) D L S . Set w : = w ( x ) . Suppose that x i 1 , x i 2 , , x i w 0 , where 1 i 1 < i 2 < < i w r . If w D , then x S S ( { 1 , 2 } ) . It remains to consider the case where x L S .
Case 1.  w L , that is, w = d i + d j 2 h i j with 0 h i j min { d i , d j } for some pair i , j .
In this case, we have x a = 0 for every a { 1 , , r } \ { i 1 , i 2 , , i d i + d j 2 h i j } . Since 0 h i j min { d i , d j } , we can choose j 1 , , j h i j { 1 , , r } \ { i 1 , i 2 , , i d i + d j 2 h i j } with j 1 < < j h i j . Define y in such a way that y t = 1 if t { i 1 , , i d i h i j } { j 1 , , j h i j } and y t = 0 otherwise. Define z such that z t = 1 if t { i d i h i j + 1 , , i d i + d j 2 h i j } { j 1 , , j h i j } and z t = 0 otherwise. Then, w ( y ) = d i , w ( z ) = d j and x = y + z . Hence, x S ( { 1 , 2 } ) .
Case 2.  w S , that is, w = d i + d j 2 h i j with d i + d j r h i j min { d i , d j } for some pair i , j .
Similar to Case 1, in this case one can verify that x S ( { 1 , 2 } ) . □
In the special case, where D = { d } , Theorem 4 yields the following result.
Corollary 1.
Let d and r be positive integers with 1 d r .
(a)
If 1 d r 2 , then:
H ( r 2 ; { d } ) 2 NEPS ( r K 2 ; B 5 ) ,
where B 5 = { β Z 2 r \ { 0 } : w ( β ) = d or 2 h for 1 h d } .
(b)
If r 2 < d r , then:
H ( r 2 ; { d } ) 2 NEPS ( r K 2 ; B 6 ) ,
where B 6 = { β Z 2 r \ { 0 } : w ( β ) = d or 2 h for 1 h r d } .
In particular, if d = r , then:
H ( r 2 ; { d } ) 2 NEPS ( r K 2 ; { 1 } ) .
Example 1.
We have H ( 4 2 ; { 1 } ) 2 NEPS ( 4 K 2 ; B ) with B = { β Z 2 r \ { 0 } : w ( β ) = 1 , 2 } and H ( 4 2 ; { 3 } ) 2 NEPS ( 4 K 2 ; B ) with B = { β Z 2 r \ { 0 } : w ( β ) = 2 , 3 } . These two graphs are shown in Figure 1 and Figure 2, respectively.

3.3. The Square of H ( 2 , , 2 , m 1 , , m v ; D ) with Each m i 3

In this section, we determine the isomorphism between H ( 2 , , 2 , m 1 , , m v ; D ) 2 and a certain NEPS of complete graphs K 2 , , K 2 , K m 1 , , K m v with each m i 3 . Denote:
H ( r 2 , m 1 , , m v ; D ) = H ( 2 , , 2 r , m 1 , , m v ; D )
and:
NEPS ( r K 2 , K m 1 , , K m v ; B ) = NEPS ( K 2 , , K 2 r , K m 1 , , K m v ; B ) .
Theorem 5.
Let m 1 , , m v 3 and r 1 be integers. Let D = { d 1 , , d s } such that: 1 d i r + v for each i. Denote d = max 1 i s d i . Set:
D 1 = { d i d i D , d i r } ,
L = d i + d j 2 h i j d i , d j D and d i + d j r + v , h i j { 0 , 1 , 2 , , min { d i , d j } } \ { 0 } ,
and:
T = d i + d j 2 h i j d i , d j D and d i + d j > r + v , h i j { d i + d j r v , d i + d j r v + 1 , , min { d i , d j } } \ { 0 } .
(a)
Suppose that 2 d r + v and { 1 , , 2 d } { 1 , , r } L D 1 . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 7 ) ,
where B 7 = { β Z 2 r \ { 0 } : 1 w ( β ) 2 d } .
(b)
Suppose that 2 d > r + v , { 1 , , r } L T D 1 , and there exist a and b with 1 a , b s (possibly with a = b ) such that r + v d a + d b r + 2 v . Then:
H ( r 2 , m 1 , , m v ; D ) 2 K 2 r m 1 m v .
Proof. 
Denote Γ = Z 2 Z 2 r Z m 1 Z m v and S = { x Γ \ { 0 } : w ( x ) D } . By Lemma 2 and Theorem 1,
H ( r 2 , m 1 , , m v ; D ) 2 Cay ( Γ ; S ) 2 Cay ( Γ ; S ( { 1 , 2 } ) ) ,
where S ( { 1 , 2 } ) = S { 2 S \ { 0 } } by (1) and (2).
(a) Suppose that 2 d r + v and { 1 , , 2 d } { 1 , , r } L D 1 . By Theorem 2, it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) 2 d .
We achieve this by proving the following two claims.
Claim 1.  S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) 2 d .
Let x S ( { 1 , 2 } ) . If x S , then Calim 1 is true, as w ( x ) D . Henceforth we assume that x 2 S \ { 0 } . Then, there exist y , z S such that x = y + z and ( w ( y ) , w ( z ) ) = ( d i , d j ) . Set y ( 1 ) = ( y 1 , , y r ) , z ( 1 ) = ( z 1 , , z r ) , y ( 2 ) = ( y r + 1 , , y r + v ) and z ( 2 ) = ( z r + 1 , , z r + v ) . Denote:
q 1 : = { i : y i 0 , z i 0 , i { 1 , 2 , , r } } ,
q 2 = { i : y i 0 , z i 0 , i { r + 1 , r + 2 , , r + v } } .
Case 1.  d i d j .
Without loss of generality, we may assume d i < d j and ( w ( y ) , w ( z ) ) = ( d i , d j ) . Then, 0 q 1 + q 2 d i . If q 1 + q 2 = d i , then d j d i w ( x ) d i + d j 2 q 1 q 2 = d j q 1 d j ( d i min { v , d i } ) = d j d i + min { v , d i } . If 0 q 1 + q 2 < d i , then d i + d j 2 q 1 2 q 2 w ( x ) d i + d j 2 q 1 q 2 , which implies that d j d i + 2 w ( x ) d i + d j .
Case 2.  d i = d j .
In this case, 0 q 1 + q 2 d i . If q 1 + q 2 = d i , then 0 w ( x ) 2 d i 2 q 1 q 2 = d i q 1 d i ( d i min { v , d i } ) = min { v , d i } . Then, 1 w ( x ) min { v , d i } as x 0 . If 0 q 1 + q 2 < d i , then 2 d i 2 q 1 2 q 2 w ( x ) 2 d i 2 q 1 q 2 , which implies that 2 w ( x ) 2 d i .
Since { 1 , , 2 d } { 1 , , r } L D 1 , we obtain 1 w ( x ) 2 d in each case above. This proves Claim 1.
Claim 2.  x Γ \ { 0 } : 1 w ( x ) 2 d S ( { 1 , 2 } ) .
Let x Γ \ { 0 } such that 1 w ( x ) 2 d . Set w : = w ( x ) and assume that x i 1 , , x i w 0 for 1 i 1 < i 2 < < i w r + v .
Case 1.  i w r .
When w D 1 , x S S ( { 1 , 2 } ) .
When w D 1 , x L , that is, there exist d i , d j D such that w = d i + d j 2 h i j and 0 h i j min { d i , d j } . Note that x α = 0 for each α { 1 , , r } \ { i 1 , i 2 , , i w } . Since Z m i is a cyclic group of order m i for each i, there exist y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for 1 t v . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i w } a n d y i = z i = 1 } . Since 0 h i j min { d i , d j } , we can choose h i j = ( d i + d j w ) / 2 terms from { 1 , , r + v } \ { i 1 , i 2 , , i w } in such a way that q 1 terms, say j 1 < < j q 1 , are chosen from { 1 , , r } \ { i 1 , i 2 , , i w } , and the remaining terms, say j q 1 + 1 < < j h i j , are chosen from { r + 1 , , r + v } (note that q 1 r w ). Then, 0 = x α = y α + z α for α { j q 1 + 1 , , j h i j } . Define y such that y u = 1 for u { i 1 , , i d i d j + w 2 } { j 1 , , j q 1 } , y u = y u for u { j q 1 + 1 , , j h i j } , and y u = 0 for all other u. Define z in such a way that z u = 1 for u { i d i d j + w 2 + 1 , , i w } { j 1 , , j q 1 } , z u = z u for u { j q 1 + 1 , , j h i j } and z u = 0 for all other u. Then, w ( y ) = d i , w ( z ) = d j and x = y + z . Hence, x S ( { 1 , 2 } ) .
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for each α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i for each i, there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 d r + v , we have 0 q 1 + q 2 + q 3 min { r + v c , d } . Thus, we may choose q 1 r c terms from { 1 , 2 , , r } \ { i 1 , , i c } , say j 1 < j 2 < < j q 1 , q 2 w c terms from { i c + 1 , , i w } , say i w q 2 + 1 < < i w and choose q 3 v ( w c ) terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say j q 1 + 1 < < j q 1 + q 3 . Define y such that y u = 1 for u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u for u { j c + 1 , , j c + d q 1 q 2 q 3 l } , y u = y u for u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z such that z u = 1 for u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u for u { j c + d q 1 q 2 q 3 l + 1 , , j 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u for u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
(b) Suppose that 2 d > r + v , { 1 , , r } L T D 1 , and that there exist 1 a , b s (possibly with a = b ) such that r + v d a + d b r + 2 v . By Lemma 2 and Theorems 1 and 2, it suffices to prove S ( { 1 , 2 } ) = Γ \ { 0 } , or equivalently, Γ \ { 0 } S ( { 1 , 2 } ) .
Let x Γ \ { 0 } , and set w = w ( x ) . Then, 1 w ( x ) r + v . We may assume that x i 1 , x i 2 , , x i w 0 for 1 i 1 < i 2 < < i w r + v . When i w r , similar to the proof of (a), we can show that x S ( { 1 , 2 } ) . In the following, we consider the following two cases.
Case 1.  i w > r and 1 < w d .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then x α = 0 for each α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i for each i, there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since i w > r and 1 < w d , then c m i n { r , d 2 } , which means that d a + d b r v r + v c ; also note that there exist a and b with 1 a , b s (possibly with a = b ) such that r + v d a + d b r + 2 v , and then d a + d b r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we may choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say j 1 < j 2 < < j q 1 , q 2 terms from { i c + 1 , , i w } , say i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say j q 1 + 1 < < j q 1 + q 3 . Define y such that y u = 1 for u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u for u { j c + 1 , , j c + d a q 1 q 2 q 3 l } , y u = y u for u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z such that z u = 1 for u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u for u { j c + d a q 1 q 2 q 3 l + 1 , , j d a + d b 2 q 1 2 q 2 2 q 3 } , z u = y u for u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = d a , w ( z ) = d b and x = y + z . Therefore, x S ( { 1 , 2 } ) .
Case 2.  i w > r and d < w r + v .
Denote c = | { i 1 , , i w } { 1 , , r } | . Since Z m i is a cyclic group of order m i 3 for each i, there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for α { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 2 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since there exist a and b with 1 a , b s (possibly with a = b ) such that r + v d a + d b r + 2 v , we may choose q 1 terms from { i c + 1 , , i w } , say i w q 1 + 1 < < i w , and choose q 2 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say j 1 < < j q 2 . Define y such that y u = 1 for u { i 1 , , i l } , y u = x u for u { i c + 1 , , i c + d a q 1 q 2 l } , y u = y u for u { i w q 1 + 1 , , i w } { j 1 , , j q 2 } , and y u = 0 for all other u. Define z such that z u = 1 for u { i l + 1 , , i c } , z u = x u for u { j c + d a l q 1 q 2 + 1 , , j d a + d b 2 q 1 2 q 2 } , z u = z u for u { i w q 1 + 1 , , i w } { j 1 , , j q 2 } , and z u = 0 for all other u. Then, w ( y ) = d a , w ( z ) = d b and x = y + z . Hence, x S ( { 1 , 2 } ) . □
We next determine H ( r 2 , m 1 , , m v ; D ) 2 with d a + d b > r + 2 v for any d a , d b D , that is, 2 min { d i d i D } > r + 2 v .
Theorem 6.
Let m 1 , , m v 3 and let r 1 be an odd (even) number. Let D = { d 1 , , d s } be such that: 1 d i r + v for each i. Set d = min 1 i s d i and 2 d > r + 2 v . Let:
B 8 = { β β Z 2 r + v \ { 0 } , 1 w ( β ) d + 1 } ,
and:
B 9 = { β β Z 2 r + v \ { 0 } , 1 w ( β ) 2 r + 3 v 2 d } .
(a)
If  2 r = 3 d 3 v + 1 and v = 1 , 2 , let D = { d , d + 1 } . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 8 ) .
(b)
If  2 r = 3 d 3 v and v = 1 , let D = { d , d + 1 } . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 8 ) .
(c)
If 2 r = 3 d 2 v + 1 and v 1 , let D = { d , d + 1 , 2 r + 2 v 2 d + 1 , , 2 r + 3 v 2 d } . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 9 ) .
(d)
If 2 r = 3 d 2 v and v 2 , let D = { d , d + 1 , 2 r + 2 v 2 d + 2 , , 2 r + 3 v 2 d } . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 9 ) .
(e)
If 2 r = 3 d 2 v 1 and v 3 , let D = { d , d + 1 , 2 r + 2 v 2 d + 3 , , 2 r + 3 v 2 d } . Then:
H ( r 2 , m 1 , , m v ; D ) 2 NEPS ( r K 2 , K m 1 , , K m v ; B 9 ) .
Proof. 
(a) Let Γ = Z 2 Z 2 r Z m 1 Z m v . Let S = { x Γ \ 0 : w ( x ) D } . By Lemma 2 and Theorem 1,
H ( r 2 , m 1 , , m t ; D ) 2 Cay ( Γ ; S ) 2 Cay ( Γ ; S ( { 1 , 2 } ) ) .
where S ( { 1 , 2 } ) = S ( 1 ) S ( 2 ) = S { 2 S \ { 0 } } (see (1) and (2)). By Theorem 2, it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) d + 1 .
The proof of this consists of the following two claims.
Claim 1.  S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) d + 1 .
Let x S ( { 1 , 2 } ) . If x S , then Claim 1 is true, as w ( x ) = d D . Assume that x 2 S \ { 0 } in the sequel. Then, there exist at least two elements y , z S \ { 0 } such that x = y + z and ( w ( y ) , w ( z ) ) = ( d i , d j ) . Define y ( 1 ) : = ( y 1 , , y r ) , z ( 1 ) : = ( z 1 , , z r ) , y ( 2 ) : = ( y r + 1 , , y r + v ) and z ( 2 ) : = ( z r + 1 , , z r + v ) . Define:
l ( y ( 1 ) , z ( 1 ) ) = { i : y i 0 , z i 0 , i { 1 , 2 , , r } } = q 1 ,
l ( y ( 2 ) , z ( 2 ) ) = { i : y i 0 , z i 0 , i { r + 1 , r + 2 , , r + v } } = q 2 .
Case 1.  x i 0 for some i { r + 1 , , r + v } .
Case 1.1.  d i = d j = d .
In this case, 2 d r v q 1 + q 2 d . If q 1 + q 2 = d , then 1 w ( x ) 2 d 2 ( d v ) v = v . If 2 d r v < q 1 + q 2 < d , then: 2 = 2 d 2 ( d 1 ) w ( x ) 2 d 2 ( 2 d r 2 v + 1 ) v = 2 r + 3 v 2 d 2 . If q 1 + q 2 = 2 d r v , then 2 r 2 d + 2 v = 2 d 2 ( 2 d r v ) w ( x ) 2 d 2 ( 2 d r 2 v ) v = 2 r + 3 v 2 d . Since 2 r + 3 v 2 d 2 = 2 r 2 d + 2 v 1 , 2 r 2 d + 2 v with regard to v = 1 , 2 , respectively, it follows that 1 w ( x ) 2 r + 3 v 2 d .
Case 1.2.  d i = d j = d + 1 .
Similar to Case 1.1, one can verify that 1 w ( x ) 2 r + 3 v 2 d 2 .
Case 1.3.  d i = d , d j = d + 1 .
Similar to Case 1.1, we obtain that 1 w ( x ) 2 r + 3 v 2 d 1 .
In either case, we have 1 w ( x ) 2 r + 3 v 2 d .
Case 2.  x i = 0 for any i { r + 1 , , r + v } .
Case 2.1.  d i = d j = d .
In this case, 2 d r v q 1 + q 2 d . If q 1 + q 2 = d , then w ( x ) = 0 and so x = 0 , which is a contradiction. If 2 d r v q 1 + q 2 < d , then: w ( x ) = 2 d 2 ( q 1 + q 2 ) . Hence, w ( x ) = 2 d 2 ( q 1 + q 2 ) for q 1 + q 2 = 2 d r v , , d 1 .
Case 2.2.  d i = d j = d + 1 .
Similar to Case 2.1, one can easily verify that w ( x ) = 2 d + 2 2 ( q 1 + q 2 ) for q 1 + q 2 = 2 d r v + 2 , , d .
Case 2.3.  d i = d , d j = d + 1 .
Similar to Case 2.1, one can easily verify that w ( x ) = 2 d + 1 2 ( q 1 + q 2 ) for q 1 + q 2 = 2 d r v + 1 , , d .
In either case, we have 1 w ( x ) 2 r + 2 v 2 d .
In the following, we compare 2 r + 3 v 2 d , 2 r + 2 v 2 d , d and d + 1 . Note that 2 r = 3 d 3 v + 1 , and we have d < 2 r + 3 v 2 d = d + 1 . If v = 1 , then 2 r + 2 v 2 d = d < 2 r + 2 v 2 d + 1 = d + 1 . If v = 2 , then 2 r + 2 v 2 d = d 1 < d < 2 r + 2 v 2 d + 2 = d + 1 . Thus, we obtain that 1 w ( x ) d + 1 f o r v = 1 , 2 .
Claim 2.  x Γ \ { 0 } : 1 w ( x ) d + 1 S ( { 1 , 2 } ) } .
Let x Γ \ { 0 } be such that 1 w ( x ) d . Set w = w ( x ) . Suppose that x i 1 , , x i w 0 with 1 i 1 < i 2 < < i w r + v . If x D , then x S S ( { 1 , 2 } ) . It remains to consider 1 w ( x ) d 1 . Since 2 r = 3 d 3 v + 1 , we have 1 w ( x ) 2 r + 2 v 2 d 1 or 1 w ( x ) 2 r + 2 v 2 d with regard to v = 1 or v = 2 , respectively.
Case 1.  i w r .
In this case, x α = 0 for any α { 1 , , r } \ { i 1 , i 2 , , i w } . Since Z m i is a cyclic group of order m i 3 for each i, there exist y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { 1 , 2 , , v } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i w } a n d y i = z i = 1 } , q 2 = { i i { r + 1 , , r + v } a n d y i + z i = 0 } .
Subcase 1.1. w is odd.
Since w ( x ) 2 r + 2 v 2 d 1 or 2 r + 2 v 2 d , we have w = 2 d + 1 2 ( q 1 + q 2 ) with 2 d r v + 1 q 1 + q 2 d . Then, we can choose q 1 terms from { 1 , , r } \ { i 1 , i 2 , , i w } , say j 1 < < j q 1 , and choose q 2 terms from { r + 1 , , r + v } , say j q 1 + 1 < < j q 1 + q 2 . Define y in such a way that y u = 1 if u { i 1 , , i d ( q 1 + q 2 ) } { j 1 , , j q 1 } , y u = y u if u { j q 1 + 1 , , j q 1 + q 2 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i d ( q 1 + q 2 ) + 1 , , i w } { j 1 , , j q 1 } , z u = z u if u { j q 1 + 1 , , j q 1 + q 2 } , and z u = 0 for all other u. Then, w ( y ) = d , w ( z ) = d + 1 and x = y + z . Therefore, x S ( { 1 , 2 } ) .
Subcase 1.2. w is even.
Similar to Subcase 1.1, one can verify x S ( { 1 , 2 } ) .
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i and m i 3 for each i, then there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 r = 3 d 3 v + 1 , c w 1 d 2 and v = 1 , 2 , we have 2 d r v r + v c ; also note that 2 d > r + v , and then 2 d r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we can choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say, j 1 < j 2 < < j q 1 , choose q 2 terms from { i c + 1 , , i w } , say, i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say, j q 1 + 1 < < j q 1 + q 3 . Define y in such a way that y u = 1 if u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u if u { i c + 1 , , i c + d q 1 q 2 q 3 l } , y u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u if u { i c + d q 1 q 2 q 3 l + 1 , , i 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
(b)–(e) Similar to the proof of (a). Please see the Appendix A for the detailed modification.
Example 2.
(1)
Consider the square of the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 ; { 6 , 7 } ) . Obviously, r = 8 , v = 1 , d = 6 , and by Theorem 6 (a), we have:
H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 ; { 6 , 7 } ) 2 NEPS ( 8 K 2 , K 3 ; B ) ,
where B = { x x Z 2 r \ { 0 } , 1 w ( x ) 7 } .
(2)
Consider the square of the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 , 2 , 3 ; { 5 , 6 } ) . Obviously, r = 6 , v = 1 , d = 5 , and by Theorem 6 (b), we have:
H ( 2 , 2 , 2 , 2 , 2 , 2 , 3 ; { 5 , 6 } ) 2 NEPS ( 6 K 2 , K 3 ; B ) ,
where B = { x x Z 2 r \ { 0 } , 1 w ( x ) 6 } .
(3)
Consider the square of the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 ; { 7 , 8 , 9 , 10 } ) . Obviously, r = 9 , v = 2 , d = 7 , and by Theorem 6 (c), we have:
H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 ; { 7 , 8 , 9 , 10 } ) 2 NEPS ( 9 K 2 , K 3 , K 3 ; B ) ,
where B = { x x Z 2 r \ { 0 } , 1 w ( x ) 10 } .
(4)
Consider the square of the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 ; { 8 , 9 , 10 , 11 } ) . Obviously, r = 9 , v = 3 , d = 8 , and by Theorem 6 (d), we have:
H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 ; { 8 , 9 , 10 , 11 } ) 2 NEPS ( 6 K 2 , K 3 , K 3 , K 3 ; B ) ,
where B = { x x Z 2 r \ { 0 } , 1 w ( x ) 11 } .
(5)
Consider the square of the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 ; { 9 , 10 , 11 } ) . Obviously, r = 10 , v = 3 , d = 9 , and by Theorem 6 (e), we have:
H ( 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 ; { 9 , 10 , 11 } ) 2 NEPS ( 7 K 2 , K 3 , K 3 , K 3 ; B ) ,
where B = { x x Z 2 r \ { 0 } , 1 w ( x ) 11 } .

4. Eigenvalues of the Square of Generalized Hamming Graphs

In this section, we investigate eigenvalues of the square of generalized Hamming graphs. Before proceeding, we give one result from [12].
Lemma 3
([12] [Theorem 2.23]). Let G i be a graph with m i vertices. Suppose that λ i , 1 , , λ i , m i are the eigenvalues of G i ( i = 1 , , n ) . Then, the spectrum of G = NEPS ( G 1 , , G n ; B ) with respect to basis B consists of all possible values:
Λ j 1 , , j n = β B λ 1 , j 1 β 1 λ n , j n β n , j i = 1 , , m i ; i = 1 , , n .
Recall that H ( m 1 , , m r ; D ) is an NEPS of complete graphs K m 1 , , K m r (see Lemma 1 and Theorem 2). Note that the spectrum of K m i consists of m i 1 with multiplicity 1, and 1 with multiplicity m i 1 . Then, by Lemma 3, we obtain the following result.
Theorem 7.
Let m 1 , , m r be positive integers, and D = { d 1 , , d s } with 1 d i r for each i. Let B = { β Z 2 r \ { 0 } : w ( β ) D } . Then, the spectrum of H ( m 1 , , m r ; D ) consists of all possible values:
Λ j 1 , , j r = β B λ 1 , j 1 β 1 λ r , j r β r , j i = 1 , , m i ; i = 1 , , r ,
where λ i , 1 = m i 1 , and λ i , j = 1 for 2 j m i .
Suppose m 1 , , m r 3 and D = { d 1 , , d s } , where 1 d i r for each i. Set d = max 1 i s d i . By Theorems 2 and 3, Lemma 1, we see that:
H ( m 1 , , m r ; D ) 2 H ( m 1 , , m r ; D ) ,
where D = 1 , , 2 d if 2 d < r , and D = 1 , , r if 2 d r . Note that isomorphic graphs have the same spectrum. Then, by Theorem 7, we have the following result.
Theorem 8.
Let m 1 , , m r , D and D be as above. Let B = { β Z 2 r \ { 0 } : w ( β ) D } .
(a)
For 2 d r , H ( m 1 , , m r ; D ) 2 is a complete graph.
(b)
For 2 d < r , let L = { i | λ i , j k = 1 , i = 1 , , r } and l : = | L | . Assume the elements in L are a 1 < a 2 < < a l .
(b.1)
If l < 2 d < r , then the eigenvalues of H ( m 1 , , m r ; D ) 2 are:
Λ l = s = 1 l j = 0 s l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) + s = l + 1 2 d j = 0 l l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) .
(b.2)
If 2 d l , then the eigenvalues of H ( m 1 , , m r ; D ) 2 are:
Λ l = s = 1 2 d j = 0 s l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) ,
where φ ( b ) = 1 if b S and φ ( b ) = 0 if b S .
Proof. 
(a) If 2 d r , then D = { 1 , , r } . Thus, it is a complete graph.
(b) For any s D , define B s = { β Z 2 r \ { 0 } : w ( β ) = s } .
If s l , we choose j ( 0 j s ) terms of { a 1 , a 2 , , a l } and j terms of { 1 , , r } \ { a 1 , a 2 , , a l } , and assume that the s j terms are b 1 , , b s j . Then, by Theorem 7,
Λ { s } = j = 0 s l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) .
If s > l , we choose j ( 0 j l ) terms of { a 1 , a 2 , , a l } and j terms of { 1 , , r } \ { a 1 , a 2 , , a l } , and assume that the s j terms are b 1 , , b s j . Then, by Theorem 7,
Λ { s } = j = 0 l l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) .
If l 2 d < r , then:
Λ l = s = 1 2 d Λ { s } = s = 1 l Λ { s } + s = l + 1 2 d Λ { s } = s = 1 l j = 0 s l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) + s = l + 1 2 d j = 0 l l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) ,
yielding (b.1).
If 2 d < l , then:
Λ l = s = 1 2 d Λ { s } = s = 1 2 d j = 0 s l j ( 1 ) j S = { b 1 , , b s j } { 1 , , r } \ { a 1 , , a l } b { 1 , , r } ( m b 1 ) φ ( b ) ,
yielding (b.2).
This completes the proof. □
Let m 1 = = m r = 2 , D = { 1 , , d } with 1 d r . By Theorems 2 and 4, we see that:
H ( r 2 ; D ) 2 = H ( r 2 ; D ) ,
where D = 1 , , 2 d if 2 d < r and D = 1 , , r if 2 d r . Then, by Theorem 7, we have the following result.
Theorem 9.
Let r be a positive integer, and D and D be as above. Let B = { β Z 2 r \ { 0 } : w ( β ) D } .
(a)
If  2 d r , then H ( r 2 ; D ) 2 is a complete graph.
(b)
If  2 d < r , let L = { i | λ i , j k = 1 , i = 1 , , r } and l : = | L | . Assume the elements in L are a 1 < a 2 < < a l .
(b.1)
If l 2 d < r , then the eigenvalues of H ( r 2 ; D ) 2 consist of all possible values:
Λ l = s = 1 l j = 0 s l j r l s j ( 1 ) j 1 s j + s = l + 1 2 d j = 0 l l j r l s j ( 1 ) j 1 s j .
(b.2)
If 2 d < l , then the eigenvalues of H ( r 2 ; D ) 2 consist of all possible values:
Λ l = s = 1 2 d j = 0 s l j r l s j ( 1 ) j 1 s j .
Proof. 
(a) If 2 d r , then D = { 1 , , r } . Thus, it is a complete graph.
(b) For any s D , define B s = { β Z 2 r \ { 0 } : w ( β ) = s } .
If s l , there are j = 0 s l j r l s j ways to choose j ( 0 j s ) terms of { a 1 , a 2 , , a l } and s j terms of { 1 , , r } \ { a 1 , a 2 , , a l } . Then, by Theorem 7,
Λ { s } = j = 0 s l j r l s j ( 1 ) j 1 s j .
If s > l , there are j = 0 l l j r l s j ways to choose j ( 0 j l ) terms of { a 1 , a 2 , , a l } and s j terms of { 1 , , r } \ { a 1 , a 2 , , a l } . Then, by Theorem 10,
Λ { s } = j = 0 l l j r l s j ( 1 ) j 1 s j .
If l 2 d < r , then:
Λ l = s = 1 2 d Λ { s } = s = 1 l Λ { s } + s = l + 1 2 d Λ { s } = s = 1 l j = 0 s l j r l s j ( 1 ) j 1 s j + s = l + 1 2 d j = 0 l l j r l s j ( 1 ) j 1 s j ,
yielding (b.1).
If 2 d < l , then:
Λ l = s = 0 2 d Λ { s } = s = 1 2 d j = 0 s l j r l s j ( 1 ) j 1 s j ,
yielding (b.2).
This completes the proof. □
Let m 1 , , m t be positive integers with m i 3 for each i, and D a set of integers with 1 d i r + v . By Theorems 2, 5 and 6, we have:
H ( r 2 , m 1 , , m t ; D ) { 1 , 2 } H ( r 2 , m 1 , , m v ; D ) ,
where D = 1 , , d if d < r + v , and D = 1 , , r + v if d r + v , and in here d = max { w ( x ) | x B i } for i = 7 , 8 , 9 having different values with respect to Theorems 5 and 6.
Theorem 10.
Let m 1 , , m v , D, and D be as above. Let B = { β Z 2 r + v \ { 0 } : w ( β ) D } .
(a)
If d r + v , then H ( r 2 , m 1 , , m v ; D ) 2 is a complete graph.
(b)
If d < r + v , let L = { i | λ i , j k = 1 , i = 1 , , r + v } and l + l : = | L | . Assume that the elements in L are a 1 < < a l < a l + 1 < < a l + l . Then, the eigenvalues of H ( r 2 , m 1 , , m v ; D ) 2 are:
Λ l = s = 1 d j = 0 s j = 0 j l j r l j j ( 1 ) j · j = 0 s j l j ( 1 ) j S = { b 1 , , b s j j } { r + 1 , , r + v } \ { a l + 1 , , i l + l } b { r + 1 , , r + v } ( m ( b r ) 1 ) φ ( b ) ,
where φ ( b ) = 1 if b S and φ ( b ) = 0 if b S .
Proof. 
(a) If 2 d r , then D = { 1 , , r } . Thus, it is a complete graph.
(b) For any s D , define B s = { β Z 2 r \ { 0 } : w ( β ) = s } . We choose j ( 0 j l ) terms of { a 1 , a 2 , , a l } , j j terms of { 1 , , r } \ { a 1 , a 2 , , a l } , j terms of { a l + 1 , a l + 2 , , a l + l } , and s j j terms of { r + 1 , , r + v } \ { a l + 1 , , a l + l } , and assume that the s j j terms are b 1 , , b s j j . Then, by Theorem 7,
Λ l = j = 0 s j = 0 j l j r l j j ( 1 ) j · j = 0 s j l j ( 1 ) j S = { b 1 , , b s j j } { r + 1 , , r + v } \ { a l + 1 , , i l + l } b { r + 1 , , r + v } ( m ( b r ) 1 ) φ ( b ) .
Then:
Λ l = s = 1 d j = 0 s j = 0 j l j r l j j ( 1 ) j · j = 0 s j l j ( 1 ) j S = { b 1 , , b s j j } { r + 1 , , r + v } \ { a l + 1 , , i l + l } b { r + 1 , , r + v } ( m ( b r ) 1 ) φ ( b ) .
This completes the proof. □
Example 3.
(1)
Consider the generalized Hamming graph H ( 3 , 3 , 4 ; { 1 } ) { 1 , 2 } . Obviously, Theorem 3 implies that:
H ( 3 , 3 , 4 ; { 1 } ) 2 H ( 3 , 3 , 4 ; { 1 , 2 } ) .
By Theorem 8, its eigenvalues are 23 , 5 , 3 , 0 , 3 , and 4 with respective multiplicities 1 , 4 , 3 , 12 , 12 and 4.
(2)
Consider the generalized Hamming graph H ( 2 , 2 , 2 , 2 , 2 ; { 1 } ) { 1 , 2 } . Obviously, Theorem 4 implies that:
H ( 2 , 2 , 2 , 2 , 2 ; { 1 } ) 2 H ( 2 , 2 , 2 , 2 , 2 ; { 1 , 2 } ) .
By Theorem 9, its eigenvalues are 15 , 5 , 1 , 3 with respective multiplicities 1 , 6 , 15 , 10 .
(3)
Consider the generalized Hamming graph H ( 2 , 3 , 3 ; { 1 } ) { 1 , 2 } . Obviously, Theorem 6 implies that:
H ( 2 , 3 , 3 ; { 1 } ) 2 H ( 2 , 3 , 3 ; { 1 , 2 } ) .
By Theorem 10, its eigenvalues are 13 , 3 , 1 , 0 , 2 , and 3 with respective multiplicities 1 , 1 , 4 , 4 , 4 and 4.

5. Conclusions

Characterizing the square of some generalized Hamming graphs is useful for studying the k t h power of the graph. This article provides some characterizations of H ( m 1 , , m r ; D ) 2 with NEPS of complete graphs through group calculations. In addition, we can directly obtain the eigenvalues of H ( m 1 , , m r ; D ) 2 by NEPS. We are sure that the method used in this article can also be applied to the study of other Caley graphs, and any attempts on other graphs would be welcome; maybe the diameter of H ( m 1 , , m r ; D ) 2 can be studied too.

Author Contributions

Conceptualization, Y.L.; Methodology, J.Z.; Writing—original draft, M.W. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the research NSFC of Grant No. 12001420, DEGD of Grant No. 2022KTSCX328, DGSTB of Grant No. DGSTB and DSCP of Grant No. 20231800500342.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The proof of Theorem 6(b)–(e).
Proof. 
(b) Similar to the proof of (a), it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) d + 1 .
Claim 1. S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) d + 1 .
Similar to the proof of Claim 1 of (a), we have two cases:
Case 1.  x i 0 for some i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 3 v 2 d .
Case 2.  x i = 0 for any i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 2 v 2 d .
Thus, we compare 2 r + 3 v 2 d , 2 r + 2 v 2 d , d and d + 1 . Note that 2 r = 3 d 3 v and v = 1 , 2 r + 2 v 2 d = ( 3 d 3 v ) + 2 v 2 d = d v = d 1 < d = 2 r + 3 v 2 d < d + 1 . This implies that 2 r + 2 v 2 d < d = 2 r + 3 v 2 d < d + 1 . Thus, we obtain that 1 w ( x ) d + 1 .
Claim 2.  x Γ \ { 0 } : 1 w ( x ) d + 1 S ( { 1 , 2 } ) } .
Similar to the proof of Claim 2 of (a), we only need to prove x S ( { 1 , 2 } ) when w ( x ) d 1 . Here we have two cases:
Case 1.  i w r . In this case, there exist y , z S such that x = y + z . This means that x S ( { 1 , 2 } ) .
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i and m i 3 for each i, then there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 r = 3 d 3 v , c w 1 d 2 and v = 1 , we have 2 d 2 v + c 3 d 2 v 2 < 3 d 3 v = 2 r , which means that 2 d r v r + v c ; also note that 2 d > r + v , and then 2 d r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we can choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say, j 1 < j 2 < < j q 1 , choose q 2 terms from { i c + 1 , , i w } , say, i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say, j q 1 + 1 < < j q 1 + q 3 . Define y in such a way that y u = 1 if u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u if u { i c + 1 , , i c + d q 1 q 2 q 3 l } , y u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u if u { i c + d q 1 q 2 q 3 l + 1 , , i 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
(c) Similar to the proof of (a), it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Claim 1. S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Let x S ( { 1 , 2 } ) . If x S , then Claim 1 is true, as w ( x ) = d D . Assume that x 2 S \ { 0 } in the sequel. Then, there exist at least two elements y , z S \ { 0 } such that x = y + z and ( w ( y ) , w ( z ) ) = ( d i , d j ) . Define y ( 1 ) = ( y 1 , , y r ) , z ( 1 ) = ( z 1 , , z r ) , y ( 2 ) : = ( y r + 1 , , y r + v ) and z ( 2 ) = ( z r + 1 , , z r + v ) . Define:
l ( y ( 1 ) , z ( 1 ) ) = { i : y i 0 , z i 0 , i { 1 , 2 , , r } } = q 1 ,
l ( y ( 2 ) , z ( 2 ) ) = { i : y i 0 , z i 0 , i { r + 1 , r + 2 , , r + v } } = q 2 .
Case 1.  x i 0 for some i { r + 1 , , r + v } .
Case 1.1.  d i = d j .
In this case, 2 d i r v q 1 + q 2 d i . If q 1 + q 2 = d i , then 1 w ( x ) 2 d i 2 ( d i v ) v = v . If 2 d i r v < q 1 + q 2 < d i , then 2 = 2 d i 2 ( d i 1 ) w ( x ) 2 d i 2 ( 2 d i r 2 v + 1 ) v = 2 r + 3 v 2 d i 2 . If q 1 + q 2 = 2 d i r v , then 2 r 2 d i + 2 v = 2 d i 2 ( 2 d i r v ) w ( x ) 2 d i 2 ( 2 d i r 2 v ) v = 2 r + 3 v 2 d i . Since 2 r + 3 v 2 d i 2 = 2 r 2 d i + 2 v 1 if v = 1 and 2 r + 3 v 2 d i 2 2 r 2 d i + 2 v if v 2 , it follows that 1 w ( x ) 2 r + 3 v 2 d i .
Case 1.2.  d i d j .
Without loss of generality we may assume that d i d j . In this case, d i + d j r v q 1 + q 2 d i . If q 1 + q 2 = d i , then d j d i w ( x ) d i + d j 2 ( d i v ) v = d j d i + v . If d i + d j r v < q 1 + q 2 < d i , then d j d i + 2 = d i + d j 2 ( d i 1 ) w ( x ) d i + d j 2 ( d i + d j r 2 v + 1 ) v = 2 r + 3 v d i d j 2 . If q 1 + q 2 = d i + d j r v , then 2 r d i d j + 2 v = d i + d j 2 ( d i + d j r v ) w ( x ) d i + d j 2 ( d i + d j r 2 v ) v = 2 r + 3 v d i d j . Since 2 r + 3 v d i d j 2 = 2 r + 2 v d i d j 1 if v = 1 and 2 r + 3 v d i d j 2 2 r + 2 v d i d j if v 2 , it follows that 1 w ( x ) 2 r + 3 v d i d j .
In either case, we have 1 w ( x ) 2 r + 3 v 2 d .
Case 2.  x i = 0 for any i { r + 1 , , r + v } .
Case 2.1.  d i = d j .
In this case, 2 d i r v q 1 + q 2 d i . If q 1 + q 2 = d i , then w ( x ) = 0 and so x = 0 , which is a contradiction. If 2 d i r v q 1 + q 2 < d i , then w ( x ) = 2 d i 2 ( q 1 + q 2 ) . Hence, w ( x ) = 2 d i 2 ( q 1 + q 2 ) for q 1 + q 2 = 2 d i r v , , d i 1 .
Case 2.2.  d i d j . Without loss of generality we may assume that d i d j . Then, similar to Case 2.1, one can easily verify that w ( x ) = d i + d j + 1 2 ( q 1 + q 2 ) for q 1 + q 2 = d i + d j r v + 1 , , d i .
In either case, we have 1 w ( x ) 2 r + 2 v 2 d .
In the following, we compare 2 r + 3 v 2 d , 2 r + 2 v 2 d , d and d + 1 . Since 2 r = 3 d 2 v + 1 , and v 1 , it follows that we have d < 2 r + 2 v 2 d = ( 3 d 2 v + 1 ) + 2 v 2 d = d + 1 < 2 r + 3 v 2 d . Additionally, note that D = { d , d + 1 , 2 r + 2 v 2 d + 1 , , 2 r + 3 v 2 d } . Thus, we obtain that 1 w ( x ) 2 r + 3 v 2 d .
Claim 2.  x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d S ( { 1 , 2 } ) } .
Similar to the proof of Claim 2 of (a), we only need to prove x S ( { 1 , 2 } ) when w ( x ) d 1 , and here we have two cases:
Case 1.  i w r . In this case, there exist y , z S such that x = y + z . This means that x S ( { 1 , 2 } ) .
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i and m i 3 for each i, then there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 r = 3 d 2 v + 1 , c w 1 d 2 and v 1 , we have 2 d 2 v + c 3 d 2 v 2 < 3 d 2 v + 1 = 2 r , it means that 2 d r v r + v c ; also note that 2 d > r + v , and then 2 d r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we can choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say, j 1 < j 2 < < j q 1 , choose q 2 terms from { i c + 1 , , i w } , say, i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say, j q 1 + 1 < < j q 1 + q 3 . Define y in such a way that y u = 1 if u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u if u { i c + 1 , , i c + d q 1 q 2 q 3 l } , y u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u if u { i c + d q 1 q 2 q 3 l + 1 , , i 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
(d) Similar to the proof of (c), it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Claim 1. S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Similar to the proof of Claim 1 of (a), we have two cases:
Case 1.  x i 0 for some i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 3 v 2 d .
Case 2.  x i = 0 for any i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 2 v 2 d .
Thus, we compare 2 r + 3 v 2 d , 2 r + 2 v 2 d , d and d + 1 . Since 2 r = 3 d 2 v , and v 2 , it follows that we have d = 2 r + 2 v 2 d = ( 3 d 2 v ) + 2 v 2 d < d + 1 < 2 r + 3 v 2 d . Additionally, note that D = { d , d + 1 , 2 r + 2 v 2 d + 1 , , 2 r + 3 v 2 d } . Thus, we obtain that 1 w ( x ) 2 r + 3 v 2 d .
Claim 2.  x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d S ( { 1 , 2 } ) } .
Similar to the proof of Claim 2 of (a), we only need to prove x S ( { 1 , 2 } ) when w ( x ) d 1 , and here we have two cases:
Case 1.  i w r . In this case, there exist y , z S such that x = y + z . This means that x S ( { 1 , 2 } ) .
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i and m i 3 for each i, then there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 r = 3 d 2 v , c w 1 d 2 and v 1 , we have 2 d 2 v + c 3 d 2 v 2 < 3 d 2 v = 2 r , which means that 2 d r v r + v c ; also note that 2 d > r + v , and then 2 d r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we can choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say, j 1 < j 2 < < j q 1 , choose q 2 terms from { i c + 1 , , i w } , say, i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say, j q 1 + 1 < < j q 1 + q 3 . Define y in such a way that y u = 1 if u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u if u { i c + 1 , , i c + d q 1 q 2 q 3 l } , y u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u if u { i c + d q 1 q 2 q 3 l + 1 , , i 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
(e) Similar to the proof of (c), it suffices to prove:
S ( { 1 , 2 } ) = x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Claim 1. S ( { 1 , 2 } ) x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d .
Similar to the proof of Claim 1 of (a), we have two cases:
Case 1.  x i 0 for some i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 3 v 2 d .
Case 2.  x i = 0 for any i { r + 1 , , r + v } . In this case, we have 1 w ( x ) 2 r + 2 v 2 d .
Thus, we compare 2 r + 3 v 2 d , 2 r + 2 v 2 d , d, and d + 1 . Since 2 r = 3 d 2 v 1 and v 1 , it follows that we have 2 r + 2 v 2 d = ( 3 d 2 v 1 ) + 2 v 2 d = d 1 < d < d + 1 < 2 r + 3 v 2 d . Additionally, note that D = { d , d + 1 , 2 r + 2 v 2 d + 1 , , 2 r + 3 v 2 d } . Thus, we obtain that 1 w ( x ) 2 r + 3 v 2 d .
Claim 2.  x Γ \ { 0 } : 1 w ( x ) 2 r + 3 v 2 d S ( { 1 , 2 } ) } .
Similar to the proof of Claim 2 of (a), we only need to prove x S ( { 1 , 2 } ) when w ( x ) d 1 , and here we have two cases:
Case 1. i w r . In this case, there exist y , z S such that x = y + z . This means that x S ( { 1 , 2 } )
Case 2.  i w > r .
Denote c = | { i 1 , , i w } { 1 , , r } | . Then, x α = 0 for α { 1 , , r } \ { i 1 , i 2 , , i c } . Since Z m i is a cyclic group of order m i and m i 3 for each i, then there exist y i α , z i α Z m i \ { 0 } such that x i α = y i α + z i α for c + 1 α w , and y t , z t Z m i \ { 0 } such that 0 = x t = y t + z t for t { r + 1 , r + 2 , , r + v } \ { i c + 1 , , i w } . Denote q 1 = { i i { 1 , , r } \ { i 1 , , i c } a n d y i = z i = 1 } , q 2 = { i i { i c + 1 , , i w } a n d x i = y i + z i } , and q 3 = { i i { r + 1 , , r + v } \ { i c + 1 , , i w } a n d x i = y i + z i = 0 } . Since 2 r = 3 d 2 v 1 , c w 1 d 2 and v 1 , we have 2 d 2 v + c 3 d 2 v 2 < 3 d 2 v 1 = 2 r , which means that 2 d r v r + v c ; also note that 2 d > r + v , and then 2 d r v q 1 + q 2 + q 3 min { r + v c , d } . Thus, we can choose q 1 terms from { 1 , 2 , , r } \ { i 1 , , i c } , say, j 1 < j 2 < < j q 1 , choose q 2 terms from { i c + 1 , , i w } , say, i w q 2 + 1 < < i w , and choose q 3 terms from { r + 1 , , r + v } \ { i c + 1 , , i w } , say, j q 1 + 1 < < j q 1 + q 3 . Define y in such a way that y u = 1 if u { i 1 , , i l } { j 1 , , j q 1 } , y u = x u if u { i c + 1 , , i c + d q 1 q 2 q 3 l } , y u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and y u = 0 for all other u. Define z in such a way that z u = 1 if u { i l + 1 , , i c } { j 1 , , j q 1 } , z u = x u if u { i c + d q 1 q 2 q 3 l + 1 , , i 2 d 2 q 1 2 q 2 2 q 3 } , z u = y u if u { i w q 2 + 1 , , i w } { j q 1 + 1 , , j q 1 + q 3 } , and z u = 0 for all other u. Then, w ( y ) = w ( z ) = d and x = y + z . Therefore, x S ( { 1 , 2 } ) .
This completes the proof. □

References

  1. Balinska, K.; Cvetkocić, D.; Rodosavljević, Z.; Simić, S.; Stevanović, D. A survey on integral graphs. Publ. Elektroteh. Fak. Ser. Mat. 2003, 13, 42–65. [Google Scholar]
  2. Wang, L. A Survey of Results on Integral Trees and Integral Graphs; Memorandum 1763; Department of Applied Mathematics, University of Twente: Enschede, The Netherlands, 2005. [Google Scholar]
  3. Hahn, G.; Sabidussi, G. (Eds.) Graph Symmetry: Algebraic Methods and Applications; NATO Science Series C; Springer: Dordrecht, The Netherlands, 1997. [Google Scholar]
  4. Khaefi, Y.; Akhlaghi, I.; Khosravi, B. On the subgroup perfects codes in Cayley graphs. Des. Code Cryptogr. 2023, 91, 55–61. [Google Scholar] [CrossRef]
  5. Liu, Y.; Yuan, J.; Dai, W.; Li, D. Three-state quantum walk on the Cayley Graph of the Dihedral Group. Quantum Inf. Process. 2019, 20, 106. [Google Scholar] [CrossRef]
  6. Bašić, M.; Petković, M.D.; Stevanović, D. Perfect state transfer in integral circulant graphs. Appl. Math. Lett. 2009, 22, 1117–1121. [Google Scholar] [CrossRef]
  7. Li, Y.; Liu, X.; Zhang, S.; Zhou, S. Perfect state transfer in NEPS of complete graphs. Discret. Appl. Math. 2021, 289, 98–114. [Google Scholar] [CrossRef]
  8. Sander, T. Eigenspaces of Hamming graphs and unitary Cayley graphs. Ars Math. Contemp. 2010, 3, 13–19. [Google Scholar] [CrossRef]
  9. Klotz, W.; Sander, T. Integral Cayley graphs over abelian groups. Electron. J. Combin. 2010, 17, 81–94. [Google Scholar] [CrossRef]
  10. Cvetkocić, D.; Petrić, M. Connectedness of the non-complete extended p-sum of graphs. Zb. Rad. Prir. Mat. Fak. Univ. Novom Sadu Ser. Mat. 1983, 13, 345–352. [Google Scholar]
  11. Cvetkocić, D.; Rowlingson, P.; Simić, S. Eigenspaces of Graphs; Encyclopedia of Mathematics and its Applications; Cambidge University Press: London, UK, 1997. [Google Scholar]
  12. Cvetkocić, D.; Rowlingson, P.; Simić, S. An Introduction to the Theory of Graph Spectra; Cambridge University Press: London, UK, 2010. [Google Scholar]
  13. Imrich, W.; Klavžar, S. Product Graphs: Structure and Recognition; Wiley-Interscience Series in Discrete Mathematics and Optimization; Wiley: New York, NY, USA, 2000. [Google Scholar]
  14. Petrić, M. Connectedness of the generalized direct product of diagraphs. Univ. Beograd. Publ. Elektroteh. Fak. Mat. 1995, 6, 30–38. [Google Scholar]
  15. Zheng, S.; Liu, X.; Zhang, S. Perfect state transfer in NEPS of some graphs. Linear Multilinear Algebra 2020, 68, 1518–1533. [Google Scholar] [CrossRef]
  16. Klotz, W.; Sander, T. GCD-graphs and NEPS of complete graphs. Ars Math. Contemp. 2013, 6, 289–299. [Google Scholar] [CrossRef]
  17. Linial, N. Locality in distributed graph algorithms. SIAM J. Comput. 1992, 21, 193–201. [Google Scholar] [CrossRef]
  18. Das, K.C.; Guo, J.M. Laplacian eigenvalues of the second power of a graph. Discret. Math. 2013, 312, 626–634. [Google Scholar] [CrossRef]
  19. Das, K.C.; Guo, J.M. Eigenvalues of the k-th power of a graph. Math. Nachr. 2016, 289, 1585–1593. [Google Scholar] [CrossRef]
  20. Klotz, W.; Sander, T. Distance powers and distance matrices of integral Cayley graphs over abelian groups. arXiv 2012, arXiv:1206.4398. [Google Scholar] [CrossRef]
  21. Liu, X.; Li, B. Distance powers of unitary Cayley graphs. Appl. Math. Comput. 2016, 289, 272–280. [Google Scholar] [CrossRef]
  22. Naser, T. Diameter of Ramaujan graphs and Random Cayley graph. Combinatorica 2019, 39, 427–446. [Google Scholar]
  23. An, X.; Wu, B. The Wiener index of the k-th power of a graph. Appl. Math. Lett. 2008, 21, 436–440. [Google Scholar] [CrossRef]
  24. Chebikin, D. Graph powers and k-ordered Hamiltonicity. Discret. Math. 2008, 308, 3220–3229. [Google Scholar] [CrossRef]
  25. Omar, A.A.; Hasan, A.; Mathmound, A. The Wiener polynomial of the kth power graph. Int. J. Math. Math. Sci. 2007, 2007, 24873. [Google Scholar]
  26. Su, G.; Xiong, L.; Gutman, I. Harary index of the k-th power of a graph. Appl. Anal. Discret. Math. 2013, 7, 94–105. [Google Scholar] [CrossRef]
  27. Zhang, W.; Wu, B.; An, X. The hyper-Wiener index of the kth power of a graph. Discret. Math. Algorithms Appl. 2011, 3, 17–23. [Google Scholar] [CrossRef]
Figure 1. Solid line: d ( x , y ) = 1 , ρ ( x , y ) = 1 ; dotted line: d ( x , y ) = 2 , ρ ( x , y ) = 2 .
Figure 1. Solid line: d ( x , y ) = 1 , ρ ( x , y ) = 1 ; dotted line: d ( x , y ) = 2 , ρ ( x , y ) = 2 .
Mathematics 11 02487 g001
Figure 2. Solid line: d ( x , y ) = 3 , ρ ( x , y ) = 1 ; dotted line: d ( x , y ) = 2 , ρ ( x , y ) = 2 .
Figure 2. Solid line: d ( x , y ) = 3 , ρ ( x , y ) = 1 ; dotted line: d ( x , y ) = 2 , ρ ( x , y ) = 2 .
Mathematics 11 02487 g002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, Y.; Zhang, J.; Wang, M. The Square of Some Generalized Hamming Graphs. Mathematics 2023, 11, 2487. https://doi.org/10.3390/math11112487

AMA Style

Li Y, Zhang J, Wang M. The Square of Some Generalized Hamming Graphs. Mathematics. 2023; 11(11):2487. https://doi.org/10.3390/math11112487

Chicago/Turabian Style

Li, Yipeng, Jing Zhang, and Meili Wang. 2023. "The Square of Some Generalized Hamming Graphs" Mathematics 11, no. 11: 2487. https://doi.org/10.3390/math11112487

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop