The Cyclicity of a Hypergraph - IJS

Report 1 Downloads 73 Views
The Cyclicity of a Hypergraph France Dacar 1 Jozef Stefan Institute, Jamova 39, 61000 Ljubljana, Slovenia

Abstract The cyclicity of a hypergraph is an eciently computable integer that extends the notion of the cyclomatic number of a graph. The formula for the cyclicity is suggested by the join-invariant of an acyclic hypergraph, which is the multiset of all joining sets in any of its join-trees. Once we gure out how the multiplicity of a joining set depends on the structure of the acyclic hypergraph, we dene an analogous coecient, the star articulation degree, for any subedge of an arbitrary hypergraph, and then use it to set up the expression for the cyclicity. The basic properties of the cyclicity are that it is zero on acyclic hypergraphs and strictly positive otherwise, and that on graphs it coincides with the cyclomatic number we prove these and also some other properties. We associate with a hypergraph certain spaces of ows, represented by circulant graphs, so that the dimension of each space of ows is given by the cyclomatic number of the corresponding circulant graph, which is always equal to the cyclicity of the hypergraph. We consider one other kind of graphs, related to a hypergraph, whose cyclomatic number is always equal to the cyclicity of the hypergraph, namely join-graphs, which generalize join-trees of an acyclic hypergraph. We also compare the cyclicity of a hypergraph with the cyclomatic number of a hypergraph, which is like the cyclicity an extension of the cyclomatic number of a graph.

1 Introduction Extensions of the concept of cyclomatic number of a graph to hypergraphs are nothing new. For example, Berge gives in 3] one such extension, the cyclomatic number (E ) of a hypergraph E , introduced by Acharya and Las Vergnas in 1]. It is de ned as (E ) := 1

X

e2E

jej ;

  

  

E ; wE 

E-mail: [email protected].

1

where wE is the maximal weight of a subforest in the intersection graph of the hypergraph E . The weight of a subforest is calculated as the sum of terms je1 \ e2j over all arcs fe1 e2g of the subforest. The cyclomatic number (E ) is always non-negative and is zero precisely when the hypergraph E is acyclic moreover, when the hypergraph E is in fact a graph, (E ) is the usual cyclomatic number of the graph E . In this paper we propose another integral measure, the cyclicity  , de ned on hypergraphs, which has properties analogous to those of the cyclomatic number : it extends the notion of the cyclomatic number for graphs, it is always nonnegative, and is zero if and only if the hypergraph is acyclic. The cyclicity of a hypergraph E is given by

 (E ) :=

(E (f ) ; 1) ; jMax(E )j + 1 

X

f

where E (f ) is the `star articulation degree' of a subedge f in E , and the sum runs over all those subedges f that have this degree at least two. What use another extension of the cyclomatic number of graphs to hypergraphs? One interesting point of  (E ) is its form, as a simple additive combination of terms reecting local structural properties of the hypergraph E . By contrast, the term wE in the expression for the cyclomatic number (E ) is decidedly a global characteristics of the hypergraph E . This `local nature' of the cyclicity might be useful in applications. The cyclicity of a hypergraph has, in addition to this rather super cial distinction, some properties not enjoyed by the cyclomatic number of a hypergraph. For example, the cyclicity is preserved under blowups (substitutions of pairwise nonempty vertex sets for individual vertices), while the cyclomatic number is not. The cyclicity of a hypergraph generalizes the notion of the cyclomatic number of a graph also in the sense that it can be perceived as the dimension of a space of suitably de ned ows in a hypergraph. There are in fact many such spaces, in general, where the organization of ows for each space is represented by a graph. The idea of ow spaces thus boils down to the following: we can associate with a hypergraph certain `circulant graphs', so that the cyclomatic number of each of these graphs is equal to the cyclicity of the hypergraph. But the real insight into the meaning of terms in the formula for cyclicity is provided by join-graphs of a hypergraph, which are natural generalizations of join-trees of an acyclic hypergraph. We will be able to completely analize the structure of join-graphs. This analysis will show that the join-invariant of acyclic hypergraphs generalizes to arbitrary hypergraphs, and that every join-graph of a hypergraph has the cyclomatic number equal to the cyclicity of the hypergraph. It will be also apparent that join-graphs are closely related to circulant graphs. 2

In spite of dierences between the two extensions of the cyclomatic number of graphs|the cyclomatic number and the cyclicity of a hypergraph|they parallel each other in several respects. Both are eciently computable, both depend only on the maximal edges, both decrease on passing to subhypergraphs, and both are additive on compositions. Here is a short overview of the contents. In section 2 we lay down some basic de nitions and give two characterizations of acyclic hypergraphs. In section 3 we introduce the star articulation degree of a subedge and consider the joints of a hypergraph, which are the subedges whose degree is at least two. The formula for the cyclicity was anticipated by the `join-invariant' of an acyclic hypergraph, so we consider it next, in section 4. After these preparations we de ne in section 5 the cyclicity of a hypergraph and prove its key properties. In section 6 we associate with a hypergraph circulant graphs the cyclomatic number of each circulant graph is equal to the cyclicity of the hypergraph. Another kind of graphs associated with a hypergraph are join-graphs, which generalize join-trees of acyclic hypergraphs we introduce and examine them in section 7 again the cyclomatic number of any join-graph of a hypergraph is equal to the cyclicity of the hypergraph. We compare the cyclicity of a hypergraph with the cyclomatic number of a hypergraph in section 8, and conclude by some reections on the cyclicity and related notions.

2 Preliminaries A hypergraph is any nite collection of edges, where each edge is a nite set of vertices. We allow a hypergraph to have an empty edge instead of repelling the empty edge each and every time it threatens to nd its way into some hypergraph, we prefer to tolerate its mostly harmless presence. Sometimes though, the empty edge is just as useful as other edges and it would not be wise to forbid it. The span of a hypergraph E is the union E of its edges elements of the span of E are the vertices of E . A subedge of a hypergraph E is a subset of any edge of E . We write Max(E ) for the set of all inclusion maximal edges of a hypergraph E . A hypergraph whose edges are inclusion incomparable in pairs is called simple  a hypergraph E is simple i Max(E ) = E . A subset of a hypergraph E is called a partial hypergraph of E . S

Let E be a hypergraph and U any set of vertices of E . We call the hypergraph

E (U ) := f e 2 E j e  U g 3

the part of E in U , and the hypergraph

E U ] := f e \ U j e 2 E g

the subhypergraph induced by E in U . If U  V are any two sets of vertices of E , then (E (U )) (V ) = E (V ) and (E U ]) V ] = E V ]. The operation of inducing the subhypergraph on a ( xed) vertex set U has the property that Max(E U ]) depends only on Max(E ). Note that the operation of taking the part of a hypergraph in a vertex set does not have this property. With E and U as in the previous paragraph, we construct the intersection graph of E relative to U , which is the graph G with the node set E n E (U ) and with the arcs all those pairs fe f g of dierent edges of E whose intersection is not a subset of U . Node sets of the connected components of the intersection graph G are said to be the connected components of E relative to U  the connected components of E relative to the empty set are simply the connected components of E . We shall also be dealing with graphs, all of them undirected and without multiple edges or loops. We will talk of a graph as of a set of nodes connected by a set of arcs (instead of vertices connected by edges) to clearly tell graphs apart from hypergraphs. (We have already adhered to this convention when we described the intersection graph.) A graph G can be represented by a simple hypergraph, consisting of all two-element edges fu vg corresponding to arcs uv of G, and of all the singletons fug for the isolated nodes u of G. The primal graph of a hypergraph E is the union of the complete graphs K (e) for all edges e 2 E . Every edge of E is a clique of the primal graph of E , but the converse need not be true. A hypergraph E is said to be conformal i every maximal clique of its primal graph is an edge of E . The hypergraph of all (maximal) cliques of a graph is always conformal. We now introduce acyclic hypergraphs. Acyclicity is usually de ned only for simple hypergraphs we shall extend this notion to arbitrary hypergraphs in such a way that a hypergraph E will be considered acyclic precisely when the simple hypergraph Max(E ) is acyclic. There are many characterizations of acyclic hypergraphs (Beeri et al. give in 2] quite a few). We will present one of them as the de nition of acyclicity, and will then give some alternative characterizations. A triangulated graph is one in which every cycle of length at least four has a chord (ie. an arc connecting a pair of nonconsecutive nodes of the cycle).

Denition 1 A conformal hypergraph whose primal graph is triangulated is said to be acyclic.

The characterization of acyclic hypergraphs by `excluded' subhypergraphs, 4

given by the next lemma, is very close to the de nition. For any set X , let @X denote the set of all sets X n fxg for x 2 X (the `boundary' of a `simplex' X ).

Lemma 2 A hypergraph E is acyclic if and only if there does not exist a subset X  S E , such that (i ) jX j  3 and Max(E X ]) = @X , or (ii ) jX j  4 and Max(E X ]) is a (simply represented ) graph cycle. The condition that (i) does not happen means that E is conformal, while the condition that (ii) cannot occur is equivalent to the primal graph of E being triangulated. We can vividly describe these two conditions by saying that a hypergraph is acyclic i it has neither simplicial cavities nor circular holes. An immediate consequence of the characterization given by lemma 2 is that acyclicity is inherited by subhypergraphs:

Lemma 3 Any subhypergraph of an acyclic hypergraph is acyclic. The choice of the name \acyclic" is related to the fact that a hypergraph is acyclic precisely when it admits a tree-like arrangement. A join-tree is a tree T which has for the set of nodes a simple hypergraph E and satis es the following condition: for any three nodes e0 e e1 2 E , where the node e lies on the unique path in the tree T between the nodes e0 and e1, we have e  e0 \ e1. We say that a simple hypergraph E admits a join-tree i there exists a join-tree on the set of nodes E .

Lemma 4 A hypergraph E is acyclic i Max(E ) admits a join-tree. The two characterizations of acyclic hypergraphs, given by lemmas 2 and 4, complement each other in the sense that presence of a forbidden subhypergraph provides a proof of non-acyclicity, while a join-tree demonstrates that a hypergraph is acyclic. We shall nd use for both characterizations.

3 Star articulation degree and joints Let E be a hypergraph and f a subedge of E . The star of f in E , notation StE (f ), is the hypergraph consisting of all edges of E that include the subedge f . The star articulation degree of f in E , denoted E (f ), is the number of connected components of the star StE (f ) relative to the subedge f  we will refer to E (f ) simply as the degree of f in E , since it is the only kind of degree considered in this paper. Note that f has the same degree in E as in Max(E ). Maximal edges of E have degree 0 in E , while every proper subedge of E has degree at least one. Call the subedge f whose degree in E is at least 5

two, a joint of E , and let (E ) denote the set of all joints of E . Joints are in certain sense analogous to graph nodes of degree at least 2.

Lemma 5 Every joint of a hypergraph E is the intersection of two dierent maximal edges of E .

Proof. Let f be a joint of E . Take any two maximal edges e1 and e2 of E

from dierent connected components of the star StE (f ) relative to f . Then clearly e1 \ e2 = f . 2 An important consequence of this lemma is the upper bound jE j (jE j ; 1)=2 on the number of joints of a hypergraph E . For any hypergraph E let !(E ) be the set of all intersections of pairs of dierent maximal edges of E . We have just shown that (E ) is a subset of !(E ). We can say more:

Lemma 6 Max(!(E )) = Max( (E )). Proof. Let f be maximal in !(E ). Any two dierent maximal edges of E that

include f must have intersection f , by maximality of f . This means that each maximal edge of the star StE (f ) belongs to a dierent connected component of the star relative to f , and since there are at least two dierent maximal edges in the star, the subedge f is a joint of E , clearly a maximal one. Conversely, let f be a maximal joint. Since f belongs to !(E ), it is a subset of some maximal member g of !(E ). Now according to the rst part of the proof g is a joint, hence must be equal to the maximal joint f . 2 An easy consequence is that any hypergraph with at least two dierent maximal edges has joints. As we can see from the proof, a joint f of a simple hypergraph E is maximal precisely when each connected component of the star StE (f ) relative to f consists of a single edge.

4 The join-invariant of an acyclic hypergraph Let E be a simple acyclic hypergraph and T a join-tree for E . A joining set of T is the intersection of a pair of edges of E that are adjacent as nodes of T . Denote by "(T ) the multiset of all joining sets of T . As we will soon see, "(T ) does not depend on the choice of a join-tree T (the acyclic hypergraph E may admit several join-trees) because of this property it will be called the joininvariant of E . We will prove the invariance of "(T ) by correctly `guessing' 6

how many times each joining set appears in a join-tree.

Theorem 7 If T is a join-tree of a simple acyclic hypergraph E , then "(T ) is the multiset of all joints of E in which each joint f appears E (f ) ; 1 times. Proof. Our claim is that "(T ) = (E (f ) ; 1)  f  X

f 2(E )

where the sum on the right hand side is a formal linear combination of vertex sets with natural numbers as coecients. Note that we can extend this sum over all proper subedges of E without changing its value, because a proper subedge which is not a joint contributes nothing to it. The proof will be by induction on the number of edges in E . Since the identity clearly holds when E consists of a single edge, let us suppose, from now on, that E has at least two edges. Choose a leaf e of the join-tree T , and let e0 be the only neighbour of e in T . Put T 0 := T ; e, E 0 := E n feg, and g := e \ E 0 = e \ e0. Then the hypergraph E 0 is simple acyclic with a jointree T 0, and "(T ) = "(T 0) + g. We must show that the sum given above behaves in the same way, which means that S

(E ) = (E 0) fgg  and that for each joint f of E dierent from g we have

E (f ) = E (f )  while 0

E (g) = E (g) + 1 : Let s be any proper subedge of E . If s contains a vertex outside E 0, then StE (s) = feg and E (s) = 1, thus s is not a joint of E . 0

S

Now suppose that s is a subset of E 0 then s is a proper subedge of E 0. Indeed, s is a proper subset of some edge of E , and if this edge happens to be e, then s is a subset of e \ E 0 = g, hence a proper subset of the edge e0. S

S

First consider the case when s = g. The star StE (g) has at least one connected component, namely the one containing the edge e0. Since every edge of the star StE (g) intersects the edge e in g, the connected components of the star StE (g) are those of the star StE (g) and the one additional connected component feg, so we have E (g) = E (g) + 1  2. (It can happen that E (g) = 0, ie. g need not be a joint of E 0). 0

0

0

0

0

Next, let s be a proper subedge of E 0 dierent from g. If s is not a subedge of g, then StE (s) = StE (s) and hence E (s) = E (s). It remains to consider the case 0

0

7

when s is a proper subedge of g. Let F1, : : : , Fk be the connected components of StE (s) relative to s, where e0 2 F1. Then the connected components of StE (s) relative to s are F1 feg, F2, : : : , Fk . This is because e\e0 = g contains vertices outside s, so e is directly connected to e0 2 F1, while on the other hand, for any h 2 F2    Fk we have e \ h = e \ h \ E 0 = e \ h \ e0  h \ e0  s. Thus E (s) = E (s) also in this case. 2 0

S

0

5 The cyclicity of a hypergraph In this section we introduce the cyclicity of a hypergraph and prove its key properties.

Denition 8 Let E be any hypergraph. The integer  (E ) := (E (f ) ; 1) ; jMax(E )j + 1 X

f 2(E )

will be called the cyclicity of E .

Sometimes it comes handy to think of the sum in the de nition of  (E ) as being extended over some other proper subedges of E besides the joints this does not change the sum, since the additional terms are all zeros. We can also incorporate the term jMax(E )j into the sum and write

 (E ) :=

(E (f ) ; 1) + 1 

X

f

with f running over all maximal edges and all joints, and perhaps some other subedges. As the sum stands in the de ning formula for the cyclicity, it is evident that it is eciently computable (assuming the hypergraph E is given by an explicit list of edges). Because each subedge has the same degree in E as in Max(E ), it follows that  (E ) =  (Max(E )). If E is a simple acyclic hypergraph, then the total number of joints, each joint f counted E (f ) ; 1 times, equals the number of arcs in a join-tree of E , so we have

Lemma 9 The cyclicity of an acyclic hypergraph is 0. Of course we now want to show that a hypergraph which is not acyclic has a strictly positive cyclicity. At this point we do not even know whether the cyclicity is always nonnegative. Luckily, the cyclicity is in a certain sense monotonous, from which we will easily derive the desired characterization of acyclic hypergraphs.

Theorem 10 If F is a subhypergraph of E , then  (F )  (E ). 8

Proof. We can assume that E is simple and that F = E U ], where U is the span E minus some vertex u of E . The hypergraph E splits into the disjoint union E = E (U ) StE (u). Put S := StE (u), S0 := f e 2 S j e n fug is a subedge of E (U ) g  and let S1 be the complement of S0 in S . Note that for every e0 2 S0, e0 n fug S

is a proper subedge of E (U ). Then

Max(F ) = E (U ) S1 U ]  where the union is disjoint and dierent edges e 2 S1 give rise to dierent edges e \ U = e n fug of S1 U ], so that

jMax(F )j = jE j ; jS0j :

We must show that in passing from E to F , the sum in the formula for the cyclicity decreases by at least jS0j. Let f be any proper subedge of F . If f is not a subset of any edge of S , then StE (f ) = StF (f ), hence F (f ) = E (f ). Now assume that f is a subset of at least one edge of S , and write R := StS (f ), S 0 := StE(U )(f ). Then StE (f ) = S 0 R and StF (f ) = S 0 R U ]. All the edges of R are directly connected to each other relative to f , because the intersection of any two of them contains the vertex u 2= f . Suppose that f 2= R U ]. Then the connected components of StF (f ) relative to f which contain edges e0 2 R U ], say there are k such components, get merged into a single connected component of StE (f ) relative to f , while all other connected components relative to f are the same in StF (f ) as in StE (f ). Thus E (f ) = F (f ) ; k + 1. But now we have also a proper subedge f fug of E , where (f fug)  k, whence E (f ) + E (f fug)  F (f ) + 1, that is, (E (f ) ; 1) + (E (f fug) ; 1)  F (f ) ; 1 : There remains the case with f 2 R U ]. Since f is a proper subedge of F , we must have f = e0 n fug for some e0 2 S0. Moreover, T = fe0g and the connected components of StE (f ) relative to f are those of StF (f ) and the one additional component fe0g, therefore E (f ) = F (f ) + 1. We have already noticed that, for every e0 2 S0, e0 nfug is a proper subedge of E (U ) and hence of F . This gives us jS0j proper subedges of F at each of which the sum in the de nition of cyclicity gains 1 on going from F to E . 2 It is now easy to obtain the desired characterization of acyclic hypergraphs:

Theorem 11 The cyclicity of a hypergraph is always nonnegative, and is zero precisely when the hypergraph is acyclic.

Proof. We already know that the cyclicity of an acyclic hypergraph is 0

(lemma 9). Now suppose that E is a hypergraph which is not acyclic. Then 9

ee EE

EE’0

Fig. 1. An acyclic hypergraph with a non-acyclic partial hypergraph.

there exists a subset X of E consisting of n vertices such that either n  3 and Max(E X ]) = @X , or n  4 and Max(E X ]) =: C is a graph cycle of length n in the former case  (E )   (@X ) = 21 n(n ; 3) + 1  1, and in the latter  (E )   (C ) = 1. 2 S

Note that cyclicity does not necessarily decrease on partial hypergraphs. Consider the acyclic hypergraph E in Fig. 1. When we remove from E the edge e, we get the partial hypergraph E 0, which is not acyclic, while all of its proper partial hypergraphs are acyclic. This example shows that in fact there cannot be any function from hypergraphs into a partially ordered set which would attain a certain xed value precisely on acyclic hypergraphs and would also decrease on partial hypergraphs. We conclude the section by showing that the cyclicity of a hypergraph extends the notion of the cyclomatic number of a graph.

Lemma 12 Let G be an undirected graph represented as a simple hypergraph. Then  (G) is the usual cyclomatic number of the graph G.

Proof. Let G have q arcs, p nodes, and s connected components. Some nodes may be isolated, say p0 of them. We extend the sum in the de nition of cyclicity over all proper subedges of G, which are the singletons fug for all non-isolated nodes u and the empty subedge. Computing the cyclicity of G,

 (G) =

((u) ; 1) + (( ) ; 1) ; jGj + 1

X

u

= 2q ; (p ; p0) + (s ; 1) ; (q + p0) + 1 = q ; p + s  we nd that it is in fact equal to the cyclomatic number of the graph G. 2 10

uu

vv

uu

vv xx

xx yy

yy

Fig. 2. A ow scheme, where maximal edges communicate through subedges.

6 Flows in a hypergraph and circulant graphs In this section we observe ows in a hypergraph. There are many sensible ways to de ne a space of ows that will be somehow related to the structure of a hypergraph. We shall only consider special spaces of ows, where the organization of ows belonging to a space is represented by a certain `circulant graph'. In general there are several circulant graphs associated with the same hypergraph. The dimension of a ow space is given by the cyclomatic number of the corresponding circulant graph, which is always equal to the cyclicity of the hypergraph. Think of each edge of a hypergraph as a simplicial container lled with incompressible uid, where containers/edges exchange uid via junctions built into some of their walls/subedges. In Fig. 2 we see an arrangement of containers and junctions, where edges of a simple hypergraph may communicate via all nonempty subedges those junctions not adjoined to at least two containers are sealed against the great outer void. With each pair consisting of an edge and its junction subedge, associate a ow from the subedge into the edge. At each edge and each junction subedge we have the corresponding Kirchho's law stating that the sum of all ows (incoming for edges, outgoing for junction subedges) is zero. For example, the following ows in Fig. 2 must sum to zero: the six ows into the edge xyv, the two ows into the ends of the `pipeline' uv, the two ows out of the junction subedge xy, the two ows out of the junction subedge v the ow out of the subedge yv into the edge xyv must be itself zero. All the Kirchho's laws together determine the space of ows for the chosen system of junctions. The arrangement in Fig. 2 is too generous with junctions. The sealed, therefore superuous, junctions are a minor blemish. More serious objection can be made against multiple junctions, since they introduce local ambiguities. For example, there are three junction subedges x, y, and xy between the edges xyu and xyv. The total ow from the edge xyu to the edge xyv is given by the sum of the ows out of the subedges x, y, and xy into the edge xyv only 11

uu

vv

uv uv

uu

xx

vxy vxy

vv uxy uxy

xy xy

yy

Fig. 3. Another ow scheme with communication only through joints.

this sum matters, not the individual ows. Another possible approach, more sparing with junctions, is to allow only the joints to be chosen as junction subedges, as in Fig. 3. This also happens to be the right kind of choice for our purposes. We will be even more restrictive and will make each joint serve as a junction for only one edge in each relatively connected component of the star over the joint. It is clear that each arrangement of junctions can be represented by a graph. The graph for the arrangement in Fig. 3 is also shown there this graph is undirected|the arrows on arcs only indicate the direction of inclusion between subedges and edges and are not part of the graph structure. It is also clear that ows in a hypergraph precisely correspond to the usual ows in the graph, so that the dimension of the ow space is given by the cyclomatic number of the graph. We can therefore stop thinking about ows and dimensions of ow spaces, and consider instead only graphs and their cyclomatic numbers. Here is a formal de nition of the special kind of ow-representing graphs we shall consider. Let E be a simple hypergraph. Add to E all the joints and perhaps some other subedges of E , and denote the resulting hypergraph by F . (Hypergraphs assembled in this manner are characterized by the property that all of their joints are also their edges.) We take the hypergraph F for the node set of a graph G. For each edge f of F that is a proper subedge of E , and each connected component C of the star StF (f ) relative to f , we choose an edge f 0 in C  the arcs of G are then all the pairs ff f 0g. We will say that any graph G obtained in this way is a circulant graph of a simple hypergraph E .

Theorem 13 Every circulant graph G of a simple hypergraph E is connected, and the cyclomatic number of G is equal to the cyclicity of E .

Proof. Take a look at the formula for the cyclicity of E (de nition 8). We can assume that the sum of terms E (f ) ; 1 runs over all those edges f in the

node set F of the graph G that are proper subedges of E . Since E = Max(F ), we have E (f ) = F (f ) for every edge f of F . Now we split the sum into the dierence of the sum of degrees F (f ), which is precisely the number of edges 12

of the graph G, and the sum of 1's, which together with the term jE j yields the number of nodes of G. We see that the whole expression in fact gives the cyclomatic number of the graph G, provided G is connected. Suppose G is not connected. Then the node set F can be partitioned into two nonempty subsets F1 and F2 such that each arc of G lies within one of these two subsets. Since every edge of F is connected in G to some edge of E , the sets E1 := E \ F1 and E2 := E \ F2 are nonempty. Let g be maximal among all intersections of the form e1 \ e2 with e1 2 E1 and e2 2 E2 because e1 and e2 are dierent maximal edges of F , g is a proper subedge of both e1 and e2. The star S := StF (g) is partitioned into S1 := S \ F1 and S2 := S \ F2, where e1 2 S1 and e2 2 S2. The intersection of any edge from S1 with any edge from S2 is g, because of the maximality of g. This means that the star S has at least two connected components relative to g, so g is a joint and therefore belongs to F , say g 2 F1. But then g is connected by an arc of G to some edge in S2, a contradiction. 2 In particular, a simple hypergraph is acyclic if and only if any of its circulant graphs is a tree (in which case every circulant graph is a tree).

7 Join-graphs, general join-invariant, and cyclicity Let E be a simple hypergraph and G a graph on the set of nodes E . If f is a subedge of E , then a walk in G whose every node includes f will be said to be over f . We will say that G joins a pair of edges e1, e2 of E i the edges are connected in G by a walk over e1 \ e2, and will say that G joins the hypergraph E i G joins every pair of edges of E . Note that whenever edges e1 and e2 are joined in G by a walk, they are also joined by a path composed of some arcs of the walk. A graph G that is inclusion minimal (as a set of arcs) wrt. the property of joining the hypergraph E , will be called a join-graph of E . The complete graph on the set of nodes E clearly joins E  it follows that the hypergraph E has at least one join-graph. Suppose that a graph G joins E , and that a = fe1 e2g is an arc of G joined in G by a path p on which the arc a does not appear let us call such an arc a of the joining graph G redundant. If we remove a redundant arc a from G, then the remaining graph G0 still joins the hypergraph E : any pair of edges d1, d2 of E is joined by a path in G if the path contains the arc a, then e1 \ e2  d1 \ d2, so substituting the path p for the arc a we obtain a walk in G0 over d1 \ d2, which therefore joins d1 and d2. On the other hand, if no arc of the graph G is redundant, and we remove one or more arcs from it, then the end nodes of any of the removed arcs can 13

no longer be joined in the remaining graph. Thus we have

Lemma 14 A graph that joins a simple hypergraph is its join-graph if and only if it does not have any redundant arcs. We will now state the structure theorem for join-graphs. We need some notions to do this. A pair fe1 e2g of dierent edges of a simple hypergraph E is said to be articulated i e1 and e2 are not connected in the star StE (e1 \ e2) relative to e1 \ e2. Equivalently, fe1 e2g is an articulated pair i e1 \ e2 := f is a joint and the edges e1 and e2 lie in dierent connected components of the star StE (f ) relative to f . For a joint f of E we denote by CE (f ) the set of all connected components of StE (f ) relative to f . Let f be a joint and T a set of articulated pairs fe1 e2g with e1 \ e2 = f . To each pair fe1 e2g in T there corresponds the pair fC1 C2g of dierent connected components in CE (f ), where Ci is the connected component containing the edge ei, for i = 1, 2 let T be the set of all pairs of connected components corresponding to the pairs of edges in T . We call T a tree set over f i the mapping fe1 e2g 7! fC1 C2g from T to T is bijective and T is a tree on the set of nodes CE (f ).

Theorem 15 (Structure of join-graphs) Let G be a join-graph of a simple

hypergraph E . All arcs of G are articulated edge pairs in E , and for each joint f of E the set Tf of all arcs fe1 e2g of G with e1 \ e2 = f is a tree set over f .

Proof. We show rst that any arc fe1 e2g of G is an articulated pair of edges. Write f := e1 \ e2, and assume that e1 and e2 are connected in the star StE (f ) relative to f . Then there is a sequence of edges h0 = e1, h1, : : : , hn = e1 such that hj;1 \ hj  f for each j = 1, : : : , n. Since G joins E , each pair of edges

hj;1, hj is joined in G by a path pj . The composition of paths p1, : : : , pn is a walk p joining e1 with e2, where the intersection of any two consecutive nodes of p is a proper superset of f . The arc fe1 e2g does not appear in the walk p and is therefore redundant, contrary to minimality of G. This contradiction shows that e1 and e2 are not connected in StE (f ) relative to f . Let now f be any joint of E and let the set Tf be as in the theorem. We will show that there cannot be two dierent arcs fe1 e2g and fe01 e02g in Tf such that ei and e0i would belong to the same connected component Ci in CE (f ), for i = 1, 2. Assume the contrary. Then the edges ei and e0i are joined by a path pi in G, i = 1, 2 (at least one of the paths p1 , p2 is of non-zero length), where the intersection of any two consecutive nodes on the path pi is a proper superset of the join f . No arc on pi can be either fe1 e2g or fe01 e02g, and it follows that, say, the arc fe1 e2g is redundant. Denote by Tf the set of all pairs of connected components in CE (f ) corresponding to arcs in Tf . By the same argument as we have used just now it follows that Tf can contain no cycle. It remains to show that Tf connects any two dierent nodes C1 and C2 in CE (f ). Choose edges c1 2 C1 and c2 2 C2, and let d0 = c1, d1, : : : , dn = c2 be the sequence of 14

nodes on some path in G joining c1 and c2 all the edges d0, d1, : : : , dn belong to StE (f ). For each j = 0, 1, : : : , n let Dj be the connected component in CE (f ) containing dj . Then in the sequence D0 , D1 , : : : , Dn either Dj;1 = Dj , or fDj;1  Dj g belongs to Tf , for each j = 1, : : : , n. Save for consecutively repeated nodes, we have a walk connecting C1 with C2 in the tree Tf . 2 The structure theorem for join-graphs has two immediate corollaries. The rst corollary asserts the existence of the join-invariant for arbitrary hypergraphs, not just for the acyclic ones, while the second corollary `explains' the coecients in the formula for the cyclicity of a hypergraph as the sizes of tree sets over the joints of a hypergraph.

Corollary 16 (The join-invariant) If G is a join-graph of a hypergraph E , then the multiset of all joining sets of G is

"(G) =

(E (f ) ; 1)  f 

X

f

where the sum is taken over all joints of E .

Corollary 17 Any join-graph of a simple hypergraph has the cyclomatic number equal to the cyclicity of the hypergraph.

Join-trees are clearly just join-graphs that happen to be trees. Given a hypergraph, either all of its join-graphs are trees, or none is in the former case the hypergraph is acyclic and its cyclicity is zero, in the latter it is not acyclic and has a nonzero cyclicity. This again proves the theorem 11. The structure theorem for join-graphs has an exact converse, the construction theorem, which says in eect that the tree sets determined by a join-graph are completely arbitrary and independent of each other. We need a preliminary lemma.

Lemma 18 For any two edges e1 and e2 of a simple hypergraph E there exists a sequence of edges starting with e1 and ending with e2, where each edge in the sequence is a superset of e1 \ e2 and any two consecutive edges form an articulated pair. Proof. Since according to the structure theorem for join-graphs, all arcs of a

join-graph are articulated pairs, just join the edges e1 and e2 in any join-graph of the hypergraph E . 2 And here is now the construction theorem for join-graphs:

Theorem 19 (Construction of join-graphs) If E is a simple hypergraph,

and for each joint f of E , Tf is any tree set over f , then the union of the tree sets Tf for all joints f is the set of arcs of a join-graph of E .

15

Proof. The tree sets Tf are disjoint with each other: for every edge pair fe1 e2g in Tf we have e1\e2 = f , thus tree sets over dierent joints cannot have any edge pair in common. For each tree set Tf denote by Tf the corresponding tree on the node set CE (f ). Let G be the graph on the set of nodes E whose set of arcs is the union of all tree sets Tf . For every joint f of E the set of all arcs fe1 e2g of G with e1 \ e2 = f is precisely the tree set Tf . If we show that

G joins E , it will immediately follow that G is in fact a join-tree of E , since by the structure theorem for join-graphs we cannot remove any arcs from G and still have a graph joining E . Because of lemma 18 it suces to show that an articulated pair of edges fe1 e2g is joined in G. The proof will be by induction on the joint f := e1 \ e2 in the ordering of joints opposite to the inclusion (ie. the induction will go downwards). Let Ci be the connected component in CE (f ) contaning the edge ei, i = 1, 2. There is a path D0D1    Dn in the tree Tf connecting C1 = D0 to C2 = Dn . For each j = 1, : : : , n let fd0j;1  dj g be the pair in the tree set Tj such that d0j;1 2 Dj;1 and dj 2 Dj . Here the pairs fd0j;1 dj g are already arcs of the graph G, and the nodes d0j;1, dj include f . It remains to show that the pairs fe1 d00g, fd1 d01g, : : : , fdn;1  d0n;1g, fdn e2g are joined in G. Each of these pairs is connected in the star StE (f ) relative to f , so let fd d0g be any such pair. There exists a path c0c1    cm connecting d = c0 to d0 = cm (where possibly m = 0) in StE (f ) relative to f . For each k = 1, : : : , m the edges ck;1 and ck are connected, according to lemma 18, by a path over ck;1 \ ck  f , where all arcs on the path are articulated pairs of edges. The concatenation of these paths is a walk from d to d0, each arc of which is an articulated pair of edges fa bg with a \ b  f , hence by the induction hypothesis the edges a and b are joined in the graph G. 2

It is an obvious consequence of the construction theorem for join-graphs that every articulated edge pair in a simple hypergraph appears as an arc in some join-graph of the hypergraph. Simple as this consequence is, it will help us along with the proof of the characterization of acyclic hypergraphs, given in the next proposition. Let us say that dierent edges e1 and e2 of a simple hypergraph E form a globally articulated pair i they are not connected in E relative to e1 \ e2. By way of contrast we shall refer to an articulated edge pair as being locally articulated. A globally articulated pair is clearly always locally articulated.

Proposition 20 A simple hypergraph is acyclic if and only if each of its locally articulated edge pairs is globally articulated.

Proof. Let E be an acyclic simple hypergraph and fe1 e2g a locally articulated pair of edges in E . There exists a join-tree T of E in which fe1 e2g is an arc. The tree T with the arc fe1 e2g removed is the union of two node-disjoint subtrees T1 and T2, where e1 is a node of T1 and e2 a node of T2. Since the 16

intersection of any node of T1 with any node of T2 is a subset of e1 \ e2, the edges e1 and e2 are not connected in E relative to e1 \ e2. Conversely, assume that each locally articulated edge pair in a simple hypergraph E is globally articulated. Since E = feg is acyclic, we assume that E has at least two dierent edges then E has joints. Choose a joint f and a connected component C1 of the star StE (f ) relative to f , and let C2 be the union of all other connected components of StE (f ) relative to f . The component C1 is included in some connected component E1 of E relative to f  put E2 := E n E1. We have h1 \ h2  f for any edges h1 2 E1 and h2 2 E2 because of the choice of E1 and E2, and C2  E2 by our assumption. Both E1 and E2 are nonempty since C1 and C2 are nonempty, so both are proper subsets of E . Consider a locally articulated pair fh1 h2g in Ei with h1 \ h2 =: g we claim that it is still locally articulated in E . If g is not a subset of f , then StE (g) = StE (g). Suppose that g  f . If we had a path in StE (g) connecting h1 with h2 relative to g, we could substitute the edge ei for any edge outside Ei that appears on the walk, and thus obtain a walk, possibly with consecutive repetitions of the node ei, that would connect h1 with h2 in StE (g). In either case h1 and h2 are not connected in StE (g) relative to g. It then follows, in view of our assumption, that h1 and h2 are not connected in E , much less in Ei , relative to g E1 and E2 are therefore acyclic by induction hypothesis. Choose join-trees, T1 in E1 and T2 in E2, and add the arc fe1 e2g to T1 T2 the result is clearly a join-tree of E . 2 i

i

A coherent join-graph is one in which each tree set Tf is connected, so is actually a tree naturally isomorphic to the tree Tf . According to the construction theorem for join-graphs, every simple hypergraph has coherent join-graphs in particular, every simple acyclic hypergraph has coherent join-trees. Coherent join-graphs are closely related to circulant graphs of a special kind. A circulant graph of a simple hypergraph E is called a top circulant graph of E i its nodes are precisely all the edges and joints of E , where every joint is directly connected only to edges of E  a top circulant graph is thus bipartite. If H is a top circulant graph of E , then for every joint f choose a tree Tf on the neighbours of f in H  then the union of the trees Tf for all joints f is the arc set of a coherent join-graph of E . Conversely, every coherent join graph determines the corresponding top circulant graph and all the trees over joints. Let us mention, as a curiosity, that the collection M of all join-graphs of a simple hypergraph E is the set of bases of a binary matroid. We can easily exhibit a coordinatization. Take the set of all pairs (f C ), where f is a joint of E and C a connected component of the star StE (f ) relative to f , and make this set a basis of a vector space V over the two-element eld. Let a = fe1 e2g be any arc of the complete graph K (E ) on the node set E . If fe1 e2g is an articulated pair, then put va := (f C1) + (f C2) 2 V , where f is the joint 17

e1 \ e2, while C1 and C2 are the connected componets in CE (f ) that contain e1 and e2, respectively otherwise, if the pair fe1 e2g is not articulated, put va := 0 2 V . Then a subset G of K (E ) (both considered as sets of arcs) is a join-graph of E if and only if the family ( va j a 2 G ) is a basis of the subspace of V spanned by all the vectors va. The abstract structure of the matroid M does not carry much information about the hypergraph E , since it is completely determined by numeric distributions of edges in the sets CE (f ) of relatively connected components over joints f .

8 Cyclicity vs. cyclomatic number We have mentioned in introduction the cyclomatic number (E ) of a hypergraph E . In this section we compare it with the cyclicity of a hypergraph. First, let us verify that the cyclicity is not the same thing as the cyclomatic number. If X is a set of n  3 vertices, then  (@X ) = 12 n(n ; 3) + 1 and (@X ) = n ; 2. For another example take a hypergraph E = fa b cg, where j(b \ c) n aj = m, j(a \ c) n bj = n, and j(a \ b) n cj = p, with m n p > 0 in this case  (E ) = 1, while (E ) = min(m n p). The two examples demonstrate that the dierence  (E ) ; (E ) is not bounded in either direction. The cyclicity and the cyclomatic number do not dier only in value, they also behave dierently. For example, the cyclicity is preserved under blowups, while the cyclomatic number is not. To describe what we mean by a blowup of a hypergraph, let E be a hypergraph and a surjective function mapping a

nite set W onto the span of E . The inverse image (E ) of the hypergraph E , consisting of the inverse images (e) = ;1 (e) of the edges e 2 E , is then a blowup of E (since each vertex u of E is `blown up' by to a nonempty

nite vertex set (u), where these vertex sets are pairwise disjoint). It is obvious that the maximal edges of the hypergraph E bijectively correspond to their counterparts in (E ), and the same is true for intersections of maximal edges. Star articulation degrees of corresponding joints are the same, and so is then the cyclicity. The cyclomatic number, however, may change when the hypergraph is blown up, as is evident from the second example given above. On the other hand, there are also similarities between the cyclicity and the cyclomatic number: both depend only on the maximal edges, both decrease on subhypergraphs, both are additive on compositions. The cyclicity satis es  (E ) =  (Max(E )) by de nition, and it is shown in 1] that the cyclomatic number also has this property. We have seen that the cyclicity decreases on subhypergraphs (theorem 10). So does the cyclomatic number since this is not mentioned in 1], it will do 18

no harm to prove it here. Notice that the maximum weight of a subforest of the intersection graph of E is the same as the maximum weight of a tree on the set of nodes E , if we allow a tree to have arcs of weight 0, which we do.

Theorem 21 If F is a subhypergraph of E , then (F ) (E ). Proof. We can assume, without loss of generality, that E is a simple hypergraph and that F := E U ], where U = ( E ) n fug for some vertex u 2 E . (It does not matter that E U ] might not be simple.) Write S := StE (u). The mapping S ! S U ] : s 7! s n fug is bijective and S U ] has no edge in S

S

common with E (U ), so E U ] is a disjoint union of E (U ) and S U ]. Let T be a maximum weight tree for E , that is, w(T ) = wE . Since the mapping E ! E U ] : e 7! e n fug is a bijection, it maps the tree T on nodes E to a tree T 0 on nodes E U ]. We have (E ) = and

X

e 2E

(E U ])

jej ;

  

X

e 2E U ] 0

  

E ; wE

je0j ;

  

  

E U ] ; w(T 0) :

Going from the former to the latter, we lose jS j in the rst term (ie. the sum) and gain 1 in the second. Since the graph induced by the tree T on the set of nodes S is a forest, we gain at most jS j ; 1 in the third term. All in all we have a net de cit (possibly zero), meaning that (E U ]) (E ). 2 Another property shared by the cyclicityand the cyclomatic number of a hypergraph is additivity on compositions. A composition of hypergraphs is analogous to a clique sum of graphs, namely the kind where we do not remove the arcs of the common clique. Let E1 and E2 be hypergraphs with disjoint spans, g1 a subedge of E1, g2 a subedge of E2 of the same size as g1 , and ' a bijection g1 ! g2 given these data, we compose E1 and E2 by identifying each vertex u in g1 with the vertex '(u) in g2 . Hypergraphs E1 and E2 are then embedded into the composition E as partial hypergraphs, still denoted E1 and E2, in such a way that E = E1 E2, and ( E1) \ ( E2) =: g is a subedge of both E1 and E2 we will consider only this `internal' form of composition, and will say that it is over g. Notice that whenever we have a composition E of E1 and E2 over g, we have also a composition Max(E1) Max(E2) of Max(E1) and Max(E2) over g. If E is a composition of simple hypergraphs E1 and E2 over g, then E need not be simple (but comes very close to being simple when it is not). There are three possibilities: (a) g is a proper subedge of both E1 and E2: E1 and E2 have no edge in common and E = E1 E2 (b) g is an edge of one of the hypergraphs E1, E2, and is a proper subedge of the other if g belongs, say, to E1, then E = (E1 nfgg) E2 , a disjoint S

19

S

union (c) g is an edge of both E1 and E2 now E = E1 E2 and E1 \ E2 = fgg. We will now state and prove the additivity rst for the cyclicity and then for the cyclomatic number of a hypergraph.

Proposition 22 If a hypergraph E is a composition of hypergraphs E1 and E2, then  (E ) =  (E1) +  (E2 ).

Proof. We may assume that E1 and E2 are simple, since this does not aect the generality of the proof. Let g be the common subedge over which E1 and E2 are composed. Take any join-graphs G1 and G2 of E1 and E2, respectively, choose an edge h1  g in E1 and an edge h2  g in E2, and construct a graph G, as follows. In the case (a) (of the three cases (a), (b), and (c) mentioned in the text) add to a graph G1 G2 the arc fh1 h2g. In the case (b) remove from the graph G1 G2 the node g and reconnect its neighbours to the node h2. Finally, in the case (c) just take for G the union G1 G2. The cyclomatic number of the graph G is in all three cases the sum of the cyclomatic numbers of G1 and G2. Because of the corollary 17 it suces to show that G is a join-graph of E  we will do this only for the case (a), since the argument can be easily adapted to the other two cases. We show rst that G joins E . Any two edges of E1, or of E2, are joined in G1 or in G2, respectively, so are also joined in G. Otherwise, if e1 is an edge of E1 and e2 an edge of E2, then e1 \ e2  g = h1 \ h2, hence e1 \ e2  e1 \ h1 and e1 \ e2  e2 \ h2 if we now join e1 to h1 in G1, pass along the arc fh1 h2g to h2, then join h2 to e2 in E2, we have joined e1 to e2 in G. It remains to verify the minimality of G. We cannot remove the arc fh1 h2g, because then the nodes h1 and h2 are no longer connected, much less joined, in G. Otherwise, if a is an arc of, say, G1, then its end-nodes are not joined in the graph G n fag, since the shortest path joining the ends of a in G n fag would then lie entirely within the graph G1 n fag, which is impossible in view of the minimality of G1. 2 Proposition 23 If a hypergraph E is a composition of hypergraphs E1 and E2, then (E ) = (E1) + (E2 ).

Proof. If E1 and E2 are composed over g, we can assume that E1 \ E2 = fgg, for otherwise we can take F1 := Max E1 fgg, F2 := Max(E2) fgg, and F := F1 F2 instead of E1, E2, and E , without aecting the premises or the

conclusion of the proposition. Comparing the expression for (E ) (given in introduction) with that for (E1 ) + (E2), we nd that they are equal if and only if the weight wE is the sum of the weights wE1 and wE2 .

Let T1 and T2 be maximum weight trees on E1 and E2, respectively. Then T := T1 T2 is a tree on E , and wE1 + wE2 = w(T1) + w(T2) = w(T ) wE . Conversely, let T be a maximum weight tree on E . Removing (for a moment) 20

the node g from the tree T yields a forest of subtrees S1, : : : , Sn rooted at the neighbours of the node g in the tree T . If each subtree Sj has all nodes either in E1 n fgg or in E2 n fgg, then clearly T = T1 T2, where T1 is a tree on E1 and T2 is a tree on E2, and we have the opposite inequality wE1 + wE2  w(T1)+ w(T2) = w(T ) = wE . Otherwise some subtree Sj contains an arc fe1 e2g, with the node e2 farther from the root of Sj than the node e1, which crosses, say, from e1 2 E1 n fgg to e2 2 E2 n fgg. Since e1 \ e2  g, we have e1 \ e2  g \ e2. Remove from the tree T the arc fe1 e2g, then add the arc fg e2g the result is again a tree on E , which has one crossing less than T . The weight could have only increased, hence has remained the same. 2 Propositions 22 and 23 have the following simple corollary.

Corollary 24 Let E be a hypergraph, let u be a vertex of E that belongs to only one maximal edge of E , and U the set of all vertices of E dierent from u. Then  (E U ]) =  (E ) and (E U ]) = (E ).

Proof. We can assume E is simple. Let e be the sigle edge of E that contains u. The result follows because E is a composition of E U ] and feg. 2 The corollary can be also proved directly. For example, it is straightforward that, for a simple hypergraph E , the trees on E project to trees on E U ], and that a tree and the corresponding projected tree have the same weight, whence (E U ]) = (E ). This property of the cyclomatic number, together with (E ) = (Max(E )), suce to show that the cyclomatic number of an acyclic hypergraph is zero. On the other hand, because the cyclomatic number decreases on subhypergraphs and has nonzero values on excluded subhypergraphs of lemma 2, the cyclomatic number of a non-acyclic hypergraph is strictly positive. So we have gathered by the way the elements for an alternative proof, to the one given in 1], of those properties of the cyclomatic number of a hypergraph which make it an acceptable extension of the cyclomatic number of a graph.

9 Conclusion We introduced and examined the cyclicity of a hypergraph, an extension of the cyclomatic number of a graph, which was suggested by the form of the join-invariant of an acyclic hypergraph, and which in turn has led us to study circulant graphs and join-graphs associated with the hypergraph. We have gained the deepest insight into the meaning of the coecients in the formula for the cyclcity from the structure theorem and the construction theorem for join-graphs. Strictly speaking, these two theorems have made unnecessary previous derivations of the join-invariant of an acyclic hypergraph and of the 21

basic properties of the cyclicity. We have kept them partly because they and their proofs oer a somewhat dierent viewpoint, and partly because they reect how the ideas have actually evolved. The suggestion chain does not end with join-graphs. For example, if we decompose a join-graph into biconnected components, it turns out that the this decompostion is closely related to hingetrees, which are the subject of Jeavons et al. 4] but this is already beyond the scope of the present paper. We have discussed and compared two extensions of the cyclomatic number of a graph to hypergraphs. What else is there? We will show how to construct other `cyclicity measures', which behave like those two. By a cyclicity measure we mean a function from hypergraphs to nonnegative integers which coincides on graphs with the usual cyclomatic number, is zero precisely on acyclic hypergraphs, and is perhaps required to satis y some other conditions. Let be a function from hypergraphs to nonnegative integers that is zero on acyclic hypergraphs. De ne another function % from hypergraphs to nonnegative integers by % (E ) := (StE (u)) : X

u2 E

Then % (E ) is zero on every hypergraph E in which all stars StE (u) of vertices u 2 E are acyclic. In particular, % is zero on graphs and acyclic hypergraphs: this is evident for graphs, while for an acyclic simple hypergraph note that every star is connected in any join-tree, hence induces a subtree, which is clearly a join-tree of the star. It is easy to verify that whenever is eciently computable, depends only on the maximal edges, decreases on subhypergraphs, or is additive on compositions, the function % also has the respective property. Now, if is a cyclicity measure, then + k  % is again a cyclicity measure, for any positive integer k. S

To give an example, consider % . We have % (E ) = (E (f ) ; 1)  jf j + E    

X

f

  

where f runs through all (nonempty) joints and maximal edges, and possibly some other subedges (which contribute nothing). A hypergraph E has % (E ) = 0 precisely when all of its vertices have acyclic stars. Using % , we obtain two in nite sequences of cyclicity measures  + k  % and + k  % , for k = 0, 1, 2,: : : Here is an interesting combination: ( + % )(E ) = (E (f ) ; 1)  jf j ; wE : X

f 2(E )

The rst part of the right hand side, the sum, is the weight of any join-graph of the hypergraph E (supposing E is simple). The fact that the whole expression is always nonnegative, while on non-acyclic hypergraphs it is strictly positive, 22

leads us to inquire whether every maximum weight tree is a part of some joingraph. A reasoning similar to that in the proof of the structure theorem for join-graphs shows that it is indeed so. Moreover, since zero-weight arcs in a join-graph are always its bridges, any arc of a join-graph that does not belong to a given spanning subtree must have strictly positive weight. We can repeatedly apply the vertex-star summation operator to the already known cyclicity measures, thus producing a large supply of cyclicity measures. There are some combinations of operators %, %2, : : : , which are of interest on their own, such as the operator %2 := 21 (%2 ; %), which sums over the stars of all two-element subedges. For example, %2 (E ) is the sum of terms  (StE (a)) for all two-element subedges a of E  it can be computed as %2 (E ) = (E (f ) ; 1)  jf2 j + jE2j  X



!

f

where E2 is the set of all two-element subedges of the hypergraph E , ie. the arc set of the primal graph of E . A possible future direction for the research of cyclicity measures would be to study the class of all functions from hypergraphs to nonnegative integers satisfying certain conditions|those we have already met with, also some additional conditions, say a stronger form of additivity|and then see what happens. It would be ne if we could discover (not too complicated) conditions that would determine a unique function, which would be then a good candidate for the `right' extension of the graph cyclomatic number to hypergraphs. Finally a word about a possible use of cyclicity measures. We can employ any cyclicity measure as a heuristics for a greedy ll-in algorithm. A ` ll-in' for a graph G is a set of arcs we have to add to G to make it triangulated the `minimum ll-in problem' is to triangulate a graph with the least possible number of added arcs. The minimum ll-in problem is NP-hard (Yannakakis 5]). Let G denote the hypergraph of all maximal cliques in the graph G, and put

(G) := (G). Since G is triangulated exactly when (G) = 0, we can try to triangulate a graph G by always adding an arc a which minimizes (G fag). This greedy triangulation algorithm is quite impractical, though, if the cyclicity measure of the clique hypergraph G is not eciently computable, given the graph G. We can therefore hunt for cyclicity measures that are eciently computable for clique hypergraphs of graphs. The two cyclicity measures discussed in this paper,  and , are most probably not what we want here. While looking for a suitable cyclicity measure we should perhaps drop the requirement that it has to yield on graphs the usual cyclomatic number. In this way there would come within our scope the minimum ll-in measure of a hypergraph E , de ned as the least number of additiona arcs needed to triangulate the primal graph of E . The minimum ll-in has some properties in common with the cyclicity and the cyclomatic number: it is zero precisely on acyclic b

b

b

b

b

b

23

hypergraphs, it depends only on the maximal edges (since it depends only on the primal graph), it decreases on subhypergraphs, and it is additive on compositions on graphs, however, it diers from the usual cyclomatic number. The minimum ll-in is obviously also the perfect ll-in heuristics, but quite useless, because it is hard to compute. The question, whether there are cyclicity measures that are eciently computable on clique hypergraphs of graphs and are also good ll-in heuristics, is still wide open.

References 1] B. D. Acharya, M. Las Vergnas, Hypergraphs with Cyclomatic Number Zero, Triangulated Graphs, and an Inequality, J. Comb. Theory B, 33 (1982) 52{56. 2] C. Beeri, R. Fagin, D. Maier and M. Yannakakis, On the desirability of acyclic database schemes, J. ACM 30 (1983) 479{513. 3] C. Berge, Hypergraphs: Combinatorics of Finite Sets (North-Holland, New York, 1989). 4] M. Gyssens, P.G. Jeavons and D.A. Cohen, Decomposing constraints satisfaction problems using database techniques, Artif. Intell. 66 (1994) 57{89. 5] M. Yannakakis, Computing the minimum ll-in is NP-complete, SIAM J. Alg. Disc. Math. 2 (1981) 77-79.

24