D-Magic and Antimagic Labelings of HypercubesSubmitted to the editors DATE.      Funding: This work was funded by

# D−Magic and Antimagic Labelings of Hypercubes††thanks: Submitted to the editors DATE.      Funding: This work was funded by

Palton Anuwiksa Master Program in Mathematics, Institut Teknologi Bandung, Indonesia (anuwiksapalton@gmail.com).    Akihiro Munemasa Graduate School of Information Science, Tohoku University, Japan (munemasa@math.is.tohoku.ac.jp).    Rinovia Simanjuntak Combinatorial Mathematics Group, Institut Teknologi Bandung, Indonesia (rino@math.itb.ac.id).
###### Abstract

For a set of distances , a graph of order is said to be magic if there exists a bijection and a constant such that for any vertex , , where .

In this paper we shall find sets of distances s, such that the hypercube is magic. We shall utilise well-known properties of (bipartite) distance-regular graphs to construct the magic labelings.

Key words. -magic labeling, -antimagic labeling, distance-regular graph, hypercube

AMS subject classifications. 05C12, 05C78

## 1 Introduction

We denote by a finite undirected simple graph of order and diameter . For an integer (), we define as the distance matrix of . When , the matrix is the adjacency matrix of , and sometime it is denoted by simply . For an integer () and a vertex in , we define as the set of all vertices at distance from . The open neighborhood of is and the closed neighborhood of is . In general, for a set of distances , the neighborhood of a vertex is . For other standard graph theoretic notations and definitions we refer to Diestel [6].

Magic squares are among the more popular mathematical recreations and in the early 1960s, Sedláček [12] asked whether the ”magic” ideas could be applied to graph. He introduced a graph labeling where the edges of a graph are labeled with distinct real numbers such that the sum of edge-labels incident with each vertex equal to a constant, independent of the choice of vertex. It is obvious that the complete bipartite graph can be labeled by elements of a magic square of size . This labeling was called magic labeling, but then it becomes known as the vertex-magic edge labeling. Since then, many variations of magic labelings have been defined, and the most recent was introduced by O’Neal and Slater in 2013 [10].

###### Definition 1.1.

For a graph and a set of distances , a bijection is called a magic labeling of if there exists a constant called the magic constant such that for any vertex , the weight of , .

In the case that the weight is distinct for every vertex , is called a antimagic labeling of . In particular, if the set of weights constitutes an arithmetic progression starting at with difference , then is called an antimagic labeling of .

Any graph admitting a magic (resp. antimagic, antimagic) labeling is called a magic (resp. antimagic, antimagic) graph.

If , a magic (resp. antimagic, antimagic) labeling is known as a distance magic (resp. distance antimagic, distance antimagic) labeling, and if , a magic (resp. antimagic, antimagic) labeling is called a closed distance magic (resp. closed distance antimagic, closed distance antimagic) labeling.

The following observation is a direct consequence of the magic labeling definition.

###### Observation 1.

Let and be two disjoint sets of distances. If a graph is both magic and magic then it is also magic.

In [9], it was proved that if is an -regular graph with order admitting a distance magic labeling, then the magic constant is . Using this result and the Handshaking Lemma, it is clear that every regular graph with odd degree is not distance magic. In 2004, Acharya, Rao, Singh, and Parameswaran conjectured that distance magic labelings do not exist for all hypercubes of order at least 4, including the ones with even degrees.

###### Conjecture 1.

[11] For any even integer , the -dimensional hypercube is not distance magic.

The conjecture was proved to be true in [5] for . However, positive answers were instead obtained for [7]; which lead us to the following theorem.

###### Theorem 1.2 ([5, 7]).

has distance magic labeling if and only if .

For other set of distances , there is only one known magic labelings as follow.

###### Theorem 1.3 ([7]).

For every , there exist a -distance magic labeling of the hypercube for every odd , .

In this paper we shall find sets of distances s for which magic labelings for hypercubes exist (Section LABEL:sec:3). In order to do so, we shall develop more general results for distance-regular graphs, in particular for bipartite distance-regular graphs which are antipodal double covers (Section LABEL:sec:2).

## 2 D−Magic Labelings for Distance-Regular Graphs

We shall use the definition of a distance-regular graph as stated in [4].

###### Definition 2.1.

A connected graph of diameter is called distance-regular if there are non-negative integers such that for any two vertices and in at distance , there are precisely neighbours of in and neighbours of in . Clearly, is regular with degree , , and . The sequence is called the intersection array of ; and the numbers , and , where , are called the intersection numbers of .

The spectrum of a distance-regular graph can be searched by considering a tridiagonal matrix as stated in the following.

###### Theorem 2.2.

[3] If is a distance-regular graph of diameter and intersection array , then has distinct eigenvalues which are the eigenvalues of the tridiagonal matrix

 B=⎛⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜⎝010⋯0ra1c20b1a2c3b2a3⋱⋱⋱cd0⋯bd−1ad⎞⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟⎠.

In subsequent theorems and proofs, we refer to the matrix of as the tridiagonal matrix in Theorem LABEL:B.

For a vertex and a labeling of vertices , we denote by , the sum of labels of all vertices in . It is clear that . We define two vectors of as follow: the vector as and the vector as . Now we are ready to provide necessary conditions for the existence of distance and closed distance magic labelings for distance-regular graphs.

###### Lemma 2.3.

Let be a distance-regular graph of diameter , be a vertex in , and be a labeling of vertices in . If is a distance magic labeling with magic constant , then

 Bs(x)=k′k.

If is a closed distance magic labeling with magic constant , then

 (I+B)s(x)=k′k.

###### Proof.

Suppose that is a distance magic labeling of with magic constant . For a vertex in and , consider the sum of weights of vertices in ,

 ∑y∈Gi(x)w(y)=∑y∈Gi(x)∑z∈N(y)l(z).

In this equation, the label of every vertex in appears times, the label of every vertex in appears times, and the label of every vertex in appears times. Thus, the following holds.

 k′ki=Si−1(x)bi−1+Si(x)ai+Si+1(x)ci+1.

This proves that . The second statement can be proved in a similar manner.

A distance-regular graph of diameter is called an antipodal double cover if for some (and hence all) vertex in . The unique vertex in is called the antipode of and denoted by in what follows.

###### Lemma 2.4.

Let be a bipartite distance-regular graph which is an antipodal double cover. If , then the diameter of is even. Moreover, in this case, has a basis of the form

 ⎛⎜ ⎜ ⎜ ⎜ ⎜⎝10⋮(−1)d/2⎞⎟ ⎟ ⎟ ⎟ ⎟⎠. (2.1)

###### Proof.

The tridiagonal matrix of as in Theorem LABEL:B is of the form

 B=⎛⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜⎝010r0c2cd−10c3cd−20⋱⋱⋱r010⎞⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟⎠. (2.2)

Let be an eigenvector of , normalized to have . Then , and can be recursively determined by the condition , and we obtain .

###### Lemma 2.5.

Let be a distance-regular graph which is an antipodal double cover. If admits a distance (resp. closed) magic labeling, then (resp. ) has a basis of the form

 ⎛⎜ ⎜⎝1⋮−1⎞⎟ ⎟⎠. (2.3)

###### Proof.

Suppose that is a distance magic labeling of with magic constant . For a vertex in , we have

 Bs(x)=Bs(x′)=k′k=k′rBk,

where is the degree of . This implies and gives the desired description of . If admits a closed distance magic labeling , then an analogous argument shows .

The following theorem enables us to construct new magic or antimagic labelings for a (bipartite) distance-regular graph, provided that the graph is distance magic.

###### Theorem 2.6.

Let be a distance-regular graph of diameter admitting a distance magic labeling . If is a non-empty subset of then is either -magic labeling or antimagic labeling for some . Moreover, if is bipartite, then is magic for all non-empty .

###### Proof.

Regard the distance magic labeling as a vector indexed by . Then . Since is distance-regular, there exists a polynomial such that . If has constant term , then . Thus, is a -magic labeling or --antimagic labeling for some , according to or not.

Assume now that is bipartite, and that consists of odd positive integers. Then is an odd polynomial in , and thus .

Note that Theorem LABEL:j is a direct consequence of Theorems LABEL:QnDM and LABEL:BDRG.

Now we are ready to prove the following theorem, which provides us many new magic labelings for a distance-regular graph which is an antipodal double cover, provided that the graph is either distance or closed distance magic. Additionally, the theorem also provides a necessary condition for the existence of a distance magic labeling for such a graph.

###### Theorem 2.7.

Let be a distance-regular graph which is an antipodal double-cover. If is a distance magic labeling or a closed distance magic of then is a magic labeling for every . Moreover, if is bipartite and is a distance magic labeling, then .

###### Proof.

From Lemma LABEL:lem:KerB, has a basis of the form . Then is a constant independent of . Consequently, for every ,

 Sj(x)+Sd−j(x) =∑y∈Gj(x)(l(y)+l(y′)) =∑y∈Gj(x)(|V(G)|+1) =(|V(G)|+1)|Gj(x)|.

Therefore, is -magic.

If is bipartite, then implies that must be even. Recursively comparing entries of , there exist constants and such that . More explicitly, . Switching the role of and , we find . This forces , and hence .

Theorem LABEL:n=2mod4 provides an alternative proof for the non-existence of distance magic labelings for -dimensional hypercube , when , which was originally proved in [5]. We could also use the theorem to prove the following result.

###### Corollary 2.8.

Hadamard graphs are not distance magic.

###### Proof.

It is well known that a Hadamard graph is a bipartite distance-regular graph which is an antipodal double cover with diameter .

## 3 D−Magic Labelings for Hypercubes

Recall that the hypercube is a bipartite distance-regular graph which is an antipodal double cover with diameter . As direct consequences of Observation LABEL:union, Theorems LABEL:QnDM, LABEL:j, LABEL:BDRG and LABEL:n=2mod4, we obtain the following sets of distances in which magic labelings exist for the hypercube , where .

###### Theorem 3.1.

If then there exists a -magic labeling of whenever is of the form

 E∪⋃i∈I{i,n−i},

where is a non-empty subset of , , and

 E∩{i,n−i}=∅(i∈I).

Thus a natural question would be:

###### Open Problem 3.2.

”Are the sets s in Theorem LABEL:2mod4 the only for which , , is -magic?”

If the answer of the question in Open Problem LABEL:D_2mod is positive, then by Theorem LABEL:BDRG, we obtain antimagic labelings of for all s which are excluded in Theorem LABEL:2mod4.

The rest of the section will be devoted on searching magic labelings for the hypercube , where . We shall denote by the th standard basis vector in . For a vector , we denote by the corresponding nonnegative integer:

 ζ(a)=n−1∑i=0ai2i,

where each is regarded as an element of . We also denote by the embedding obtained by setting in the above definition.

In the hypercube , we have

 G1(u)={u+ei∣i∈{1,…,n}}(u∈Fn2).

The following definition is essential in finding a closed distance magic labeling of , as can be seen in Lemma LABEL:lem:146b.

###### Definition 3.3.

A subset is said to be balanced if

 |{a∈A∣ai=1}|=|A|2(∀i∈{1,…,n}). (3.1)

For a subset , a bijection is said to be neighbor balanced if is balanced for every . If (resp. ), then a neighbor balanced bijection is called a neighbor balanced (resp. closed neighbor balanced).

Note that a subset is balanced if and only if it is an orthogonal array of strength (see [8]).

###### Lemma 3.4.

Let be a balanced subset of . Then

 ∑a∈Aζ(a)=|A|2(2n−1).

###### Proof.

We have

 ∑a∈Aζ(a) =n−1∑i=0∑a∈Aai2i =n−1∑i=0|A|22i (by (LABEL:146a)) =|A|2(2n−1).

###### Lemma 3.5.

Let and let be a neighbor balanced bijection. Then the labeling is a magic labeling of .

###### Proof.

Let , then

 ∑x∈ND(u)ζ∘f(x) =∑y∈f(ND(u))ζ(y) =|f(ND(u))|2(2n−1) (by Lemma LABEL:lem:146a) =|ND(u)|2(2n−1).

Since is independent of the choice of , we obtain is a -magic labeling of .

###### Lemma 3.6.

Let be a nonsingular linear transformation. is closed neighbor-balanced if and only if the matrix representation of with respect to the standard basis has constant row sum .

###### Proof.

Let be the matrix representation of with respect to the standard basis, so that for every . Then for and , we have

 |{v∈f(N[u])∣f(v)i=1}| =|{j∣f(u+ej)i=1}|+ζ(f(u)i) =|{j∣(Mu+Mej)i=1}|+ζ((Mu)i) =|{j∣Mij=(Mu)i+1}|+ζ((Mu)i).

Thus,

 |{v∈f(N[u])∣f(v)i=1}|=n+12(∀u∈Fn2) ⟺|{j∣Mij=(Mu)i+1}|+ζ((Mu)i)=n+12(∀u∈Fn2) ⟺|{j∣Mij=α+1}|+ζ(α)=n+12(∀α∈F2) ⟺|{j∣Mij=1}|=n+12.

Therefore,

 f is closed neighbor-balanced ⟺|{v∈f(N[u])∣f(v)i=1}|=n+12(∀i∈{1,…,n},∀u∈Fn2) ⟺|{j∣Mij=1}|=n+12(∀i∈{1,…,n}).

It is known (see [2, Sect. III.2]) that the distance matrices of satisfy the following:

 Ai=vi(A1)(i=0,1,…,n),

where is a sequence of polynomials defined by

 v0(x)=1,v1(x)=x,

and

 xvi(x)=(i+1)vi+1(x)+(n−i+1)vi−1(x)(i=1,…,n−1).

It is also known that the eigenvalues of are

 θj=n−2j(j=0,1,…,n).

The Krawtchouk polynomials are the sequence of polynomials defined by

 Ki(j)=vi(θj)(i,j=0,1,…,n).

Thus,

 (n−2j)Ki(j)=(i+1)Ki+1(j)+(n−i+1)Ki−1(j) (3.2)

It also can be shown by general theory that

 Kn(j)=(−1)j(j=0,1,…,n). (3.3)

Now we are ready to present the necessary and sufficient condition for the existence of a closed distance magic labeling of a hypercube.

###### Theorem 3.7.

There exists a closed distance magic labeling of if and only if .

###### Proof.

Let , where is a positive integer. Observe that the matrix

 M=⎡⎢⎣1012m0I2mJ2m0J2mI2m⎤⎥⎦

is nonsingular over and it has constant row sum . By Lemma LABEL:lem:146b, there exists a closed neighbor-balance bijection of . By Lemma LABEL:lem:146c, is a closed distance magic labeling.

Conversely, suppose that there exists a closed distance magic labeling of . By Lemma LABEL:lem:KerB the kernel of must have a basis of the form . In particular, has eigenvalue , which forces to be odd. Let . Then the eigenvalues of are , . Thus . The normalized eigenvector belonging to the eigenvalue is , and it satisfies and (by (LABEL:eq:-1)). Thus, must be odd and hence .

Let denote the eigenspace of corresponding to the eigenvalue . Then the distance matrix has eigenvalue on , that is,

 Vj⊆Ker(Ai−Ki(j)I)(i,j=0,1,…,n).
###### Lemma 3.8.
1. If is odd then

 Ker(A0+A1)⊆Ker(A2i+A2i+1)(i=0,1,…,n−12).
2. If then

 Ker(A0+A1)⊆Ker(Ai+An−i)(i=0,1,…,n−12).

###### Proof.

(i) Write . Then , so

 Vp=Ker(A0+A1) (3.4)

The eigenvalue of on is , so it suffices to prove

 K2i(p)+K2i+1(p)=0(0≤i

We prove this by induction on . The case is immediate from (LABEL:Vp). By the recurrence (LABEL:K), we have

 −K2i+1(p) =(2i+2)K2i+2(p)+(2p−2i−1)K2i(p), −K2i+2(p) =(2i+3)K2i+3(p)+(2p−2i−2)K2i+1(p).

Thus

 (2i+3)(K2i+3(p)+K2i+2(p))=(2p−2i−1)(K2i(p)+K2i+1(p)).

This completes the inductive step.

(ii) Since and , this implies , which in turn implies . Since , we obtain

 Vp⊆Ker(Ai+An−i).

The result then follows from (LABEL:Vp).

###### Theorem 3.9.

If then there exists a -magic labeling of whenever is of the form

 ⋃i∈I1{2i,2i+1}∪⋃j∈I2{j,n−j}, (3.5)

where and

 {2i,2i+1}∩{j,n−j}=∅(i∈I1,j∈I2).

###### Proof.

By Observation LABEL:union, it suffices to show that there exists a -magic labeling of for in

 {{2i,2i+1}∣0≤i

By Theorem LABEL:thm:1, there exists a closed distance magic labeling of . By Lemma LABEL:lem:A, such a labeling is also a -magic labeling for in (LABEL:D). Indeed, implies

 l ∈Ker(A0+A1)+⟨1⟩ ⊆Ker(A2i+A2i+1)+⟨1⟩.

Thus , proving that is a -magic labeling. Similarly, we can show that is a -magic labeling.

###### Open Problem 3.10.

”Are the sets s in Theorem LABEL:thm:2 the only for which , , is -magic?”

Open Problem LABEL:op:2 should be true if equality holds in the inclusions in Lemma LABEL:lem:A.

Additionally, in the next theorem we show that the known distance magic and closed distance magic labelings of can be utilised to construct distance antimagic and closed distance antimagic labelings for , the disjoint union of two copies of .

###### Theorem 3.11.

If , then is distance antimagic. If , then is closed distance antimagic.

###### Proof.

The adjacency matrix of is of the form

 (A(n−1)IIA(n−1)),

where is the adjacency matrix of .

Suppose first . Then by Theorem LABEL:QnDM, has a distance magic labeling . Partitioning the vector into two equal parts and , we find

 (A(n−1)00A(n−1))l∈(l(2)l(1))+⟨1⟩.

This implies that is a -distance antimagic labeling. Therefore, is distance antimagic.

Next suppose . Then Theorem LABEL:thm:1 implies that there exists a closed distance magic labeling of . If we regard as a labeling of , then it is easy to see that is a closed distance antimagic labeling, by a similar argument as the previous case.

## References

• [1] M. Anholcer, S. Cichacz, and I. Peterin, Spectra of Graphs and Closed Distance Magic Labelings, Discrete Mathematics, 339 (2016) 1915–1923.
• [2] E. Bannai and T. Ito, Algebraic Combinatorics I: Association Schemes, Benjamin/Cummings (1984).
• [3] N. Biggs, Algebraic Graph Theory, Second Edition, Cambridge University Press (1996).
• [4] A. E. Brouwer, A. M. Cohen, and A. Neumaier, Distance-regular graphs, volume 18 of Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)]. Springer-Verlag, Berlin, 1989.
• [5] S. Cichacz, D. Froncek, E. Krop, and C. Raridan, Distance Magic Cartesian Products of Graphs, Discussiones Mathematicae Graph Theory, 36 (2016) 299–308.
• [6] R. Diestel, Graph Theory, Third Edition, Springer-Verlag, Heidelberg Graduate Texts in Mathematics, Volume 173, New York, 2005
• [7] P. Gregor and P. Kovář, Distance Magic Labelings of Hypercubes, Electronic Notes in Discrete Mathematics, 40 (2013), 145–149.
• [8] A.S. Hedayat, N.J.A. Sloane, J. Stufken, Orthogonal Arrays, Theory and Applications, Springer-Verlag, New York, 1999.
• [9] M. Miller, C. Rodger and R. Simanjuntak, Distance magic labelings of graphs, Australasian Journal of Combinatorics, 28 (2003), 305–315.
• [10] A. O’Neal and P. Slater, Uniqueness of Vertex Magic Constants, SIAM J. Disc. Math., 27 (2013) 708–716.
• [11] S.B. Rao, T. Singh and V. Parameswaran, Some sigma labelled graphs I, in Graphs, Combinatorics, Algorithms and Applications, eds. S. Arumugam, B.D. Acharya and S.B. Rao, Narosa Publishing House, New Delhi (2004) 125–133.
• [12] J. Sedláček, Problem 27. In: Theory of Graphs and Its Applications (M. Fiedler, ed.). Praha. 1964, 163–164.
You are adding the first comment!
How to quickly get a good reply:
• Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
• Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
• Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters