New Algorithm for Chromatic Number of Graphs and their Applications

In this paper, we have designed a new algorithm for calculating the exact value of the chromaticnumber of a graph and dubbed it as R- coloring algorithm. Using this R- coloring algorithm, we have provedsome results. We have discussed some application in different fields of our life by using this new algorithm.


Introduction:
In [1], Hermann and Hertz found the chromatic number by means of critical graphs.There are polynomials time algorithms to some classes of graphs.So, in general, evaluating the chromatic number of a graph is difficult.As has been mentioned in [2] a greedy method would be to iteratively pick, in a graph , an uncolored vertex , and to color it with the smallest color which is not yet used by its neighbors .Such a coloring will obviously stay proper until the whole vertex set is colored, and it never uses more than ∆() + 1 different colors, where ∆() is the maximal degree of , as in the procedure no vertex will ever exclude more than ∆() colors (for more details see [3][4][5][6][7][8]).Consider  is a graph.A  −coloring of  is a method of coloring the vertices by at most  colors provided that any adjacent vertices have different colors.The smallest number of colors needed to color the vertices of  such that any adjacent vertices have different colors is chromatic number of , denoted by () .
From the above discussion we introduce a new algorithm to calculate the exact value of chromatic number of a graph.

The main results:
In this article we have designed a new algorithm, called R-coloring algorithm, to evaluate the exact value of the chromatic number of a graph.We introduce the following definition:

R-coloring algorithm will be introduced as follows:
Let  be a graph of order  with vertices as  1 ,  ].
Step2: Confirm R-coloring matrix from the associated adjacency matrix as follows:   Then R-coloring matrix is ].
Hence the chromatic number of the graph  is 3,i.e.() = 3, as shown from the diagonal of Rcoloring matrix and the color of  1 is 1,  2 is 2,  3 is 1 and  4 is 3.
In the above example, if the associated adjacency matrix becomes: ሱۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛۛሮ [ ሱۛۛۛۛۛۛሮ [ where  4 is in the first row,  1 is in the second row,  2 is in the third row and  3 is in the fourth row, then R-coloring algorithm can be applied as follows : From the above example, we observe that R-coloring matrix was evaluated easily.
Note: To Evaluate R-coloring matrix easily, put the vertex with highest degree in the first row of the associated adjacency matrix.Now we will make comparison between R-coloring algorithm and greedy coloring algorithm for calculating the chromatic number of a graph  as follows: Consider we have a graph  in First, we will apply the greedy coloring algorithm to color graph  in the ordering shown in (b), observe the following sequence of diagrams: From the above diagrams we find that the chromatic number of the graph  is 3, i.e. () = 3.From R-coloring matrix we find that the chromatic number of the graph  is 2, i.e. () = 2.

Now we will apply
By applying the greedy coloring algorithm to color graph  in the ordering shown in (c), the algorithm is shown in the following sequence of diagrams: The above diagrams show that the chromatic number of the graph G is 2, i.e. χ(G) = 2.
We can apply R-coloring algorithm to color graph  in the ordering shown in (c) as follows: Hence R-coloring matrix refers to the chromatic number of the graph G is also 2, i.e. χ(G) = 2.
3   ℎ We can deduct from the above that greedy coloring algorithm gives different chromatic numbers of the same graph depending on the order of the vertices.However, R-coloring algorithm gives only one chromatic number for all different orders of the vertices of the graph.
As a result, we can introduce the following theorem: Theorem : R-coloring algorithm calculates the exact value of chromatic number of a graph .
Proof.Suppose we have a graph G with more than one chromatic number calculated by R-coloring algorithm.This means that there exists more than one of R-coloring matrices with different greatest entry in their diagonals.Since R-coloring algorithm depends on the color of the neighbor vertices of the colored vertex such that the vertex colored by the smallest color is not used according to the order in the associated adjacency matrix which is fixed for the same graph (from property of matrices).
Then, this is a contradiction and hence R-coloring algorithm calculates the exact value of chromatic number of the graph .
We now prove some results by using R-coloring algorithm Result 1: Let  be a graph of order .Then χ(G) = 1 if and only if G ≅   , where   is a null graph.
Proof: Let  be a graph of order , χ(G) = 1 and  ≇   .Since  is a graph of order  and χ(G) = 1 then every entry in the diagonal of R-coloring matrix equals 1 and the other entries equal 0, i.e.
This means the entries in the associated adjacency matrix of the graph  equal 0, i.e. each vertex in  does not connect to any vertex.This is a contradiction.Hence G ≅   .
To prove the converse, Let  be a graph of order  and G ≅   .Then the associated adjacency matrix of the graph  is given by Hence by using R-coloring algorithm, we find that R-coloring matrix is Then the chromatic number of the graph  equals 1 from R-coloring matrix, i.e. χ(G) = 1.
Result 2. Let G be a graph of order  ≥ 2. Then () =  if and only if G ≅ K n , where   is a complete graph of order n.
Proof: Let G be a graph of order  ≥ 2 and () = .Then R-coloring matrix of the graph G is  ×  matrix and each entry in its diagonal of it takes number from 1 to n such that   * ≠   * ∀ ≠ .
This means that, every vertex in G is connected to the others.Hence G ≅ K n .
To prove the converse, Let  be a graph of order  and G ≅   .Then the associated adjacency matrix of the graph  is given by , Hence by using R-coloring algorithm, we find that R-coloring matrix is .
Then the chromatic number of the graph  equals  from R-coloring matrix, i.e. χ(G) = n.
As a real-life application of coloring we take the traffic lights.Fig. (6) shows the intersection roads.

Fig. (6)
We find 10 traffic lanes,  1   10 .A traffic light system includes phases.At every phase, vehicles in lanes for which the light is green may proceed safely through the intersection.Now, we want to calculate a minimum number of phases needed for the traffic light system so that all vehicles may proceed safely through the intersection.
Let us solve this problem by drawing the graph G, shown in Fig.Hence, three is the minimum number of phases in our problem.Note: Also, we can write associated adjacency matrix of our graph without drawing the graph, i.e.
= 1 if   intersect   and   = 0 if   does not intersect   .

Definition 1 .
The associated adjacency matrix of a graph , denoted by (), is a matrix whose entry   = 1 if the vertices   and   are adjacent such that  ≠  and   = 0 otherwise, where   and   are vertices in .Consider we have the graph  shown in Fig. (1) then the associated adjacency matrix of this graph is given by (