1 Introduction and Preliminaries
Let be an undirected graph. A (proper vertex) coloring of is a surjective function such that implies . The minimum number of colors such that there is a coloring of is known as the chromatic number . A greedy coloring of is obtained by ordering the set of colors and coloring the vertices of in a random order with the first available color. The Grundy number is the maximum number of colors required in a greedy coloring of [2]. Obviously . Determining [7] and [12] are NPcomplete problems. A graph is called wellcolored if [12]. It is hereditarily wellcolored if every induced subgraph is wellcolored.
Definition 1.1 ([3]).
A graph is a cograph if , is the disjoint union of cographs , or is a join of cographs .
This recursive construction induces a rooted tree , whose leaves are individual vertices corresponding to a and whose interior vertices correspond to the union and join operations. We write for the leaf set and for the set of inner vertices of . The set of children of is denoted by . For edges in we adopt the convention that is a child of . We define a labeling function , where an interior vertex of is labeled if it is associated with a disjoint union, and for joins. The set denotes the leaves of that are descendants of . To simplify the notation we will write for the subgraph of induced by the vertices in . Note that is the graph consisting of the single vertex if is a leaf of .
Given a cograph , there is a unique discriminating cotree^{1}^{1}1In [3] the discriminating cotree is defined as the cotree associated with . Here we call every tree arising from Def. 1.1 a cotree of . in which adjacent operations are distinct, i.e., for all interior edges . It is possible to refine the discriminating cotree by subdiving a disjoint union or join into multiple disjoint unions or joins, respectively [1, 3]. It is well known that every induced subgraph of a cograph is again a cograph. A graph is a cograph if and only if it does not contain a path on four vertices as an induced subgraph [3]. The cographs are also exactly the hereditarily wellcolored graphs [2]. The chromatic number of a cograph can be computed recursively, as observed in [3, Tab.1]. Starting from as base case we have
(1) 
Hierarchically colored cograph (hccographs) were introduced in [5] as the undirected colored graphs recursively defined by
 (K1)

, i.e., a colored vertex, or
 (K2)

and , or
 (K3)

and ,
where for every , and and are hccographs.
This recursive construction of an hccograph implies a binary cotree . Its inner vertices can be associated with the intermediate graphs in the construction. We say that is an hccoloring w.r.t. .
Obviously, the graph underlying an hccograph is a cograph.
Definition 1.2.
Let be a cograph. A coloring of is an hccoloring of if there is binary cotree of such that is hccograph w.r.t. .
This contribution aims to investigate the properties of hccolorings and their relationships with other types of cograph colorings.
2 Existence of hcColorings
As noticed in [5], a coloring of a cograph may be an hccoloring w.r.t. some cotree but not w.r.t. to another cotree that yields the same cograph. An example is shown in Fig. 1.
Theorem 2.1.
Let be an hccoloring of a cograph . Then .
Proof.
We proceed by induction w.r.t. . The statement is trivially true for , i.e. , since . Now suppose . Thus or for some graphs and with . By induction hypothesis we have and .
First consider . Since for all and we have , and hence . Thus, and therefore,
We note that the coloring condition in (K2) therefore only enforces that is a proper vertex coloring.
Now suppose . Axiom (K3) implies . Hence,
∎
As detailed in [2], we have . Thus, it seems natural to ask whether every greedy coloring is an hccoloring. Making use of the fact that , we assume w.l.o.g. that the color set is whenever we consider greedy colorings of a cograph. By definition of greedy colorings and the fact that cographs are hereditarily wellcolored, we immediately observe
Lemma 2.2.
Let be a greedy coloring of a cograph and a connected component of . Then is colored by .
We shall say that a cograph is a minimal counterexample for some property if (1) does not satisfy and (2) every induced subgraph of (i.e., every “smaller” cograph) satisfies .
Lemma 2.3.
Let be a cograph, an arbitrary binary cotree for and a greedy coloring of . Then is an hccoloring w.r.t. .
Proof.
Assume is a minimal counterexample, i.e., is a minimal cograph for which a coloring exists that is a greedy coloring but not an hccoloring. If is connected, then , for some and , i.e., (K2) is satisfied. By assumption, is not an hccoloring, hence must fail to be an hccoloring on at least one of the connected components , contradicting the assumption that is a minimal counterexample. Thus, cannot be connected.
Therefore, assume for some . Since is represented by a binary cotree , the root of must have exactly two children and . Hence, we can write . Since is a minimal counterexample, we can conclude that induces an hccoloring on and . However, since is, in particular, a greedy coloring of and , or most hold. But this immediately implies that satisfies (K3) and thus is an hccoloring of . Therefore, is not a minimal counterexample, which completes the proof. ∎
As an immediate consequence we find
Corollary 2.4.
Every cograph has an hccoloring.
The converse of Lemma 2.3 is not true. Fig. 2 shows an example of an hccoloring that is not a greedy coloring.
Theorem 2.5.
A coloring of a cograph is greedy coloring if and only if it is an hccoloring w.r.t. every binary cotree of .
Proof.
By Lemma 2.3, every greedy coloring is an hccoloring for every binary cotree . Now suppose is an hccoloring for every binary cotree and let be a minimal cograph for which is not a greedy coloring. As in the proof of Lemma 2.3 we can argue that cannot be a minimal counterexample if is connected: in this case, and for all colorings, and thus is a greedy coloring if and only if it is a greedy coloring with disjoint color sets for each . Hence, a minimal counterexample must have at least two connected components.
Let for some and define a partition of into sets , , such that for every , if and only if . Since every , , is a cograph, each can be represented by a (not necessarily unique) binary cotree . Note, we have for all . Now, we can construct a binary cotree for as follows: let be a caterpillar with leaf set . We choose (in Newick format). Note, if , then . Now, the root of every tree is identified with a unique leaf in such that the root of is identified with and the root of is identified with , where if and only if . This yields the tree . The labeling for is provided by keeping the labels of each and by labeling all other inner vertices of by . It is easy to see that is a binary cotree for . By hypothesis, this in particular implies that is an hccoloring w.r.t. . We denote by the set of inner vertices of . Since is an hccoloring w.r.t. and thus in particular w.r.t. any subtree , we have for any , , by (K3). Hence, as , it must necessarily hold for all , i.e., all connected components with the same chromatic number are colored by the same color set. By construction, at every node of the caterpillar structure, with children and , the components and satisfy . Invoking (K3) we therefore have and is colored by the color set . These set inclusions therefore imply a linear ordering of the colors such that colors in come before those in . Thus is a greedy coloring provided that the restriction of to each of the connected components of is a greedy coloring, which is true due to the assumption that is a minimal counterexample. Thus no minimal counterexample exists, and the coloring is indeed a greedy coloring of . ∎
Given an hccograph, it is not difficult to recover a corresponding binary cotree. To this end, we proceed top down. Denote the root of by . It is associated with the graph . In the general step we consider an induced subgraph of associated with a vertex of . If is connected, then and is the joint of pair of induced subgraphs and . To identify these graphs, consider the connected components of the complement of . We have
(2) 
We therefore set and . By construction, we therefore have with disjoint color sets . If is disconnected, define , identify one of the components, say , with the smallest numbers of colors and set and . The fact that is an hccograph ensures that . In both the connected and the disconnected case we attach and as the children of in . The reconstruction of can be preformed in linear time.
3 RecursivelyMinimal Colorings
Not every minimal coloring of a cograph is an hccoloring. For instance, if is a disconnected cograph, i.e., , then it suffices that . In this case, we may use more colors than necessary on a connected component of , resulting in . Thus, Theorem 2.1 implies that is not an hccoloring of and hence, by definition, not an hccoloring of . This suggests to consider another class of colored cographs.
Definition 3.1.
A colorminimal cograph is either a , the disjoint union of colorminimal cographs or the join of colorminimal cographs, and satisfies . A coloring of a colorminimal cograph will be called recursively minimal.
Colorminimal cographs thus are those colorings for which every constituent in their construction along some binary cotree is colored with the minimal number of colors. Since every greedy coloring of every cograph satisfies this condition, every cograph has a recursively minimal coloring.
Theorem 3.1.
Let be a cograph. A coloring of is recursively minimal if and only it is an hccoloring.
Proof.
Since every hccoloring of a cograph uses exactly colors, the recursive definition of hccolorings immediately implies that is recursively minimal.
Now suppose there is a minimal cograph with a coloring that is recursively minimal but not an hccoloring. If is connected, then for some and the restrictions of to the connected components use disjoint color sets. Hence, is an hccoloring whenever the restriction to each is an hccoloring. Thus a minimal counterexample cannot be connected. Now suppose for some . Since is by assumption a minimal counterexample, each connected component is an hccograph. By Equ. (1) there is a connected component, say w.l.o.g. , such that . By definition, induces a recursively minimal coloring on and on . Since is a minimal counterexample, and are hccolorings of and , respectively, in other words and are hccographs. Moreover, implies . In summary, therefore, satisfies (K3), thus it is a cograph with hccoloring . Hence, there cannot exist a minimal cograph with a coloring that is recursively minimal but not an hccoloring. ∎
Recursively minimal colorings can be constructed in a very simply manner by stepwisely relabeling colors of disconnected subgraphs as outlined in Alg. 1.
Theorem 3.2.
Given a cograph , Algorithm 1 returns a recursively minimal coloring of . Moreover, every recursively minimal coloring of a cograph can be constructed with this algorithm.
Proof.
The bottomup traversal of the cotree ensures that for every inner vertex of , the subgraphs induced by its children are colorminimal cographs. In particular this means that for all . Take an arbitrary . Suppose . The fact that is a discriminating cotree implies that all , for all , and therefore are connected components. Futhermore, there exists a such that . These observations and Equ. (1) guarantee that lines 57 obtain a set of color such that . Explicitly, and . An injective recoloring , in lines 811, assures that and therefore . This implies that is a colorminimal cograph with a recursively minimal coloring. The converse is followed by the fact that every recursively minimal coloring can be obtained with a particular injection . ∎
Algorithm 1 can be modified easily to construct a recursively minimal coloring of with respect to a user defined cotree . It suffices to replace the connected components of by the (not necessarily connected) induced subgraphs corresponding to the children of . Since , it suffices to choose the color set of the child that uses the largest number of colors and recolor all other childgraphs with this color set. For completeness, we summarize this variant in Algorithm 2.
The recursive structure of hccographs can also be used to count the number of distinct hccolorings of a cograph that is explained by a cotree . For an inner vertex of denote by the number of hccolorings of . If is a leaf, then . Recall that is binary by Def. 1.2, i.e., . For , we have since the color sets are disjoint. If , assume, w.l.o.g. , , where is the number of injections between a set of size into a set of size , i.e., .
The total number of hccolorings can be obtained by considering a caterpillar tree for the stepwise union of connected components. For each connected component with , and there are choices of the colors, i.e., injections and thus colorings. We note in passing that the chromatic polynomial of a cograph, and thus the number of colorings using the minimal number of colors, can be computed in polynomial time [8]. There does not seem to be an obvious connection between the hccolorings and the chromatic polynomial, however.
4 Concluding Remarks
The cotrees associated with a cograph are a special case of the modular decomposition tree [4], which in addition to disjoint unions and joins also contains socalled prime nodes. The latter have a special structure known as spiders, which also admit a welldefined unique decomposition in socalled sparse graphs [6]. For this type of graphs it also makes sense to consider recursively minimal colorings. More generally, many interesting classes of graphs admit recursive constructions [10, 9]. For every graph class that has a recursive construction, one can ask whether minimal colorings can be constructed from optimal colorings, i.e., whether recursively minimal colorings exist. In some cases, such Cartesian products of graphs, where equals the maximum of the chromatic numbers of the factors [11]
, this seems rather straightforward. In general, however, the answer is probably negative.
Acknowledgments
This work was support in part by the German Federal Ministry of Education and Research (BMBF, project no. 031A538A, de.NBIRBC) and the Mexican Consejo Nacional de Ciencia y Tecnología (CONACyT, 278966 FONCICYT2).
References
 [1] Sebastian Böcker and Andreas W. M. Dress. Recovering symbolically dated, rooted trees from symbolic ultrametrics. Adv. Math., 138:105–125, 1998.
 [2] C. A. Christen and S. M. Selkow. Some perfect coloring properties of graphs. J. Comb. Th., Ser. B, 27:49–59, 1979.
 [3] D. G. Corneil, H. Lerchs, and L. Steward Burlingham. Complement reducible graphs. Discr. Appl. Math., 3:163–174, 1981.
 [4] T. Gallai. Transitiv orientierbare graphen. Acta Math Acad. Sci. Hungaricae, 18:25–66, 1967.
 [5] Manuela Geiß, Marc Hellmuth, and Peter F. Stadler. Reciprocal best match graphs. 2019. submitted, arxiv qbio 1903.07920.
 [6] B. Jamison and S. Olariu. A tree representation for sparse graphs. Discrete Appl. Math., 35:115–129, 1992.
 [7] Richard M. Karp. Reducibility among combinatorial problems. In R E Miller, J W Thatcher, and J D Bohlinger, editors, Complexity of Computer Computations, pages 85–103. Plenum, New York, 1972.
 [8] J. A. Makowsky, U. Rotics, I. Averbouch, and B. Godlin. Computing graph polynomials on graphs of bounded cliquewidth. In F. V. Fomin, editor, GraphTheoretic Concepts in Computer Science, volume 4271 of Lecture Notes Comp. Sci., pages 191–204, Berlin, Heidelberg, 2006. Springer.
 [9] Marc Noy and Ares Ribó. Recursively constructible families of graphs. Adv. Appl. Math., 32:350–363, 2004.
 [10] Andrzej Proskurowski. Recursive graphs, recursive labelings and shortest paths. SIAM J. Comput., 10:391–397, 1981.
 [11] Gerd Sabidussi. Graphs with given group and given graphtheoretical properties. Canad. J. Math., 9:515–525, 1957.
 [12] Manouchehr Zaker. Results on the Grundy chromatic number of graphs. Discr. Math., 306:3166–3173, 2006.
Comments
There are no comments yet.