vol. 26:320241210.46298/dmtcs.116572023-07-27; 2023-07-27; 2024-04-11; 2024-09-232024-10-02
Recognition of chordal graphs and cographs which are Cover-Incomparability graphs
Abstract
Cover-Incomparability graphs (C-I graphs) are an interesting class of graphs from posets. A C-I graph is a graph from a poset with vertex set , and the edge-set is the union of edge sets of the cover graph and the incomparability graph of the poset. The recognition of the C-I graphs is known to be NP-complete (Maxová et al., Order 26(3), 229–236(2009)). In this paper, we prove that chordal graphs having at most two independent simplicial vertices are exactly the chordal graphs which are also C-I graphs. A similar result is obtained for cographs as well. Using the structural results of these graphs, we derive linear-time recognition algorithms for chordal graphs and cographs which are C-I graphs.
keywords:
Cover-Incomparability graphs; Chordal graph; Cographs; Recognition Algorithm.1 Introduction
The cover-incomparability graphs of posets, or shortly C-I graphs form an interesting class of graphs from posets. These graphs were introduced in [8] as the underlying graphs of the so-called standard transit function of posets. The C-I graphs are precisely the graphs whose edge set is the union of edge sets of the cover graph and the incomparability graph (complement of a comparability graph) of a poset. Graph-theoretic characterization of C-I graphs has not been known until now and, moreover, the recognition complexity of C-I graphs is NP-complete (Maxová et al. [24]). Hence, problems in C-I graphs are focused on identifying the structure and characterization of well-known graph families, which are C-I graphs. Such C-I graphs studied include the family of split graphs, block graphs [7], cographs [9], Ptolemaic graphs [25], distance-hereditary graphs [25], and -trees [23]. The C-I graphs were identified among the planar and chordal graphs along with new characterizations of the Ptolemaic graphs, respectively, in [4] and [3]. It is also interesting to note that every C-I graph has a Ptolemaic C-I graph as a spanning subgraph [4]. C-I graphs are also studied among the comparability graphs [1]. The effect of composition operation, lexicographic, and strong products of C-I graphs was studied in a recent paper [2].
Another approach in the theory of C-I graphs is to study posets whose cover-incomparability graphs exhibit specific properties [7, 8, 9]. Characterizations of posets whose cover-incomparability graphs are distance-hereditary and Ptolemaic were given in [8], while those for cographs appear in [9], and for block graphs and split graphs in [7], in terms of forbidden isometric subposets. However, the characterization in terms of forbidden ‘isometric subposets’ in [7, 8, 9] was an error, and it was resolved in [6] by introducing -preserving subposets instead of isometric subposets.
Chordal graphs or triangulated graphs are graphs that do not have induced cycles of length greater than three. Together with cographs, which are exactly -free graphs, they form two well-studied graph classes that have wider applications beyond mathematics. These two classes of graphs and their subclasses are also studied in many contexts, including theoretical, practical, and algorithmic interests. A vertex of a graph is a simplicial vertex if together with all its adjacent vertices forms a clique (a complete subgraph) in . It is a well-known fact that every chordal graph contains at least one simplicial vertex, and a non complete chordal graph contains at least two nonadjacent simplicial vertices. Chordal graphs that contain exactly two non-adjacent simplicial vertices form a special class of chordal graphs.
The recognition algorithm for an arbitrary chordal graph [30, 27] and a cograph [14] is well known and has linear-time complexity. In this paper, we identify chordal graphs having exactly two non-adjacent simplicial vertices and prove that they are C-I graphs. In other words, we prove that the intersection of the class of chordal graphs and the class of C-I graphs is precisely the class of chordal graphs having exactly two non-adjacent simplicial vertices. We further develop a linear-time algorithm for recognizing such chordal graphs. It is interesting to observe, from [4, 7], that in the class of C-I graphs, the classes of chordal, strongly chordal, and interval graphs are one and the same.
In this paper, similar to the chordal C-I graphs, we develop a linear-time recognition algorithm for cographs which are also C-I graphs from the structural results already proved in [9]. For this algorithm, we make use of the special type of cotree structure of cographs.
Chordal graphs are precisely the intersection graphs of subtrees of a tree [20]. Most of the information contained in a chordal graph is captured in its clique tree representation, which is useful for its algorithmic applications [20, 29].
Cographs are exactly the -free graphs and the class of cographs has been intensively studied since its definition by Seinsche [28]. The cographs appear as comparability graphs of series-parallel partial orders [22], and can be generated from the single-vertex graph by complementation and disjoint union operations. It is well known that any cograph has a canonical tree representation called a cotree. This tree decomposition scheme for cographs is a particular case of modular decomposition [19] that applies to arbitrary graphs. Indeed, the algorithm that computes the modular tree decomposition of an arbitrary graph in linear-time can also recognize cographs in linear-time. In 1994, linear-time modular decomposition algorithms were designed independently by Cournier and Habib [15] and by McConnell and Spinrad [26]. In 2001, Dahlhaus et al. [16] proposed a simpler algorithm. In 2004, Habib and Paul [21] proposed a new algorithm, which is not incremental, and instead of building the cotree directly, it first computes a special ordering of the vertices, namely a factorizing permutation, using a very efficient partition refinement techniques via two elementary refinement rules.
A search of a graph visits all vertices and edges of the graph and will visit a new vertex only if it is adjacent to some previously visited vertex. The two fundamental search strategies are Breadth-First Search (BFS) and Depth-First Search (DFS). As the names indicate, BFS visits all previously unvisited neighbors of the currently visited vertex before visiting the previously unvisited non-neighbors. Several greedy recognition algorithms for chordal graphs are known. The most famous is Lex-BFS [27], a variant of , introduced by Rose et al. in [27] and Maximum Cardinality Search (MCS for short) [30]. Both algorithms are linear. The recognition of chordal graphs involves two distinct phases: the execution of MCS or Lex-BFS in order to compute an elimination ordering and a checking procedure to decide whether this elimination ordering is perfect (PEO). By employing Lex-BFS as a basic method to check the chordality and to find the perfect elimination ordering, the recognition algorithm for the chordal graphs can be done in linear-time for chordal graphs which are C-I graphs. For cographs, using the BFS, we can check whether a given rooted tree is the cotree of the C-I cograph in linear-time because of the special structure of the cotrees of these graphs.
The rest of this section is organized as follows. In Section 2, we begin with some preliminaries. In Section 3, we characterize chordal C-I graphs in terms of the number of independent simplicial vertices and present a linear-time algorithm for recognizing chordal C-I graphs based on this characterization. In Section 4, we present a structure of the C-I cograph and characterize the structure of the cotree of C-I cographs and, using this, present a linear-time recognition algorithm for C-I cographs.
2 Preliminaries
A partially ordered set or poset consists of a nonempty set and a reflexive, antisymmetric, transitive relation on , denoted as . We call an element of . If or in , we say and are comparable, otherwise incomparable. If but , then we write . If and are in , then covers in if and there is no in with , denoted by . We write if but not . By , we mean that and are incomparable elements of . In this paper, we consider only posets defined on finite sets. Let and be a poset, is called a subposet of , if if and only if , for any . The subposet is a chain (antichain) in , if every pair of elements of is comparable (incomparable) in . A chain of maximum cardinality is named as the height of denoted as . An element in is a minimal (maximal) if there is no such that in . A finite ranked poset (also known as graded poset [11]) is a poset that is equipped with a rank function satisfying:
-
•
has value on all minimal elements of , and
-
•
preserves covering relations: if then .
A ranked poset is said to be complete if for every , every element of rank covers all elements of rank . For a completely ranked poset we say that the element is at height if . For disjoint posets, and , the sum of the posets, is defined as the poset , where in , if and only if in or in . We refer to [11], for notions of posets.
Let be a connected graph, vertex set and edge set of denoted as and respectively, the complement of is denoted as . For a vertex , the set of all vertices adjacent to is called the open neighborhood of and is denoted by . The set consisting of the open neighborhood and the vertex is the closed neighborhood of and is denoted by . A tree is a graph in which two vertices are connected by exactly one path. Let be a rooted tree and two vertices and in , we say that is an ancestor of and is a descendant of if lies on the path from to the root of . For a set of leaves of , we say that the lowest common ancestor (LCA) of is the internal node of such that is the root of the smallest rooted subtree of containing . A graph is said to be a subgraph of if and . is an induced subgraph of if for and implies . A graph is said to be H-free if has no induced subgraph isomorphic to . A complete graph is a graph whose vertices are pairwise adjacent, denoted , a set is a clique if the subgraph of induced by is a complete graph, and a maximum clique is a clique that is not contained by any other clique. A vertex is called simplicial vertex if its neighborhood induces a complete subgraph. An independent set in a graph is a set of pairwise non-adjacent vertices. If graphs and have disjoint vertex set and and edge set and respectively, then their union has and and their join, denoted by , consists of and all edges joining with .
A graph is chordal if it contains no induced cycles of length more than 3. A graph is distance-hereditary if every induced path is also the shortest path in . A graph is Ptolemaic if it is distance-hereditary and chordal. Equivalently, is Ptolemaic if and only if it is a 3-fan-free chordal graph. -free graphs are called cographs. A graph that is both chordal and cograph is called chordal cograph, also known as trivially perfect graph. Let be a poset. A graph is the cover graph of if and if and only if either or in . Similarly, is the comparability graph of if and if and only if and are comparable in . The incomparability graph is the complement of the comparability graph. Finally, the cover-incomparability graph (C-I graph) of a poset denoted as is the graph , where , if or or in . A graph is a C-I graph if it is the C-I graph of some poset . It may be noted that the class of C-I graphs is not a hereditary class in the sense that every induced subgraph of a C-I graph need not be a C-I graph. We call a graph that is both a chordal and a C-I graph as a chordal C-I graph. Similarly, we use the term Ptolemaic C-I graph, C-I cograph, chordal C-I cograph, etc. to denote the C-I graph which is Ptolemaic, cograph, chordal cograph, etc.
In Figure 1 (a), we illustrates the Hasse diagram of a poset , which is isomorphic to the cover graph of . Figure 1(b), depicts the incomparability graph of the poset , and in Figure 1(c), we depicts the C-I graph of . As already mentioned, the class of C-I graphs is not hereditary; for example, the 4-fan is a C-I graph (as shown in Figure 1(c)), but the claw graph is an induced subgraph of this graph, which is not a C-I graph.
Now we recall some basic properties of posets and their C-I graphs.
Lemma 1.
[8] Let P be a poset. Then
-
(i)
the C-I graph of P is connected;
-
(ii)
points of P that are independent in the C-I graph of P lie on a common chain;
-
(iii)
an antichain of P corresponds to a complete subgraph in the C-I graph of P;
-
(iv)
the C-I graph of P contains no induced cycles of length greater than 4.
Lemma 2.
[25] If is a C-I graph, then does not contain 3 independent simplicial vertices.
Lemma 3.
[25] Let be a poset and its C-I graph. If is a simplicial vertex in , then is a maximal or a minimal element of .
Theorem 1.
[23] Let be a C-I graph of a poset and a minimal or maximal element in . Then is also a C-I graph.
In the following sections, we discuss algorithms for recognizing chordal C-I graphs and C-I cographs.
3 Structure of chordal C-I graphs
In this section, we study the structure of chordal C-I graphs. For that, we prove that a chordal graph having exactly two independent vertices is a chordal graph that is also a C-I graph.
If is a simplicial vertex of a chordal graph , then the closed neighborhood is a clique in . So removal of does not affect the chordal property of . This is stated in the following remark.
Remark 1.
If is a chordal graph and is a simplicial vertex, then is chordal.
Lemma 4.
Let be a chordal graph, and be a simplicial vertex of . If has exactly two independent simplicial vertices, then either is chordal and has exactly two independent simplicial vertices or is a complete graph.
Proof.
Let be a chordal graph with exactly two independent simplicial vertices and be a simplicial vertex. Then by Remark 1, is a chordal graph. Since is a simplicial vertex, the removal of from does not increase the number of independent simplicial vertices in . And if is not a complete graph, then removal of from does not decrease the number of independent simplicial vertex in . That is, has exactly two independent simplicial vertices, otherwise is a complete graph. Hence the lemma. ∎
Corollary 1.
Let be a chordal C-I graph and be a simplicial vertex of . If has exactly two independent simplicial vertices, then is a chordal C-I graph and has exactly two independent simplicial vertices or is a complete graph.
A pendant clique of a graph is a clique that contains a clique separator such that one of the components obtained after removing is a single vertex. Observe that if is a chordal graph, then has a pendant clique.
Let be a chordal graph having at most two independent simplicial vertices. We denote by the family of chordal graphs obtained from by adding a vertex to such that is adjacent to some or all vertices in a pendant clique of .
The following remark is immediate.
Remark 2.
Let be a chordal graph having exactly two independent simplicial vertices. If is the graph obtained by adding a simplicial vertex to such that the resulting graph has exactly two independent simplicial vertices, then belongs to the family .
Lemma 5.
Let be a chordal C-I graph having exactly two independent simplicial vertices, and let be a graph obtained by adding a simplicial vertex to . If has exactly two independent simplicial vertices, then is a chordal C-I graph.
Proof.
Let be a chordal graph obtained by adding a simplicial vertex to a chordal that has exactly two independent simplicial vertices such that also has exactly two independent simplicial vertices. Then by Remark 2, the vertex is such that is adjacent to some or all vertices in a pendant clique in .
Now we need to prove that is a chordal C-I graph. Since is both a C-I graph and chordal, let be a poset such that . Since the vertex is added to some or all vertices in a pendant clique in , the graph is chordal. Since is chordal and has exactly two independent simplicial vertices, has exactly two pendant cliques, and the two pendent cliques are formed, respectively, by and , where and are defined as follows.
,
, ,
and
. Now is adjacent to some or all vertices of the set or in . If is adjacent to some vertices of , then must be adjacent to all the elements of , as otherwise there will be more than two independent simplicial vertices. Similarly, if is adjacent to some vertices of , then must be adjacent to all elements of . Now, we construct a poset from as follows.
If adjacent to some vertices of :
-
•
If is adjacent to only the elements in , then is constructed from with the covering relation defined as for all .
-
•
If is adjacent to the elements of , where , then is constructed from with the covering relation as for all and for all for some .
-
•
If is adjacent to all elements of , then is constructed from with the covering relation defined as for all .
Similarly, if adjacent to some vertices of :
-
•
if is adjacent to only the elements in then is constructed from with the covering relation defined as for all .
-
•
if is adjacent to the elements of , where , then is constructed with the covering relation defined as for all and for all and some .
-
•
If is adjacent to all elements of , then is constructed from with the covering relation for all .
It follows from construction that is a well-defined poset and that is isomorphic to . That is, is a chordal C-I graph. Hence the lemma. ∎
A perfect elimination ordering (PEO) is an ordering of vertices in such that the neighborhood of is a clique of the subgraph induced by the vertices of . The following characterizations of chordal graphs are well known.
Theorem 2.
[18] A graph is chordal if and only if has a perfect elimination ordering.
Lemma 6.
[17] Every chordal graph has a simplicial vertex. If is not complete, then it has two non-adjacent simplicial vertices.
In the following, we prove an interesting characterization of C-I chordal graphs as precisely those chordal graphs having exactly two independent simplicial vertices.
Theorem 3.
Let be a chordal graph. Then is a C-I graph if and only if is a complete graph or has exactly two independent simplicial vertices.
Proof.
Suppose is a chordal and C-I graph, then is a complete graph, or contains exactly two independent simplicial vertices by Lemma 2 and 6.
Conversely, every complete graph is a C-I graph. It remains to prove that if is chordal and has exactly two independent simplicial vertices, then is a C-I graph.
Let be the chordal graph with the vertex set . Since is chordal, there is a perfect elimination ordering(PEO), let be a PEO in . By the definition of PEO on a chordal graph, the neighborhood of is a clique in the subgraph , for and also the subgraphs are chordal for .
According to Lemma 4, if a chordal graph has exactly two independent simplicial vertices, then the removal of a simplicial vertex results in either a chordal graph with exactly two independent simplicial vertices or a complete graph. We eliminate the simplicial vertices until we get the smallest non-trivial chordal graph containing exactly two independent simplicial vertices, say . The removal of a simplicial vertex from results in a complete graph. That is, is a complete graph with , where is a simplicial vertex in . Clearly, is a C-I graph being a complete graph. Now, we add the simplicial vertex to and form the graph by adding the deleted edges back. We continue this process by adding the eliminated simplicial vertices and deleted edges in the reverse order in the PEO to the graphs , respectively obtaining finally the graph .
It may be noted that we add edges so that the resulting graph obtained in each stage contains exactly two independent simplicial vertices.
In particular, the graph is obtained by adding the simplicial vertex to . The vertex is adjacent to some vertices of . Let and such that is adjacent to every element of and not adjacent to any element of . We form a poset, say consisting of elements, , , and . Now fix as the set of minimal elements, covering every element in and all elements of covering . It is clear that the C-I graph of is isomorphic to . That is, we obtain that is a C-I graph. It is in-fact a Ptolemaic C-I graph of the completely ranked poset with rank 2, where represents elements of rank 0, represents the element of rank 1 and represents elements of rank 2. Thus is a chordal C-I graph with exactly two simplicial vertices.
Now the graph is obtained by adding the simplicial vertex and the deleted edges to and from Lemma 5, we obtain that is a chordal C-I graph having exactly two independent simplical vertices. By by the inductive arguments, we have that are chordal C-I graphs with exactly two independent simplicial vertices. Finally, we get that the graph is isomorphic to and hence is a C-I graph. Hence the theorem.
∎
3.1 Recognition of chordal C-I graphs
In this section, we design an algorithm for recognizing chordal C-I graphs. For this, we use the clique tree representation of a chordal graph. Since this algorithm computes a clique tree, if the graph is a chordal graph explicitly, it turns out that the algorithm provides a certification. It is well known that a chordal graph can be characterized as the intersection graph of subtrees of some tree . Such a tree is known as the clique tree of . This well-known theorem is proved independently by Buneman [12] and Gavril [20]. A tree representation of a chordal graph is a pair where is a tree and is a family of subtrees of such that the intersection graph of is isomorphic to . Further Gavril [20] has shown that given a chordal graph , it is possible to construct a tree with vertex set where corresponds to the maximal clique of , such that is a tree representation of . Here, each , , is the set of maximal cliques that contain the vertex , that is, . Such a tree representation of is called a clique tree of . The clique tree of need not be unique, for the sets determine the edges of , not necessarily in a unique manner. Fig.2 shows a chordal graph and two of its clique trees.
Theorem 4 (Gavril [20] and Buneman [12]).
The following propositions are equivalent:
-
1.
is a chordal graph.
-
2.
is the intersection graph of a family of subtrees of a tree.
-
3.
There exists a tree (called clique tree) with vertex set such that for each vertex , the set induces a subtree of . Here represents the maximal clique .
From the above description, we have that a graph is a chordal graph if and only if there exists a clique tree with maximal cliques of as the vertices of and any two cliques containing are either adjacent in or connected by a path of cliques that contain . The Lemma below is also very useful in understanding the structure of chordal graphs and their simplicial vertices.
Lemma 7.
[5] A vertex is simplicial if and only if it belongs to precisely one maximal clique.
Even though the result of the following lemma is a known property of chordal graphs, we require this for establishing the recognition of chordal graphs which are C-I graphs, and hence we state it below.
Lemma 8.
Every leaf node of a clique tree of a chordal graph contains a simplicial vertex.
Proof.
Let be a clique tree of a chordal graph . Let be a leaf node of . Since is a leaf node of there is a node in such that . Since is a clique tree of every node of is a maximal clique of , and hence there is a vertex of in but not in . From the definition of the clique tree, it is clear that is not in any other nodes of (cliques). Then it follows that is a simplicial vertex by Lemma 7. ∎
The following lemma will also be useful for the recognition of chordal C-I graphs.
Lemma 9.
Let be a chordal graph with the clique tree being a path. Let be an internal node of , , the parent node of , and the child node of in . If is vertex of such that and , then is a simplicial vertex in .
Proof.
Since and and is a path, it follows from the definition of a clique tree that is not in any other cliques in . Then by Lemma 7, is a simplicial vertex. ∎
Based on Theorem 3 and Lemma 8 and 9, we formulate the following algorithm for recognizing a chordal C-I graph . The correctness of the algorithm follows from these results.
-
1Step 1:
Apply the perfect elimination ordering (PEO) on and check whether is a chordal graph or not.
Using the PEO find the clique tree of the given graph using Blair-Peyton algorithm.
Check whether there is an element in that is not in and for .
The time complexity of Algorithm 1 can be analyzed as follows.
Using Lex-BFS or MCS, a PEO can be found in time. In Step 2, the Blair-Peyton algorithm is used to construct a clique tree from a chordal graph based on the PEO [5]. This algorithm also runs in linear time, . Additionally, checking whether there are more than two leaf nodes can be done in constant time.
In Step 3, let be the length of the clique tree which is a path . Then, in the worst case, the size of the sets is of the order . To check whether an element and takes time by using a hash set operation. Since there are at most internal nodes, the total time for Step 3 is . Now, the complexity of Algorithm 1 is .
According to Theorem 3, a graph is a chordal C-I graph if and only if is either a complete graph or has exactly two independent simplicial vertices. Lemma 7 and Lemma 8 further imply that the clique tree of a chordal C-I graph contains exactly two leaf nodes, meaning that the clique tree forms a path. The next step is to certify that none of the internal vertices of the clique tree contain simplicial vertices. Lemma 7 and Lemma 9 address this in Step 3 of the algorithm.
Since the Blair-Peyton algorithm explicitly computes the clique tree when is a chordal graph and after Steps 2 and 3 of the algorithm outputs a clique tree which is a path and contains no internal vertices with simplicial vertices, if the given graph is a chordal C-I graph. So the algorithm actually returns a chordal C-I graph if is such a graph, which is a certification model.
4 Structure of C-I cographs
In this section, we present an algorithm for recognizing C-I cograph.
Theorem 5.
[9] Let be a chordal cograph. Then is a C-I graph if and only if is a connected graph that contains at most two maximal cliques.
From Theorem 5, we get the following remark
Remark 3.
A graph is a chordal C-I cograph if and only if there exists three pairwise disjoint sets and such that , and are adjacent in if and only if or .
That is, and form cliques and the graph has no other edges. So in the C-I chordal cograph, if then . It is clear that a chordal C-I cograph is a Ptolemaic C-I graph as it is a C-I graph of a completely ranked poset of height 3. The structure of an arbitrary chordal C-I cograph is shown in Fig. 3.
Theorem 6.
[9] A graph is a C-I cograph if and only if is the join of chordal C-I cographs.
From Theorem 6, we get the following remark.
Remark 4.
Let be a C-I cograph such that , where ’s are chordal C-I cographs. By Remark 3, there exists a pairwise disjoint set and such that and if and only if or . Thus in , are universal vertices and for such that if and only if both and in with and , for some . Thus, for any with , then .
The structure of an arbitrary C-I cograph is depicted in Fig. 4.
Lemma 10.
Let be a C-I cograph then there exists a poset , where ’s are completely ranked poset of rank 2 such that .
Proof.
Let be a C-I cograph. Then is the join of chordal C-I cographs. That is, let . Since ’s are chordal cographs, ’s are C-I graphs of the completely ranked poset ’s of rank at most 2. Hence . ∎
Lemma 11.
If is a C-I cograph then is a claw-free graph.
Proof.
Let be a C-I cograph and , where ’s are chordal C-I cograph for . Suppose that contains an induced claw by the vertices with edges and (see Fig.7). Since , the non-adjacent vertices lie in the same for some . That is, . Since is a chordal C-I cograph, if then , which is a contradiction. Hence, the C-I cograph is a claw-free graph. ∎
A cotree is a tree in which the internal nodes are labelled with the numbers 0 and 1. Every cotree defines a cograph having the leaves of as vertices, and in which the subtree rooted at each node of corresponds to the induced subgraph in defined by the set of leaves descending from that node. A subtree rooted at a node labelled 0 corresponds to the union of the subgraphs defined by the children of that node and a node labelled 1 corresponds to the join of the subgraphs defined by the children of that node. The cotree satisfies the property that, on every root-to-leaf path, leaves are the vertices of the graph, the labels of the internal nodes alternate between 0 and 1, and every internal node has at least two children. The cotree can be easily obtained from any tree labelled with such by coalescing all pairs of child-parent nodes in having the same label or where the parent has only one child. Vertices and of are adjacent in if and only if their lowest common ancestor(LCA) in the cotree is labelled 1. This representation is unique and every cograph can be represented in this way by a cotree [13]. Since is a connected graph, the root of the cotree is a 1-node.
It is known that cographs have a unique tree representation, called a cotree. Using the cotree, it is possible to design very fast polynomial-time algorithms for problems that are intractable for graphs in general. Such problems include chromatic number, clique determination, clustering, minimum weight domination, isomorphism, minimum fill-in, and Hamiltonicity. A linear-time cograph recognition algorithm, such as those in [10, 14, 21], which also builds a cotree, a data structure that fully encodes the cograph.
The Fig. 6 illustrates a cograph and an embedding of the corresponding cotree . The leaves of represent the set of vertex , and each internal node signifies the union (0) or the joining (1) operations in the children. The significance of the 0(1) nodes is captured by the fact that if and only if is a 1 node, as shown in Fig. 6.
The general structure of the cotree of C-I cographs is shown in Fig. 7, and we denote the family of cotree of C-I cograph as . The children of the root node are referred to as level 2 nodes, while the children of level 2 nodes are termed level 3 nodes. Let be a C-I cograph, , where ’s are chordal C-I cographs. Then by Remark 4, two vertices and are not adjacent in if and only if and for . Therefore, in the cotree, the lowest common ancestor(LCA) of and is 0-node. That is, for and . In other cases, LCA is a 1-node. That is, for and .
Lemma 12.
The cotree of a C-I cograph which is not a complete graph satisfies the following properties:
-
(i)
The root node (which is a 1-node) of has leaf nodes and -nodes as children. the number of 0-nodes (which are children of the root node) is always less than or equal to the number of leaf nodes (which are children of the root node).
-
(ii)
Every 0-node has exactly two children (both the children are 1-nodes or both the children are leaves nodes or one child is a leaf node and another child is 1-node).
-
(iii)
The -nodes other than the root node have only leaf nodes as children.
-
(iv)
The cotree of belongs to the family of .
Proof.
Let be a C-I cograph which is not a complete graph.
-
(i)
Since is not a complete C-I graph, it is either a chordal cograph or joins of chordal cographs. Since there are non-adjacent vertices, there exist some 0-nodes as children of the root node. From the structure of the C-I cograph, there exist universal vertices, which should be leaf nodes of the root node. From Theorem 6, , where are chordal C-I cographs. The leaf nodes of the subtree rooted by each 0-node contain the non-universal vertices of each . That is, if there are 0-nodes, then since the universal vertices of each , are also universal vertices of , and since each has at least one universal vertex, the number of 0-nodes of the root node must be at most the number of leaf nodes as a child nodes. Hence (i) follows.
-
(ii)
Suppose there are -nodes having more than two children. Let be a -node having three child nodes. Let be the three leaf nodes from the different branches of the subtree with the root node as the -node. Then by the structure of the C-I cograph, we have that . Let be a leaf node of the root of the cotree . Then is adjacent to and . That is, induce a claw in which is a contradiction to Lemma 11. So every -node has no more than two children. In a cotree, every node has a minimum of two child nodes. Hence every -node has exactly two child nodes as 1-nodes. Hence (ii) follows.
-
(iii)
Suppose that there is a -node other than the root node which has a 0-node, say . Consider a subtree of with rooted in . Let and be the vertices of such that the is . The vertices and exist since the subtree has exactly two branches. Now consider the subtree of containing with root as a 0-node, say different from . Let be a vertex of such that the is ( the vertex exists since there are two children from of ). Clearly, the vertices are mutually non-adjacent. Now any vertex of which are leaves of the root node 1 of is adjacent to all of so that form an induced claw, a contradiction. Hence (iii) follows.
-
(iv)
Follows from (i),(ii) and (iii).
∎
Theorem 7.
A cograph is a C-I cograph if and only if the cotree of belongs to the family .
Proof.
It is clear that when is a complete graph if and only if the cotree is the tree with every vertex of as a child of the root node and which is a part of .
Let be a C-I cograph which is not a complete graph. Then by Lemma 12, cotree of is of the form
Conversely, we need to prove that if is the cotree of a cograph then is a C-I graph. Consider the set of leaves of the cotree ( Refer Figure 7 ). It follows by the definition of cotree of a cograph that the sets ’s are cliques of , for and and are universal vertices. Now is adjacent to every vertex in except and is adjacent to every vertex in except for . Then by Remark 4, is a C-I cograph.
∎
In [14], Corneil et al. presented a linear-time algorithm for recognizing cographs and constructing their cotree representation. Using that algorithm, we get the cotree.
Theorem 8.
[14] The family of cographs possesses a linear-time recognition algorithm by the construction of the cotrees in linear-time.
-
Step 0:
Using the recognition algorithm in Theorem 8 determine the cotree if is a cograph and go to Step 1. Otherwise, stop and return is not cograph
-
Step 1:
Perform BFS from the root node 1 of the cotree.
-
1Step 2:
If BFS completes in one step by reaching all the leaf nodes (if all the adjacent nodes of the root node are
After Step 2, only 0-nodes are obtained. Then is not a C-I cograph and Stop. 3Step 3(ii): After Step 2, both 0-nodes and leaf nodes are obtained. Check whether the number of zero nodes is
Continue the searching at level 2. If -nodes has more than two children as -nodes then is not a C-I cograph and stop. Otherwise, go to Step 5. 5Step 5: Continue searching at level 3. In level 3, if any -node has -node as a child, then is not a C-I cograph
Label the leaf nodes of each 0-node branch in level 2 as and . Partition the leaf nodes from
Construct completely ranked posets with rank 0 elements as , rank 1 elements as , and rank 2 elements as for .
Proof of correctness: The correctness of the Algorithm 2 up to step 5 follows from the structure of cotree stated in Lemma 12 and Theorem 7, and the related facts mentioned above. If after step 5 results in a C-I cograph, then the poset is certification and it follows from Remark 4, Lemma 10 and Theorem 7 that it is one of the completely ranked poset corresponding to the input graph .
Now the size of the cotree of a C-I cograph can be estimated as follows. Let be a C-I cograph with vertices and . Then from the structure of the cotree of , contains leaf nodes (which are the -vertices of ), 0-nodes, and 1-nodes. Then contains 0-nodes, and each 0-node has exactly 2 children. Therefore has at most vertices. The worst case for is when . Therefore in the worst case, the total number of vertices in is , which is of the order of .
The time complexity of the recognition algorithm for cographs and finding its cotree by Theorem 8 is linear. Now the complexity of Algorithm 2 is linear in the size of the cotree, which is in the worst case since the complexity of the BFS can be performed on the cotree in linear-time.
Acknowledgment:
Arun Anil acknowledges the financial support from the University of Kerala, for providing University Post Doctoral Fellowship (Ac EVII 5576/2023/UOK dated 30/06/2023).
References
- [1] Anil, A., Changat, M.: Comparability Graphs Among Cover-Incomparability Graphs. In: Balachandran, N., Inkulu, R. (Eds.), CALDAM 2022, Algorithms and Discrete Applied Mathematics, LNCS 13179, pp. 48–61, Springer, Cham (2022). https://doi.org/10.1007/978-3-030-95018-7_5.
- [2] Anil, A., Changat, M.: Composition and Product of Cover-Incomparability Graphs. The Art of Discrete and Applied Mathematics 6, #P2.09(2023). https://doi.org/10.26493/2590-9770.1515.af9
- [3] Anil, A., Changat, M.: Ptolemaic and Chordal Cover-Incomparability Graphs. Order 39, 29–43(2022). https://doi.org/10.1007/s11083-021-09551-w
- [4] Anil, A., Changat, M., Gologranc, T., Sukumaran, B.: Ptolemaic and planar cover-incomparability graphs. Order 38, 421–439(2021). https://doi.org/10.1007/s11083-021-09549-4
- [5] Blair, J.R.S., Peyton, B.: An Introduction to Chordal Graphs and Clique Trees. In: George, A., Gilbert, J.R., Liu, J.W.H. (Eds.), Graph Theory and Sparse Matrix Computation. The IMA Volumes in Mathematics and its Applications, vol 56, pp. 1-29 Springer(1993).
- [6] Bok, J., Maxová, J.: Characterizing Subclasses of Cover-Incomparability Graphs by Forbidden Subposets. Order 36, 349–358(2019).
- [7] Brešar, B., Changat, M., Gologranc, T., Mathew, J., Mathews, A.: Cover-incomparability graphs and chordal graphs. Discrete Appl. Math. 158, 1752 –1759(2010).
- [8] Brešar, B., Changat, M., Klavžar, S., Kovše, M., Mathew, J., Mathews, A.: Cover-incomparability graphs of posets. Order 25, 335–347(2008).
- [9] Brešar, B., Gologranc, T., Changat, M., Sukumaran, B.: Cographs Which are Cover-Incomparability Graphs of Posets. Order 32, 179–187(2015).
- [10] Bretscher, A., Corneil, D.G., Habib, M., Paul, C.: A simple linear time LexBFS cograph recognition algorithm. SIAM J. Discrete Math. 22 1277–1296(2008).
- [11] Brightwell, G., West, W.B.: Partially ordered sets. Chapter 11 in Handbook of Discrete and Combinatorial Mathematics (K.H. Rosen, ed.) CRC Press, Boca Raton, 717–752(2000).
- [12] Buneman, P.: A characterization of rigid circuit graphs. Discrete Math. 9, 205–212(1974).
- [13] Corneil, D.G., Lerchs, H., Stewart Burlingham, L.: Complement reducible graphs. Discrete Appl. Math. 3, 163–174(1981).
- [14] Corneil, D.G., Perl, Y., Stewart, L.K.: A linear recognition algorithm for cographs. SIAM J. Computing 14, 926–934(1985).
- [15] Cournier, A., Habib, M.: A new linear algorithm for modular decomposition. In: Tison,S. (Ed.), International Colloquium Trees in Algebra and Programming, CAAP’94, Vol. 787, LNCS, Springer, Berlin, 68–82(1994).
- [16] Dahlhaus, E., Gustedt, J., McConnell, R.M.: Efficient and practical algorithms for sequential modular decomposition. J. Algorithms 41(2), 360–387(2001).
- [17] Dirac, G., A.: On rigid circuit graphs. Abh. Math. Sem. Univ. HamDurg, 25, 71-76(1961).
- [18] Fulkerson, D.R., Gross, O.A.: Incidence matrices and interval graphs. Pacific J. Math. 15, 835-855(1965).
- [19] Gallai, T.: Transitiv orientierbare Graphen. Acta Math. Acad. Sci. Hung. 18, 25–66(1967).
- [20] Gavril, F.: The intersection graphs of a path in a tree are exactly the chordal graphs. J. Comb. Theory 16, 47–56(1974).
- [21] Habib, M., Paul, C.: A simple linear time algorithm for cograph recognition. Discrete Appl. Mathematics 145, 183–197(2005).
- [22] Jung, H.A.: On a class of posets and the corresponding comparability graphs. Journal of Combin. Theory B 24, 125-133(1978)
- [23] Maxová, J., Dubcová, M., Pavlíková, P., Turzík, D.: Which k-trees are cover-incomparability graphs. Discrete Appl.Math. 167, 222–227(2014).
- [24] Maxová, J., Pavlíková, P., Turzík, D.: On the complexity of cover-incomparability graphs of posets. Order 26(3), 229–236(2009).
- [25] Maxová, J., Turzík, D.: Which distance-hereditary graphs are cover-incomparability graphs?. Discrete Appl. Math. 161, 2095–2100(2013).
- [26] McConnell, R.M., Spinrad, J.: Linear-time modular decomposition and efficient transitive orientation of comparability graphs. In Proceedings of the Fifth Annual ACM-SIAM Symposium on Discrete Algorithms Arlington, VA, ACM, NewYork, 536–545(1994).
- [27] Rose, D.J., Tarjan, R.E., Lueker, G.S.: Algorithmic Aspects of Vertex Elimination on Graphs. SIAM Journal on Computing 5(2), 266-283 (1976).
- [28] Seinsche, S.: On the property of the class of n-colorable graphs. J. Comb. Theory (B), 191–193(1974).
- [29] Shibata, Y.: On the tree representation of chordal graphs. Journal of Graph Theory 12, 421–428(1988).
- [30] Tarjan, R.E., Yannakakis, M.: Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. SIAM J. Comput. 13, 566–579(1984).