Next Article in Journal
Concurrent Topology Optimization of Multi-Scale Composite Structures Subjected to Dynamic Loads in the Time Domain
Next Article in Special Issue
Graphs Defined on Rings: A Review
Previous Article in Journal
One New Property of a Class of Linear Time-Optimal Control Problems
Previous Article in Special Issue
Crossing Numbers of Join Product with Discrete Graphs: A Study on 6-Vertex Graphs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the P3-Coloring of Bipartite Graphs

1
College of Information Technology, Anhui Vocational College of Defense Technology, Luan 237011, China
2
Department of Mathematics, COMSATS University Islamabad, Sahiwal 57000, Pakistan
*
Author to whom correspondence should be addressed.
Mathematics 2023, 11(16), 3487; https://doi.org/10.3390/math11163487
Submission received: 16 June 2023 / Revised: 14 July 2023 / Accepted: 8 August 2023 / Published: 12 August 2023
(This article belongs to the Special Issue Advances in Topological Graph Theory)

Abstract

:
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.

1. 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 u v w 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.

2. 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 V ( G ) = V 1 V 2 . 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.
Theorem 3.
Let T be a tree graph on n vertices; then χ 3 ( T ) = Δ ( T ) + 1 .
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, χ 3 ( T ) χ 3 ( S m ) . So, χ 3 ( T ) Δ ( T ) + 1 . 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 1 k ; such a path has some a 1 j 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 1 j b 1 k ) having one end point as x 1 and the other as b 1 k , we will assign different colors f ( b 1 k ) from C to these vertices b 1 k , such as the colors f ( x 1 ) and f ( a 1 j ) ; see Figure 2. Because d ( a 1 j ) < 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 1 k s such as a 12 b 11 d 11 , we assign different colors from C to the vertices d i k so that none of these colors are equal to the assigned color of the middle vertex b 1 k and f ( a 12 ) . Since d e g ( b 1 k ) < d e g ( 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 { c i | i = 1 , 2 , , Δ ( T ) + 1 } . So, | C | = Δ ( T ) + 1 . To understand the algorithm, we have labelled vertices of the k-th layer by x α 1 α 2 α k 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 x α 1 1 x α 1 α 2 2 x α 1 α 2 α k k . For example, the vertex x α i α 3 2 shows that it is the third vertex of the second layer and it is adjacent to the i-th vertex x α i 1 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 1:
If x α i 1 , x α 1 α i 2 N ( x α 1 1 ) , then f ( x α i 1 ) = c i , for i = 2 , 3 , , s and f ( x α 1 α i 2 ) = c j , for j = s + 1 , s + 2 , , Δ ( T ) + 1 . We shall prefer the fewest colors for x α i 1 s while selecting the color of these vertices.
Step 2:
Select a colored vertex, say x α 1 α i 2 , 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 α 1 α i 2 and to the neighbors of x α 1 α i 2 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 α s 1 , from first layer, which is already assigned a color, say c j , then apply “Step 1” to x α s 1 by setting c 1 = c j . Moreover, apply “Step 3” to x α s 1 .
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 C = { c 1 , c 2 , c 3 , c 4 , c 5 } . Fix f ( x 1 1 ) = c 1 .
Step 1:
The N ( x 1 1 ) = { x 11 2 , x 12 2 , x 13 2 , x 14 2 } . So, we set f ( x 11 2 ) = c 2 , f ( x 12 2 ) = c 3 , f ( x 13 2 ) = c 4 , f ( x 14 2 ) = c 5 .
Step 2:
The assignment of colors to the neighbors of x 13 2 which are not yet assigned any color yet is f ( x 131 3 ) = c 2 , f ( x 132 3 ) = c 3 .
The assignment of colors to the neighbors of x 14 2 which are not yet assigned any color is f ( x 2 1 ) = c 2 , f ( x 141 3 ) = c 3 .
Step 3:
There is only one vertex x 1321 4 in the neighbor of x 132 3 which is not assigned any color, so we put f ( x 1321 4 ) = c 1 .
The assignment of colors to the neighbors of x 141 3 which are not yet assigned any color is f ( x 1411 4 ) = c 1 , f ( x 1412 4 ) = c 2 .
There is only one vertex x 14121 5 in the neighbor of x 1412 4 which is not assigned any color, so we put f ( x 14121 5 ) = c 1 .
Step 4:
The assignment of colors to the neighbors of x 2 1 which are not yet assigned any color is f ( x 21 2 ) = c 1 , f ( x 22 2 ) = c 3 , f ( x 23 2 ) = c 4 .
The assignment of colors to the neighbors of x 21 2 which are not yet assigned any color is f ( x 211 3 ) = c 3 , f ( x 212 3 ) = c 4 .
There is only one vertex x 221 3 in the neighbor of x 22 2 which is not assigned any color, so we put f ( x 221 3 ) = c 4 .
There is only one vertex x 231 3 in the neighbor of x 23 2 which is not assigned any color, so we put f ( x 231 3 ) = c 5 .
Step 5:
All the vertices are already colored; see Figure 4. This completes the example.
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 . □

3. 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 ( a i j ) = 2 i + j ( mod 5 ) , 0 i n 1 , 0 j m 1 .
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.
Figure 7a represents the four subgraphs on corners of the grid graph, Figure 7b represents such subgraphs on the borderline of the grid graph, and Figure 7c represents all such internal subgraphs of the grid graph. In Figure 7a, there are five possible P 3 paths containing the vertex a 00 , where 0 i 2 and 0 j 2 . The paths are
a 00 a 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 i j , and these P 3 path are
a i j 1 a i j a i j + 1 , a i j 1 a i j a i + 1 j , a i j + 1 a i j a i + 1 j , a i j a i j + 1 a i j + 2 , a i j a i + 1 j a i + 1 j + 1 , a i j a i + 1 j a i + 1 j 1 ,
a i j a i j 1 a i j 2 , a i j a i j 1 a i + 1 j 1 , a i j 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.
For i = 0 , n 1 we have 1 < j < m 2 , and for j = 0 , m 1 we have 1 < i < n 2 .
We shall discuss only one possibility here; the proofs for others will follow similarly. Let us consider the path a i j 1 a i j a i j + 1 , then f ( a i j 1 ) = 2 i + j 1 , f ( a i j ) = 2 i + j , and f ( a i j + 1 ) = 2 i + j + 1 .
Thus, all the vertices on the four sides of the grid are P 3 colored. Figure 8 represents the P 3 -coloring and algorithm under the function f .
Now, we can see from Figure 7c that the vertex a i j , where 1 i n 2 , 1 j m 2 , is contained in the following eighteen P 3 paths:
( i ) a i 1 j a i j a i + 1 j , ( ii ) a i j 1 a i j a i j + 1 , ( iii ) a i 1 j a i j a i j 1 , ( iv ) a i 1 j a i j a i j + 1 , ( v ) a i j 1 a i j a i + 1 j , ( vi ) a i j + 1 a i j a i + 1 j , ( vii ) a i j a i + 1 j a i + 2 j , ( viii ) a i j a i 1 j a i 2 j , ( ix ) a i j a i j + 1 a i j + 2 , ( x ) a i j a i j 1 a i j 2 , ( xi ) a i j a i + 1 j a i + 1 j 1 , ( xii ) a i j a i + 1 j a i + 1 j + 1 , ( xiii ) a i j a i j + 1 a i + 1 j + 1 , ( xiv ) a i j a i j 1 a i + 1 j 1 , ( xv ) a i j a i j + 1 a i 1 j + 1 , ( xvi ) a i j a i j 1 a i 1 j 1 , ( xvii ) a i j a i 1 j a i 1 j + 1 , ( xviii ) a i j 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 i j a i j + 1 a i j + 2 ; then
f ( a i j ) = 2 i + j , f ( a i j + 1 ) = 2 i + j + 1 and f ( a i j + 2 ) = 2 i + 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 . □

4. 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,
χ 3 ( G ) Δ ( G ) + 1
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 d e g ( u 1 ) d e g ( u 2 ) d e g ( u 3 ) d e g ( u m ) , and the same for the v i ’s.
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.
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.
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.
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 .
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,
χ 3 ( G ) = Δ ( G ) + 1 .
Figure 16. f ( u 1 ) = f ( v 3 ) .
Figure 16. f ( u 1 ) = f ( v 3 ) .
Mathematics 11 03487 g016
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 ( u 1 ) d ( u 2 ) d ( u 3 ) d ( u m ) , d ( v 1 ) d ( v 2 ) d ( v 3 ) d ( v n ) from left to right. 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 1:
If v j N ( u 1 ) then f ( v j ) = α i , i = 2 , 3 , , Δ ( G ) + 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.
Example 2.
Consider the bipartite graph G having exactly one cycle, as depicted in Figure 17.
Arrange graph G such that the degrees of the vertices are in decreasing order from left to right, as shown in Figure 18. We can see Δ ( G ) = 4 . So, C = { α i | i = 1 , 2 , 3 , 4 , 5 } . Fix f ( u 1 ) = α 1 .
Step 1:
We have N ( u 1 ) = { v 1 , v 2 , v 4 , v 8 } . We consider the assignment of colors to the neighbors of u 1 as f ( v 1 ) = α 2 , f ( v 2 ) = α 3 , f ( v 4 ) = α 4 , f ( v 8 ) = α 5 .
Step 2:
The neighborhood of v 1 is { u 1 , u 3 , u 4 , u 5 } ; therefore, we assign f ( u 3 ) = α 3 , f ( u 4 ) = α 4 , and f ( u 5 ) = α 5 .
The neighborhood of v 2 is { u 1 , u 2 , u 7 , u 8 } ; therefore, we assign f ( u 2 ) = α 2 , f ( u 7 ) = α 4 , and f ( u 8 ) = α 5 .
The neighborhood of v 4 is { u 1 , u 9 } ; therefore, we put f ( u 9 ) = α 2 .
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 .
Step 6:
Now, select vertex v 6 and assign f ( v 6 ) = α 1 . For the vertex v 7 , we put f ( v 7 ) = α 1 .
Thus, Figure 19 represents the final P 3 -coloring of the graph.

5. 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.

Author Contributions

Conceptualization, M.N.; Methodology, Z.S.; Software, M.N.; Validation, S.Q.; Formal analysis, Z.S.; Investigation, Z.S.; Resources, S.Q.; Data curation, M.A.Z.; Writing—original draft, Z.S.; Writing—review & editing, M.N.; Project administration, Z.D. and M.A.Z.; Funding acquisition, Z.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Supported by the National Key R& D Program Fund Project (No. 2018YFB0803403); and the Anhui Provincial University Natural Science Research Major Project (No. 2022AH040317).

Data Availability Statement

All the data supporting this article is in the manuscript of the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Prathik, A.; Uma, K.; Anuradha, J. An overview of applications of graph theory. Int. J. Chemtech Res. 2016, 9, 242–248. [Google Scholar]
  2. Chartrand, G. Introductory Graph Theory; Dover: New York, NY, USA, 1985. [Google Scholar]
  3. Rouvray, D.H. The pioneering contributions of Cayley and Sylvester to the mathematical description of chemical structure. J. Mol. Struct. Theochem. 1989, 185, 1–14. [Google Scholar] [CrossRef]
  4. Davis, C.; Grünbaum, B.; Sherk, F.A. The Mathematics of Map Coloring. Leonardo 1971, 4, 273–277. [Google Scholar]
  5. Blazewicz, J.; Ecker, K.H.; Pesch, E.; Schmidt, G. Scheduling Computer and Manufacturing Process; Springer: Berlin/Heidelberg, Germany, 1996. [Google Scholar]
  6. Dewerra, D. An introduction to timetabling. Eur. J. Oper. Res. 1985, 19, 151–162. [Google Scholar] [CrossRef]
  7. Philippe, G.; Jean, P.; Hao, K.J.; Daniel, P. Recent Advances in Graph Vertex Coloring. In Intelligent System References Library; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
  8. Tait, P.G. Remarks on the coloring of maps. Proc. Roy. Soc. 1880, 10, 501–503. [Google Scholar]
  9. Haken, W.; Appel, K. Every planar graph is four-colorable. J. Math 1976, 21, 429–490. [Google Scholar]
  10. Toft, B.; Jensen, T.R. Graph Coloring Problems; John Wiley and Sons: New York, NY, USA, 1995. [Google Scholar]
  11. Toft, B.; Jensen, T.R. 25 pretty graph coloring problems. Discret. Math. 2001, 229, 167–169. [Google Scholar]
  12. Zhou, X.; Nishizeki, T.; Nakano, S. Edge-Coloring Algorithms; Technical report; Graduate School of Information Sciences, Tohoku University: Sendai, Japan, 1996; pp. 172–183. [Google Scholar]
  13. Waters, R.J. Graph Coloring and Frequency Assignment; University of Nottingham: Nottingham, UK, 2005. [Google Scholar]
  14. Grotschel, M.; Koster, A.; Eisenblatter, A. Frequency planning and ramications of coloring. In Konrad-Zuse-Zentrum fur Informationstechnik Berlin; Takustrasse: Berlin-Dahlem, Germany, 2000. [Google Scholar]
  15. Baber, C.L. An introduction to list colorings of graphs. Master’s Thesis, Virginia Polytechnic Institute and State University, Blacksburg, VA, USA, 2009. [Google Scholar]
  16. Rubin, A.L.; Taylor, H.; Erdos, P. Choosability in graphs. Congr. Numer. 1979, 26, 125–157. [Google Scholar]
  17. Tsouros, C.; Satratzemi, M. A heuristic algorithm for the list coloring of a random graph. In Proceedings of the 7th Balkan Conference on Operational Research, Constanta, Romania, 2–5 June 2005. [Google Scholar]
  18. Jansen, K.; Erlebach, T. The complexity of path coloring and call scheduling. Theory Comp. Sci. 2001, 255, 33–50. [Google Scholar]
  19. Hulman, T.E. Total Coloring of Graphs. Master’s Thesis, San Jose State University, San Jose, CA, USA, 1989. [Google Scholar]
  20. Isobe, S. Algorithms for the Total Colorings of Graphs. Ph.D. Thesis, Graduate School of Information Sciences, Tohoku University, Sendai, Japan, 2002. [Google Scholar]
  21. Kostochka, A.V.; Mydlarz, M.; Szemeredi, E.; Kierstead, H.A. A fast algorithm for equitable coloring. Combinatorica 2010, 30, 217–224. [Google Scholar]
  22. Kubale, M.; Furmanczyk, H. The complexity of equitable vertex colorings of graphs. J. Appl. Comput. Sci. 2005, 13, 95–106. [Google Scholar]
  23. Szemeredi, E.; Hajnal, A. Proof of a conjecture of p. Erdos. In Combinatorial Theory and Its Applications (Balatonfured Proc. Colloq.); North-Holland: Amsterdam, The Netherlands, 1970; pp. 601–623. [Google Scholar]
  24. Kubale, M. Contemporary Mathematics. Graph Colorings. Am. Math. Soc. 2004, 352, 126. [Google Scholar]
  25. Ghandehari, M.; Modarres, M. Applying circular coloring to open shop scheduling. Sci. Iran. 2008, 15, 652–660. [Google Scholar]
  26. Xuding, Z. Circular chromatic number: A survey. Discret. Math 2001, 229, 371–410. [Google Scholar]
  27. Skulrattanakulchai, S. Acyclic colorings of subcubic graphs. Inf. Process. Lett. 2004, 92, 161–167. [Google Scholar] [CrossRef]
  28. Lyons, A. Acyclic and star colorings of cographs. Discret. Appl. Math. 2011, 159, 1842–1850. [Google Scholar] [CrossRef] [Green Version]
  29. Raspaud, A.; Reed, B.; Fertin, G. Star coloring of graphs. J. Graph Theory 2004, 47, 163–182. [Google Scholar]
  30. Kuszner, J.; Maejski, M.; Nadolski, A.; Janczewski, R. An approximate algorithm for circular edge coloring of graphs. Zesz. Nauk. Wydziau Eti Politech. 2003, 2, 473–479. [Google Scholar]
  31. Sudakov, B.; Zaks, A.; Alon, N. Acyclic edge colorings of graphs. J. Graph Theory 2001, 37, 157–167. [Google Scholar]
  32. Zaks, A.; Alon, N. Algorithmic aspects of acyclic edge colorings. Algorithmica 2002, 32, 611–614. [Google Scholar]
  33. Havet, F.; Muller, T.; Cohen, N. Acyclic Edge-Coloring of Planar Graphs; Technical Report; Institut National de Recherche en Informatique et en Automatique: Paris, France, 2009. [Google Scholar]
  34. Fan, G.H.; Raspaud, A. Fulkerson’s conjecture and circuit covers. J. Comb. Theory Ser. B 1994, 61, 133–138. [Google Scholar] [CrossRef] [Green Version]
  35. Fulkerson, D.R. Blocking and anti-blocking pairs of polyhedra. Math. Program. 1971, 1, 168–194. [Google Scholar] [CrossRef]
  36. Yang, H.; Naeem, M.; Qaisar, S. On P3 coloring of graphs. Symmetry 2023, 15, 521. [Google Scholar] [CrossRef]
Figure 1. Tree graph.
Figure 1. Tree graph.
Mathematics 11 03487 g001
Figure 2. Assignment of colors.
Figure 2. Assignment of colors.
Mathematics 11 03487 g002
Figure 3. (a) A random tree graph. (b) Arrangement of the tree of part (a) according to the algorithm.
Figure 3. (a) A random tree graph. (b) Arrangement of the tree of part (a) according to the algorithm.
Mathematics 11 03487 g003
Figure 4. P 3 -labelling of T.
Figure 4. P 3 -labelling of T.
Mathematics 11 03487 g004
Figure 5. Complete bipartite graph K m , n .
Figure 5. Complete bipartite graph K m , n .
Mathematics 11 03487 g005
Figure 6. The grid graph P m P n .
Figure 6. The grid graph P m P n .
Mathematics 11 03487 g006
Figure 7. Sub-graphs of P m P n . (a) Represent the corner subgraphs. (b) Represent subgraphs from sides. (c) Represent subgraphs from inside of P m P n .
Figure 7. Sub-graphs of P m P n . (a) Represent the corner subgraphs. (b) Represent subgraphs from sides. (c) Represent subgraphs from inside of P m P n .
Mathematics 11 03487 g007
Figure 8. P 3 -labelling of P m P n .
Figure 8. P 3 -labelling of P m P n .
Mathematics 11 03487 g008
Figure 9. A bipartite graph G with one cycle. Cycle is in color.
Figure 9. A bipartite graph G with one cycle. Cycle is in color.
Mathematics 11 03487 g009
Figure 10. P 3 -coloring at vertex u 1 .
Figure 10. P 3 -coloring at vertex u 1 .
Mathematics 11 03487 g010
Figure 11. P 3 paths whose middle vertex is u 1 .
Figure 11. P 3 paths whose middle vertex is u 1 .
Mathematics 11 03487 g011
Figure 12. P 3 paths which start from u 1 and end at any other u i .
Figure 12. P 3 paths which start from u 1 and end at any other u i .
Mathematics 11 03487 g012
Figure 13. P 3 -coloring of all P 3 paths containing u 1 .
Figure 13. P 3 -coloring of all P 3 paths containing u 1 .
Mathematics 11 03487 g013
Figure 14. Assignment of color to u . Here, it is u 3 .
Figure 14. Assignment of color to u . Here, it is u 3 .
Mathematics 11 03487 g014
Figure 15. P 3 coloring of paths having u 3 as middle vertex.
Figure 15. P 3 coloring of paths having u 3 as middle vertex.
Mathematics 11 03487 g015
Figure 17. A bipartite graph having exactly one cycle.
Figure 17. A bipartite graph having exactly one cycle.
Mathematics 11 03487 g017
Figure 18. Arrangement of the vertices of G in non-increasing order from left to right.
Figure 18. Arrangement of the vertices of G in non-increasing order from left to right.
Mathematics 11 03487 g018
Figure 19. P 3 -labelling of G .
Figure 19. P 3 -labelling of G .
Mathematics 11 03487 g019
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Dai, Z.; Naeem, M.; Shafaqat, Z.; Zahid, M.A.; Qaisar, S. On the P3-Coloring of Bipartite Graphs. Mathematics 2023, 11, 3487. https://doi.org/10.3390/math11163487

AMA Style

Dai Z, Naeem M, Shafaqat Z, Zahid MA, Qaisar S. On the P3-Coloring of Bipartite Graphs. Mathematics. 2023; 11(16):3487. https://doi.org/10.3390/math11163487

Chicago/Turabian Style

Dai, Zemiao, Muhammad Naeem, Zainab Shafaqat, Manzoor Ahmad Zahid, and Shahid Qaisar. 2023. "On the P3-Coloring of Bipartite Graphs" Mathematics 11, no. 16: 3487. https://doi.org/10.3390/math11163487

APA Style

Dai, Z., Naeem, M., Shafaqat, Z., Zahid, M. A., & Qaisar, S. (2023). On the P3-Coloring of Bipartite Graphs. Mathematics, 11(16), 3487. https://doi.org/10.3390/math11163487

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop