The maximum happy induced subgraph problem: Bounds and algorithms

https://doi.org/10.1016/j.cor.2020.105114Get rights and content

Highlights

Abstract

In this paper we consider a combinatorial optimisation problem that takes as input a graph in which some of the vertices have been preassigned to colours. The aim is to then identify the largest induced subgraph in which all remaining vertices are able to assume the same colour as all of their neighbours. This problem shares similarities with the graph colouring problem, vertex cut problems, and the maximum happy vertices problem. It is NP-hard in general. In this paper we derive a number of upper and lower bounds and also show how certain problem instances can be broken up into smaller subproblems. We also propose one exact and two heuristic algorithms for this problem and use these to investigate the factors that make some problem instances more difficult to solve than others.

Introduction

Given a simple graph G=(V,E), 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 G=(V,E) be a simple graph, and let c:V{1,,k} be a colouring of all vertices in G. A vertex vV is happy if c(v)=c(u) for all uΓ(v); else it is unhappy.

Here, Γ(v) denotes the set of neighbours of a vertex vV; hence, in a graph in which all vertices have been coloured, a vertex is happy if and only if it is assigned to the same colour as all of its adjacent vertices.

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 G=(V,E) be a simple graph with n vertices in which a subset of vertices VV have been coloured by the function c:V{1,,k}. 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 |v(V(C)V){c(v)}|1, where V(C) 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)

  • P. Dev

    Homophily and community structure in networks

    J. Public Econ. Theory

    (2016)
  • A.E. Eiben et al.

    Graph coloring with adaptive evolutionary algorithms

    J. Heuristics

    (1998)
  • B. Everitt et al.

    Cluster Analysis

    (2011)
  • I. Finocchi et al.

    An experimental analysis of simple, distributed vertex colouring algorithms

    Algorithmica

    (2005)
  • Cited by (2)

    • Recombinative approaches for the maximum happy vertices problem

      2022, Swarm and Evolutionary Computation
      Citation 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.

    View full text