Enumeration of Perfect Sequences of Chordal Graph
Total Page:16
File Type:pdf, Size:1020Kb
数理解析研究所講究録 第 1644 巻 2009 年 86-94 86 Enumeration of Perfect Sequences of Chordal Graph Yasuko Matsui1, Ryuhei Uehara2, and Takeaki Uno3 1 Department of Mathematical Sciences, School of Science, Tokai University, Kitakaname 1117, Hiratsuka, Kanagawa 259-1292, Japan. [email protected] 2 School of Information Science, JAIST, Asahidai 1-1, Nomi, Ishikawa 923-1292, Japan. uehara@jaist. ac. jp 3 National Institute of Informatics, Hitotsubashi 2-1-2, Chiyoda-ku, Tokyo 101-8430, [email protected] Abstract. A graph is chordal if and only if it has no chordless cycle of length more than three. The set of maximal cliques in a chordal graph admits special tree structures called clique trees. A perfect sequence is a sequence of maximal cliques obtained by using the reverse order of repeatedly removing the leaves of a clique tree. This paper addresses the problem of enumerating all the perfect sequences. Although this problem has statistical applications, no efficient algorithm has been proposed. There are two difficulties with developing this type of algorithms. First, a chordal graph does not generally have a unique clique tree. Second, a perfect sequence can normally be generated by two or more distinct clique trees. Thus it is hard using a straightforward way to generate perfect sequences from each possible clique tree. In this paper, we propose a method to enumerate perfect sequences without constructing clique trees. As a result, we have developed the first polynomial delay algorithm for dealing with this problem. In particular, the time complexity of the algorithm on average is $O(1)$ for each perfect sequence. Keywords: chordal graph, clique tree, enumeration, perfect sequence. 1 Introduction A graph is said to be chordal if every cycle of length at least 4 has a chord. Chordal graphs have been investigated for a long time for many areas. From the viewpoint of graph theory, this class has a simple characterization; a graph is chordal if and only if it is an intersection graph of the subtrees of a tree. That is, there is a set of subtrees $T_{v}$ of a tree $\mathcal{T}$ that correspond to the vertices $v$ of a chordal graph $G$ such that $u$ and $v$ are adjacent in $G$ if and only if the corresponding subtrees $T_{u}$ and $T_{v}$ have non-empty intersection. From an algorithmic point of view, a chordal graph is characterized by a simple vertex ordering called a perfect elimination ordering (PEO). Its geometrical property of rigidity plays an important role in many practical areas, and the property of its adjacency matrix is useful in matrix manipulations. Since the class appears in different contexts in so many areas they also are called “rigid circuit graphs” or “triangulated graphs” (see e.g., [13, 5]). Recently, the probabilistic relationships between random variables are represented by a graph called ”graphical model” in the science of statistics. On a graphical model, the random variables are represented by the vertices and the conditional dependencies are represented by the edges. In particular, if a graphical model is chordal, we can easily compute its maximum likelihood estimator. In the computation, a chordal graph is decomposed into its subgraphs by removing a separator which induces a clique. Therefore, chordal graphs are also called “decomposable graphs” or “decomposable models” in this area (see, e.g., [9]). Even if a given graphical model is not decomposable, we sometimes add edges to make it decomposable to obtain a good approximation value of the maximum likelihood estimator $oi$ the graphical model (see, e,g., [4] $)$ . This corresponds to the notion of ”chordal completion” in the area of graph algorithms [8]. Hence chordal graphs play an important role in graphical modeling in statistics. Perfect sequences are the sequences of maximal cliques in a given chordal graph that $Satis\mathfrak{h}r$ certain properties. The notion arises fiom the decomposable models, and all perfect sequences are required and 87 must not have repetitions (see, e.g., [7]) From the viewpoint of graph theory, perfect sequences can be seen in the following way. As mentioned, a chordal graph $G$ can be represented by the intersection graph $\mathcal{T}$ of the subtrees of a tree . That is, each vertex $v$ of $G=(V, E)$ corresponds to a subtree $T_{v}$ of $\mathcal{T}$ , and $T_{v}$ $T_{u}$ $\mathcal{T}$ $\{u, v\}\in E$ if and only if and intersect. We can make each node $c_{1}$ of tree correspond to a maximal $C_{i}$ $G;C_{j}$ $G$ $T_{v}$ clique of consists of all the vertices $v$ in such that contains the node $c_{i}$ . Therefore, the tree $\mathcal{T}$ $I^{l}\neg rom$ $\mathcal{T}$ is called a clique tree of G. the clique tree , we make an ordering $\pi$ over the set of maximal $\mathcal{T}$ cliques $\{C_{1}, C_{2}, \ldots , C_{k}\}$ of $G$ such that $C_{\pi(i)}$ is a leaf of tree $\mathcal{T}_{i}$ which is a subgraph of induced by $C_{\pi(1)},$ $C_{\pi(2)},$ $C_{\pi(l)}$ $i$ $\mathcal{T}$ $\ldots,$ for each . Intuitively, we cari construct such a sequence from by repeatedly pruning leaves and put them on the top of the sequence until $\mathcal{T}$ is empty. Then the sequence of maximal cliques in a chordal graph is called a perfect sequence, and it is known that a graph is chordal if and only if it has a perfect sequence. In 2006, Hara and Takemura proposed a sampling algorit}im for the perfect sequences of a given chordal graph [6] that used the Lauritzen’s method [9]. However their algorithm does not generate each perfect sequence uniformly at random, and to our knowledge, no enumeration algorithm of perfect sequences exists. There are two major reasons for the difficulty in enurnerating perfect sequences. First, the clique tree is not generally unique for a chordal graph. That is, a chordal graph has many distinct (non- isomorphic) clique trees in general. For a clique tree, we can define a set of perfect sequences consistent to the clique tree. Then, secondly, the sets of perfect sequences consistent with the distinct clique trees are not disjoint. That is, we can obtain one perfect sequence from possibly many distinct clique trees. Therefore, a straightforward algorithm based on a simple idea (generate all clique trees, and generate all perfect sequences for each clique tree) cannot avoid redundancy. In this paper, we propose an algorithm enumerating all the perfect sequences of a chordal graph. The algorithm enumerates all the perfect sequences on an average of $O(1)$ time per sequence. In order to avoid redundancy, our algorithm makes a weighted intersection graph of maximal cliques first instead of explicitly constructing the clique trees. The intersection graph is uniquely constructed, and each maxi- mum $weig\}ited$ spanning tree of the intersection graph gives a clique tree of a chordal graph. Then the algorithm generates each perfect sequence from the union of maximum weighted spanning trees without any repetitions. The algorithm is based on a new idea that characterizes the union of maximum weighted spanning trees, and that also gives us insight into the properties of the set of clique trees of a chordal graph. We note that the set of perfect sequences is strongly related to the set of PEOs. The PEO is a standard characterization of a chordal graph in the area of graph algorithms. Any PEO can be obtained by repeatedly removing a simplicial vertex, and any sequence of removals of simplicial vertices is a PEO. This property admits us to enumerate all PEOs by recursively removing simplicial vertices. The enumeration of all PEOs is investigated by Chandran et al. [3]. Intuitively, any perfect sequenoe can be obtained by removing a set of “equivalent” simplicial vertices together repeatedly. However, each removal has to follow (a kind of) lexicographical ordering. A removal of a set of simplicial vertices may produce a new set of simplicial vertices or change another set of simplicial vertices, and the new set cannot be chosen before the old sets. Thus the family of sets of equivalent simplicial vertices has to follow a partial ordering defined by the appearance in the graph to obtain a perfect sequence. This fact also implies that while some PEOs can be obtained from a perfect sequence easily, but some PEOs camiot be obtained from any perfect sequence straightforwardly by the constraint of the partial ordering. Therefore, tbe correspondence between the set of perfect sequences and the set of PEOs is not straightforward and hence we have to analyze some special cases. Indeed, using this approach, we can obtain another enumeration algorithm of all perfect sequences from the enumeration algorithm of all PEOs. However this approach does not allow us to enumerate efficiently; the algorithm takes $O(|V|+|E|)$ time for each perfect sequence. This 88 is the reason why we take completely different approach based on a maximum weighted spanning tree of a weighted clique graph, which admits us to improve the time to $O(1)$ on average. 2 Preliminaries The neighborhood of a vertex $v$ in a graph $G=(V, E)$ is the set $N_{G}(v)=\{u\in V|\{u\rangle v\}\in E\}$ , and the degree of a vertex $v$ is $|N_{G}(v)|$ and is denoted by $\deg_{G}(v)$ . For a vertex subset $U$ of $V$ we denote by $N_{G}(U)$ the set $\{v\in V|v\in N_{G}(u)$ for some $u\in U\}$ . If no confusion arises we will omit the subscript $G$ . Given a graph $G=(V, E)$ and a subset $U\subseteq V$ , the subgmph of $G$ induced by $U$ is the graph $(U, F)$ , where $F=\{\{u, v\}\in E|u, v\in U\}$ , and denoted by $G[U]$ .