On the P 3 -Coloring of Bipartite Graphs

: The advancement in coloring schemes of graphs is expanding over time to solve emerging problems. Recently, a new form of coloring, namely P 3 -coloring, was introduced. A simple graph is called a P 3 -colorable graph if its vertices can be colored so that all the vertices in each P 3 path of the graph have different colors; this is called the P 3 -coloring of the graph. The minimum number of colors required to form a P 3 -coloring of a graph is called the P 3 -chromatic number of the graph. The aim of this article is to determine the P 3 -chromatic number of different well-known classes of bipartite graphs such as complete bipartite graphs, tree graphs, grid graphs, and some special types of bipartite graphs. Moreover, we have also presented some algorithms to produce a P 3 -coloring of these classes with a minimum number of colors required.


Introduction
Graph theory deals with the study of graphs, which are mathematical structures representing a set of vertices or objects connected by any set of lines; these lines are called edges. The study of graphs is a very important tool for the applications of different subjects, such as chemistry, biochemistry, computer science, communication networks, operations research, and coding theory (see [1]). The history of graph theory dates back to the 18th century when Leonhard Euler solved the famous seven bridges of Konigsberg problem (see [2]). Then, in the 19th century, graph theory was developed by mathematicians James Joseph Sylvester and Arthur Cayley (see [3]). In the 20th century, graph theory found significant importance in different fields. One of the important problems in graph theory is graph coloring, which involves assigning colors to the vertices of the graph such that no two vertices which are adjacent have the same color. Graph coloring has numerous applications, such as map coloring (see [4]), scheduling (see [5,6]), resource allocation, and register allocation (see [7]).
Graph coloring is a fundamental concept in graph theory, a branch of mathematics that deals with the study of networks or graphs. The history of graph coloring can be traced back to the 19th century when the four color theorem was first proposed by Francis Guthrie. This theorem states that any map on a plane can be colored with just four colors in such a way that no two adjacent regions have the same color. The proof of this theorem took several decades and involved significant mathematical developments, including the use of computers to verify thousands of cases. In 1880, Tait proved in [8] that the four color theorem is equivalent to the conjecture saying that every cubic map has a proper edge coloring with three colors. Haken et al. introduced a new type of coloring, face and map coloring [9]. The four color theorem sparked great interest in graph coloring and led to further research and the development of various coloring techniques. There are different types of graph coloring, each serving a specific purpose. The most well-known type is vertex coloring, where the goal is to assign colors to the vertices of a graph in such a way that no two adjacent vertices share the same color [10,11]. Another type is edge coloring, which focuses on coloring the edges of a graph so that no two adjacent edges have the same color [10,11]. In [12], Zhou discussed edge coloring and its applications.
A detailed review on vertex coloring was given in [13,14]. Baber described list coloring in [15]. A detailed review about list coloring and some properties and algorithms of list coloring are included in [16,17]. Jenson et al. explained path coloring in [18]. Total coloring is also a type of graph coloring, and a complete review of it was provided in [19]; the algorithm of total coloring was constructed by Isobe in [20]. These various types of graph coloring have contributed to a wide range of applications and continue to be studied and refined by mathematicians and computer scientists. Moreover, there are also different types of vertex coloring and edge coloring, such as Equitable vertex coloring [21][22][23], Circular vertex coloring [24][25][26], Acyclic vertex coloring [27,28], Star vertex coloring [28,29], Circular edge coloring [30], Acyclic edge coloring [31][32][33], Baerge Fulkerson coloring [34], and Fan Raspand coloring [35]. In 2023, Naeem et al. introduced (see [36]) a new form of graph coloring, "P 3 -coloring", and they gave some general results about this coloring. In [36], the authors have also discussed P 3 -coloring of some well-known families of graphs such as complete graphs, wheel graphs, star graphs, cycle graphs, prism graphs, ladder graphs, and path graphs. Definition 1. Let G be a simple graph and let : V(G) → {c 1 , c 2 , . . . , c k } be coloring of the vertices of G. If, for every P 3 path in G, the colors of its vertices are different, then is called P 3 -coloring of G, that is, if uvw is a P 3 path on G, then (u) = (v) = (w) = (u).

Definition 2.
For a graph G, the minimum number of colors (or k in above definition) required to produce (or form) a P 3 -coloring is called the P 3 -chromatic number of G. It is denoted as χ 3 (G). It is worth noticing that for all graphs G, we have χ 3 (G) ≥ 3.
The following results are useful to prove some of our main Theorems in this article. Theorem 1 ([36], Corollary 3). Let S n be a star graph on n vertices; then χ 3 (S n ) = n, for all n ≥ 3. Theorem 2 ([36], Theorem 1). Let G be a graph and H be a subgraph of G; then χ 3 (G) ≥ χ 3 (H).
The aim of this article is to discuss the P 3 -coloring and P 3 -chromatic number of bipartite graphs. Trees are one of the well-known types of bipartite graphs, and in Theorem 3, we have proved that χ 3 of a tree graph is ∆(T) + 1, where ∆(T) is the maximum degree of the tree graph. Theorem 4 discusses the P 3 -chromatic number of complete bipartite graphs. The mesh graph or the grid graphs are also bipartite graphs and the P 3 -chromatic number of grid graphs is discussed in Theorem 5. Section 4 contains the main result of this article. In Theorem 6, we give the formula for the P 3 -chromatic number of any bipartite graph having exactly one cycle. Moreover, we have also presented algorithms of these results, and using these algorithms, we can produce the P 3 -coloring with a minimum number of colors.

P 3 -Chromatic Number of Tree and Complete Bipartite Graphs
In graph theory, a tree is a simple graph in which any two vertices are connected by exactly one path, that is, a tree is a simple graph having no cycles. A tree graph is also a bipartite graph. A bipartite graph is a graph such that its vertices are partitioned into two sets of vertices in such a way that any edge of the graph connects only the vertices of one set to another. A complete bipartite graph is a special kind of bipartite graph such that In this graph, every vertex of set V 1 is connected with every vertex of set V 2 . It is denoted by K m,n , where m and n are the number of vertices of the set V 1 and the set V 2 , respectively.
In this section, we have determined the P 3 -chromatic number of tree graphs and complete bipartite graphs. Let T be a tree graph and ∆(T) be the maximum degree of T. We have the following useful notions about the coloring of a graph and its elements: • A P 3 path has different colors if all the vertices in P 3 are of different colors. • We say that a vertex u of the graph G is P 3 colored if all the P 3 paths containing u have different colors.
Proof. Let T be a tree graph on n ≥ 3 vertices and let ∆(T) be the maximum degree of T. Then, there exists a star subgraph S m of T with ∆(T) + 1 vertices. By Theorem 1, we have χ 3 (S m ) = m = ∆(T) + 1, and by Theorem 2, For the converse, we draw the tree graph as shown in Figure 1, where we consider all the vertices with degree ∆(T) in the first layer. As we move down in the layers by following any path, the degree of the vertices is decreasing and the degree of the vertices in the last layer is 1. In a tree graph, the path between all the vertices is unique, and if there is a P 3 path between any two vertices, then it is also unique. To show that χ 3 (T) ≤ ∆(T) + 1, we will show that ∆(T) + 1 colors are enough to produce P 3 -coloring of T. Let C be the set of colors and |C| = ∆(T) + 1. We will produce a P 3 color function f from vertices of T to C. Notice that, in any coloring of a graph, if every vertex of the graph is P 3 colored, then such coloring is a P 3 -coloring. Using this observation, firstly, we will show that x 1 is P 3 colored. So we start by assigning the color f (x 1 ) to x 1 and the remaining ∆(T) colors are assigned to the neighboring vertices of x 1 . In this way, the x 1 vertex is P 3 colored. To explain this claim, consider the vertex x 1 , as shown in Figure 1. The degree of x 1 is ∆(T), and let f (x 1 ) be the color of x 1 . There exist three types of P 3 paths that contain x 1 . The first type of P 3 path has x 1 as the middle vertex, the second type of P 3 path is the path whose one end point is x 1 and other is some x i (if possible), and the third type of path is the path with one end as x 1 and the other as the vertex b 1k ; such a path has some a 1j as the middle vertex. The first type of path whose middle vertex is x 1 is clearly of different colors under the assignment that we used. For the second type of path having x 1 as one end and the other as one of x i (if it exists), we will have ∆(T) − 1 choices of colors from C because there cannot exist any cycle in a tree graph, so any such x i must be adjacent to exactly one neighbor of x 1 . So, without any loss of generality, we can use the same color for such x i as the color of any neighbor of x 1 that is not adjacent to x i . We shall always prefer the fewest colors for the x i s (that is, if the set of colors has elements with increasing subscripts, then the first choice of color will be the color having the least subscripts). Now, for the third type of path (say x 1 a 1j b 1k ) having one end point as x 1 and the other as b 1k , we will assign different colors f (b 1k ) from C to these vertices b 1k , such as the colors f (x 1 ) and f (a 1j ); see Figure 2. Because d(a 1j ) < d(x 1 ), we will have at least ∆(T) − 2 choices for such a color scheme. So, this third type of path containing x 1 also has different colors. Thus, x 1 is a P 3 colored vertex. Now, to show that the vertices in the second layer are also P 3 -colored with the set C, we observe that if there is a vertex such as a 11 , then this vertex is already P 3 colored by the above coloring scheme. For the other types of vertices, such as a 12 in Figure 1, we proceed as follows. There are three possible P 3 paths that contain the vertex a 12 . One path has x 1 as the middle vertex and a 12 as the end vertex (such as a 11 x 1 a 12 ). The second type of path is that which starts from a 12 and goes down to the descendant vertices (like a 12 b 11 d 11 ). The third type is the P 3 path that contains a 12 as the middle vertex (such as b 11 a 12 b 12 or x 1 a 12 b 11 ). The first and third types of these P 3 paths already have different colors. For the second type of P 3 path, which has a middle vertex from b 1k s such as a 12 b 11 d 11 , we assign different colors from C to the vertices d ik so that none of these colors are equal to the assigned color of the middle vertex b 1k and f (a 12 ). Since deg(b 1k ) < deg(x 1 ), we have at least ∆(T) − 2 choices of such colors. In this way, the third type of P 3 path has different colors. Thus, the vertex a 12 is P 3 colored. So, we can use ∆(T) + 1 or less colors for P 3 -coloring of all the P 3 paths that contain a 12 . Similarly, we can show that the vertex a 12 is P 3 colored. Now, for the vertices in the third and all lower layers, we can use same scheme of coloring using at most ∆(T) + 1 colors. We will apply the same scheme for the rest of the vertices of the graph T. This shows that all the vertices of T can be P 3 colorable with at most ∆(T) + 1 colors. Therefore, by the definition of P 3 -chromatic number, χ 3 (T) ≤ ∆(T) + 1. This concludes the proof.
Algorithm to produce a P 3 -coloring of tree graphs Let T be a tree graph. Draw the tree graph shaped like a rooted tree such that all the vertices with maximum degree are in the first layer. Let C be a color class with colors To understand the algorithm, we have labelled vertices of the k-th layer by x k α 1 α 2 ...α k . It represents a complete tracing of the vertices, that is, this is a vertex in the k-th layer which is connected to a vertex in the first layer by the path For example, the vertex x 2 α i α 3 shows that it is the third vertex of the second layer and it is adjacent to the i-th vertex x 1 α i of the first layer. Let f : V(T) → C be the coloring function defined by the following steps. Fix f (x 1 α 1 ) = c 1 .
Step 2: Select a colored vertex, say x 2 α 1 α i , from the second layer having neighbor vertices in its lower layers and assign colors to these neighbor vertices in such way that the colors we are choosing are not assigned to x 2 α 1 α i and to the neighbors of x 2 α 1 α i in the upper layer.
Step 3: Apply "Step 2" to the vertices of lower layers having x 1 1 as the top vertex.
Step 4: Select a vertex, say x 1 α s , from first layer, which is already assigned a color, say c j , then apply "Step 1" to x 1 α s by setting c 1 = c j . Moreover, apply "Step 3" to x 1 α s .
Step 5: Repeat "Step 4" until all the vertices have their colors. Example 1. For a better understanding of this algorithm, we provide an example. Consider a tree graph T as shown in Figure 3a.  Arrange the graph in such a way that all the vertices with maximum degree are in the first layer (see Figure 3b), where we can see that ∆(T) = 4. Consider the color class Step 1:  The following Theorem 4 formulates the P 3 -chromatic number of the complete bipartite graph.

Theorem 4.
Let K m,n be a complete bipartite graph; then χ 3 (K m,n ) = m + n.
Proof. Let K m,n be a complete bipartite graph with two sets of vertices U and V, where U has m number of vertices and V has n number of vertices.
As the graph is complete bipartite, every vertex of set U is adjacent to each vertex of set V (see Figure 5). Now if we assign a color 0 to the vertex a 1 , then for the vertex a 1 to be a P 3 colored vertex, we must assign n different colors to b i s. Now, select any vertex a s different from a 1 ; then for this vertex to be a P 3 colored vertex, we cannot assign any color from the set {0, 1, . . . n}. Because the path a 1 b t a s is the P 3 path containing a s for any arbitrary vertex b t , we cannot assign the colors of b t and a 1 to a s . So, we must use a different color for every vertex of K m,n for P 3 -labelling. Therefore, the number of colors must be equal to the number of vertices of K m,n and the number of vertices of K m,n is m + n. Thus, χ 3 (K m,n ) = m + n.

P 3 -Chromatic Number of Grid Graph
In this section, we have computed the P 3 chromatic number of the grid graph. A grid graph is also one of the many well-known bipartite graphs. It is the Cartesian product P m P n of path graphs with m and n vertices. The m × n grid graph is also denoted by L(m, n). Grid graphs are also known as lattice graphs or rectangular graphs. In Theorem 5, the generalized form of the P 3 -chromatic number of grid graph (P m P n ) is determined, where m, n ≥ 3.

Theorem 5.
Let P m P n be the grid graph; then χ 3 (P m P n ) = 5 for all m, n ≥ 3.

Proof.
Let P m P n be a grid graph with m, n ≥ 3. From the definition of grid graph and from Figure 6, we can see that the star graph S 5 is a subgraph of P m P n . Then, by Theorem 1 and Theorem 2, P m P n ≥ 5. This means that we need at least 5 colors for the P 3 -coloring of P m P n . To prove the converse, we will define a P 3 -labeling f : V(P m P n ) → {0, 1, 2, 3, 4}, where the set {0, 1, 2, 3, 4} is the set of colors. Let j ∈ {0, . . . , m − 1}; then we define f as follows. f To show that f is indeed a P 3 -coloring, we must show that each vertex of P m P n is P 3 colored. As the graph is symmetric, it is sufficient to show that the vertices on P 3 paths in Figure 7 have this property. Because every vertex in P m P n lies on one of these type of figures, if the vertices of Figure 7 are P 3 colored, then with the same scheme, we can say that it would be true for all vertices of the grid graph.   01 a 02 , a 00 a 01 a 11 , a 00 a 10 a 20 , a 00 a 10 a 11 , a 01 a 00 a 10 .
We shall discuss only one path from the above five paths to show that they are colored. Similarly, the other paths can be shown to be colored. Let us consider the path a 01 a 00 a 10 ; then f (a 01 ) = 1, f (a 00 ) = 0, f (a 10 ) = 2. Now, for i = 0 and j = 1, the sub-graph in Figure 7b shows that there are eight possible P 3 paths that contain the vertex a 01 , and the list of such paths is a 00 a 01 a 02 , a 00 a 01 a 11 , a 02 a 01 a 11 , a 01 a 02 a 03 , a 01 a 11 a 12 , a 01 a 11 a 10 , a 01 a 00 a 10 , a 01 a 02 a 12 . We shall discuss only one path from the above eight paths to show that they are colored. Similarly, the other paths can be shown to be colored. Let us consider the path a 00 a 01 a 02 ; then f (a 00 ) = 0, f (a 01 ) = 1, f (a 02 ) = 2.
For i = 0 and 1 < j < m − 2, the sub-graph in Figure 7b shows that there are nine possible P 3 paths that contain the vertex a ij , and these P 3 path are a i j−1 a ij a i j+1 , a i j−1 a ij a i+1 j , a i j+1 a ij a i+1 j , a ij a i j+1 a i j+2 , a ij a i+1 j a i+1 j+1 , a ij a i+1 j a i+1 j−1 , a ij a i j−1 a i j−2 , a ij a i j−1 a i+1 j−1 , a ij a i j+1 a i+1 j+1 .
Similarly, as above, we shall discuss only one path from the above nine paths to show that they are colored. The other paths can be shown to be colored by following a similar technique. Note that this case also proves that the result is true under the condition on the subscripts i and j as follows.
We shall discuss only one possibility here; the proofs for others will follow similarly. Let us consider the path a i j−1 a ij a i j+1 , then f (a i j−1 ) = 2i + j − 1, f (a ij ) = 2i + j, and f (a i j+1 ) = 2i + j + 1.
Thus, all the vertices on the four sides of the grid are P 3 colored. Figure  f(a n-1m-1 ) f(a n-1 7 ) f(a n-1 6 ) f(a n-1 5 ) f(a n-1 4 ) f(a n-1 3 ) f(a n-1 2 ) f(a n-1 1 ) f(a n-1 0 ) 2 4 Figure 8. P 3 -labelling of P m P n . Now, we can see from Figure 7c that the vertex a ij , where 1 ≤ i ≤ n − 2, 1 ≤ j ≤ m − 2, is contained in the following eighteen P 3 paths: (i) a i−1 j a ij a i+1 j , (ii) a i j−1 a ij a i j+1 , (iii) a i−1 j a ij a i j−1 , (iv) a i−1 j a ij a i j+1 , (v) a i j−1 a ij a i+1 j , (vi) a i j+1 a ij a i+1 j , (vii) a ij a i+1 j a i+2 j , (viii) a ij a i−1 j a i−2 j , (ix) a ij a i j+1 a i j+2 , (x) a ij a i j−1 a i j−2 , (xi) a ij a i+1 j a i+1 j−1 , (xii) a ij a i+1 j a i+1 j+1 , (xiii) a ij a i j+1 a i+1 j+1 , (xiv) a ij a i j−1 a i+1 j−1 , (xv) a ij a i j+1 a i−1 j+1 , (xvi) a ij a i j−1 a i−1 j−1 , (xvii) a ij a i−1 j a i−1 j+1 , (xviii) a ij a i−1 j a i−1 j−1 .
We shall discuss one P 3 path from the above list. The computations for other paths will follow similarly. So, consider an arbitrary P 3 path from the above list, say a ij a i j+1 a i j+2 ; then f (a ij ) = 2i + j, f (a i j+1 ) = 2i + j + 1 and f (a i j+2 ) = 2i + j + 2.
This shows that all P 3 paths in this case are colored. Therefore, all the internal vertices of the grid graph are P 3 colored and this proves that f is a P 3 -coloring. Similarly, every vertex is P 3 colored in all the cases. So, χ 3 (P m P n ) = 5.

P 3 -Chromatic Number of Bipartite Graphs Having Exactly One Cycle.
In this section, we have discussed the P 3 chromatic number for a special class of bipartite graphs consisting of one or more cycles under different conditions. Theorem 6 provides the P 3 -chromatic number of bipartite graphs, which contains exactly one cycle. We have constructed an algorithm for Theorem 6 after its proof. Theorem 6. Let G be a bipartite graph having exactly one cycle; then χ 3 (G) = ∆(G) + 1.
Proof. Let G be a bipartite graph having exactly one cycle, with U and V being a vertex partition of V(G). For simplicity, let ∆(G) = deg(u 1 ). Then, it contains a star subgraph S m , such that m = ∆(G) + 1. By Theorem 1, we have χ 3 (S m ) = ∆(G) + 1, and from Theorem 2, we obtain χ 3 (G) ≥ χ 3 (S m ). So, For the converse, we need to show that every vertex G can be P 3 colored with a color class C = {α i | i = 1, 2, 3, . . . , ∆(G) + 1}, that is, no vertices in any P 3 path have the same colors. For this, we will arrange(or draw) the graph in such a way that all the vertices having maximum degree are on the leftmost side of the graph and the degrees of the vertices are in decreasing order from left to right, as shown in Figure 9, where  Figure 9. A bipartite graph G with one cycle. Cycle is in color. Now, consider the vertex u 1 of the graph G. The vertex u 1 is adjacent to ∆(G) vertices of the set V. Therefore, we can assign ∆(G) + 1 different colors to u 1 and to its ∆(G) neighbors for the production of a P 3 -coloring, as shown in Figure 10.
. . . f(u 1 )=α 1 α 4 α t+1 α 3 α 2 The graph G is a bipartite graph that contains a cycle, so there will be vertices which are connected by more than one P 3 path. Moreover, there are two types of P 3 paths containing each vertex x ∈ V(G). In one P 3 path, the vertex x is a middle vertex (with end points from the opposite set of vertices U or V), and in the second type of P 3 path, the vertex x is one of the two end points (with the other end vertex from the same set U or V). So, for the vertex u 1 , there also exist two types of P 3 paths which contain u 1 . The first type of P 3 paths would be the paths whose middle vertex is u 1 and end points must be some v i s, for i ∈ {1, 2, 3, . . . , ∆(G)}; these types of P 3 paths are highlighted in Figure 11.
u m u 6 u 5 u 4 u 3 u 2 Figure 11. P 3 paths whose middle vertex is u 1 .
The second type of P 3 path that contains u 1 starts from u 1 and must end at some other u i , where the number of such u i s is at most ∆(G); such types of P 3 paths are shown in Figure 12.
u m u 6 u 5 u 4 u 3 u 2 Figure 12. P 3 paths which start from u 1 and end at any other u i The first type of P 3 path which contains u 1 as the middle vertex is already colored because its end points are v i s, and such v i s are neighbors of u 1 . From Figure 10, it is clear that we have already assigned colors to u 1 and its neighbor vertices using the C color class that has ∆(G) + 1 colors. Now, for the second type of P 3 path containing u 1 that starts from u 1 and ends at some other u i , the middle vertex of these types of P 3 paths must be some v i . Such v i s are already assigned colors, as shown in Figure 10. So, now we need to assign color only to u i s, which are the end points of this second type of P 3 path.
To continue the procedure of producing a P 3 -coloring, we will assign colors to these u i s (from the same color class C) which are not assigned to u 1 and to the neighbors of these u i s. As there exists only one cycle, in these types of paths, any u i can be adjacent to at most two neighbors of u 1 . Therefore, we can use the colors of v j s, say α j s, which are not adjacent to u i , so in this way, we will have at least ∆(G) − 2 and ∆(G) − 1 choices of colors for each u i when u i is adjacent to two and one neighbors of u 1 , respectively. Therefore, to produce a P 3 -coloring at u 1 for the second type of P 3 paths, we can assign colors to such u i s from left to right in decreasing order with respect to subscripts of colors, as shown in Figure 13. Thus, u 1 is P 3 colored.  Now, consider any other u i (if it exists) that is not colored yet, say u . For example, in Figure 14, the vertex u 3 is such a vertex. We will show that u is also P 3 colored. For this, firstly, we will assign α 1 color to u , as shown in Figure 14; the vertex u 3 is assigned the color α 1 . Figure 14. Assignment of color to u . Here, it is u 3 .
We can use the color assigned to u 1 for u because u is not adjacent to u 1 and also u is not contained in any P 3 path that contains u 1 . The vertex u is also contained in two types of P 3 paths. The first type of path is the path having a middle vertex as u . The degree of the vertex u is less than or equal to ∆(G), so for its coloring, we can use the same color class C; see Figure 15. We will assign those colors to neighbors v j s of u which are not used for u , not used for the u i s, which are the end points of P 3 paths with u as the second end point, and not used for the previous colored v i s, which are the end points of P 3 paths with v j s as the second end point (e.g., in Figure 15, we will not assign colors α 1 , α 3 , and α 2 to v 4 ). We will have choices of colors from C for v j s because there is only one cycle, and the degree of the vertices u , u i s, and v i s (which are already assigned a color in some P 3 paths) is not more than ∆(G).  Now, consider the second type of P 3 path having u as one end point and u i as the second end point (other than u ). Note that some vertices of these types of paths may already be colored, while some may not be. The ones that are not yet assigned colors, such as u i s, are not adjacent to any v i that is adjacent to any u k whose P 3 -coloring is already completed. There will be choices (at least one) of colors for such vertices from color class C. For example, the second type of P 3 path for the vertex u 3 in Figure 15 is already colored. Similarly, for any u i that is not assigned color, we can use color class C. That u i must be contained in at most two types of P 3 paths with the same conditions. So, with the same technique, a P 3 -coloring of all the P 3 paths which contain u i s can be produced by using the same color class C. We will select the fewest colors (with respect to the order in the subscripts) when selecting the colors of vertices u i s which are not used for vertices of any P 3 that contains the vertex u i . We will apply this same scheme until all the u i s are colored. After assigning colors to vertices u i s, we shall have two cases: (1) All v p s are colored.
(2) Some v p s are not colored. See Figure 15.
In the first case, the P 3 -coloring of the graph is already completed. So, we will obtain our required result. But in the second case, we will consider the u i vertex that is already colored, but some v p that are adjacent to that u i are not colored yet. That u i must be contained in two types of P 3 paths. The first type of P 3 path has that u i as its middle vertex (and v p as one end point), and in the second type of P 3 path, that u i would be one end point of the paths, and the other end point would be any other u i (with v p as the middle vertex). For the first type of path, we need to color only v p s because u i is already colored. As the degree of that u i must be less than or equal to ∆(G), u i must be connected with at most ∆(G) types of v p s. So, we can use the colors from C that are not used for the neighbors of that v p and also not used for the neighbors of the neighbors of v p s. As the considered vertex u i is already colored, but some of its neighbors are not colored, it shows that this u i is the end point of any P 3 path whose other end point is some different u p who is already P 3 colored and this u i is assigned a color when we colored the second type of P 3 paths that contain the u p vertex as their one end point. So, it means we can use the colors of that u p , say α p , for the v p .
For example, the v 3 vertex is such a vertex in Figure 15, and it is assigned a color as shown in Figure 16, where f (u 1 ) and f (v 3 ) are the colors of vertices u 1 and v 3 , respectively. By using this scheme, all the v p s in this type of path would be colored by using same color class C. Then, we do not need to color the second type of P 3 path because that must already be colored, as here we assigned colors to v p s and all the u i s are already labelled. So, by using this technique, we can color all the remaining vertices of set V by using at most ∆(G) + 1 colors (see Figure 16). The process will end eventually since the graph is finite and the degree of vertices is non-increasing from left to right, with every vertex becoming P 3 colored in the process with at most ∆(G) + 1 colors. Therefore, χ 3 (G) ≤ ∆(G) + 1. We have already proved that χ 3 (G) ≥ ∆(G) + 1; therefore, Algorithm to produce a P 3 -coloring of graphs for Theorem 6 Let G be a bipartite graph having exactly one cycle and V(G) = U ∪ V be the vertex partition of G. Let ∆(G) be the maximum degree of G. Arrange the bipartite graph such that d( We define a P 3 -coloring f : V(G) → C, where C = {α i | i = 1, 2, . . . , ∆(G) + 1}. Let d(u 1 ) = ∆(G) and fix f (u 1 ) = α 1 .
Step 2: Select the vertex v j ∈ N(u 1 ) that already has a color, say α j , and assign different colors to neighbors of v j . Choose colors that are not used for other neighbors of v j .
Step 3: Select the immediate next vertex of set U which is not colored yet, say u s , and put f (u s ) = α 1 . Then apply Step 1 and Step 2 to u s .
Step 4: Repeat Step 3 until all the u i s are not colored.
Step 5: Select the vertex from set V which is not yet colored, say v t . Assign the color α t to the vertex v t where α t is the color that is not assigned to neighbors of v t and neighbors of its neighbors.
Step 6: Repeat Step 5 until all the v t s are not colored.
Step 3: Select the immediate next vertex u 6 of set U which is not colored yet and assign f (u 6 ) = α 1 . The vertex v 3 is the only neighbor of u 6 , and we assign f (v 3 ) = α 4 .
Step 4: All the u i s are already colored. So we move to Step 5.
Step 5: The vertex v 5 from set V is not colored yet. We assign f (v 5 ) = α 1 .
Thus, Figure 19 represents the final P 3 -coloring of the graph.  Figure 19. P 3 -labelling of G.

Conclusions
In this article, the main interest of the authors was to study a recently introduced coloring of graphs called P 3 -coloring. This coloring arises as a natural generalization of the coloring of a graph. In this respect, we have determined the P 3 -chromatic number of different families of bipartite graphs. We have formalized the P 3 -chromatic number of tree graphs, grid graphs, complete bipartite graphs, and the class of bipartite graphs that have only one cycle. Moreover, we have also presented algorithms to produce a P 3 -coloring of tree graphs, grid graphs, and the bipartite graphs that have exactly one cycle with the minimum number of colors. In the future, the authors are interested in extending this study and making some more significant advancements.