A Novel Edge Cover based Graph Coloring Algorithm

Graph Colouring Problem is a well-known NPHard problem. In Graph Colouring Problem (GCP) all vertices of any graph must be coloured in such a way that no two adjacent vertices are coloured with the same colour. In this paper, a new algorithm is proposed to solve the GCP. Proposed algorithm is based on finding vertex sets using edge cover method. In this paper implementation prospective of the algorithm is also discussed. Implemented algorithm is tested on various graph instances of DIMACS standards dataset. Algorithm execution time and a number of colours required to colour graph are compared with some other well-known Graph Colouring Algorithms. Variation in time complexity with reference to increasing in the number of vertices, a number of edges and an average degree of a graph are also discussed in this paper. Keywords—Graph Colouring Problem; Edge Cover; Independent Set; NP-Hard Problem


INTRODUCTION
Graph Colouring Problem is used to the optimal solution of many real world practical applications like Time table scheduling [13], Air traffic flow management [29], Frequency assignment and Computer gaming.The graph colouring problem is defined as follows.Let G= (V, E) is a graph with |V| is a number of vertices and |E| is a number of edges, which connects vertices to each other.The edges are of the form (a, b) where a, b ∈ E. The problem of graph colouring is to assign a colour to each vertex a ∈ V such that a and b does not colour with the same colour.
Finding the optimum solution in optimum time is always the objective of researchers.In general colouring optimisation is the primary objective of graph colouring algorithms.But when it comes to a large graph where a number of vertices and number of edges are in large number, time complexity is more important than colouring optimisation.For example genetic algorithm with multipoint guided mutation algorithm (MSGCA) generate optimum chromatic number (5) for graph instance 4-Insertion_4, i.e. number of colours required to colour graph of 475 vertices and 1795 edges are five.But algorithm takes 1071 seconds to complete execution [8].And proposed algorithm gives the same chromatic number and generates results in 0.41 second only.
Today, graph colouring algorithms are used for many internet applications, social media websites where graph size is very large.And user required fast results of their web access.
Rest of the paper is organised as follows: In section II, related work done by researchers in the field of graph colouring is discussed.In section III problem with the existing algorithm is highlighted.In section IV an algorithm is proposed to solve the problem highlighted in section III.In section V experimental results of proposed algorithm on DIMACS graph instances are shown.In section VI, results analysis is done on the bases of experimental results and results are also compared with some other well-known graph colouring algorithms.In Section VII, the conclusion of research work is discussed and future enhancement in proposed algorithm is also discussed.

II. RELATED WORK AND BACKGROUND
There are already so many approaches to solving the GCP given by the researchers.These approaches are widely divided into two categories: (1) approximate [2], and (2) exact.The approximate approach does not give the best solution but can give a result with the large graphs.The algorithm developed by exact approach gives satisfactory results but most of the exact algorithms are not suitable for large graphs.
On the basis of an execution graph colouring algorithm can be sequential and parallel.There are number of algorithm like, Cuckoo optimisation algorithm [3], modified cuckoo optimisation algorithm [4], polynomial 3-SAT encoding algorithm [5], Ant colony optimisation algorithm [6], Mimetic algorithm [7], GA with multipoint guided mutation algorithm [8] many more are sequential graph colouring algorithm.On the other hand Parallel largest-log-degree-first (LLF) [9], Parallel smallest-log-degree-first (SLF) [9], a parallel algorithm based on BRS [10], parallel graph colouring on multi core CPUs [11] are a parallel algorithm.The parallel algorithm is more time efficient then sequential algorithm due to parallel execution of different iterations of the algorithm.

III. PROBLEM IDENTIFICATION
The primary objective of graph colouring algorithm is to find the optimum chromatic number (number of colours required to colour all vertices of the graph), but when graph size is large and average vertex degree of a graph is high, the time complexity of the algorithm is more important than the chromatic number.For the large graphs algorithm execution time should be finite and optimum.In a review of different kinds of literature it has been found that most of the algorithms are not able to colour large graphs in optimum time.www.ijacsa.thesai.orgIV.PROPOSED ALGORITHM In this paper, edges cover based graph colouring algorithm is proposed.This proposed algorithm full fill the need of optimum time complexity for large graphs.This algorithm is based on finding an independent set (not a single connecting edge between vertices) of vertices using edges cover technique.The algorithm is able to give results for all kinds of graph instances successfully.Execution time is also optimum for large graphs.

A. Edges Cover Technique
Edge cover technique is a selection of vertices of any graph in such a manner that all edges of the graph will be covered.The remaining vertices set is called independent set.There should be minimum vertices in edge cover vertices set, to get maximum independent set.
where, V (EC) is set of Edge cover vertices.V (I) is set of Independent vertices in the graph.
V is set of all vertices of the graph.

B. Edge Cover Graph Coloring Algorithm
Proposed Edges cover graph colouring algorithm works in an iterative manner.Each iteration gives a single set of vertices.This set contains vertices independent to each other, so that each vertex of the set can assign a single colour.The behaviour of iteration depends on a number of sets.For the large graph it is difficult to predict a number of sets. Figure 1 shows algorithm flow and different iterations.
Proposed algorithm takes the graph instance as input in the form of adjacency edge list.The algorithm generates a certain number of vertices sets as an output each set of vertices can be coloured with the same colour.

C. Complexity Analysis of Algorithm
Proposed graph colouring algorithm is NP-hard in nature.So it is hard to determine the complexity hypothetically.The complexity of algorithm depends on a number of independent sets.A number of independent sets are unpredictable.Proposed algorithm works on iterations.All iterations have three parts where maximum execution time is required.
First: when the degree of vertices is calculated.Equation (2) shows the complexity of calculating the degree of vertices in determining the single independent set.

|Nv|*|Ne|
(2) where, Nv is a number of vertices in vertex set.
Ne is a number of edges in edge set.
At the end of algorithm execution if algorithm generates total k independent sets then the total complexity of calculating the degree of all vertices in all iterations is shown in equation (3). where, Nvi is a number of vertices in vertex set while finding ith independent set.
Nei is Number of edges in edge set while finding ith independent set.k is a number of independent sets ) where, www.ijacsa.thesai.org Vi is a number of vertices in vertex set while finding ith independent set.k is Number of independent sets.And third is when edge set required editing.Complexity to update edge set in all iteration of the algorithm can be evaluated by equation (5).
Veci is a number of vertices in edge cover set while finding ith independent set.Degree(Vmax) is a degree of maximum degree vertex.
Eec is a number of edges connected to vertices available in edge cover set.

V. EXPERIMANTAL RESULTS
To evaluate the proposed algorithm DIMACS graph instances are used.DIMACS instances of graphs are introduced by scientists for graph colouring problem.Most of the graph colouring algorithms are tested on DIMACS graph instances.Some graphs of DIMACS are generated randomly by computer programs and some of them are results of real world applications.
Proposed algorithm is implemented in JAVA Programming language (jdk1.8.0_74).Eclipse JUNA Editor is used to write the program.Operating system Windows Server 2012 Standard 64-bit is used.Intel Pentium Dual CPU G640 @2.80Ghz with 2 GB RAM is used for implementation and result evaluation.

A. DSJC Series Graphs Results
Table 1 shows the DSJC series of instances results.They are random graphs used in the paper by David S. Johnson.

B. DSJRx Graphs Results
DSJRx graph instances are geometric random graphs with x nodes randomly distributed in the unit square.These graphs are used in a paper by David S. Johnson.Table 2 shows the proposed algorithm results.

C. Myciel Graphs Results
Myciel graphs are based on the Mycielski transformation and they are triangle free graphs.Table 3 show the results of myciel graphs on proposed algorithm.

D. k-Insertion graphs and Full Insertion graphs results
k-insertion graphs and full insertion graphs are also tested on proposed algorithm.These graphs are a generalisation of myciel graphs with inserted nodes to increase graph size but not density.These instances are created by M. Caramia and P. D ll'Ol o.T bl 4 shows the results of k-insertion graphs and full insertion graphs.

E. Matrix Partitioning Problem Graphs Results
These graphs are generated by Matrix partitioning problem.Graphs from a matrix partitioning problem in the segmented columns approach to determine sparse Jacobian matrices.Table 5 shows the results of proposed algorithm on these graphs.

F. Register Allocation Problem Graphs Results
Proposed algorithm is also tested on graph instances generated by register allocation problem.Table 6 shows the results of register allocation problem generated graphs.

G. Latin Square Problem Graphs Results
The problem corresponds to assigning colours to the cells of an empty matrix such that there is no repetition of colours in each row/column of the matrix is called Latin Square Problem.Some graphs are generated by Latin square problem are also used to test the proposed algorithm.Table 7 shows the results of graphs generated by Latin square problem.

H. Leighton Graphs Results
L hton phs n t d by L hton's ph covering theorem (Two finite graphs which have a common covering have a common finite covering).Leighton graphs results on proposed algorithm are shown in Table 8.

J. Queen Graphs Results
A queen graph is a graph on n^2 nodes, each corresponding to a square of the board.Two nodes are connected by an edge if the corresponding squares are in the same row, column, or diagonal.13 different instances of queen problem are tested on proposed algorithm.The test result is shown in Table 10.

L. Large Random Graph Result
Proposed algorithm is also tested on a random graph.This graph has 2000 vertices and 999836 edges.Table 12 shows the number of coloured and execution time of proposed algorithm.

N. Geometric Random Graphs Results
Geometric random graphs test result on proposed algorithm is shown in Table 14.

O. Geometric Graph with Bandwidth and Node Weights Graphs Results
In these graph instances bandwidth of each edge and weights of nodes are given.Proposed algorithm tested by ignoring edges bandwidth and nodes weight.Results of geometric graphs are shown in Table 15.

P. Book Graphs Results
Book graphs are created where each node represents a character.Two nodes are connected by an edge if the corresponding characters encounter each other in the book.Proposed algorithm test result of book graphs are shown in Table 16.

VI. RESULT ANALYSIS
In this section certain facts are extracted from the test results of section 5.The time complexity of proposed algorithm is also compared with some well known graph colouring algorithms.
Proposed edge cover based graph colouring algorithm is tested on many large graphs.Table 18 shows graph instances with their execution time (in Seconds) and a number of colours required to colour graphs.Implementation results of proposed edge cover based algorithm are compared with a well-known Ant-based algorithm for colouring graphs (ABAC) [13].Table 19 shows the comparison results of both algorithms.The table also shows the results chromatic number (K) of both algorithms.Figure 2 shows the execution time of proposed and ABCA algorithm for different size of graphs.X axis is representing a number of vertices in graph and Y axis is representing execution time in seconds of the algorithm.Figure 2 is generated by the data available in Table 19.Figure 2 clearly shows that execution time of proposed algorithm is less then ABCA algorithm, especially for the large graphs.
Table 20 present the comparison of execution time (in seconds) and a chromatic number of proposed algorithm and Genetic algorithm with multipoint guided mutation algorithm (MSPGCA) [8].In Table 21 Parallel genetic algorithm based on CUDA (PGACUDA) [13] is compared with proposed algorithm.Figure 4 shows execution time behaviour of both algorithms.By Figure 4 it is clear that for the larger graphs execution time of proposed algorithm is optimum compared to PGACUDA.Modified cuckoo optimisation algorithm (MCOACOL) [4] is modified algorithm of the cuckoo optimisation algorithm for graph colouring algorithm.Cuckoo optimisation well knows graph colouring algorithm based on u oo b d's b h v our.This paper also compared the results of MCOACOL algorithm to proposed algorithm results.Table 22 has the comparison proposed and MCOACOL algorithm.To analyse the Figure 5 it has been observed that time complexity of proposed algorithm is better than MCOACOL.The time complexity of proposed algorithm is highly expectable for the large graphs.

Fig. 1 .
Fig. 1.Flow chart of algoritm Second, time complexity in finding maximum degree vertices is shown by equation (4).
In this section of paper, test results on DIMACS graph instances are shown.Test results are shown in the tabular form.Each table contains graph Instance name, Number of vertices (V) in the graph, Number of edges connected to vertices (E), Number of coloured required to colour graph (K) which is generated by an algorithm, and Time (in Seconds) taken by the algorithm to execute.

Figure 3
Figure 3 generated from graph instances their execution time available in Table 20.It has been observed that proposed algorithm execution completed in optimum time.

Fig. 2 .
Fig. 2. Execution time comparison of proposed algorithm and ABAC algorithm

Fig. 4 .
Fig. 4. Execution time comparison of proposed algorithm and PGACUDA algorithm

TABLE III .
MYCIEL GRAPHS TEST RESULTS

TABLE IV .
K-INSERTION AND FULL INSERTION GRAPHS TEST RESULTS 422 www.ijacsa.thesai.org

TABLE VI .
REGISTER ALLOCATION PROBLEM GRAPHS TEST RESULTS

TABLE VII .
LATIN SQUARE PROBLEM GRAPHS TEST RESULTS

TABLE VIII .
LEIGHTON GRAPHS TEST RESULTS

TABLE IX .
MILES GRAPHS TEST RESULT

TABLE X
School scheduling graphs are generated for scheduling the classes of school.Test results are shown in Table 11.www.ijacsa.thesai.org

TABLE XII .
SCHOOL SCHEDULING GRAPHS TEST RESULTS

TABLE XIII .
RANDOME LARAGE GRAPHS TEST RESULTS

TABLE XIV .
QUASI-RANDOM COLORING PROBLEM GRAPHS TEST RESULTS

TABLE XV .
GEOMETRIC RANDOM GRAPHS TEST RESULTS

TABLE XVI .
GEOMETRIC GRAPHS WITH BANDWIDTH AND NODE WEIGHT TEST RESULTS

TABLE XVII .
BOOK GRAPHS RESULTS Game graph representing the games played in a college football season can be represented by a graph where the nodes represent each college team.Two teams are connected by an edge if they played each other during the season.Test results of the game graph are shown in Table 17.www.ijacsa.thesai.org

TABLE XIX .
LARGE GRAPH INSTANCES

TABLE XX .
COMPARISON OF PROPOSED ALGORITHM AND ANT-BASED ALGORITHM (ABCA)

TABLE XXI .
COMPARISON OF PROPOSED AND GENETIC ALGORITHM WITH MULTIPOINT GUIDED MUTATION ALGORITHM (MSPGCA)

TABLE XXII .
COMPARISON OF PROPOSED AND PARALLEL GENETIC ALGORITHM BASED ON CUDA (PGACUDA)

TABLE XXIII .
COMPARISON OF PROPOSED AND MODIFIED CUCKOO OPPTIMIXATION ALGORITHM (MCOACOL)