Abstract
Apart from other labeling signed product and total signed product labeling already have been applied on different kind of graphs. Signed product cordial labeling for the graph G = (V, E), where each vertex is labelled by 1 or -1 and edge label is induced by multiplication of two of it end vertices with the following restriction that the absolute difference between total number of vertices labelled by 1 and -1 is at most 1, similarly for the edges also. Total signed product cordial labeling follows property that absolute difference between total number of vertices and edges labelled by -1 and total number of vertices and edges labelled by 1 is at most 1. In this paper, we have considered Cartesian product between two balanced bipartite graphs and apply above labeling on it. We have designed some suitable algorithms which will driven by any kind of computer programming language. Illustration with example and complexity of the algorithms are analysed successfully.
Keywords
Introduction
Graph labeling is a modified form of vertex coloring problem which was introduced by A. Rosa [17] in 1967. Gallian [1] has done a precious work on graph labeling along with different applications. Hegde [3] described labeling problem by considering a set of values from which the labels are taken under a confined environment and some rules are impose by which each edges are label. Beineke and Hegde [4] explain graph labeling as a combination of graph theory and number theory. Griggs and Yeh [2] worked in different direction of graph labeling although their contribution can not be avoided.
Graph labeling scheme has already been appiled on so many needful area. I. Cahit [5–15] bring the idea of cordial labeling from both graceful [17] and harmonious [16] labelings. Cahit [6] also proved there exist some graphs which are cordial graphs.
Signed product cordial labeling is also a modified part of cordial labeling which was initiated by J. Baskar Babujee [18] and he claims that there exist few graphs where signed product cordial labeling can be use. This concept further explored by so many researchers like P.P. Ulaganathan et al. [19], Santhi. M [21] and Santhi. M et al. [20, 22] etc. Vaidya and Shah [23, 24] have applied cordial labeling on snake graph and bi-star graph. Some more important works also been done in this labeling which was applied on some simple graphs, on some new types of complex graphs. Here we consider a complex graph structure which was obtained by doing Cartesian product between two balanced bipartite graph i.e G = Kn,n × Kn,n. Few realistic work done by Amanthulla et al. [25, 26] on different labeling which may lead to introduce a new direction to this labeling realm.
Traditional network are very complex and global in nature, where each node is connected with all other nodes so that it can accessed for full information at any time apart from failure of one or more nodes. Social networks and others hybrid network are complex due to large number of base users, so graph labeling of such networks become very hard. In our considering graph structure we carefully investigate the complex structure to a simple pattern then proceed for labeling. Solving of complex structure in a simple way can give us a new direction of research. Here we design an algorithm of cordial labeling for the graph obtained by Cartesian product between two balanced bipartite graph and analyse the time complexity also.
The remaining work of the paper is presented as Section explain some related definition and lemma. Section 3 describe the main portion of the work and its contains three algorithms, analysis of algorithm and correctness of each algorithm.
Preliminaries
u = v and u′ and v′ are adjacent in G′, or
u′ = v′ and u and v are adjacent in G.
A complete bipartite graph with |V1| = m and |V2| = n is denoted by Km,n. A complete bipartite graph is called balanced bipartite graph when |V1| = |V2| = n and denoted by Kn,n.
According to the figure. 2, to draw the graph G = Km,n × Kp,q, we consider p number of Km,n at left and q number of Km,n at right. To make it more clear we consider that left hand side contains X = {X1, X2, X3, …, X i , …, X m } and Y = {Y1, Y2, Y3, …, Y i , …, Y m } where X1 = {x11, x12, x13, …, x1m}, X2 = {x21, x22, x23, …, x2m}, and X p = {xp1, xp2, xp3, …, x pm } and Y1 = {y11, y12, y13, …, y1n}, Y2 = {y21, y22, y23, …, y2n}, and Y p = {yp1, yp2, yp3, …, y pn }. Right hand side contains U = {U1, U2, U3, …, U j , …, U n } and V = {V1, V2, V3, …, V j , …, V n } where U1 = {u11, u12, u13, …, u1m}, U2 = {u21, u22, u23, …, u2m}, and U q = {uq1, uq2, uq3, …, u qm } and V1 = {v11, v12, v13, …, v1n}, V2 = {v21, v22, v23, …, v2n}, and V q = {vq1, vq2, vq3, …, v qn }.
In preliminaries section we have discussed about the graph obtained by Cartesian product between two complete bipartite graphs i.e G = Km,n × Kp,q. To implement the labeling algorithmically we considered two balanced bipartite graph Kn,n,where each Kn,n contain two set of vertices X i and Y i for i = 1, 2, 3, . . . , n and |X i | = |Y i | = n where the vertices are connected according to the rule of balanced bipartite graph. The set X i has n vertices and the vertices are X i = {xi1, xi2, xi3, . . . x ip , . . . , x in } similarly Y i = {yi1, yi2, yi3, . . . , y ip , . . . , y in }. Remaining already discussed in details in the preliminaries section.
Algorithm
To label the graph G = K n,n × Kn,nby signed product and total signed product cordial labeling, we consider a matrix V label [n2] [4] to store the vertex label having n2 row and 4 column. In this algorithm we store the label in the matrix V label because Vertex matrix V (Kn,n × Kn,n) mapped in the matrix V label .
1: Input: Graph G = Kn,n × K n,n
2: Output:Vertex labelled graph G = Kn,n × Kn,n.
3: Initialization: V label [n2] [4]
4:
5:
6:
7: V label [i] [j] = -1
8:
9:
10: V label [i] [j] = -1
11:
12:
13:
The proof of correctness of the algorithm is given below
Time complexity of Algorithm
Algorithm used two loops, outer loop run upto n where as inner loop run upto 4 times for each encounter of outer loop. So time complexity of the algorithm is ○ (n2).
Algorithm
As it is clear that the graph G = Kn,n × Kn,n has two type of connection one is intra connection and other is inter connection. Intra connection means the connection of vertices within a balanced bipartite graph and inter connection means connection among the balanced bipartite graph (see Fig. 1). Here we present two algorithm of extracting edge labeling from the matrix V label [n2] [4] one for intra connection and other for the inter connection edge.

Km,n × Kp,q

Simplified Figure of Km,n × Kp,q
To write the algorithm for extracting edge labeling from intra connection, we consider the matrix Eeach-copy-edge-label [n] [n] to store the edge labeling and assume that vertex label of the each copy is stored in the matrix Veach-copy-vertex-label [n] [2]. Here we design the algorithm for a single copy of Kn,n.
1: Input: The vertex label matrix Veach-copy-vertex-label [n] [2].
2: Output: Edge label matrix for intra connection vertices Eeach-copy-edge-label [n] [n].
3: Initialization: Eeach-copy-edge-label [n] [n],a,m
4:
5: a = Veach-copy-vertex-label [i] [1].
6:
7: m = a * Veach-copy-vertex-label [j] [2].
8: Eeach-copy-edge-label [i] [j] = m.
9:
10:
Time Complexity of Algorithm
Time complexity of the algorithm is ○ (n3), as here we have used three loops. We can see in the algorithm that one outer most loop k run 2n times and within this loop two more inner loops run here and both the loops run n times.
As we have 2n copies of Kn,n in the graph G = Kn,n × Kn,n so the corresponding edge label matrix will be
It is clear from the above matrix that all the elements of intra connected matrix is -1 and total number of elements are 2n3
Algorithm
Here we design the algorithm of extracting edge label from the inter connected vertices from the matrix V label [n2] [4] and store it to the edge label matrix, which is ICM [n2] [2n]. To implement the algorithm we consider matrices MX temp [n] [2] and MY temp [n] [2] to store the each similar position label from each copy of either side copy of Kn,n. Similar position means we take each first element from each copy of Kn,n (see fig. 1) from set X of left and right side and stored it to MX temp [n] [2] and from set Y of left and right side and stored it to MY temp [n] [2] then pick second element from each copy similarly. So, for G = Kn,n × Kn,n we have n such copies of MX temp [n] [2] and MY temp [n] [2].
1: Input: Vertex label matrix V label [n2] [4].
2: Output: Edge label matrix ICM [n2] [2n].
3: Initialization:ICM [n2] [2n].
4: Initialization: MX temp [n] [2] , MY temp [n] [2]
5:
6:
7: MX temp [i] [1] = V label [j + (i - 1) n] [1].
8: MX temp [i] [2] = V label [j + (i - 1) n] [3].
9: MY temp [i] [1] = V label [j + (i - 1) n] [2].
10: MY temp [i] [2] = V label [j + (i - 1) n] [4].
11: Call algorithm .
12:
13:
The proof of correctness of the algorithm 3 is given below
Time complexity of Algorithm 3
Time complexity of algorithm 3 is ○ (n2) as it contains one inner loop.
It is clear that all the elements of matrix MX
temp
[n] [2] is -1 and MY
temp
[n] [2] is 1. So, edge labeling matrix of such matrices always gives 1 as elements. Edge label matrix of inter connected vertices is shown in the matrix below.
It is clear from the above matrix that all the elements of intra connected matrix is 1 and total number of elements are 2n3.
Illustration
To demonstrate the above algorithms we consider a graph G = K3,3 × K3,3 (see the Fig. 3) for signed product and total signed product cordial labeling. From lemma 1 we know that degree of each vertex in the graph G = K3,3 × K3,3 is 6 and from lemma 2 it is also clear that total number vertices in the graph G = K3,3 × K3,3 is 36.

Cartesian product K3,3 × K3,3
For this graph G = K3,3 × K3,3 we consider the matrix V
label
[9] [4]to store the vertex label matrix and by following the algorithm we got
From the algorithm number of vertices label by -1 and number of vertices label by 1 both is equal to 18, i.e V f (-1) = V f (1) =18. So |V f (-1) - V f (1) | = |18 - 18|=0 ≤ 1. From Algorithm and algorithm 3 we can calculate the number of intra connected edges label by -1 and the number of inter connected edges label by 1 both is equal to 54. i.e |e f * (-1) - e f * (1) | = |54 - 54|=0 ≤ 1, which comes under the limitation of signed product cordial labeling. Now |e f * (-1) + v f (-1) - e f * (1) - v f (1) | = |54 + 18 - 54 - 18|=0 ≤ 1 follows the underlying rule of total signed product cordial labeling.
Graph labeling has many applications, where structure of graph simple or complex. In this article we considered a complex graph structure obtained by Cartesian product between two balanced bipartite and restructure the graph to make it simple. We have design one algorithm and it has been shown that the above said graph is signed product and total signed product cordial graph. We also design two algorithm one for extracting intra-connection edge labeling and other for extracting inter-connection edge labeling. Time complexity of the designed algorithm analysed and our algorithm worked successfully. This is the first attempt to consider such complex graph, so researchers can consider more complex graph and apply not only several part of cordial labeling but also all useful labeling technique. In future we want to work on the graph obtained by Cartesian product between two balanced bipartite graphs i.e G = Km, n × Kp,q and we also want to reconsider the time complexity of the each designed algorithms and try to reduce upto some optimum level.
Footnotes
Acknowledgement
The work is supported by the Department of Science and Technology, New Delhi, India, Ref. No. SB/S4/MS: 894/14.
