You are on page 1of 13

Coloring Problems

Vertex coloring
• Given an undirected graph G = (V,E) with n=|V|
vertices and m=|E| edges, the Vertex Coloring
Problem (VCP) calls for assigning colors to all the
vertices of G such that
• adjacent vertices (vertices connected by an edge
in E) receive different colors, and
• the number of used colors
is minimum (always ≤ n)

1
ILP model

2
ILP model

Minimize the number of


used colors

Assign a color to every


vertex
Two adjacent vertices i
and h cannot get the
same color j. If one of the
two vertices is colored by
color j, then color j is
used.

3
ILP Model
• A drawback of this model is its symmetry (all colors
are equivalent).
• Another drawback is that its continuous relaxation is
weak:
• Example: consider G to be a complete graph
• the optimal solution value of the ILP is n (a different color
for each vertex), while
• the optimal solution of the continuous relaxation is
y1 = y2 = 1; xi1 = xi2 = 1/2,∀i ∈ V, and has value 2
Therefore the solution of the continuous relaxation can be
“far” from the optimal ILP solution.

4
Improving an ILP Model
• Equivalent ILP formulations are often not equivalent
with respect to their continuous relaxations.
• Recall: If Q1 and Q2 are two formulations of a
minimization problem with Q1⊂Q2, then the solutions
of their continuous relaxations satisfy: zC(Q1) ≥ zC(Q2).
In this case, Q1 dominates (is better than) Q2.
• If we have a better formulation, then, in the Branch
and Bound algorithm, more nodes can be killed.

5
Improving an ILP Model
• How can a formulation be improved?
• By adding to the formulation additional “useful”
constraints that reduce the feasible region but do not
eliminate any integer (optimal) solution
• By expressing the existing constraints in a “better”
way to reduce the feasible region without eliminating
any integer (optimal) solution

6
Improving an ILP Model
• Example: recall the Uncapacitated Facility Location
Problem:

7
Improving the Vertex Coloring Model
• Consider this example:

Constraints 𝑥𝑖𝑗 + 𝑥ℎ𝑗 ≤ 𝑦𝑗 𝑖, ℎ ∈ 𝐸, 𝑗 = 1, … , 𝑛 consider


pairs of adjacent vertices. However, we can consider
more than two adjacent vertices provided that they are
all pairwise adjacent. For example with three vertices:
𝑥𝑖𝑗 + 𝑥ℎ𝑗 + 𝑥𝑙𝑗 ≤ 𝑦𝑗 𝑖, ℎ ∈ 𝐸, ℎ, 𝑙 ∈ 𝐸, 𝑖, 𝑙 ∈ 𝐸, 𝑗 = 1, … , 𝑛
8
Improving the Vertex Coloring Model
• Extending this concept, we can consider any number
of pairwise adjacent vertices in G
• Clique of a graph G: subset of vertices K ⊆ V such
that E(K)={(i,j) : i,j ∈ K}, i.e., all pairs of vertices in K
are pairwise adjacent (connected by an edge in E)
• Maximal Clique: a clique K is maximal if and only if
there does not exist a clique K′ such that K ⊂ K′

9
Improved ILP for Vertex Coloring
𝑛

min 𝑦𝑗
𝑗=1
𝑛

𝑥𝑖𝑗 = 1 , 𝑖∈𝑉
𝑗=1

𝑥𝑖𝑗 ≤ 𝑦𝑗 , 𝐾 ∈ 𝒦, 𝑗 = 1, … , 𝑛
𝑖∈𝐾

𝑥𝑖𝑗 ∈ 0,1 , 𝑖 ∈ 𝑉, 𝑗 = 1, … , 𝑛
𝑦𝑗 ∈ 0,1 , 𝑗 = 1, … , 𝑛

𝒦 denotes the collection of all maximal cliques of G


10
Improved ILP for Vertex Coloring
• Consider the continuous relaxation of the improved model
and the previous example with G a complete graph:
• the optimal solution value of the ILP is n (a different color
for each vertex),
• the optimal solution of the continuous relaxation is also n.
• Therefore the solution of the continuous relaxation is
closer to the optimal ILP solution in this formulation.
• The drawback of symmetry is still present.
• The collection of all cliques (not only the maximal ones) has
size O(2𝑛 ), hence the number of constraints in the improved
ILP is exponential (O(𝑛2𝑛 ) constraints with 𝑛 = |𝑉|).
• The collection of maximal cliques has a smaller size but still
exponential O(3𝑛/3 ).
11
Alternative formulation
We can avoid the exponential number of constraints of
the improved formulation, but still obtain a better
formulation than the initial one by starting again from
the initial ILP model and replacing each constraint
𝑥𝑖𝑗 + 𝑥ℎ𝑗 ≤ 𝑦𝑗 , 𝑖, ℎ ∈ 𝐸, 𝑗 = 1, … , 𝑛
with constraints
𝑖∈𝐾 𝑥𝑖𝑗 ≤ 𝑦𝑗 , for a 𝑘 ∈ 𝒦: 𝑖, ℎ ∈ 𝐾, 𝑗 = 1, … , 𝑛

Duplicated constraints can then be removed.

12

You might also like