Distance Magic Graphs - a Survey

Let <i>G = (V;E)</i> be a graph of order n. A bijection <i>f : V &rarr; {1, 2,...,n} </i>is called <i>a distance magic labeling </i>of G if there exists a positive integer k such that <i>&Sigma; f(u) = k </i> for all <i>v &epsilon; V</i>, where <i>N(v)</i> is the open neighborhood of v. The constant k is called the magic constant of the labeling f. Any graph which admits <i>a distance magic labeling </i>is called a distance magic graph. In this paper we present a survey of existing results on distance magic graphs along with our recent results,open problems and conjectures.DOI : http://dx.doi.org/10.22342/jims.0.0.15.11-26


Introduction
By a graph G = (V, E) we mean a finite undirected graph with neither loops nor multiple edges. The order and size of G are denoted by n and m respectively. For graph theoretic terminology we refer to Chartrand and Lesniak [3].
Several practical problems in real life situations have motivated the study of labelings of the vertices(edges) of graphs with real numbers or subsets of sets, which are required to obey variety of conditions. There is an enormous literature built up on several kinds of labelings of graphs over the past three decades or so. For a survey of various graph labeling problems one may refer to Gallian [8].
As pointed out by Gallian in his dynamic survey [8], finding out what has been done for any particular kind of labeling and keeping up with new discoveries is difficult because of the sheer number of papers and because many of the papers have appeared in journals that are not widely available. As a consequence for any particular type of graph labeling, the same classes of graphs have been done by several authors and in some cases the same terminology is used for different concepts. Again the same concept has been investigated by different authors with different terminology. One such concept is distance magic labeling which has been investigated under different names such as sigma labeling and 1-vertex magic vertex labeling. In this paper we present a survey of existing results on distance magic graphs along with our recent results, open problems and conjectures.

Basic Results
The concept of distance magic labeling of a graph has been motivated by the construction of magic squares. A magic square of side n is an n × n array whose entries are an arrangement of the integers {1, 2, . . . , n 2 }, in which all elements in any row, any column, or either the main diagonal or main back-diagonal, add to the same sum r. Now if we take a complete n partite graph with parts V 1 , V 2 , . . . , V n with |V i | = n, 1 ≤ i ≤ n and label the vertices of V i with the integers in the i th row of the magic square, we find that the sum of the labels of all the vertices in the neighborhood of each vertex is the same and is equal to r(n − 1). Motivated by this observation in 1994 Vilfred [23] in his doctoral thesis introduced the concept of sigma labelings. The same concept was introduced by Miller et al. [16] under the name 1-vertex magic vertex labeling. Sugeng et al. [22] introduced the term distance magic labeling for this concept. In this paper we use the term distance magic labeling.
Definition 2.1. [23] Distance magic labeling of a graph G of order n is a bijection f : V → {1, 2, . . . , n} with the property that there is a positive integer k such that A natural generalization of the concept of magic square is the concept of magic rectangle. Definition 2.2. A magic rectangle A = (a ij ) of size m × n is an m × n array whose entries are {1, 2, . . . , mn}, each appearing once, with all its row sums equal and with all its column sums equal.
The sum of all entries in the array is 1 2 mn(mn + 1); it follows that m i=1 a ij = 1 2 n(mn + 1) for all j and (1) Hence m and n must either both be even or both odd. It has been proved in [11,12] that such an array exists whenever m and n have the same parity, except for the impossible cases where exactly one of m and n is 1, and for m = n = 2. We state the result formally here. A simpler construction is given in [10]. As in the case of magic squares, we can construct a distance magic complete m partite graph with each part size equal to n by labeling the vertices of each part by the columns of the magic rectangle. While there is no 2 × 2 magic rectangle, notice that the partite sets of K 2,2 can be labeled {1, 4} and {2, 3}, respectively, to obtain a distance magic labeling. We now present some basic results on distance magic graphs, which have been independently discovered.
The following lemma gives a necessary condition for the existence of distance magic labeling.
Lemma 2.5. [13,16,19,23] Let f be a distance magic labeling of a graph G = (V, E). Then where n is the number of vertices of G and k is the magic constant.
Theorem 2.8. [16] (i) The path P n of order n is a distance magic graph if and only if n = 1 or n = 3. (ii) The cycle C n of length n is a distance magic graph if and only if n = 4. (iii) The complete graph K n is a distance magic graph if and only if n = 1.
(iv) The wheel W n = C n + K 1 is a distance magic graph if and only if n = 4.
(v) A tree T is a distance magic graph if and only if T = P 1 or T = P 3 . Theorem 2.9. [22] If G is a nontrivial distance magic graph and δ(G) = 1, then either G is isomorphic to P 3 or G contains exactly one component isomorphic to P 3 and all other components are isomorphic to K 2,2 = C 4 .
Let G be a nontrivial distance magic graph with distance magic labeling f and magic constant k. Obviously k ≥ n and a characterization of graphs for which k = n is given in [13,23]. We give an alternative proof of this result, which is more elegant than the earlier proofs.
Theorem 2.10. Let G be a nontrivial distance magic graph with labeling f and magic constant k. Then the following are equivalent.
(iii) Either G is isomorphic to P 3 or G contains exactly one component isomorphic to P 3 and all other components are isomorphic to K 2,2 = C 4 .
Proof. Suppose k = n. Then any vertex which is adjacent to n has degree 1 and hence (i) implies (ii). It follows from Theorem 2.9 that (ii) implies (iii). We now prove that (iii) implies (i). If G = P 3 then G is a distance magic graph with k = n = 3, as shown in Figure 1.
. Now define f : V (G) → {1, 2, . . . , 4t + 3} as follows: Clearly f is a distance magic labeling of G with magic constant k = 4t + 3 = n. Further if g is any distance magic labeling of G with magic constant k, then the unique nonpendant vertex of P 3 must receive the label n and hence it follows that k = n.
The following theorem gives a characterization of distance magic graphs of order n with magic constant k = n + 1. This has been stated without proof in [13].
Theorem 2.11. A graph G of order n is a distance magic graph with magic constant k = n + 1 if and only if G = tC 4 .
Theorem 2.12. [22] If G is distance magic, deg(x) = deg(y) = deg(z) = 2 and y is adjacent to x and z then either G is isomorphic to C 4 or G contains a component isomorphic to C 4 . Theorem 2.13. [22] If G is a complete multipartite graph and G has a distance magic labeling then G = K s1,s2,...,sr with 1 ≤ s 1 ≤ s 2 ≤ · · · ≤ s r and s i ≥ 2, i = 2, 3, . . . , r.
Acharya et al. [1] obtained a characterization of all complete bipartite graphs which are distance magic by proving the following two results.
[1] If the complete bipartite graph K n1,n2 is distance magic graph, then n ≡ 0 or 3(mod 4) and n The complete bipartite graph K n1,n2 is a distance magic graph if and only if n ≡ 0 or 3(mod 4) where n 1 + n 2 = n and n 2 ≤ n 1 ≤ θ(n). The same results were obtained in an alternative form in [2]. Theorem 2.18. [16,21] Let r ≥ 1, n ≥ 3, G be an r-regular graph and C n the cycle of length n. Then G[C n ] admits a distance magic labeling if and only if n = 4.
Miller at al. [16] proved the following result.
Theorem 2.19. [16] Let G be an arbitrary regular graph. Then G[K n ] is distance magic for any even n.
Shafiq et al. [21] considered distance magic labeling for disconnected graphs and obtained the following theorems.
Theorem 2.20. [21] Let m ≥ 1, n > 1 and p ≥ 3. mC p [K n ] has a distance magic labeling if and only if either n is even or mnp is odd or n is odd and p ≡ 0(mod 4).

Theorem 2.21. [21]
(i) If n is even or mnp is odd, m ≥ 1, n > 1 and p > 1, then mK p [K n ] has a distance magic labeling. (ii) If np is odd, p ≡ 3(mod 4) and m is even, then mK p [K n ] does not have a distance magic labeling.
Froncek et al. [7] strengthened the existence part of Theorem 2.20, part (i) of Theorem 2.21 and complemented Theorem 2.19 by proving the following.
Let G be an arbitrary r-regular graph with k vertices, where k is an odd number, and n be an odd positive integer. Then r is even and the graph G[K n ] is distance magic.
For k ≡ r ≡ 2 (mod 4) they proved the non-existence of distance labeling for such graphs (see Theorem 4.9). The remaining cases are still open.
Froncek at al. [7] also solved the case of p ≡ 1 (mod 4) which was not covered by part (ii) of Theorem 2.21 by proving the non-existence of such labeling. We list the result separately later as Theorem 4.8. Their result along with Theorem 2.21 then gives a necessary and sufficient condition.
For complete multipartite graphs that are not necessarily regular, Miller at al. [16] proved the following result.
There exists a distance magic labeling of the complete multipartite graph K a1,a2,...,ap if and only if the following conditions hold.
Theorem 3.1. [13,23] Every graph is a subgraph of a distance magic graph.
Every graph H is an induced subgraph of a regular distance magic graph.
There is no forbidden subgraph characterization for distance magic graph.
In the following theorem we obtain a stronger version of Theorem 3.2. The result and its proof were communicated to the first author by Rao [20].
Theorem 3.4. Given any graph H there is an Eulerian distance magic graph G with chromatic number same as that of H such that H is an induced subgraph of G.
Proof. First we prove that H can be embedded as an induced subgraph of an rregular graph G of degree r = ∆(H) such that χ(G) = χ(H). Let  Proof. The problem of deciding whether the chromatic number χ(H) is less than or equal to k, where k ≥ 3 is NP-complete ( [9], Page 191). Now, given an instance (H, k) for the chromatic number problem, Theorem 3.4 gives an Eulerian distance magic graph G such that χ(G) = χ(H). Hence the instance (H, k) has YES answer for the chromatic number problem if and only if the corresponding problem has YES answer for the instance (G, k). Hence the result follows.

Graphs which are not Distance Magic
In this section we present several families of graphs which are not distance magic. We start with following simple observation given in [13,23] which is very useful in this regard.      Lemma 4.7. [16] Let G be a graph on n vertices with maximum degree ∆ and minimum degree δ. If ∆(∆ + 1) > δ(2n − δ + 1) then G does not have a distance magic labeling.
[6] Let n be odd, k ≡ r ≡ 2 (mod 4), and G be an r-regular graph with k vertices. Then G[K n ] is not distance magic.

Distance Magic Labeling and Cartesian Product
Jinnah [13] has proved that P n ✷C 3 and P n ✷C 4 are not distance magic graphs by using Theorem 4.1. Hence the following problem arises naturally.
Problem 5.1. If G and H are two graphs, is the Cartesian product G✷H distance magic?
Rao [18] answered the above problem when G and H are both cycles or both complete graphs by proving the following sequence of results.
[18] C n ✷C k , n, k ≥ 3 is a distance magic graph if and only if n = k ≡ 2(mod 4).
Beena [2] proved the following theorem regarding Cartesian products of graphs with minimum degree 1.

Theorem 5.4. [2]
The product of paths P n ✷P k is not a distance magic graph.

Distance Magic Labelings of Bi-regular Graphs
A generalization of magic rectangles is useful in constructions of distance magic graphs with vertices of two different degrees. The results below were introduced by Sugeng et al. [22] with the use of Kotzig arrays (see [14]) and lifted Kotzig arrays, which are a generalization of magic rectangles. We use their idea to introduce a lifted magic rectangle, which in turn is a special case of the lifted Kotzig array. Definition 6.1. A lifted magic rectangle LM R(a, b; l) is an a × b matrix whose entries are elements of {l + 1, l + 2, . . . , l + ab}, each appearing once, such that the sum of each column is σ(a, b; l) = 1 2 a(ab + 2l + 1) and the sum of each row is τ (a, b; l) = 1 2 b(ab + 2l + 1).
Consider LM R(a, b; 0) and a p-regular graph H which has n ′ vertices with . , x b } and V 2 = {y 1 , y 2 , . . . , y d } form a partition of V (H).
Denote by G = H[b×a, d×c] a graph arising from H by expanding each vertex x i ∈ V 1 (H) into a set X i of a independent vertices {x i1 , x i2 , . . . , x ia } and similarly expanding each y j ∈ V 2 (H) into a set of c independent vertices {y j1 , y j2 , . . . , y jc }. Further every edge x i x j between two vertices of V 1 (H) will be replaced by a 2 edges of K a,a while every edge y i y j between two vertices of V 2 (H) will be replaced by c 2 edges of K c,c . Also any edge x i y j between a vertex in V 1 (H) and a vertex in V 2 (H) will be replaced by ac edges of K a,c . Denote V 1 (G) = X 1 ∪ X 2 · · · ∪ X b and  Then G is a distance magic graph.

Fair and handicap incomplete tournaments
So far we were looking at problems that can be in general stated as follows: For a given class of graphs Γ(n, r, . . . ), find all values of parameters (n, r, . . . ) for which a graph G ∈ Γ allows distance magic labeling f . Most typical parameters were the number of vertices n and regularity r. We have seen above that for any given family Γ(n, r) the spectrum of values of (n, r), for which the graphs are distance magic, can be very sparse. However, sometimes we do not need a particular class of graphs, but rather just any graphs with a distance magic vertex labeling for a given pair (n, r).
Although the problem seems to be too random, there is a real life motivation in sports tournament scheduling. Suppose we want to schedule a one-divisional tournament, but do not have enough time to play the complete round robin tournament. What format should we select? We want to schedule a fair incomplete round robin tournament with the following properties: (1) Every team plays the same number of opponents.
(2) The difficulty of the tournament for each team mimics the difficulty of the complete round robin tournament.
Condition 2 can be justified as follows. If we know the strength of each team based on team standings in the previous year, the teams can be ranked from 1 to n. Based on their rankings, we can define the strength of the i-th ranked team (or just team i for short) in a tournament with n teams as s n (i) = n + 1 − i. The total strength of opponents of team i in a complete round robin tournament is then defined as S n,n−1 (i) = n(n + 1)/2 − s n (i) = (n + 1)(n − 2)/2 + i. We observe that the total strengths form an arithmetic progression with difference one. Therefore, we want the total strengths of opponents for respective teams in our incomplete tournament to form such a progression as well. In general, we want to find a tournament of n teams with each team playing k games in which the total strength of opponents of the i-th ranked team is S n,k (i) = (n + 1)(n − 2)/2 + i − m for some integer m.
Obviously, this is equivalent to finding the set of games that are left out of the complete tournament with the property that the total strength of opponents in the n − k − 1 left out games, S * n,n−k−1 (i), is equal to some constant m for every team i.
A fair incomplete tournament of n teams with k rounds, FIT(n, k), is a tournament in which every team plays k other teams and the total strength of the opponents that team i plays is S n,k (i) = (n + 1)(n − 2)/2 + i − m for every i and some fixed constant m. The total strength of the opponents that each team misses is then equal to m. Hence, we can view the games that are not played as a complement of FIT(n, k), which is itself an incomplete tournament. In an equalized incomplete tournament of n teams with r rounds, EIT(n, r), every team plays exactly r other teams and the total strength of the opponents that team i plays is S * n,r (i) = m for every i. Notice that EIT(n, n − k − 1) is the complement of FIT(n, k). Therefore, a FIT(n, k) exists if and only if an EIT(n, n − k − 1) exists.
One can notice that finding an EIT(n, r) is equivalent to finding a distance magic labeling of any r-regular graph on n vertices. We also observe that the complementary FIT(n, n − r − 1) is a distance antimagic graph.
Definition 7.1. A distance k-antimagic labeling of a graph G(V, E) with n vertices is a bijectionf : V → {1, 2, . . . , n} with the property that there exists an ordering of the vertices of G such that the sequence of the weights w(x 1 ), w(x 2 ), . . . , w(x n ) forms an arithmetic progression with difference k. When k = 1, thenf is called just distance antimagic labeling. A graph G is a distance k-antimagic graph if it allows a distance k-antimagic labeling, and distance antimagic graph when k = 1.
The weight w(x) of a vertex x in a FIT(n, k) or EIT(n, r) is equal to S n,k (x) or S * n,r (x), respectively. In the language of distance magic graphs, our observation can be stated as follows.
Observation 7.2. If G is distance magic, then complement G is distance antimagic.
It follows from Corollary 2.7 that if G is an r-regular distance magic graph, then r is even. The remaining feasible values of r for r-regular distance magic graphs with an even number of vertices were found in [6].
For graphs with an odd number of vertices, the existence question of regular distance magic graphs was partially answered in [4].
Theorem 7.4. [4] Let n, q be odd integers and s an integer, q ≥ 3, s ≥ 1. Let r = 2 s q, q | n and n ≥ r + q. Then an r-regular distance magic graph of order n exists.
When the maximum odd divisor of r does not divide n, somewhat weaker result can be proved.
Theorem 7.5. [4] Let n, q be odd integers and s an integer, q ≥ 3, s ≥ 1. Let r = 2 s q, q ∤ n and n ≥ 7r + 4 2 . Then an r-regular distance magic graph of order n exists.
The proofs are based on an application of magic rectangles. Although the fair incomplete tournaments mimic the structure of the complete round-robin tournaments, they in fact favor the highest ranked team, because the total strength of its opponents, S n,k (1), is the lowest. Even in an equalized tournament the highest ranked team has the best chance of winning, because all teams face opponents with the same total strength. If we want to give all teams roughly the same chance of winning, we need to schedule a tournament with handicaps.
A handicap incomplete tournament of n teams with k rounds, HIT(n, k), is a tournament in which every team plays k other teams and the total strength of the opponents that team i plays is S h n,k (i) = t − i for every i and some fixed constant t. This means that the strongest team plays strongest opponents, and the lowest ranked team plays weakest opponents. In terms of distance magic graphs this restriction corresponds to finding a distance antimagic graph with the additional property that the sequence w(1), w(2), . . . , w(n) (where team i is again the i-th ranked team) is an increasing arithmetic progression with difference one. We call this special case ordered distance antimagic graphs. The notions were introduced by Froncek in [5].
Definition 7.6. An ordered distance antimagic labeling of a graph G(V, E) with n vertices is a bijection f : V → {1, 2, . . . , n} with the property that f (x i ) = i and the sequence of the weights w(x 1 ), w(x 2 ), . . . , w(x n ) forms an increasing arithmetic progression with difference one. A graph G is an ordered distance antimagic graph if it allows an ordered distance antimagic labeling.
Notice that this is an inverse ordering compared with the ordering of labeled vertices in a complete distance antimagic graph, or any distance magic graph which is a complement of a regular magic graph. There we have w(1) > w(2) > · · · > w(n), while in a graph with an ordered distance antimagic labeling we have w(1) < w(2) < · · · < w(n).
So far, only a sparse class of graphs is known to allow an ordered distance antimagic labeling.
[5] Let a, b be positive integers such that a, b > 1, ab > 4, and a ≡ b (mod 2). Let n = ab and d = n − a − b + 1. Then there exists a d-regular ordered distance antimagic graph with n vertices.
A proof of Theorem 7.7 is based on magic rectangles. Recall that by Theorem 2.3 an a × b magic rectangle exists when the assumptions of Theorem 7.7 on a and b are satisfied.
R ij be an a × b magic rectangle with row sums s and column sums t. The labelinḡ f (v ij ) = r ij is obviously a distance 2-antimagic labeling, for whenf (v ij ) = r ij = q, then w G (v ij ) = s + t − 2q. Hence, the following observation holds.
The proof of Theorem 7.7 then follows easily. We show that G, the complement of G, has an ordered antimagic labeling f . We define The values of q are 1, 2, . . . , n and G has an ordered antimagic labeling.

Matrix Representation
if a ij = 1.
We observe that the matrix A f is not symmetric. Also the matrix A f is obtained from the adjacency matrix A by multiplying the i th column of A by f (v i ) for i = 1, 2, . . . , n.
Further, if f is a distance magic labeling of G with magic constant k, then k is an eigenvalue of the matrix A f . It is worth investigating whether the matrix A f has any further property when f is a distance magic labeling of G.

Some Variants of Distance Magic Labelings
Acharya et al. [1] studied a variant of distance magic labeling in more general way, which they called neighborhood magic graph.
[2] If a graph G has a path (u, v, w, t) of length 3, where deg(v) = deg(w) = 2, then G cannot be a c graph. In particular, if C n is a component of a c graph, then n ≤ 3.
Theorem 9.15. [2] Every graph H is an induced subgraph of a regular c graph.

Conjectures and Open Problems
We present several open problems and conjectures on distance magic graphs. There exists a distance magic labeling of the complete multipartite graph K a1,a2,...,ap if and only if the following conditions hold.

Conjecture 10.2. [22]
If G is a distance magic graph different from K 1,2,2,...,2 then the vertex set V can be partitioned into sets V 1 , V 2 , . . . , V p such that for each i, has |V i | > 1 and V i is independent. Problem 10.6. Does there exist a distance magic graph whose magic constant is a power of 2?
Problem 10.7. Does there exist an r-regular distance magic graph with n vertices where n is odd and r is a power of 2?
Problem 10.8. Does there exist a distance magic graph with two different distance magic labelings having different magic constants? Conjecture 10.9. [1] For any even integer n ≥ 4, the n-dimensional hypercube Q n is not a distance magic graph.

Revision Note
Since the presentation of this paper in IWOGL 2010 by the first author, several researchers have made significant contributions towards solving some of the problems and conjectures stated above. Kovar et al. [15] have proved the existence of 4-regular distance magic graphs with magic constant k = 2 t for every integer t ≥ 6, thus solving Problem 10.6. They have also obtained an affirmative answer for Problem 10.7. O'Neal and Slater [17] have proved the uniqueness of the magic constant by generalizing the problem to D-vertex magic labeling where D ⊆ {0, 1, 2, . . .} and by showing that the D-vertex magic constant is unique and can be determined by the fractional domination number of the graph, thus solving Problem 10.8. Arumugam and Kamatchi have obtained the following much simpler and elegant proof for the uniqueness of the magic constant.
Theorem 11.1. For any distance magic graph G, the distance magic constant is unique.
Proof. Let G be a graph of order n with V (G) = {v 1 , v 2 , . . . , v n } and having two distance magic labelings f and g. Let k, l be the respective magic constants. Let A be the adjacency matrix of G. Let u be the vector with n entries each of which is equal to 1. Let x = (f (v 1 ), f (v 2 ) . . . , f (v n )) and y = (g(v 1 ), g(v 2 ), . . . , g(v n )). Since f and g are distance magic labelings with magic constants k and l respectively, it follows that xA = ku and yA = lu. Since xAy T is a 1 × 1 matrix, we have the following chain of implications: xAy T = (xAy T ) T = yAx T ⇒ ku y T = lu x T ⇒ k(1 + 2 + · · · + n) = l(1 + 2 + · · · + n) ⇒ k = l.
Thus the magic constant is unique.