HAMMING INDEX OF THORN AND DOUBLE GRAPHS

  Bulletin of Mathematics

  ISSN Printed: 2087-5126; Online: 2355-8202

Vol.10, No.01 (2018), pp. 25–32 https://talenta.usu.ac.id/index.php/bullmath

HAMMING INDEX OF THORN AND DOUBLE

GRAPHS

Abstract.

Revi Pasaribu, Mardiningsih and Saib Suwilo

  Hamming distance between two bit strings u and v is defined to be

the number of position with different digit. Let G be a graph with vertex set

V , v , . . . , v

= {v n } and A be an adjacency matrix of G. Then each row of A is

1 2

a bit string of length n. Hamming distance between two vertices v and v is the

i j

Hamming distance of ith and jth rows of A. We discuss the Hamming distance

and the sum of Hamming distances of vertices for some composite graphs. Keywords: Hamming distance, Hamming index, thorn graphs, doble graphs.

  1. INTRODUCTION

  n

  Let K = {0, 1} and K = K × K × · · · × K be a group with binary operation x ⊕ y = x + y mod 2

  2 n n

  for all x, y ∈ K . Each x ∈ K is called a binary word of length n. For

  n

  x ∈ K the weight of x, denoted by wt(x), is the number of times of digit 1 appears in x. Let x = x x · · · x n and y = y y · · · y n be two binary words in

  1

  2

  1

  2 n

  K where x i = 0, 1 and y i = 0, 1 for i = 1, 2, . . . , n. The Hamming distance between x and y, denoted by H (x, y), is the number of position i where

  d Received 19-02-2018, Accepted 27-03-2018. Revi Pasaribu et al. – Hamming Indeks of Composite

  x 6= y

  

i i . The Hamming distance between x and y can also be defined by

  H y d (x, y) = wt(x ⊕ ) [1].

  2

  , v , . . . , v Let G(V, E) be a finite simple graph on n vertices {v n } and

  1

  2

  m edges. The vertex v i is adjacent to v j if there is an edge connecting v i and v j . The neighbor of a vertex v i in G, denoted by N (v i : G), is the set of all vertices adjacent to v i . The degree of a vertex v i in G, denoted by deg(v i : G), is the number of vertex in N (v i : G). For a pair of distinct vertices v i and v j in G the common neighbor of v i and v j , denoted by N (v , v : G) is the set of all vertices adjacent to both v and v . We note

  i j P i j that deg(v i : G) = 2m [2]. v ∈V (G) i

  One derivation of binary words is the adjacency matrix of a graph G, i.e., the n by n (0, 1) matrix A = (a ) defined by (

ij

  1, if v i adjacent to v j a

  ij =

  0, otherwise, By considering the adjacency matrix A of G, the Hamming distance between two vertices of G can be defined as follows. Let A be an adjacency matrix of the graph G and let A(i, :) denote the ith row of A. The Hamming distance between v i and v j in G, denoted by H (v i , v j ), is defined to be

  

d

  H , v

  d (v i j ) = H d (A(i, :), A(j, :) = wt(A(i, :) ⊕ A (j, :)).

  2 Imitating the Wiener index of graph as the sum of distances between two

  vertices, the Haming index of a graph G, denoted by H(G), is defined to be P H H , v

  (G) = d (v i j ). [5, 6]

  v ,v ∈V (G),i6=j i j

  Research on Hamming distance and Hamming index of a graph G based on its adjacency matrix can be found in [5, 6]. In [5], Ganagi and Ramane show a formula for Hamming distance in terms of the size of the graph and neighbors of the vertices. In [5, 6], the Hamming index of some classes of graphs such as complete graph, regular graph, union and joint of graph have been found.

  In this paper, we present a formula for Hamming distance between two vertices in terms of their degrees and neighbors. Based on this formula we then discuss the Hamming index of thorn graphs and double graphs.

  2. HAMMING DISTANCE BETWEEN VERTICES

  Revi Pasaribu et al. – Hamming Indeks of Composite

  for Hamming distance between two vertices. They provided a formula of Hamming distance that depends on the size of the graph, and the number of neighbor vertices. We present a formulation of Hamming distance that depends on the degree of each vertex and their common neighbor.

  Theorem 2.1

  Let G be a graph on n vertices v , v , . . . , v n . Let v i and

  1

  2

  v be two vertices in G with k common neighborhood. Then H , v

  j d (v i j ) = deg(v i ) + deg(v j ) − 2|N (v i , v j : G)|.

  

Proof. We note that deg(v i ) the number of 1 in s(v i ). Since v i and v j have

  k , v common neighborhoods, then A(i, :) and A(j, :) has exactly N (v i j : G) ones that lie on the same positions. This implies

  H , v A

  d (v i j ) = wt(A(i, :) ⊕ (j, :))

  2

  = wt(A(i, :)) + wtwt(A(j, :)) − 2|N (v i , v j : G)| , v = deg(v i ) + deg(v j ) − 2|N (v i j : G)|.

  3. HAMMING INDEX In this section we discuss the Hamning index of some classes of com- posite graphs, especially, the thorn graphs and the double graphs. Let G be a connected graph on n vertices {v , v , . . . , v n }. The thorn

  1

  2 ∗

  , p , . . . , p graph G with parameter (p n ) is the graph obtained form G by

  n

  1

  2

  inserting p i pendant vertices to v i for each i = 1, 2, . . . , n [3]. We note

  ∗ ∗

  that the vertex set of the thorn graph G can be partitioned into V (G ) =

  n n

  V (G) ∪ V (G) such that

  V (G) = V ∪ V ∪ . . . ∪ V n

  1

  2

  where

  ∗

  V

i = {u j ∈ V (G) : u j ∈ N (v i : G )}.

  n ∗

  Theorem 3.2

  Let G be a connected graph on n vertices and let G be the n thorn graph of G with parameter (p , p , . . . , p ). Then

  1 2 n X X

  2 H p p p .

  (G ) = H(G) + 2mn − 4m + n + (2n − 1) i + 2 i j

  n i i 6=j

  Revi Pasaribu et al. – Hamming Indeks of Composite

Proof. , v , . . . , v } and V (G) = {u , u , . . . , u } where

P

  Let V (G) = {v

  1 2 n

  1 2 r

  r p = i . Then

  i X X

  H H , v H , u (G ) = d (v i j ) + d (v i j )

  n v ,v i j ∈V (G) X v i ∈V (G),u j ∈V (G)

  • H (u i , u j ). (1)

  d u ,u i j ∈v(G) P

  H , v We first determine d (v i j ). We note that for each vertex

  v ,v ∈V (G) i j ∗ ∗

  v ∈ V (G), we have that deg(v , v

  

i i : G ) = deg(v i : G)+p i and N (v i j : G ) =

n n

  N (v i , v j : G). This implies for any two distinct vertices v i , v i ∈ V (G) we have

  ∗ ∗ ∗ ∗

  H (v i , v j ) : G ) = deg(v i : G ) + deg(v j : G ) − 2|N (v i , v j : G )|

  

d n n n n

  = deg(v i : G) + p i + deg(v j : G) + p j − 2|N (v i , v j : G)| , v . = H d (v i j : G) + p i + p j

  Therefore X X H , v H , v

  d (v i j ) = d (v i j : G) + p i + p j v ,v v ,v i j ∈V (G) i j ∈V (G) X p .

  = H(G) + (n − 1) i (2) P i We now determine H (v i , u j ). We note that for a

  d v i ∈V (G),u j ∈V (G)

  fixed v i ∈ V (G) and a fixed u j ∈ V (G) we have

  ∗ ∗ ∗ ∗

  H , u , u

  

d (v i j : G ) = deg(v i : G ) + deg(u j : G ) − 2|N (v i j : G )|

n n n n ∗

  , u = deg(v i : G) + p i + 1 − 2|N (v i j : G )|.

  n

  ∈ V (G), then u ∈ V We note that since u j j j for some j. This implies

  ∗

  u j is adjacent to v j . If v j ∈ N (v i : G), then N (v i , u j : G ) = v j and if

  n ∗

  v 6∈ N (v , u

  j i : G) then N (v i j : G ) = ∅. Therefore, ( n

  deg(v i : G) + p i − 1 if v j ∈ N (v i : G)

  ∗

  H , u

  d (v i j : G ) =

  (3)

  n

  6∈ N (v Revi Pasaribu et al. – Hamming Indeks of Composite

  ∈ V (G), we have This implies for a fixed v i X X

  ∗ ∗

  H , u H , u

  d (v i j : G ) = d (v i j : G ) n n

v

j ∈N (v i :G) u j ∈v(G) X

  • H d (v i , u j : G )

  n v j 6∈N (v i :G)

  By considering (3) we have X X

  ∗

  H , u

  d (v i j : G ) = deg(v i : G) + p i − 1 n v j ∈N (v i :G) u j ∈v(G) X

  • deg(v i : G) + p i + 1

  v j 6∈N (v i :G)

  Simplifying, for a fixed v i ∈ V (G) we have X

  ∗

  H (v , u : G ) = deg(v : G)(deg(v : G) + p − 1)

  d i j i i i n u ∈v(G) j

  • (n − deg(v i ))(deg(v i : G) + p i + 1) = n(deg(v i : G) + p i + 1)

  − 2 deg(v i : G). (4) From (4) we now have X

  ∗

  H (v , u ) : G )

  d i j n v i ∈V (G),u j ∈V (G) X

  n = (deg(v i : G) + p i + 1) − 2 deg(v i : G)

  v i ∈v(G) X

  

2

  = 2mn + n p i + n − 4m. (5)

  i P

  H , u , u Finally, we consider the sum d (u i j ). If u i j ∈ V k for

  u ,u ∈v(G) i j ∗ ∗

  , u , u some k, then |N (u i j : G )| = 1. This implies H d (u i j : G ) = deg(u i :

  n n ∗ ∗ ∗

  G )+deg(u j : G )−2|N (u i , u j : G )| = 1+1−2 = 0. If u i ∈ V i , u j ∈ V j , then

  n n n

∗ ∗ ∗

  , u , u |N (u i j : G )| = 0. This implies H d (u i j : G ) = deg(u i : G ) + deg(u j :

  

n n n

  Revi Pasaribu et al. – Hamming Indeks of Composite ∗ ∗

  G , u ) − 2|N (u i j : G )| = 1 + 1 − 0 = 2. Therefore, we now have

  n n X X

  H d (u i u j ) = H d (u i , u j ))

  u ,u u ,u i j ∈v(G) i j ∈v(G),i6=j X p p .

  = 2 i j (6)

  i 6=j

  Considering (1), (2), (5), and (6) we now conclude that if G is a con- nected graph, then X X

  ∗

  2 H (G ) = H(G) + 2mn − 4m + n + (2n − 1) p i + 2 p i p j . n i i

  6=j

  We now discuss the Hamming index of a double graph. Let G be a , v , . . . , v connected graph with vertex set V (G) = {v n }. A double graph

  1

  2 ∗ ∗ ∗

  G is a graph obtained from G as follows. The vertex set of G is V (G ) = X , x , . . . , x , y , . . . , y

  ∪ Y where X = {x n } and Y = {y n }. The edges

  1

  2

  1

  2 ∗

  {x , x }, {y , y }, {x , y }, and {y , x } are edges of G if and only if {v , v }

  

i j i j i j i j i j

is an edge of G [4].

  ∗ ∗

  , y We note that for any vertex x i i ∈ G , we have deg(x i : G ) = deg(y ) = 2 deg(v : G). Moreover, for any two distinct vertices x , x ∈ X,

  i i i j ∗

  , x , v , y we have |N (x i j : G )| = 2|N (v i j : G)|. Similarly, we have |N (y i j :

  ∗ ∗

  G , v , y , v )| = 2|N (v i j : G)| and |N (x i j : G )| = 2|N (v i j : G)|. Furthermore,

  ∗ |N (x i , y i : G )| = 2|N (v i : G)|.

  ∗

  Theorem 3.3

  Let G be a connected graph and G be the double graph ob-tained from G. Then H (G ) = 8H(G).

  Proof.

  Notice that X

  ∗

  H H , u (G ) = d (u i j )

  u ,u i j ∈V (G ) X X

  H , x H , y = d (x i j ) + d (y i j )

  x i ,x j ∈X y i ,y j ∈Y X H , y

  • d (x i j ). (7)

  x ∈X,y ∈Y i j Revi Pasaribu et al. – Hamming Indeks of Composite

  For any pair of vertices x i , x

  j : G ∗

  j : G) = 4H(G).

  , v

  i

  (v

  d

  2H

  

i<j

  ) = 2 X

  , y

  ∗

  d (x i

  H

  

i<j

  ) = 2 X

  j : G ∗

  , y

  d (x i

  H

  i 6=j

  Notice that when i = j, we have |N (x i , y i : G

  )| = 2|N (v i : G)| = 2 deg(v i : G). Therefore, if i = j H

  i : G) = H d (y j

  : G) + 2 deg(v

  j : G ∗

  , y

  d (x i

  H

  i =j

  This implies X

  i : G) = 0.

  : G) − 4 deg(v

  i

  i

  d (x i

  )| = 2 deg(v

  i : G ∗

  ) − 2|N (x i , y

  ∗

  ) + deg(y i : G

  ∗

  ) = deg(x i : G

  i : G ∗

  , y

  , x i ). This implies X

  , v

  j

  )| = 2 deg(v i : G) + 2 deg(v j : G) − 4|N (v i , v j : G)| = 2(deg(v i : G) + 2 deg(v j : G) − 2|N (v i

  d

  H

  x i ,x j ∈X

  Hence X

  d (v i , v j : G).

  = 2H

  j : G)|)

  , v

  j : G ∗

  v i ,v j

∈V (G)

  ) − 2|N (x i , x

  ∗

  ) + deg(x j : G

  ∗

  ) = deg(x i : G

  j : G ∗

  , x

  d (x i

  ∈ X, we have H

  (x i , x j ) = X

  2H

  j : G) = 2H d (v j

  ∈ Y . If i 6= j, then we have H

  , v

  )| = 2H d (v i

  ∗

  ) − 2|N (x i , y j : G

  ∗

  ) + deg(y j : G

  ∗

  (x i , y j ) = deg(x i : G

  d

  j

  d

  ∈ X and y

  2H d (v i v j : G) = 2H(G). (9) We now consider pair of vertices x i

  v i ,v

j ∈V (G)

  H d (y i , y j ) = X

  y i ,y j ∈Y

  have X

  j ∈ Y we

  , y

  (v i , v j : G) = 2H(G). (8) A similar argument show that for any pair of vertices y i

  ) = 0. Hence we now conclude that Revi Pasaribu et al. – Hamming Indeks of Composite

  From (7), (8), (9), and (10) for a connected grap G the Hamming index

  ∗ ∗ of double graph G is H(G ) = 8H(G).

  

REFERENCES

1. D.C. Hankerson, G. Hoffman, D.A. Leonard, Charles C. Lindner, K.T.

  Phelps, C.A. Rodger, J.R. Walloding Theory and Cryptography: The Es-

  sentials , Chapman & Hall/CRC (2000).

  2. B. Korte and J. Vygen, Combinatorial Optimization: Theory and Algo- rithms , Bonn: Springer (2006).

  

3. K. M. Kathiresan and C. Parameswaran Certain generalized thorn graphs

  and their Wiener Indices, J. Applied Math. & Informatics, 30 (5-6),(2012), 793–807.

  

4. N. De, A. Pal,and Sk. Md. Abu Nayeem, The irregularity of composite

graphs, Int J. Appl. Comput. Math. 2, (2006), 411–420.

  5. A. B. Ganagi and H.S. Ramane, Hamming distance between string gener-

  ated by adjacency matrix of a graph and their sum, Algebra and Discrete

  Mathematics , 22 (1), (2006), 82–93.

  6. H. S. Ramane and A. B. Ganagi, Hamming index of a class of graphs, In- ternational Journal of Current Engineering and Technology

  , Special Edi- tion 1, (2013), 205–208.

  Revi Pasaribu : Department of Mathematics, Universitas Sumatera Utara, Medan 20155 -Indonesia.

  Mardiningsih : Department of Mathematics, Universitas Sumatera Utara, Medan 20155 -Indonesia.

  Saib Suwilo : Department of Mathematics, Universitas Sumatera Utara, Medan 20155 -Indonesia.

  E-mail: [email protected]