1 Introduction

Large things are seen from a distance, but to examine small things, one needs to look up-close. Cographs constitute a small class and in this paper we analyse it with a “magnifying glass”, trying to spot the details. With a closer look at this class we discover a complex world and observe that many important parameters can be arbitrarily large within cographs. This is the case, for instance, for chromatic number, co-chromatic number, matching number, tree-width, linear clique-width and many others. Moreover, such parameters jump to infinity on specific subclasses of cographs. This is due to the fact that the class of cographs is well-quasi-ordered under the induced subgraph relation [8], and therefore, for every parameter p which is unbounded in the class of cographs, there exists a finite collection M(p) of inclusion-wise minimal hereditary subclasses of cographs, where p can be arbitrarily large. This observation suggests a simple way of comparing two parameters: a parameter \(p_1\) is stronger than a parameter \(p_2\) if for every class \(X\in M(p_1)\) there exists a class \(Y\in M(p_2)\) such that \(Y\subseteq X\). In other words, \(p_1\) is stronger than \(p_2\) if the family of cograph subclasses where \(p_1\) is bounded contains the family of cograph subclasses where \(p_2\) is bounded.

For some parameters, identifying minimal classes is an easy task. For instance, since cographs are perfect, the chromatic number is bounded if and only if the clique number is bounded and hence the class of complete graphs is the only minimal hereditary subclass of cographs where the chromatic number is unbounded. However, in general, identifying minimal classes is far from being trivial, as the example of linear clique-width shows. The authors of [5] develop a sophisticated approach to show that there exist precisely two minimal hereditary subclasses of cographs where linear clique-width is unbounded: the class of \((P_4,C_4)\)-free graphs, also known as the quasi-threshold [21] or trivially perfect [15] graphs, and the class of their complements.

In the present paper, we characterise a variety of other graphs parameters in terms of minimal hereditary subclasses of cographs where these parameters are unbounded, which is the content of Sects. 3 and 4. In Sect. 2, we introduce basic terminology and notation used throughout the paper.

2 Preliminaries

All graphs in this paper are simple, i.e., finite, undirected, without loops and without multiple edges. The vertex set and the edge set of a graph G are denoted by V(G) and E(G), respectively. As usual, \(P_n,C_n,K_n\) denote a chordless path, a chordless cycle and a complete graph with n vertices, respectively. Also, \(K_{n,m}\) is a complete bipartite graph with parts of size n and m.

The complement of a graph G is denoted by \(\overline{G}\). Given two graphs G and H, we denote by \(G\cup H\) the disjoint union of G and H and by \(G\times H\) the join of G and H, i.e., the graph obtained from \(G\cup H\) by adding all possible edges between G and H. Two sets \(A, B \subseteq V(G)\) are said to be complete to each other if every possible edge between them appears in G, and anticomplete to each other if they are complete to each other in \(\overline{G}\). The disjoint union of p copies of G will be denoted by pG.

A clique in a graph is a subset of pairwise adjacent vertices and an independent set is a subset of pairwise non-adjacent vertices. We say that a graph G is H-free if G does not contain a copy of H as an induced subgraph.

A class of graphs is hereditary if it is closed under taking induced subgraphs. It is well-known (and not difficult to see) that a class is hereditary if and only if it can be characterised in terms of minimal forbidden induced subgraphs.

The class of cographs is the class of graphs that can be obtained from \(K_1\) by taking complements and disjoint unions. In particular, every cograph with at least two vertices can be represented either as \(G\cup H\) or as \(G\times H\) for two non-empty graphs G and H. It is well known that the class of cographs is precisely the class of \(P_4\)-free graphs.

Since the complement of a cograph is again a cograph, with every subclass \(\mathcal {X}\) of cographs we associate the subclass \(\overline{\mathcal {X}}\) of complements of graphs in \(\mathcal {X}\). The following subclasses of cographs will play a critical role in our study:

\(\mathcal Q\):

the class of quasi-threshold graphs, i.e., \((P_4,C_4)\)-free graphs,

\(\mathcal{T}\):

the class of threshold graphs. This is the class of \((P_4,C_4,2K_2)\)-free graphs, i.e., the intersection of \(\mathcal Q\) and \(\overline{\mathcal{Q}}\).

\(\mathcal U\):

the class of \(P_3\)-free graphs, i.e., graphs every connected component of which is a clique.

\(\mathcal K\):

the class of complete graphs.

\(\mathcal{F}\):

the class of star forests, i.e., graphs every connected component of which is a star. This is the class of \((P_4,C_4,K_3)\)-free graphs, i.e., the class of bipartite graphs in \(\mathcal{Q}\).

\(\mathcal M\):

the class of graphs of vertex degree at most 1. This is the class of \((P_3,K_3)\)-free graphs, i.e., the class of bipartite graphs in \(\mathcal{U}\).

\(\mathcal B\):

the class of complete bipartite graphs (an edgeless graph is counted as complete bipartite with one part being empty). This is the class of \((\overline{P}_3,K_3)\)-free graphs, i.e., the class of bipartite graphs in \(\overline{\mathcal{U}}\).

\(\mathcal S\):

the class of stars, i.e., graphs of the form \(K_{1,n}\) and their induced subgraphs.

The Ramsey number R(ab) is the smallest natural number such that any graph with R(ab) vertices contains a clique of size a or an independent set of size b.

3 Graph Parameters

We start by reporting some known results or results that readily follows from known results. In particular, directly from Ramsey’s Theorem we derive the following conclusion:

Proposition 1

The class \(\mathcal K\) of complete graphs and the class of \(\mathcal S\) of stars are the only two minimal hereditary classes of graphs of unbounded maximum vertex degree.

To report more results, we denote by

\(\alpha (G)\):

the independence number of G, i.e., the size of a maximum independent set in G,

\(\omega (G)\):

the clique number of G, i.e., the size of a maximum clique in G,

\(\chi (G)\):

the chromatic number of G, i.e., the minimum number of subsets in a partition of V(G) such that each subset is an independent set,

y(G):

the clique partition (also known as clique cover) number, i.e., the minimum number of subsets in a partition of V(G) such that each subset is a clique.

Clearly, the class \(\mathcal K\) of complete graphs is the only minimal hereditary class of unbounded clique number, i.e., by forbidding a complete graph we obtain a class of bounded clique number. Also, it is not difficult to see that \(\mathcal K\) is a minimal hereditary class of unbounded chromatic number. However, it is not the only minimal hereditary class of unbounded chromatic number, i.e., forbidding a complete graph does not guarantee a bound on the chromatic number. Moreover, as shown by Erdős [10] chromatic number is unbounded even in the class of \((C_3,C_4,\ldots ,C_k)\)-free graphs for any value of k, which means that in the universe of hereditary classes chromatic number cannot be characterised by means of minimal classes where this parameter is unbounded. On the other hand, when we restrict ourselves to cographs such a characterization is possible, which is due to the fact that cographs are perfect, and hence \(\omega (G)=\chi (G)\) for any cograph G. As a result, we obtain the following conclusion.

Proposition 2

The class \(\mathcal K\) of complete graphs is the only minimal hereditary subclass of cographs of unbounded clique number and chromatic number.

The degeneracy of a graph G is the smallest value of k such that every induced subgraph of G has a vertex of degree at most k. It is not difficult to see that the class \(\mathcal K\) of complete graphs and the class of \(\mathcal B\) of complete bipartite graphs are minimal hereditary classes of unbounded degeneracy. However, these are not the only minimal classes, because forbidding a complete graph and a complete bipartite graph does not guarantee a bound on the degeneracy. To explain this, we observe that the degeneracy of G is bounded from below by \(\chi (G)-1\) and from above by the tree-width of G. Therefore, degeneracy and tree-width are unbounded in the class of \((C_3,C_4,\ldots ,C_k)\)-free graphs for any value of k, and for \(k\ge 4\) the set of forbidden induced subgraphs include both a complete graph \(C_3\) and a complete bipartite graph \(C_4\). This discussion shows that, similarly to chromatic number, in the universe of all hereditary classes neither degeneracy nor tree-width admit a characterization in terms of minimal classes where these parameters are unbounded. On the other hand, again similarly to chromatic number, such a characterization is possible when restricting to cographs, and it is presented in the next claim.

Proposition 3

The class \(\mathcal K\) of complete graphs and the class of \(\mathcal B\) of complete bipartite graphs are the only two minimal hereditary subclasses of cographs of unbounded degeneracy and tree-width.

Proof

To prove the claim, it suffices to show that for any s and p, the tree-width of \((P_4,K_s,K_{p,p})\)-free graphs is bounded by a constant. For this, we refer the reader to the following result from [1]: for every tps, there exists a \(z=z(t,p,s)\) such that every graph with a (not necessarily induced) path of length at least z contains either an induced \(P_t\) or an induced \(K_{p,p}\) or a clique of size s. From this result it follows that \((P_4,K_s,K_{p,p})\)-free graphs do not contain (not necessarily induced) paths of length z(4, ps). It is well known (see, e.g., [12]) that graphs of bounded path number (the length of a longest path) have bounded tree-width.

   \(\square \)

The matching number of a graph G is the size of a maximum matching in G. The following result was proved in [7].

Lemma 1

For any natural numbers st and p, there is a number N(stp) such that every graph with a matching of size at least N(stp) contains either a clique \(K_s\) or an induced bi-clique \(K_{t,t}\) or an induced matching \(pK_2\).

A natural corollary from this result is the following characterization of the matching number in terms of minimal hereditary classes where this parameter is unbounded.

Theorem 1

\(\mathcal M\), \(\mathcal B\) and \(\mathcal K\) are the only three minimal hereditary classes of graphs of unbounded matching number.

The vertex cover number of a graph G is the size of a minimum vertex cover in G. It is well known that the vertex cover number is never smaller than the matching number and never larger than twice the matching number. Therefore, the characterization of matching number given in Theorem 1 applies to the vertex cover number as well.

Theorem 2

\(\mathcal M\), \(\mathcal B\) and \(\mathcal K\) are the only three minimal hereditary classes of graphs of unbounded vertex cover number.

The neighbourhood diversity of a graph was introduced in [16] and can be defined as follows.

Definition 1

Let us say that two vertices x and y are similar if there is no vertex z distinguishing them (i.e., if there is no vertex z adjacent to exactly one of x and y). Vertex similarity is an equivalence relation. We denote by nd(G) the number of similarity classes in G and call it the neighbourhood diversity of G.

Neighbourhood diversity was characterised in [17] by means of nine minimal hereditary classes of graphs where this parameter is unbounded. Six of these minimal classes contain a \(P_4\). Therefore, when restricted to cographs, neighbourhood diversity can be characterised by three minimal classes as follows.

Theorem 3

\(\mathcal M\), \(\overline{\mathcal{M}}\), and \(\mathcal{T}\) are the only three minimal hereditary subclasses of cographs of unbounded neighbourhood diversity.

3.1 Co-chromatic Number

The co-chromatic number of G, denoted z(G), is the minimum number of subsets in a partition of V(G) such that each subset is either a clique or an independent set [11]. It is not difficult to see that the co-chromatic number can be arbitrarily large in the class of \(P_3\)-free graphs, where each graph is a disjoint union of cliques. Therefore, it is also unbounded in the complements of \(P_3\)-free graphs, also known as complete multipartite graphs. In what follows, we show that these are the only two minimal subclasses of cographs of unbounded co-chromatic number.

Lemma 2

Let nmt be positive integers with \(t \ge 2\). If G is a \((nK_t,\overline{mK}_t)\)-free cograph, then \(z(G)\le 2^{m + n - 1}(t - 1)\).

Proof

Call a partition of V(G) good if it contains at least \(t - 1\) cliques and \(t - 1\) independent sets (empty sets in the partition may count as either). We prove by induction on \(m + n\) that G admits a good partition into \(2^{m + n - 1}(t - 1)\) sets, each of which is a clique or an independent set.

If \(m + n = 2\) (\(n=m=1\)), then G is \(K_t\)-free. Hence \(\chi (G)=\omega (G)\le t-1\); we add empty sets to the partition until we reach \(2(t - 1)\) sets in total. This makes the partition good, and we have proved the basis for the induction. In general, put \(G' := G\). We are in one of the following three cases:

  1. (a)

    \(G' = G_1 \cup G_2\), and both \(G_1\) and \(G_2\) are \(K_t\)-free, OR \(G' = G_1 \times G_2\), and both \(G_1\) and \(G_2\) are \(\overline{K_t}\)-free.

  2. (b)

    \(G' = G_1 \cup G_2\), and both \(G_1\) and \(G_2\) contain a \(K_t\), OR \(G' = G_1 \times G_2\), and both \(G_1\) and \(G_2\) contain a \(\overline{K_t}\).

  3. (c)

    \(G' = G_1 \cup G_2\), \(G_1\) contains a \(K_t\) and \(G_2\) is \(K_t\)-free, OR \(G' = G_1 \times G_2\), \(G_1\) contains a \(\overline{K_t}\) and \(G_2\) is \(\overline{K_t}\)-free.

As long as we are in case (c), iteratively put \(G' := G_1\). We end up with a graph \(G'\) in either case (a) or (b). Note first that any good partition of \(G'\) extends to a good partition of G without increasing the number of sets. Indeed, at each step, \(G_2\) was either \(K_t\)-free and anticomplete to the rest of the graph or \(\overline{K_t}\)-free and complete to the rest of the graph. The disjoint union of all \(K_t\)-free \(G_2\)s is again \(K_t\)-free and hence can be partitioned into at most \(t - 1\) independent sets, and we take the union of each of these sets with one of the independent sets in the good partition of \(G'\) injectively. Similarly, the join of the \(\overline{K_t}\)-free \(G_2\)s can be partitioned into at most \(t - 1\) cliques, each of which we join to one of the cliques in the good partition of \(G'\) injectively.

Now, if \(G'\) is in case (a), then \(G'\) is \(K_t\)-free or \(\overline{K_t}\)-free and we act like in the base case to obtain a good partition of \(G'\) (and therefore of G) in \(2(t - 1)\) sets. If \(G'\) is in case (c), then \(G_1\) and \(G_2\) are both either \((n - 1)K_t\)-free or \(\overline{(m - 1)K_t}\)-free. In either case, the inductive hypothesis applies, and we have a good partition of \(G'\) of size at most

$$\begin{aligned} 2^{m + n - 2}(t - 1) + 2^{m + n - 2}(t - 1) = 2^{m + n - 1}(t - 1). \end{aligned}$$

Like before, this extends to a partition of G, concluding the proof.    \(\square \)

Lemma 2 naturally leads to the following conclusion.

Theorem 4

The class \(\mathcal U\) of \(P_3\)-free graphs and the class \(\overline{\mathcal{U}}\) of \(\overline{P}_3\)-free graphs are the only two minimal hereditary subclasses of cographs of unbounded co-chromatic number.

3.2 Lettericity

The notion of letter graphs was introduced in [19] and can be defined as follows.

Let A be a finite alphabet, \(D\subseteq A^2\) and \(w=w_1w_2\ldots w_n\) a word over A (repetitions allowed). The letter graph G(Dw) associated to w has \(\{1,2,\ldots ,n\}\) as its vertex set, and two vertices \(i < j\) are adjacent if and only if the ordered pair \((w_i,w_j)\) belongs to D. A graph G is said to be a letter graph if there exist an alphabet A, a subset \(D\subseteq A^2\) and a word \(w=w_1w_2\ldots w_n\) over A such that G is isomorphic to G(Dw).

The role of D is to decode (transform) a word into a graph and therefore we refer to D as a decoder. Every graph G is trivially a letter graph over the alphabet \(A = V(G)\) with the decoder \(D = \{(v, w), (w, v): \{v, w\} \in E(G)\}\). The lettericity of G, denoted \(\ell (G)\), is the minimum k such that G is representable as a letter graph over an alphabet of k letters.

To give a less trivial example, consider the alphabet \(A=\{a,b\}\) and the decoder \(D=\{(a,a),(a,b)\}\). Then the word ababababab describes the graph represented in Fig. 1. This graph can be constructed from a single vertex by means of two operations: adding a dominating vertex (corresponds to adding letter a as a prefix) or adding an isolated vertex (corresponds to adding letter b as a prefix). The class of all graphs that can be constructed by means of these two operations coincides with the class of threshold graphs defined in Sect. 2 as \((2K_2,C_4,P_4)\)-free graphs [18]. The above discussion shows that a graph is threshold if and only if it is a letter graph over the alphabet \(A=\{a,b\}\) with the decoder \(D=\{(a,a),(a,b)\}\).

Fig. 1.
figure 1

The letter graph of the word ababababab (the oval represents a clique). We use indices to indicate in which order the a-letters and the b-letters appear in the word.

Lemma 3

\(\ell (nK_2)=n\).

Proof

First, it is not difficult to see that \(\ell (nK_2)\le n\), since n letters suffice (one letter per edge). Assume \(\ell (nK_2)< n\), then there must exist a letter a representing at least 3 vertices of the graph. Clearly, \((a,a)\not \in D\), since otherwise a triangle arises. Then the neighbour of the middle a is different from a, say b. If this neighbour appears before the middle a, it must also be adjacent to the last a. If it appears after the middle a, it must also be adjacent to the first a. In both case, b has at least two neighbours. Therefore, \(\ell (nK_2)\ge n\).    \(\square \)

The above theorem shows that the lettericity is unbounded in the class \(\mathcal M\) of graphs of vertex degree at most 1. Therefore, it is also unbounded in the class \(\overline{\mathcal{M}}\), since \(\ell (G)=\ell (\overline{G})\).

Theorem 5

\(\mathcal M\) and \(\overline{\mathcal{M}}\) are the only two minimal hereditary subclasses of cographs of unbounded lettericity.

Proof

To prove the theorem, we will show that for any natural numbers \(p,t\ge 2\), the lettericity of a \((P_4,pK_2,\overline{tK}_2)\)-free graph G is at most \(2^{p+t-3}\). This will be shown by induction on \(p+t\). Moreover, we will show that G can be represented with a decoder D containing a source letter, i.e., a letter a such that \((a,b)\in D\) for any letter b, and a sink letter, i.e., a letter b such that \((b,a)\not \in D\) for any letter a.

If \(p=t=2\), then G is a threshold graph and its lettericity is at most 2, because any threshold graph can be represented over the decoder \(D=\{(a,a),(a,b)\}\). In this decoder, a is a source letter and b is a sink letter.

Assume that every \((P_4,pK_2,\overline{tK}_2)\)-free graph with \(p+t\le k\) can be represented as a letter graph over an alphabet of at most \(2^{p+t-3}\) letters with a decoder containing a source vertex a and a sink vertex b. Consider now a \((P_4,pK_2,\overline{tK}_2)\)-free graph G with \(p+t=k+1\).

The presence of source and sink letters in the decoder allows us to assume that G has neither dominating nor isolated vertices. Indeed, if v is dominating, then a word for G can be constructed from a word for \(G-v\) by adding a source letter as a prefix, and if v is isolated, then a word for G can be constructed from a word for \(G-v\) by adding a sink letter as a prefix. Therefore, in the rest of the proof we assume that G has neither isolated nor dominating vertices.

Case 1: G is disconnected. Denote by \(G_1\) a connected component of G and by \(G_2\) the rest of the graph. Observe that each of \(G_1\) and \(G_2\) contains a \(K_2\), since otherwise G has an isolated vertex. Therefore, each of \(G_1\) and \(G_2\) is \((p-1)K_2\)-free and hence we can apply induction to each of \(G_1\) and \(G_2\). In other words, \(G_1\) can be represented by a word \(\omega _1\) over an alphabet \(A_1\) of size at most \(2^{p+t-4}\) with a decoder containing a source vertex \(a_1\) and a sink vertex \(b_1\), and \(G_1\) can be represented by a word \(\omega _2\) over an alphabet \(A_2\) of size at most \(2^{p+t-4}\) with a decoder containing a source vertex \(a_2\) and a sink vertex \(b_2\) (we assume that \(A_1\) and \(A_2\) are disjoint). Then the word \(\omega =\omega _1\omega _2\) represents G over the alphabet \(A_1\cup A_2\) of size at most \(2^{p+t-3}\) with the decoder \(D=D_1\cup D_2\). In this decoder, vertex \(b_2\) is a sink vertex. To guarantee the presence of a source vertex, we add to D the pair \((a_2,c)\) for every vertex \(c\in A_1\). This extension transforms \(a_2\) into a source vertex and does not change the graph represented by the word \(\omega \), since every letter from \(A_1\) appears in \(\omega \) before any appearance of \(a_2\).

Case 2: G is connected. In this case, \(\overline{G}\) is disconnected and \((P_4, tK_2, \overline{pK_2})\)-free. A similar argument as above gives a representation for \(\overline{G}\) with at most \(2^{p + t - 3}\) letters, and complementing the corresponding decoder produces one for G (note that when doing that, sink letters become source letters and vice-versa).    \(\square \)

3.3 Boxicity

The boxicity box(G) of a graph G is the minimum dimension in which G can be represented as an intersection graph of hyper-rectangles. Equivalently, it is the smallest number of interval graphs on the same set of vertices whose intersection is G. The next lemma was shown in [20]; we give here a proof for the sake of completeness.

Lemma 4

box\((\overline{nK_2}) = n\).

Proof

To see that box\((\overline{nK_2}) \le n\), note that \(K_{2n}\) without an edge is an interval graph, and \(\overline{nK_2}\) is the intersection of n such graphs. Conversely, note that two different matched non-edges in \(\overline{nK_2}\) cannot belong to the same interval graph (since the corresponding four vertices would induce a \(C_4\), which is not an interval graph). Hence we need at least n interval graphs to obtain \(\overline{nK_2}\) as an intersection.

   \(\square \)

Lemma 5

Let \(G_1\) and \(G_2\) be two graphs. Then

$$box (G_1 \cup G_2) \le \max (box (G_1),box (G_2)) \;and \; box (G_1 \times G_2) \le box (G_1) + box (G_2).$$

Moreover, if \(G_2\) is a clique, then box\((G_1 \times G_2)=\) box\((G_1)\).

Proof

Suppose \(G_1 = \bigcap \limits _{i = 1}^s A_i\) and \(G_2 = \bigcap \limits _{i = 1}^t B_i\) where the \(A_i\) and \(B_i\) are interval graphs, and assume without loss of generality that \(s \ge t\). Put \(C_i = A_i \cup B_i\) for \(1 \le i \le t\) and \(C_i = A_i \cup K_{|V(G_2)|}\) for \(t < i \le s\). Put \(D_i = A_i \times K_{|V(G_2)|}\) for \(1 \le i \le s\) and \(D_i = K_{|V(G_1)|} \times B_{i - s}\) for \(s < i \le s + t\).

The \(C_i\) and \(D_i\) are interval graphs, and with the obvious labellings of \(C_i\) and \(D_i\), we have \(G_1 \cup G_2 = \bigcap \limits _{i = 1}^s C_i\) and \(G_1 \times G_2 = \bigcap \limits _{i = 1}^{s + t} D_i\).

For the final claim, if \(G_2 = K_{|V(G_2)|}\) is a clique, then \(G_1 \times G_2 = \bigcap \limits _{i = 1}^s (A_i \times K_{|V(G_2)|})\), and each of those is an interval graph.    \(\square \)

Theorem 6

\(\overline{\mathcal {M}}\) is the only minimal hereditary subclass of cographs of unbounded boxicity.

Proof

Let \(n \ge 2\). We prove by induction on n that \((P_4, \overline{nK_2})\)-free graphs have boxicity at most \(2^{n - 2}\). The result is true for \(n = 2\), since \((P_4, C_4)\)-free graphs are known to be interval graphs (see, e.g., [4]).

For the induction step, suppose the result is true for some \(n \ge 2\), and let G be a cograph that is \(\overline{(n + 1)K_2}\)-free. By Lemma 5, we may assume that G is connected, and in particular that \(G = G_1 \times G_2\) where neither of the cographs \(G_1\) or \(G_2\) is a clique. But then \(G_1\) and \(G_2\) each have a \(\overline{K_2}\), and so they are both \(\overline{nK_2}\)-free. The induction hypothesis applies, and another application of Lemma 5 gives us that box\((G) \le \) box\((G_1) + \)box\((G_2) \le 2^{n - 2} + 2^{n - 2} = 2^{n - 1}\) as required.    \(\square \)

3.4 H-Index

The H-index h(G) of a graph G is the largest \(k \ge 0\) such that G has k vertices of degree at least k. This parameter is important in the study of dynamic algorithms [9]. Clearly, H-index is unbounded for cographs, since it is unbounded for complete graphs. To characterise this parameter in terms of minimal subclasses of cographs with unbounded H-index, we start with a helpful lemma.

Lemma 6

Let \(G_1, \dots , G_t\) be graphs. Then

$$h(\bigcup \limits _{i = 1}^t G_i) \le \sum \limits _{i = 1}^t h(G_i), and \ h(G_1 \times G_2)\! \le \! \min (h(G_1) + |V(G_2)|, h(G_2) + |V(G_1)|).$$

Proof

For the first bound, note that for any j, \(1 + \sum _i h(G_i) > h(G_j)\). In particular, by definition of the H-index, each \(G_j\) has at most \(h(G_j)\) vertices of degree \(1 + \sum _i h(G_i)\) or more, and so \(\bigcup _j G_j\) has at most \(\sum _j h(G_j)\) vertices of degree at least \(1 + \sum _i h(G_i)\), from which the claim follows.

For the other bound, note that \(G_1 \times G_2\) has at most \(|V(G_2)|\) vertices of degree at least \(h(G_1) + |V(G_2)| + 1\) coming from \(G_2\), and at most \(h(G_1)\) coming from \(G_1\), sinceFootnote 1 \(\deg _{G_1 \times G_2}(v) = \deg _{G_1}(v) + |V(G_2)|\) for any \(v \in G_1\), and \(G_1\) does not have more than \(h(G_1)\) vertices of degree \(h(G_1) + 1\). By definition of the H-index, we obtain that \(h(G_1 \times G_2) \le h(G_1) + |V(G_2)|\), and the claim follows by symmetry.

   \(\square \)

Theorem 7

\(\mathcal {K}\), \(\mathcal B\) and the class \(\mathcal F\) of star forests are the only minimal hereditary subclasses of cographs of unbounded H-index.

Proof

One can check that those are, indeed, minimal hereditary classes of unbounded H-index. To see they are the only ones, let \(p, q, r, s \ge 1\). We will show by induction on \(p + r\) that if G avoids \(K_p\), \(K_{q, q}\) and \(rK_{1, s}\), then the H-index of G is bounded by a constant H(pqrs). For the base case, note that if \(p = 1\), this is trivial, and if \(r = 1\), then G is \((K_p,K_{1,s})\)-free and therefore the maximum vertex degree in G is bounded by R(ps). This in turn implies that \(h(G)\le R(p, s)\). We may thus assume \(p, r \ge 2\).

If \(G = G_1 \times G_2\) is a join of non-empty graphs, then not both \(G_1\) and \(G_2\) have more than R(pq) vertices. Indeed, if both do, then either one of them contains a clique of size p, which is forbidden, or they both have independent sets of size q, which again cannot happen since \(K_{q, q}\) is forbidden. Without loss of generality, we may assume that \(|V(G_2)| \le R(p, q)\). In this case, by Lemma 6, \(h(G) \le h(G_1) + R(p, q)\). Since \(|V(G_2)| \ge 1\), \(G_1\) is \(K_{p - 1}\)-free, so by the induction hypothesis, \(h(G_1)\) is bounded by \(H(p - 1, q, r, s)\).

If \(G = \bigcup \limits _{i = 1}^t G_i\) is a union of connected graphs, we may write \(G = G_1 \cup \dots G_l \cup G'\), where \(G_1, \dots , G_l\) each have a \(K_{1, s}\), and \(G'\) is \(K_{1, s}\)-free (we may have \(l = 0\)). Since \(K_p\) and \(K_{1, s}\) are forbidden for \(G'\), the maximum vertex degree, and hence the H-index of \(G'\), is bounded by R(ps). Moreover, if \(l \ge 2\) and so two of the components of G do have a \(K_{1, s}\), then we may write G as the union of two graphs that are \((r - 1)K_{1, s}\)-free, and by Lemma 6, \(h(G) \le 2H(p, q, r - 1, s)\). Finally, if only one component has a \(K_{1, s}\), then that component is a join of non-empty graphs and we obtain, again by Lemma 6 and from the previous paragraph, \(h(G) \le H(p - 1, q, r, s) + R(p, q) + R(p, s)\).

Combining the above, we obtain

$$H(p, q, r, s) \le \max (H(p - 1, q, r, s) + R(p, q) + R(p, s), 2H(p, q, r - 1, s)).$$

   \(\square \)

3.5 Achromatic Number

A complete k-colouring is a partition of G into k independent sets (the “colour classes”) such that any two independent sets in the partition have at least one edge between them. The achromatic number \(\psi (G)\) of a graph G is the maximum number k such that G admits a complete k-colouring. Computing this parameter is a difficult task even for cographs and interval graphs [3].

Note that the class \(\mathcal K\) of complete graphs and the class \(\mathcal M\) of matchings have unbounded achromatic number. Indeed, this is clear for complete graphs, and we note that \({n \atopwithdelims ()2}K_2\) admits a complete n-colouring where each edge of the matching joins two of the colour classes. We claim that among cographs, those are the only minimal classes of unbounded achromatic number. To show this, we start with a short lemma.

Lemma 7

Let r, \(s \in \mathbb N\). The class of \((K_r, sK_2, P_4)\)-free graphs has bounded neighbourhood diversity.

Proof

From Theorem 3, the only minimal subclasses of cographs where neighbourhood diversity is unbounded are \(\mathcal M\), \(\overline{\mathcal M}\) and \(\mathcal T\). \(K_r\) belongs to both \(\overline{\mathcal M}\) and \(\mathcal T\), while \(sK_2\) belongs to \(\mathcal M\).    \(\square \)

We are now ready to prove the main result of this section.

Theorem 8

\(\mathcal {K}\) and \(\mathcal M\) are the only minimal hereditary subclasses of cographs of unbounded achromatic number.

Proof

It suffices to show that for any r, \(s \in \mathbb N\), the class of \((K_r, sK_2, P_4)\)-free graphs has bounded achromatic number. Let G be a graph in this class. By Lemma 7, the class has bounded neighbourhood diversity. In other words, there is a constant k (independent of G) such that the vertex set of G can be partitioned into k similarity classes, each similarity class being a clique or an independent set. Moreover, since the size of cliques is bounded by r, we may further assume that each of these similarity classes is an independent set. Let \(G'\) be the quotient of G by this partition, i.e., the graph whose vertices are the independents sets, with two vertices being adjacent if and only if the corresponding sets are complete to each other.

Now consider a t-colouring of G, and interpret the colours as vertices of the complete graph \(K_t\). From each edge e of \(G'\), we obtain a complete bipartite subgraph of \(K_t\) as follows: if the edge e in \(G'\) joins independent sets \(A_1\) and \(A_2\), then the two sets are complete to each other, so the sets of colours \(I_1, I_2 \subseteq V(K_t)\) appearing in \(A_1\) and \(A_2\) respectively are disjoint. The complete bipartite graph \(B^e\) corresponding to e has \(I_1\) and \(I_2\) as its parts. With this set-up, the t-colouring is complete if any only if the edges of the graphs \({B^e}_{e \in E(G')}\) cover the edges of \(K_t\). From [13], we need at least \(\lceil \log _2(t)\rceil \) complete bipartite graphs to cover \(K_t\). It follows that \(t \le 2^{|E(G')|} \le 2^{k \atopwithdelims ()2}\), as required.    \(\square \)

4 The Hierarchy

In this section, we bring together the different pieces of our analysis and draw a hierarchy of the parameters studied in this paper. Each parameter p is presented in Fig. 2 together with a collection M(p) of minimal hereditary subclasses of cographs where p is unbounded. We say that a parameter \(p_1\) is stronger than a parameter \(p_2\) if the family of classes where \(p_1\) is bounded contains the family of classes where \(p_2\) is bounded. It is not difficult to see that \(p_1\) is stronger than \(p_2\) if for every class \(X\in M(p_1)\) there exists a class \(Y\in M(p_2)\) such that \(Y\subseteq X\).

Fig. 2.
figure 2

A Hasse diagram of graph parameters within the universe of cographs

5 Conclusion and Open Problems

There are many other interesting parameters that are unbounded in the class of cographs, such as linearity [6], shrub-depth [14] or distinguishing number [2]. However, surprisingly, there are not so many “interesting” subclasses of cographs that appear in the characterization of those parameters. For instance, shrub-depth and distinguishing number can be characterised without extending the set of classes studied in this paper. Understanding this phenomenon is a challenging research problem.

As we observed earlier, computing the achromatic number is an NP-complete problem for cographs, and again due to well-quasi-orderability of cographs there must exist a finite collection of minimal hereditary subclasses of cographs, where the problem is NP-complete. Identifying this collection is one more open problem.