via the meet-in-the-middle approach
We study the complexity of the Channel Assignment problem. By applying the meet-in-the-middle approach we get an algorithm for the -bounded Channel Assignment (when the edge weights are bounded by ) running in time . This is the first algorithm which breaks the barrier. We extend this algorithm to the counting variant, at the cost of slightly higher polynomial factor.
A major open problem asks whether Channel Assignment admits a -time algorithm, for a constant independent of . We consider a similar question for Generalized -Coloring, a CSP problem that generalizes Channel Assignment. We show that Generalized -Coloring does not admit a -time algorithm, where is the size of the instance.
In the Channel Assignment problem, we are given a symmetric weight function (we assume that ). The elements of will be called vertices (as induces a graph on the vertex set with edges corresponding to positive values of ). We say that is -bounded when for every we have . An assignment is called proper when for each pair of vertices we have . The number is called the span of . The goal is to find a proper assignment of minimum span. Note that the special case when is -bounded corresponds to the classical graph coloring problem. It is therefore natural to associate the instance of the channel assignment problem with an edge-weighted graph where with edge weights such that for every (in what follows we abuse the notation slightly and use the same letter for both the function defined on and ). The minimum span is called also the span of and denoted by .
It is interesting to realize the place Channel Assignment in a kind of hierarchy of constraint satisfaction problems. We have already seen that it is a generalization of the classical graph coloring. It is also a special case of the constraint satisfaction problem (CSP). In CSP, we are given a vertex set , a constraint set and a number of colors . Each constraint is a set of pairs of the form where and . An assignment is proper if every constraint is satisfied, i.e. there exists such that . The goal is to determine whether there is a proper assignment. Note that Channel Assignment corresponds to CSP where and every edge of weight in the instance of Channel Assignment corresponds to the set of constraints of the form where .
Since graph coloring is solvable in time  it is natural to ask whether Channel Assignment is solvable in time , for some constant . Unfortunately, the answer is unknown at the moment and the best algorithm known so far runs in time (see McDiarmid ). However, there has been some progress on the -bounded variant. McDiarmid  came up with an -time algorithm which has been next improved by Kral  to and to by Cygan and Kowalik . These are all dynamic programming (and hence exponential space) algorithms, and the last one applies the fast zeta transform to get a minor speed-up. Interestingly, all these works show also algorithms which count all proper assignments of span at most within the same running time (up to polynomial factors) as the decision algorithm.
It is a major open problem (see [9, 2, 6]) to find such a -time algorithm for independent of or prove that it does not exist under a reasonable complexity assumption. A complexity assumption commonly used in such cases is the Exponential Time Hypothesis (ETH), introduced by Impagliazzo and Paturi . It states that 3-CNF-SAT cannot be computed in time , where is the number of variables in the input formula. The open problem mentioned above becomes even more interesting when we realize that under ETH, CSP does not have a -time algorithm for a constant independent of , as proved by Traxler .
Our Results. Our main result is a new -time algorithm for the -bounded Channel Assignment problem. Note that this is the first algorithm which breaks the barrier. Our algorithm follows the meet-in-the-middle approach (see e.g. Horowitz and Sahni ) and is surprisingly simple, so we hope it can become a yet another clean illustration of this beautiful technique. We show also its (more technical) counting version, which runs within the same time (up to a polynomial factor).
Although we were not able to show that the unrestricted Channel Assignment does not admit a -time for a constant under, say ETH, we were able to shed some more light at this issue. Let us consider some more problems in the CSP hierarchy. In the -Coloring, introduced by Hale , we are given a graph , a set , and a number . An assignment is proper when for every edge we have . As usual, the goal is to determine whether there exists a proper assignment. Like Channel Assignment, -Coloring is a special case of CSP and generalizes graph coloring, but it is incomparable with Channel Assignment. However, Fiala, Král’ and Škrekovski introduced which is a common generalization of vertex list-coloring (a variant of the classical graph coloring where each vertex has a list, i.e., a set of allowed colors), Channel Assignment and -Coloring. The instance of the Generalized List -coloring is a triple where is a graph, , and , where denotes the set of all nonnegative integers. An assignment is proper when for every we have , and for every edge we have . As usual, the goal is to determine whether there exists a proper assignment. Similarly as in the case of Channel Assignment, we say that the instance of Generalized List -coloring is -bounded if . Very recently, the Generalized List -coloring was considered by Junosza-Szaniawski and Rzążewski . They show Generalized List -coloring can be solved in time, which matches the time complexity of the algorithm of Cygan and Kowalik  for Channel Assignment (note that an -bounded instance of Channel Assignment can be seen as an -bounded instance of Generalized List -coloring). In this work we show that most likely one cannot hope for am -time algorithm for Generalized List -coloring. We even consider a special case of Generalized List -coloring, i.e. the non-list version where every vertex is allowed to have any color, so the instance is just a triple . We call it Generalized -Coloring. We show that, under ETH, Generalized -Coloring does not admit a -time algorithm, where is the size of the instance (including all the bits needed to represent the sets for all ). Note that this rules out an algorithm as well.
Organization of the paper. In Section 2 we describe an -time dynamic programming algorithm for -bounded Channel Assignment. It is then used as a subroutine in the -time algorithm described in Section 3. In Section 4 we extend the algorithm from Section 3 to counting proper assignments of given span. Finally, in Section 5 we discuss hardness of Generalized -Coloring under ETH.
Notation. Throughout the paper denotes the number of the vertices of the graph under consideration. For an integer , by we denote the set . Finally, is the disjoint sum of sets i.e. the standard sum of sets but with an additional assumption that the sets are disjoint.
2 Yet another -time dynamic programming
In this section we provide a -time dynamic programming algorithm for Channel Assignment. It uses a different approach than e.g. the algorithm of Kral, and will be used as a subroutine in our faster algorithm.
For a subset and a function let be the set of all proper assignments of the graph subject to the condition that for every we have .
For every subset and we compute the value of which is equal to the minimum span of an assignment from . Clearly, the minimum span of equals to where is the constant function which assigns to every vertex.
The values of are computed by dynamic programming as follows. First we initialize (where is the only function ). Next, we iterate over all non-empty subsets of in the order of nondecreasing cardinality. In order to determine the value of we use the recurrence relation formulated in the following lemma.
Informally, it uses the observation that there is a minimum-span assignment such that the vertex with minimum color is left-shifted, i.e. . Hence we can check all possibilities for and then the colors of all the other vertices from have lower bounds in range , so we can translate the range back down to and use the previously computed values of .
For a subset , a function and a vertex define the function given by the formula
Fix . Denote . Then, for every assignment , for every we have . Hence, the minimum span of an assignment from is equal to . It suffices to show that there is an assignment of minimum span such that for some . Consider an arbitrary assignment of minimum span. Let be the vertex of minimum color, i.e. is minimum. If we are done. Otherwise consider a new assignment which is the same as everywhere except for and ; then is proper since is minimal and clearly . The span of is not greater than the span of (actually they are the same since has minimal span), so the claim follows. ∎
The size of the array is . Computing a single value based on previously computed values for smaller sets takes time, hence the total computation takes time. As described, it gives the minimum span only, but we can retrieve the corresponding assignment within the same running time using standard techniques.
3 The meet-in-the-middle speed-up
In this section we present our main result, an algorithm for -bounded Channel Assignment that applies the meet-in-the-middle technique. Roughly, the idea is to find partial solutions for all possible halves of the vertex set and then merge the partial solutions efficiently to solve the full instance.
For the clarity of the presentation we assume is even (otherwise we just add a dummy isolated vertex). Before we describe the algorithm let us introduce some notation. For a set , by we denote . Moreover, for a function we define function such that for every ,
The values are defined as in Section 2. Our algorithm is based on the following observation.
The span of is equal to
where the minimum is over all pairs where and .
Let be a proper assignment of minimum span . Order the vertices of so that for every we have . Consider the subset . Let . Define such that for every . From the definition of we have (because the assignment belongs to and has span ). Moreover, note that for every it holds that
It follows that .
Finally we show that contradicts the optimality of . Let be an assignment of span and let be an assignment of span . Consider the following assignment .
One can check that from the definition of it follows that is a proper assignment. Moreover, the span of is equal to . Hence, if then is not optimal, a contradiction. ∎
From Lemma 2 we immediately obtain the following algorithm for computing the span of :
Note that Step 1 takes time proportional to . The size of array is clearly . In Step 2 we compute a minimum of values. Hence the total time is . As described, the above algorithm gives the minimum span only, but we can retrieve the corresponding assignment within the same running time using standard techniques. We have just proved the following theorem.
For every -bounded weight function the channel assignment problem can be solved in time.
4 An Extension to Counting
In this section we present an extension of our meet-in-the-middle algorithm which finds the number of proper assignments of span . This is slightly more technical than the decision algorithm because we need to avoid counting the same assignment more than once. We assume here that (we will use the fact that is linearly ordered).
For , function and value denote the set of all assignments from with span by . Let us denote . We will use the recurrence relation formulated in the following lemma.
For a subset , a function and a vertex define the function given by the formula
Also, for a function define the function given by the formula
Then, for every , and
The proof is by induction on . The formula (2) clearly holds when , since there is exactly one assignment with empty domain, it is proper and its span is 1.
Assume . The set partitions into two subsets and , where contains the assignments which assign color 1 to some vertex and contains the remaining assignments.
We can further partition , where
Define . Then . Consider an arbitrary . Then for every we have , , and if then . In other words, for every we have and hence . It follows that . It is also easy to verify that every assignment can be extended to a proper assignment by putting and . Hence . It follows that and hence , where the last equality follows from the induction hypothesis. We get .
If then . Assume . It is clear that the assignments in are in 1-1 correspondence with the assignments in and the assignments in have span . Hence , where the last equality follows from the induction hypothesis.
To sum up,
as required. ∎
With Lemma 4 it is easy to describe a dynamic programming algorithm which for every subset , function and value computes the value of . First we initialize for every and next the values of are computed according to Formula (2), using previously computed values of array ; to this end we iterate over the triples in nondecreasing order of . The number of triples considered is and processing each triple takes time. We have just shown the following.
There is an -time -space algorithm which finds the values of for all subsets , functions and values .
If we use just the values of in the merge phase of the meet-in-the-middle approach, it is unclear how to avoid double-counting the same assignments. To overcome this problem, for a subset , a function and a value define as the set of all proper assignments of the graph such that has span and for every , if then and otherwise . Denote . Observe the following.
For a subset and a function define the function given by the formula
for every . Then, for every , and
if is not a proper assignment then ;
if is a proper assignment and then
if is a proper assignment and then
Now we proceed to the merge phase of our meet-in-the-middle algorithm. For a function we define function such that for every ,
The role of the function is similar as in determining the span using the meet-in-the-middle approach; the only difference is that if for some we have then for every , if then . Informally, this helps us to avoid counting the same assignment once for every partition of the “middle color” into parts of relevant sizes. Now we can formulate the counting counterpart of Lemma 2.
For a given graph , weight function and integer the number of proper assignments of span is equal to
Let be the set of all proper assignments of span . For an assignment define a total order of as follows: for we have iff , where is the lexicographic order. Then defines a permutation of the vertices . Then , where
Moreover, , where
where is the set of assignments such that for every , if then and if then . Note that the condition is necessary to satisfy the defining condition of ; in particular .
Consider an arbitrary . Now observe that for every and such that , we have . Moreover, if , i.e. , then . Hence,
It follows that , as required. ∎
For every -bounded weight function the number of all proper assignments of a given span can be computed in time.
5 Hardness of Generalized -Coloring
In this section we give a lower bounds for the time complexity of Generalized -Coloring, under ETH. To this end we present a reduction from SetCover. The instance of the decision version of SetCover consists of a family of sets and a number . The set is called the universe and we denote . The goal is to decide whether there is a subfamily of size at most such that (then we say the instance is positive).
In the following lemma we reduce Set Cover to the decision version of Generalized -Coloring, where for a given instance and a number we ask whether there is a proper assignment of span at most (then we say the instance is positive). We say that an instance of SetCover is equivalent to an instance of Generalized -Coloring when is positive iff is positive. For every edge of , every pair for is called a constraint.
Let be an instance of SetCover with sets and universe of size and let and be two reals. Then we can generate in polynomial time an equivalent instance of Generalized -Coloring which has vertices, constraints and is -bounded.
For convenience we assume that and are natural numbers, since otherwise we round and down and the whole construction and its analysis is the same, up to some details.
In the proof we consider coloring of the vertices as placing the vertices on a number line in such a way that every vertex is placed in the coordinate equal to its color.
Let . We are going to construct a complex instance of Generalized -Coloring. We describe it step-by-step and show some of its properties.
We begin by putting vertices and in and , i.e. in every proper assignment has color and has color , or the other way around; w.l.o.g. we assume the first possibility. We specify later.
In what follows, whenever we put a new vertex in , we will specify the set of its allowed colors. Formally, this corresponds to putting .
Our instance will consist of three separate modules (the set choice module, the witness module and the parsimonious module). By separate we mean they have disjoint sets of vertices , and and moreover they have disjoint sets of allowed colors, i.e. for , when and for then . However the modules will interfere with each other by forbidding some distances between pairs of vertices from two different modules.
The set choice module. The first module represents the sets in . For every the set contains a vertex . Vertex represents the sets
(and the last vertex represents ). We also put for every . The intuition is that the color of a vertex corresponds to a subset , i.e. the choice of sets from to the solution of SetCover.
The witness module. Let denote the elements of the universe as For every the set contains a vertex . Vertex represents the elements
(and the last vertex represents ).
This time vertices do not need to have the same sets of allowed colors, but for every we have . Note that every vertex has at most allowed colors and there are gaps of length where no vertex is going to be assigned.
We say that a sequence is a witness for a vertex when
For every color corresponds to the -th sequence in the set (say, in the lexicographic order of indices); we denote this sequence by . Then, for every ,
The intuition should be clear: color of a vertex in a proper assignment represents the choice of at most sets in the solution of SetCover which cover .
The interaction between the set choice module and the witness module. As we have seen, every assignment of colors to the vertices determines a choice of a subfamily , where . Similarly, determines a choice of a subfamily , where . It should be clear that we want to force that in every proper assignment . To this end we introduce edges between the two modules.
For and define the following set of forbidden colors
The intuition is the following: If a proper assignment colors a vertex with color (i.e. it assigns the witness to the set ) then it cannot color the vertex with colors from (i.e. choose this subsets of corresponding to these colors), for otherwise .
Claim 1 Consider any proper assignment . If for every we have , then .
Proof of the claim: Consider a set for an arbitrary . Then for some . From the assumption, , so . Hence, , as required.
Hence we would like to add some forbidden distances to our instance to make the assumption of Clam 1 hold. To this end, for every