Next Article in Journal
Parallel PSO for Efficient Neural Network Training Using GPGPU and Apache Spark in Edge Computing Sets
Previous Article in Journal
Integrating IoMT and AI for Proactive Healthcare: Predictive Models and Emotion Detection in Neurodegenerative Diseases
Previous Article in Special Issue
Exploring Clique Transversal Variants on Distance-Hereditary Graphs: Computational Insights and Algorithmic Approaches
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Star Bicolouring of Bipartite Graphs

1
Department of Math and Computer Science, University of Lethbridge, Lethbridge, AB T1K 3M4, Canada
2
Department of Computer Science, University of Northern British Columbia, Prince George, BC V2N 4Z9, Canada
3
Department of Computer Science, Indian Institute of Technology Bhilai, Durg 491001, Chhattisgarh, India
*
Author to whom correspondence should be addressed.
Algorithms 2024, 17(9), 377; https://doi.org/10.3390/a17090377
Submission received: 26 June 2024 / Revised: 15 August 2024 / Accepted: 19 August 2024 / Published: 24 August 2024

Abstract

:
We give an integer linear program formulation for the star bicolouring of bipartite graphs. We develop a column generation method to solve the linear programming relaxation to obtain a lower bound for the minimum number of colours needed. We determine the star bicolouring using the iterative rounding method. We give computational results on arrowhead matrices, sparse random matrices, complete bipartite graphs, and matrices from the Harwell–Boeing collection. The findings demonstrate that the proposed method effectively establishes lower and upper bounds for the minimum number of colours needed for a star bicolouring of bipartite graphs, particularly for sparse bipartite graphs.

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 f : R n R n efficiently in nonlinear optimisation and nonlinear equations solving [2,3,4,5,6,7,8].
The input for star bicolouring is a bipartite graph G = ( L R , E ) , where L and R are the two sets of vertices corresponding to the bipartition, and E L × R 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 K n , n . In any colouring that uses at most n 1 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 k 2 k + 2 , 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 26 / 11 , 18 / 7 , 8 / 3 , Bu et al. [15] showed that the star chromatic number is at most four, five, and six, respectively. Fertin et al. [13] showed that k 3 / 2 colours suffice for star colouring, and they exhibited a graph for which Ω ( k 3 / log n ) are needed.
Let us denote the minimum number of colours for star bicolouring of a bipartite graph G = ( L , R , E ) with χ s ( G ) . The following general lower [5,16] and upper bounds are known.
| E | max { | L | , | R | } χ s ( G ) min { | L | , | R | } + 1
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 L , R . This algorithm has an approximation ratio of O ( n 2 / 3 ) and a time complexity of O ( m 2 n ) , 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 χ s ( G ) and which uses the linear programming (LP) relaxation to compute a lower bound on χ s ( G ) . 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: K n , n 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 F : R n R m for which the Jacobian F evaluated at x R n is sparse. Assuming that the sparsity pattern of matrix J F ( x ) is available, one can define “seed matrices” S { 0 , 1 } n × p and W { 0 , 1 } m × q based on the given sparsity pattern and compute the products
B = J S   and   C = W T J
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 J i j 0 , there is an index k for which
J i j = B i k   or   J i j = C k j .
The goal is to minimise the work, i.e., to obtain suitable matrices S and W with ( p + q ) 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 A { 0 , 1 } m × n be a matrix with a sparsity pattern identical to the Jacobian J. Define bipartite graph
G ( A ) = ( L , R , E ) ,
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 u i L and v j R such that { u i , v j } E if and only if a i j 0 . Mapping ϕ : L R { 1 , , ( p + q ) } is a ( p + q )  bicolouring [8] if the following conditions are satisfied:
1.
{ u i , v j } E implies that ϕ ( u i ) ϕ ( v j ) .
2.
The set of colours used on vertices in L and R are disjoint, i.e., for indices i and j with u i L and v j R ,   ϕ ( u i ) ϕ ( v j ) .
3.
Every path u i v j u k v l in G ( A ) uses at least three distinct colours.
The minimum bicolouring of G ( A ) is a ( p + q ) bicolouring with the sum ( p + q ) minimised. Determining the Jacobian matrix J directly from the products J S and W J for appropriate seed matrices S { 0 , 1 } n × p and W { 0 , 1 } m × q with ( p + q ) minimized has been shown to be equivalent to the minimum bicolouring of the bipartite graph G ( A ) [8].
The ( p + q ) 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 ( p + q ) 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 | L | = 6 vertices for the columns and | R | = 7 vertices for the rows. Consider the following subsets of rows and columns:
Column   Groups Row   Groups 1 , 4 , 2 , 5 , 3 , 6 1 , 2 , 3 , 4 , 5 , 6 , 7
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,
S = 1 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1   and   W = 1 1 1 0 0 0 0
from the colouring information, and we compute the respective compressed Jacobian.
B = J S = a 11 + a 14 0 0 0 a 22 + a 25 0 0 0 a 33 + a 36 a 41 a 42 a 43 a 51 a 55 a 56 a 64 a 62 a 66 a 74 a 75 a 73 , C = W J = a 11 a 22 a 33 a 14 a 25 a 36
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 ), a satisfactory lower bound on the number of matrix–vector products (or AD passes) is given by max i ρ i , where ρ i 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] n n z max { m , n } by using a consistency argument in solving the system of linear equations defined by the products B = J S   and   C = W J . 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 s L , R , let x s be a binary variable. If x s 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 P ( · ) the power set.
min a P ( L ) x a + b P ( R ) x b a P ( L ) : v a x a = 1 v L b P ( R ) : v b x b = 1 v R s p ϕ x s 3 p P x s { 0 , 1 } s P ( L ) , P ( R ) .
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 a , b , c that have empty intersection with path p. Sets a , b , c 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 χ f s , is a lower bound on χ s ( G ) . We compute χ f s 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 g ( G ) = χ s ( G ) χ f s ( G ) 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 max G g ( G ) . We note that the integraliy gap of the formulation is unbounded. Let K n , n be the complete bipartite graph on 2 n vertices, where the two partitions are of the same size n.
Observation: 1.
The integrality gap for K n , n is O ( n ) —more precisely, g ( K n , n ) n / 4 .
Note that if a total of n 1 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, χ ( s ) ( G ) n . Next, we give a feasible solution to the LP relaxation with an objective value of four. The size of the power sets P ( L ) and P ( R ) is 2 n each. Each vertex v L ( R ) belongs to 2 n 1 subsets in P ( L ) ( P ( R ) ) . Consider a fractional solution in which for each s P ( L ) P ( R ) , x s = 2 / 2 n . For each vertex v L we have,
s P ( L ) : v s x s = 2 n 1 2 / 2 n = 1 .
The same holds for v R .
So, the first two constraints are satisfied by this solution. For each path p, there are two vertices in L and two in R . The subsets of L ( R ) 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 2 n 2 . Therefore, the total number of subsets of L intersecting p is 3 2 n 2 . Similar reasoning holds for R. Therefore, s : s p ϕ x s 2 / 2 n ( 6 2 n 2 ) = 3 . So, the solution x s = 2 / 2 n is feasible. The value of the objective function is 2 2 n 2 / 2 n = 4 .

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 χ f s 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 r , c be the size of the two partitions, and let p = | P | be the number of paths in the bipartite graph. Then, a column C of incidence matrix is a 0/1 vector of length r + c + p . First, r + c components of C correspond to vertices. They identify the subset of vertices s that are assigned the same colour. There are two entries i , j such that 1 i r and r + 1 j r + c cannot simultaneously be 1. Otherwise, the two sides share a colour. The remaining p entries in the column indicate whether path P i 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. P i refers to the i t h path below.
max i = 1 r + c + p π i x i
x i + x j 1 i [ 1 r ] ,   j [ r + 1 r + c ]
x r + c + i j P i x j i [ 1 p ]
x j x r + c + i j P i
x i { 0 , 1 } i [ 1 r + c + p ]
If the optimal solution x 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.

5. Iterative Rounding for Star Bicolouring

We used iterative rounding to convert the fractional colouring into an integral colouring. The iterative rounding technique has been used widely to give approximation algorithms for a variety of problems (see [18]). In each iteration, we pick a variable, one with the largest fractional value, and set it to 1, as shown in the pseudo-code below:
1.
Solve the LP relaxation using column generation.
2.
If all the variables are integral, then GOTO END.
3.
Let x be the variable with the largest fractional value. Set x = 1 . This can be done by either addition of a constraint in the basis or by changing the lower bound on x to 1. GOTO Step 1.
4.
END.
The number of iterations that column generation is called in Step 1 is bounded by the number of subsets. In a subsequent section, we will examine another heuristic for choosing the variable to round in Step 3.

6. Computational Results

All computations were carried on an AMD Athlon (TM) II X4 630 2.8 GHz quad-core CPU with 4 GB of memory, running x86-64 GNU/Linux (AMD: Santa Clara, CA, USA). The proof of concept code was written in GNU Octave 3.8.1 and used GLPK 4.52 to solve the LP and the Mixed Integer Linear Program (MILP) subproblems. The code is not the most optimized in the sense that the master problem was solved using a call to glpk after the addition of a column. The code can be further optimized for production systems. In the tables to follow, UB refers to the integral colouring constructed using iterative rounding. LB refers to the the optimal solution χ f s to the master problem. The number of rows (columns) in a matrix is referred to by r(c). The number of nonzeros in a matrix is denoted by ‘nnz’. ‘Paths’ denotes the number of paths over four vertices in the bipartite graph. The bipartite graphs themselves are specified by a matrix M. The rows and columns of M correspond to the vertices, and nonzero entries correspond to edges. The bipartite graphs that we consider need not be planar.

6.1. MILP for the Pricing Problem

In this section, we report the lower and the upper bounds for some families of bipartite graphs. We consider the graphs arising from arrowhead matrices, sparse matrices, and with a constant number of nonzeros in each row. Our goal is to present evidence that the column generation procedure is effective at computing good lower and upper bounds on the star chromatic number for sparse bipartite graphs. We used existing solvers (LP, MILP) available in Octave GLPK, and we did not address efficient implementation of the column generation procedure.

6.1.1. Arrowhead Matrices

Arrowhead matrices are defined as matrices with entries in the main diagonal, the first row, and the first column is 1. The table below shows the results for arrowhead matrices of small orders. The minimum number of colours required for an arrowhead matrix is four.
OrderUBLBrcnnznnz/max(r,c)Paths
23322421
3533372.33338
443.333344102.521
553.333355132.640
653.400066162.666665
753.440077192.714296
853.466788222.75133
973.476299252.7777176
1053.50001010282.8225
1163.50001111312.818280

6.1.2. Random Sparse Matrices

We considered random matrices of the order 10 × 10 with three nonzero entries in each row on average. In Octave notation, the matrix is generated as M = 3/10*ones(10,10) > rand(10,10).
InstanceUBLBrcnnznnz/(r+c)Paths
173.36671010292.9145
273.42271010333.3165
353.33331010212.156
483.40001010292.9145
593.41671010272.7132
673.41271010272.7131
773.33331010272.7128
8113.63331010424.2442
993.46351010343.4264
1073.41671010343.4213

6.1.3. Complete Bipartite Graphs

Here, we study the complete bipartite graphs. As expected, the fractional colouring lower bound is quite weak for dense graphs. But, the matrices that we are interested in are sparse. The iterative rounding procedure generated a solution worse then the trivial upper bound of n + 1 . The colouring generated contains n + 2 colours in all the instances considered below. As K n , n requires at least n colours, a colouring number of n + 2 is ‘quite good’ from an approximation point of view.
OrderUBLBrcnnznnz/max(r,c)Paths
23322421
35333939
463.33334416436
573.333355255100
683.500066366225
793.500077497441

6.2. Heuristic for the Pricing Problem

Recall that the vertices in L are indexed as [ 1 r ] , and the vertices in R are indexed as [ r + 1 n ] , where n is the total number of vertices in the bipartite graph. There are p paths indexed as [ 1 p ] . The solution to the pricing problem is a vector y such that π y is maximum, and y does not contain any two vertices from L and R. The dual values π 1 , π 2 , , π n are unconstrained, they can be positive or negative, as the corresponding primal constraints are held at equality in any feasible solution. The dual values π n + 1 , , π n + p are constrained to be positive. Variables y n + i come out to 1 if any vertex on path i is chosen. Stated otherwise, if path i contains vertices a , b , c , d , then y n + i is 1 if any of y a , y b , y c , y d are 1. Without loss of generality, assume that we are working with set L. Then y c , y d are 0. The following bounds on y n + i are immediate for an integral y. Recall that P i refers to the i t h path.
1 / 2 ( y a + y b ) y n + i ( y a + y b )
Our objective i = 1 n + p π i y i comes out to
i = 1 n π i y i + i = 1 p 1 / 2 ( j P i y j ) π n + i
Rearranging the terms, we obtain
i = 1 n y i ( π i + 1 / 2 j : i P j π n + j ) .
Our heuristic is to find the set in L or R using the expression (7). In each iteration of the pricing problem, we choose all nodes i for which π i + 1 / 2 j : i P j π n + j > 0 , with the rationale being, if y i is 1, then the minimum contribution due to each vertex to our objective is positive ( π i + 1 / 2 j : i P j π n + j ) .
The pricing heuristic takes O ( n + p ) time, where n is the number of nodes, and p is the number of paths. The number of paths can be considerably more than the number of vertices. It is possible to reduce the running time of the heuristic to O ( n ) by dropping off the computation of the term 1 / 2 j : i P j π j . This is equivalent to choosing nodes with positive dual values. However this bound is not effective, and even for Arrowhead matrices of order n, the upper bound computed using iterative rounding is n + 1 .
Next, we present simulation results when the pricing problem is solved heuristically. We report only on the order of the growth of the running times and the integral colouring constructed using the iterative rounding approach. The fractional numbers are not meaningful, as the pricing problem is not solved exactly, though they are close to the optimal LP solution χ f s .

6.2.1. Arrowhead Matrices

As noted before, the minimum number of colours required for arrowhead matrices is four. When the pricing problem was being solved exactly, the iterative colouring number was at times larger than five. The iterative colouring number is smaller here.
orderUBfractionalrcnnznnz/max(r,c)#pathsr (A)c (A)
45544102.5212920
553.650055132.6405038
65566162.6666657744
745.142977192.71429611047
853.892388222.7513314975
95699252.777717619489
1054.14941010282.8225245108
1154.76341111312.818280302117
1554.21681515432.8666560590232
The profile data for an arrowhead matrix of order 15 × 15 are
#Function AttrTime (s)Calls
31glpk10.136162
15colgen0.1515
16glpk0.074162
35pricing0.047152
The glpk values are the calls made to solve the master problem in function colgen. The pricing subproblem was solved in function pricing. The procedure is quite efficient compared to the MILP approach for solving the pricing subproblem.

6.2.2. Sparse Random Matrices

For comparison with earlier data, we considered sparse matrices of order 10 × 10 with three nonzeros in each row on average. The matrix was generated as earlier: M = 3/10*ones(10,10) > rand(10,10).
idUBfractionalrcnnznnz/max(r,c)Pathsr (A)c (A)
193.92581010292.915117199
295.8500101030316818888
3104.79291010323.2189209116
474.49501010252.511013094
593.99931010292.9131151112
684.42091010272.7117137105
71291010393.9349369102
8113.88931010302161181101
985.10641010292.914716795
The profile data for a random matrix of order 20 × 20 , for a total of 11 runs, are
#Function AttrTime (s)Calls
31glpk247.8622985
16colgen2.95299
17glpk1.0642985
On average, a 20 × 20 random sparse matrix can be coloured in under 25 s.

6.2.3. Dense Matrices

We considered K n , n for the varying order. The iterative colouring number and the matrix characteristics are listed below.
OrderUBfractionalrcnnznnz/max(r,c)Pathsr (A)c (A)
45544164364419
575.50005525510011020
695.40006636622523740
71177749744145542
8988864878480041
9115.5250998191296131470
The profile data for K 9 , 9 are below.
#Function AttrTime (s)Calls
31glpk38.63556
15colgen0.1163

6.2.4. HB Collection

We also tested our approach on three small-sized matrices from the Harwell–Boeing collection. For matrices with orders larger than 25 × 25 , we set all the variables with maximum fractional value to 1 as opposed to setting a single variable with maximum fractional value to 1 in each iteration. This was done to reduce the number of calls to the column generation procedure colgen. It is to be noted that iterative rounding still satisfied the first n equality constraints in the master problem. No two sets that were rounded up to 1 share a node in any iteration. We did not worry about this intersection when a single variable was rounded to 1 in each iteration.
MatrixUBrcnnznnz/max(r,c)#pathsr (A)c (A)time (s)
can-242524241606.666640384086428447.829
ibm322432321263.937513641428757679.309
bcspwr012439391313.35897568341170437.11
The running times are reasonable, but the quality of colouring leaves room for improvement.

6.3. Heuristic for Pricing and Variable Choice

In the textbook description of the iterative rounding algorithm, the variable with the largest fractional value is chosen to be promoted to 1. Other heuristic choices may work well depending on the problem structure. Here, we studied the performance of one such natural heuristic. For each vertex v, let w ( v ) be the number of paths of length four that contain v. We chose the variable x s such that, for the corresponding set S, the total weight v S w ( v ) would be maximum over all fractional x s . The heuristic does not change the order of the running time of the algorithm. In fact, it takes considerably less time to compute the colouring, as the heuristic tries to ensure that a number of constraints are satisfied in each iteration. This reduces the number of iterations in practice.

6.3.1. Arrowhead Matrices

As shown below, the combined heuristics discovered near-optimal colouring for arrowhead matrices. The running time was considerably reduced.
orderUBfractionalrcnnznnz/max(r,c)Pathsr (A)c (A)time (s)
45444102.52129170.052947
563.941255132.64050330.068423
654.585766162.66666577470.113911
756.555677192.712496110530.126811
844.816288222.75133149690.20742
954.888999252.77771761941130.862311
1054.55941010282.82252451131.07937
1154.84951111312.81812803021171.16417
1554.21681515432.866656059023217.7683

6.3.2. K n , n

The combined heuristic discovered the optimal solution for the complete bipartite graphs listed below. It should be noted that with the textbook rounding scheme, the algorithm did not lead to optimal colouring for K n , n considered below [18].
OrderUBfractionalrcnnznnz/max(r,c)Pathsr (A)c (A)time (s)
455441643644120.026814
56655255100110140.0416431
67766366225237180.0516698
78877497441455200.0581229
89988648784800240.100278
910109981912961314260.195343
15161615152251511,02511,055446.91999

6.3.3. Sparse Random Matrices

We considered sparse matrices of the order 20 × 20 with three nonzeros in each row on average. Each matrix was generated as earlier: M = 3/10*ones(15,15) > rand(15,15). The table below shows that the heuristics were relatively faster and generated better colourings compared to the standard rounding scheme.
idUBfractionalrcnnznnz/max(r,c)Pathsr (A)c (A)time (s)
116182020633.1562466428322.8783
214202020663.347251235331.3333
319202020743.775979940240.2153
413182020512.552763162806.61416
51711.40292020613.0542646629416.4601
614202020613.0538642635219.4864
718182020703.568672627212.6688
813202020623.144348333914.8033
913202020592.9536440434721.3914
1018202020592.9547351330721.0117
1114182020592.9537241229615.4549

6.3.4. HB Collection

For the three small matrices from the Harwell–Boeing collection, we saw a reduction in the number of colours required for one matrix and an increase for the other. The running times were more or less the same as previously.
MatrixUBrcnnznnz/max(r,c)Pathsr (A)c (A)time (s)
can-242524241606.6666403840860408495.198
ibm321932321263.937513641428679486.722
bcspwr012939391313.35897568341040742.322

7. Conclusions

Determining the minimum number of colours required for star bicolouring a bipartite graph is important in numerical optimisation and in solving nonlinear equations. Specifically, minimising the colours in the star bicolouring of a bipartite graph is equivalent to minimising the computational work in determining the Jacobian matrix. We provided an exponentially sized ILP formulation to determine a lower bound on the minimum number of colours needed for star bicolouring. Due to the exponential size of the ILP, a column generation method was employed to solve the LP relaxation. The column with a negative reduced cost was determined by solving an ILP. We used an iterative rounding technique to convert a fractional star bicolouring solution to an integral one. This approach involved repeatedly solving the LP relaxation and rounding fractional variables to integer values until a feasible integral solution was obtained. We evaluated the approach on various types of bipartite graphs: arrowhead matrices, sparse random matrices, complete bipartite graphs, and matrices from the Harwell–Boeing collection. The results suggest that for sparse bipartite graphs, the proposed method effectively determines lower and upper bounds for the minimum number of colours. The computational cost of solving the pricing problem using ILP is high. However, this is not a limiting factor, as the star bicolouring was computed only once under the assumption that the Jacobian did not change. More efficient, potentially combinatorial or heuristic approaches for solving the pricing problem will be explored in future work.

Author Contributions

Conceptualisation, D.G., S.H. and R.R.S.; methodology, D.G., S.H. and R.R.S.; visualisation, D.G., S.H. and R.R.S.; investigation, D.G., S.H. and R.R.S.; writing—original draft preparation, D.G., S.H. and R.R.S.; writing—review and editing, D.G., S.H. and R.R.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported in part by Natural Sciences and Engineering Research Council of Canada (NSERC) Discovery Grants.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author/s.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Grünbaum, B. Acyclic colourings of planar graphs. Isr. J. Math. 1973, 14, 390–408. [Google Scholar] [CrossRef]
  2. Coleman, T.F.; Moré, J.J. Estimation of sparse Jacobian matrices and graph colouring problems. SIAM J. Numer. Anal. 1983, 20, 187–209. [Google Scholar] [CrossRef]
  3. Coleman, T.F.; Verma, A. The efficient computation of sparse Jacobian matrices using automatic differentiation. SIAM J. Sci. Comput. 1998, 19, 1210–1233. [Google Scholar] [CrossRef]
  4. Curtis, A.R.; Powell, M.J.D.; Reid, J.K. On the estimation of sparse Jacobian matrices. J. Inst. Math. Appl. 1974, 13, 117–119. [Google Scholar] [CrossRef]
  5. Juedes, D.; Jones, J. colouring Jacobians revisited: A new algorithm for star and acyclic bicolouring. Optim. Methods Softw. 2012, 27, 295–309. [Google Scholar] [CrossRef]
  6. Gebremedhin, A.H.; Manne, F.; Pothen, A. What colour Is Your Jacobian? Graph colouring for Computing Derivatives. SIAM Rev. 2005, 47, 629–705. [Google Scholar] [CrossRef]
  7. Goyal, M.; Hossain, S. Bi-Directional Determination of Sparse Jacobian Matrices: Approaches and Algorithms. Electron. Notes Discret. Math. 2006, 25, 73–80. [Google Scholar] [CrossRef]
  8. Hossain, A.S.; Steihaug, T. Computing a sparse Jacobian matrix by rows and columns. Optim. Methods Softw. 1998, 10, 33–48. [Google Scholar] [CrossRef]
  9. Borodin, O. On acyclic colourings of planar graphs. Discret. Math. 1979, 25, 211–236. [Google Scholar] [CrossRef]
  10. Kostochka, A.; Mel’nikov, L. Note to the paper of Grünbaum on acyclic colourings. Discret. Math. 1976, 14, 403–406. [Google Scholar] [CrossRef]
  11. Albertson, M.O.; Chappell, G.G.; Kierstead, H.A.; Kündgen, A.; Ramamurthi, R. colouring with no 2-coloured p4’s. Electron. J. Combin 2004, 11, R26. [Google Scholar] [CrossRef] [PubMed]
  12. Nesetril, J.; Mendez, P. Colourings and Homomorphisms of Minor Closed Classes; Springer: Berlin/Heidelberg, Germany, 2003. [Google Scholar]
  13. Fertin, G.; Raspaud, A.; Reed, B. Star colouring of graphs. J. Graph Theory 2004, 47, 163–182. [Google Scholar] [CrossRef]
  14. Ramamurthi, R.; Sanders, G. Star colouring outerplanar bipartite graphs. Discuss. Math. Graph Theory 2019, 39, 899–908. [Google Scholar] [CrossRef]
  15. Bu, Y.; Cranston, D.W.; Montassier, M.; Raspaud, A.; Wang, W. Star colouring of sparse graphs. J. Graph Theory 2009, 62, 201–219. [Google Scholar] [CrossRef]
  16. Hossain, A.S. On the Computation of Sparse Jacobian Matrices and Newton Steps. Ph.D. Thesis, University of Bergen, Bergen, Norway, 1998. [Google Scholar]
  17. Duff, I.S.; Grimes, R.G.; Lewis, J.G. Sparse matrix test problems. ACM Trans. Math. Softw. 1989, 15, 1–14. [Google Scholar] [CrossRef]
  18. Lau, L.; Ravi, R.; Singh, M. Iterative Methods in Combinatorial Optimization; Cambridge University Press: Cambridge, UK, 2011. [Google Scholar]
  19. Griewank, A.; Walther, A. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd ed.; SIAM: Philadelphia, PA, USA, 2008. [Google Scholar]
  20. Gilmore, P.C.; Gomory, R.E. A linear programming approach to the cutting-stock problem. Oper. Res. 1961, 9, 849–859. [Google Scholar] [CrossRef]
  21. Dantzig, G.B.; Wolfe, P. Decomposition principle for linear programs. Oper. Res. 1960, 8, 101–111. [Google Scholar] [CrossRef]
Figure 1. (a) An example sparse matrix. (b) Associated bipartite graph.
Figure 1. (a) An example sparse matrix. (b) Associated bipartite graph.
Algorithms 17 00377 g001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gaur, D.; Hossain, S.; Singh, R.R. Star Bicolouring of Bipartite Graphs. Algorithms 2024, 17, 377. https://doi.org/10.3390/a17090377

AMA Style

Gaur D, Hossain S, Singh RR. Star Bicolouring of Bipartite Graphs. Algorithms. 2024; 17(9):377. https://doi.org/10.3390/a17090377

Chicago/Turabian Style

Gaur, Daya, Shahadat Hossain, and Rishi Ranjan Singh. 2024. "Star Bicolouring of Bipartite Graphs" Algorithms 17, no. 9: 377. https://doi.org/10.3390/a17090377

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop