1. Introduction
A proper colouring of a graph
G assigns colours to the vertices so that adjacent vertices have different colours. Grunbaum [
1] introduced the notion of
star colouring as follows: a proper colouring of
G where every path on four vertices uses at least three colours is known as star colouring. We are interested in a version of star colouring, called
star bicolouring of bipartite graphs, in which the graph to be star coloured is a bipartite graph, and the two partitions (of the bipartite graph) do not share any colour in common.
Star bicolouring of bipartite graphs arises in the context of computing or approximating sparse Jacobian matrices of mappings of the form
efficiently in nonlinear optimisation and nonlinear equations solving [
2,
3,
4,
5,
6,
7,
8].
The input for star bicolouring is a bipartite graph
, where
L and
R are the two sets of vertices corresponding to the bipartition, and
is the set of edges. We will describe in
Section 2 the construction of this bipartite graph for approximating sparse Jacobian matrices. The goal is to assign a minimum number of colours to the vertices of the bipartite graph such that (i) the colouring is proper, and vertices connected by an edge have different colours; (ii) every path over four vertices uses at least three different colours; and (iii) the vertices in
L and the vertices in
R do not share a colour. Note that (iii) implies (ii).
Constraint (ii) is also referred to as the path colouring constraint. Without the path colouring constraint, two colours suffice to star bicolour any bipartite graph. With the path colouring constraint, the number of colours needed is large. Consider the complete bipartite graph . In any colouring that uses at most colours, there are some two vertices on each side in the bipartition that obtain the same colour. The path over these four vertices is not properly coloured. Thus the number of colours needed for star bicolouring is of the order as the number of nodes in the bipartite graph.
Related Work: An acyclic colouring of graph
G is a proper colouring in which every cycle uses at least three different colours. Grunbaum [
1] demonstrated that every planar graph can be acyclically coloured using at most nine colours. He conjectured that five colours are sufficient for the acyclic colouring of planar graphs, and Borodin [
9] later proved this conjecture. Kostochka and Melnikov [
10] showed that five colours are necessary for the acyclic colouring of bipartite planar graphs.
Grunbaum also introduced the concept of star colouring, a proper colouring where every path on four vertices uses at least three colours. Notably, any star colouring is also an acyclic colouring. This means that star colourings may require more colours than acyclic colourings. Limited results are available on star colourings of planar graphs. Note that star bicolouring, the problem considered here, has additional constraints: the graph is bipartite, and the colours used in the two partitions are different.
Albertson et al. [
11] demonstrated that 10–20 colours are sufficient for star colouring arbitrary planar graphs. Nesetril and Ossona de Mendez [
12] showed that any bipartite planar graph can be star coloured with 18 colours. They also showed that every planar graph can be star coloured with 30 colours. Additionally, Fertin et al. [
13] gave such an example for grid graphs of a size of at least 4 × 4, whereas Ramamurthi and Sanders [
14] provided examples of bipartite planar graphs that require five colours to be star coloured. They also showed that bipartite outerplanar graphs can be star coloured using five colours. It is NP-complete to determine if a planar bipartite graph can be star coloured using three colours [
11].
Upper bounds on the star chromatic number in terms of the maximum degree have been studied extensively. Albertson et al. [
11] showed an upper bound of
, where
k is the maximum degree sufficient for star colouring. For a maximum degree of at most three, they show that seven colours suffice for star colouring. For graphs with maximum average degrees of at most
, Bu et al. [
15] showed that the star chromatic number is at most four, five, and six, respectively. Fertin et al. [
13] showed that
colours suffice for star colouring, and they exhibited a graph for which
are needed.
Let us denote the minimum number of colours for star bicolouring of a bipartite graph
with
. The following general lower [
5,
16] and upper bounds are known.
The upper bound is evident, as one can always colour one side with a single colour, and the other side uses a different colour for each node. This bound is quite weak. Juedes and Jones [
5] gave an approximation algorithm for the star bicolouring problem. The algorithm works by calculating distance-2 independent sets, greedily, of vertices (from either
L or
R) containing a vertex with the highest degree and then assigning them all to the same colour class. The choice of independent sets from
L or
R is based on the average maximum degree in
. This algorithm has an approximation ratio of
and a time complexity of
, where
n is the number of vertices, and
m is the number of edges in the
G.
The bipartite graphs that typically arise in the context of the applications, described in the next section, are large but sparse. Several efficient heuristic methods that perform well in practice have been proposed over the years for the star bicolouring problem [
3,
5,
6,
8]. Studies have reported successive reductions in the number of colours required for the standardised set of test matrices such as the Harwell–Boeing collection [
17]. A lower bound on star colouring number is also a lower bound on the star bicolouring number (for bipartite graphs). The upper bounds computed using heuristic methods are still far from the lower bound in Equation (
1). Therefore, it is natural to develop stronger lower bounds for star bicolouring, and this motivates our study.
Contributions: The main contributions of this paper include a novel method to solve the star bicolouring problem and the derivation of new results for various bipartite graphs that arise in the field of numerical optimisation. We provide an exponentially sized integer linear program (ILP) whose optimal solution has value
and which uses the linear programming (LP) relaxation to compute a lower bound on
. The ILP is exponentially sized; therefore, we give a column generation method to solve the LP. The pricing problem to be solved is modelled as an ILP. We also give computationally efficient heuristic to solve the pricing problem. We use the method of iterative rounding [
18] to compute an upper bound on the star bichromatic number. The computational results indicate that our lower bound obtained using the column generation procedure is close to the upper bound computed using the iterative method in practice for sparse bipartite graphs. Our method is general and can easily be adapted to handle colouring constraints on other structures. For instance, acyclic colourings of bipartite graphs can be found using the approach presented here.
To the best of our knowledge, this is the first such formulation and computational study for the star bicolouring problem.
Results:We ran small-sized computational experiments that evaluate linear programming relaxation and an iterative rounding approach to determine the star bicolouring number of bipartite graphs. The details are in
Section 6.1. The algorithms were programmed in the GNU Octave and GLPK to solve the linear programming (LP) relaxation using column generation. The focus of the experiments was to assess (i) the effectiveness of column generation in computing lower bounds and to evaluate the effectiveness of the iterative rounding method to compute upper bounds for the star bicolouring number. The experiments used four types of graph families, and our results are summarised next.
Arrowhead Matrices: The diagonal entries were one, and the first row/column entries were set to one. The proposed method effectively computed good lower and upper bounds for the star bicolouring.
Random Sparse Matrices: The column generation procedure effectively determined tight lower bounds, and the iterative rounding method determined very good upper bounds for randomly generated sparse matrices (10 × 10, with an average of three nonzero entries per row).
Complete Bipartite Graphs: demonstrates the limitations of fractional colouring lower bounds in dense graphs. The iterative rounding method delivered reasonably good upper bounds in for the matrices tested despite the weak lower bound in Observation 1.
Harwell-Boeing Matrices: We tested the approach on three small matrices from the Harwell–Boeing collection: can-24, ibm32, and bcspwr01. The matrices have orders of 25 × 24, 24 × 32, and 24 × 39, respectively. For these matrices, we modified the iterative rounding approach. The running times for the Harwell–Boeing matrices were reasonable. However, the star bicolouring was not optimal.
We analysed the running time of the algorithms, comparing the time needed to solve the master problem versus the time needed to solve the pricing problems for both sparse and dense inputs. The column generation procedure was inefficient when many columns were added. This is because an ILP is solved to generate a column. Therefore, we proposed heuristic methods to improve efficiency, potentially sacrificing optimality for near-optimal solutions. The LP solution was not optimal, but the iterative rounding method still yielded good upper bounds for the star bicolouring number.
Structure: Section 2 discusses related research, with a brief introduction to the sparse Jacobian matrix determination problem.
Section 3,
Section 4 and
Section 5 present the integer linear program for star bicolouring bipartite graphs, the associated pricing subproblem, and the iterative rounding method for star bicolouring. In
Section 6, we present and analyse results from numerical experiments. This section also contains a heuristic algorithm for bicolouring.
Section 7 concludes the paper.
2. Sparse Jacobian Determination
In this section, we provide a brief introduction to an application area that gives rise to the star bicolouring problem considered in this paper.
Many algorithms in nonlinear optimisation and nonlinear equations require the knowledge of first- or higher-order derivatives of the underlying mathematical mappings. Except for very simple functions, the hand calculation of derivatives is an error-prone and tedious process. Fortunately, there are interesting and effective alternatives such as finite differencing and algorithmic differentiation (AD) [
19].
Let
F be a once continuously differentiable function
for which the Jacobian
evaluated at
is sparse. Assuming that the sparsity pattern of matrix
is available, one can define “seed matrices”
and
based on the given sparsity pattern and compute the products
using algorithmic differentiation. The compressed matrices
B and
C are obtained via
p forward passes and
q reverse passes of the AD, where each “pass” requires work proportional to a small constant multiple of the cost of evaluating the mapping
F at the given argument [
19]. For sparse problems numbers,
p and
q are usually much smaller than the matrix dimension
n and
m, respectively. In a
direct method, the nonzero entries of the Jacobian matrix can be recovered from the compressed matrices
B and
C by requiring that the seed matrices
S and
W be chosen such that, for each
, there is an index
k for which
The goal is to minimise the work, i.e., to obtain suitable matrices
S and
W with
minimised. Curtis, Powell, and Reid in a seminal paper [
4] provided the first row compression algorithm (a row compression is a one-sided compression where only the seed matrix
S is defined), which was later improved by Coleman and Moré [
2], who provided the first graph colouring interpretation of the compression problem. The classical arrowhead matrix example demonstrates that one-sided compression may not yield the full exploitation of sparsity. Hossain and Steihaug [
8] and Coleman and Verma [
3] independently proposed techniques for combined column and row compression for the sparse Jacobian determination problem. The following bicolouring formulation was provided in [
8]. Let
be a matrix with a sparsity pattern identical to the Jacobian
J. Define bipartite graph
where
L and
R are the sets of vertices corresponding to the columns and rows of
A, respectively, and
E is the set of edges between vertices in
and
such that
if and only if
. Mapping
is a
bicolouring [
8] if the following conditions are satisfied:
- 1.
implies that .
- 2.
The set of colours used on vertices in L and R are disjoint, i.e., for indices i and j with and .
- 3.
Every path in uses at least three distinct colours.
The minimum bicolouring of
is a
bicolouring with the sum
minimised. Determining the Jacobian matrix
J directly from the products
and
for appropriate seed matrices
and
with
minimized has been shown to be equivalent to the minimum bicolouring of the bipartite graph
[
8].
The
bicolouring problem introduced above is also referred to as star bicolouring in the literature. The bicolouring formulation of [
3,
5,
6] defined a “neutral” colour to indicate that the edges incident on vertices coloured with the neutral colour had already been determined by the “positive” colours. Ref. [
8] showed that such neutral or redundant colours in a
bicolouring can be avoided altogether by computing a
complete direct cover [
8]. For a comprehensive introduction to the star bicolouring and related colouring problems arising in the sparse Jacobian matrix determination problem, we refer to the SIAM Review paper [
6].
An Illustrative Example
To illustrate the main ideas in our graph colouring formulation of the sparse Jacobian matrix determination, we refer to
Figure 1, where the matrix shown in (a) has six columns and seven rows. The corresponding bipartite graph associated with its sparsity pattern shown in (b) has
vertices for the columns and
vertices for the rows. Consider the following subsets of rows and columns:
where each subset (of rows/columns) is assigned a different colour, say,
colour1, colour2, colour3, colour4, colour0, reading left to right, respectively. It can be verified that this is a valid star bicolouring. Furthermore,
colour0 is redundant in that all the nonzero unknowns of the Jacobian are determined from the remaining colour groups. We construct the seed matrices
S and
W,
from the colouring information, and we compute the respective compressed Jacobian.
As commented earlier, we have omitted the colouring information from
colour0 in the seed matrix
W. It can be directly verified that each nonzero unknown appears unperturbed as an entry in one of the two compressed matrices. Hence, the Jacobian is fully determined from the two compressed matrices with a prior knowledge of the sparsity pattern. The example matrix used here was originally proposed by Stanley Eisenstat and requires at least six Forward AD Passes in a one-sided compression, since the associated column intersection graph is a complete graph on six vertices [
8]. Therefore, the bicolouring method saves two AD Passes.
For column compression (of
A or
), a satisfactory lower bound on the number of matrix–vector products (or AD passes) is given by
, where
denotes the number of nonzero entries in row
i. An easily computed lower bound on the number of “positive” colours has been derived in [
16]
by using a consistency argument in solving the system of linear equations defined by the products
. Juedes and Jones derive the same bound using a graph theoretic argument [
5]. The primary motivation for the current work is to derive a formal framework for the lower and upper bounds for the star bicolouring problem. Analogous to the work of [
7], our ILP formulation of the star bicolouring does not distinguish between colours to keep the integer linear program simple.
3. ILP for Star Bicolouring
We used the set cover formulation for the colouring problem, with additional constraints on paths. For
, let
be a binary variable. If
is 1, then all the vertices in
s have the same colour. The following is an integer programming formulation for the star colouring problem. Denote as
P the set of length-four paths in graph
G and as
the power set.
The first two constraints are the ‘proper’ colouring constraints. They state that each node must be assigned a unique colour, and the two sides of the bipartite graph do not share a colour. The first two equality constraints also ensure that the sets chosen as the solution to the integer program above are a partition of the vertex set. The last constraint ensures that each path has at least three colours. To see this, suppose for the sake of contradiction that some path p is not properly coloured, but the last constraint is satisfied for path p. There are at least three sets that have empty intersection with path p. Sets do not have a common intersection pairwise. Therefore, at least three nodes in p obtain distinct colours. If we drop the last set of integrality constraints in the ILP above, then the problem is referred to as the fractional star colouring problem. The optimum value to the fractional star colouring instance G, denoted as , is a lower bound on . We compute using column generation. The ILP formulation above is exponential in the size of the graph.
We examine the integrality gap of this formulation next. For a bipartite graph G, the ratio is known as the integrality gap for instance G. The integrality gap for star bicolouring is the maximum integrality gap over all the inputs, which are . We note that the integraliy gap of the formulation is unbounded. Let be the complete bipartite graph on vertices, where the two partitions are of the same size n.
Observation: 1. The integrality gap for is —more precisely,
Note that if a total of
colours are used; then, each side in the bipartition has some two vertices of the same colour. This means that there is a path of over four vertices that is two-coloured. Hence,
Next, we give a feasible solution to the LP relaxation with an objective value of four. The size of the power sets
and
is
each. Each vertex
belongs to
subsets in
. Consider a fractional solution in which for each
,
For each vertex
we have,
The same holds for
.
So, the first two constraints are satisfied by this solution. For each path p, there are two vertices in L and two in The subsets of that intersect path p can be divided into three groups: ones that contain exactly one of the two vertices from the path and ones that contain exactly two vertices in that path. The number of each such subset is . Therefore, the total number of subsets of L intersecting p is Similar reasoning holds for R. Therefore, So, the solution is feasible. The value of the objective function is
4. Column Generation—Pricing Problem
Gilmore and Gomory [
20] proposed a column generation technique to solve problems with a large number of variables/columns. The column generation algorithm is effective when the columns corresponding to variables are combinatorial objects such as cycles, tours, paths, and subtrees. The idea is to start with a few columns that give a feasible solution that is not necessarily optimal. The primal with a small number of columns is known as the restricted master problem (RMP). A new column is generated by solving a pricing subproblem instead of searching for possible columns not present in the RMP. The addition of the new column (with a negative reduced cost) improves the value of the solution to the primal problem. The pricing subproblem is an optimisation problem. At times, it is a linear programming problem [
21]. The pricing subproblem aims to find a column with a negative reduced cost. This is similar to the pricing step of the simplex method for finding a nonbasic variable with a negative reduced cost. If the minimum reduced cost is non-negative, the algorithm halts; otherwise, the new column is added to the restricted master problem, and the process iterates.
The goal of the pricing problem is to find a new column for the LP that, when added to the current solution, will reduce the objective function value. In this case, the pricing problem is formulated as an integer linear program (ILP). This ILP seeks to find a new set of vertices to colour with a single colour that satisfies the star bicolouring constraints and that has a negative reduced cost.
We compute
by introducing columns with negative reduced costs in the basis one at a time. The column insertion/exchange process is implicit in the simplex method. It was noted by Dantzig and Wolfe that a separate optimization problem (the pricing problem) can be solved to determine the column with a negative reduced cost [
21]. Let
be the size of the two partitions, and let
be the number of paths in the bipartite graph. Then, a column
C of incidence matrix is a 0/1 vector of length
. First,
components of
C correspond to vertices. They identify the subset of vertices
s that are assigned the same colour. There are two entries
such that
and
cannot simultaneously be 1. Otherwise, the two sides share a colour. The remaining
p entries in the column indicate whether path
contains one of the nodes in the set
s. Let
be the vector of dual values to the LP relaxation above. The pricing problem can now be cast as the following ILP.
refers to the
path below.
If the optimal solution to the ILP above has a value strictly larger than 1, then introducing a column, given by the optimal solution to the pricing problem, in the existing basis will lead to an improved solution for the master problem.