1 | P a g e
DETERMINATION OF CHROMATIC NUMBER FOR A COLORED GRAPH USING GENETIC HEURISTIC
SEARCH
Arjun Wadhwa
1, Ankur Jain
2, Aalekh Srivastava
31,2,3
VIT University, Vellore, (India)
ABSTRACT
This paper presents the formulation and results of recent evolutionary-based algorithm used for Graph Coloring. Graph coloring is basically a problem (GCP) which is well-known NP complete problem. Graph coloring (it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color;
this is called a vertex coloring) is a special case of graph labelling. Graph coloring problem (GCP) is of great interest to the researchers in the area of soft computing. The term graph coloring usually refers to vertex coloring. Given a number of vertices, which form a connected graph, the objective is to color each vertex such that if two vertices are connected in the graph (i.e. adjacent) they will be colored with different colors.
Moreover, the number of different colors that can be used to color the vertices is limited. Our objective here is to find the minimum number of different colors needed to color a certain graph without violating the adjacency constraint. This paper gives basic understanding of Genetic Algorithm. This new approach produces better object code and takes much less time.
Keywords: Crossover, Genetic Algorithm, Graph Coloring, Mutation, Selection
I. INTRODUCTION
In this paper we discuss about one of the common problems that is graph coloring problem. Many researchers have tried to come up with universal solution or algorithm for Graph coloring which is a NP-Complete Problem.
Graph coloring is a special case of graph labeling in graph theory. It is the procedure that helps in assigning labels also called „colors‟ to different elements of a graph. These elements can include vertices, edges or a face of a planar graph. Graph Coloring is the way of coloring elements of a graph specifically vertices, such that there are no two adjacent vertices that bear the same color. The same applies for edges and face of the graph as well. The starting point of the subject is vertex coloring as other coloring problems can be transformed into a vertex version. The nature of the coloring problem depends on the number of colors but not on what they are.
Besides the theoretical significance of NP- hard problem, Graph coloring has many practical applications. Graph coloring arises naturally in a variety of application such as register allocation and time table scheduling. It is a fundamental problem which often appears in scheduling problem like the file transfer problem on computer networks.
A lot of researchers have tried to build applications to solve the problem with an algorithm. The very well- known algorithms that are used to solve the problem are Memetic and Genetic algorithm. Memetic algorithm is a hybrid version of Genetic algorithm. In this paper we will be dealing with only genetic algorithm. The Genetic algorithm derives its behaviour from the process of evolution in nature. We see that the encoding for our genetic
2 | P a g e information is done by asexual reproduction and results in offspring that are genetically identical to the parent.
Sexual reproduction allows the creation of genetically different offspring that are still of the same species. This is the recombination operation, which genetic Algorithm generally refers to as crossover because of the way that genetic material crosses over from one chromosome to another. Some genetic algorithms use a simple function of the fitness measure to select individuals to undergo genetic operations such as crossover or asexual reproduction. The two processes that most contribute evolution are crossover and fitness based selection/reproduction. The genetic algorithm uses random “probability distribution” processes, but the result is distinctly non-random.
Genetic algorithms are used for a number of different application areas. Graph Coloring is one of the optimization problems in which the character string of the chromosome can be used to color the vertices of a graph. We can implement this genetic model of computation by having arrays of bits or characters to represent the chromosomes. When the genetic algorithm is implemented it is usually done in a manner that involves the following cycle: Evaluate the fitness of all of the individuals in the population. Create a new population by performing operations such as crossover, fitness-proportionate reproduction and mutation on the individuals whose fitness has just been measured. Discard the old population and iterate using the new population. The majority of work with Genetic Algorithm is focused on fixed-length character strings.
II. RELATED WORKS
The most common field of research in graph theory is graph coloring. A lot of researchers have contributed to the concept of graph coloring. Different algorithms for different applications. The principle of GPS system is fully based on graph coloring. A great deal of research has been done to tackle the theoretical aspects of the Graph Coloring Problem in terms of its generalization as a Constraint Satisfaction Problem (Isabel Méndez Díaz and Paula Zabala 1999).
Many researchers are working on how to relate graph terminology to biology. A lot of algorithms have been proposed which help in understanding biological data and likewise in biology there are some algorithms (memetic and genetic algorithm) which help in understanding the graph coloring concepts. Other methods of graph coloring are depth first search commonly known as DFS. DFS is also very popular in graph coloring.
Many problems are solved with the help of DFS algorithm which was introduced by French mathematician Charles Pierre Tremaux as a strategy for solving mazes. Evolutionary computation and parameter control has been detailed in a number of papers including ones by Back, Hammel, and Schwefel (T. Back, U. Hammel and H. P. Schwefel 1997) as well as work by Eiben, Hinterding and Michalewicz (A. E. Eiben, R. Hinterding and Z.
Michalewicz 1999).
Genetic algorithms and evolutionary approaches have been used extensively in solutions for the Graph Coloring Problem and its applications (F. F. Ali, et al. 1999; K. Tagawa, et al. 1999; Cornelius Croitoru, et al. 2002; C. A.
Glass and A. Prugel-Bennett 2003; Justine W. Shen 2003; Greg Durrett, Muriel Médard and Una-May O‟Reilly 2010; Lixia Han and Zhanli Han 2010). There are many other algorithms like decentralized algorithms. The one where no message passing is allowed. The efficient decentralise algorithm exist that will color a graph if a proper coloring exits. Similar to Memetic algorithm there is one another algorithm termed as MACOL algorithm. This algorithm integrates several distinguished features such as adaptive multi-parent crossover (AMPaX) operator and a distance and quality based replacement criterion for pool updating. This algorithm is
3 | P a g e evaluated on the DIMACS challenge benchmarks and computational results show that the proposed MACOL algorithm achieves highly competitive results, compared with many state of the art algorithms.
III. PROPOSED METHOD
Our approach of coloring a graph is more knowledge based and easy way to find the solution. A graph G(V,E) is an ordered pair of set of vertices and edges. In graph coloring, the minimum number of colors needed to vertex- color G is called the chromatic number χ(G) of G. Genetic algorithms share an overall structure and workflow yet they vary in the specific details according to the particular problem. At the molecular level a pair of chromosomes bump into each other, exchange genetic information and drift apart. This is the recombination operation, which genetic Algorithm generally refers to as crossover because of the way that genetic material crosses over from one chromosome to another.
The crossover operation occurs in an environment where the fitness of an individual decides it‟s Selection for getting mate i.e. how good the individual is at competing in its environment. Some genetic algorithms use a simple function of the fitness measure to select individuals (probabilistically) to undergo genetic operations such as crossover or asexual reproduction. Other implementations use a model in which certain randomly selected individuals in a subgroup compete and the fittest is selected. This is called tournament selection and is the form of selection we see in nature when males compete for the privilege of mating with a herd of females.
The two processes that most contribute evolution are crossover and fitness based selection/reproduction.
As it turns out, there are mathematical proofs that indicate that the process of Fitness proportionate Reproduction is, in fact, near optimal in some senses. Mutation also plays a role in this process. The genetic algorithm uses random “probability distribution” processes, but the result is distinctly non-random (better than random).
We can implement this genetic model of computation by having arrays of bits or characters to represent the chromosomes. Simple bit manipulation operations allow the implementation of crossover, mutation and other operations. Although a substantial amount of research has been performed on variable- length strings and other structures, the majority of work with Genetic Algorithm is focused on fixed-length character strings. When the genetic algorithm is implemented it is usually done in a manner that involves the following cycle: Evaluate the fitness of all of the individuals in the population. Create a new population by performing operations such as crossover, fitness-proportionate reproduction and mutation on the individuals whose fitness has just been measured. Discard the old population and iterate using the new population.
Algorithm GA is:
t := 0;// start with an initial time Initpopulation P (t);
parent1, parent2, parents // initialize a usually random population of individual // evaluate fitness of all initial individuals of population
Evaluate P (t);
// test for termination criterion (time, fitness, etc.) while not done do
// increase the time counter t := t + 1;
4 | P a g e Parents = two randomly selected chromosomes from the population;
parent1 = the fitter of Parents;
Parents = two randomly selected chromosomes from the population;
parent2 = the fitter of Parents;
return parent1, parent2;
Crossover P(t)
// select a sub-population for offspring production P' := selectparents P (t);
// recombine the "genes" of selected parents to generate child Recombine P‟ (t);
// perturb the mated population stochastically Mutation P‟ (t);
end GA.
Mutation P‟(t) (Algorithm for Mutation ) For every(vertex in chromosome representaion) if(color=adjacent color) {
adjacent colors= all adjacent colors;
Valid color= all colors- adjacet colors;
New color= random color from Valid colors;
vertex.setcolor=New color;
The chromosome representation of a Graph coloring problem is a simple 1D array.Each element of array is assigned a value from 1 to no. of colors.
Figure 1: Chromosome Representation of a Colored Graph
IV. ANALYSIS
Assume that a graph G = (V, E) with number of vertices n=11 and number of edges, e=20 is to be colored with minimum number of colors.
5 | P a g e
Figure 2: Myciel3 (|V|=11, |E|=20)
Data used to test our approach are derived from the DIMACS benchmarking graph collection. DIMACS is the Center for Discrete Mathematics and Theoretical Computer Science. It is part of Rutgers University (The State University of New Jersey Rutgers, et al. 2011). The data are frequently used in challenges involving constraint satisfaction problems.
According to DIMACS, the expected χ(G)=4. We will use Genetic Algorithm to find out optimal solution for G.
1. |V| is the number of vertices.
2. |E| is the number of edges.
3. K is the number of colors used in coloring.
4. χ(G) is the chromatic number.
Let G1 and G2 to be two randomly selected solutions of G. Both G1 and G2 have k=5.
Figure 3: G1 ( |V|=11, |E|=20, k=5 ) Figure 4: G2 ( |V|=11, |E|=20, k=5 )
Chromosome representation of G1 Chromosome representation of G2
Now, the two randomly selected parents will undergo crossover, and we will get two new offspring.
6 | P a g e
Figure 5: Offspring 1 (k=4) Figure 6: Offspring 1 (k=5)
Now, as said earlier, first and the foremost condition for coloring a graph is that no two adjacent vertices should have same color. Once we have our results after crossover, we check for adjacency of the graph. The adjacencies between the vertices are represented by and adjacency matrix of dimension nXn, where n is the number of vertices.Figure 7: Adjacency Matrix of Myciel3
7 | P a g e Mutation algorithm is applied on both the offspring in order to satisfy the necessary condition. We compare the color of each vertex with it‟s adjacent vertices. If there is any match then any random color other than the adjacent vertex colors is assigned to that vertex.
For offspring2, two adjacent vertices V4 and V10 have same color. If S is the set of colors used in coloring of graph G i.e. S={1,2,3,4,5}. The set of adjacent color vertices for V4 is {2,3}. Therefore any random color from the set S‟=S-{2,3} can be assigned to the vertex V4.
The results obtained from the analysis are compared with the DIMAC values. Some of the standard DIMAC values are in given table.
Table 1: DIMAC Values for Standard Graphs
V. CONCLUSION
By reviewing the method, we understand that in Genetic algorithm of Graph Coloring approach, multiple parent selection based on the closeness of the solution to the global optima are used. The algorithm is run several times for several decreasing values of k and the minimum possible k value is taken as the minimum chromatic number.
This approach uses Integer Encoding for the chromosomes.
Therefore, it is safe to say that Genetic Algorithm is an efficient method to find an optimal solution for GCP regardless of the number of iterations required.
REFERENCES
[1] C. Avanthay, A. Hertz, N. Zufferey, A variable neighborhood search for graph coloring, European Journal of Operational Research 151.
[2] Blöchliger, N. Zufferey, A graph coloring heuristic using partial solutions and a reactive tabu scheme, Computers and Operations Research 35 (3) (2008) 960–975.
[3] E.K. Burke, B. McCollum, A. Meisels, S. Petrovic, R. Qu, A graph-based hyper heuristic for timetabling problems, European Journal of Operational Research 176 (2007) 177–192.
[4] R. Dorne, J.K. Hao, Tabu search for graph coloring, T-colorings and set Tcolorings, Meta-Heuristics:
Advances and Trends in Local Search Paradigms for Optimization (1998) 77–92.
[5] D.C. Porumbel, J.K. Hao, P. Kuntz, Diversity control and multi-parent recombination for evolutionary graph coloring algorithms, in: C. Cotta, P. Cowling (Eds.), EvoCOP 2009, Lecture Notes in Computer Science, vol. 5482, Springer-Verlag, 2009, pp. 121–132.