You are on page 1of 5

IMPACT-2013 310

The Graph Coloring Problem–Review of


Algorithms & Neural Networks and a New Proposal
Mohd. Samar Ansari Member, IEEE

Abstract—By virtue of its large range of applications, the graph mathematical problems, has also been employed for coloring
coloring problem has received considerable research interest from planar and non-planar graphs [5], [7], [9], [10], [14]–[23].
mathematicians and engineers alike. Both algorithmic & hard- Broadly, such approaches can be classified into two types–
ware methods to color a graph subject to adjacency constraints
have been explored resulting in a wide variety of options. The software implementation of algorithms and hardware based
actual selection of any one of the software/hardware methods on biologically inspired architectures. This paper presents a
would depend on the specific requirements of a particular review of both these methods for graph coloring and further
application. This paper reviews the major developments that presents a new feedback neural network for graph coloring.
have occurred both in the algorithmic and the hardware domains The paper is organised as follows. Section–II presents a
pertaining to the solution of the gaph coloring problem. Further,
a new neural circuit employing non-linear feedback in the form brief survey of existing algorithms for solving GCP. Genetic
of unipolar comparators is presented which is able to color a algorithms, belonging to the category of biologically inspired
graph more effectively than other existing neural networks for systems, are considered in this section. Section–III contains
the same task. PSPICE simulations confirm the validity of the a review of neural network based approaches, working on
approach. the principle of emulating brain neuron behaviour. A new
Index Terms—Graph Coloring, Neural Networks, Local Search non-linear feedback neural circuit for the solution of GCP
Methods, Non-Linear Feedback, Dynamical Systems, Energy is presented in Section–IV.The energy function associated
Function.
with the proposed network is discussed and the proof of its
validity is also provided in this section. Section–V contains the
I. I NTRODUCTION results of PSPICE simulations for the proposed circuit and a
discussion about the issues that may arise during the course of
Raph colouring is the assignment of labels (conven-
G tionally referred to as ‘colours’) to vertices of a graph
subject to the constraint that no two adjacent nodes should
actual fabrication of the proposed network. Lastly, concluding
remarks appear in Section-VI.

obtain the same colour; adjacency being defined by an edge


connecting the two nodes. The graph colouring problem (GCP) II. A LGORITHMS FOR GCP
was identified as a mathematically challenging problem when The simplest possible algorithm for coloring graphs would
Francis Guthrie, while trying to colour a map of English be the Brute-Force method in which k-coloring is evaluated by
counties, put forward the Four Colour Conjecture claiming that successively assigning each of the k n assignment of k colors
four colours are sufficient to fulfill the criterion that no two to the given graph containing n vertices, and athenticating
regions sharing a common boundary received the same colour the validity of the coloring [1]. However, such an approach
[1]. The conjecture was evetually established as a theorem with would be impractical for large graphs since a large number
Kempe’s proof [2]. Later, Heawood forwarded arguments to of iterations would be required. Using dynamic programming
disprove Kempe’s proof and coined the Five Colour Theorem and a bound on the number of maximal independent sets,
which stood valid until 1976 when the Four Colour Theorem k-colorbility can be computed in O(2.445n ) [24]. Using
was finally correctly proved by Appel & Haken [3]. GCP has inclusion-exclusion and Yates’s algorithm for the fast Zeta
been studied by mathematicians and computer engineers as transform, the same task may be achieved in O(2n n) [25].
an algorithmic problem and is also listed in Karp’s 21 NP- If computing 3– and 4–colorability (instead of the general k-
complete problems [4]. colorability) is the goal, then run times of O(1.3289n ) and
The GCP and its variants have applications in many impor- O(1.7504n ) would suffice [26], [27]. Recursive procedures
tant scientific and engineering tasks [5], such as time–tabling like the Deletion-Contraction algorithm exhibit running times
or event scheduling [6], [7], register and processor allocation of the order of O(1.6180n ) [28]. In actual practice, branch
in digital computers [8], frequency/channel assignment in & bound techniques and graph isomorphism rejection are
mobile communication systems [9], layer assignment in VLSI employed in tandem with contraction algorithms to avoid
design [10], via minimization in integrated circuit design [11], recursive calls and the running time is further reduced.
robotics [12], printed circuit board testing [13], etc. Since the Greedy algorithm is another popular method for assigning
domain of applications of GCP solvers is enormous, almost colors to nodes in a graph. It works by considering the vertices
every technique, that has been put forward for the solution of of the graph in a specific order and assigning the smallest
available color not used by the node vi ’s neighbours, adding
M.S. Ansari is with the Department of Electronics and Communica-
tion, Malaviya National Institute of Technology, Jaipur, India. e-mail: (md- a fresh color, if needed [29]. A heuristic which is a slight
samar@gmail.com). variant of the Greedy algorithm is referred to as the Welsh
978-1-4799-1205-6/13/$31.00 ©2013 IEEE
IMPACT-2013 311

algorithm [30]. Brelaz published another variant of the Welsh– employing non-linear feedback in the form of comparators
Powell algorithm with the improvement that the ordering is as opposed to linear feedback using resistors in the HNN,
done dynamically by choosing the vertex adjacent to the vertex and yielded improved coloring results over the (then) existing
with the largest number of different colors [31]. neural networks [20]. Another noteworthy feature of that work
Another class of algorithms that employ the concept of was the significant reduction in hardware complexity over
symmetry breaking to color a graph is referred to as distributed the contemporary neural circuits for GCP. As an example,
algorithms. Such distributed (or ‘parallel’) algorithms are, in the non-linear synaptic interconnection based network of [20]
general, faster than the deterministic methods discussed above. employed O(n2 ) neurons for coloring a graph with n vertices
One downfall of deterministic algorithms is that they fail in the as opposed to the HNN-based approaches, which generally
case of symmetrical graphs. Cole & Vishkin showed that for require O(n4 ) neurons (10000 neurons for a 10 node prob-
an n-cycle kind of graph, there exists a distributed algorithm lem!) thereby making them less suitable for an actual hardware
capable of reducing the number of colors fron n to O(logn) implementation. More recently, Talavan & Yanez presented a
in one iteration [32]. Barenboim & Elkin proposed a fast discrete-time neural network which utilizes the principles of
deterministic algorithm capable of achieving time complexity the continuous-time energy function proposed by them earlier
of O(∆) + log ∗ (n)/2 where ∆ is the maximum vertex degree and is able to avoid invalid colorings completely [22].
of the graph and log ∗ is the iterated logarithm function [33].
Dubhashi et al. employed network decomposition
√ to yield
computation times of the order of 2O( log n) [34]. Some IV. P ROPOSED N ON -L INEAR F EEDBACK N EURAL C IRCUIT
FOR G RAPH C OLORING
decentralized algorithms have also been proposed where no
local message passing is allowed as opposed to the case of Fig. 1 presents the i-th neuron of the proposed voltage-
distributed algorithms where message passing is common. The mode neural circuit for graph colouring. The output of the i-
algorithms by Clifford & Leith [35], and Duffy et al. [36] th neuron, Vi , corresponds to a voltage label (colour) assigned
belong to this category. to the i-th node. Selective connections are provided from the
output of the neurons to the comparators connected in the
III. N EURAL N ETWORKS FOR G RAPH C OLORING feedback path. The voltage feedback from a node, which is
connected (adjacent) to the i-th node, is allowed as an input
The dynamical approach was employed by Hopfield in a of the unipolar comparator connected in the feedback path. For
continuous-time linear feedback neural circuit which worked non-adjacent nodes, no feedback signal arrives at the input of
on the principle of dissipative dynamics of the neurons. The the i-th neuron, thereby meaning that no comparators would
architecture, eventually came to be called the Hopfield Neural be present for such cases. Cpi and Rpi denote the internal
Network (HNN), and was employed with mixed results in capacitance and resistance of the i-th neuron respectively, ui
a large number of combinatorial optimization problems [x]. is the internal state and Rii is the self-feedback resistance of
However, the HNN when applied to solve the GCP exhibited i-th neuron. The output of other neurons Vj ; (j = 1, 2 . . . , n)
two major shortcomings–firstly, the energy function associated are connected to the input of i-th neuron through unipolar
with the HNN caused the network to converge to local comparators. The value of RC was chosen to be 1 K Ω and
minima (rather than the global minimum) thereby degrading the self-feedback resistance for each neuron was calculated as
the solution quality; and secondly, there were quite a few
parameters which were required to be set manually. Talavan RC
Rii = (1)
& Yanez introduced a new energy function that generalizes D−1
the HNN’s energy function and removed, to some extent, the
where D is the maximum degree amongst all nodes in the
limitations of the original HNN [37]. Later, Dahl explored
graph to be coloured [20]. The ideal transfer characteristics of
four-colorability problem of planar graphs [38]. Philipsen &
voltage-mode bipolar and unipolar comparators are presented
Stok employed a combination of Hopfield type of neurons
in Fig. 2. One possible circuit realization for obtaining the
and the Potts neurons for minimizing the number of colors
transfer characteristics of Fig. 2(b) is presented in Fig. 3,
needed [19]. Takefuji & Lee proposed another neural ar-
which shows a diode used in conjunction with an opamp
chitecture for GCP proposed a parallel algorithm based on
implementing the voltage-mode bipolar voltage comparator.
the McCulloch-Pitts binary neuron model and the Hopfield
The self-feedback resistance Rii can be calculated using (1).
neural network. [21]. The neural network attributed to Gassen
Next, in order to ascertain values of the resistances connected
& Carothers considered register allocation as being mapped
in the synaptic paths, we define a constant gij such that
to the non-planar graph coloring problem. [16]. Berger used
a maximum neural network model to k-color vertices of a
simple undirected graph; the network being guaranteed to
 
1; i-th node connected to j-th node
converge to valid solutions with no parameter tuning needed. gij = (2)
0; otherwise
[14]. Jagota mapped the GCP onto the sandard HNN by
reducing the GCP to a maximum independent set problem Using (2), the resistance in the j-th synapse of the i-th
[17]. Di Blas et.al. employed k-state neurons, as opposedto neuron is given by
binary neurons, to avoid incorrect coloring [15]. Rahman, Rc
Rij = (3)
Jayadeva & Dutta Roy proposed a feedback neural network, gij
IMPACT-2013 312

where
N
1 X 1 1 1
= + + (6)
Ri j = 1
R ij R ii R pi
j 6= i

Using (4) in (5), we have


N
dui X Vm Vi ui
Ci = [tanh β (Vj − Vi ) + 1] + −
dt j = 1
2R ij Rii Ri
j 6= i
(7)
Also, for dynamical systems based on the Hopfield ap-
proach, the following holds [20]
dui dE
Ci =− (8)
dt dVi
Fig. 1. i-th neuron of the proposed circuit for graph colouring. (Feedback to Therefore, the energy function E of the network in Fig. 1
unipolar comparators is from all neurons corresponding to the nodes which can be given by
are adjacent to the i-th node; j = 1, 2, . . . , n; j 6= i)
N N N
1 X Vi2 Vm X X
E= − gij ln cosh (β (Vj − Vi ))
2 i=1 2Rii 4βRc i=1 j = 1
j 6= i

N N
Vm X X
− gij Vi
2Rc i=1 j = 1
j 6= i

N Z Vi
X 1
+ ui dV (9)
i=1
Ri 0

The last term in (9) is usually neglected for high values of


Fig. 2. Transfer characteristics of (a) bipolar voltage-mode comparator (b) the open-loop gain of the opamp used to realize the neurons.
unipolar voltage-mode comparator The first term on the right hand side of (9) is quadratic which
tries to minimize the number of colors. The second term has
got a negative sign. Therefore, the energy function E will be
minimized if second term is maximized. This happens when
From Fig. 1, the output of the unipolar comparator, xij can
the voltages corresponding to connected nodes in a graph are
be written as
far away from each other. The first two terms on the right hand
Vm side are balancing each other to color a graph properly. The
xij = [tanh β (Vj − Vi ) + 1] (4)
2 third term also contributes to lowering of number of different
where β is the open-loop gain of the comparator (practically colors by eliminating all those local minima in the energy
very high) and Vm is the saturation voltage level of the function for which node voltages are negative.
comparator output. Node equation for node ‘Ni ’ gives the
equation of motion of the i-th neuron in the state space as V. S IMULATION R ESULTS & VLSI I MPLEMENTATION
N
I SSUES
dui X xij Vi ui
Ci = + − (5) To ascertain the validity of the proposed approach. computer
dt j = 1
R ij Rii R i simulations using PSPICE program were performed for varous
j 6= i
random graphs as well as a standard benchmark problem for
graph coloring, myciel3.col [39]. The results of simulation runs
performed on the chosen random graphs are presented in Table
I from which it can be seen that the proposed network gives
a solution to all the problems tested and in all the cases the
solution is very near to the chromatic number of the graph.
Fig, 4 shows the result of PSPICE simulation for the graph
at S. No. 2 in Table I for the case when the network assigns
two colors. Simulation runs of the proposed network for the
myciel3.col benchmarking problem (chromatic number, χ =
Fig. 3. Obtaining the unipolar characteristics by using a bipolar comparator 4) returned the best solution of 5 colors and the PSPICE
and a diode
simulation result is presented in Fig. 5.
IMPACT-2013 313

TABLE I
PSPICE SIMULATION TEST RESULTS FOR THE PROPOSED NETWORK

Fig. 5. PSPICE simulation result for myciel3.col benchmarking problem

VI. C ONCLUSION
A non-linear feedback neural network based architecture
to solve graph coloring problem is presented. Test results of
PSPICE simulation for different graphs including the my-
ciel3.col benchmark problem are presented. The proposed
circuit was found to correctly assign colors to the chosen
graphs and in all cases the number of colors assigned was very
close to the chromatic number of the graphs. The technique is
suitable for VLSI implementation as the ubiquitous opamp is
employed to emulate the functionality of the neurons and the
non-linear synapses.

R EFERENCES
[1] M. Kubale. Graph colorings, volume 349. American Mathematical
Society, 2004.
[2] J. Hutchinson and S. Wagon. Kempe revisited. The American Mathe-
matical Monthly, 105(2):pp. 170–174, 1998.
[3] K.I. Appel and W. Haken. Every planar map is four colorable.
Contemporary mathematics. American Mathematical Society, 1989.
[4] R. Venkatesan and L. Levin. Random instances of a graph coloring
problem are hard. In Proceedings of the twentieth annual ACM
symposium on Theory of computing, STOC ’88, pages 217–222, New
York, NY, USA, 1988. ACM.
[5] U. Catalyurek and C. Klein. Graph Coloring and Clustering Algorithms
for Science and Engineering Applications. PhD thesis, 2008.
[6] A. Dandashi and M. Al-Mouhamed. Graph coloring for class scheduling.
Fig. 4. PSPICE simulation result for graph no. 2 in Table I
In Computer Systems and Applications (AICCSA), 2010 IEEE/ACS
International Conference on, pages 1 –4, may 2010.
[7] K. Giaro, M. Kubale, and P. Obszarski. A graph coloring approach
to scheduling of multiprocessor tasks on dedicated machines with
availability constraints. Discrete Applied Mathematics, 157(17):3625 –
The proposed circuit is amenable for contemporary CMOS 3630, 2009. Sixth International Conference on Graphs and Optimization.
integration processes by virtue of the use of operational [8] X.-J. Yang, Y. Deng, L. Wang, X.-B. Yan, J. Du, Y. Zhang, G.-B. Wang,
and T. Tang. Srf coloring: Stream register file allocation via graph
amplifiers as the active building block for emulating neuronal coloring. Journal of Computer Science and Technology, 24:152–164,
functionality. The presence of floating resistors could make 2009.
the process cumbersome and MOSFET-based resistors can be [9] S. Singha, T. Bhattacharya, and S.R.B. Chaudhuri. An approach for
reducing crosstalk in restricted channel routing using graph coloring
utilized to make the circuit more compatible for fabrication problem and genetic algorithm. In Computer and Electrical Engineering,
[40]. A better alternative from the viewpoint of chip area 2008. ICCEE 2008. International Conference on, pages 807 –811, dec.
conservation would be the use of transconductance elements, 2008.
[10] J. Yu and S. Yu. A novel parallel genetic algorithm for the graph coloring
having voltage inputs and a current output, in the feedback problem in vlsi channel routing. In Natural Computation, 2007. ICNC
paths [41]. Conveying of the synaptic signals as currents 2007. Third International Conference on, volume 4, pages 101 –105,
reduces the overall number of resistances drastically and aug. 2007.
[11] R.-B. Lin and S.-Y. Chen. Conjugate conflict continuation graphs
makes the circuit favorable from the viewpoint of actual VLSI for multi-layer constrained via minimization. Information Sciences,
implementation. 177(12):2436 – 2447, 2007.
IMPACT-2013 314

[12] M. Demange, T. Ekim, and D. de Werra. A tutorial on the use of [38] E.D. Dahl. Neural network algorithm for an np-complete problem:
graph coloring for some problems in robotics. European Journal of Map and graph coloring. In Proceedings of the IEEE International
Operational Research, 192(1):41 – 55, 2009. Conference on Neural Networks, pages 113–120, 1987.
[13] M. Garey, D. Johnson, and Hing So. An application of graph coloring [39] T.-W. Yue and Z. Z. Lee. A q’tron neural-network approach to solve the
to printed circuit testing. Circuits and Systems, IEEE Transactions on, graph coloring problems. pages 19–23, Paris, France,, 2007. 19th IEEE
23(10):591 – 599, oct 1976. International Conference on Tools with Artificial Intelligence (ICTAI).
[14] M.O. Berger. k-coloring vertices using a neural network with con- [40] R. Senani. Realisation of linear voltage-controlled resistance in floating
vergence to valid solutions. In Neural Networks, 1994. IEEE World form. Electronics Letters, 30(23):1909 –1911, nov 1994.
Congress on Computational Intelligence., 1994 IEEE International [41] M.S. Ansari. Employing differential voltage current conveyor in
Conference on, volume 7, pages 4514 –4517 vol.7, jun-2 jul 1994. graph coloring applications. In Power, Control and Embedded Systems
[15] A. Di Blas, A. Jagota, and R. Hughey. Energy function-based approaches (ICPCES), 2010 International Conference on, pages 1 –3, 29 2010-dec.
to graph coloring. Neural Networks, IEEE Transactions on, 13(1):81 – 1 2010.
91, jan 2002.
[16] D.W. Gassen and J.D. Carothers. Graph color minimization using neural
networks. In Proceedings of 1993 International Joint Conference on
Neural Networks, (IJCNN ’93) Nagoya., volume 2, pages 1541 – 1544
vol.2, oct. 1993.
[17] A. Jagota. An adaptive, multiple restarts neural network algorithm for
graph coloring. European Journal of Operational Research, 93(2):257
– 270, 1996. Neural Networks and Operations Research/Management
Science.
[18] T. Maitra, A. J. Pal, M. Choi, and T. Kim. Hybridization of ga and ann to
solve graph coloring. In Tai-hoon Kim, Adrian Stoica, and Ruay-Shiung
Chang, editors, Security-Enriched Urban Computing and Smart Grid,
volume 78 of Communications in Computer and Information Science,
pages 517–523. Springer Berlin Heidelberg, 2010.
[19] W.J.M. Philipsen and L. Stok. Graph coloring using neural networks. In
Circuits and Systems, 1991., IEEE International Sympoisum on, pages
1597 –1600 vol.3, jun 1991.
[20] S.A. Rahman, Jayadeva, and S.C. Dutta Roy. Neural network approach
to graph colouring. Electronics Letters, 35(14):1173 –1175, jul 1999.
[21] Y. Takefuji and K.C. Lee. Artificial neural networks for four-coloring
map problems and k -colorability problems. Circuits and Systems, IEEE
Transactions on, 38(3):326 –333, mar 1991.
[22] P. M. Talavan and J. Yavez. The graph coloring problem: A neuronal net-
work approach. European Journal of Operational Research, 191(1):100
– 111, 2008.
[23] J. Wu, L. Jiao, R. Li, and W. Chen. Clustering dynamics of nonlinear
oscillator network: Application to graph coloring problem. Physica D:
Nonlinear Phenomena, 240(24):1972 – 1978, 2011.
[24] E.L. Lawler. A note on the complexity of the chromatic number problem.
Information Processing Letters, 1976.
[25] A. Bjorklund and T. Husfeldt. Inclusion–exclusion algorithms for
counting set partitions. In Foundations of Computer Science, 2006.
FOCS ’06. 47th Annual IEEE Symposium on, pages 575 –582, oct.
2006.
[26] Richard Beigel and David Eppstein. 3-coloring in time o(1.3289n).
Journal of Algorithms, 54(2):168 – 204, 2005.
[27] J.M. Byskov. Enumerating maximal independent sets with applications
to graph colouring. Operations Research Letters, 32(6):547 – 556, 2004.
[28] C.R. Cloninger, S. Sigvardsson, M.I. Bohman, R.A. Ferguson, K. E.
Browman, and J. C. Crabbe. Wilf: Algorithms and complexity. In
Proceedings of ISSAC 94, pages 264–268. Prentice-Hall, 1986.
[29] M. Charikar. Greedy approximation algorithms for finding dense
components in a graph. In Approximation Algorithms for Combinatorial
Optimization, volume 1913 of Lecture Notes in Computer Science, pages
139–152. Springer Berlin / Heidelberg, 2000.
[30] F. D. J. Dunstan and D. J. A. Welsh. A greedy algorithm for solving a
certain class of linear programmes. Mathematical Programming, 5:338–
353, 1973. 10.1007/BF01580137.
[31] D. Brelaz. New methods to color the vertices of a graph. Commun.
ACM, 22:251–256, April 1979.
[32] Richard Cole and Uzi Vishkin. Deterministic coin tossing with applica-
tions to optimal parallel list ranking. Information and Control, 70(1):32
– 53, 1986.
[33] L. Barenboim and M. Elkin. Deterministic distributed vertex coloring
in polylogarithmic time. J. ACM, 58:23:1–23:25, October 2011.
[34] D. Dubhashi, A. Mei, A. Panconesi, J. Radhakrishnan, and A. Srinivasan.
Fast distributed algorithms for (weakly) connected dominating sets and
linear-size skeletons. pages 717–724, 2003.
[35] P. Clifford and D. Leith. Channel dependent interference and decentral-
ized colouring. 4465:95–104, 2007.
[36] K. R. Duffy, C. Bordenave, and Douglas J. Leith. Decentralized
constraint satisfaction. CoRR, abs/1103.3240, 2011.
[37] P.M. Talavan and J. Yanez. The generalized quadratic knapsack problem.
a neuronal network approach. Neural Networks, 19(4):416 – 428, 2006.

You might also like