The maximum happy induced subgraph problem: Bounds and algorithms
Introduction
Given a simple graph , the well-known graph colouring problem seeks an assignment of colours to vertices such that pairs of adjacent vertices are allocated to different colours, while the number of colours being used across the graph is minimised. In operational research and related fields, graph colouring is often used to model situations where a set of conflicting entities such as tasks, events, or people need to be efficiently allocated to a limited set of resources. Examples include school and university timetabling, sports scheduling, frequency assignment, compiler register allocation, and the construction of seating plans (Lewis, 2016).
In the past five years or so, interest has also been growing in a different type of graph colouring problem in which related vertices are required to be assigned to the same colour as one another. This can have uses in areas such as social network analysis, where a suitable assignment of colours can help to identify communities of closely related individuals (Dev, 2016), or in cluster analysis, where a set of objects (vertices) need to be partitioned such that similar objects are assigned to same group (colour) as one another (Everitt et al., 2011).
In a 2015 paper, Li and Zhang (2015) introduced a related concept known as vertex “happiness”, defined as follows: Definition 1 Let be a simple graph, and let be a colouring of all vertices in G. A vertex is happy if for all ; else it is unhappy.
In their research, Li and Zhang consider graphs in which a subset of the vertices have been precoloured. They then introduce the so-called maximum happy vertices (MHV) problem, which involves allocating colours to the remaining vertices such that the number of happy vertices in the graph is maximised. A practical application of this problem might occur when we have a set of people, some of whom have been preassigned to groups (colours), and we want to assign the remaining people to these groups such that the number of happy people is maximised. This could occur when choosing groups for a team building exercise or when assigning guests to shared bedrooms at a hotel. Li and Zhang have shown that the MHV problem is NP-hard in general, although it is polynomially solvable for graphs using fewer than three colours (Li and Zhang, 2015). It is now known that the problem is also polynomially solvable for acyclic graphs, but that it remains NP-hard for bipartite graphs and split graphs (Aravind et al., 2016, Aravind et al., 2017). Lewis et al. (2019) have also developed a number of upper and lower bounds for this problem, together with methods for breaking up problems into smaller sub-problems.
In this paper we take this research in a new direction by investigating a type of problem that is related to the MHV problem. In this variant, which we call the maximum happy induced subgraph (MHIS) problem, vertices are forbidden from being unhappy but, instead, can remain uncoloured in the graph. As a result, a coloured vertex v is considered happy whenever all of its coloured neighbours have the same colour as v, as opposed to all of its neighbours. The objective is to then maximise the number of coloured (and therefore happy) vertices, which is equivalent to minimising the number of uncoloured vertices. In the next section we define this problem, discuss its relationships to other combinatorial optimisation problems and list some motivating examples. In Section 3 we then derive some upper and lower bounds and show how problem instances can sometimes be broken up into smaller parts that can be tackled independently. Section 4 then gives three algorithms for this problem, with results and analyses appearing in Section 5. Finally, Section 6 concludes the paper.
Section snippets
Problem definition
Consider the following definition: Definition 2 Let be a simple graph with n vertices in which a subset of vertices have been coloured by the function . A happy component in G is any connected component C that (a) contains no coloured vertices, or (b) whose coloured vertices are all assigned to the same colour. That is, C is happy if and only if , where is the set of vertices belonging to component C.
It is easy to see that in any happy component C, all of
Bounds for the MHIS problem
In this section we consider some upper and lower bounds on the number of happy vertices achievable in different MHIS problem instances. We also introduce ways in which some problem instances can be broken up into smaller subproblems.
Algorithms for the MHIS problem
In this section we describe three different algorithms for the MHIS problem, one based on an integer programming (IP) formulation (Section 4.2) and two on tabu search (Sections 4.3 Tabu search, 4.4 Tabu search with diversification). As we shall see, the IP method sometimes struggles with instances involving large numbers of vertices; our motivation for choosing tabu search is to therefore establish methods that are fast and that also scale well.
In all cases, a preprocessing step is first
Experimental analysis
In this section we make use of our proposed methods to explore the characteristics that make instances of the MHIS problem difficult to solve. Our IP model was implemented using Gurobi Optimiser Version 8.0.0 and executed with memory limits of 50 GB per-run. All remaining procedures were coded in C++ and can be downloaded at Source code (2020), together with a full listing of our experimental data. Trials were carried out using Monash University’s computing cluster MonARCH using a CPU time
Conclusions and further work
This paper has analysed a number of features of the maximum happy induced subgraph problem, including methods for determining bounds and for breaking up problems. We have seen that difficult-to-solve instances of the MHIS problem seem to occur only when there is a suitable balance between the proportion of precoloured vertices and the density of the graph. Instances outside of these phase transition regions tend to be under- or over-constrained and, consequently, are solved quite easily. These
CRediT Author Statement
Lewis: Conceptualisation, Data Curation, Formal Analysis, Investigation, Methodology, Visualisation, Writing - original draft, Writing - review and editing. Thiruvady: Data Curation, Investigation. Morgan: Formal Analysis.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgements
This research was partially supported by the Cardiff University International Collaboration Seedcorn Fund. It was also supported in part by the Monash eResearch Centre and eSolutions-Research support services through the use of the MonARCH HPC cluster.
References (28)
- et al.
A graph coloring heuristic using partial solutions and a reactive tabu scheme
Comput. Oper. Res.
(2008) - et al.
Construct, merge, solve & adapt a new general algorithm for combinatorial optimization
Comput. Oper. Res.
(2016) - et al.
The multi-terminal vertex separator problem: polyhedral analysis and branch-and-cut
Discrete Appl. Math.
(2019) - et al.
On the phase transitions of random k-constraint satisfaction problems
Artif. Intell.
(2011) - et al.
Multiway cuts in node weighted graphs
J. Algorithms
(2004) Parameterized graph separation problems
Theoret. Comput. Sci.
(2006)- Aravind, N., Kalyanasundaram, S., Swami Kare, A., 2016. Linear time algorithms for happy vertex coloring problems for...
- et al.
Algorithms and hardness results for happy coloring problems
CoRR
(2017) Network Science
(2016)- et al.
Where the really hard problems are
Homophily and community structure in networks
J. Public Econ. Theory
Graph coloring with adaptive evolutionary algorithms
J. Heuristics
Cluster Analysis
An experimental analysis of simple, distributed vertex colouring algorithms
Algorithmica
Cited by (2)
New algorithms for a simple measure of network partitioning
2023, Theoretical Computer ScienceRecombinative approaches for the maximum happy vertices problem
2022, Swarm and Evolutionary ComputationCitation Excerpt :Given the complexity of the problem, parallel solution construction mechanisms might also prove useful in speeding up the algorithms. Finally, we conjecture that variants of the MHV problem, such as the maximum happy induced subgraph problem [35] might also be effectively tackled with the CMSA-TS and EA approaches proposed in this study. Dhananjay Thiruvady: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Project administration, Resources, Software, Validation, Visualization, Writing – original draft, Writing – review & editing.