Let $N$ be the number of vertices of $G$ below.
Decision variables¶
Create a binary decision variable table $q$ of $N \times K$, where each vertex is painted with a
color
specified by a corresponding decision variable. When vertex $i$ is painted with the $j$-th color, the
binary variable in the $i$ row $j$ column of $q$ is $1$.
For example, when vertices $0$, $1$, and $2$ are painted with the $0$th color and vertices $3$, $4$,
and
$5$ are painted with the $1$st color, the variable table $q$ is as follows.
$q$ |
0th color |
1st color |
Vertex 0 |
1 |
0 |
Vertex 1 |
1 |
0 |
Vertex 2 |
1 |
0 |
Vertex 3 |
0 |
1 |
Vertex 4 |
0 |
1 |
Vertex 5 |
0 |
1 |
Objective function¶
Since the clique cover problem is to find one that satisfies the condition, No objective function is
considered.
Constraints¶
For $G$ to be covered by $K$ cliques according to $q$ and the corresponding coloring scheme, we need
the
following constraints.
- Condition 1 : Each vertex of $G$ is painted with exactly a single color.
- Condition 2: Vertices of the same color are always connected by an edge.
Condition 1 is the constraint that there is precisely one $1$ in each row, and we can express this
as:
$$
\sum_{j = 0}^{K-1} q_{i, j} = 1 \quad \text{for} \quad i \in \{0, 1, \ldots, N-1\}.
$$
Also, considering the contraposition of condition 2, condition 2 is rephrased as "$2$ vertices not
connected by an edge are not painted in the same color".
The condition can be written as:
$$
q_{u, j} q_{v, j} = 0 \quad \text{for} \quad (u, v) \notin E, \ j \in \{0, 1, \ldots, K - 1\}
$$
Here, $E$ is an edge set of $G$.