New Graph Coloring Algorithms

Two new heuristic graph-coloring algorithms, based on known heuristic algorithms, have been introduced. One of them is a modification of the Largest Degree Ordering (LDO) algorithm, and the other one is a modification of the Saturation Degree Ordering (SDO) algorithm. The two new algorithms proposed in this paper, were compared empirically, in terms of used colors, with some of the known heuristic graph-coloring algorithms such as: Largest Degree Ordering (LDO), First Fit (FF), Saturated Degree Ordering (SDO), and Incident Degree Ordering (IDO). As a result of this comparison, it was found that the proposed algorithms were better than the original ones with respect to the number of used colors.


INTRODUCTION
Graph coloring is defined as coloring the nodes of a graph with the minimum number of colors without any two adjacent nodes having the same color. For example, the linked list needs two colors and so does the binary search tree. Graph coloring has wide applications such as: estimation of sparse Jacobins, scheduling and registering allocation.
The coloring of a graph G = (V, E) is a mapping c: v s, where "s" is a finite set of colors, such that if vw ∈ E then c(v) ≠ c(w). In other words, adjacent vertices are not assigned the same color [1] . The problem that arises is the coloring of a graph provided that no adjacent vertices have the same color. The chromatic number X(G) is the minimum number of colors needed for a coloring of G. A graph G is k_chromatic, if X(G) = k, and G is k_colorable, if X(G) ≤ k..
Graph coloring is one of the most useful models in graph theory. It has been used to solve problems in school timetabling, computer register allocation, electronic bandwidth allocation, and many other applications [2] .
In this paper, two new heuristic graph-coloring algorithms, based on known heuristic algorithms, have been introduced. One of them is a modification of the Largest Degree Ordering (LDO) algorithm, and the other one is a modification of the Saturation Degree Ordering (SDO) algorithm. The two new algorithms proposed in this paper, were compared empirically, in terms of used colors, with some of the known heuristic graph-coloring algorithms such as: Largest Degree Ordering (LDO), First Fit (FF), Saturated Degree Ordering (SDO), and Incident Degree Ordering (IDO).
As a result of this comparison, it was found that the proposed algorithms were better than the original ones with respect to the number of used colors.
Here, we investigated some of the heuristic graph coloring algorithms (FF, FDO, SDO, and LDO), and then by modifying some of them, we introduced two new modified algorithms.

Graph coloring algorithms:
There are many heuristic sequential techniques for coloring a graph. One of them is the Greedy Graph Coloring. This technique focuses on carefully picking the next vertex to be colored. In this heuristic algorithm, once a vertex is colored, its color never changes. Below, we explain the first fit and degree based ordering techniques. a. First fit: First Fit algorithm is the easiest and fastest technique of all greedy coloring heuristics. The algorithm sequentially assigns each vertex the lowest legal color. This algorithm has the advantage of being very simple and fast and can be implemented to run in O(n) [2,3] .
b. Degree based ordering: It provides a better strategy for coloring a graph. It uses a certain selection criterion for choosing the vertex to be colored. This strategy is better than the First Fit which simply picks a vertex from an arbitrary order. Some strategies for selecting the next vertex to be colored have been proposed such as: 740 provides a better coloring than the First Fit. This heuristic can be implemented to run in O(n 2 ) [2,3] .

Saturation degree ordering (SDO):
The saturation degree of a vertex is defined as the number of its adjacent differently colored vertices. Intuitively, this heuristic provides a better coloring than LDO as it can be implemented to run in O(n 3 ) [2,3] .

Incidence degree ordering (IDO):
A modification of the SDO heuristic is the incidence degree ordering. The incidence degree of a vertex is defined as the number of its adjacent colored vertices. This heuristic can be implemented to run in O(n 2 ) [2,3] .
Proposed algorithms: In this study, two new heuristic graph coloring algorithms have been introduced based on known algorithms. These two proposed new algorithms are described in the following sections.

Proposed algorithm 1:
In this algorithm, we modified the Largest Degree Ordering (LDO) algorithm by combining it with the Incident Degree Ordering (IDO).
The algorithm works as LDO, but when we found that there are two nodes having the same degree, the IDO was used to choose between them. There are two criteria for chosen the vertex to be colored: * The number of vertices connected to the vertex LDO. * The number of colored vertices connected to the vertex IDO.

Proposed algorithm 2:
In this algorithm, we combine both the Saturated Degree Ordering (SDO), and the Largest Degree Ordering (LDO).
The algorithm works as the SDO, but when there are two nodes having the same degree, we use the LDO to choose between them. So there are two criteria to choose the next node to be colored: * The number of colors surrounding the vertex, SDO. * The number of vertices surrounding the vertex, LDO. Input: set of nodes (graph) (n 1 , n 2 , n 3 ,….,n m ) Output: colored nodes and total number of colors if(Degree(n i ) > Degree(n index )) index=i } Color(n index ) NoOfColoredNodes = NoOfColoredNodes + 1 } } This heuristic can be implemented to run in O(n 3 ) as SDO.

RESULTS
We implemented four heuristic graph coloring (FF, LDO, IDO, SDO) in addition to the two proposed algorithms.
We also used random graphs that have different number of vertices and densities. The results that are shown in Table 1 are found empirically by implementing and running all the above algorithms. Table 1 shows the following findings: * First Fit algorithm is the worst algorithm with respect to the number of colors used. * LDO uses smaller number of colors than IDO. * SDO uses smaller number of colors than IDO and LDO The proposed Algorithm 1 (modification of LDO) is better than LDO in the number of colors used.