# Role colouring graphs in hereditary classes

We study the computational complexity of computing role colourings of graphs in hereditary classes. We are interested in describing the family of hereditary classes on which a role colouring with k colours can be computed in polynomial time. In particular, we wish to describe the boundary between the "hard" and "easy" classes. The notion of a boundary class has been introduced by Alekseev in order to study such boundaries. Our main results are a boundary class for the k-role colouring problem and the related k-coupon colouring problem which has recently received a lot of attention in the literature. The latter result makes use of a technique for generating regular graphs of arbitrary girth which may be of independent interest.

## Authors

• 2 publications
• 1 publication
• ### Counting and Finding Homomorphisms is Universal for Parameterized Complexity Theory

Counting homomorphisms from a graph H into another graph G is a fundamen...
07/08/2019 ∙ by Marc Roth, et al. ∙ 0

• ### Precedence thinness in graphs

Interval and proper interval graphs are very well-known graph classes, f...
06/30/2020 ∙ by Flavia Bonomo-Braberman, et al. ∙ 0

• ### Beyond χ^2 Difference: Learning Optimal Metric for Boundary Detection

This letter focuses on solving the challenging problem of detecting natu...
06/04/2014 ∙ by Fei He, et al. ∙ 0

• ### Direct Product Primality Testing of Graphs is GI-hard

We investigate the computational complexity of the graph primality testi...
03/03/2020 ∙ by Luca Calderoni, et al. ∙ 0

• ### Detecting strong cliques

A strong clique in a graph is a clique intersecting every maximal indepe...
08/24/2018 ∙ by Ademir Hujdurović, et al. ∙ 0

• ### On classes of graphs with strongly sublinear separators

For real numbers c,epsilon>0, let G_c,epsilon denote the class of graphs...
10/09/2017 ∙ by Zdeněk Dvořák, et al. ∙ 0

• ### Content-Preserving Image Stitching with Regular Boundary Constraints

This paper proposes an approach to content-preserving stitching of image...
10/26/2018 ∙ by Yun Zhang, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

A role colouring of a graph is an assignment of colours to its vertices such that if then the image of the neighbourhood of is identical to the image of the neighbourhood of . The concept arises from the study of roles in a social network [3], and has appeared in the literature under the names role assignment [22, 9] and regular equivalence [4, 10] and similar names [5, 19].

In a recent paper [18], the present authors proved that the problem of deciding the existence of a role colouring with colours (-rcol) is -complete even when the input is restricted to planar graphs. This result is best possible, in the sense that if is a minor-closed class of graphs, restricting -rcol to graphs in yields a polynomial time solution if and only if at least one planar graph is not in . This is because planar graphs are the unique minimal minor-closed class of graphs of unbounded treewidth, and -role colouring can be solved efficiently for bounded treewidth classes.

Our current focus is hereditary classes, where such classifications are not usually possible. Unlike the minor-closed case, hereditary classes are not well founded with respect to the containment relation; there need not be a minimal element in a set of hereditary classes. In order to overcome this difficulty, the concept of a boundary class was introduced by Alekseev [1] for the maximum independent set problem. For a problem we denote the family of graph classes on which has a polynomial-time solution by -easy. The importance of the notion of a boundary class is due to the following. If is defined by finitely many minimal forbidden induced subgraphs, then is outside -easy if and only if contains a boundary class for the family -easy (under the assumption that ). One of our two main results is the first boundary class for -rcol.

We also consider the special case of a coupon colouring. A colouring of a graph is a coupon colouring if every vertex has a neighbour of every colour. Coupon colourings are also known as total domatic partitions, and have recently received attention from the combinatorial [7, 21, 8] and algorithmic [13, 16] communities. We will denote the problem of deciding the existence of a -coupon colouring by -ccol. We give the first boundary class for this problem. Our proof makes use of a technique for constructing regular graphs of arbitrary girth which may be of independent interest. Explicit constructions for regular graphs of large girth have been known for a long time [2, 15]. Our construction is far from extremal, but is meant to increase the girth of graphs while preserving -coupon colourability.

In addition to the main results, we show that every non-trivial -free graph has a -role colouring and that this colouring can be found in polynomial time. This is in contrast with the fact that the problem is known to be -hard in this class for .

The rest of this paper is organised as follows. In the next section we give some definitions and preliminary discussion including a description of boundary classes. For a more thorough overview we direct the reader to [14]. The boundary classes for -role colouring and -coupon colouring are given in Section 3 and Section 4 respectively. We conclude the paper with a discussion of the possibility of other boundary classes and some open problems.

## 2 Preliminaries

In this paper graphs may have loops but not multiple edges. Edges are undirected. The neighbourhood of a vertex is the set of vertices that share an edge with in . This may include if . The degree of is . The minimum degree of all the vertices in is denoted ; the maximum is denoted .

As usual, and denote the path, cycle and clique on vertices respectively, and denotes the biclique on vertices. The graphs and will be particularly important, and it will be useful to define a consistent ordering of their vertices. Let and let . Let and let . We define two more important graphs similarly. Let be the graph with ,. Let be the graph with ,.

Let be the graph on the left of Figure 1, and let be the vertices of of degree . We define the graph to be the graph obtained from by subdividing the edge times. Let be the tree with leaves at distance and respectively from the single vertex of degree , for . If one of or is , then let . Figure 1 shows to the right. An ear of a graph is a set of vertices of degree 2 that induces a path.

A set of graphs is called a class if it is closed under isomorphism. If a class is also closed under deleting vertices, we say that the class is hereditary. If a hereditary class is closed under deleting edges we say that it is a monotone class. A monotone class which is closed under edge contraction is said to be minor-closed. This paper mainly deals with hereditary classes. It is well known (and easy to verify) that a hereditary class can be characterised by its minimal forbidden induced subgraphs. For a set of graphs , we say that a graph is -free if no graph in is an induced subgraph of . The class of -free graphs will be denoted by . It will be useful to refer to the monotone class of graphs that contain no element of as a subgraph (not necessarily induced) as . Let be a family of hereditary classes closed under taking subclasses. Suppose is an infinite sequence of graphs outside and let be their intersection. We say that is a limit class for , and a minimal limit class is a boundary class. A finitely defined graph class is outside if and only if it contains none of the boundary classes for .

A role colouring of a graph is an assignment of colours to its vertices, such that if then . In other words, two vertices with the same colour have identical sets of colours in their respective neighbourhoods. For a role colouring we define the role graph to be the graph whose vertex set is and an edge if a vertex of colour has a neighbour of colour . Formally, a role colouring of a graph with role graph is a locally surjective homomorphism from to . We consider only finite role graphs. If has vertices, we say that has colours and is a -role colouring. We may identify the colours of and the vertices of , and without loss of generality, these are . In particular, if then the colours of are ordered according to the definition given above. We refer to the problem of deciding the existence of a -role colouring for a graph as -rcol, and the problem of deciding the existence of a role-colouring with role graph for a graph as -rcol.

###### Observation 2.1.

If is a connected graph with a role colouring , then the role graph of the colouring is connected.

###### Observation 2.2.

If has a non trivial role colouring with a connected role graph then is not monochromatic for any vertex .

A CNF formula is a disjunction of clauses , each of which is a conjunction of literals , each of which is a variable (or its negation) that takes a value or . A formula is monotone if every literal is a variable (and not a negation of a variable). A not-all-equal satisfying assignment of is a satisfying assignment of to its variables so that each clause has at least one literal whose value is . The problem of deciding whether a (monotone) formula has a not-all-equal satisfying assignment is denoted by (monotone) nae-sat. This problem is known to be -complete [20].

## 3 Role Colourings

Let be the class of -free graphs and let . In this section we prove the following theorem.

###### Theorem 3.1.

For all , is a boundary class for the -rcol problem.

### 3.1 The limit class

In order to prove Theorem 3.1, we first consider the complexity of the -rcol problem. We need the following lemma.

###### Lemma 3.2.

Let be a graph and let be in ,,,. Let be a path in such that the degree of is for all . Then if has a valid -role-colouring , we have that .

###### Proof.

We give the proof for the case , the other cases are analogous. Let be a -role colouring of . Consider a walk in that never uses the same edge twice in a row. It is easy to see that after steps, the walk will return to the initial vertex. Observe that the colours describe such a walk: the two neighbours of must have different colours. Since this walk is steps, we have that . ∎

###### Proposition 3.3.

For all , the -rcol problem is hard for graphs of vertex degree at most 3.

###### Proof.

We reduce from monotone nae-sat. Let be a boolean formula such that each of its variables appears positively. We will construct a graph such that has a not-all-equal satisfying assignment if and only if has a -role-colouring. Furthermore, will have vertex degree at most 3.

Suppose has variables and that appears times in (in some arbitrary order). For each variable we include in a cycle . The vertex set of will also include the clauses of , in some arbitrary order . Suppose appears for the time in clause . Then we add an edge connecting and . We will refer to this part of the graph as the formula gadget.

Additionally, we add a cycle of length . We denote this cycle by with ,. For each we add a path and edges and . This completes the description of .

We now argue that has a -role-colouring if and only if has a not-all-equal satisfying assignment. Suppose first that has such a colouring, . We will say that a set of vertices is monochromatic if every vertex in has the same colour. Observe that by Lemma 3.2 the set is monochromatic; let the colour of the vertices in this set be . For each there are two choices for the colour of , we call them and (which need not be distinct from ). Observe that, for each , we have that is monochromatic with colour or .

For each clause vertex there are three cases to consider, since these vertices only have neighbours in the sets . In the first two cases, the neighbourhood of is monochromatic with colour or . This is a contradiction since there is no colour that has degree 1 in . In the remaining case, has at least one neighbour of colour and at least one neighbour of colour , and . Now we can obtain a not-all-equal satisfying assignment for . Those variables for which has colour can be assigned the truth value . Clearly, each clause has at least one variable assigned and at least one variable assigned in this case.

It remains for us to show that a -role-colouring for can be constructed from a not-all-equal satisfying assignment for . Given such an assignment we construct a colouring as follows. For any vertex in we set . Observe that this does not contradict the condition given by Lemma 3.2. Since the variable gadget for is a cycle of length a multiple of , we can colour its vertices with colours repeated times, in one of two possible directions. If is assigned , then we set and so on. Otherwise we set and so on. Observe that each vertex in the set has colour if is assigned and with colour otherwise. By colouring the clause vertices with colour , we have that the colouring is valid for all vertices of the formula gadget.

The cycle in the base gadget is also of length a multiple of , so we can colour it with colours repeated times. We restate that for all . We complete the colouring by giving the vertices the colours respectively, for all . Since has a neighbour of colour , and has a neighbour of colour , we see that the colouring is valid for all vertices of the base gadget. This completes the proof. We illustrate this construction in Figure 2, for the boolean formula , with and role graph . ∎

The graph may have a -role-colouring with a role graph different to . In particular, there exists a formula with no not-all-equal satisfying assignment that is -role colourable. Thus our construction does not immediately prove that -role-colouring is hard for graphs of vertex degree at most 3. We now show how to overcome this difficulty by modifying to fix the role graph.

Let be an induced subgraph of such that exactly one vertex in has exactly one neighbour in , while all other vertices of have no neighbours in . We say that is a dangling induced subgraph of , and that is the hook of .

###### Observation 3.4.

Let be a role colouring of a graph , with role graph . Then the degree of in is at most the degree of in . Furthermore, .

###### Lemma 3.5.

Let have an ear of length at least and suppose is -role-colourable with connected role graph . Then .

###### Proof.

Suppose the contrary. Then there must be a colour in of degree at least . Let be the vertices of an ear. By Observation 3.4, no vertex of the ear has colour . For some , assume that no vertex in with has a colour of distance at most from in . If there is no colour of distance from in then we have reached a contradiction. Otherwise, let be such a colour, and observe that if a vertex with has colour then has degree 2 in , and one of the two neighbours of necessarily has a colour of distance from , a contradiction. By induction, we see that is at distance strictly more than from , which gives a contradiction that completes the proof.

###### Lemma 3.6.

Let be a graph with a dangling induced subgraph isomorphic to , and suppose that is -role-colourable with connected role graph . Then .

###### Proof.

Let and let be the hook of . By Lemma 3.5, . Clearly there is no way to colour the vertices of such that the role colouring is a . By Lemma 3.2, if , then and have the same colour, which is a contradiction. Figure 3 illustrates two copies of for , one that is -role coloured, and one that is -role coloured. ∎

###### Lemma 3.7.

Let as before. Let be a graph with two dangling induced subgraphs , each isomorphic to , with respective hooks . Let be the unique neighbour of in and let be the unique neighbour of in . Let and be adjacent in . Suppose is a -role-colouring of with connected role graph . Then

###### Proof.

Let and . By Lemma 3.5, . By Lemma 3.2, if then and have the same colour; i.e., they have colour . Similarly, has colour . For the same reason, and have colour . Since is a -colouring, must have a neighbour of colour . We must have that and symmetrically, , which gives a contradiction. Figure 4 illustrates three examples of this construction for : one that is -role coloured, one that is -role coloured and one that is -role coloured. ∎

###### Proposition 3.8.

For all , the -rcol problem is hard for graphs of vertex degree at most 3

###### Proof.

Let be the graph constructed in the proof of Proposition 3.3. We modify to obtain a graph such that has a -role colouring if and only if has a not-all-equal satisfying assignment. To obtain we add to three cycles . We also add the edges , and .

Suppose that has a -role colouring . By Lemma 3.6 and Lemma 3.7 The role graph of is or . Observe that by Lemma 3.2 is monochromatic. The rest of the argument follows as in Proposition 3.3: has a not-all-equal satisfying assignment.

Now suppose that has a not-all-equal satisfying assignment. We show that has a -role colouring and therefore a -role colouring. We know from Proposition 3.3 that has a -role colouring. We will extend this colouring to . We start by colouring . We set (observing that ), and . This forces us to set . If this completes the colouring of , otherwise we continue the colouring . Observe that and , and is adjacent to . This completes the colouring of . To colour we set (observing that ). Since is a cycle of length , we may colour its vertices . We colour similarly, but starting at . This completes the colouring and the proof.

We now show how to increase the length of every cycle, and every graph, to prove that is a limit class.

###### Lemma 3.9.

Let be a graph and let be in ,,,. Let be an edge in , and let be obtained from by performing subdivisions of . Then is -role-colourable if and only if is.

###### Proof.

Clearly if is -role colourable, then is -role colourable. Let and let be the vertices added as a result of subdividing , so that are all edges of . Let be an -role colouring of . By Lemma 3.2, and . Therefore we can -role colour by setting . ∎

###### Proposition 3.10.

is a limit class for -rcol.

###### Proof.

We show that -rcol is -hard for the class of -free graphs for all . Fix some arbitrary constant . We further modify to obtain a graph such that has a -role colouring if and only if has a not-all-equal satisfying assignment. Observe that is -free. Let , and note that is a constant. For each edge of , we perform subdivisions of to obtain . Certainly, is -free. The following are equivalent:

1. has a -role colouring

2. has a -role colouring

3. has a -role colouring

4. has a -role colouring

We have shown that 1.2.; that 3.4. is immediate. By Lemma 3.9, 2.3. and 4.1., as required. Since has a -role colouring if and only if has a -role colouring if and only if has a not-all equal satisfying assignment, the proof is complete.

### 3.2 Minimality of the Limit Class

To prove that the limit class described above is minimal, we introduce the following minimality criterion as a lemma.

###### Lemma 3.11.

([17]) Let be the set of minimal forbidden induced subgraphs for a limit class for some family . Then is minimal if and only if for each there exists a finite subset such that is in .

Our application of this lemma is identical to that of [17]; we repeat it here for completeness. We require the following auxiliary results.

###### Theorem 3.12.

([17]) Let be a monotone class of graphs. If there is at least one graph in then the treewidth of is bounded.

###### Lemma 3.13.

The -role colouring problem can be solved in polynomial time if the input is restricted to a class of bounded treewidth.

###### Proof.

This is an corollary of the fact that -role colouring can be solved in polynomial time if has bounded maximum degree and the input graph has bounded treewidth [6]. ∎

We are now ready to prove Theorem 3.1. Let be a graph in . Observe that is an induced subgraph of for some and ; let be the set . The class of -free graphs is a proper subclass of -free graphs. By Lemma 3.11, it is enough to prove the following result.

###### Lemma 3.14.

For all , the -rcol problem is in for -free graphs.

###### Proof.

It is enough to show that is a proper subclass of . Let be a graph in , and suppose is a subgraph of isomorphic to . By definition of , does not induce a copy of . So there must be at least one additional edge between two vertices of . If there is an edge between two vertices of the same connected component of (i.e. of the same ), then there is necessarily a chordless cycle of length at most in , which is a contradiction. Similarly, a small chordless cycle appears if two of the components of are connected by at least two edges in . Finally, if two components of are connected by a single edge in , an induced subgraph isomorphic to with appears, which is a contradiction. This completes the proof of Theorem 3.1. ∎

We conclude this section by observing that applying Lemma 3.9 directly to the construction in Proposition 3.3 shows that is a boundary class for -role-colouring in the case where is a (for ) or a (for ). We note that these graphs are sparse. Previous results on -role-colouring (e.g. [11, 18]) have also made use of sparse role graphs. In the next section we show that when the role graph is very dense, we can also find a boundary property.

## 4 Coupon Colourings

Observe that -ccol is -rcol, and so is a boundary class in this case. We consider -coupon colourings for . Let be the class of forests of maximum vertex degree at most . In this section we prove the following theorem.

###### Theorem 4.1.

is a boundary class for the -ccol problem for all .

It is known that -coupon colouring is -hard even when the input graph is -regular [13]. This is not a hereditary property of graphs; taking the hereditary closure of the -regular graphs yields the graphs of maximum degree . Let be a graph of maximum degree . Our goal is to produce a graph which is -free, such that has a -role colouring if and only if has. The general idea is illustrated in Figure 5. We will replace every edge with a pair of trees of depth much larger than , such that is adjacent to and adjacent to . We add edges between the leaves of these trees to force the colour of to match the colour of (and to match ) while avoiding cycles of length less than . We call this operation gemel implantation. The construction for is illustrated in Figure 6. Let be the -regular graph on the left of the figure, and be the graph on the right, obtained by a gemel implantation. Observe that any -coupon colouring of has (and by symmetry, ). Thus, has a 3-coupon colouring if and only if has. Furthermore, there is no triangle in the gemel, nor can there be a triangle of including both and . Now let be the graph obtained by performing a gemel implantation at every edge of . By the previous discussion, has a 3-coupon colouring if and only if has. Furthermore, is -regular and triangle-free, i.e. -free. Clearly can be obtained from in polynomial time. Thus, 3-coupon colouring is -hard for -free graphs.

In order to generalise this argument to prove Theorem 4.1, we need to show that we can perform a gemel implantation in -regular graphs that avoids arbitrarily large cycles (and preserves -coupon colourability). We note that, for the argument to go through, the gemel implantation must be performed in polynomial time. Our construction is of constant size, and therefore gemel implantation at every edge takes time as required. Unfortunately, the constants involved are large; in order to achieve girth , vertices must be added to each edge where . We suspect there is a more efficient construction, but note that it will have size at least exponential in .

We demonstrate our construction by first presenting a family of regular graphs of high girth. These graphs consist of two cycles and a matching between them. We then show how to use the matching to create the gemel implantation.

### 4.1 High girth graph G(n,k)

We define a family of graphs with girth . For ease of notation, let . Let , and let . We create a graph as follows. Let . We read strings from right to left. Let be all the vertices whose strings end with 0, and be all the vertices whose strings end with 1. Add an edge between two vertices in if the number expressed (in base ) by their strings differ by 1 , and do the same for . This creates two cycles of length . We add a matching between these cycles to obtain a 3-regular graph. For a vertex in , for , let be the number expressed by the first digits of . Let be the vertex in that differ from only in the digits at positions , namely by adding 1 to these digits . Add edges for all . Let be the bijective function with as described. Change the last 0 to a 1. Now, is a 3-regular graph. For example, the graph , shown in Figure 7 has vertex set and girth 4.

has girth .

###### Proof.

If a cycle in is entirely in or , then it has length . Let be a cycle in that contains an edge , where is the set of edges with one endpoint and one endpoint . Then and differ in the digit at position (among others). Suppose a cycle starts at . To complete a cycle, the digit at must be returned to its state in (among other digits). This can be done in two ways: along an edge within or , or along an edge in . Remember that moving along an edge within or changes the represented number of the string by 1, while moving along an edge in changes a set of digits across the string.
Let two vertices be close if they are distance apart within or in , and far otherwise.
We define a good edge in as an edge which has one of its endpoints close to another vertex that differs in the digit at position . Other edges in are bad. Good edges have an endpoint that has only s or only 0s at positions . Without loss of generality, suppose that is a good edge, with , such that has only 0s at positions . Then has exactly one 1 in the substring at positions (namely, at position , and 0s otherwise.
Then, is far away in from any other endpoint of a good edge. Therefore, there is no cycle of length that uses only good edges from .
Let be a cycle in that uses at least one bad edge . Then, and differ at position . The path along must reach a vertex that is equal to in the first bits, or a vertex that is equal to in the first bits, such that the edge or changes the digit at position back to its state at . Then either the path or the path correspond to a cycle in . To complete , by symmetry, there must then also be a path or a path , which again correspond to a cycle in . Therefore,

 g(G(n,k))≥min{2g(G(n−1,k)),(k−1)an−2},g(G(1,k)≥3.

Then,

 g(G(n,k))=Ω(2n)=Ω(2log∗an)=Ω(log∗|V|).