EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS 2025, Vol. 18, Issue 1, Article Number 5812 ISSN 1307-5543 – ejpam.com Published by New York Business Global A Novel Problem and Algorithm for Solving Cordial Labeling of Some Fifth Powers of Graphs Atef Abd El-hay1,∗, Khalid A. Alsatami2, Ashraf ELrokh1 1 Mathematics and Computer Science Department, Faculty of Science Menoufia University, Menoufia, Egypt. 2 Department of Mathematics, College of Science, Qassim University, Buraydah, KSA. Abstract. In this paper we introduce a novel application of cordial labeling using the fifth power of graphs, demonstrating its potential for understanding and studying specific graph structures. The resulting cordial labeling scheme for the fifth power of paths, cycles, fans, wheels, lemniscate and the union of fifth power of paths and cycles graphs can provide insights into the properties and structures of these graphs. It can be used to analyze its connectivity, symmetry, and other graph-theoretical characteristics. 2020 Mathematics Subject Classifications: 05C78,05C15 Key Words and Phrases: Cordial labeling, Fifth power, lemniscate, Social Networking, Network security, Edge Computing 1. Introduction A graph labeling is a way of assigning numbers to the vertices or edges of a graph, or both, according to some rules. Graph labeling is useful for studying various properties and applications of graphs, such as symmetry, coloring, coding, and communication. It is universally recognizable that graph theory has applications in many other academic disciplines, particularly computer science [5, 21], and also in physics, chemistry, biology, communication, psychology, sociology, and economics. Graph labelling is one area of graph theory that has seen a great deal of ongoing research. Labeled graphs are effective models for a variety of applications, including data base administration, X-ray crystallography, radar, circuit design, and coding theory [20]. When a specific type of graph is labelled, its vertices are given values from a predetermined set, its edges have a predetermined induced labelling, and its labelling must adhere to specified requirements. The study by Gallian [17] is a great resource on this topic graceful and harmonious labelling are two of the most significant categories. Rosa [22] and Golomb ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v18i1.5812 Email addresses: atef 1992@yahoo.com (A. Abd El-hay), satamy@qu.edu.sa (K. A. Alsatami), ashraf.hefnawy68@yahoo.com (A. ELrokh) https://www.ejpam.com 1 Copyright: © 2025 The Author(s). (CC BY-NC 4.0) A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 2 of 14 [18] independently created graceful labelling in 1966 and 1972, respectively, while Graham and Sloane [19] conducted the first study on harmonic labelling in 1980. Cordial labelling is a third crucial sort of labelling that Cahit [4] established in 1990 and which combines elements of the other two. Unlike graceful and harmonious labelling, which utilize labels |f(v)−f(w)| and ( f(v)+f(w) (modulo the number of edges), respectively, cordial labelings simply use labels 0 and 1, as well as the induced label (f(v)+f(w))(mod2), which naturally equals |f(v)− f(w)|. The original concept of cordial graphs is due to Cahit[3]. He showed that each tree is cordial; a complete graph Kn is cordial if and only if n ≤ 3 and a complete bipartite graph Kn,m is cordial for all positive integers n and m. The fifth power of graphs G5 is the graph obtained from the graph G by adding edges that join all vertices u and v with d(u, v) ≤ 5. More precisely, and with the fifth Power of Paths P 5 n , the fifth power of cycles C5 n, the fifth power of fans F 5 n+1 = P1 + P 5 n , the fifth power of wheels W 5 n+1 = P1 +C5 n, and The fifth power of a lemniscate graph is denoted by L5 n,m=C5 n∪C5 m where both cycles C5 n and C5 m have a common vertex. As stated in [17], every path Pn is Cordial for every n, a cycle Cn is Cordial if and only if n ̸= 2(mod4), the complete graph Kn is Cordial if and only if n ≤ 3. P 2 n is Cordial for every n, P 3 n is Cordial if and only if n ̸= 4, P 4 n is cordial if and only if m ̸= 4, 5 or 6, all fans Fn are Cordial and the Wheel Wn is Cordial if and only if n ̸= 3(mod4). In [7, 8], Diab has reported several results concerning the sum and union of the cycles Cn and paths Pm together and with other specific graphs. He introduced the cordiality of the join and the union of pairs of wheels and graphs consisting of a wheel and a path or a cycle he investigated that the second power of cycles is cordial for all n ≥ 3 if and only if n = 3 or even n > 4. Moreover, he studies the cordiality of certain combinations of second power of cycles, cycles and paths. Specifically, he discussed the cordiality of the join and union of pairs of second power of cycles and graphs consisting of one second power of cycle with one cycle and one path. In [16] the cordiality of the join and union of graphs involving one path and one cycle, as well as the third power of paths. Elrokh and Rabie [14] proved P 4 n + P 4 m and P 4 n ∪ P 4 m are cordial for all n,m ≥ 7, and C4 n + C4 m , and C4 n ∪ C4 m are cordial for all n,m except (n,m) = (7, 7). Cordial labelling has significant connections to computer science because arithmetic modulo 2 is a fundamental component of that discipline. Cordial labeling has applications in various fields, such as coding theory, communication networks, X-ray crystallography, and computational and communication paradigms. One interesting application is to pro- duce new cordial families by using a technique called balanced cordial labeling, which can generate cordial graphs from two given graphs by taking one copy of one graph and j copies of another graph and joining them by an edge. For more details about the cordial labeling and types of labeling, the reader can refer to [1, 2, 9–13, 15]. We defined cordial graphs more accurately as follows. Let G = (V,E) be a graph, let f : V → {0, 1} labeling of the vertices, and let f∗ : E → {0, 1} be the extension of f to the edges of G by the formula f∗(vw) = f(v) + f(w) (mod 2). (Thus for any edges e = vw, f∗(e) = 0 if its two vertices have the same label and f∗(e) = 1 if they have different labels). Let v0 and v1 be the numbers of vertices labeled 0 and 1 respectively, and let e0 and e1 be the corresponding numbers of edges. Such a labeling is called cordial A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 3 of 14 if both |v0− v1| ≤ 1 and |e0− e1| ≤ 1. A graph is called cordial if it has a cordial labeling. The main object of this paper is to extend the above results as follows. In Section 3, we study the cordiality of the fifth power of paths, cycles, fans, wheels, and lemniscate graphs. Section 4 investigates the cordiality for the union of fifth power of paths and cycles. Section 5, proposes an algorithm for determining the cordiality of a given graph. The last section, is the conclusion which summarize the important points of our finding in this paper. 2. Terminology and Notation We let L4r denote the labeling 0011...0011 (repeated r-times), let L ′ 4r denote the labeling 1100...1100 (repeated r times). The labeling 1001 1001...1001 (repeated r times) and 0110...0110 (repeated r times) are denoted by S4r and S′ 4rrespectively. Let M2r denote the labeling 0101...01, zero-one repeated r−times if r is even and 0101...010 if r is odd. Sometimes, we modify labeling by adding symbols at one end or the other (or both). In most cases, we then modify this by adding symbols at one end or the other (or both), thus L4r101 denotes the labeling 0011 0011...0011 101 (repeated r-times) when r≥1 and 101 when r= 0. Similarly, 1L ′ 4r is the labeling 1 1100 1100...1100 (repeated r-times) when r≥1 and 1 when r= 0. Similarly, 0L ′ 4r1 is the labeling 0 1100 1100...1100 1 when r≥1 and 01 when r= 0. Additional notation that we use the following for a given labeling of the union G∪H, we let vG and vH be the numbers of vertices G and H respectively. Also eG and eH be the numbers of edges G and H respectively. It is follows that vG∪H = vG+ vH , and eG∪H = eG + eH , for more details see [6]. Moreover, we used the symbol [L,M ] for the union of two graphs G and H, where L is the labeling of G and M is the labeling of H. 3. Cordial Labeling of fifth power of Some Graphs In this section we shall prove that the cordiality of the fifth power of paths, cycles, fan wheel and lemniscate graphs. More over, we introduce some illustrate examples for each graphs. 3.1. Cordial Labeling of fifth power of Cycles graphs Obviously, the order of C5 n is n, and the size of C5 n is 5n − 14 for every n > 7. In Particular, C5 3 ∼= C3, C 5 4 ∼= K4, C 5 5 ∼= K5, C 5 6 ∼= K6 and C5 7 ∼= K7. In this subsection, we show that the cordiality of C5 n if and only if n = 3, and n > 8. Lemma 3.1.1. The fifth power of Cycles graphs C5 n is cordial for all n> 8. Proof. Let n= 4t+ i (0 ≤ i ≤ 3 and t ≥ 2), then for a given value of i with 0 ≤ i ≤ 3, we use the labeling Ai or A ′ i for Cn as shown in Table 1. It is easy to see that C5 n for every n > 8 is cordial from the last two columns of the Table 1 and thus the Lemma is proved. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 4 of 14 Table 1: Labeling of C5 n. n = 4t+ i, i = 0, 1, 2, 3 Labeling of C5 n v0 v1 e0 e1 v0 − v1 e0 − e1 i = 0 A0 = 0L4t120 2t+ 2 2t+ 2 10t+ 3 10t+ 3 0 0 i = 1 A1 = L4t1 2t 2t+ 1 10t− 5 10t− 4 −1 −1 A ′ 1 = 12M4t−403 2t+ 1 2t 10t− 4 10t− 5 1 1 i = 2 A2 = L ′ 4t10 2t+ 1 2t+ 1 10t− 2 10t− 2 0 0 i = 3 A3 = L4t100 2t+ 2 2t+ 1 10t 10t+ 1 1 −1 A′ 3 = 11L′ 4t0 2t+ 1 2t+ 2 10t+ 1 10t −1 1 Example 3.1.1.The graph C5 3 is cordial, but the graphs C5 n are not cordial for all 4 ≤ n ≤ 8. Solution. Since C5 3 ∼= C3 and C3 is cordial [3], then C5 3 is cordial. In case of 4 ≤ n ≤ 7, it is easy to verify that C5 4 ∼= K4, C 5 5 ∼= K5, C 5 6 ∼= K6 and C5 7 ∼= K7 are not cordial by cahit [9]. In case of n = 8, since n = 8, then by investigation all possible labelings of vertices of C5 8 with v0 = v1 = 4, we obtained that |e0−e1| > 1. Therefore C5 8 is not cordial. Theorem 3.1.1. The fifth power of Cycles graphs C5 n is cordial if and only if n = 3 and n > 8. Proof. The proof follows directly from Lemma 3.1.1 and Example 3.1.1. 3.2. Cordial Labeling of fifth power of Paths graphs Clearly, the order of P 5 n is n, and the size of P 5 n is 5n−15 for every n > 7. In Particular, P 5 1 ∼= P1, P 5 2 ∼= P2, P 5 3 ∼= C3, P 5 4 ∼= K4, P 5 5 ∼= K5 and P 5 6 ∼= K6. In this subsection, we show that P 5 n is cordial if and only if 1 ≤ n ≤ 3 and n > 7. Lemma 3.2.1.The fifth power of Paths graphs P 5 n is cordial for all n> 8. Proof. Let n= 4t+ i (0 ≤ i ≤ 3 and t ≥ 2), then for a given value of i with 0 ≤ i ≤ 3, we use the labeling Bi or B ′ i for Pn as shown in Table 2. It is easy to see that P 5 n for every n > 8 is cordial from the last two columns of the Table 2 and thus the Lemma is proved. Table 2: Labeling of P 5 n . n = 4t+ i, n > 8 i = 0, 1, 2, 3 Labeling of P 5 n v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 B0= 0L4t120 2t 2t 10t+ 2 10t+ 3 0 1 i= 1 B1=L4t1 2t 2t+ 1 10t− 5 10t− 5 −1 0 i= 2 B2=L ′ 4t10 2t+ 1 2t+ 1 10t− 2 10t− 3 0 1 i= 3 B3=L ′ 4t010 2t+ 2 2t+ 1 10t 10t 1 0 B′ 3= 010L4t 2t+ 2 2t+ 1 10t 10t 1 0 A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 5 of 14 Example 3.2.1. The graphs P 5 1 , P 5 2 , P 5 3 and P 5 8 are cordial, but the graphs P 5 n are not cordial for all 4 ≤ n ≤ 7. solution. Since P 5 1 ∼= P1, P 5 2 ∼= P2, P 5 3 ∼= C3, P 5 8 the labeling [0414] is sufficient for P 5 8 and P1, P2 and C3 are cordial [3], then P 5 1 , P 5 2 and P 5 3 are cordial. In case of 4 ≤ n ≤ 7, it is easy to verify that P 5 4 ∼= K4, P 5 5 ∼= K5, P 5 6 ∼= K6 are not cordial by cahit [9]. Since n = 7, then by investigation all possible labelings of vertices of P 5 7 with v0 = 3, v1 = 4 or v0 = 4, v1 = 3, we obtained that |e0 − e1| > 1. Therefore P 5 8 is not cordial Theorem 3.2.1. The fifth power of Paths graphs P 5 n are cordial if and only if 1 ≤ n ≤ 3 and n > 7. Proof.The proof follows directly from Lemma 3.2.1 and Example 3.2.1. 3.3. Cordial Labeling of fifth power of Wheals graphs Obviously, the order of W 5 n+1 is n+1, and the size of W 5 n+1 is 6n− 14 for every n > 7. In Particular, W 5 4 ∼= K4,W 5 5 ∼= K5,W 5 6 ∼= K6,W 5 7 ∼= K7 and W 5 8 ∼= K8. In this subsection, we show that W 5 n+1 is cordial if and only if n≥ 3 except 3 ≤ n ≤ 8. Theorem 3.3.1. The fifth power of Wheals graphs W 5 n+1= P 1+C5 n are cordial if and only if n≥ 3 except 3 ≤ n ≤ 8. Proof. In case of 3 ≤ n ≤ 7, it is easy to verify that W 5 4 ∼= K4,W 5 5 ∼= K5,W 5 6 ∼= K6,W 5 7 ∼= K7 and W 5 8 ∼= K8 are not cordial by cahit [3]. Since n = 8, then by investigation all possible labelings of vertices of W 5 9 with v0 = 5, v1 = 4 or v0 = 4, v1 = 5, we obtained that |e0 − e1| > 1. Therefore W 5 9 is not cordial. In case of n ≥ 9, let n= 4t+ i (0 ≤ i ≤ 3 and t> 2), then for a given value of i with 0 ≤ i ≤ 3, we use the labeling [u, v] for W 5 n+1= P 1 + C5 n where u be the labeling of P1 and v=Ai or A ′ i be the labeling of C5 n as shown in Tables 1, 3. It is easy to see that W 5 n+1 for every n > 8 is cordial from the last two columns of the Table w and the Theorem is proved. Table 3: Labeling of W 5 n+1. n = 4t+ i, n ≥ 9 i = 0, 1, 2, 3 Labeling of W 5 n+1 v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 [0,A0] = [0,L4t120] 2t+ 3 2t+ 2 12t+ 5 12t+ 5 1 0 i= 1 [1,A′ 1] = [1,12M4t−403] 2t+ 1 2t+ 1 12t− 4 12t− 4 0 0 i= 2 [0,A2] = [0,L ′ 4t10] 2t+ 2 2t+ 1 12t− 1 10t− 1 1 0 i= 3 [0,A′ 3] = [0, 11L′ 4t0] 2t+ 2 2t+ 2 12t+ 1 12t+ 1 0 0 3.4. Cordial Labeling of fifth power of Fans graphs Clearly, the order of F 5 n+1 is n + 1, and the size of F 5 n+1 is 6n − 15 for every n > 7. In Particular, F 5 2 ∼= P2 , F 5 3 ∼= C3, F 5 4 ∼= K4, F 5 5 ∼= K5, F 5 6 ∼= K6 and F 5 7 ∼= K7. In this subsection, we show that F 5 n+1 is cordial if and only if n≥ 1 except 3 ≤ n ≤ 7. Theorem 3.4.1. The fifth power of Fans graphs F 5 n+1= P 1+P 5 n is cordial if and only if n≥ 1 except 3 ≤ n ≤ 7. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 6 of 14 Proof. Since F 5 2 ∼= P2 , F 5 3 ∼= C3, F 5 9 the labeling [1; 0414] is sufficient for F 5 9 and P2 ,C3 are cordial [3], then F 5 2 , F 5 3 and F 5 8 are cordial. In case of 3 ≤ n ≤ 6, it is easy to verify that F 5 4 ∼= K4, F 5 5 ∼= K5, F 5 6 ∼= K6 and F 5 7 ∼= K7 are not cordial by cahit [3]. Since n = 7, then by investigation all possible labelings of vertices of P 5 8 with v0 = v1 = 4, we obtained that |e0 − e1| > 1. Therefore F 5 8 is not cordial. In case of n ≥ 8, let n= 4t + i (0 ≤ i ≤ 3 and t ≥ 2), then for a given value of i with 0 ≤ i ≤ 3, we use the labeling [u, v] for F 5 n+1= P 1 + P 5 nwhere u be the labeling of P1 and v=Bi or B ′ i be the labeling of P 5 n as shown in Tables 2, 4. It is easy to see that F 5 n+1 for every n ≥ 8 is cordial from the last two columns of the Table 4 and thus the Theorem is proved. Table 4: Labeling of F 5 n+1. n = 4t+ i, n > 8 i = 0, 1, 2, 3 Labeling of F 5 n+1 v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 [0;B0= 0L4t120] 2t+ 3 2t+ 2 12t+ 4 12t+ 5 1 −1 i= 1 [0;B1=L4t1] 2t+ 1 2t+ 1 12t− 5 12t− 4 0 −1 i= 2 [0;B2=L ′ 4t10] 2t+ 2 2t+ 1 12t− 1 12t− 2 1 1 i= 3 [1;B ′ 3= 010L4t] 2t+ 2 2t+ 2 12t+ 1 12t+ 2 0 −1 3.5. Cordial Labeling of fifth power of Lemniscate graphs The fifth power of a lemniscate graph is denoted by L5 n,m=C5 n∪C5 m where both cycles have a common point. So, the order of the fifth power of lemniscate is n+m− 1, and the size of the fifth power of lemniscate graph L5 n,m equals to 5(n+m)− 28. In the following section, we study and investigate the cordiality of the fifth power of lemniscate L5 n,m for all n,m ≥ 3. The labeling of L5 n,m takes the form [A;B] where the labeling A is given to n and the labeling B is given to m. For this purpose, we labeling each fifth power of cycle separately. Lemma 3.5.1. If 3 ≤ n ≤ 8, and m> 8, then the fifth power of lemniscate L5 n,m is cordial for all 3 ≤ n ≤ 8, and m> 8. Considering that L5 n,m ≊ L5 m,n. Proof. Let 3 ≤ n ≤ 8 and m= 4t+ j (j= 4, 1, 2, 3 and t ≥ 2), then using Tables 1, 5 and formulas v0 − v1and e0 − e1, we can compute the values shown in the last two columns of Tables 5. Since all of these values are −1, 0 or 1, the lemma is proved. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 7 of 14 Table 5: Labeling of L5 n,m;3 ≤ n ≤ 8, and m> 8 3 ≤ n ≤ 8 m = 4t+ j, t ≥ 2,m > 8 i = 4, 1, 2, 3 Labeling of L5 n,m v0 v1 e0 e1 v0 − v1 e0 − e1 3 m= 4t+ 4 [03; 0L4t13] 2t+ 3 2t+ 3 10t+ 5 10t+ 4 0 1 m= 4t+ 1 [010;L4t] 2t+ 2 2t+ 1 10t− 3 10t− 3 1 0 m= 4t+ 2 [010;012L ′ 4t−410] 2t+ 2 2t+ 2 10t− 1 10t 0 −1 m= 4t+ 3 [101;L ′ 4t01] 2t+ 2 2t+ 3 10t+ 2 10t+ 2 −1 0 4 m= 4t+ 4 [130;02L ′ 4t02] 2t+ 4 2t+ 3 10t+ 6 10t+ 6 1 0 m= 4t+ 1 [M4; 12M ′ 4t−403] 2t+ 2 2t+ 2 10t− 2 10t− 1 0 −1 m= 4t+ 2 [031;0L4t1] 2t+ 3 2t+ 2 10t+ 1 10t+ 1 1 0 m= 4t+ 3 [031; 1L4t12] 2t+ 3 2t+ 3 10t+ 4 10t+ 3 1 0 5 m= 4t+ 4 [0103; 0L ′ 4t13] 2t+ 4 2t+ 4 10t+ 8 10t+ 8 0 0 m= 4t+ 1 [0103;0L ′ 4t−413] 2t+ 3 2t+ 2 10t+ 1 10t 1 1 m= 4t+ 2 [0103;12L ′ 4t120] 2t+ 3 2t+ 3 10t+ 3 10t+ 3 0 0 m= 4t+ 3 [0312; L ′ 4t01] 2t+ 4 2t+ 3 10t+ 5 10t+ 6 1 −1 6 m= 4t+ 4 [10213;L ′ 4t−40210] 2t+ 5 2t+ 4 10t+ 3 10t+ 4 1 −1 m= 4t+ 1 [10213; 12M4t−403] 2t+ 3 2t+ 3 10t+ 3 10t+ 3 0 0 m= 4t+ 2 [0L40;012L4t−410] 2t+ 4 2t+ 3 10t+ 5 10t+ 6 1 −1 m= 4t+ 3 [13010; 0L4t10] 2t+ 4 2t+ 5 10t+ 8 10t+ 8 −1 0 7 m= 4t+ 4 [021203;L4t1201] 2t+ 4 2t+ 3 10t+ 14 10t+ 13 1 1 m= 4t+ 1 021203;L4t1 2t+ 4 2t+ 3 10t+ 6 10t+ 6 1 −1 m= 4t+ 2 021203;L4t12 2t+ 4 2t+ 4 10t+ 9 10t+ 8 0 1 m= 4t+ 3 [04101; 11L4t1] 2t+ 5 2t+ 4 10t+ 11 10t+ 11 1 0 8 m= 4t+ 4 [1031021; 1012L4t] 2t+ 6 2t+ 5 10t+ 16 10t+ 16 1 0 m= 4t+ 1 0102M ′ 4;L4t1 2t+ 4 2t+ 4 10t+ 8 10t+ 9 0 −1 m= 4t+ 2 1031021; 12L4t 2t+ 5 2t+ 4 10t+ 11 10t+ 11 1 0 m= 4t+ 3 [0102M ′ 4; 0L4t12] 2t+ 5 2t+ 5 10t+ 14 10t+ 13 0 1 Lemma 3.5.2. If n,m ≥ 9, then the fifth power of lemniscate L5 n,m is cordial for all n ≥ 9 and m ≥ 9. Proof. Let n= 4r + i (i= 0, 1, 2, 3 and r ≥ 1) and m= 4t + j (j= 0, 1, 2, 3 and t ≥ 1), then using Tables 1, 6 and formulas v0 − v1and e0 − e1, we can compute the values shown in the last two columns of Table 6. Since all of these values are −1, 0 or 1, the lemma is proved. Table 6: Labeling of L5 n,m n = 4r + i, n ≥ 9 0 ≤ j ≤ 3 m = 4t+ j m ≥ 9 0 ≤ j ≤ 3 Labeling of L5 n,m v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 j= 0 [0L4r120; 0L4t120] 2(r + t) + 3 2(r + t) + 4 10(r + t) + 6 10(r + t) + 6 −1 0 j= 1 [0L4r120;03M4t−412] 2(r + t) + 2 2(r + t) + 2 10(r + t)− 1 10(r + t)− 2 0 −1 j= 2 [0L4r120; 01L4t] 2(r + t) + 2 2(r + t) + 3 10(r + t) + 1 10(r + t) + 1 −1 0 j= 3 [0L4r120; 0L4t10] 2(r + t) + 3 2(r + t) + 3 10(r + t) + 4 10(r + t) + 3 0 1 i= 1 j= 1 [L4r1;12M ′ 4t−403] 2(r + t) + 1 2(r + t) 10(r + t)− 9 10(r + t)− 9 1 0 j= 2 [L4r1; 10L ′ 4t] 2(r + t) + 1 2(r + t) + 1 10(r + t)− 7 10(r + t)− 6 0 −1 j= 3 [L′ 4r0; 0L4t10] 2(r + t) + 2 2(r + t) + 1 10(r + t)− 4 10(r + t)− 4 1 0 i= 2 j= 2 [L′ 4r10; 01L4t] 2(r + t) + 1 2(r + t) + 2 10(r + t)− 4 10(r + t)− 4 −1 0 j= 3 [L′ 4r10; 0L4t10] 2(r + t) + 2 2(r + t) + 2 10(r + t)− 1 10(r + t)− 2 0 1 i= 3 j= 3 [11L′ 4r0;L4t100] 2(r + t) + 2 2(r + t) + 3 10(r + t) + 1 10(r + t) + 1 −1 0 Lemma 3.5.3. If 3 ≤ n ≤ 8, and 3 ≤ m ≤ 8, then the fifth power of lemniscate L5 n,m is cordial except (n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6). A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 8 of 14 Proof. Let 3 ≤ n ≤ 8, and 3 ≤ m ≤ 8 except (n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6) then using Tables 7 and formulas v0− v1and e0− e1, we can compute the values shown in the last two columns of Table 7. Since all of these values are −1, 0 or 1, then L5 n,m are cordial except (n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6). In case of (n,m) = (3, 3), it is easy to verify that L5 3,3 ∼= L3,3 is not cordial by cahit [3]. In case of (n,m) = (3, 6),(4, 5),(5, 4),(5, 6),(6, 3), and (6, 5) the graphs L5 n,m have an even order. If these graphs are cordial, it would have an equal number of vertices that are labeled ones and that are labeled zero.Otherwise |v0 − v1| > 1 and also fo the case (n,m) = (6, 6) the graph L5 6,6 has an odd order, it would have the absolute difference of the vertices labeled one from those labeled zero will be one. Otherwise |v0 − v1| > 1. The set of all different possibilities of labeling of the vertices of L5 6,6, follows that |e0 − e1| > 1, Contradiction. Hence L5 n,m ,(n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6) are not cordial. Table 7: Labeling of L5 n,m;3 ≤ n ≤ 8, and m> 8 3 ≤ n ≤ 8 3 ≤ m ≤ 8 Labeling of L5 n,m v0 v1 e0 e1 v0 − v1 e0 − e1 3 m= 4 [110; 0001] 3 3 4 5 0 −1 m= 5 [111; 10010] 3 4 7 6 −1 1 m = 7 [001; 1101110] 4 5 12 12 −1 0 m = 8 [001; 10110101] 5 5 14 15 0 −1 4 m= 4 [1000; 0111] 3 4 6 6 −1 0 m= 6 [031;0311] 5 4 11 11 1 0 m= 7 [0140;010210] 6 6 18 18 0 0 5 m = 5 [01021; 140] 4 5 10 10 −1 0 m = 7 [02101; 1201201] 5 6 15 16 −1 −1 m = 8 0103; 010214 6 6 18 18 0 0 6 m = 7 [13M4; 102102] 6 6 18 18 0 0 m = 8 [M ′ 411; 1031021] 7 6 20 21 1 −1 7 m= 7 [04M ′ 3;L ′ 412] 7 6 21 21 1 0 m = 8 1214; 1031021 7 7 24 23 0 1 8 m= 8 [1013021;103102] 8 7 26 26 1 0 Theorem 3.5.1. The fifth power of lemniscate L5 n,m cordial if and only if n,m ≥ 3 except (n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6). Proof. The proof follows directly from Lemma 3.5.1 ,..., 3.5.3. Example 3.1 The cordial graph of P 5 8 ,C 5 9 ,F 5 9 ,W 5 10, and L5 8,8are illustrated in Figures (1, ...,5). v0= 4,v1= 4,e0= 12,e1= 13,v0 − v1= 0,e0 − e1=− 1 Figure 1. P 5 8 is cordial graph. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 9 of 14 v0= 4,v1= 5,e0= 15,e1= 16,v0 − v1=− 1,e0 − e1=− 1 Figure 2. C5 9 is cordial graph. v0= 5,v1= 4,e0= 16,e1= 17,v0 − v1= 1,e0 − e1=− 1 Figure 3. F 5 9 is cordial graph. v0= 5,v1= 5,e0= 20,e1= 20,v0 − v1= 0,e0 − e1= 0 Figure 4. W 5 10 is cordial graph. v0= 8,v1= 7,e0= 26,e1= 26,v0 − v1= 1,e0 − e1= 0 Figure 5. L5 8,8 is cordial graph. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 10 of 14 4. The Cordial Labeling for Union of fifth power of Paths and Cycles In this section, we will study the cordiality of the union of two fifth power of paths, and a similar study will be performed of two fifth power of cycles. We end this section by studying the cordiality of the union fifth power of paths with cycles. Theorem 4.1. The union of P 5 n ∪ P 5 m, admits a cordial labeling for every n,m> 7. Proof. Let n= 4r+ i (i= 0, 1, 2, 3 and r ≥ 1) and m= 4t+ j (j= 0, 1, 2, 3 and t ≥ 1), then throughout the Table 2 and Table 8. Using Table 8 and formulas v0 − v1and e0 − e1, we can compute the values shown in the last two columns of Table 8. Since all of these values are −1, 0 or 1, the Theorem is proved. Table 8: Labeling of P 5 n ∪ P 5 m n = 4r + i, n ≥ 8 0 ≤ i ≤ 3 m = 4t+ j m ≥ 8 0 ≤ j ≤ 3 Labeling of P 5 n Labeling of P 5 m v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 j= 0 0L4r120 1L ′ 4tM3 2(r + t) + 4 2(r + t) + 4 10(r + t) + 5 10(r + t) + 5 0 0 j= 1 0L4r120 L4t1 2(r + t) + 2 2(r + t) + 3 10(r + t)− 3 10(r + t)− 2 −1 −1 j= 2 0L4r120 L ′ 4t10 2(r + t) + 3 2(r + t) + 3 10(r + t) 10(r + t) 0 0 j= 3 0L4r120 0L4t10 2(r + t) + 4 2(r + t) + 3 10(r + t) + 2 10(r + t) + 3 1 −1 i= 1 j= 1 L4r1 0L4t 2(r + t) + 1 2(r + t) + 1 10(r + t)− 10 10(r + t)− 10 0 0 j= 2 L4r1 L ′ 4t10 2(r + t) + 1 2(r + t) + 2 10(r + t)− 7 10(r + t)− 8 −1 1 j= 3 L4r1 L ′ 4tM3 2(r + t) + 2 2(r + t) + 2 10(r + t)− 5 10(r + t)− 5 0 0 i= 2 j= 2 L′ 4r10 L4t10 2(r + t) + 2 2(r + t) + 2 10(r + t)− 5 10(r + t)− 5 0 0 j= 3 L′ 4r10 L ′ 4tM3 2(r + t) + 3 2(r + t) + 2 10(r + t)− 2 10(r + t)− 3 1 1 i= 3 j= 3 0L4r10 L4t101 2(r + t) + 3 2(r + t) + 3 10(r + t) 10(r + t) 0 0 n= 8 m= 8 1013021 1203102 8 8 25 25 0 0 j = 0,m > 8 0414 1L ′ 4tM3 2t+ 6 2t+ 6 10t+ 6 10t+ 6 0 0 j= 1 0414 L4t1 2t+ 4 2t+ 5 10t+ 7 10t+ 8 −1 −1 j= 2 0414 L ′ 4t10 2t+ 5 2t+ 5 10t+ 10 10t+ 10 0 0 j= 3 0414 L ′ 4tM3 2t+ 6 2t+ 5 10t+ 12 10t+ 13 1 −1 Theorem 4.2. The union of C5 n ∪ C5 m, n,m> 7 admits a cordial labeling for every n,m> 7. Proof. Let n= 4r + i (0 ≤ i ≤ 3 and r ≥ 1) and m= 4t + j (0 ≤ j ≤ 3 and t ≥ 1), then throughout the Table 1 and Table 9. Using Table 9 and formulas v0 − v1 and e0 − e1, we can compute the values shown in the last two columns of Table 9. Since all of these values are −1, 0 or 1, the Theorem is proved. Table 9: Labeling of C5 n ∪ C5 m n = 4r + i, n ≥ 8 0 ≤ i ≤ 3 m = 4t+ j m ≥ 8 0 ≤ j ≤ 3 Labeling of C5 n Labeling of C5 m v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0, r > 1 j= 0, t > 1 0L4r120 0L4t120 2(r + t) + 4 2(r + t) + 4 10(r + t) + 6 10(r + t) + 6 0 0 j= 1, t > 1 0L4r120 03M4t−412 2(r + t) + 3 2(r + t) + 2 10(r + t)− 1 10(r + t)− 2 1 −1 j= 2, t > 1 0L4r120 01L4t 2(r + t) + 3 2(r + t) + 3 10(r + t) + 1 10(r + t) + 1 0 0 j= 3, t > 1 0L4r120 0L4t10 2(r + t) + 4 2(r + t) + 3 10(r + t) + 4 10(r + t) + 3 1 1 i= 1 j= 1 L4r1 12M ′ 4t−403 2(r + t) + 1 2(r + t) + 1 10(r + t)− 9 10(r + t)− 9 0 0 j= 2 L4r1 10L′ 4t 2(r + t) + 1 2(r + t) + 2 10(r + t)− 7 10(r + t)− 6 −1 −1 j= 3 L4r1 L4t10 2(r + t) + 2 2(r + t) + 2 10(r + t)− 4 10(r + t)− 4 0 0 i= 2 j= 2 L′ 4r10 01L4t 2(r + t) + 2 2(r + t) + 2 10(r + t)− 4 10(r + t)− 4 0 0 j= 3 L′ 4r10 0L4t10 2(r + t) + 3 2(r + t) + 2 10(r + t)− 1 10(r + t)− 2 1 1 i= 3 j= 3 L′ 4rM3 0L4t10 2(r + t) + 3 2(r + t) + 3 10(r + t) + 1 10(r + t) + 1 0 0 n= 8 m= 8 1013021 1203102 8 8 26 26 0 0 j = 0,m > 8 0414 04L ′ 4t−414 2t+ 6 2t+ 6 10t+ 7 10t+ 7 0 0 j= 1 0414 12M4t03 2t+ 5 2t+ 4 10t+ 8 10t+ 9 1 −1 j= 2 0414 031L4t−412 2t+ 5 2t+ 5 10t+ 11 10t+ 11 0 0 j= 3 0414 L ′ 4tM3 2t+ 6 2t+ 5 10t+ 13 10t+ 14 1 −1 A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 11 of 14 Theorem 4.3. The union of P 5 n ∪ C5 m, n,m> 7 admits a cordial labeling for every n,m> 7. Proof. Let n= 4r+ i (i= 0, 1, 2, 3 and r ≥ 1) and m= 4t+ j (j= 0, 1, 2, 3 and t ≥ 1), then throughout the Tables 1, 2 and Table 10. Using Table 10 and formulas v0− v1and e0− e1, we can compute the values shown in the last two columns of Table 10. Since all of these values are −1, 0 or 1, the Theorem is proved. Table 10: Labeling of P 5 n ∪ C5 m n = 4r + i, n ≥ 8 0 ≤ i ≤ 3 m = 4t+ j m ≥ 8 0 ≤ j ≤ 3 Labeling of P 5 n Labeling of C5 m v0 v1 e0 e1 v0 − v1 e0 − e1 i= 0 j= 0 0L4r120 0L4t120 2(r + t) + 4 2(r + t) + 4 10(r + t) + 5 10(r + t) + 6 0 −1 j= 1 0L4r120 03M4t−412 2(r + t) + 3 2(r + t) + 2 10(r + t)− 2 10(r + t)− 2 1 0 j= 2 0L4r120 01L4t 2(r + t) + 3 2(r + t) + 3 10(r + t) 10(r + t) + 1 0 −1 j= 3 0L4r120 0L4t10 2(r + t) + 4 2(r + t) + 3 10(r + t) + 3 10(r + t) + 3 1 0 i= 1 j= 0 L4r1 0L4t120 2(r + t) + 2 2(r + t) + 3 10(r + t)− 2 10(r + t)− 2 −1 0 j= 1 L4r1 12M ′ 4t−403 2(r + t) + 1 2(r + t) + 1 10(r + t)− 9 10(r + t)− 10 0 1 j= 2 L4r1 10L′ 4t 2(r + t) + 1 2(r + t) + 2 10(r + t)− 7 10(r + t)− 7 −1 0 j= 3 L4r1 L4t10 2(r + t) + 2 2(r + t) + 2 10(r + t)− 4 10(r + t)− 5 0 1 i= 2 j= 0 L′ 4r10 0L4t110 2(r + t) + 3 2(r + t) + 3 10(r + t) + 1 10(r + t) 0 1 j= 1 L′ 4r10 L4t1 2(r + t) + 1 2(r + t) + 1 10(r + t)− 7 10(r + t)− 7 0 0 j= 2 L′ 4r10 01L4t 2(r + t) + 2 2(r + t) + 2 10(r + t)− 4 10(r + t)− 5 0 1 j= 3 L′ 4r10 L4t101 2(r + t) + 2 2(r + t) + 3 10(r + t)− 2 10(r + t)− 2 −1 0 i= 3 j= 0 0L4r10 0L4t110 2(r + t) + 4 2(r + t) + 3 10(r + t) + 3 10(r + t) + 3 1 0 j= 1 0L4r10 L4t1 2(r + t) + 2 2(r + t) + 2 10(r + t)− 5 10(r + t)− 4 0 −1 j= 2 0L4r10 L′ 4t10 2(r + t) + 3 2(r + t) + 2 10(r + t)− 2 10(r + t)− 2 1 0 j= 3 L′ 4rM3 0L4t10 2(r + t) + 3 2(r + t) + 3 10(r + t) + 1 10(r + t) 0 1 n= 8 m= 8 1013021 1203102 8 8 25 26 0 −1 j = 0,m > 8 0414 1L ′ 4tM3 2t+ 6 2t+ 6 10t+ 6 10t+ 7 0 −1 j= 1 0414 12M4t03 2t+ 5 2t+ 4 10t+ 8 10t+ 8 1 0 j= 2 0414 L ′ 4t10 2t+ 5 2t+ 5 10t+ 10 10t+ 11 0 −1 j= 3 0414 L ′ 4tM3 2t+ 6 2t+ 5 10t+ 13 10t+ 13 1 0 i = 0, n > 8 m= 8 04L ′ 4r−414 0414 2r + 6 2r + 6 10r + 7 10r + 6 0 1 j= 1 12M4r03 0414 2r + 5 2r + 4 10r + 8 10r + 8 1 0 j= 2 031L4r−412 0414 2r + 5 2r + 5 10r + 11 10r + 10 0 1 j= 3 L ′ 4rM3 0414 2r + 6 2r + 5 10r + 13 10r + 13 1 0 5. Algorithm In this section, we propose an algorithm for calculating the cordial labeling for any graph G . This algorithm provides a framework for attempting to find a cordial labeling for a given graph. It’s important to note that not all graphs will admit a cordial labeling, and the specific method of assigning labels to vertices in step 3 can vary based on the graph’s structure and properties. We assume that labeling each vertex and edge takes constant time, then the time complexity of Algorithm 1 is O(n), since each vertex and edge is visited once. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 12 of 14 Algorithm1: Cordial Labeling of a Graph Input: A graph G(V, E) Output: A cordial labeling of G if it exists Begin Step 1. Initialize two counters, v(0) and v(1), to 0. Step 2. Initialize two counters, e(0) and e(1), to 0. Step 3. For each vertex v in V: a. Assign a label f(v) ∈ {0, 1} to the vertex v. b. If f(v) == 0, increment v(0); else increment v(1). Step 4. For each edge e(u, v) in E: a. Assign a label f(e) = |f(u)− f(v)| to the edge e. b. If f(e) == 0, increment e(0); else increment e(1). Step 5. Check the cordiality condition: a. If |v(0)− v(1)≤ 1 and |e(0)− e(1)≤1: i. The labeling is cordial. ii. Output the labeling of vertices and edges. b. Else: i. The graph G does not admit a cordial labeling. ii. Output that no cordial labeling exists. End Algorithm 6. Conclusion We proved that each fifth power of path P 5 n ,admits cordial labeling if and only if 1 ≤ n ≤ 3 and n > 7. Each fifth power of cycle C5 n, admits cordial labeling if and only if n = 3 and n > 8. Each fifth power of Fan F 5 n+1, admits a cordial labeling if and only if n≥ 1 except 3 ≤ n ≤ 6. The fifth power of Wheel graph Wn+1 admits cordial labeling if and only if n≥ 3 except 3 ≤ n ≤ 8. Moreover, we proved that the fifth power of lemniscate L5 n,m, admits a cordial labeling if and only if n,m ≥ 3 except (n,m) = (3, 3),(3, 6),(4, 5),(5, 4),(5, 6),(6, 3),(6, 5) and (6, 6). Also, we investigated the cordiality for the union of fifth power of paths and cycles. We proposed an algorithm for determining the cordiality of a given graph. In the future, we will apply cordial labeling to other types of graphs. Acknowledgements The Researchers would like to thank the Deanship of Graduate Studies and Scientific Research at Qassim University for financial support (QU-APC-2024-9/1). Data Availability Statement All data generated or analyzed during this study are included in this published article. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 13 of 14 Conflicts of Interest The author declares no conflict of interest. References [1] Mohammed M. Ali Al-Shamiri A. Elrokh and Atef Abd El-hay. A novel radio geo- metric mean algorithm for a graph. Symmetry, 15(3):570, 2023. [2] K. A. Alsatami, Y. Algrawani, and A. Abd El-hay. A novel problem and algorithm for solving permuted cordial labeling of corona product between two graphs. Mathe- matical Models in Engineering, 11(1):–11, 2025. [3] I. Cahit. Cordial graphs: A weaker version of graceful and harmonious graphs. Ars Combinatoria, 23:201–207, 1987. [4] I. Cahit. On cordial and 3-equitable labeling of graphs. Utilities Mathematics, 37:189– 198, 1990. [5] Narsingh Deo. Graph Theory with Application to Engineering and Computer Science. Prentice Hall of India Pvt., New Delhi, India, 2003. [6] A. T. Diab. Study of some problems of cordial. Ars Combinatoria, 92:255–261, 2009. [7] A. T. Diab. On cordial labeling of the second power of paths with other graphs. Ars Combinatoria, 97A:327–343, 2010. [8] A. T. Diab. On cordial labeling of wheels with other graphs. Ars Combinatoria, 100:265–279, 2011. [9] Atef Abd El-hay, Khalid A. Alsatami, Ashraf ELrokh, and Aya Rabie. Cordial la- beling of corona product of paths and fourth order of lemniscate graphs. European Journal of Pure and Applied Mathematics, 18(1):5470, 2025. [10] Atef Abd El-hay, Yasser Elmshtaye, and Ashraf Elrokh. Solving signed product cordial labeling of corona products of paths and the third power of lemniscate graphs. Turkish Journal of Computer and Mathematics Education (TURCOMAT), 14:806–823, 2023. [11] Atef Abd El-hay and A. Elrokh. Total cordial labeling of corona product of paths and second power of fan graph. Turkish Journal of Computer and Mathematics Education (TURCOMAT), 13(3):681–690, 2022. [12] A. Elrokh, Mohammed M. Ali Al-Shamiri, Mohammed M. A. Almazah, and Atef Abd El-hay. A novel problem for solving permuted cordial labeling of graphs. Symmetry, 15(4):825, 2023. [13] A. Elrokh, Y. Elmshtaye, and Atef Abd El-hay. The cordiality of cone and lemniscate graphs. Applied Mathematics & Information Sciences, 16:1027–1034, 2022. [14] A. Elrokh and A. Rabie. The cordiality of the sum and union of two fourth power of paths and cycles. Journal of the Egyptian Mathematical Society, 29(3):1–13, 2021. [15] Ashraf ELrokh, Mohammed M. Ali Al-Shamiri, and Atef Abd El-hay. A novel prob- lem to solve the logically labeling of corona between paths and cycles. Journal of Mathematics, 2022:Article ID 2312206, 11 pages, 2022. [16] E. A. Elsakhawy and A. T. Diab. On cordial labeling of third power of path with other graphs. Applied Mathematics & Information Sciences, 18:1195–1207, 2024. A. Abd El-hay, K. A. Alsatami, A. ELrokh / Eur. J. Pure Appl. Math, 18 (1) (2025), 5812 14 of 14 [17] J. A. Gallian. A dynamic survey of graph labeling. Electronic Journal of Combina- torics, 1(Dynamic Surveys):DS6. [18] S. W. Golomb. How to number a graph in graph theory and computing. In R. C. Read, editor, Graph Theory and Computing, page 2337. Academic Press, New York, 1972. [19] R. L. Graham and N. J. A. Sloane. On additive bases and harmonious graphs. SIAM Journal on Algebraic Discrete Mathematics, 1:382–404, 1980. [20] N. Hartsfield and G. Ringel. Pearls in Graph Theory: A Comprehensive Introduction. Academic Press Inc., Boston, USA, 1990. [21] A. Krishnaa. Some applications of labelled graphs. International Journal of Mathe- matics Trends and Technology (IJMTT), 37(3):209–213, 2016. [22] A. Rosa. On certain valuations of the vertices of a graph. In Theory of Graphs (Internet. Symposium, Rome, July 1966), pages 349–355. Gordon and Breach, N.Y. and Dunod Paris, 1967.