Skip to main content
  • Original research
  • Open access
  • Published:

The cordiality of the sum and union of two fourth power of paths and cycles

Abstract

A simple graph is called cordial if it has 0-1 labeling that satisfies certain conditions. In this paper, we examine the necessary and sufficient conditions for cordial labeling of the sum and union of two fourth power of paths and cycles.

Introduction

The field of graph theory plays an important role in various areas of pure and applied sciences. One of the main problems in this field is graph labeling which is an assignment of integers to the vertices or edges, or both, subject to certain conditions. It is a very powerful tool that eventually makes things in different fields very ease to be handled in mathematical way. While the labeling of graphs is perceived to be a primarily theoretical subject in the field of graph theory and discrete mathematics, it serves as models in a wide range of application like astronomy, coding theory, X-ray crystallography, circuit design and communication networks addressing [1]. An excellent reference for this purpose is the survey written by Gallian [2]. In this paper, all graphs are finite, simple and undirected. The original concept of cordial graphs is due to Cahit [3]. A mapping \(f{:}V\rightarrow \{0,1\}\) is called binary vertex labeling of G and f(v) is called the label of the vertex v of G under f. For any edge \(e=uv\), the induced edge labeling \(f^{*}{:}E(G)\rightarrow \{0,1\}\) is given by \(f^{*}(e)=|f(u)-f(v)|\), where \(u,v\in V\). Let \(v_f(i)\) be the numbers of vertices of G labeled i under f , and \(e_f(i)\) be the numbers of edges of G labeled i under \(f^{*}\) where \(i\in \{0 , 1\}\). A binary vertex labeling of a graph G is called cordial if \(|v_f(0)- v_f(1)|\le {1}\) and \(|e_f(0)- e_f(1)|\le {1}\). A graph G is called cordial if it admits a cordial labeling. Cahit showed that each tree is cordial; a complete graph \(K_{n}\) is cordial if and only if \(n\le {3}\) and a complete bipartite graph \(K_{n,m}\) is cordial for all positive integers n and m [3].

Let \(G_1\) and \(G_2\) are graphs. The sum of two graphs \(G_1\) and \(G_2\), denoted by \(G_1+G_2\), is defined as the graph with vertex set given by \(V(G_1+G_2) = V(G_1) \bigcup V(G_2)\) and its edge set is \(E(G_1+G_2)= E(G_1) \bigcup E(G_2) \bigcup J\), where J consists of edges join each vertex of \(G_1\) to every vertex of \(G_2\). The union \(G_1\bigcup G_2\) of two graphs \(G_1\) and \(G_2\), is \(G_1\bigcup G_2 = (V(G_1)\bigcup V(G_2),E(G_1)\bigcup E(G_2))\). The fourth power of a graph G is a graph with the same set of vertices as G, and an edge between two vertices iff there is a path of length at most 4 between them, such that \(d (v_i , v_j )\le 4\) and \(i<j\). Diab [4, 5] has reported several results concerning the sum and union of the cycles \(C_n\) and paths \(P_m\) together with other specific graphs.

Terminology and notations

A path with m vertices and \(m-1\) edges is denoted by \(P_{m}\), and its fourth power \(P^4_{n}\) has n vertices and \(4n-10\) edges. Also, a cycle with n vertices and n edges, denoted by \(C_{n}\), and its fourth power \(C^4_{n}\) has n vertices and \(4n-9\) edges. Let \(L_{4r}\) denote the labeling \(0011\,0011\ldots 0011\) (repeated r-times). Let \(L^{\prime }_{4r}\) denote the labeling \(0110\,0110\ldots 0110\) (repeated r-times). The labeling \(1100\,1100\ldots 1100\) (repeated r-times) and labeling \(1001\,1001\ldots 1001\) (repeated r-times) are written as \(S_{4r}\) and \(S^{\prime }_{4r}\), respectively. Let \(M_{r}\) denote the labeling \(0101\ldots 01\), zero-one repeated rtimes if r is even and \(0101\ldots 010\) if r is odd; for example, \(M_6=010101\) and \(M_5=01010\). Let \(M^{\prime }_{r}\) denote the labeling \(1010\ldots 10\). We modify the labeling \(M_r\) or \(M^{\prime }_r\) by adding symbols at one end or the other (or both). Also, \(L_{4r}\) (or \(L^{\prime }_{4r}\) ) with extra labeling from right or left (or both sides).

If L is a labeling for fourth power of paths \(P_{m}\) and M is a labeling for fourth power of paths \(P_{n}\), then we use the notation [LM] for the labeling of the sum \(P^4_m + P^4_n\). Let \(v_i\) and \(e_i\)  ( \(i=0,1\)) represent the numbers of vertices and edges, respectively, labeled by i. Let us denote \(x_i\) and \(a_i\) to be the numbers of vertices and edges labeled by i for \(P^4_m\). Also, let \(y_i\) and \(b_i\) be those for \(P^4_n\). It is easy to verify that \(v_{0}-v_{1}=(x_0-x_1)+(y_0-y_1)\) and \(e_{0}-e_{1}=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)\). Also for \(P^4_m \cup P^4_n\), we use the same notation [LM] for the union \(P^4_m \cup P^4_n\), let \(v_i\) and \(e_i\) (for \(i=0,1\)) be the numbers of labels that are labeled by i as before, also, \(x_i\) and \(a_i\) be the numbers of vertices and edges labeled by i for \(P^4_m\), and let \(y_i\) and \(b_i\) be those for \(P^4_n\). It is easy to verify that \(v_{0}-v_{1}=(x_0-x_1)+(y_0-y_1)\) and \(e_{0}-e_{1}=(a_0-a_1)+(b_0-b_1)\). To prove the result, we need to show that, for each specified combination of labeling, \(|v_0-v_1|\le 1\) and \(|e_0-e_1|\le 1\).

Results

The cordiality of the sum of two fourth power of paths

In this subsection, we examine the cordiality of the sum of two fourth power of paths. To obtain this result, we use the following lemmas.

Lemma 1

If \(n\equiv 0(mod{\ }4)\), then \(P^{4}_n + P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 0(mod{\ }4)\).

Suppose that \(m=4s\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}+ P^{4}_{4s}\) by \([0L_{4r-4}011;1_2L^{\prime }_{4s-4}0_2]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=y_1=2s,b_0=b_1=8s-5\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). As an example, Fig. 1 illustrates \(P^{4}_{8} + P^{4}_{8}\). Hence, \(P^{4}_{4r}+ P^{4}_{4s}\) is cordial.

Fig. 1
figure 1

\(P^{4}_{8} + P^{4}_{8}\)

Case 2. \(m\equiv 1(mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}+ P^{4}_{4s+1}\) by \([0L_{4r-4}011;0_2L_{4s-4}101]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=2s+1,y_1=2s,b_0=b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r}+ P^{4}_{4s+1}\) is cordial.

Case 3. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}+ P^{4}_{4s+2}\) by \([0L_{4r-4}011;01_30S_{4s-4}0]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r}+ P^{4}_{4s+2}\) is cordial.

Case 4. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r}+ P^{4}_{4s+3}\) by \([0L_{4r-4}011;0_21L_{4s}]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=2s+2,y_1=2s+1,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r}+ P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 2

If \(n\equiv 1(mod{\ }4)\), then \(P^{4}_n + P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+1\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+1}+ P^{4}_{4s+1}\) by \([0_2L_{4r-4}101;1_2L^{\prime }_{4s-4}010]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=2s,y_1=2s+1,b_0=b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=-1\). Hence, \(P^{4}_{4r+1}+ P^{4}_{4s+2}\) is cordial.

Case 2. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+1}+ P^{4}_{4s+2}\) by \([0_2L_{4r-4}101;01_30S_{4s-4}0]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r+1}+ P^{4}_{4s+2}\) is cordial.

Case 3. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+1}+ P^{4}_{4s+3}\) by \([0_2L_{4r-4}101;1_2S_{4s}0]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=2s+1,y_1=2s+2,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=-1\). Hence, \(P^{4}_{4r+1}+ P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 3

If \(n\equiv 2(mod{\ }4)\), then \(P^{4}_n + P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+2\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+2}+ P^{4}_{4s+2}\) by \([01_30S_{4r-4}0;01_30S_{4s-4}0]\). Therefore \(x_0=x_1=2r+1,a_0=a_1=8r-1,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r+2}+ P^{4}_{4s+2}\) is cordial.

Case 2. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+2}+ P^{4}_{4s+3}\) by \([01_30S_{4r-4}0;0_21L_{4s}]\). Therefore \(x_0=x_1=2r+1,a_0=a_1=8r-1,y_0=2s+2,y_1=2s+1,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(P^{4}_{4r+2}+ P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 4

If \(n,m\equiv 3(mod{\ }4)\), then \(P^{4}_n + P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+3\), where \(r\ge 2\) and \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+3}+ P^{4}_{4s+3}\) by \([0_21L_{4r};1_2S_{4s}0]\). Therefore \(x_0=2r+2,x_1=2r+1,a_0=a_1=8r+1,y_0=2s+1,y_1=2s+2,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=-1\). Hence, \(P^{4}_{4r+3}+ P^{4}_{4s+3}\) is cordial.

By considering all the lemmas mentioned in section “The cordiality of the sum of two fourth power of paths” we write the following theorem. \(\square\)

Theorem 1

The sum of two fourth power of paths \(P^{4}_n + P^{4}_m\) is cordial for all \(n,m \ge 7\)

The cordiality of sum of two fourth power of cycles

In this subsection, we study the cordiality of sum of two fourth power of cycles.

Lemma 5

If \(n\equiv 0(mod{\ }4)\), then \(C^{4}_n + C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 0 (mod{\ }4)\).

Suppose that \(m=4s\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}+ C^{4}_{4s}\) by \([S^{\prime }_{4r};1_3M_{4s-6}0_3]\). Therefore \(x_0=x_1=2r,a_0=8r-5,a_1=8r-4,y_0=y_1=2s,b_0=8s-4,b_1=8s-5\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r}+ C^{4}_{4s}\) is cordial.

Case 2. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}+ C^{4}_{4s+1}\) by \([1_3M_{4r-6}0_3;L_{4s}0]\). Therefore \(x_0=x_1=2r,a_0=8r-4,a_1=8r-5,y_0=2s+1,y_1=2s,b_0=8s-3,b_1=8s-2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r}+ C^{4}_{4s+1}\) is cordial.

Case 3. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}+ C^{4}_{4s+2}\) by \([S^{\prime }_{4r};0_3101_3M_{4s-6}]\). Therefore \(x_0=x_1=2r,a_0=8r-5,a_1=8r-4,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r}+ C^{4}_{4s+2}\) is cordial.

Case 4. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r}+ C^{4}_{4s+3}\) by \([1_3M_{4r-6}0_3;L^{\prime }_{4s}010]\). Therefore \(x_0=x_1=2r,a_0=8r-4,a_1=8r-5,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r}+ C^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 6

If \(n\equiv 1(mod{\ }4)\), then \(C^{4}_n + C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+1\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+1}+ C^{4}_{4s+1}\) by \([L_{4r}0;1_3L^{\prime }_{4s-4}0_2]\). Therefore \(x_0=2r+1,x_1=2r,a_0=8r-3,a_1=8r-2,y_0=2s,y_1=2s+1,b_0=8s-2,b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=-1\). Hence, \(C^{4}_{4r+1}+ C^{4}_{4s+1}\) is cordial.

Case 2. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+1}+ C^{4}_{4s+2}\) by \([L_{4r}0;0_3101_3M_{4s-6}]\). Therefore \(x_0=2r+1,x_1=2r,a_0=8r-3,a_1=8r-2,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r+1}+ C^{4}_{4s+2}\) is cordial.

Case 3. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r+1}+ C^{4}_{4s+3}\) by \([1_3L^{\prime }_{4r-4}0_2;L^{\prime }_{4s}010]\). Therefore \(x_0=2r,x_1=2r+1,a_0=8r-2,a_1=8r-3,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=-1\). Hence, \(C^{4}_{4r+1}+ C^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 7

If \(n\equiv 2(mod{\ }4)\), then \(C^{4}_n + C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+2\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+2}+ C^{4}_{4s+2}\) by \([0_31_3L^{\prime }_{4r-4};0_3101_3M_{4s-6}]\). Therefore \(x_0=x_1=2r+1,a_0=8r-1,a_1=8r,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r+2}+C^{4}_{4s+2}\) is cordial.

Case 2. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r+2}+ C^{4}_{4s+3}\) by \([0_3101_3M_{4s-6};L^{\prime }_{4s}010]\). Therefore \(x_0=x_1=2r+1,a_0=8r,a_1=8r-1,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)+(x_0-x_1)(y_0-y_1)=0\). Hence, \(C^{4}_{4r+2}+ C^{4}_{4s+3}\) is cordial. \(\square\)

By considering all the lemmas mentioned in section “The cordiality of sum of two fourth power of cycles” we write the following theorem.

Theorem 2

The sum of two fourth power of cycles \(C^{4}_n + C^{4}_m\) is cordial for all \(n,m \ge 7\) except at \((n,m)=(7,7)\)

The cordiality of union of two fourth power of paths

In this subsection, we examine the cordiality of the union of two fourth power of paths. To obtain this result, we use the following lemmas.

Lemma 8

If \(n\equiv 0(mod{\ }4)\), then \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 0 (mod{\ }4)\).

Suppose that \(m=4s\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}\cup P^{4}_{4s}\) by \([0L_{4r-4}011;1_2L^{\prime }_{4s-4}0_2]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=y_1=2s,b_0=b_1=8s-5\). As an example, Fig. 2 illustrates \(p^{4}_{8}\cup p^{4}_{8}\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r}\cup P^{4}_{4s}\) is cordial.

Fig. 2
figure 2

\(P^{4}_{8} \bigcup P^{4}_{8}\)

Case 2. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}\cup P^{4}_{4s+1}\) by \([0L_{4r-4}011;0_2L_{4s-4}101]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=2s+1,y_1=2s,b_0=b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r}\cup P^{4}_{4s+1}\) is cordial.

Case 3. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r}\cup P^{4}_{4s+2}\) by \([0L_{4r-4}011;01_30S_{4s-4}0]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r}\cup P^{4}_{4s+2}\) is cordial.

Case 4. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r}\cup P^{4}_{4s+3}\) by \([0L_{4r-4}011;0_21L_{4s}]\). Therefore \(x_0=x_1=2r,a_0=a_1=8r-5,y_0=2s+2,y_1=2s+1,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r}\cup P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 9

If \(n\equiv 1(mod{\ }4)\), then \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+1\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+1}\cup P^{4}_{4s+1}\) by \([0_2L_{4r-4}101;1_2L^{\prime }_{4s-4}010]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=2s,y_1=2s+1,b_0=b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+1}\cup P^{4}_{4s+1}\) is cordial.

Case 2. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+1}\cup P^{4}_{4s+2}\) by \([0_2L_{4r-4}101;01_30S_{4s-4}0]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+1}\cup P^{4}_{4s+2}\) is cordial.

Case 3. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+1}\cup P^{4}_{4s+3}\) by \([0_2L_{4r-4}101;1_2S_{4s}0]\). Therefore \(x_0=2r+1,x_1=2r,a_0=a_1=8r-3,y_0=2s+1,y_1=2s+2,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+1}\cup P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 10

If \(n\equiv 2(mod{\ }4)\), then \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+2\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(P^{4}_{4r+2}\cup P^{4}_{4s+2}\) by \([01_30S_{4r-4}0;01_30S_{4s-4}0]\). Therefore \(x_0=x_1=2r+1,a_0=a_1=8r-1,y_0=y_1=2s+1,b_0=b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+2}\cup P^{4}_{4s+2}\) is cordial.

Case 2. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+2}\cup P^{4}_{4s+3}\) by \([01_30S_{4r-4}0;0_21L_{4s}]\). Therefore \(x_0=x_1=2r+1,a_0=a_1=8r-1,y_0=2s+2,y_1=2s+1,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+2}\cup P^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 11

If \(n,m\equiv 3(mod{\ }4)\), then \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+3\), where \(r\ge 2\) and \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(P^{4}_{4r+3}\cup P^{4}_{4s+3}\) by \([0_21L_{4r};1_2S_{4s}0]\). Therefore \(x_0=2r+2,x_1=2r+1,a_0=a_1=8r+1,y_0=2s+1,y_1=2s+2,b_0=b_1=8s+1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(P^{4}_{4r+3}\cup P^{4}_{4s+3}\) is cordial.

By considering all the lemmas mentioned in section “The cordiality of union of two fourth power of paths” we write the following theorem. \(\square\)

Theorem 3

The union of two fourth power of paths \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m \ge 7\).

The cordiality of union of two fourth power of cycles

In this subsection, we examine the cordiality of the union of two fourth power of cycles. To obtain this result, we use the following lemmas.

Lemma 12

If \(n\equiv 0(mod{\ }4)\), then \(C^{4}_n \cup C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 0 (mod{\ }4)\).

Suppose that \(m=4s\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}\cup C^{4}_{4s}\) by \([S^{\prime }_{4r};1_3M_{4s-6}0_3]\). Therefore \(x_0=x_1=2r,a_0=8r-5,a_1=8r-4,y_0=y_1=2s,b_0=8s-4,b_1=8s-5\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r}\cup C^{4}_{4s}\) is cordial.

Case 2. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}\cup C^{4}_{4s+1}\) by \([1_3M_{4r-6}0_3;L_{4s}0]\). Therefore \(x_0=x_1=2r,a_0=8r-4,a_1=8r-5,y_0=2s+1,y_1=2s,b_0=8s-3,b_1=8s-2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r}\cup C^{4}_{4s+1}\) is cordial.

Case 3. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r}\cup C^{4}_{4s+2}\) by \([S^{\prime }_{4r};0_3101_3M_{4s-6}]\). Therefore \(x_0=x_1=2r,a_0=8r-5,a_1=8r-4,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r}\cup C^{4}_{4s+2}\) is cordial.

Case 4. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r}\cup C^{4}_{4s+3}\) by \([1_3M_{4r-6}0_3;L^{\prime }_{4s}010]\). Therefore \(x_0=x_1=2r,a_0=8r-4,a_1=8r-5,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r}\cup C^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 13

If \(n\equiv 1(mod{\ }4)\), then \(C^{4}_n \cup C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+1\), where \(r\ge 2\). We consider the following cases.

Case 1. \(m\equiv 1 (mod{\ }4)\).

Suppose that \(m=4s+1\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+1}\cup C^{4}_{4s+1}\) by \([L_{4r}0;1_3L^{\prime }_{4s-4}0_2]\). Therefore \(x_0=2r+1,x_1=2r,a_0=8r-3,a_1=8r-2,y_0=2s,y_1=2s+1,b_0=8s-2,b_1=8s-3\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r+1}\cup C^{4}_{4s+1}\) is cordial.

Case 2. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+1}\cup C^{4}_{4s+2}\) by \([L_{4r}0;0_3101_3M_{4s-6}]\). Therefore \(x_0=2r+1,x_1=2r,a_0=8r-3,a_1=8r-2,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r+1}\cup C^{4}_{4s+2}\) is cordial.

Case 3. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r+1}\cup C^{4}_{4s+3}\) by \([1_3L^{\prime }_{4r-4}0_2;L^{\prime }_{4s}010]\). Therefore \(x_0=2r,x_1=2r+1,a_0=8r-2,a_1=8r-3,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r+1}\cup C^{4}_{4s+3}\) is cordial. \(\square\)

Lemma 14

If \(n\equiv 2(mod{\ }4)\), then \(C^{4}_n \cup C^{4}_m\) is cordial for all \(n,m \ge 7\).

Proof

Suppose that \(n=4r+2\), where \(r\ge 2\). The following cases will be examined.

Case 1. \(m\equiv 2(mod{\ }4)\).

Suppose that \(m=4s+2\), where \(s\ge 2\). Then we label the vertices of \(C^{4}_{4r+2}\cup C^{4}_{4s+2}\) by \([0_31_3L^{\prime }_{4r-4};0_3101_3M_{4s-6}]\). Therefore \(x_0=x_1=2r+1,a_0=8r-1,a_1=8r,y_0=y_1=2s+1,b_0=8s,b_1=8s-1\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=0\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r+2}\cup C^{4}_{4s+2}\) is cordial.

Case 2. \(m\equiv 3 (mod{\ }4)\).

Suppose that \(m=4s+3\), where \(s\ge 1\). Then we label the vertices of \(C^{4}_{4r+2}\cup C^{4}_{4s+3}\) by \([0_3101_3M_{4s-6};L^{\prime }_{4s}010]\). Therefore \(x_0=x_1=2r+1,a_0=8r,a_1=8r-1,y_0=2s+2,y_1=2s+1,b_0=8s+1,b_1=8s+2\). It follows that \(v_0-v_1=(x_0-x_1)+(y_0-y_1)=1\) and \(e_0-e_1=(a_0-a_1)+(b_0-b_1)=0\). Hence, \(C^{4}_{4r+2}\cup C^{4}_{4s+3}\) is cordial. \(\square\)

By considering all the lemmas mentioned in section “The cordiality of union of two fourth power of cycles” we write the following theorem.

Theorem 4

The union of two fourth power of cycles \(C^{4}_n \cup C^{4}_m\) is cordial for all \(n,m \ge 7\) except at \((n,m)=(7,7)\).

Conclusion

In this paper we test the cordiality of the sum and union of two fourth power of paths and cycles. We found that \(P^{4}_n + P^{4}_m\) and \(P^{4}_n \cup P^{4}_m\) is cordial for all \(n,m\ge\) 7 and also \(C^{4}_n + C^{4}_m\) and \(C^{4}_n \cup C^{4}_m\) is cordial for all nm except at \((n,m)=(7,7)\)

Availability of data and materials

Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.

References

  1. Prasanna, N.L., Sravanthi, K., Sudhakar, N.: Applications of graph labeling in communication networks. Oriental J. Comput. Sci. Technol. 7(1), 139–145 (2014)

    Google Scholar 

  2. Gallian, A.J.: A dynamic survey of graph labeling. Electron. J. Combin. 22, DS6 (2019). December 15

    MathSciNet  MATH  Google Scholar 

  3. Cahit, I.: Cordial graphs, A weaker version of graceful and harmonious graphs. Ars Combinatoria 23, 201–207 (1987)

    MathSciNet  MATH  Google Scholar 

  4. Diab, A.T.: Study of some problems of cordial graphs. Ars Combin 92, 255–261 (2009)

    MathSciNet  MATH  Google Scholar 

  5. Diab, A.T.: Generalization of some results on cordial graphs. Ars Combin 99, 161–173 (2011)

    MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

The authors are thankful to the anonymous referee for useful suggestions and valuable comments.

Funding

There is no funding from anyone.

Author information

Authors and Affiliations

Authors

Contributions

AR wrote the title, abstract, stability, graph the figures and conclusion and fixed many language errors. AER wrote the introduction and references. AER wrote the mathematical analysis. AR wrote the bifurcation analysis. AER wrote the numerical analysis. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Aya Rabie.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Elrokh, A., Rabie, A. The cordiality of the sum and union of two fourth power of paths and cycles. J Egypt Math Soc 29, 3 (2021). https://doi.org/10.1186/s42787-020-00111-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s42787-020-00111-6

Keywords

Mathematics Subject Classification