Assigning channelsvia the meet-in-the-middle approachResearch supported by National Science Centre of Poland, grant number UMO-2013/09/B/ST6/03136. An extended abstract was presented at 14th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT 2014) in Copenhagen, Denmark.

Abstract

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 O∗((2√ℓ+1)n). This is the first algorithm which breaks the (O(ℓ))n 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 O(cn)-time algorithm, for a constant c independent of ℓ.
We consider a similar question for Generalized T-Coloring, a CSP problem that generalizes Channel Assignment.
We show that Generalized T-Coloring does not admit a 22o(√n)poly(r)-time algorithm, where r is the size of the instance.

In the Channel Assignment problem, we are given a symmetric weight function w:V2→N (we assume that 0∈N).
The elements of V will be called vertices (as w induces a graph on the vertex set V with edges corresponding to positive values of w).
We say that w is ℓ-bounded when for every x,y∈V we have w(x,y)≤ℓ.
An assignment c:V→{1,…,s} is called proper when for each pair of vertices x,y we have |c(x)−c(y)|≥w(x,y).
The number s is called the span of c. The goal is to find a proper assignment of minimum span.
Note that the special case when w is 1-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 G=(V,E) where E={uv:w(u,v)>0} with edge weights wE:E→N such that wE(xy)=w(x,y) for every xy∈E (in what follows we abuse the notation slightly and use the same letter w for both the function defined on V2 and E).
The minimum span is called also the span of (G,w) and denoted by span(G,w).

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 V, a constraint set C and a number of colors d.
Each constraint is a set of pairs of the form (v,t) where v∈V and t∈{1,…,d}.
An assignment c:V→{1,…,d} is proper if every constraint A∈C is satisfied, i.e. there exists (v,t)∈A such that c(v)≠t.
The goal is to determine whether there is a proper assignment.
Note that Channel Assignment corresponds to CSP where d=s and every edge uv of weight w(uv) in the instance of Channel Assignment corresponds to the set of constraints of the form {(u,t1),(v,t2)} where |t1−t2|<w(uv).

Since graph coloring is solvable in time O∗(2n)[1] it is natural to ask whether Channel Assignment is solvable in time O∗(cn), for some constant c.
Unfortunately, the answer is unknown at the moment and the best algorithm known so far runs in O∗(n!) time (see McDiarmid [10]).
However, there has been some progress on the ℓ-bounded variant.
McDiarmid [10] came up with an O∗((2ℓ+1)n)-time algorithm which has been next improved by Kral [9] to O∗((ℓ+2)n) and to O∗((ℓ+1)n) by Cygan and Kowalik [2]. 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 s 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 O(cn)-time algorithm for c 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 [7].
It states that 3-CNF-SAT cannot be computed in time 2o(n), where n 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 O∗(cn)-time algorithm for a constant c independent of d, as proved by Traxler [11].

Our Results.
Our main result is a new O∗((2√ℓ+1)n)-time algorithm for the ℓ-bounded Channel Assignment problem. Note that this is the first algorithm which breaks the (O(ℓ))n barrier.
Our algorithm follows the meet-in-the-middle approach (see e.g. Horowitz and Sahni [5]) 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 O(cn)-time for a constant c 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 T-Coloring, introduced by Hale [4], we are given a graph G=(V,E), a set T⊆N, and a number s∈N.
An assignment c:V→{1,…,s} is proper when for every edge uv∈E we have |c(u)−c(v)|∉T.
As usual, the goal is to determine whether there exists a proper assignment.
Like Channel Assignment, T-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 T-Coloring.
The instance of the Generalized List T-coloring is a triple (G,Λ,t,s) where G=(V,E) is a graph, Λ:V→2N, t:E→2N and s∈N, where N denotes the set of all nonnegative integers.
An assignment c:V→{1,…,s} is proper when for every v∈V we have c(v)∈Λ(v), and for every edge uv∈E we have |c(u)−c(v)|∉t(uv).
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 T-coloring is ℓ-bounded if
max⋃e∈Et(e)≤ℓ.
Very recently, the Generalized List T-coloring was considered by Junosza-Szaniawski and Rzążewski [8]. They show Generalized List T-coloring can be solved in O∗((ℓ+2)n) time, which matches the time complexity of the algorithm of Cygan and Kowalik [2] for Channel Assignment (note that an ℓ-bounded instance of Channel Assignment can be seen as an (ℓ−1)-bounded instance of Generalized List T-coloring).
In this work we show that most likely one cannot hope for am O∗(cn)-time algorithm for Generalized List T-coloring.
We even consider a special case of Generalized List T-coloring, i.e. the non-list version where every vertex is allowed to have any color, so the instance is just a triple (G,t,s). We call it Generalized T-Coloring. We show that, under ETH, Generalized T-Coloring does not admit a 22o(√n)poly(r)-time algorithm, where r is the size of the instance (including all the bits needed to represent the sets t(e) for all e∈E). Note that this rules out an O(n!) algorithm as well.

Organization of the paper.
In Section 2 we describe an O∗((ℓ+2)n)-time dynamic programming algorithm for ℓ-bounded Channel Assignment. It is then used as a subroutine in the O∗((2√ℓ+1)n)-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 T-Coloring under ETH.

Notation.
Throughout the paper n denotes the number of the vertices of the graph under consideration.
For an integer k, by [k] we denote the set {1,2,…,k}.
Finally, ⊎ is the disjoint sum of sets i.e. the standard sum of sets ∪
but with an additional assumption that the sets are disjoint.

In this section we provide a O∗((ℓ+2)n)-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 X⊆V and a function f:X→[ℓ+1] let AX,f be the set of all proper assignments c:X→N of the graph G[X] subject to the condition that for every x∈X we have c(x)≥f(x).

For every subset X⊆V and f:X→[ℓ+1] we compute the value of T[X,f] which is equal to the minimum span of an assignment from AX,f.
Clearly, the minimum span of (G,w) equals to T[V,f1] where f1 is the constant function which assigns 1 to every vertex.

The values of T[X,f] are computed by dynamic programming as follows.
First we initialize T[∅,e[ℓ+1]]=0 (where e[ℓ+1] is the only function f:∅→[ℓ+1]).
Next, we iterate over all non-empty subsets of V in the order of nondecreasing cardinality.
In order to determine the value of T[X,f] we use the recurrence relation formulated in the following lemma.

Informally, it uses the observation that there is a minimum-span assignment c such that the vertex v∈X with minimum color c(v) is left-shifted, i.e. c(v)=f(v). Hence we can check all possibilities for v and then the colors of all the other vertices from X have lower bounds in range {f(v),…,f(v)+ℓ}, so we can translate the range back down to {1,…,ℓ+1} and use the previously computed values of T[X∖{v},⋅].

Lemma 1.

For a subset X⊆V, a function f:X→[ℓ+1] and a vertex v define the function fv:X∖{v}→[ℓ+1] given by the formula

fv(x)=1+max{w(v,x),f(x)−f(v)}\quad\quad for every x∈X∖{v}.

Then,

T[X,f]=minv∈X(f(v)+T[X∖{v},fv]−1),

(1)

Proof.

Fix v∈X.
Denote AX,f,v={c∈AX,f:c(v)=f(v)=minx∈Xf(x)}.
Then, for every assignment c∈AX,f,v, for every x∈X∖{v} we have c(x)≥f(v)+max{w(v,x),f(x)−f(v)}.
Hence, the minimum span of an assignment from AX,f,v is equal to f(v)+T[X∖{v},fv]−1.
It suffices to show that there is an assignment c∗∈AX,f of minimum span such that c∗(v)∈AX,f,v for some v∈X.
Consider an arbitrary assignment c∗∈AX,f of minimum span. Let x∈X be the vertex of minimum color, i.e. c∗(x) is minimum.
If c∗(x)=f(x) we are done. Otherwise consider a new assignment c∗∗ which is the same as c∗ everywhere except for x and c∗∗(x)=f(x); then c∗∗ is proper since c∗(x) is minimal and clearly c∗∗∈AX,f.
The span of c∗∗ is not greater than the span of c∗ (actually they are the same since c∗ has minimal span), so the claim follows.
∎

The size of the array T is ∑ni=0(ni)(ℓ+1)i=(ℓ+2)n. Computing a single value based on previously computed values for smaller sets takes O(n2) time, hence the total computation takes O((ℓ+2)nn2) time. As described, it gives the minimum span only, but we can retrieve the corresponding assignment within the same running time using standard techniques.

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 n is even (otherwise we just add a dummy isolated vertex).
Before we describe the algorithm let us introduce some notation.
For a set X⊆V, by ¯¯¯¯¯X we denote V∖X. Moreover, for a function f:X→[ℓ+1] we define function ¯¯¯f:¯¯¯¯¯X→[ℓ+1] such that for every v∈¯¯¯¯¯X,

¯¯¯f(v)=1+max({1+w(uv)−f(u):uv∈E,u∈X}∪{0}).

The values T[X,f] are defined as in Section 2. Our algorithm is based on the following observation.

Lemma 2.

The span of (G,w) is equal to

min(T[X,f]+T[¯¯¯¯¯X,¯¯¯f]−1),

where the minimum is over all pairs (X,f) where X∈(Vn/2) and f:X→[ℓ+1].

Proof.

Let c∗:V→N be a proper assignment of minimum span s.
Order the vertices of V={v1,…,vn} so that for every i=1,…,n−1 we have c∗(vi)≤c∗(vi+1).
Consider the subset X={v1,…,vn/2}.
Let s1=c∗(vn/2).
Define f:X→[ℓ+1] such that f(x)=1+min{s1−c∗(x),ℓ} for every x∈X.
From the definition of T we have T[X,f]≤s1 (because the assignment x↦1+s1−c∗(x) belongs to AX,f and has span s1).
Moreover, note that for every v∈¯¯¯¯¯X it holds that

It follows that s=maxv∈¯¯¯¯Xc∗(v)≥s1−1+T[¯¯¯¯¯X,¯¯¯f]≥T[X,f]+T[¯¯¯¯¯X,¯¯¯f]−1.

Finally we show that s>T[X,f]+T[¯¯¯¯¯X,¯¯¯f]−1 contradicts the optimality of c∗.
Let c1∈AX,f be an assignment of span T[X,f] and let c2∈A¯¯¯¯X,¯¯¯f be an assignment of span T[¯¯¯¯¯X,¯¯¯f]. Consider the following assignment c:V→N.

c(x)={1+T[X,f]−c1(x)for x∈XT[X,f]+c2(x)−1for x∈¯¯¯¯¯X

One can check that from the definition of ¯¯¯f it follows that c is a proper assignment.
Moreover, the span of c is equal to T[X,f]+T[¯¯¯¯¯X,¯¯¯f]−1. Hence, if s>T[X,f]+T[¯¯¯¯¯X,¯¯¯f]−1 then c∗ is not optimal, a contradiction.
∎

From Lemma 2 we immediately obtain the following algorithm for computing the span of (G,w):

Compute the values of T[X,f] for all X∈(V≤n/2) and f:X→[ℓ+1] using the algorithm from Section 2.

Note that Step 1 takes time proportional to ∑n/2i=0(ni)(ℓ+1)in2=O(2n(ℓ+1)n/2n2). The size of array T is clearly
O(2n(ℓ+1)n/2). In Step 2 we compute a minimum of (nn/2)(ℓ+1)n/2=O(2n(ℓ+1)n/2) values.
Hence the total time is O(2n(ℓ+1)n/2n2).
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.

Theorem 3.

For every ℓ-bounded weight function the channel assignment problem can be solved in O(2n(ℓ+1)n/2n2) time.

In this section we present an extension of our meet-in-the-middle algorithm which finds the number of proper assignments of span s.
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 V={1,…,n} (we will use the fact that V is linearly ordered).

For X∈(Vn/2), function f:X→[ℓ+1] and value r=1,…,s denote the set of all assignments from AX,f with span r by AX,f,r.
Let us denote Q[X,f,r]=|AX,f,r|. We will use the recurrence relation formulated in the following lemma.

Lemma 4.

For a subset X∈(V≤n/2), a function f:X→[ℓ+1] and a vertex v define the function fv:X∖{v}→[ℓ+1] given by the formula

fv(x)=max{f(x),1+w(vx),1+[x<v]}\quad\quad for every x∈X∖{v}.

Also, for a function f:X→{2,…,ℓ+1} define the function f↓:X→[ℓ+1] given by the formula

f↓(x)=max{f(x)−1,1}\quad\quad for every x∈X.

Then, for every X∈(Vn/2), f:X→[ℓ+1] and r=1,…,s

Q[X,f,r]={∑v∈f−1(1)Q[X∖{v},fv,r]+[r>1]Q[X,f↓,r−1]if X≠∅otherwise

(2)

Proof.

The proof is by induction on |X|+r.
The formula (2) clearly holds when X=∅, since there is exactly one assignment with empty domain, it is proper and its span is 1.

Assume X≠∅.
The set AX,f,r partitions into two subsets B and C, where B contains the assignments which assign color 1 to some vertex and C contains the remaining assignments.

We can further partition B=⋃v∈f−1(1)Bv, where

Bv={c∈B:minc−1(1)=v}.

Define B′v={c|X∖{v}:c∈Bv}.
Then |B′v|=|Bv|.
Consider an arbitrary c∈Bv.
Then for every x∈X∖{v} we have c(x)≥f(x), c(x)≥f(v)+w(vx)=1+w(vx), and if x<v then c(x)≥2.
In other words, for every x∈X∖{v} we have c(x)≥fv(x) and hence c|X∖{v}∈AX∖{v},fv,r.
It follows that B′v⊆AX∖{v},fv,r.
It is also easy to verify that every assignment c′∈AX∖{v},fv,r can be extended to a proper assignment c∈Bv by putting c(v)=1 and c|X∖{v}=c′.
Hence AX∖{v},fv,r⊆B′v.
It follows that B′v=AX∖{v},fv,r and hence |Bv|=|AX∖{v},fv,r|=Q[X∖{v},fv,r], where the last equality follows from the induction hypothesis. We get |B|=∑v∈f−1(1)Q[X∖{v},fv,r].

If r=1 then C=∅. Assume r>1.
It is clear that the assignments in C are in 1-1 correspondence with the assignments in C′={c↓:c∈C} and the assignments in C′ have span r−1. Hence |C|=|AX,f↓,r−1|=Q[X,f↓,r−1], where the last equality follows from the induction hypothesis.

To sum up,

|AX,f,r|=|B|+|C|=∑v∈f−1(1)Q[X∖{v},fv,r]+[r>1]⋅Q[X,f↓,r−1],

as required.
∎

With Lemma 4 it is easy to describe a dynamic programming algorithm which for every subset X∈(Vn/2), function f:X→[ℓ+1] and value r=1,…,s computes the value of Q[X,f,r].
First we initialize Q[∅,∅,r]=[r=1] for every r=1,…,s and next the values of Q[X,f,r] are computed according to Formula (2), using previously computed values of array Q; to this end we iterate over the triples (X,f,r) in nondecreasing order of |X|+r.
The number of triples considered is O(2n(ℓ+1)n/2s) and processing each triple takes O(n2) time. We have just shown the following.

Lemma 5.

There is an O(2n(ℓ+1)n/2sn2)-time O(2n(ℓ+1)n/2s)-space algorithm which finds the values of Q[X,f,r] for all subsets X∈(Vn/2), functions f:X→[ℓ+1] and values r=1,…,s.

If we use just the values of Q[X,f,r] 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 X⊆V, a function f:X→[ℓ+1] and a value r=1,…,s define A∗X,f,r as the set of all proper assignments c:X→N of the graph G[X] such that c has span r and for every x∈X , if f(x)≤ℓ then c(x)=f(x) and otherwise c(x)≥f(x). Denote Q∗[X,f,r]=A∗X,f,r.
Observe the following.

Observation 6.

For a subset X⊆V and a function f:X→[ℓ+1] define the function f←ℓ:X∖f−1([ℓ])→[ℓ+1] given by the formula

f←ℓ(x)=max({f(y)+w(yx)−ℓ:y∈f−1([ℓ])}∪{1}),

for every x∈X∖f−1([ℓ]). Then, for every X⊆V, f:X→[ℓ+1] and r=1,…,s

if f|f−1([ℓ]) is not a proper assignment then Q∗[X,f,r]=0;

if f|f−1([ℓ]) is a proper assignment and r≤ℓ then

Q∗[X,f,r]=[f−1({r})≠∅ and f−1({r+1,…,ℓ+1})=∅];

if f|f−1([ℓ]) is a proper assignment and r≥ℓ+1 then

Q∗[X,f,r]=Q[X∖f−1([ℓ]),f←ℓ,r−ℓ].

(3)

Now we proceed to the merge phase of our meet-in-the-middle algorithm.
For a function f:X→[ℓ+1] we define function ~f:¯¯¯¯¯X→[ℓ+1] such that for every v∈¯¯¯¯¯X,

~f(v)=1+max({1+w(uv)−f(u):uv∈E,u∈X}∪{[v<maxf−1(1)]}).

The role of the function ~f is similar as ¯¯¯f in determining the span using the meet-in-the-middle approach; the only difference is that if for some x∈X we have f(x)=1 then for every v∈¯¯¯¯¯X, if v<x then ~f(v)≥2.
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.

Lemma 7.

For a given graph G, weight function w and integer s∈N the number of
proper assignments of span s is equal to

s∑s∗=1∑X∈(Vn/2)∑f:X→[ℓ+1]f−1(1)≠∅Q∗[X,f,s∗]⋅Q[¯¯¯¯¯X,~f,s−s∗+1].

Proof.

Let D be the set of all proper assignments of span s.
For an assignment c∈D define a total order of V as follows: for i,j∈V we have i≺j iff (c(i),i)≤lex(c(j),j), where ≤lex is the lexicographic order. Then c defines a permutation of the vertices vc1≺vc2≺⋯≺vcn. Then D=⨄ss∗=1Ds∗, where

Ds∗={c∈D:c(vcn/2)=s∗}

Moreover, Ds∗=⨄X∈(Vn/2)Ds∗,X, where

Ds∗,X={c∈Ds∗:{vc1,…,vcn/2}=X}.

Finally,

Ds∗,X=⨄f:X→[ℓ+1]f−1(1)≠∅Ds∗,X,f,

where Ds∗,X,f is the set of assignments c∈Ds∗,X such that
for every x∈X, if f(x)≤ℓ then c(x)=s∗−f(x)+1 and if f(x)=ℓ+1 then c(x)≤s∗−f(x)+1. Note that the condition f−1(1)≠∅ is necessary to satisfy the defining condition of Ds∗; in particular vcn/2=maxf−1(1).

Consider an arbitrary c∈Ds∗,X,f.
Now observe that for every v∈¯¯¯¯¯X and u∈X such that uv∈E, we have
c(v)≥max{c(u)+w(uv),s∗}. Moreover, if v<vcn/2, i.e. v<maxf−1(1), then c(v)≥s∗+1. Hence,

Theorem 8.

In this section we give a lower bounds for the time complexity of Generalized T-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 S={S1,…,Sm} and a number k.
The set U=⋃S is called the universe and we denote n=|U|.
The goal is to decide whether there is a subfamily C⊆S of size at most k such that ⋃C=U (then we say the instance is positive).

In the following lemma we reduce Set Cover to the decision version of Generalized T-Coloring, where for a given instance (G,w) and a number s we ask whether there is a proper assignment of span at most s (then we say the instance is positive). We say that an instance (S,k) of SetCover is equivalent to an instance (G,w,k) of Generalized T-Coloring when (S,k) is positive iff (G,w,k) is positive. For every edge e of G, every pair (e,d) for d∈t(e) is called a constraint.

Lemma 9.

Let (S,k) be an instance of SetCover with m sets
and universe of size n and let A∈[1,m] and B∈[1,n] be two reals.
Then we can generate in polynomial time an equivalent instance of Generalized T-Coloring which has O(nB+mA⋅max{1,logA}) vertices, O∗(2A⋅mB) constraints and is O(2A⋅mB)-bounded.

Proof.

For convenience we assume that A and B are natural numbers, since otherwise we round A and B 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 S={S1,…,Sm}.
We are going to construct a complex instance (G=(V,E),t,s) of Generalized T-Coloring.
We describe it step-by-step and show some of its properties.

We begin by putting vertices vL and vR in V and t(vLvR)={0,…,s−2}, i.e. in every proper assignment vL has color 1 and vR has color s, or the other way around; w.l.o.g. we assume the first possibility. We specify s later.

In what follows, whenever we put a new vertex v in V, we will specify the set A(v) of its allowed colors.
Formally, this corresponds to putting t(vLv)={d∈{0,…,s−1}:d+1∉A(v)}.

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 VS, VU and VP and moreover they have disjoint sets of allowed colors, i.e. for i,j∈{S,U,P}, when x∈Vi and y∈Vj for i≠j then A(x)∩A(y)=∅. However the modules will interfere with each other by forbidding some distances between pairs of vertices from two different modules.

Colors2A⌈mA⌉∅Figure 1: The set choice module.Colors2AmB⌈nB⌉2A2A2A2AFigure 2:
The witness module. (The grey areas are the gaps between the
mB potentially allowed positions.)

The set choice module.
The first module represents the sets in S.
For every i=1,…,⌈mA⌉ the set VS contains a vertex si.
Vertex si represents the A sets

Si={S(i−1)⋅A+1,S(i−2)⋅A+2,…,Si⋅A}

(and the last vertex s⌈m/A⌉ represents ).
We also put A(si)={1,…,2A} for every si∈VS.
The intuition is that the color c∈[2A] of a vertex si corresponds to a subset Si(c)⊆Si, i.e. the choice of sets from Si to the solution of SetCover.

The witness module.
Let denote the elements of the universe as e1,e2,…,en.
For every i=1,…,⌈nB⌉ the set VU contains a vertex ui.
Vertex ui represents the B elements

Ui={e(i−1)⋅B+1,e(i−2)⋅B+2,…,ei⋅B}

(and the last vertex u⌈n/B⌉ represents U⌈n/B⌉=e(⌈n/B⌉−1)B+1,…,en).

This time vertices VU do not need to have the same sets of allowed colors, but for every u∈VU we have A(u)⊆{1+i⋅2A:i=1,…,mB}.
Note that every vertex has at most mB allowed colors and there are gaps of length 2A−1 where no vertex is going to be assigned.

We say that a sequence (Sw1,…,SwB)∈SB is a witness for a vertex ui∈VU when

Ui⊆B⋃j=1Swj.

For every i=1,…,mB color 1+i⋅2A corresponds to the i-th sequence in the set SB (say, in the lexicographic order of indices); we denote this sequence by Wi. Then, for every u∈VU,

A(u)={1+i⋅2A:Wi is a witness for u, i=1,…,mB}.

The intuition should be clear: color of a vertex ui∈VU in a proper assignment represents the choice of at most B sets in the solution of SetCover which cover Ui.

The interaction between the set choice module and the witness module.
As we have seen, every assignment c of colors to the vertices determines a choice of a subfamily S(c)⊆S, where
S(c)=⋃⌈m/A⌉i=1Si(c(i)).
Similarly, c determines a choice of a subfamily S′(c)⊆S, where
S′(c)=⋃u∈VUWc(u).
It should be clear that we want to force that in every proper assignment S′(c)⊆S(c). To this end we introduce edges between the two modules.

2A⌈mA⌉Colors2AmB⌈nB⌉siuFigure 3:
The interaction between a vertex si in the set choice module and a vertex u in the witness module.
All the drawn arcs are forbidden distances between si and u.
Note that for every possible color 1+j⋅2A of u the subset of [2A] excluded
by the forbidden distances in t(usi) is exactly Fi,j.

For i=1,…,⌈mA⌉ and j=1,…,mB define the following set of forbidden colors

Fi,j={c∈[2A]:Wj∩Si⊈Si(c)}.

The intuition is the following: If a proper assignment colors a vertex ui∈VU with color 1+j⋅2A (i.e. it assigns the witness Wj to the set Ui) then it cannot color the vertex si with colors from Fi,j (i.e. choose this subsets of Si corresponding to these colors), for otherwise S′(c)⊈S(c).

Claim 1 Consider any proper assignment c:V→[s].
If for every i=1,…,⌈mA⌉ we have
c(si)∉⋃u∈VUFi,c(u), then S′(c)⊆S(c).

Proof of the claim: Consider a set St∈Wc(u) for an arbitrary u∈VU. Then St∈Si for some i. From the assumption, c(si)∉Fi,c(u), so Wc(u)∩Si⊆Si(c). Hence, St∈S(c), 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 u∈