Spectrum graph coloring and applications to WiFi channel assignment

We introduce and explore a family of vertex-coloring problems which, surprisingly enough, have not been considered before despite stemming from the problem of Wi-Fi channel assignment. Given a spectrum of colors, endowed with a matrix of interferences between each pair of colors, the Threshold Spectrum Coloring problem fixes the number of colors available and aims to minimize the interference threshold, i.e., the maximum of the interferences at the vertices. Conversely, the Chromatic Spectrum Coloring problem fixes a threshold and aims to minimize the number of colors for which respecting that threshold is possible. As main theoretical results, we prove tight upper bounds for the solutions to each problem. Since both problems turn out to be NP-hard, we complete the scene with experimental results. We propose a DSATUR-based heuristic and study its performance to minimize the maximum vertex interference in Wi-Fi channel assignment, both for randomly generated graphs and for a real-world scenario. Further, for all these graphs we experimentally check the goodness of the theoretical bounds.


Introduction
Graph coloring is, undoubtedly, one of the main problems in Discrete Mathematics, attracting researchers from both mathematics and engineering because of its theoretical challenges and its applications [20,28].One of the most prominent applications of vertex-coloring problems is frequency assignment [1], with a huge variety of models ranging from the most naive, forbidding monochromatic edges, to the most general, with assignment constraints, interference constraints, and an objective function.
The present work introduces and explores an intermediate model, which is shown to be interesting enough for mathematicians and useful enough for engineers: An abstract graph G and a spectrum of colors S = {c 1 , . . ., c s } endowed with a matrix W of non-negative distances W ij = W (c i , c j ) between each pair of colors, playing the role of interferences.Throughout this paper, the graph G will be undirected and, thus, the matrix W will be symmetric.For such a pair (G, W ), a coloring c of the graph will induce at each vertex v an interference This model stems naturally from the problem of Wi-Fi channel assignment.We all use the IEEE 802.11 (Wi-Fi) technology, which has been widely deployed in local area networks, mostly because of both its low cost and the use of unlicensed frequency bands.However, for a successful deployment there are some performance issues to be managed, such as avoiding an excessive interference that will impact performance.There is a direct relation between interference and perceived throughput [4], so that minimizing the interference would result in maximizing the available throughput.This is why a frequency channel has to be selected for each access point (AP), accounting for interferences between channels and trying to minimize the total interference in order to maximize performance.Similar goals have been considered recently in the literature for related problems, like bandwidth allocation in cellular networks [3].
In the recent past we have successfully used our model to find efficient frequency assignments both in Wireless Surveillance Sensor Networks [11] and in real-world scenarios [12].We have even applied our model to reconfigure a critical network in the event of a security incident [10].With the present paper we aim to formally introduce a mathematically rigorous description of the model, exploring two novel coloring problems for which we provide theoretical bounds, show their complexity, and finally propose and test a heuristic.
In particular, the remainder of this section introduces the two novel coloring problems and presents a case study to illustrate both of them, finishing with a compilation of relevant related work.Section 2 is devoted to theoretical results, proving upper bounds for the solutions to each problem.Section 3 starts showing that both problems are NP-hard, so a DSATURbased heuristic is proposed for each problem and experimental results are performed to compare these heuristics with selected reference approaches for randomly generated graphs.Section 4 goes a step further by showing experimental results for a realistic setting.Finally, Section 5 summarizes our conclusions.

Two novel coloring problems
First, we introduce the problem which best fits the setting of Wi-Fi channel assignment, which we call Threshold Spectrum Coloring (TSC) problem: Given a graph G and a spectrum of k colors (channels), endowed with a k × k matrix W of interferences between them, the goal is to determine the minimum threshold t ∈ R ≥0 such that (G, W ) admits a k-coloring c (assignment of channels) in which the interference at every vertex is at most t, i.e., I v (G, W, c) ≤ t, ∀v.Such a minimum t will be called the minimum k-chromatic threshold of (G, W ), denoted as T k (G, W ).
Then, since the TSC problem fixes the parameter k and aims to minimize the parameter t, it is natural to wonder about the complementary problem: In the Chromatic Spectrum Coloring (CSC) problem, a threshold t ∈ R ≥0 is fixed and the spectrum is let to have as size the number |V (G)| of vertices, the goal being to determine the minimum number of colors (channels) k ∈ N such that (G, W ) admits a k-coloring c (assignment of channels) in which the interference at every vertex is at most that threshold t.Such a minimum k will be called the t-interference chromatic number of (G, W ), denoted as χ t (G, W ).This CSC problem has also a translation in the context of frequency assignment: It aims to compute the minimum number of frequencies (colors) that guarantee a minimum throughput to every user in the network, so it can be seen as the problem of determining the number of resources required to provide a certain quality of service.

A case study
Let us illustrate these two problems by analyzing an easy, but non-trivial, example using the paw graph P G [29], see Figure 1 (right).
For the TSC problem, consider an spectrum of k = 3 colors S = {red, green, blue} endowed with the 3 × 3 matrix of interferences with exponential decay of base 2, See Figure 1 (left) for an illustration.In this TSC problem, we have a fixed number of colors k and we want to find the smallest possible interference threshold t. Figure 1, right, shows all the proper (without monochromatic edges) 3-colorings of the paw graph, together with the interference I v (P G, W 2ed , c) at every vertex v. Observe that the highlighted colorings achieve interference at most t = 1 at every vertex.This is impossible for improper colorings, since the matrix W assigns interference 1 to monochromatic edges which, therefore, will lead to one of its endpoints having interference greater than 1.
Let us show now that, in this setting, no coloring can achieve a maximum vertex interference t strictly smaller than 1: Focus on the central vertex of the paw graph and observe that, according to the matrix W 2ed , that vertex can only achieve an interference smaller than 1 if it is colored red and its neighbors are colored blue, or vice versa.But this gives rise to a monochromatic edge between the left vertices of the paw, which implies interference greater than 1 at those two vertices.See Figure 2.
Therefore, we have solved the corresponding TSC problem, proving that for the paw graph P G with k = 3 colors and a matrix W 2ed with exponential decay of base 2, the minimum chromatic threshold t achievable is 1, i.e., For the CSC problem, the size of the spectrum is let to equal the number of vertices, which is four in the paw graph P G. Consider for example S = {red, green, blue, violet}, also endowed with the matrix of interferences with exponential decay of base 2, in this case of size 4 × 4, Figure 2: Possibilities for the central vertex of the paw graph to have interference smaller than 1.
In this setting, one can fix an interference threshold t = 1 and aim to find the smallest number k of colors for which such a threshold is achievable.The discussion above for the previous problem shows that the threshold t = 1 can be achieved with three of those colors, i.e., k = 3.We now show that such a threshold is impossible to achieve with only k = 2 colors among the four colors available: Focus again on the central vertex of the paw graph P G.
If it has a neighbor with its same color, then a monochromatic edge arises and, as above, this implies the interference at some vertex being greater than one.If the central vertex has no neighbor with its same color, then all its neighbors share a common color, so that again a monochromatic edge arises and there is a vertex with interference greater than one.See Figure 3.
Therefore, we have solved the corresponding CSC problem proving that, for the paw graph P G with threshold t = 1 and a matrix W 2ed with exponential decay of base 2, the interference chromatic number is 3, i.e., χ 1 (P G, W 2ed ) = 3.

Related work
Araujo et al. [2] consider a weight function w on the edges of the graph G instead of a matrix W of interferences between colors, defining the interference at a vertex to be the sum of weights of incident monochromatic edges.Although their bounds are similar to ours, using analogous techniques, we further show tightness and follow a different, more detailed, scheme.Many other works impose conditions to the colors of the endpoints of any edge.Most of them can be framed into L(p 1 , . . ., p k )-labellings [16], where vertices at distance i must get colors at distance at least p i .Particular instances include distance coloring [25], where no two vertices at distance at most d can have the same color, λ-coloring [5], where adjacent vertices must get colors at least 2 apart and vertices at distance at most 2 must get different colors, as well as L(h, k)-labellings [8], where adjacent vertices must get colors at least h apart and vertices at distance 2 must get colors at least k apart.For another setting, in a bandwidth coloring [20] a distance d ij is associated to each particular edge ij, forcing its endpoints to get colors at least d ij apart.A similar flavor has the T -coloring [23], where adjacent vertices must get colors whose distance is not in a prescribed set T , and the S-coloring [15], where the vertices have to be partitioned into sets with prescribed pairwise distances.
Of a different nature is the approach of coloring the edges of the graph instead of the vertices [19], an approach which has been applied to minimize the number of distinct channels used to route messages in a network [27].
Finally, of independent interest are the works on the Frequency Assignment Problem, which use different models to fit the characteristics of specific applications.The bibliography about this problem is too extensive to include here even a selection.Instead, we prefer referring the reader to the comprehensive survey by Aardal et al. [1].

Theoretical results
In this section we prove theoretical upper bounds for the goal of the TSC problem, the minimum k-chromatic threshold T k (G, W ), and for the aim of the CSC problem, the t-interference chromatic number χ t (G, W ).
Given a graph G, a matrix W , and a coloring c, we denote the potential interference at vertex v if this vertex had color i as W (c(u), i).
Note that for i the actual color of v, i.e., i = c(v), we get the actual interference at vertex v, that is, ).We will say that a k-coloring c of G is W -stable if, for every vertex, the actual interference is not greater than any of the potential interferences, i.e., if for every vertex v we have ) for all j ∈ {1, . . ., k}.We first prove that stable colorings do exist: Proposition 1 Given a graph G and a spectrum S of size |S| ≥ 2 endowed with a matrix W of interferences, there exists a W -stable coloring of G.
Proof.Let I be the sum of edge-interferences for the current coloring c, i.e., (Note that this is actually half of the sum of interferences at every vertex.)Observe that any coloring achieving the minimum for this sum of edge-interferences will be a W -stable coloring of G: If there is a current interference which is greater than a potential interference I i v , then recoloring would lead to a smaller sum I of edge-interferences.Furthermore, we can prove that such a stable coloring can be found by a random greedy algorithm: Start with a random coloring of the graph G = (V, E) and, if there exist a vertex v ∈ V and a color j ∈ S such that the potential interference I j v (G, W, c) for that color is smaller than the current interference I c(v) v (G, W, c), then recolor the vertex v with color j and repeat.Each step of the procedure increases I by I j v (G, W, c) and decreases I by I c(v) v (G, W, c) (in both cases, c is the initial coloring before the step).Hence, the sum of edge-interferences I decreases by a positive amount ) and the random greedy algorithm finishes with a W -stable coloring of G.
Before proving our bounds, we also need the following lemma: where W ij is the natural norm of the matrix W .
Proof.First, observe that such a coloring fulfills because c being stable implies that the interference ) is actually not greater than all of the potential interferences Restating the sum of the potential interferences at v as the sum of interferences contributed by neighbors of each color while varying the color of v, the right-hand side in the previous equation equals and this sum is not greater than the number of neighbors of v times the maximum of the sums j W ij , i.e., not greater than deg(v) ||W || ∞ .Now we are ready to prove an upper bound for the aim of the TSC problem: Theorem 3 Given a graph G and a spectrum S of size |S| endowed with a matrix W of interferences, for any fixed natural number 2 ≤ k ≤ |S|, the following bound holds for the minimum k-chromatic threshold T k (G, W ): where ∆(G) is the maximum vertex-degree in the graph G. Furthermore, this bound is tight.
Proof.By definition of T k (G, W ), in order to prove the bound it is enough to prove that there exists a coloring c 0 of G with k colors for which the interference at every vertex does not exceed the threshold t 0 = ∆(G) ||W ||∞ k .Because of Proposition 1 and k ≥ 2, we know that there exists a W -stable coloring c 0 of G using k colors.It just remains to prove the interference condition: For every vertex v with maximum interference we have where the leftmost inequality follows from T k (G, W ) being minimum and the rightmost inequality comes from Lemma 2. The bound in the statement follows.
For the final claim in the statement, it is enough to note that taking k = 2 and W = I our bound results in , which is tight for the graph G being a cycle of odd length.In that case it is not possible to avoid monochromatic edges, with the best coloring achieving a single monochromatic edge and, therefore, a smallest threshold of 1, which matches the bound Next, we provide an upper bound for the aim of the CSC problem.The bound uses the generalization of the greatest common divisor (gcd) to non-integer numbers, which is defined analogously just considering that a number x divides a number y if the fraction y/x is an integer.
Theorem 4 Given a graph G and a spectrum S having size |S| ≥ 2 and endowed with a matrix W of interferences, for any fixed threshold t being a multiple of gcd(W ) and such that |S|t ≥ ∆(G) ||W || ∞ the following bound holds for the t-interference chromatic number χ t (G, W ): If t is not a multiple of gcd(W ), the bound can be expressed as where t is replaced by the nearest multiple of gcd(W ) below t.Furthermore, these bounds are tight.
Proof.The number of colors has to be at least one and the bound is trivially satisfied for χ t (G, W ) = 1, so let us focus on the case χ t (G, W ) > 1.We start with the case of t being a multiple of gcd(W ).By definition of χ t (G, W ), in order to prove the bound it is enough to prove that there exists a coloring c 0 of G with k 0 = ∆(G) ||W ||∞+gcd(W ) t+gcd(W ) colors for which the interference at every vertex does not exceed the threshold t, i.e., I v (G, W, c 0 ) ≤ t, ∀v.Note that the condition on the threshold in the statement ensures that k 0 ≤ |S|.
Because of Proposition 1 and k 0 ≥ 2, we know that there exists a Wstable coloring c 0 of G using k 0 colors.Hence, it just remains to prove the interference condition.
By contradiction, suppose that for the coloring c 0 there is a vertex v in G with an interference above the threshold t, i.e., which, because of t and the interferences around a vertex being multiples of gcd(W ), implies Then, since the coloring c 0 is stable, Lemma 2 leads to where the leftmost inequality follows from the definition of ∆(G).
But then our choice of k 0 implies that which is a contradiction.The same arguments work for the case of t not being a multiple of gcd(W ), taking into account that interferences around a vertex have to be multiples of gcd(W ).For the final claim in the statement, it is enough to take W = I and t = 0 (which is possible as long as |S| ≥ ∆(G)+1, i.e., the coloring is not forced to be improper).Thus, our bound coincides with Brooks' bound [7] for the chromatic number χ 0 (G, I) = χ(G) ≤ ∆(G) + 1, which is tight for the graph G being a cycle of odd length.
The reader can check that the case analyzed in Subsection 1.2 does fulfill the bounds in Theorems 3 and 4. Respectively: Note that, in this case, the small size of the graph makes the upper bound 7 exceed the actual size of the spectrum |S| = |V (G)| = 4, because the chosen threshold t = 1 does not fulfill the condition in the statement of Theorem 4: Observation 5 The condition on the threshold t in the statement of Theorem 4 reflects the fact that a trade-off is needed between the threshold t and the size |S| of the spectrum, since decreasing one of them might need an increase in the other.Furthermore, the theorem still has useful practical implications for values of the threshold t not fulfilling that condition: If the user was allowed to extend the spectrum S in such a way that (i) the bound given in the theorem is now below the size |S| and (ii) neither ||W || ∞ nor gcd(W ) are increased, then the threshold t would fulfill the condition.Thus, the user would get not only an upper bound for the t-interference chromatic number, but also a certificate that for such a t the problem would be solvable for the extended spectrum.Finally, let us mention that the condition can be further It is interesting to note that, as long as the size of the spectrum is large enough for the chosen threshold, our bounds do not depend on the number of vertices in the graph G, but only on its maximum degree ∆(G).For the sake of applications to Wi-Fi channel assignment, this guarantees the scalability of the bounds for a growing number of APs as long as the maximum number of interfering APs can be restrained.Such a property has interesting implications in the design and planning of wireless networks infrastructures, since the transmitting power of the APs could be adjusted to guarantee that the degree of the graph stays below the necessary value, and therefore, to satisfy the maximum interference threshold for a given performance requirement.

Experimental results for random graphs
The well-known Vertex Coloring (VC) problem, which aims for a proper coloring (with no monochromatic edges), is a particular case of our Chromatic Spectrum Coloring problem, using the identity I as matrix of weights and a threshold t = 0. Therefore, the usual chromatic number is the 0-interference chromatic number of (G, I), that is, With the same identity matrix and a threshold t, we get the Improper Coloring problem, which allows at most t monochromatic edges around a vertex.These two particular cases are NP-hard [18,30], hence so is our Chromatic Spectrum Coloring problem.In addition, fixed any k ≥ 2 it is NP-complete to decide if there exists a k-coloring with interference at most any threshold t ≥ 2, see [2] and the references therein.This implies that our Threshold Spectrum Coloring is also NP-hard.
The hardness of the VC problem has given rise to many heuristics and metaheuristics for different vertex-coloring problems, e.g., [13,14,24].With the TSC and CSC problems introduced in this paper being even more general, this section is devoted to experimentally test several techniques, in a range of scenarios, and to compare their performance for the TSC and CSC problems.
As a bonus, these experiments will allow to check how tight or loose are, for average scenarios, the theoretical upper bounds given in Theorems 3 and 4.

Settings
Although we are aware of the number of benchmarks available like, e.g., those in DIMACS [17], the fact that this is a seminal work, introducing a new type of coloring from both theoretical and applied perspectives, has led us to start the experiments by considering the widely used Erdős-Renyi (ER) random graphs [22].In these graphs, every pair of vertices has a prescribed probability p of being connected.We have created different categories of graphs, by varying the number of vertices n and the probability of connection p.In particular, we generated 10 graphs for each combination of the same settings used in [21,24], that is, number of vertices n ∈ {60, 70, 80} and probability of connection p ∈ {0.1, 0.3, 0.5, 0.7, 0.9}, performing 20 repetitions of each experiment per graph.
For the matrix of interferences between colors, we have considered the exponential decay of base 2 already used in Subsection 1.2, W ij = 1/2 |i−j| .Other choices have also been explored, leading to similar results which are not included here in order to avoid an excessive length of the paper.
For the TSC problem we have considered k ∈ {4, 6, 11} as values for the number of colors in the spectrum, while for the CSC problem we have considered thresholds t ∈ {np/4, np/2, 3np/4}, being np the expected average degree of the graph.These choices have a twofold interest: On one hand, because of including the number k = 11 of channels available in the Wi-Fi problem, so that our results show interference thresholds that can be achieved at every vertex.On the other hand, because the choices for k turn out to be similar to the best number of colors obtained for the chosen values of t and vice versa.

Coloring techniques used for benchmarking
For an experimental analysis of our two problems, we propose heuristics inspired by the sequential greedy algorithm DSATUR [6] used for the Vertex Coloring problem.Our implementation TSC-DSATUR for the Threshold Spectrum Coloring problem looks for the color minimizing the interference at v, as shown in Algorithm 1.The algorithm starts with an undefined coloring (1) and iterates by selecting at each iteration the uncolored vertex with the highest saturation degree, that is, the one with more already-colored neighbors, the one with highest degree in the case of a tie, or a random vertex among the highest-degree vertices in the case of a double tie (2).Once a vertex v has been selected, a color is assigned from the available set so that the interference at vertex v is minimized (3).
Our implementation CSC-DSATUR for the Chromatic Spectrum Coloring problem is shown in Algorithm 2. The algorithm looks for a color that does not make interference at v exceed the product of the fixed threshold t by the proportion of neighbors already colored (1).That is, if vertex v has five neighbours, but only three of them have been colored so far, the color chosen should guarantee the interference at v to be at most 3  5 t.For a color to be chosen, this constraint must hold not only for v, but also for any neighbor of v which has already been colored (2).This is a conservative approach, to ensure that it is not possible to have a solution where the For comparison with our heuristics, we have tested a generic nonlinear optimizer based in Particle Swarm Optimization (PSO) [31].For the TSC problem, we have used the sum of the interferences per vertex as the objective function, since our experiments proved that PSO performed significantly worse when using the maximum interference per vertex.For the CSC problem, we have used the same PSO optimizer as for TSC in an iterative manner, progressively increasing the number of colors k from one to |V |, until we get a solution whose maximum interference per vertex is below the threshold t.
Moreover, as a baseline reference, we have evaluated a random coloring approach, which simply selects the color for each vertex from a uniform distribution on the color set.As in the case of PSO, for the CSC problem this reference has been run in an iterative manner with an increasing number of colors k until a valid solution has been found.

Results
Recall that the bound in Theorem 3 was tight, since for some graphs it cannot be improved.However, this does not mean that tightness is achieved for every graph.Hence, we start our experimental results by showing, in Table 1, the theoretical bound given in Theorem 3 and the gap between the best value obtained by the different techniques under study, Random, TSC-DSATUR and PSO, expressed as a percentage of the bound.(Note that the gap is computed with real values and rounded afterwards.)It can be observed that the more complex is the graph, the tighter is the bound in Theorem 3.
On the other hand, Tables 2, 3, and 4 show the results obtained for  the Threshold Spectrum Coloring with k equal to 4, 6, and 11 colors, respectively, and for each graph category.In columns, we have represented the average (showing in boldface the best value of each row) and standard deviation for the maximum vertex interference T k (G, W ) achieved using each evaluated strategy: the random reference, our implementation of TSC-DSATUR, and the nonlinear optimizer PSO.In addition, we also show the average time required to compute that interference T k (G, W ).
It is important to observe that the results in Table 4 provide, for the Wi-Fi channel assignment problem in the corresponding graph, an interference threshold which can be ensured to be achievable at every vertex.
As for the algorithms, the results show that the performance in terms of T k (G, W ) of our heuristic TSC-DSATUR is better than the performance of PSO, except for a very limited number of cases.Moreover, in those few cases where PSO is better than TSC-DSATUR, the difference is very small.If we analyze the running times of both techniques, we can observe that TSC-DSATUR runs about 1000 times faster than PSO.From this results we can conclude that the use of the heuristic algorithm TSC-DSATUR is very advisable, as it is able to obtain results that are usually better than those obtained by the nonlinear optimizer PSO but with much lower computation requirements.
If we compare both algorithms in more detail, and in general, we can conclude that the performance of TSC-DSATUR in comparison to PSO decreases as the complexity of the graph increases, i.e., as p increases, being fairly similar both performances when p = 0.9.This is due to the fact that PSO deals better with complex nonlinear problems.Furthermore, the standard deviations are noticeable lower in PSO than in TSC-DSATUR.As expected, the values obtained for the random algorithm are always much worse than the other approaches.In particular, it is interesting to see that for k = 4 and k = 6 the random algorithm achieves results very close to the theoretical bound, while with the highest number of colors that approach is worse than the bound.It is very interesting to inspect the results also in terms of the expected average degree of the graphs, given by np, as it is shown in Figure 4.In Figures 4a-4c we can identify a linear trend between the achieved maximum interference T k (G, W ) and the expected average degree of the graphs for k equal to 4, 6 and 11 colors, respectively.Finally, in Figure 4d we show how the quotient between the running times between PSO and TSC-DSATUR decreases as np increases.
Regarding Chromatic Spectrum Coloring, Table 5 shows the value of the tight theoretical bound given in Theorem 4 and the gap, for the graphs considered, between the best experimental result and the theoretical bound.The main conclusion is that the gap for the theoretical upper bound again gets narrower when the complexity of the graph increases.
Tables 6, 7 and 8 show the results obtained with a threshold t on the maximum interference per vertex equal to np/4, np/2 and 3np/4, respectively.Again, each row corresponds to a different graph category, given by np and again we have marked the best values in boldface.In columns, we have represented the average and standard deviation for the number of colors χ t (G, W ) achieved for each graph coloring approach evaluated together with  the running time needed to obtain those results.Keep in mind that, as mentioned in Section 3.2, both PSO and the random reference are implemented for CSC in an iterative manner, that is, they are run with an increasing number of candidate colors until we find the smaller value χ t for which the result satisfies the threshold t.We can observe again that our heuristic CSC-DSATUR generally outperforms PSO, especially for the lowest values of p.
It is also interesting to note that the difference between the results obtained by our heuristic and the random reference are significantly lower as the average degree of the graph (which depends on p) increases.Although this may seem counter-intuitive, we must keep in mind that we are adjusting the threshold t proportionally with the expected average degree np, which keeps around the same values the minimum number of different colors needed by the solutions whose interference falls below the threshold.Finding such a solution randomly is a different issue, however, and it becomes easier when the expected average degree increases, since the proportion of such solutions in the global solution space increases when increasing the degrees of free- dom (i.e., the number of edges) per vertex.Finally, in Figure 5 we show the quotient between the running times required to obtain the results using PSO and CSC-DSATUR, concluding that the time gain obtained when using CSC-DSATUR decreases as the expected average degree of the graph, np, increases, although this gain is at least of two orders of magnitude.consists of assigning a Wi-Fi channel to each of the deployed APs of a Wi-Fi network in order to minimize the interference threshold.As we have a fixed number of channels (colors) k = 11 and want to minimize the maximum of the interferences at the vertices, we have a TSC problem.More specifically, we have made use of the real layout of the Wi-Fi network in the Polytechnic School of our university, as shown in Figure 6a.The sides of this building, approximately square-shaped, are 130 meters long.Its main features are its 48 classrooms and its central courtyard.Moreover, we have made use of the real positions of the 26 access points (APs) deployed in the building (green dots in Figure 6a).The figure also shows the signal strength from each AP ranging from high coverage (red) to low coverage (blue).Note the low signal coverage for the central courtyard.For this layout, we have considered three different and representative scenarios, depending on the number of network users.In the first one, called Low Density (LD), we consider that there are only 10 classrooms in use with 20 students each, making a total of 200 users.Note that in all scenarios the position of the students in a classroom has been taken from a normal distribution centered around the center of each class and a standard deviation of 0.05 (considered that the size of the scenario is normalized to 1).In the second one, called Medium Density (MD), we consider that there are 100 students uniformly distributed in the building and also 24 classrooms in use with 25 students each, for a total of 700 network users.Finally, the third scenario, called High Density (HD), extends MD to have all the 48 classrooms in use, for a total of 1300 users.To model each scenario, we have considered a graph, whose vertices are the APs, removing those APs which do not have any client attached to it.Note that we have As in the previous examples, the gap decreases with the increase on complexity of the graphs.On the other hand, Table 11 shows the average and standard deviation of the maximum vertex interference T k (G, W ) and the computation times for the different techniques under study.Results show that, clearly, Random offers always the worst performance and that the performance of TSC-DSATUR and PSO is fairly similar, although the running times of PSO are 1316.3,1176.2 and 1355.2 times higher than the running times required by TSC-DSATUR, for LD, MD and HD, respectively.Finally, we are interested not only in the maximum interference, but also in the interference experienced by each AP, to study if the coloring obtained by TSC-DSATUR is similar to the one obtained by PSO. Figure 7 studies this behavior.
In this figure, for each AP we plot a heat map of the difference between the interference obtained by that AP using TSC-DSATUR (I T SC−DSAT U R v ) minus the interference obtained by that AP using PSO (I P SO v ).Hence, in this figure an AP in red means that the interference of TSC-DSATUR is higher than that of PSO, and the opposite holds for blue.Results show that, in general, most of the colors are either light blue, light red or white, so the difference in performance between TSC-DSATUR and PSO is low.However, it is quite interesting to see that, for the MD scenario, there two  dark blue APs, for which the performance of TSC-DSATUR is much higher than the one of PSO.Finally, in the lower part of Figure 7 we also show the average interference experienced by each AP.As we can see, TSC-DSATUR behaves slightly better than PSO for LD and MD, while in HD PSO has a better performance than TSC-DSATUR.

Conclusions
We have introduced two vertex-coloring problems for graphs, in which we are given a spectrum of colors endowed with a matrix of interferences between them.The Threshold Spectrum Coloring problem (TSC), motivated by Wi-Fi channel assignment, looks for the smallest threshold below which the interference at every vertex can be kept.The Chromatic Spectrum Coloring problem (CSC) is the complement, in which a threshold is given and the aim is to find the smallest number of colors allowing to respect that threshold.We have illustrated these two problems with a case study.
For such problems we have provided theoretical results, showing that both of them are NP-hard and proving upper bounds for the smallest threshold in TSC and the smallest number of colors in CSC.
In order to complete the scene, we have first presented experimental results for different coloring techniques, tested on Erdős-Renyi random graphs of n ∈ {60, 70, 80} vertices and probabilities p ∈ {0.1, 0.3, 0.5, 0.7, 0.9} of connection, with an interference matrix of exponential decay.For the coloring techniques, we have proposed a DSATUR-based heuristic for each of the TSC and CSC problems, in order to account for the given spectrum.We have compared these heuristics with PSO, a nonlinear optimizer based in particle swarm, for TSC problems of k ∈ {4, 6, 11} colors and CSC problems of thresholds t ∈ {np/4, np/2, 3np/4}, where np is the expected average degree of the graph.
Further, we have performed an evaluation of our proposal in a realistic setting, the Wi-Fi network in the Polytechnic School of our university.We have made use of the real positions of the 26 access points (APs) deployed in the building and we have considered three different and representative scenarios, with 200, 700, and 1300 network users respectively.
The experiments show that the performance of our heuristics TSC-DSATUR and CSC-DSATUR is better than PSO for the simplest graphs, although this improvement decreases as the complexity of the graphs increase.This makes sense, since higher degrees involve more interdependencies between vertex colorings, which is the kind of constraints nonlinear optimizers are designed for.
Finally, we have also checked the gap between the theoretical upper bounds and the best values obtained in the experiments, observing that the more complex is the graph, the smaller is this gap.

Figure 1 :
Figure 1: Left: Matrix W 2ed and the interferences it induces on the different possible colorings of an edge.Right: All proper 3-colorings of the paw graph and the interferences they induce at every vertex.Highlighted colorings achieve interference ≤ 1 at every vertex.

Algorithm 2 :
CSC-DSATUR coloring algorithm Input: G = (V, E): graph to be colored; S = {c i }: spectrum of colors W : matrix of interferences t: threshold on the maximum interference per vertex Output: c: coloring of the graph G, c(v

Figure 4 :
Figure 4: Effect of expected average degree of the graphs (np) in the Threshold Spectrum Coloring problem.

Figure 5 :
Figure 5: Comparison between the running times of CSC-DSATUR and PSO for the CSC problem.

Figure 7 :
Figure 7: Heat map of the differences of interferences.

Table 1 :
Bounds for the maximum vertex interference T k (G, W ) for TSC.Each row shows a specific combination of the number of vertices n and the probability of connection p.

Table 2 :
Maximum vertex interference T k (G, W ) and running times for TSC with k = 4.

Table 3 :
Maximum vertex interference T k (G, W ) and running times for TSC with k = 6.

Table 4 :
Maximum vertex interference T k (G, W ) and running times for TSC with k = 11.

Table 5 :
Bounds for the number of colors χ t (G, W ) for CSC.

Table 6 :
Number of colors χ t (G, W ) and running times for CSC with t = np/4.

Table 7 :
Number of colors χ t (G, W ) and running times for CSC with t = np/2.

Table 10 :
Bounds for the maximum vertex interference T k (G, W ) for TSC in the Wi-Fi scenario with k = 11.

Table 11 :
Maximum vertex interference T k (G, W ) and running times for TSC in the Wi-Fi scenario with k = 11.