Computing the atom graph of a graph and the union join graph of a hypergraph

The atom graph of a graph is the graph whose vertices are the atoms obtained by clique minimal separator decomposition of this graph, and whose edges are the edges of all possible atom trees of this graph. We provide two efficient algorithms for computing this atom graph, with a complexity in $O(min(n^\alpha \log n, nm, n(n+\overline{m}))$ time, which is no more than the complexity of computing the atoms in the general case. %\par We extend our results to $\alpha$-acyclic hypergraphs. We introduce the notion of union join graph, which is the union of all possible join trees; we apply our algorithms for atom graphs to efficiently compute union join graphs. Keywords: clique separator decomposition, atom tree, atom graph, clique tree, clique graph, $\alpha$-acyclic hypergraph.


Introduction
Decomposition by clique minimal separators (into subgraphs called atoms) was introduced by Tarjan [29] in 1985 as a useful hole-and antihole-preserving decomposition. It turns out that this decomposition is unique when clique minimal separators are used [24]. This decomposition has given rise to recent interest, both in the general case [4,5,15,24] and for special graph classes [2,6,10,11,12,13]. Applications have arisen in the fields of databases [26], text mining [7] and biology [22,23].
Recently, [5] introduced the concept of atom tree, which organizes the atoms of the clique minimal separator decomposition into a tree as a generalization of the clique tree for chordal graphs: the nodes are the atoms, and the edges correspond to the clique minimal separators of the graph. However, as is the case for the clique tree, the atom tree is not uniquely defined. This can be a problem for instance with the promising use of an atom tree as a visualization tool.
In this paper, we focus on the atom graph, whose vertices are the atoms, and whose edges are those of all possible atom trees.
Atom graphs have been used in several papers.
In the general case, the notion of atom graph was introduced in 2007 in [23] in the context of visualizing biological clusters. An efficient construction algorithm was proposed in 2010 in [3].
In the case of chordal graphs, the atoms are the maximal cliques and the atom trees are the clique trees. A related graph which has been extensively studied in this context is the clique graph (see e.g. [1,28]), which is the intersection graph of the maximal cliques. The weighted clique graph of a chordal graph has been used to construct a clique tree [8,18]: any maximum weight spanning tree is a clique tree, and vice-versa. Thus, except for some very special cases, the atom graph is a proper subgraph of the clique graph. In the context of efficiently constructing a clique tree, in 1991 [8] studied the family of all possible clique trees, an object very close to the atom graph of a chordal graph. In 1995, [17] used the weighted atom graph of a chordal graph, but misguidedly called this object the 'clique graph'. In 2012 in [19], this object is further studied and called the 'reduced clique graph'.
Our first goal in this paper is to propose efficient algorithms to compute the atom graph, both in the general case and in the case of chordal graphs.
Given a graph, all known algorithms for computing the decomposition into atoms first compute a minimal triangulation of the graph [4,5,24], with the exception of some special graph classes [2,6]. A minimal triangulation can be computed in O(min(n α log n, nm, n(n+ m))) time where α is the real number such that O(n α ) is the best known time complexity for matrix multiplication and m is the number of edges of the complement of G [5,20,27]. From this minimal triangulation, an atom tree can be computed in O(min(n α , nm, n(n+t))) time [5,15,24], where t is the number of 2-pairs of the minimal triangulation, and thus t ≤ m. As a result, an atom tree can be computed in O(min(n α log n, nm, n(n + m))) time.
To compute the atom graph efficiently, we present two different approaches. One takes as input an atom tree as well as the inclusion relation between the separators represented by its edges, and the other takes as input the weighted intersection graph of the atoms. In both cases, we provide an O(n 2 ) algorithm to compute the atom graph from the input. Our global complexity when taking the graph itself as input comes to O(min(n α log n, nm, n(n + m))) time.
We then go on to remark that the atoms of a graph G = (V, E) can be seen as the hyperedges of an α-acyclic hypergraph, whose vertex set is V , since G has an atom tree that is a join tree of this hypergraph. However, the atoms of a graph are pairwise non-inclusive, which is not a requirement for α-acyclic hypergraphs, where a hyperedge can be included in another. Fortunately, our algorithms also work in this more general context.
We introduce the notion of union join graph, which is the union of all join trees, and provide algorithms to compute this object efficiently.
The paper is organized as follows: Section 2 provides some necessary preliminaries. Section 3 discusses useful properties of the atom graph. Section 4 presents our algorithms to compute the atom graph. Section 5 defines the atom hypergraph and relates it to αacyclic hypergraphs. Section 6 discusses how to compute the union join graph of an α-acyclic hypergraph. We conclude in Section 7.

Preliminaries
The graphs considered in this paper are finite and undirected. For a graph G = (V, E), n = |V | and m = |E|. For any subset X of V , G(X) denotes the subgraph of G induced by S. For any vertex v of G, N G (v) denotes the neighborhood of v in G: N G (v) = {w ∈ V | vw ∈ E}. We will omit the subscripts when there is no ambiguity. A clique of G is a set of pairwise adjacent vertices of G, and G is complete if V is a clique of G. The union of two graphs G 1 = (V, E 1 ) and G denotes the complement of G, and m denotes its number of edges. α is the real number such that O(n α ) is the best known time complexity for matrix multiplication. For any set V , P(V ) is the power set of V . For any subset A of P(V ), the intersection graph of A is the graph (A, E) where E is the set of pairs of A whose intersection is non-empty. For each graph G, K(G) denotes the set of maximal cliques of G and the clique graph of G, is the intersection graph of K(G). If X and Y are nodes of a tree T , P T (X, Y ) denotes the path in T between X and Y .
Separation. Let S be a subset of vertices of a connected graph G = (V, E). S is a separator of G if G(V \ S) is disconnected. For any vertices a and b in V \ S, S is an ab-separator of G if a and b are in different connected components of G(V \ S). S is a minimal ab-separator if it is an inclusion-minimal ab-separator, and a minimal separator if there is some pair {a, b} of vertices such that S is a minimal ab-separator. Given a minimal separator S, C is a full component of S if C is a connected component of G(V \ S) and N G (C) = S. S is a minimal separator if S has at least 2 full components, and S is a minimal ab-separator if a and b lie in 2 different full components of S. Given three subsets S, A and B of V , S is a (minimal) AB-separator of G if it is a (minimal) ab-separator of G for each a ∈ A and each b ∈ B.
A 2-pair of a connected graph G is a pair {x, y} of non-adjacent vertices such that every chordless path between x and y is of length 2, or equivalently such that N(x) ∩ N(y) is a minimal xy-separator of G. The number of 2-pairs of a graph is denoted t, with t ≤ m.
If G is disconnected then a (minimal) (ab-)separator of G is a (minimal) (ab-)separator of one of its connected components. Thus the set of minimal separators of a graph is the union of the sets of minimal separators of its connected components, and so it is for its set of 2-pairs. Chordal graphs. A graph is chordal, or triangulated, if it has no chordless cycle of length at least 4. A graph is chordal if and only if all its minimal separators are cliques [16]. A chordal graph has at most n maximal cliques and the sum of their sizes is bounded by n+m. A connected graph is chordal if and only if it has a clique tree [14,18]. Definition 2.1 Let G = (V, E) be a connected chordal graph. A clique tree of G is a tree T = (K(G), E T ) such that for each vertex x of G, the set K x of nodes of T containing x induces a subtree of T . Characterization 2.2 [8] Let G = (V, E) be a connected chordal graph, let T be a clique tree of G, and let S ⊆ V ; then S is a minimal separator of G if and only if there is an edge If G is a disconnected chordal graph, we associate with G a forest whose connected components are clique trees of the connected components of G. A clique tree (forest) can be computed in linear time [8].
Atoms. Atoms are the subgraphs obtained by applying the decomposition by clique minimal separators (see [4] for a survey).

Characterization 2.3 [24]
An atom of a graph G = (V, E) is an inclusion-maximal subset of V inducing a connected subgraph of G with no clique separator.
We will denote the set of atoms of G by A(G).

Property 2.4
The atoms of a chordal graph are its maximal cliques.
Property 2.5 [24] The intersection of two distinct atoms is a clique. Notation 2.6 For a graph G = (V, E), G + denotes the graph whose vertex set is V and whose edges are the pairs of V that are contained in a common atom of G (this graph is denoted G * in [24]).
Property 2.7 [24] For a graph G, G + is chordal, its maximal cliques are the atoms of G and for each clique S of G and each pair {a, b} of V \ S, S is an ab-separator (resp. minimal ab-separator) of G if and only if S is an ab-separator (resp. minimal ab-separator) of G + .
It follows that a graph has at most n atoms.

Atom trees.
To represent the atoms of a graph, [5] extend the notion of clique tree of a connected chordal graph to the notion of atom tree of a connected graph: Definition 2.8 [5] Let G = (V, E) be a connected graph. An atom tree of G is a tree T = (A(G), E T ) such that for each vertex x of G, the set A x of nodes of T containing x induces a subtree of T .
• 12 • 13 Note that an atom tree is not a decomposition tree of clique separator decomposition as defined in [3,29], thouh this deomposition is called 'atom tree' in [3].
An atom tree of a connected graph G can be computed in O(min(n α log n, nm, n(n+m))) time [5,15].
The edges of an atom tree of a graph correspond to its clique minimal separators. Characterization 2.9 [5] Let G = (V, E) be a connected graph, let T be an atom tree of G, and let S ⊆ V ; then S is a clique minimal separator of G if and only if there is an edge AB of T such that S = A ∩ B. Property 2.10 For a connected graph G, the atom trees of G are the clique trees of the chordal graph G + (G + is defined in Notation 2.6). The following properties will be used to compute complexity bounds. Proof: It is sufficient to prove it in the case of a connected graph G. Let T be an atom tree of G, and let us show by induction on |A| that for each connected subset A of nodes of T , Σ X∈A |X| ≤ n A + m A , where nA and mA are the numbers of vertices and edges of the subgraph of G induced by V A = ∪ X∈A X. It trivially holds if |A| = 1. We assume that it holds if |A| = k. Let us show that it holds if |A| = k + 1. Let X 1 be a leaf of T (A), let X 2 be the neighbor of X 1 in T (A), let S = X 1 ∩X 2 and let A 2 = A\{X 1 }. By induction hypothesis Property 2.14 The sum of the sizes of the sets X ∩ Y for each edge XY of an atom tree T of a graph is bounded by n + m, and these sets can be computed from T in O(m) time.
Proof: Let T = (A(G), E T ) be an atom tree of G. We consider a rooted directed tree T r = (A(G), U) obtained from T by choosing an arbitrary root.
These sets can be computed by searching T and computing X ∩ Y in O(|Y |) time when reaching Y from its neighbor X, and therefore in O(m) time.by Property 2.13. ✷ α-acyclic hypergraphs. A simple hypergraph, or hypergraph for short, is a structure H = (V, E), where V is its vertex set and E is a set of non-empty subsets of V , called the hyperedges of H, whose union is equal to V . A hypergraph is a clutter if the elements of E are pairwise non-inclusive. Its line graph, denoted by L(H), is the intersection graph of E. Its 2-section graph, denoted by 2SEC(H), is the graph whose vertex set is V and whose edges are the pairs of V that are contained in a hyperedge of H. H is connected if L(H) is connected, or equivalently if 2SEC(H) is connected. We denote by p the number of hyperedges of a hypergraph. Let (v 1 , . . . , v n ) be an ordering of V and let (X 1 , . . . , X p ) be an ordering of E. The incidence matrix of H w.r.t. these orderings is the n × p matrix M = (m i,j ) such that for each i ∈ [1, n] and each j ∈ [1, p], m i,j = 1 if v i ∈ X j and 0 otherwise.
A join tree of H is a tree T whose node set is E and such that for each vertex x of H, the set E x of nodes of T containing x induces a subtree of T , or equivalently, such that for each pair {X, Y } of E, X ∩ Y is a subset of each node of P T (X, Y ). H is α-acyclic if it has a join tree.

Property 2.15
Let H = (V, E) be an α-acyclic hypergraph, and let G be the 2-section graph 2SEC(H). Then G is chordal and if moreover H is a clutter then E = K(G) (i.e. the set E of hyperedges of H is equal to the set K(G) of maximal cliques of G).
It follows that the number of hyperedges of a clutter is bounded by the number of its vertices since a chordal graph has at most n maximal cliques. The number of hyperedges of an α-acyclic hypergraph which is not a clutter may be exponential in the number of vertices.
A join tree of a connected α-acyclic hypergraph H = (V, E) can be defined from its weighted line graph, where weights are defined as follows. The set associated with a pair {X, Y } of E is X ∩Y , and its weight, denoted by w(XY ), is |X ∩Y |. Let K be a graph whose node set is E. The weight of K is the sum of the weights of its edges. When considered as a weighted graph, K is denoted by K w . Thus L w (H) denotes the weighted line graph of H.
Characterization 2.16 [9] Let H = (V, E) be an α-acyclic (resp. connected α-acyclic) hypergraph. Then the join trees of H are the maximum weight spanning trees of the weighted complete graph on E (resp. of L w (H)).
In particular the atom trees of a connected graph G are the maximum weight spanning trees of the weighted intersection graph of the atoms of G, which is proved in the case of chordal graph in [8] (and extends to any connected graph through the chordal graph G + by Property 2.10).

Atom graphs
Atom graphs were used in [23] and formally introduced in [3].
Example 3.2 Figure 2 shows the atom graph of the graph G from Figure 1.
In the definition of the atom graph, the word 'clique' can be removed by Property 2.5 and the word 'minimal' can be removed by Property 2.12, which implies that for each pairs  The following property immediately follows from Properties 2.4 and 2.7.
Property 3.4 For a connected graph G, the atom graph of G is the atom graph of the chordal graph G + (G + is defined in Notation 2.6).
Characterizations 3.5 and 3.6 below give relationships between the atom graph and the atom trees. They are both proved for chordal graphs in [17] and also apply to any connected graph through the chordal graph G + by Properties 2.4, 2.10 and 3.4.

Characterization 3.5
The atom graph of a connected graph G is the union of all the atom trees of G.
Characterization 3.6 The atom trees of a connected graph G are the maximum weight spanning trees of the weighted atom graph of G.
To compute the edges of the atom graph from an atom tree, we will use the following characterization from [19] for chordal graphs, which also applies to any connected graph through the chordal graph G + by Properties 2.4, 2.10 and 3.4.
Characterization 3.7 Let G be a connected graph, let A and B be distinct atoms of G and let T be an atom tree of G. Then AB is an edge of AG(G) if and only if there is an edge

Computing the atom graph
We know that given a connected graph G, an atom tree of G (and therefore the atoms of G) can be computed in linear time if G is chordal and in O(min(n α log n, nm, n(n + m))) time We will improve upon this to obtain a time which is no worse than that of computing an atom tree.
Our first algorithm starts with an atom tree and the inclusion relation between the separators represented by the edges, and adds all the extra edges required to construct the atom graph. Our second algorithm starts with the weighted intersection graph of the atoms and repeatedly determines the edges of weight k which belong to the atom graph in decreasing order of k. Both algorithms run in O(n 2 ) time given these inputs. When only the graph is given as input, we obtain a complexity of O(min(n α log n, nm, n(n + m))) time, as will be detailed in this section.
We introduce the following parameters which will be used in this section and in Section 6: p denotes the number of atoms of G, s the sum of their sizes and for each atom tree T of G, Note that p ≤ n since G has at most n atoms and that s ≤ n + m since the sum of the sizes of the atoms of G is bounded by n + m by Property 2.13. The parameters p, s and s △ (T ) are introduced for two reasons. First, they will be used to extend the complexity results of this section to the context of α-acyclic hypergraphs in Section 6 with appropriate extensions of the definitions of these parameters. Second, it can lead to a better complexity for graph classes for which these parameters have specific bounds.
As will be detailed in Section 4.1, we will also need the edge-inclusion relation sub, which for an atom tree tests for inclusion the separators represented by two edges.
We will show in Sections 4.1 and 4.2 the following complexity result: The atom graph of a connected graph G can be computed : a) in O(n 2 ) time from either an atom tree of G and its subset relation or the weighted intersection graph of the atoms of G, b) in O(min(n α , nm, n(n + m + ))) time from an atom tree of G, c) in O(min(n α , nm)) time from the set of atoms of G, d) in O(min(n α log n, nm, n(n + m))) time from G, where m + denotes the number of edges of G + (G + is defined in Notation 2.6).
For a chordal graph H, the atom graph can thus be computed in O(min(n α , nm, n(n + m))) time, since in that case G + = G and an atom tree (clique tree) of G be computed in linear time.
Other approaches are possible, but with no improvement of the time complexity. For instance, as the atom trees of a graph G are obtained from the atom trees of a minimal triangulation H of G by merging the maximal cliques of H into the atoms of G [5], the atom graph of G is obtained from the atom graph of H by merging the same maximal cliques of H.
The different items of Theorem 4.3 are detailed in the following results: item a) follows from Theorem 4.6 and Corollary 4.14, iten b) follows from item c) and Theorem 4.9, item c) follows from item a) and Proposition 4.15, and iten d) follows from item b) and from the fact that an atom tree of G can be computed in O(min(n α log n, nm, n(n + m))) time.

Algorithm Forest Join
Our first algorithm, Forest Join, is based on Characterization 4.4. Given an atom tree T , a minimal separator S is represented by one or several edges of T . If we remove these edges, we obtain a forest. Let us now furthermore shrink this forest by removing the nodes which do not contain S. Any edge between two nodes of different trees of the resulting forest will correspond to an edge of the atom graph which also represents S, and all the S representatives are thus encountered.
To implement this remarkable property, our algorithm processes the edges of the atom tree one by one, and computes the relevent nodes and edges with the help of relation sub.
Algorithm Forest Join computes the edges of the atom graph of G according to Characterization 4.4. Given an atom tree T of G and its subset relation sub, it scans the edges of T and for each edge AB, it computes the set of edges of the atom graph associated with the minimal separator S associated with AB if it has not be computed yet, i.e. if AB does not belong to the set of edges computed so far.
It calls Algorithm Components which computes the connected components of the forest T (A S ) − E S defined in Characterization 4.4. The relation sub enables us to compute these components at no extra cost than a simple tree search: T (A S ) is the subtree of T whose edges XY are associated with supersets of S, i.e. satisfy sub(AB, XY ), and E S is the set of edges XY of T associated with S, i.e. such that sub(AB, XY ) and sub(XY, AB).
In Algorithm Components, k is the current number of connected components, C 1 , . . . , C k are the current components, Queue contains the nodes of T that are reached but not processed yet and for each reached node X, numComp(X) is the index i of the component C i containing X and pred(X) is the node of T it has been reached from (and which should not be processed again).
Algorithm Forest Join input : An atom tree T = (A, E T ) of a connected graph G and its subset relation sub. output: The atom graph of G.
Example 4.5 Figure 3 shows an atom tree T of the graph G from Figure 1 Hence Algorithm Forest Join runs in O(p 2 ) time, and therefore in O(n 2 ) time since G has at most n atoms (p ≤ n). ✷ To evaluate the time complexity of computing the atom graph of G from an atom tree T of G using Algorithm Forest Join, we need the time complexity of computing the subset relation of T . Proposition 4.7 Given an atom tree of a connected graph, its subset relation can be computed in O(min(n α , ps)) time, and therefore in O(min(n α , nm)) time. where M is the n × (p − 1) incidence matrix of the (possibly non-simple) hypergraph whose vertex set is V and whose hyperedges are the sets X ∩ Y for each edge XY of T . Hence this alternative complexity is in O(p 2 + s + (n + p) α ) time, i.e. in O((n + p) α ) time since p 2 ≤ (n + p) 2 , s ≤ np ≤ (n + p) 2 and 2 ≤ α.
We obtain a complexity in O(min((n + p) α , ps)) time, i.e. in O(min(n α , ps)) time since p ≤ n and therefore in O(min(n α , nm)) time since s ≤ n + m by Property 2.13 ✷ It follows that the atom graph can be computed from an atom tree in O(min(n α , nm)) time.
We will now discuss using the 2-pairs of the graph G + defined in Notation 2.6 to obtain an alternative complexity in O(n(n + m + )) time, where m + is the number of edges of the complement of G + , through the following lemma. Proof: We consider a rooted directed tree T r = (A(G), U) obtained from T by choosing an arbitrary root. Thus Σ XY ∈E T |X△Y | = Σ (X,Y )∈U |X△Y |. Σ (X,Y )∈U |Y \ X| ≤ n since each vertex x of G belongs to Y \ X for at most one edge of T r , namely the edge (X, Y ) such that Y is the root of the subtree of T r induced by the nodes containing x. Hence it is sufficient to show that Σ (X,Y )∈U |X \ Y | ≤ t. It is shown in [5] that if G is chordal then this sum is bounded by the number of 2-pairs of G. So it is bounded by t since G + is chordal and by Property 2.10 T is also an atom tree of G + . ✷  Proof: ⇒: let S = N(x) ∩ N(y). As S is a minimal separator of G and G is chordal, S is a clique. Let K (resp. L) be a maximal clique containing {x} ∪ S (resp. {y} ∪ S).
and therefore KL is an edge of AG(G) with x ∈ K \ L and y ∈ L \ K. ⇐: let S = K ∩L. As KL is an edge of AG(G), S is a minimal xy-separator. As G is chordal K and L are cliques, so S ⊆ N(x) ∩ N(y), and as S is an xy-separator N(x) ∩ N(y) ⊆ S. Hence S = N(x) ∩ N(y), and thereforexy is a 2-pair of G. ✷ It follows that the number of 2-pairs of a connected chordal graph G is bounded by the sum of the products |K \ L| * |L \ K| for each edge KL of its atom graph. In particular, in a graph class (of non-necessarily chordal graphs) in which the values of |A\B| (and |B \A|) for each edge AB of the atom graph are bounded by a given constant, for instance if the sizes of the atoms are bounded by a constant, the atom graph can be computed from an atom tree in O(n(n + m ′ )) time where m ′ is the number of edges of the computed atom graph. The number of 2-pairs is not equal in general to the sum of the products |K \ L| * |L \ K| for each edge KL of its atom graph since a 2-pair may be associated with several edges of the atom graph. Considering the same relation between the 2-pairs and the edges of an atom tree T of G, a pair {x, y} associated with an edge KL of T is a 2-pair since KL is an edge of the atom graph, but the converse does not hold. Contrary to the atom graph, {x, y} can be associated with at most one edge of T , namely the unique edge connecting the subtrees of T induced by the sets of nodes containing x and y respectively, which are necessarily disjoint and at distance 1 from each other in T .
This alternative time complexity in O(n(n + m + )) considers the worst case where Algorithm Components searches the whole tree T , whereas it only searches the set A S and its neighborhood which may be very small w.r.t. the set of nodes of T . For the same reason, it may be more efficient in practice to execute Algorithm Forest Join without pre-computing the subset relation sub and directly evaluate sub(AB, XY ) and sub(XY, AB) when needed.

Algorithm AG-max-weight
Our second algoirithm, AG-max-weight, takes as input the weighted intersection graph of the atoms (which, in the case of a chordal graph, is the clique graph) and repeatedly adds the edges of weight k in decreasing order of k.
By Characterization 2.16 the atom trees of a connected graph G are the maximum weight spanning trees of the weighted intersection graph of the atoms of G. We will present a general algorithm computing the union of the maximum weight spanning trees of G w for each weighted connected graph G w with natural integer weights on the edges. This general algorithm called Union-max-weight is inspired from the following algorithm from Kruskal which computes a minimum weight spanning tree of G w : initialize graph T ′ as edgeless and for each edge xy of G w in increasing order of weight, add xy to T ′ if and only if x and y are in different connected components of T ′ . As we want to compute a maximum weight spanning tree, we will process the edges in decreasing order of weight; the algorithm computes each maximum weight spanning tree of G w . Thus an edge xy of weight k may be added to T ′ by this last algorithm if and only if x and y are in different connected components of T ′ just after processing the edges of weight at least k + 1. These components are independent from the graph T ′ computed so far by item a) of Lemma 4.11 below.
Lemma 4.11 Let G w = (V, E, w) be a weighted connected graph with natural integer weights on the edges, let T be a maximum weight spanning tree of G, let UM be the union of the maximum weight spanning trees of G and for a natural integer k, let G k (resp. T k , UM k ) be the graph whose vertex set is V and whose edges are the edges of G (resp. T , UM) of weight at least k. Then a) G k , T k and UM k have the same connected components, b) the edges of UM of weight k are the edges of G of weight k whose endpoints are in different connected components of UM k+1 .
Proof: a) As each connected component of T k is a subset of a connected component of UM k which is itself a subset of a connected component of G k , it is sufficient to show that each connected component of G k is a subset of a connected component of T k , or equivalently that for each edge xy of G k , P T (x, y) is a path in T k . Let xy be an edge of G k . For each edge x ′ y ′ of P T (x, y) w(xy) ≤ w(x ′ y ′ ) (otherwise (T − {x ′ y ′ }) + {xy} would be a spanning tree of G of strictly greater weight than T ), so P T (x, y) is a path in T k . b) Let xy be an edge of G of weight k. Let us show that xy is an edge of UM if and only if x and y are in different connected components of UM k+1 . We assume that xy is an edge of UM. Let T be a maximum weight spanning tree of G such that xy is an edge of T . x and y are in different connected components of T k+1 , and therefore of UM k+1 by a). Conversely we assume that x and y are in different connected components of UM k+1 . Let T be a maximum weight spanning tree of G. As x and y are in different connected components of T k+1 , there is an edge x ′ y ′ of P T (x, y) of weight at most k. Then (T − {x ′ y ′ }) + {xy} is a maximum weight spanning tree of G, and therefore xy is an edge of UM. ✷ union of the maximum weight spanning trees, and therefore a simple iterative algorithm to compute them. Thus Algorithm Union-max-weight computes the union of the maximum weight spanning trees of G by initializing a set F with the empty set and adding to F , for each weight value k in decreasing order, the edges xy of G of weight k such that x and y are in different connected components of the graph (V, F ) in its state just after adding the edges of weight strictly grater than k.
In Algorithm Union-max-weight, k is the current value of weight, the sets C i are the connected components of the graph (V, F ) in its state at the beginning of iteration k and for each vertex x, numComp(x) is the index i of the component C i containing x. The algorithm is similar to the "maximum weight" variant of Kruskal's algorithm, the difference being that Kruskal's algorithm considers the connected components of the graph (tree) (V, F ) being computed in its current state instead of in its state at the beginning of iteration k, and therefore would update the variables C i and numCom just after each addition of an edge to F . It follows that the algorithms and complexity results already published on Kruskal's algorithm hold for the computation of the union of the maximum weight spanning trees. In particular the complexity can be improved by using a sophisticated UNION-FIND data structure. However, the simple algorithm presented here is sufficient to compute the atom graph in O(n 2 ) time.
Algorithm AG-max-weight input : The weighted intersection graph IG w of the atoms of a connected graph G. output: The atom graph of G.
return Union-max-weight(IG w ); Example 4.12 Figure 4 shows the weighted intersection graph of the atoms of the graph G from Figure 1 and an execution of Algorithm AG-max-weight, i.e. Algorithm Union-maxweight, on this weighted graph. It shows the state of the computed graph before and after adding the edges of weight 1.
Theorem 4.13 Given a weighted connected graph G w = (V, E, w) with natural integer weights on the edges, Algorithm Union-max-weight computes the union of the maximum Algorithm Union-max-weight input : A weighted connected graph G w = (V, E, w), with natural integer weights on the edges output: The union of the maximum weight spanning trees of G w .
Compute the maximum weight w max of an edge of G w and for each k in [1, w max ] the set E k of edges of G w of weight k; weight spanning trees of G w in O(w max + n 2 ) time, where w max is the maximum weight of an edge of G w .
Proof: It follows from Lemma 4.11 that the property P defined below is an invariant of the main foreach loop, using the notation UM k of this lemma, P : UM k = (V, F ) and ∀x ∈ V (C numComp(x) is the connected component of UM k containing x ∧ ∀y ∈ C numComp(x) numComp(x) = numComp(y)), which proves the correctness of the algorithm. where M is the n × p incidence matrix of the hypergraph (V, A(G)) (which will be called the atom hypergraph of G in Section 5), i.e. in O(n α ) time since p ≤ n. We obtain a time complexity in O(min(n α , ps)), and therefore in O(min(n α , nm)) since s ≤ n + m by Property 2.13. ✷ It follows that the atom graph can be computed from the set of atoms in O(min(n α , nm)) time.

Atom hypergraph
In this section, we define the atom hypergraph of a graph and relate it to the more general notion of α-acyclic hypergraph. Thus the atom trees of a connected graph are the join trees of its atom hypergraph. We recall that for each hypergraph H, 2SEC(H) is the graph whose vertex set is the vertex set of H and whose edges are the pairs of vertices that are contained in a hyperedge of H Characterization 5.2 An hypergraph is the atom hypergraph of a connected graph if and only if it is a connected α-acyclic clutter, and in that case it is the atom hypergraph of the graph 2SEC(H) which is a connected chordal graph.
Proof: The atom hypergraph of a connected graph G is connected (since G is and each edge of G is contained in an atom of G), α-acyclic (since G has an atom tree) and a clutter (by definition of atoms). Conversely, if H is a connected α-acyclic clutter then by Property 2.15 it is the atom hypergraph of the graph 2SEC(H) which is chordal, and which is connected since H is. ✷ Note that if H is the atom hypergraph of G then 2SEC(H) is the graph G + defined in Notation 2.6. Thus we refind that G + is chordal and has the same atoms as G (Property 2.7).

Definition 5.3
The union join graph of an α-acyclic hypergraph H, denoted by UJ(H), is the union of its join trees.
As the atom graph of a connected graph G is the union of its atom trees by Characterizations 3.5, we have the following property.
Property 5.4 The atom graph of a connected graph is the union join graph of its atom hypergraph.
As a generalization Characterizations 3.7, the union join graph of an α-acyclic hypergraph H can be computed from a join tree of H by the following operation tuj, where tuj stands for "to union join".
Definition 5.5 For each join tree T = (E, E T ) of a hypergraph, tuj(T ) is the graph whose node set is E and whose edges are the pairs {X, Y } of E such that there is an edge ⇒ : let T ′ be a join tree of H such that XY is an edge of T ′ , and let E X (resp. E Y ) be the connected component of T ′ − {XY } containing X (resp. Y ). As X ∈ E X and Y ∈ E Y , there is an edge X ′ Y ′ of P T (X, Y ) such that X ′ ∈ E X and Y ′ ∈ E Y . As T ′ is a join tree and XY is an edge of P T ′ (X ′ , Y ′ ), X ′ ∩ Y ′ ⊆ X ∩ Y . Hence XY is an edge of tuj(T ). ⇐ : let X ′ Y ′ be an edge of P T (X, Y ) such that X ∩ Y = X ′ ∩ Y ′ , and let T ′ be the graph (T − {X ′ Y ′ }) + {XY }. T ′ is a tree having the same weight as T (since w(XY ) = w(X ′ Y ′ )), so by Characterization 2.16 T ′ is also a join tree of H, and therefore XY is an edge of UJ(H). ✷ Thus we refind Characterization 3.7 from Property 5.4 and Characterization 5.6. Conversely, Characterization 5.6 can be deduced from Characterization 3.7 and Property 5.8 below, which shows that any α-acyclic hypergraph is an atom hypergraph up to isomorphism.
Notation 5.7 Let E and E ′ be two sets and let f be a one-to-one mapping from E to E ′ . For each graph K = (E, E K ), f (K) denotes the graph obtained from K by isomorphism f , i.e. f (K) = (E ′ , {f (X)f (Y ), XY ∈ E K }).
Property 5.8 Let H = (V, E) be an α-acyclic hypergraph. Then there is a connected chordal graph G = (V ′ , E G ) and a one-to-one mapping f from E to A(G) such that : 1) for each tree T = (E, E T ), T is a join tree of H if and only if f (T ) is an atom tree of G, 4) for each join tree T of H, tuj(f (T )) = f (tuj(T )).
Proof: By Characterization 5.2, it is sufficient to find a connected α-acyclic clutter H ′ = (V ′ , E ′ ) and a one-to-one mapping f from E to E ′ such that : (1) for each tree T = (E, E T ), T is a join tree of H if and only if f (T ) is a join tree of H ′ , 2) UJ(H ′ ) = f (UJ(H), and items 3) and 4). Let E ′ be defined from E by adding a new specific element a X to each element of E which is not inclusion-maximal in E, and adding a new common element a to each element of E if H is not connected. Let f map each element of E to the element of E ′ obtained from it, let V ′ = ∪ X∈E ′ X, and let H ′ = (V ′ , E ′ ). By definition, H ′ is a connected clutter satisfying 3). As for each added element a X (resp. a) the set of elements of E ′ containing it is reduced to {X} (resp. equal to E ′ ), H ′ is α-acyclic and satisfies (1). (2) follows from (1) and 4) follows from 3). ✷ Thus we can deduce from properties of α-acyclic hypergraphs (proved from the definition of α-acyclicity) properties of atom graphs, and conversely, we can deduce from properties of atom graphs (proved from properties of the minimal separators of the underlying graph) properties of general α-acyclic hypergraphs. This double approach helps to increase knowledge in both domains of atom graphs and α-acyclic hypergraphs, as some properties are easier to see in one of these domains than in the other one.
We point out here the incoherence between the atom graph and the atom hypergraph of a non-connected graph, which comes from the choice of the definition of separators of a non-connected graph. For a non-connected α-acyclic hypergraph H, a join tree of H is defined from the join trees of the connected components of H by adding edges (associated with the empty set) between these join trees to obtain a tree. We recall that according to the definition of separators given in this paper, we associate with each non-connected graph the forest of atom trees of its connected components. An alternative definition of separators, which is given for instance in [24], would preserve the coherence between the graph and hypergraph approaches, as well as Characterizations 2.9 and 3.7. It defines a separator in the same way in a non-connected graph as in a connected one : S is an ab-separator of G if a and b are in different connected components of G(V \ S). It follows that the empty set is the unique minimal ab-separator of G if a and b are in different connected components of G. Thus, according to this alternative definition, an atom tree of a (not necessarily connected) graph is a join tree of its atom hypergraph, and its atom graph is obtained from the atom graphs of its connected components by adding all edges between these atom graphs, as is the case for the union join graph of its atom hypergraph. Thus the results given in Section 4 for connected graphs extend to any graph when using this alternative definition of separators and to α-acyclichypergraphs that are not necessarily connected, as will be seen in Section 6.

Computing the union join graph
We present now Algorithm UJ-min-weight, which is an alternative to Algorithm Unionmax-weight computing the union join graph in O(p 2 ) time instead of O(n + p 2 ) time, but requires a join tree of H as input in addition to the weighted line graph of H. This algorithm obviously computes the atom graph of a connected graph, but Algorithm AG-max-weight already does it with the same complexity in O(n 2 ) time and less input. The algorithm follows from Characterization 6.7 below, which is an immediate consequence of the characterization of UJ(H) as tuj(T ) (Characterization 5.6). The algorithm computes for each pair {X, Y } of hyperedges of H the minimum weight of an edge of the path in T between Xand Y and stores it in the variables minW eight(X, Y ) and minW eight(Y, X) to be used later in the execution. Proof: Let w min be the minimum weight of an edge of P T (X, Y ). As X ∩ Y is a subset of X ′ ∩ Y ′ for each edge X ′ Y ′ of P T (X, Y ) since T is a join tree, w(XY ) ≤ w min , and w(XY ) = w min if and only there is an edge X ′ Y ′ of P T (X, Y ) such that X ∩ Y = X ′ ∩ Y ′ , i.e. if and only if XY is an edge of UJ(H) by Characterization 5.6. ✷ Proof: Correctness follows from the fact that by Characterization 6.7 the following proposition P is clearly an invariant of the main foreach and while loops. P : ∀{X, Y } ⊆ E, if {X, Y } ⊆ Reached then (minW eight(X, Y ) is the minimum weight of an edge of P T (X, Y ) ∧ (XY ∈ E ′ ⇔ XY is an edge of UJ(H))) otherwise (XY ∈ E ′ ⇔ XY ∈ E T ). The algorithm runs in O(p 2 ) time, by numbering the elements of E from 1 to p and storing the values of MinCard(X, Y ) for each (X, Y ) in E 2 such that X = Y in an array p × p. ✷ By Characterization 5.2 the complexity bounds in function of n, m and m + presented in Section 4 extend to each connected α-acyclic clutter H replacing m + by m as the graph G = 2SEC(H) is equal to G + since it is chordal (Property 2.15). In fact they also hold for each α-acyclic clutter, replacing m by n + m. This follows from the fact that the bounds of the parameters p, s and s △ (T ) by functions of n, m and m + extend to α-acyclic clutters. Property 6.9 For each α-acyclic clutter H, p ≤ n, s ≤ n + m, and for each join tree T of H s △ (T ) ≤ n + m.
Proof: By Characterization 5.2 these inequalities hold if H is connected. It can be proved that they also hold if H is disconnected by checking that the proofs of these inequalities given in Section 4 still hold. It can also be directly checked as follows. Let H 1 , . . . , H k the connected components of H, and for each i in [1, k] and each variable v let v i be the value of v in H i . Then p = Σ k i=1 p i ≤ Σ k i=1 n i = n. Similarly s ≤ n + m. For s △ (T ) we have s △ (T ) = Σ k i=1 s △ (T i ) + nb 1 , where nb 1 = Σ XY ∈E T ,X∩Y =∅ |X| * |Y | and m = Σ k i=1 m i + nb 2 , where nb 2 = Σ {i,j}⊆ [1,k] |V i | * |V j |. As nb 1 ≤ nb 2 , it follows that s △ (T ) ≤ n + m. ✷ Corollary 6.10 The complexity bounds in function of n, m and m + presented in Section 4 hold for each α-acyclic clutter H, replacing m by n + m and m + by m.
If H is an α-acyclic hypergraph which is not a clutter, the values of p, n and s △ (T ) may be exponential in n. It is the case of the hypergraph H = (V, P (V ) \ {∅}), which is α-acyclic since V is a hyperedge of H (the tree whose edges are the pairs of hyperedges containing V is a join tree of H).

Conclusion
In this paper, we provide two efficient algorithms to compute the atom graph of a graph, and extend them to compute the union join graph of an α-acyclic hypergraph.
Our algorithms, in the general case, compute the atom graph at no extra cost than computing the atoms.
It would be interesting to explore the class of graphs which are isomorphic to atom graphs, and to provide a recognition algorithm for this class.