1 Introduction
Given an undirected graph , where is the node set and is the edge set, and a number of colors, a valid coloring of the graph is the assignment of exactly one color to each node such that adjacent nodes (that is, nodes that are connected by an edge) do not share the same color. Formally, we say that a coloring of an undirected graph is a function such that for each edge . The optimization version of the graph coloring problem (GCP), which is hard [22], consists in finding the minimum number of colors such that a valid coloring can be found. This number is called the chromatic number of graph and is denoted by . The GCP is a quite generic problem. Practical applications originate especially from problems that can be modelled by networks and graphs, for example, communication networks. Several tasks in modern wireless adhoc networks, such as sensor networks, are related to graph coloring. Examples include TDMA slot assignment [20], detection of mobile objects and reduction of signaling actuators [38], distributed MAC layer management [18], energyefficient coverage [9], delay efficient sleep scheduling [30] or wakeup scheduling [24]. Due to the distributed nature of these networks, algorithms for solving problems related to graph coloring are generally also required to be distributed [32]. Such algorithms make an exclusive use of local information for deciding the color of the nodes, that is, they are characterized by the absence of any central control mechanism. The goal of this paper is to device an algorithm for generating valid colorings in a distributed manner.
The distributed conception of an algorithm is generally beneficial for its scalability. Moreover, in comparison to centralized approaches it is generally much easier to adapt a distributed algorithm to dynamic changes during execution. Unfortunately, the exclusive use of local information is often not sufficient to completely capture the internal structure of certain graphs or networks. The following example helps to understand the tradeoff between generating colorings from a local and a global perspective. Figure 1 shows a graph which has been constructed using four different triangles, that is, complete graphs of three nodes. Hereby, we distinguish between three inner triangles (the three groups of nodes that are close together) and one outer triangle. The three inner triangles are connected to the outer triangle such that each node of a specific inner triangle is connected to a different node of the outer triangle. Even in a distributed manner it is fairly easy to obtain optimal colorings for each of the inner triangles. Depending on the specific color assignment concerning the three inner triangles the outer triangle may be colored with the same three colors (as in Figure 1(a)) or with three additional colors (as in Figure 1(b)
). Unfortunately, probability for the latter case is quite high, especially when the complexity of the graph is increased by adding more inner triangles. As mentioned already above, one of the key difficulties when coloring graphs in a distributed manner is that each node is only provided with local information and, therefore, it is unable to detect situations such as the one from Figure
1(b).1.1 Our Contribution
In this paper we propose a distributed algorithm for graph coloring based on the calling behavior exhibited by male Japanese tree frogs for the attraction of females. Several researchers have observed that male Japanese tree frogs decouple their calls [37]. This property has evolved because females can only localize the males when their calling is not too close in time. In [1] Aihara et al. proposed a theoretical model for simulating the behavior of these frogs. The authors describe an oscillator system, where each oscillator has a phase that changes over time with frequency (where is the time interval between two calls of the same frog). When the phase reaches , the oscillator fires and returns to the baseline phase (). The proposed system works such that oscillators try to maximize the distance between their phases. This model works nicely for the desynchronization of two oscillators. However, when more than two oscillators are concerned, the model does not accurately reflect the real behavior of the frogs. A subsequent work [2] mentions some potential applications of this model in artificial life and robotics. In both works the author(s) mention the limitations of the systems when operating with groups of more than two coupled oscillators. In fact, already with three oscillators the final solution (and its stability) strongly depends on the initial variable settings.
The desynchronization of the frogs’ calls is achieved in a selforganized way. Therefore, the algorithm proposed in this paper, which is based on this selfdesynchronization mechanism, can be regarded as a swarm intelligence approach [7, 5]. Swarm intelligence is a field of computer science which is inspired by the collective behavior of social animals and other selforganizing processes from nature. Successful examples from the literature include particle swarm optimization (PSO) [23], which is an algorithm for optimization inspired by bird flocking and fish schooling, and ant colony optimization (ACO) [11], which is inspired by the foraging behavior of ant colonies. One of the distinguishing properties of a swarm intelligence approach is the fact that the problem at hand is solved from a local perspective. Moreover, problem solving is based on the cooperation of rather simple entities. Instead of each entity trying to solve the problem by itself, they perform simple tasks from a local perspective. The global problem is solved as a result of cooperation. Therefore, swarm intelligence principles are well suited for their use in distributed algorithms.
The proposed algorithm uses a desynchronization method based on the original model by Aihara et al. [1], with some small modifications. The algorithm can be easily implemented, for example, in sensor networks. In addition to competitive results it comes with several advantages as, for example, a low consumption of energy resources or its potential ability to adapt to changes in the network topology. However, as mentioned before, the main goal of the algorithm is to obtain valid colorings that use an aslowaspossible number of colors, while keeping the number of iterations necessary to reach these results as low as possible. An extensive experimental evaluation shows that the results of the algorithm are comparable or better than the ones of stateoftheart algorithms for what concerns the number colors. In particular, the good performance of our algorithm for grid graphs of any size is remarkable. On the downside, the results also show that our algorithm may require a slightly higher number of communication rounds than other stateoftheart algorithms.
1.2 Prior Work on Graph Coloring
Concerning prior work, a distinction must be made between centralized and distributed algorithms. Concerning centralized algorithms, the literature offers both exact approaches that guarantee to find an optimal solution in bounded time and (meta)heuristic approaches. A recent survey can be found in
[33]. Due to the intractable nature of the GCP, larger problem instances can only be tackled efficiently by heuristic approaches. Especially effective are the tabu search algorithm from [4], a hybrid approach combining tabu search and evolutionary algorithms from
[31] and a variable neighborhood search technique [21]. These algorithms are nowadays the best centralized metaheuristics for solving the GCP.When considering distributed algorithms, it is very difficult (if not impossible) to narrow down the state of the art to a small set of algorithms. This is because distributed algorithms may be designed with very different goals. These goals may concern, for example, the performance for particular topologies, the minimization of execution time (or communication rounds), the generation of the best colorings possible, or the performance for dynamically changing topologies. In addition, a general problem is that most proposals are not evaluated on publicly available sets of benchmark instances. Moreover, results are generally not shown per instance, making it difficult to compare to the proposed algorithms. In the following we only focus on algorithms that generate valid solutions and possibly refer to their simplicity, solution quality and time complexity.^{1}^{1}1In the scope of this paper the time complexity is, as usual, measured in terms of communication rounds. A communication round is the unit of time in which each node is allowed to send at most one message. It must also be noted that many of the proposed distributed algorithms were developed for applications in networks of devices with scarce resources. For this reason authors often study the message load the algorithm implies and try to minimize the amount of calculus required by the algorithm. Typically, these algorithms are meant to work on a lower layer of the network in parallel with the applications or information flows that the user may require to send. In [15], Fraigniaud et al. study the effect of the amount of information shared between the nodes on the quality of the obtained colorings.
One of the most general works was presented by Finocchi et al. in [13]. The authors introduced three versions of a distributed algorithm and study its behavior under various conditions. The authors considered both the problem of obtaining colorings in as few communication rounds as possible, as well as the problem of generating the best possible colorings without any limit on the number of communication rounds. The authors provide extensive experimental results for both cases. Most of their experimentation is based on random graphs, which are not publicly available. However, they also offer results on a wellknown set of publicly available instances from the DIMACS challenge [14]. As the algorithm proposed in [13] was shown to outperform the state of the art, we have chosen this algorithm for comparison.
Concerning distributed algorithms based on swarm intelligence principles, the literature offers, for example, a method inspired by the synchronous flashing of fireflies (see [27]). This algorithm, which allows a simple implementation, reaches valid colorings fast, in a constant number of communication rounds, regardless of the size of the network. However, this work does not focus on minimizing the number of colors. The first intent to use the calling behavior of frogs for graph coloring was presented in [29]. Valid colorings are obtained by assigning a color to each phase used by the nodes (that is, the oscillators). Therefore, if two nodes are synchronized to exactly the same phase, they will be sharing a common color (the authors consider a function , where is the time frame between two callings of the same frog). The main drawback of this approach is that nodes with very near phases will be colored with different colors. As such small deviations usually occur when the number of nodes in the system increases, the algorithm does not obtain competitive results. This work was further extended by adding a parameter for setting a priori the number of allowed phases [28]. Experimentation shows that the system is able to find optimal solutions for small topologies, provided the optimal number of colors is known. Note that in contrast to these works, the algorithm that we propose aims for the minimization of the used number of colors without any prior knowledge about the optimal solution.
The literature also offers many works that consider distributed graph coloring from a theoretical point of view. Most of them concern upper bounds for the coloring quality as well as the time complexity under different constraints. Hansen et al. [19] proposed the distributed largestfirst (DLF) algorithm that runs in communication rounds for arbitrary graphs and that was proven to provide good upper bounds for specific topologies. This algorithm was based on the largestfirst approach which consists in giving priority for choosing a color to the nodes with the highest degree (). This work was further extended by Kosowski and Kuszner [25] who reduced the time complexity to . These authors also proved that some other approaches, like smallestlast or dynamicsaturation, are not suitable for distributed environments. Later, in [34] Moscibroda and Wattenhöfer introduced an algorithm for obtaining colorings in time when considering random geometric graphs and other wellknown models for wireless multihop networks (no results are given for other topologies). Other theoretical works which may be of interest for the development of new algorithms are the game theoretic approach for efficient graph coloring from Panagopoulou and Spirakis [36] and the work by Kuhn and Wattenhöfer [26], which introduces a new lower bound on the number of colors used by algorithms that are restricted to one single communication round and a new lower bound on the time complexity of obtaining a coloring of a graph.
1.3 Organization of the Paper
The rest of this paper is organized as follows. Section 2 describes the behavior of frogs in nature, which has inspired our algorithm. Moreover, existing models are outlined. In Section 3 the algorithm is introduced. An extensive experimental evaluation of the proposed algorithm is presented in Section 4. Finally, Section 5 is dedicated to conclusions and the outline of future work.
2 Modelling the Calling Behavior of Japanese Tree Frogs
Different studies (see, for example, [37]
) have shown that male Japanese tree frogs use their calling to attract females. Apparently, females of this family of frogs can recognize the source of the calling in order to determine the current location of the corresponding male. A problem arises when two of these males are too close in space and communicate at the same time. In this case females are not able to properly recognize both calls independently and are, therefore, unable to detect where the calls came from. For this reason, males have evolved to desynchronize their sounds in time. They achieve to uniformly distribute the distance between each pair of calls, which allows the females to locate the males they can hear, and to choose one. In fact, this behavior is a prime example for selforganization in nature.
More recently, Aihara et al. [1] introduced a formal model based on a set of coupled oscillators each one simulating the phase change in the calling period of a single frog. As oscillators are associated to frogs, we will use both terms in the following with the same meaning. The basic way of working of this model is graphically illustrated in Figure 2(a). The circle represents—in all three graphics—the time frame between two calls of the same frog (
), the calling period. The nodes marked by integer numbers 1 and 2 indicate the phase of the corresponding frogs, that is, the moment of time in which they call. Note that the oscillators are not able to reach perfect antiphase in a single step. In general, an indefinite number of steps is needed before reaching the stable situation corresponding to perfect antiphase. Moreover, the difficulty of reaching the optimal configuration tends to increase with an increasing number of frogs and also with an increasing degree of interaction between them (note that two frogs that can not hear each other do not influence each other).
Technically, the system introduced by Aihara et al. [1] works as follows. Each oscillator has a phase that changes over time with frequency (where is the time interval between two calls of the same frog, the calling period). When the phase reaches , the oscillator fires and returns to the baseline. In addition, oscillators may be coupled with other oscillators. In case an oscillator is coupled to an oscillator , when oscillator fires, oscillator receives a boost and changes the frequency of firing in the next round depending on the gap (see below) between both oscillators. These changes do not happen instantly upon receiving the stimulus. The corresponding oscillator rather waits until it fires. The model can be summarized in the following equations. First, the behavior of an isolated oscillator is modelled as follows:
(1) 
Assuming that oscillators and are coupled, the gap between their (current) phases is defined as:
(2) 
Now, the change in the behavior of oscillator as influenced by oscillator can be described as follows:
(3) 
where is the phase shift function which is responsible for changing the phase of the frogs that are influenced by other frogs. In [1], the authors suggest the use of the following phase shift function:
(4) 
We say that this system of oscillators is in a stable situation and in antiphase when the following two conditions are satisfied:
(5)  
(6) 
for all . The system presented in [1] is able to successfully locate two coupled oscillators in perfect antiphase, independent of the initial settings of and . Unfortunately, several problems arise when the number of oscillators grows. Figure 3(a) shows two examples for such problems. Given an undirected graph , henceforth we will assign one oscillator to each node in the graph. Therefore, in the following the terms node and oscillator will refer to the same. We consider that two oscillators are coupled if and only if their corresponding nodes are connected by an edge. Depending on the initial phases of the oscillators, for both topologies shown in Figures 3(a) and 3(d) it is possible to reach suboptimal desynchronizations (as shown in Figures 3(b) and 3(e)). The corresponding optimal desynchronizations are shown in Figures 3(c) and 3(f). In [1] the authors provide analytical results for using three oscillators and show that there is a high system sensitivity with respect to the initial phases (only a small subset of the possible initial settings leads to an optimal solution).

The initial model by Aihara et al. [1] was later extended by Mutazono et al. [35]. They used their extended model for antiphase synchronization for the purpose of collisionfree transmission scheduling in sensor networks. In order to make the system applicable to larger topologies (sensor networks may consists of hundreds of nodes), they introduced weights in order to regulate the coupling between each pair of oscillators. The resulting phase shift function as introduced in [35] can be described as follows:
(7)  
(8) 
Thanks to these weights, the system reaches stable situations more easily, especially when rather small values of are used. The authors experimented with topologies of up to nodes and although the system still showed certain difficulties to reach stable solutions, the sensitivity to initial conditions decreased significantly.
Mutazono et al. [35] compared the results of their system to another mechanism for coupled oscillator desynchronization proposed in [10]. Note that the mechanism from [10] is not based on the calling behavior of Japanese tree frogs. The main difference to froginspired systems is the fact that the phase change of a node is made on the basis of only two other nodes. The phase values allow to order all the nodes sequentially from small to large phase values. The nodes whose phase values are used to change the phase value of a node are determined as the predecessor and the successor in this (cyclic) sequence. As shown in [35], both systems achieve similar results although no extensive experimentation is made on a broadenough set of network topologies: mostly random geometric graphs and handmade instances with at most eight nodes were used.
Another extension of the system by Aihara et al. [1] was introduced in [29]. The changes concern the use of different weights for the phase shift function and the introduction of a socalled frustration parameter which reduces the coupling between each pair of nodes. The authors show that their system is able to obtain better solutions than the original model for many different topologies as, for example, partite graphs, grids or platonic solids. Moreover, the authors make some interesting observations: (1) the number of oscillators is not the key factor for achieving desynchronization. It is rather the topology which most determines the problem complexity. (2) the time distance between phases is not uniformly distributed around the whole period. The number of nodes firing at each phase strongly affects the amount of time between the phases.
3 FrogSim: An Algorithm for Distributed Graph Coloring
Although the FrogSim algorithm will be described in terms of an algorithm applied in static sensor networks, it can be applied with very few modifications in any other communication network. The algorithm works iteratively using communication rounds. A communication round corresponds to the calling period () as known from the models presented in the previous section. The only difference is that the length of a communication round is considered to be one time unit. Therefore, the numerical length of a communication round is denoted by 1, instead of . Each sensor node executes exactly one sensor event in each communication round. The moment in time when a sensor node executes its sensor event is denoted by . Note that corresponds to the phase of an oscillator from the models presented in the previous section. Apart from , a sensor node also stores its current color, denoted by . For simplicity and without loss of generality, we assume that each color is uniquely identified by a natural number. Thereafter we will use natural numbers greater than zero to refer to colors. Moreover, a sensor event includes the sending of exactly one message. Therefore, each sensor node maintains a message queue for sensor event messages received from other sensor nodes since the last execution of its own sensor event. The pseudocode of a sensor event is shown in Algorithm 1. In the following we give a rough description of the algorithm. Detailed technical explanations of the functions of Algorithm 1 will be provided later on.
Before the algorithm can be started, it is actually necessary to determine a virtual treeshaped topology over the sensor network. This task is achieved by using any method from the literature to generate a minimum spanning tree in a distributed manner (see, for example, [16, 3, 17, 12]). This tree will determine a single root node that will become a distinguished node of the network (also called the master) with some additional functionalities in comparison to the rest of the nodes. Once this tree has been created, the master node runs a protocol to measure the number of hops (that is, communication rounds) necessary to reach the farthest node in the network. Note that this measure corresponds to the height of the tree. Next, the master node uses this tree to broadcasts an alert to start running the FrogSim algorithm, that is, the first communication round is triggered. This message also includes the height of the tree which will be used later on by each node to define the amount of information that it must store. The simulation of the FrogSim algorithm is composed of two distinct phases. The first phase (called phase I; see lines 1–5 of Algorithm 1) makes use of the model for the desynchronization of frog calling as introduced by Aihara et al. [1], with only a few modifications. The main difference to other distributed graph coloring algorithms inspired by this model is as follows. The values are used for determining the order in which the nodes are allowed to choose colors, whereas in previous algorithms these values were directly associated to specific colors. Note that our algorithm produces a valid coloring already in the first communication round. The second phase (called phase II, see lines 7–15 of Algorithm 1), which is initiated after communication rounds of phase I, serves to improve the current coloring by means of a refinement technique, similar to distributed local search.
Phases I and II of FrogSim will be described in detail in Sections 3.1 and 3.2. Moreover, we will outline how the initially computed tree structure will be used to communicate and store the best coloring found by the algorithm. In this process, each node collects the color identifiers used by its children, determines the highest color used, and sends this information to its parent node. In those cases in which the master node recognizes that the number of colors used in a certain communication round improves over the currently best solution it notifies all the other nodes. This procedure is explained in detail in Section 3.3.
3.1 Phase I of FrogSim
During the first communication rounds (where is a parameter of the algorithm) each node , when executing its sensor event, executes lines 2–5 of Algorithm 1. First, node will examine its message queue . If contains more than one message from the same sender node, all these messages apart from the last one are deleted. In general, a message sent in this phase has the following format:
(9) 
where contains the value of the emitter, is the color currently used by the emitter and is a parameter that depends on the number of messages received by the emitter during the last communication round. This parameter controls the weight that is given by node to the corresponding message . In particular, less weight is given to messages that were emitted by nodes that are influenced by many other nodes. The intuition for this definition of the weights is that the values of nodes that are little influenced by other nodes should converge first. This facilitates the convergence of the values of highlyinfluenced nodes, which in turn facilitates that the system reaches a stable situation, a term which refers to a situation in which the values do not change anymore.
Based on the messages in , function recalculateTheta() recalculates a new value for :
(10) 
where is a parameter used to control the convergence of the system, initially set to . In general, the lower the value of the smaller the change applied to . Moreover, is a function—corresponding to the phase shift function of Equation 4—that is defined as follows:
(11) 
Note that this function replaces the sinus function which was originally used in [1] as the phase shift function. This is because we have noticed that this function leads to a better convergence behavior than the sinus function. Next, node decides for a possibly new color in function minimumColorNotUsed(). Formally, the possible color change by node can be described as:
(12) 
In words, node chooses among the colors that do not appear in any of the received messages , the one with the lowest identifier. Finally, node sends the following message (see function sendColoringMessage()):
(13) 
Moreover, node decreases the value of (see line 5 of Algorithm 1). Hereby, is a parameter of the algorithm that controls the rate of convergence of the values. Note that once the values have converged the current coloring does not change anymore. To conclude a sensor event, node deletes all messages from its queue (see function clearMessageQueue()), that is, .
3.2 Phase II of FrogSim
After communication rounds, the sensor event of a node consists of the execution of lines 6–15 of Algorithm 1. As mentioned before, this phase is used for the refinement of the current coloring, similar to a distributed local search. Note that in this phase the values of the nodes are not changed anymore. Within the scope of phase II, each node additionally maintains a socalled power parameter . This parameter is initialized in the first communication round of phase II with a positive random integer for the nodes with , and for the rest of the nodes. The values of these power parameters are used to resolve conflicts that may arise during the color changes executed in phase II. In particular, in case two neighboring nodes—that is, two nodes that can communicate—have chosen the same color, the one with the higher power value is allowed to keep it. In fact, the usage of such a parameter performs a distributed coloring starting from many nodes at the same time but assuring that it is as good as if the coloring started from a single node. This node will be chosen randomly among those nodes which have the lowest value in each neighborhood. Further down at the end of this section, a graphic example will illustrate the working of phase II.
A message sent by function sendRefinementMessage() (see line 14 of Algorithm 1) has the following format:
(14) 
In case the current communication round is not the first communication round of phase II, node first examines again its message queue . If contains more than one message from the same sender node, all these messages apart from the last one are deleted. Then, the remaining messages are examined, and a color change only occurs if there is a message such that and . In words, node only changes its color if there is an adjacent node with the same color and a higher (or equal) power value. The new color chosen by node is the first free color that is not already in use by a node influencing node and that has a power equal to or greater than the power value of node . Formally, the new color is chosen in function minimumColorNotUsedByNeighborsWithHigherPower() as follows:
(15) 
In addition, node updates its power value in function adoptPowerFromStrongestNode() in the following way:
(16) 
This is the highest power among the powers of the nodes that have forced node to choose its current color. As a result, in following communication rounds node will not be forced to change its color, because with the new power it has priority over all nodes with a lower power. Finally, node sends a refinement message in function sendRefinementMessage(), where is defined as follows:
(17) 
The last action of the sensor event consists again in deleting all messages from the message queue , that is, . Figure 4(a) shows a small example of the kind of conflicts that phase II is supposed to resolve.
3.3 Determining and Storing the Best Coloring Found
It is intuitively clear that the current coloring of our system—that is, the coloring defined by colors for all nodes
—does not only improve over time. In some communication rounds, especially during the second phase of the algorithm, the new coloring after the choice of new colors might actually be worse then the coloring of the previous communication round. This behavior is very natural, because the search space of a combinatorial optimization problem is characterized by rather many local minima. If we assume that the current solution corresponds to such a local minimum, the only way to find a better solution is to accept worse solutions for some iterations. In the context of metaheuristic algorithms such an action is known as
escaping from a local minimum [6].In order to store the best coloring found by our algorithm over the whole simulation time, the following mechanism is used. Remember that the first action of the algorithm (before simulating phases I and II) consisted in the generation of a virtual minimum spanning tree over the network, resulting in a root node (the master). This tree is characterized by its height , which corresponds to the maximum number of communication rounds that a broadcast message sent by the root node needs in order to reach all nodes of the network. In this context, note that may be minimized by using a priori some methods from the literature which are able to generate spanning trees with minimum diameter in a distributed manner [8].
Each node is required to store its colors from the last communication rounds. Moreover, we assume that each node stores the color it has used in the bestfound coloring in a specific variable. The way in which this bestfound coloring is determined is as follows. First, at each communication round a node sends the maximum color used by itself and its children (with respect to the tree) to its parent in the tree. Such a message only contains two integers (the maximum color and the communication round identifier). Moreover, no additional messages are required because this information can easily be added to the messages that are sent anyway (see lines 4 and 14 of Algorithm 1). Given the height of the tree, it takes communication rounds until all the information regarding a specific communication round has reached the root node. Moreover, the number of colors used at this communication round is the maximum color identifier that reaches the root node via one of its children. In case this maximum color is lower than the number of colors used in the currently bestfound coloring, the root node broadcasts a message with the corresponding communication round identifier in which this coloring was obtained. In order for this information to reach all the nodes of the network, another communication rounds are necessary. This is why all nodes must store their colors from last communication rounds. Note that these alert messages from the root node can also be propagated using the normal messages of Algorithm 1.
4 Experimental Results
We coded our algorithm by means of discrete event simulation, implemented from scratch in C++. For the experimental evaluation we chose a large set of different graph topologies: random geometric graphs of different densities, grid graphs of different sizes, and most of the graphs used for the DIMACS challenge [14]. All graphs that we used for the experimental evaluation can be found for download at http://www.lsi.upc.edu/~hhernandez/graphcoloring. Note that an edge connecting two nodes indicates that both nodes are able to communicate directly with each other via their radio antennas.
For the purpose of comparison we reimplemented one of the currently best algorithms from the literature. This algorithm was presented by Finocchi et al. in [13]. For simplicity, this algorithm will henceforth be referred to by Finocchi. Unfortunately, the description of this algorithm in the original article contains some ambiguities, which required us to make some decisions regarding certain aspects in the context of the reimplementation. Fortunately, our own implementation of the Finocci algorithm provides generally better results than the ones reported in [13]. This can be verified by comparing the results of the original implementation with the results of our reimplementation for the graph topologies that are used both in [13] and in the present paper.
In the following we present the results of three algorithms: (1) Finocci [13], (2) , which is the FrogSim algorithm without phase II, and (3) FrogSim, which is the complete FrogSim algorithm. In our opinion, the study of the results of is worthwhile, because it reflects the power of the frogbased model without any additional improvements of the refinement phase. We applied each of these three stochastic algorithms 100 times to each graph topology and report the best coloring found in all 100 runs, as well as the average quality of the best colorings found per run. The number of rounds necessary to reach these solutions is—due to space reasons—not included in the result tables. However, it is important to note that algorithms such as Finocci and FrogSim, when used in sensor networks, are generally carried out continuously in a lowerlevel layer of the network. Therefore, the number of communication rounds necessary to reach the best solution are not that significant. Instead our algorithm continually tries to improve the current solution. As an informative note, our algorithm requires, on average, communication rounds for finding its best solution in phase I. After entering phase II the best solution is reached, on average, after communication rounds. In total, FrogSim requires, on average, communication rounds for finding its best solution. The algorithm of Finocchi et al. uses, on average, a comparable number of communication rounds (). It should be noted that, in the case of FrogSim, these numbers do not depend so much on the size of the network. However, FrogSim takes generally more communication rounds for those graphs that have a larger number of edges.
After tuning by hand, we decided to use a communication round limit of 100 rounds for FrogSim. Moreover, parameter , which specifies the number of communication rounds for phase I, was always set to 80. As a last remark, note that the size of the messages used in FrogSim is constant (). In other words, the message size does not depend on the network size. This is surely a desirably property of a distributed algorithm for graph coloring.
4.1 Results for Random Geometric Graphs
Random geometric graphs are popular models for sensor networks. Therefore, they are frequently used for the evaluation of algorithms developed for such networks. They are generated by randomly distributing a set of nodes in the area. Two vertices and are connected by an edge, if and only if , where is the Euclidean distance and is a threshold. More specifically, the three algorithms were applied to 40 random geometric graphs with and .
Table 1 presents the results obtained for this set of instances. In particular, the first column shows the names of the instances and the second column provides a triple , where is the number of nodes, the maximum degree, and the chromatic number of the corresponding graph. In case of a question mark, the chromatic number is not known. The following three groups of columns provide the results obtained by the three algorithms. For each algorithm we first give the number of colors from the best coloring found over independent runs. In the second column, we show the average number of colors used by the colorings obtained in runs. For ease of comparison the best performing algorithm for each instance is indicated in bold face. Hereby, the best performing algorithm is defined as the algorithm that finds the best coloring. Ties are broken (if possible) by the average values. The four bottom rows of the table provide a summary of the results. The first one of these rows gives averages for each column. In addition, the last three rows summarize how each algorithm is performing in comparison to the others. The first of these rows (labelled # times better) indicates for each algorithm the number of instances for which the corresponding algorithm was the sole winner, that is, better than the other two algorithms. The second row (labelled # times all equal) indicates for how many instances the results of the three algorithms were equal, whereas the last table row indicates for each algorithm the number of instances for which the corresponding algorithm was the sole looser.
As expected, the results show that the smaller the size of the graph, the easier it is to find good colorings. The algorithms obtain equivalent results for out of instances (note that all small instances with and nodes are included in this set). Although Finocchi is times better than the other two algorithms it is also worse in topologies. More importantly, Finocchi is not always able to match the FrogSim algorithms in terms of the best colorings for each instance. More specifically, Finocchi uses colors more on average than both FrogSim algorithms. Although is not able to outperform the other two algorithms for any given instance it only obtains the worst result for instances. FrogSim improves over the results of especially for the larger instances. It turns out to be the sole winner for instances. It is interesting to note that in those cases where FrogSim is better than this is due to the average solution quality. In this sense it can be said that in the context of random geometric graphs the use of phase II makes the FrogSim algorithm more robust. It is also important to note that the best colorings obtained are—for almost all instances—better than colors.
In addition to Table 1, the results are also presented in a visual form in Figure 5. For each graph (xaxis) the improvement of and FrogSim over Finocchi in terms of the best coloring (top graphic) and the average solution quality (bottom graphic) is presented. The 40 considered graphs are ordered from left to right as they appear in Table 1. These graphics show nicely that the FrogSim algorithms gain an advantage over Finocchi with growing instance size (from left to right). The bottom graphic shows that there are only three graphs for which Finocchi achieves a better average solution quality.
4.2 Results for DIMACS Graphs
One of the most popular sets of instances in the context of graph coloring is the one introduced for the second DIMACS challenge [14]. This challenge had among its objectives to establish the stateoftheart techniques for centralized graph coloring. These graphs are generally larger and more complex than, for example, random geometric graphs. The instances originate from very different contexts, ranging from industrial problems to handcrafted cases that were created to show the ineffectiveness of certain algorithms. This set of instances is often used as a benchmark to study the quality of new algorithms, also in the context of distributed graph coloring (see, for example, [13, 27, 33, 31]).
The results are presented in Tables 2 and 3, in the same way as in the case of random geometric graphs. Concerning the chromatic numbers, in many cases they are known. In the cases in which they are not known, we either provide an upper bound (in the form X) or a question mark. As a general remark before analyzing the results in depth, we would like to mention that for distributed algorithms it is very difficult, if not impossible, to capture the global structure of these graphs in many cases. Therefore, it is not surprising that the results obtained by distributed algorithms are often far away from the chromatic numbers.
First it should be emphasized that the FrogSim algorithms achieve the best results for all instances except for instance zeroin.i.2.col (see Table 3), where Finocchi achieves a slightly better average solution quality. Moreover, only in seven further cases, Finocchi is able to match the results of the FrogSim algorithms. On the other side, for some instances the FrogSim algorithms improve remarkably over Finocchi. Consider, for example, instance DSJC1000.9.col (see Table 3) where the best colorings found by the FrogSim algorithms need 297 colors, while the best coloring found by Finocchi uses 315 colors. Other examples of remarkable improvements over Finocchi are the six flat instances from Table 3. Concerning the comparison between and FrogSim, we can state that the power of the algorithm can clearly be attributed to the first (froginspired) phase. As in the case of random geometric graphs, phase II of FrogSim basically helps to make the algorithm more robust. It should also be emphasized that, in all cases, the FrogSim colorings require a number of colors that is smaller than . Although in most cases the best solution obtained is not an optimal coloring—respectively, we do not know whether it is or not—for most of the instances of type mulsol.X, myciel.X and zeroin.X our algorithm generates optimal colorings in each of the applications per instance.
4.3 Results for Grid Topologies
Grid topologies are frequently used in various application areas of sensor networks. In theory, the coloring of grids is very simple. They all can be painted as a chessboard, requiring only two colors. For an example see Figure 8.
The way in which an optimal coloring can easily be achieved is to start the coloring process in a single node with the first color, and then proceed incrementally. The next step consists in coloring all the neighbors of the starting node in the second color. All the neighbors of these nodes have to be painted in the first color again, and so on. However, when considering distributed computing, nodes only have local information, whereas information about the position in the grid is missing. Moreover, the incremental process described above is difficult to achieve without a global control. Therefore, when coloring grids in a distributed way, what usually happens is that the coloring process is initiated in several different nodes. If the coloring of these nodes does not follow the chessboard distribution of colors, eventually borders will form where additional colors are needed in order to obtain valid colorings. An example is shown in Figure 9. In this context, remember that numbers correspond to colors. The process of an incremental coloring is shown starting at the top left grid and ending at the bottom right grid. The first row shows several nodes where the coloring is initiated with color 1. These wrong initial decisions lead to borders (see the graycolored nodes in the bottom row) where additional colors are needed.
Computational results are shown in Table 4. Note that in this case all chromatic numbers are known as they can be established theoretically. While small grids can basically be colored correctly by all three algorithms, both Finocchi and have—as expected—increasing difficulties when the grid size grows. Although this is the case, has clear advantages over Finocchi. This is indicated by the average numbers given in the fourth but last table row, and also by the fact that Finocchi is the sole looser in 39 cases, whereas is the sole looser in only 2 cases. In contrast to the deteriorating performance of Finocchi and when the grid size grows, FrogSim achieves perfect colorings in all 100 applications for all instances, which is a remarkable achievement. Even the large grids with periodic boundary conditions (see graphs Ising32x8.col and Ising32x8torus.col used in [27]) do not pose any difficulty for FrogSim. In contrast, both Finocchi and use four colors instead of the optimal two colors, in each coloring generated. Summarizing we can state that phase II of FrogSim is very useful when applied to grid topologies, helping the algorithm to achieve an excellent performance.
Figure 10 summarizes graphically the results from Table 4. Note that the axis is differently scaled than the other summarizing figures in this section due to plotted data requirements. The significant improvement of FrogSim over both Finocchi and can be nicely appreciated in these graphics. Also the growing advantage of the FrogSim algorithms over Finocchi can be seen by the fact that the height of the bars generally increases from left to right. Considering the bottom graphic, which concerns the average solutions quality, we can note that is much less robust than FrogSim.
4.4 Results for Small Instances from [27]
Finally, we present results obtained by the three algorithms for rather small instances used by S. Lee in [27] for the evaluation of a fireflyinspired distributed graph coloring algorithm. We do not directly compare with the results presented in [27], because the algorithm proposed in [27] assumes that the number of colors required for the coloring is known a priori, that is, the algorithm must be run for a prefixed number of colors. When graphs are large and chromatic numbers are unknown, such an algorithm is not practical. Anyway, FrogSim and the algorithm from [27] behave very similarly for most instances, with some exceptions: for hexagonbased instances, FrogSim is not quite able to match the average results obtained by the algorithm from [27]. Moreover, concerning icosahedron.col, the best solution by FrogSim is uses one color more than the best one by Lee’s algorithm. On the other side, concerning 4partite4diffsizes.col and dodecahedron.col, FrogSim improves over the average results obtained by Lee’s algorithm.
As shown in Table 5, the three algorithms achieve equal results in 7 out of 14 cases. Only in one case (see 1hexagontess.col) Finocchi is slightly better than the FrogSim algorithms due to the fact that it achieves an optimal coloring in all 100 applications. In the remaining cases both and FrogSim obtain better results than Finocchi. Moreover, it is remarkable that both and FrogSim obtain for 12 of the 14 instances optimal solutions. The difference between and FrogSim is again to be found in the fact that FrogSim is more robust, which is indicated by a better average solution quality.
Figure 11 graphically summarizes the results as in the previous subsections. Again this graphical way of presenting the results helps to show the improvement of FrogSim over in terms of the average solution quality.
5 Conclusions and Future Work
Graph coloring is a classical problem of modern mathematics with more than years of history. The problem has been extensively studied in theory and practice. However, its connection to problems that have arisen with the proliferation of wireless networks has sparked a special interest in resolving the problem in a distributed manner. In such algorithms—due to the lack of global knowledge—the nodes have to base their color choices exclusively on information they receive from their direct neighborhood.
The algorithm we have presented in this paper is inspired by the behavior of a family of frogs native to Japan, namely the calling behavior of Japanese tree frogs. The results achieved by the proposed algorithm compare very favorably with current stateoftheart algorithms. In particular, an improved performance has been measured for about of the studied instances. The benchmark set that we chose for comparison includes random geometric graphs, most of the graphs of the DIMACS challenge, and grid graphs. Apart from the favorable results, the proposed algorithms comes with some other benefits. It is possible, for example, to adjust the speed of convergence depending on the time the user wants to spend on the algorithm. Moreover, the number of communication rounds required is comparable to that required by other algorithms that provide high quality solutions. Finally, our algorithm provides a valid coloring already in the very first communication round.
With regard to future work, we consider the use of the proposed algorithm for time division multiplexing (TDM) which is a mechanism for collisionfree communication in wireless networks, which is strongly related to graph coloring. Finally, due to its adaptive nature, our algorithm might also be interesting for mobile networks, or any dynamically changing network. The fact that nodes appear or disappear at certain points in time is nothing strange in wireless ad hoc networks.
Acknowledgment
This work was supported by grant TIN200766523 (FORMALISM) of the Spanish government, and by the EU project FRONTS (FP7ICT20071). In addition, C. Blum acknowledges support from the Ramón y Cajal program of the Spanish Government, and H. Hernández acknowledges support from the Comissionat per a Universitats i Recerca del Departament d’Innovació, Universitats i Empresa de la Generalitat de Catalunya and from the European Social Fund.
References
 [1] I. Aihara, H. Kitahata, K. Yoshikawa, and K. Aihara. Mathematical modeling of frogs’ calling behavior and its possible application to artificial life and robotics. Artificial Life and Robotics, 12(1):29–32, 2008.
 [2] Ikkyu Aihara. Modeling synchronized calling behavior of Japanese tree frogs. Physical Review E, 80(1):11–18, 2009.

[3]
B. Awerbuch.
Optimal distributed algorithms for minimum weight spanning tree,
counting, leader election, and related problems.
In A. V. Aho, editor, Proceedings of STOC 87 – The
Annual ACM Symposium on Theory of Computing
, pages 230–240, New York, NY, USA, 1987. ACM.  [4] I. Blöchliger and N. Zufferey. A graph coloring heuristic using partial solutions and a reactive tabu scheme. Computers & Operations Research, 35(3):960–975, 2008.
 [5] C. Blum and D. Merkle, editors. Swarm Intelligence: Introduction and Applications. Natural Computing. Springer Verlag, Berlin, Germany, 2008.
 [6] C. Blum and A. Roli. Metaheuristics in Combinatorial Optimization: Overview and Conceptual Comparison. ACM Computing Surveys, 35(3):268–308, 2003.
 [7] E. Bonabeau, M. Dorigo, and G. Theraulaz. Swarm Intelligence: From Natural to Artificial Systems. Oxford University Press, New York, NY, 1999.
 [8] M. Bui, F. Butelle, and C. Lavault. A distributed algorithm for constructing a minimum diameter spanning tree. Journal of Parallel and Distributed Computing, 64(5):571–577, 2004.
 [9] M. Cardei, E. D. MacCallum, and X. Cheng. Wireless sensor networks with energy efficient organization. Journal of Interconnection Networks, 3(4):213–229, 2002.
 [10] J. Degesys and R. Nagpal. Towards desynchronization of multihop topologies. In Sven Brueckner, Paul Robertson, and Umesh Bellur, editors, Proceedings of the 2nd IEEE International Conference SelfAdaptive and SelfOrganizing Systems, pages 129–138. IEEE Press, 2008.
 [11] M. Dorigo and T. Stützle. Ant Colony Optimization. MIT Press, 2004.
 [12] M. Elkin. A faster distributed protocol for constructing a minimum spanning tree. Journal of Computer and System Sciences, 72(8):1282–1308, 2006.
 [13] I. Finocchi, A. Panconesi, and R. Silvestri. An experimental analysis of simple, distributed vertex coloring algorithms. Algorithmica, 41(1):1–23, 2005.
 [14] Center for Discrete MAthematics and Theoretical Computer Science. Dimacs implementation challenges, 2006.
 [15] P. Fraigniaud, C. Gavoille, D. Ilcinkas, and A. Pelc. Distributed computing with advice: Information sensitivity of graph coloring. Distributed Computing, 21(6):395–403, 2009.
 [16] R.G. Gallager, P.A. Humblet, and P.M. Spira. A distributed algorithm for minimumweight spanning trees. ACM Transactions on Programming Languages and systems (TOPLAS), 5(1):77, 1983.
 [17] J.A. Garay, S. Kutten, and D. Peleg. A sublinear time distributed algorithm for minimumweight spanning trees. SIAM Journal on Computing, 27(1):302–316, 1998.
 [18] C. Guo, L. C. Zhong, and J.M. Rabaey. Low power distributed mac for ad hoc sensor radio networks. In IEEE GLOBECOM ’01 – IEEE Global Telecommunications Conference, 2001, volume 5, pages 2944 –2948, 2001.
 [19] J. Hansen, M. Kubale, Ł. Kuszner, and A. Nadolski. Distributed largestfirst algorithm for graph coloring. In Marco Danelutto, Marco Vanneschi, and Domenico Laforenza, editors, EuroPar 2004 Parallel Processing – Proceedings of the International EuroPar Conference, pages 804–811. Springer Berlin / Heidelberg, 2004.
 [20] T. Herman and S. Tixeuil. A distributed TDMA slot assignment algorithm for wireless sensor networks. In S. Nikoletseas and J. D. P. Rolim, editors, ALGOSENSORS 2004 – Proceedings of International Workshop on Algorithmic Aspects of Wireless Sensor Networks, pages 45–58. Springer, 2004.
 [21] A. Hertz, M. Plumettaz, and N. Zufferey. Variable space search for graph coloring. Discrete Applied Mathematics, 156(13):2551–2560, 2008.
 [22] R.M. Karp. Reducibility among combinatorial problems. Proceedings of the Symposium on Complexity of Computer Computations, page 85, 1972.

[23]
J. Kennedy and R. Eberhart.
Particle swarm optimization.
In
Proceedings of the IEEE International Conference on Neural Networks.
, volume 4, pages 1942–1948. IEEE Press, 1995.  [24] A. Keshavarzian, H. Lee, and L. Venkatraman. Wakeup scheduling in wireless sensor networks. In MobiHoc 06 – Proceedings of the ACM International Symposium on Mobile AdHoc Networking and Computing, pages 322–333, New York, NY, USA, 2006. ACM.
 [25] A. Kosowski and Ł. Kuszner. On greedy graph coloring in the distributed model. In Wolfgang Nagel, Wolfgang Walter, and Wolfgang Lehner, editors, EuroPar 2006 Parallel Processing – Proceedings of the International EuroPar Conference, pages 592–601. Springer Berlin / Heidelberg, 2006.
 [26] F. Kuhn and R. Wattenhofer. On the complexity of distributed graph coloring. In PODC 2006 – Proceedings of the Annual ACM symposium on Principles of Distributed Computing, page 15. ACM, 2006.
 [27] S. A. Lee. Firefly Inspired Distributed Graph Coloring Algorithms. In Hamid R. Arabnia and Youngsong Mun, editors, Proceedings of PDPTA 2008 – International Conference on Parallel and Distributed Processing Techniques and Applications, pages 211–217. CSREA Press, 2008.
 [28] S. A. Lee. kPhase Oscillator Synchronization for Graph Coloring. Mathematics in Computer Science, 3(1):61–72, 2010.
 [29] S. A. Lee and R. Lister. Experiments in the dynamics of phase coupled oscillators when applied to graph coloring. In Proceedings of ACSC 2008 – Proceedings of the thirtyfirst Australasian conference on Computer science, pages 83–89. Australian Computer Society, Inc., 2008.
 [30] G. Lu, N. Sadagopan, B. Krishnamachari, and A. Goel. Delay efficient sleep scheduling in wireless sensor networks. In Kia Makki and Edward Knightly, editors, IEEE INFOCOM 2005 – Proceedings of the International Conference on Computer Communications, pages 2470–2481. IEEE, 2005.
 [31] Z. Lü and J.K. Hao. A memetic algorithm for graph coloring. European Journal of Operational Research, 203(1):241–250, 2010.
 [32] N. A. Lynch. Distributed Algorithms. Elsevier, 2009.
 [33] E. Malaguti and P. Toth. A survey on vertex coloring problems. International Transactions in Operational Research, 17(1):1–34, 2010.
 [34] T. Moscibroda and R. Wattenhofer. Coloring unstructured radio networks. Distributed Computing, 21(4):271–284, 2008.
 [35] A. Mutazono, M. Sugano, and M. Murata. Frog CallInspired SelfOrganizing AntiPhase Synchronization for Wireless Sensor Networks. In INDS 09 – Proceedings of the International Workshop on Nonlinear Dynamics and Synchronization, pages 81 – 88. IEEE Press, 2009.
 [36] P. Panagopoulou and P. Spirakis. A game theoretic approach for efficient graph coloring. In SeokHee Hong, Hiroshi Nagamochi, and Takuro Fukunaga, editors, ISAAC 2008 – International Symposium on Algorithms and Computation, pages 183–195. Springer Berlin / Heidelberg, 2008.
 [37] K.D. Wells. The social behaviour of anuran amphibians. Animal Behaviour, 25:666–693, 1977.
 [38] W. Zhang, G. Wang, Z. Xing, and L. Wittenburg. Distributed stochastic search and distributed breakout: properties, comparison and applications to constraint optimization problems in sensor networks. Artificial Intelligence, 161(12):55–87, 2005.
Comments
There are no comments yet.