An Efficient GA With Multipoint Guided Mutation For Graph Coloring Problems
An Efficient GA With Multipoint Guided Mutation For Graph Coloring Problems
1. Introduction
Let G = (V, E) be an undirected graph. A k-coloring of G is a partition of V into k subsets Ci, i = 1 ..... k, such that no adjacent nodes belong to the same subset. The graph coloring problem is to find a k-coloring of G with k as small as possible. This smallest k corresponds to the chromatic number X(G) of graph G. It is well known that this problem is NP-hard [11], and consequently, heuristic methods must be used for large graphs. If two adjacent vertices x and y have the same color r, vertices x and y are called conflicting vertices, the edge {x, y} is called a conflicting edge, and r is called a conflicting color. If there is no conflicting edge, then the color classes are called stable sets, and the k-coloring is said legal. The graph-coloring problem (GCP) is to determine the smallest integer k such that there exists a legal k-coloring of G. The reasons why the graph-coloring problem is important are twofold. First, there are several areas of practical interest, in which the ability to color an undirected graph with a small number of colors as possible, has direct influence on how efficiently a certain target problem can be solved. Such areas include, timetable scheduling [1], examination scheduling [2], register allocation [3], printed circuit testing [4], electronic bandwidth allocation *Corresponding Author
51
International Journal of Signal Processing, Image Processing and Pattern Recognition Vol. 3, No. 2, June, June, 2010
[5], microcode optimization [6], channel routing [7], the design and operation of flexible manufacturing systems [8], computation of sparse Jacobian elements by finite differencing in mathematical programming [9], etc. The other reason is that, the graph coloring problem has been shown to be computationally hard at a variety of levels: not only its decision problem variant is NP complete [10], but also its approximate version is NP-hard [11]. These two reasons are important enough to justify the quest for heuristics to solve graph-coloring problem. A variety of heuristics approaches have been proposed to produce optimal or near optimal colorings in a reasonable amount of time.
52
International Journal of Signal Processing, Image Processing and Pattern Recognition Recognition Vol. 3, No. 2, June, June, 2010
approach of choosing an initial k value and gradually decreasing it in an attempt to find improved feasible colorings. If the algorithm fails to find a feasible coloring in one phase, the current k value is increased and the process continues. Since k is initially set to a sufficiently large value, the procedure is guaranteed to yield a proper coloring. The procedure was tested on a set of 30 graphs associated with the Second DIMACS Challenge. The results were compared with the parallel procedure Hybrid of Lewandowski and Condon [19]. Jagotas implementation is outperformed by Hybrid in all but 6 instances. One such approach is Ant colony optimization [20] [21]. We have provided a partial review of the graph coloring literature. For more information on the graph coloring problem and a more comprehensive bibliography, we refer Michael Tricks Network Resources for Coloring a Graph (http://mat.gsia.cmu.edu/COLOR/color.html), Joe Culbersons Graph Coloring Page (http://web.cs.ualberta.ca/~joe/Coloring/index.html).
53
International Journal of Signal Processing, Image Processing and Pattern Recognition Vol. 3, No. 2, June, June, 2010
3.2 Initial population The algorithm first builds an initial population, by randomly assigning colors to different nodes. In this pool, some chromosomes will denote valid coloration and some of them are invalid. But we have not discarded these invalid colorations. Instead, we use a repair operator rep_op, which coverts the invalid chromosome to a valid one. In the pool, we have considered, one chromosome generated by the GAGCA. This rep_op checks whether two adjacent nodes have the same color or not. In that particular case, it replaces one such color by any randomly generated color. 3.3 Multi-point Special mutation We have applied a multi-point special mutation operator to improve the fitness of the chromosomes of the pool. Here, we have named the guided mutation as special mutation. Finally, the improved chromosomes are considered for the next generation. This process repeats for a prefixed number of iterations. mp_sp_mutation Step 1) Choose a particular chromosome Step 2) Reduce the multiple number of colors in that chromosome (e.g. by replacing two of the used colors by other used colors at two places) Step 3) If the coloration is invalid then apply the rep_ op (here itll try to repair the invalid coloration to valid one using the reduced number of colors available) Step 4) If it succeeds or the coloration is valid then place this chromosome in the pool Else goto step 1) 3.4 Algorithm MSPGCA Step 1) Create random initial pool of chromosomes (population) Step 2) Sort the chromosomes of the pool in ascending order of their fitness value Step 3) Supply the pool of chromosome to the GAGCA and generate new population Step 4) Apply the rep_ op to the invalid chromosomes Step 5) Calculate the fitness of the pool Step 6) Pbest = best individual Step 7) For generation = 1 to max_iteration Step 7.1) Perform crossover between any two random pair of chromosomes with probability pc Step 7.2) Apply the rep_ op to the invalid offspring Step 7.3) Select the best individuals from the newly generated offspring Step 7.4) Apply mp_sp_mutation to the pool of chromosome for certain
54
International Journal of Signal Processing, Image Processing and Pattern Recognition Recognition Vol. 3, No. 2, June, June, 2010
no_of_iteration Step 7.5) Calculate the fitness of the pool Step 7.6) Take improved chromosomes for next generation Step 8) Output the best coloration This evolutionary algorithm MSPGCA differs from a genetic algorithm by a special feature. The feature is that, in place of conventional random mutation here a multi-point mutation is applied which is nothing but a forceful decrement in number of colors. The crossover operator remains same as the standard genetic algorithms blind crossover operator. 3.5 Complexity The evolutionary algorithm based approaches have time complexity that depends on two fold analytic approach. In our case the initial population generation needs O(n) time complexity, where n is the number of nodes in a test graph. The second step is somewhat open ended. Genetic algorithms are most suitable for MIMD parallel computers and distributed computing systems (including heterogeneous systems) as those composed by networks of workstations. The analysis partly depends on the number of iterations at various levels and practical implementation of parallel genetic algorithm. We are handicapped to test our algorithms on P-IV based sequential machines. The exact time taken by the CPU is given and shows reasonable in time and space.
4. Computational Experiments
In this section, we present experimental results obtained by MSPGCA and make comparisons with other component algorithm (GAGCA). GAGCA is the conventional genetic algorithm by which we have generated a population after applying it on the initial population. In this section we present the results of our algorithm on some benchmark graphs given at http://mat.gsia.cmu.edu/COLOR04/. MSPGCA has been implemented in ANSI C and run on a Xeon 2.4GHz machine with 1GB of RAM running the Linux operating system. We have considered the population size as 10. We have considered the crossover probability pc = 0.1. The no_of_iteration for mp _sp_mutation was set to as large as the number of vertices in the graph after trial and error. The value of max_iteration depends on the density and number of nodes of the graph. On an average, for the graphs with less than 100 nodes and density less than 0.5 the value of max_iteration is order of 10. For other graphs it may vary from 20 100. For some instances (the graphs of queenm_n series, some other series), GAGCA fail to produce the optimal result, but MSPGCA gives the result. Table-1 shows the experimental results of the two algorithms and the time taken by MSPGCA.
5. Conclusions
We have presented experimental results on some of the DIMACS benchmark graphs and compared our algorithms performance with that of the other heuristic (Genetic Algorithm GAGCA) on those graphs as well. Indeed, our MSPGCA able to find the best-known results for most of the tested graphs. To strengthen conclusions made about the power of the algorithm, it is worth to test it on some other classes of large graphs.
55
International Journal of Signal Processing, Image Processing and Pattern Recognition Vol. 3, No. 2, June, June, 2010
The main purpose of this paper is to study evolutionary algorithm on graph coloring problem. In the future, we intend to refine MSPGCA and apply it to color large complex graphs in reasonable time.
2000 1800 1600 1400 1200 1000 800 600 400 200 0
GAGCA MSPGCA
T i m e
200
400 Vertices
600
Figure 1. Comparison of performances of GAGCA and MSPGCA Table1. Comparison results between GAGCA and MSPGCA Instances 1-FullIns 5.col.b 1-Insertions5.col.b 2-FullIns 4.col.b 2-Insertions4.col.b 3-FullIns 4.col.b 3-Insertions 4.col.b 4-FullIns 3.col.b 4-Insertions 4.col.b 5-FullIns 3.col.b anna.col.b david.col.b games120.col.b homer.col.b huck.col.b jean.col.b miles1000.col.b miles1500.col.b |V| 282 202 212 149 405 281 114 475 154 138 87 120 561 74 80 128 128 |E| 3247 1227 1621 541 3524 1046 541 1795 792 493 406 638 1628 301 254 3216 5198
X(G)
GAGCA 7 7 8 5 8 7 9 8 9 11 11 9 15 11 11 45 73
MSPGCA 6 5 6 5 7 5 7 5 8 11 11 9 13 11 10 42 73
6 6 6 5 7 5 7 5 8 11 11 9 13 11 10 42 73
56
International Journal of Signal Processing, Image Processing and Pattern Recognition Recognition Vol. 3, No. 2, June, June, 2010
miles750.col.b mug100 25.col.b mug88 25.col.b mulsol.i.1.col.b myciel5g_col myciel5gb_col Instances myciel6g_col myciel6gb_col myciel7g_col myciel7gb_col queen5_5.col.b queen6_6.col.b queen7_7.col.b queen8_8.col.b queen8_12.col.b queen9_9.col.b queen10_10.col.b DSJC125.1.col.b
2113 166 146 3925 236 236 |E| 755 755 2360 2360 320 580 952 1456 2736 2112 2940 736
31 4 4 49 6 6
X(G)
34 5 4 52 7 6 GAGCA 10 13 32 37 6 9 12 15 23 19 20 8
31 4 4 49 6 6 MSPGCA 7 7 8 8 5 8 7 11 14 10 14 6
7 7 8 8 5 7 7 9 12 10 11 5
6. References
[1] D. C. Wood, A technique for coloring a graph applicable to large scale time-tabling problems, Computer Journal, vol. 12, pp. 317-319, 1969. [2] F. T. Leighton, A graph coloring algorithm for large scheduling problems, Journal of Research of the National Bureau of Standards, vol. 84, no. 6, pp. 489-505, 1979. [3] F. C. Chow and J. L. Hennessy, Register allocation by priority based coloring, Proceedings of the ACM Sigplan 84 symposium on compiler construction New York, pp. 222-232, 1984. [4] M. R. Garey, D.S. Johnson and H.C. So., An application of graph coloring to printed circuit testing, IEEE Transactions on circuits and systems, vol. 23, pp. 591-599, 1976. [5] A. Gamst, Some lower bounds for class of frequency assignment problems, IEEE Transactions on Vehicular Technology, vol. 35, no. 1, pp. 8-14, 1986. [6] Micheli G. D., Synthesis and Optimization of Digital Circuits. McGraw-Hill, 1994. [7] S. S. Sarma, R. Mondal and A. Seth, Some sequential graph coloring algorithms for restricted channel routing, INT. J. Electronics, vol. 77, no. 1, pp. 81-93, 1985. [8] K. Stecke, Design, planning, scheduling and control problems of flexible manufacturing. Annals of Operations Research, vol. 3, pp. 187-209, 1985. [9] T. F. Coleman and J. J. More, Estimation of sparse Jacobian Matrices and graph coloring problems, SIAM. J. Numer. Anal., vol. 20, pp 187-209, 1983. [10] Garey, M.R. and D. S. Johnson, Computers And Intractability: A Guide To The Theory of NP Completeness. New York, W. H. Freeman and Co., 1979. [11] Baase, S. and A. V. Gelder, Computer Algorithms: Introduction To Design and Analysis. Addison-Wesley, 1999. [12] D. Costa, A. Hertz and O. Dubuis, Embedding of a sequential procedure within an evolutionary algorithm for coloring problems in graphs, Journal of Heuristics, vol. 1, no. 1, pp. 105-128, 1995. [13] A. Hertz and D. Werra, Using tabu search techniques for graph coloring, Computing, vol. 39, no. 4, pp. 345-351, 1988. [14] C. Fleurent and J.A. Ferland, Genetic and hybrid algorithms for graph coloring, Annals of Operations Research, vol. 63, pp. 437-464, 1996. [15] A. E. Eiben, J. K. Hauw and J. I. Hemert Graph coloring with adaptive evolutionary algorithms, Technical Report, TR-96-1, Leiden University, Netherlands, 1997.
57
International Journal of Signal Processing, Image Processing and Pattern Recognition Vol. 3, No. 2, June, June, 2010
[16] C. Coritoru, H. Luchian, O. Gheorghies and A. Apetrei, A New Genetic Graph Coloring Heuristic, Computational Symposium on Graph Coloring and its generalizations, COLOR02, Cornell University, September 2002. [17] E. D. Dahl, Neural Networks algorithms for an NP complete problem: Map and graph coloring, IEEE International Conference on Neural Networks, vol. 3, pp. 113-120. [18] A. Jagota, An adaptive, multiple restarts neural network algorithm for graph coloring, European Journal of Operational Research, vol. 93, pp. 257-270, 1996. [19] G. Lewandowski and A. Condon, Experiments with parallel graph coloring heuristics, Technical Report 1213, University of Wisconsin, Madison, 1993. [20] E. Bonabeau, M. Dorigo and G. Theraulaz, Inspiration for Optimization from Social Insect Behavior, Nature, Vol. 406, pp. 3942, July 2000. [21] T. N. Bui and C. Patel, An Ant system Algorithm for Coloring Graphs, Computational Symposium on Graph Coloring and its Generalizations, COLOR02, Cornell University, September 2002.
58