• Keine Ergebnisse gefunden

Path-based supports for hypergraphs

N/A
N/A
Protected

Academic year: 2022

Aktie "Path-based supports for hypergraphs"

Copied!
14
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Path-Based Supports for Hypergraphs

Ulrik Brandes1, Sabine Cornelsen1, Barbara Pampel1, and Arnaud Sallaberry2

1 Fachbereich Informatik & Informationswissenschaft, Universit¨at Konstanz {Ulrik.Brandes,Sabine.Cornelsen,Barbara.Pampel}@uni-konstanz.de

2 CNRS UMR 5800 LaBRI, INRIA Bordeaux - Sud Ouest, Pikko arnaud.sallaberry@labri.fr

Abstract. A path-based support of a hypergraphHis a graph with the same vertex set as H in which each hyperedge induces a Hamiltonian subgraph. While it is N P-complete to compute a path-based support with the minimum number of edges or to decide whether there is a planar path-based support, we show that a path-based tree support can be computed in polynomial time if it exists.

1 Introduction

Ahypergraph is a pairH= (V, A) whereV is a finite set andAis a (multi-)set of non-empty subsets ofV. The elements ofV are calledverticesand the elements of Aare calledhyperedges. Asupport (orhost graph) of a hypergraphH= (V, A) is a graphG= (V, E) such that each hyperedge ofH induces a connected subgraph ofG, i.e., such that the graphG[h] := (h,{e∈E, e⊆h}) is connected for every h∈A. See Fig. 1(b) for an example.

Applications for supports of hypergraphs are, e.g., in hypergraph coloring [10, 4], databases [1], or hypergraph drawing [7, 8, 3, 12]. E.g., see Fig. 1 for an application of a support for designing Euler diagrams. AnEuler diagram of a hypergraphH = (V, A) is a drawing of H in the plane in which the vertices are drawn as points and each hyperedge h A is drawn as a simple closed region containing the points representing the vertices in hand not the points representing the vertices inV \h. There are various well-formedness conditions for Euler diagrams, see e.g. [5, 12].

Recently the problem of deciding which classes of hypergraphs admit what kind of supports became of interest again. It can be tested in linear time whether a hypergraph has a support that is a tree [13], a path or a cycle [3]. It can be decided in polynomial time whether a hypergraph has a tree support with bounded degrees [3] or a cactus support [2]. A minimum weighted tree support can be computed in polynomial time [9]. It isN P-complete to decide whether a hypergraph has a planar support [7], a compact support [7,8] or a 2-outerplanar support [3]. A support with the minimum number of edges can be computed in polynomial time if the hypergraph is closed under intersections [3]. If the set of hyperedges is closed under intersections and differences, it can be decided in polynomial time whether the hypergraph has an outerplanar support [2].

Konstanzer Online-Publikations-System (KOPS) URL: http://nbn-resolving.de/urn:nbn:de:bsz:352-179948

(Lecture notes in computer science ; 6460). - S. 20-33. - ISBN 978-3-642-19221-0 https://dx.doi.org/10.1007/978-3-642-19222-7_3

(2)

21

h1

{v1} {v2} {v3} {v4} {v5} {v6} {v7} h

h V

h2 h3 h4 h5

(a) Hasse diagram

v1 v2 v3 v4 v5 v6 v7

(b) tree support

v1 v2 v3 v4 v5 v6

v7

(c) Euler diagram Fig. 1. Three representations of the hypergraph H = (V, A) with hyperedges h1 = {v1, v2},h2={v2, v3},h3 ={v3, v4},h4={v4, v5},h5={v5, v6},h={v2, v3, v4, v5}, h={v2, v3, v4, v5, v7}, andV ={v1, . . . , v7}

In this paper, we consider a restriction on the subgraphs of a support that are induced by the hyperedges. A supportGof a hypergraphH = (V, A) is called path-based if the subgraphG[h] contains aHamiltonian path for each hyperedge h∈A, i.e.,G[h] contains a path that contains each vertex ofh. This approach was on one hand motivated by hypergraph drawing and on the other hand by the aesthetics of metro map layouts. I.e., the hyperedges could be visualized as lines along the Hamiltonian path in the induced subgraph of the support like the metro lines in a metro map. See Fig. 2 for examples of metro maps and Fig. 3(c) for a representation of some hyperedges in such a metro map like drawing. For metro map layout algorithms see, e.g., [11, 14].

We briefly consider planar path-based supports and minimum path-based sup- ports. Our main result is a characterization of those hypergraphs that have a path-based tree support and a polynomial time algorithm for constructing path- based tree supports if they exist. E.g., Fig. 1 shows an example of a hypergraph H = (V, A) that has a tree support but no path-based tree support. However, the tree support in Fig. 1(b) is a path-based tree support for (V, A\ {V}).

The contribution of this paper is as follows. In Section 2, we give the neces- sary definitions. We then briefly mention in Section 3 that finding a minimum path-based support or deciding whether there is a planar path-based support, respectively, isN P-complete. We consider path-based tree supports in Sect. 4.

In Section 4.1, we review a method for computing tree supports using the Hasse diagram. In Section 4.2, we show how to apply this method to test whether a hypergraph has a path-based tree support and if so how to compute one in polynomial time. Finally, in Section 4.3 we discuss the run time of our method.

2 Preliminaries

In this section, we give the necessary definitions that were not already given in the introduction. Throughout this paper let H = (V, A) be a hypergraph. We denote by n=|V|the number of vertices, m=|A|the number of hyperedges, and N =

h∈A|h| the sum of the sizes of all hyperedges of a hypergraph H.

The size of the hypergraph H is then N +n+m. A hypergraph is a graph if

(3)

(a) local trains of Zurich (b) metro of Amsterdam Fig. 2. Local train map of Zurich (www.zvv.ch) and the metro map of Amsterdam (www.amsterdam.info). In (b) the union of all lines forms a tree.

all hyperedges contain exactly two vertices. A hypergraphH = (V, A) isclosed under intersections ifh1∩h2∈A∪ {∅}forh1, h2∈A.

TheHasse diagram of a hypergraphH = (V, A) is the directed acyclic graph with vertex set A∪ {{v};v V} and there is an edge (h1, h2) if and only if h2h1and there is no seth∈Awithh2hh1. Fig. 1(a) shows an example of a Hasse diagram. Let (v, w) be an edge of a directed acyclic graph. Then we say that w is a child of v and v a parent of w. For a descendant dof v there is a directed path fromv to d while for an ancestor a of v there is a directed path froma to v. A source does not have any parents, a sink no children and aninner vertex has at least one parent and one child.

3 Minimum and Planar Path-Based Supports

Assuming that each hyperedge contains at least one vertex, each hypergraphH = (V, A) has a path-based support G= (V, E) with at most N−m edges: Order the vertices arbitrarily. For each hyperedge{v1, . . . , vk} ∈Awithv1<· · ·< vk

with respect to that ordering the edge setE contains{vi−1, vi}, i= 1, . . . , k. It is, however,N P-complete to find an ordering of the vertices that minimizes the number of edges of the thus constructed path-based support ofH [6]. Moreover, even if we had an ordering of the vertices that had minimized the number of the thus constructed path-based support, this support still does not have to yield the minimum number of edges in any path-based support of H. E.g., consider the hypergraph with hyperedges{1,2,4}, {1,3,4}, and {2,3,4}. Nevertheless, we have the following theorem.

Theorem 1. It isN P-complete to minimize the number of edges in a path-based support of a hypergraph – even if it is closed under intersections.

(4)

23

Proof. Reduction from Hamiltonian path. Let G= (V, E) be a graph. Let H = (V, E∪ {V} ∪ {{v}; v∈V}) andK=|E|. ThenGcontains a Hamiltonian path if and only ifH has a path-based support with at mostK edges.

For the application of Euler diagram like drawings, planar supports are of spe- cial interests. However, like for general planar supports, the problem of testing whether there is a path-based planar support is hard.

Theorem 2. It is N P-complete to decide whether a hypergraph – even if it is closed under intersections – has a path-based planar support.

Proof. The support that Johnson and Pollak [7] constructed to prove that it isN P-complete to decide whether there is a planar support was already path-

based.

4 Path-Based Tree Supports

In this section we show how to decide in polynomial time whether a given hyper- graph has a path-based tree support. If such a support exists, it is at the same time a path-based support of minimum size and a planar path-based support.

So far it is known how to decide in linear time whether there is a path-based tree support ifV ∈A[3].

4.1 Constructing a Tree Support from the Hasse Diagram

A support with the minimum number of edges and, hence, a tree support if one exists can easily be constructed from the Hasse diagram if the hypergraph is closed under intersections [3].

To construct a tree support of an arbitrary hypergraph, it suffices to consider the augmented Hasse diagram – a representation of “necessary” intersections of hyperedges. The definition is as follows. First consider the smallest set Aof subsets of V that contains A and that is closed under intersections. Consider the Hasse diagramD ofH = (V, A). Note that any tree support ofH is also a tree support of H. Let h1, . . . , hk be the children of a hyperedge hin D. The hyperedge h A is implied if the hypergraph (h1∪ · · · ∪hk,{h1, . . . , hk}) is connected andnon-implied otherwise. Let{h1, . . . , hk} be a maximal subset of the children of a non-implied hyperedge inAsuch that (h1∪· · ·∪hk,{h1, . . . , hk}) is connected. Thenh1∪ · · · ∪hk is asummary hyperedge. Note that a summary hyperedge does not have to be inA. LetA be the set of subsets ofV containing the summary hyperedges, the hyperedges in A that are not implied, and the sources ofD. E.g., for the hypergraph in Fig. 1 it holds that A = A. In this example, the hyperedgehis a summary hyperedge,h is not implied, andV is a source.

The augmented Hasse diagram ofH is the Hasse diagramD ofH= (V, A).

IfH has a tree support then the augmented Hasse diagram hasO(n+m) vertices and can be constructed inO(n3m) time [3]. Further note that ifH has a tree support andh∈A is non-implied then all children ofhinD are disjoint.

(5)

If a tree supportG= (V, E) ofH exists it can be constructed as follows [3].

Starting with an empty graphG, we proceed from the sinks to the sources ofD. Ifh∈Ais not implied, choose an arbitrary orderingh1, . . . , hkof the children of hin D. We assume that at this stage,G[hi], i= 1, . . . , k are already connected subgraphs ofG. Forj= 2, . . . , k, choose verticesvj j−1

i=1hi,wj ∈hj and add edges{vj, wj} toE.

If we want to construct a path-based tree support, thenG[hj], j= 1, . . . , kare paths and as verticesvj+1 and wj for the edges connecting G[hj] to the other paths, we choose the end vertices ofG[hj]. The only choices that remain is the ordering of the children ofhand the choice of which end vertex ofG[hj] iswj

and which one is vj+1. The implied hyperedges give restrictions on how these choices might be done.

4.2 Choosing the Connections: A Characterization

When we want to apply the general method introduced in Sect. 4.1 to construct a path-based tree supportG, we have to make sure that we do not create vertices of degree greater than 2 inG[h] when processing non-implied hyperedges contained in an implied hyperedgeh.

Let h, h A. We say that h, h overlap if h ∩h = ∅, h h, and h ⊆h. Two overlapping hyperedgesh, h∈A have aconflict if there is some hyperedge inAthat containshandh. Two overlapping hyperedgesh, h∈A have aconflict with respect to h∈A if h has a conflict with h, h∩h ⊆h andhis a child of h or h. In that case we say thath and h areconflicting hyperedges ofh. LetAhbe the set of conflicting hyperedges ofh. LetAch be the set of childrenhiof hsuch thath∈Ahi.

Assume now that H has a path-based tree support Gand leth, h, h ∈A be such thathandhhave a conflict with respect toh. We have three types of restrictions on the connections of the paths.

1. G[h\h] andG[h\h] are paths that are attached to different end vertices of G[h]. OtherwiseG[ha] contains a vertex of degree higher than 2 for any hyperedgeha⊇h∪h.

2. Assume further thath1∈Ach. For all hyperedgesh1∈Ahthat have a conflict withhwith respect toh1 it holds thatG[h1\h] has to be appended to the end vertex ofG[h] that is also an end vertex ofG[h1]. Hence, all these paths G[h1\h] have to be appended to the same end vertex ofG[h].

3. Assume further that h2 Ach, h2 =h1. Lethi Ah have a conflict with h with respect tohi, i= 1,2, respectively. ThenG[hi\h] has to be appended to the end vertex ofG[h] that is also an end vertex ofG[hi]. Hence,G[h1\h]

andG[h2\h] have to be appended to different end vertices ofG[h].

E.g., consider the hypergraphH = (V, A) in Fig. 1. Then on one hand,h has a conflict withh1andh5with respect toh. Hence, by the first type of restrictions G[h1\h] andG[h5\h] have to be appended to the same end vertex ofG[h], i.e.

the end vertex ofG[h] to which G[h\h] is not appended. On the other hand, h1 andhhave a conflict with respect to h2 whileh5 andhhave a conflict with

(6)

25

respect toh4. Hence, by the third type of restrictions it follows thatG[h1\h]

andG[h5\h] have to be appended to different end vertices ofG[h]. Hence, there is no path-based tree support forH.

This motivates the following definition of conflict graphs. Theconflict graph Ch, h∈A is a graph on the vertex setAh∪Ach. The conflict graphCh contains the following three types of edges.

1. {h, h}, h, h∈Ah ifh andh have a conflict with respect toh.

2. {h, h1}, h Ah, h1 Ach if h Ah1 and h and h have a conflict with respect to h1.

3. {h1, h2}, h1, h2∈Ach, h1 =h2.

E.g., consider the hypergraph H = (V, A) in Fig. 1. Then the conflict graph Ch contains the edges{h, h5}and {h, h1} of type one, the edges{h2, h1}and {h4, h5}of type 2 and the edge{h2, h4}of type 3. Hence,Ch contains a cycle of odd length, reflecting that there is no suitable assignment of the end vertices of G[h] to h1, h5 andh.

Theorem 3. A hypergraphH = (V, A)has a path-based tree support if and only if

1. H has a tree support,

2. no hyperedge contains three pairwise overlapping hyperedges h1, h2, h3 ∈A withh1∩h2=h2∩h3=h1∩h3, and

3. all conflict graphs Ch, h∈A,|h|>1are bipartite.

From the observations before the definition of the conflict graph it is clear that the conditions of Theorem 3 are necessary for a path-based tree support. In the remainder of this section, we prove that the conditions are also sufficient.

In the following assume that the conditions of Theorem 3 are fulfilled. We show in Algorithm 1 how to construct a path-based tree supportGofH. We consider the vertices of the augmented Hasse diagramD from the sinks to the sources in areversed topological order, i.e., we consider a hyperedge only if all its children in D have already been considered. During the algorithm, a conflicting hyperedge h of a hyperedgehis labeled with the end vertexvofG[h] if the pathG[h\h]

will be appended tov. We will call this label sideh(h). Concerning Step 2a, the setsAch, h∈A contain at most two hyperedges – otherwise the subgraph ofCh

induced byAch contains a triangle and, hence, is not bipartite.

Algorithm 1 constructs a tree supportGofH [3]. Before we show thatGis a path-based tree support, we illustrate the algorithm with an example. Con- sider the hypergraph H in Fig. 3. We show how the algorithm proceeds h51 and all its descendants inD. For the hyperedgesh13, h14, h16, andh18 the conflict graphs are empty while for the other leaves we have sideh1

5(h22) = sideh1 5(h23) = sideh1

5(h31) = sideh1

5(h42) = v5, sideh1

7(h24) = sideh1

7(h31) = v7, and sideh1 9(h24) = sideh19(h41) = sideh19(h25) = sideh19(h26) = sideh19(h27) =v9.When operatingh22and h23, respectively, we add edges{v4, v5}and{v5, v6}, respectively, toG. While the

(7)

conflict graph of h22 does only contain h15 with sideh22(h15) = v4, in Ch23 we set sideh2

3(h15) = sideh2

3(h31) = v6, and sideh2

3(h22) = v5. h24 has a conflict with re- spect to h17 and h19. Hence, we add edges {v7, v8} and {v8, v9} to G. Further, sideh2

4(h17) = sideh2

4(h25) =v9 and sideh2

4(h19) = sideh2

4(h41) =v7. When operating h31we can chooseh1=h23andh2=h17, since sideh2

3(h13) =v6and sideh1

7(h13) =v7. We add the edge{v6, v7} to G. The conflict graph Ch31 is shown in Fig. 3(b).

The hyperedgeh41is implied and we set sideh4

1(h24) =v4. We can finally connect v3 tov4 orv9 when operatingh51.

To prove the correctness of Algorithm 1, it remains to show that all hyperedges ofH induce a path inG. Since we included all inclusion maximal hyperedges of H inA, it suffices to show this property for all hyperedges inA. We start with a technical lemma.

Lemma 1. Let h andh be two overlapping hyperedges and leth be not im- plied. Then there is a hyperedge h∈A with h∩h⊆hh.

Proof. Let hc ∈A be maximal withh∩h ⊆hc h. The hyperedge hc is a child of the non-implied hyperedgeh inD. Consider the summary hyperedgeh withhc ⊆hh. By definition ofA it follows thath∈A. For an edge{v, w} ofGlethvw be the intersection of all hyperedges ofA that containv andw. Note that thenhvw is not implied sincev and wcannot both be contained in a subset ofhvw. Hence,hvw∈A.

Algorithm 1.Path-based tree support LetE=∅.

Forh∈A in a reversed topological order ofD. 1. Ifh={v}for somev∈V

(a) set sideh(h) =v for all verticesh ofCh. 2. Else

(a) leth1, . . . , hk be the children ofhsuch thath2, . . . , hk−1∈/Ach. (b) Ifhis non-implied

i. letwi, vi+1, i= 1, . . . , kbe the end vertices ofG[hi] such that A. sideh1(h) =v2 ifh∈Ah1 and

B. sidehk(h) =wk ifh∈Ahk.

ii. Add the edges{vi, wi}, i= 2, . . . , kto E.

(c) Else letw1 =vk+1 be the end vertices ofG[h] such that i. vk+1 ∈/ h1 and

ii. w1∈/hk.

(d) Ifh1∈Ach set sideh(h1) =vk+1. (e) Ifhk∈Achset sideh(hk) =w1.

(f) Label the remaining vertices ofCh withvk+1 or w1 such that no two adjacent vertices have the same label.

(8)
(9)

h h

h1 h1

h

hvw

h1 hh

hc=hvwh

=hvwh hvx hvxh

v x

w

(a) augmented Hasse diagramD

h

h h

hvx

hvw

hc x

v w

(b) tree supportG Fig. 4.Illustration of the proof of Lemma 2.3

1. + 2. + 5. if h∩h∈/ A: Leth1 ⊆hbe minimal withh∩h⊂h1. Since h and h1 overlap there is an edge{v, w} ∈ E such that v h∩h and w∈h1\h. We show that sideh(h) =v.

By Lemma 1 there is a child hc of hvw that contains h∩hvw. Since v∈h∩hvw it follows thatw /∈hc and, hence,v is an end vertex ofhc.

Note that by the minimality ofh1 it follows that h∩h ⊆hvw. Since G[h], G[h] are paths, it follows thathchand, hence,hc=h∩hvw. Lethp

be minimal withhc hp⊆h. Thenhp, hvwhave a conflict with respect tohc

and it follows from the inductive hypothesis on Property 5 that sidehc(hvw) = v. Let hc be maximal with hc hc h. By the inductive hypothesis on Property 1 it follows that sidehc(hvw) =v. Sinceh, hvw have a conflict with respect tohc it follows by the inductive hypothesis on Property 3 thatv is an end vertex ofh. InCh there is the pathhc, hvw, h, h. By construction, sideh(hc) is the end vertex of h that is not in hc. Hence, sideh(hvw) = sideh(h) =v.

3.: Letv= sideh(h). By the construction in Algorithm 1,v is an end vertex of G[h] ifh is non-implied. So assume that h is implied and thatv is not an end vertex ofG[h]. Letw∈h\hbe a neighbor ofv in G. By Property 2, it follows thatv∈h. Lethcbe the child ofhvw that containshvw∩h. By the inductive hypothesis on Property 4, it follows thatG[hvw\h] is a path that containswbut notv. Hence,hc=hvw∩h=hvw∩h.

Let h1, h1 A, respectively, be minimal with h h1 h∩h and h⊇h1 h∩h. Assume first thath∩h∈A. ThenCh∩h contains the trianglehvw, h1, h1, hvw and, hence, is not bipartite.

Assume now thath∩h∈/A. By the already proven part of Property 5 it follows that there is an edge {v, x} of Gwith x∈h1\h. We havehc = hvw∩h⊇hvw∩hvx. Further, the child ofhvxthat containshvx∩hequals hvx∩h. Sinceh1 is implied andhvxnot, it follows thath1 =hvxand, hence,

(10)

29

hvx ⊇h∩h. Hence, eitherhvx∩h⊆hvw∩horhvw∩hhvx∩hh∩h. In the first case leth1∈A be minimal withhvw∩hh1⊆h. Then there is the trianglehvw, hvx, h1, hvw inCh∩hvw. In the latter case leth1∈A be minimal withhvx∩hh1⊆h. Then there is the trianglehvw, hvx, h1, hvw

in Ch∩hvx.

4.: By the inductive hypothesis G[h\h] is a path. Further, h and h share sideh(h)∈has a common end vertex. By the precondition of the lemma, G[h] is a path. Hence,G[h\h] is a path.

5. ifh∩h∈A: Ifh =h∩hleth1be the child ofhwithh∩h⊆h1. By the inductive hypothesis sideh1(h) is adjacent inGto a vertex ofh\h=h\h and by Property 1 sideh1(h) = sideh(h).

If h = h∩h, let h1 A be minimal with h h1 h. Applying Property 3 withh1 as “h” andh as “h” reveals that sideh(h) is an end vertex ofG[h1]. SinceG[h1] is a path it follows that some vertex ofh1\his

adjacent to sideh(h).

Lemma 3. If Conditions 1-3 of Theorem 3 are fulfilled then all hyperedges in A induce a path in the graph Gconstructed in Algorithm 1.

Proof. Again, we prove the lemma by induction on the step in which h was considered in Algorithm 1. There is nothing to show ifhhad been considered in the first step. So assume thath∈Aand thatG[h] contains a vertexvof degree greater than two.

Letu1, u2, u3be the first three vertices connected tovinG. Lethi=hvui, i= 1,2,3. Thenh1, h2, h3are all three contained inhand its intersection containsv.

Hence, any two of them have a conflict if and only if one of them is not contained in the other. A case distinction reveals that we wouldn’t have appended all three, u1,u2andu3, tov.

h2=h3: Since h3 contains no vertex of degree higher than two, it follows that u1∈/ h3,h3∩h1={v}. Hence,h1andh3have a conflict with respect to the common child{v}, contradicting thatv is added in the middle ofh3. h1=h2 orh1=h3: These cases are analogous to the first case.

h1h3: Like in the first case it follows that u2 ∈/ h3. Let hi, i = 2,3 be the child ofhi that containsv. Thenh2 andh3 have a conflict with respect to hi, i= 2,3. Since we add the edge{v, ui}toGwhen we processhi it follows on one hand that sidehi(hi) =v. On the other hand, sinceh1is contained in h3and v∈h1it follows thath1⊆h3. Hence,h3has more than one vertex.

If h3 = h3∩h2 then v is the only end vertex of G[h3] that is contained in h2. By Lemma 2 Property 2 it follows that sideh3(h2) = v and hence, sideh3(h3) = v. If h3 = h3∩h2 let v = v be the other end vertex of h2. Since we know that sideh2(h2) =vit follows that sideh2(h3) =v. Hence, by Lemma 2 Property 1, we can conclude that sideh3(h3) =v. In both cases, we have a contradiction.

h1h2 orh2h3: These cases are analogous to the third case.

h1, h2, h3 pairwise overlapping: Then h1∩h2 = h2∩h3 = h1∩h3 = {v}.

Hence, Condition 2 of Theorem 3 is not fulfilled.

(11)
(12)

31

Algorithm 2.Conflict Computation.

Input : augmented Hasse diagramDof a hypergraph, vertexh

Output : verticeshwithlabel(h) =conflict(hc) for all childrenhcofh Data : there are the following vertex labels

label(h) =anciffhh

label(h) =not-anconly ifhhnot contained in any source ofD label(h) =desc(hc) iffhhc for exactly one childhcofh label(h) =multi-desciffhis contained in more than one child ofh label(h) =not-conflictonly ifhhnot contained in any child ofh

andhhcontained in some source ofD label(h) =conflict(hc) only ifhch=for a childhcofh

andhhcontained in some source ofD ancestor(vertexh) begin

foreachparenthofhdo label(h)anc;

ancestor(h);

end

descendant(vertexh, vertexhc) begin iflabel(h) =desc(hc), hc=hcthen

label(h)multi-desc;

elselabel(h)desc(hc);

foreachchildhofhdo

iflabel(h)=multi-descthen descendant(h, hc);

end

up-search(vertexh, vertexhc) begin foreachparenthofhdo

iflabel(h)∈ {∅,conflict(hc), hc=hc}then up-search(h, hc);

iflabel(h) =conflict(hc), hc=hcthen label(h)not-conflict;

else iflabel(h)=desc(hc)then

iflabel(h)∈ {conflict(hc),anc, not-conflict}then label(h)conflict(hc);

iflabel(h)=conflict(hc)then label(h)not-anc;

end begin

Clear all labels;

label(h)not-conflict;

ancestor(h);

foreachchildhc ofhdo descendant(hc, hc);

foreachvertexh ofDwith label(h)∈ {desc(hc); hcchild ofh}do up-search(h, hc);

end

(13)

2. If there was a descendant of h labeled desc(hc) for a child hc =hc of h, thenhc does not containh∩h contradicting thathandh have a conflict with respect to hc.

Hence, Algorithm 2 labelsh withconflict(hc).

Theorem 4. It can be tested in O(n3m)time whether a hypergraph has a path- based tree support and if so such a support can be constructed within the same time bounds.

Proof. LetH be a hypergraph. First test in linear time whether there is a tree support forH [13]. LetD be the augmented Hasse diagram ofH. The method works in four steps.

1. Start with an empty array conflict indexed with pairs of inner vertices ofD. Set conflicth,h ←hcif and only ifh is labeledconflict(hc) in Algorithm 2 applied toD andh.

2. For each pair h, h of inner vertices of D test whether conflicth,h contains h∩h. Otherwise set conflicth,h ← ∅. Now, if H has a path-based tree support thenh, hhas a conflict with respect to the childhc ofhif and only ifhc = conflicth,h.

3. Apply Algorithm 1 to compute a supportG. If the algorithm stops without computing a support thenH does not have a path-based tree support.

4. Test whether every hyperedge induces a path inG. If not,H does not have a path-based tree support.

D hasO(n+m) vertices,O(n2+nm) edges and can be computed inO(n3m) time if H has a tree support [3]. Algorithm 2 visits every edge of D at most twice and, hence, runs inO(n2+nm) time for each of theO(n) inner vertices ofD.

We may assume that the hyperedges are given as sorted lists of their elements.

If not given in advance, these lists could straight forwardly be computed from D inO(n3+mn2) time by doing a graph search from each leaf. Now, for each of theO(n2) pairsh, h of inner vertices it can be tested in O(n) time whether conflicth,h containsh∩h.

The sum of the sizes of all conflict graphs is in O(n2). Hence, Algorithm 1 runs inO(n2+mn) time. For each of the O(m) hyperedges hit can be tested inO(n) time, whetherG[h] is a path. Hence, the overall run time is dominated by the computation of the augmented Hasse diagram and is inO(n3m).

5 Conclusion

We have introduced path-based supports for hypergraphs. Hence, as a new model, we considered a restriction on the appearance of those subgraphs of a support that are induced by the hyperedges. We have shown that it isN P- complete to find the minimum number of edges of a path-based support or to decide whether there is a planar path-based support. Further, we characterized

(14)

33

those hypergraphs that have a path-based tree support and we gave an algorithm that computes a path-based tree support inO(n3m) run time if it exists. Our algorithm completed the paths for the hyperedges in the order in which they appeared in a reversed topological ordering of the augmented Hasse diagram. To connect the subpaths in the right order, we introduced a conflict graph for each hyperedgehand colored the vertices of this conflict graph with the end vertices of the path induced byh.

References

1. Beeri, C., Fagin, R., Maier, D., Yannakakis, M.: On the desirability of acyclic database schemes. Journal of the Association for Computing Mashinery 30(4), 479–513 (1983)

2. Brandes, U., Cornelsen, S., Pampel, B., Sallaberry, A.: Hypergraphs and outerpla- narity. In: Iliopoulos, C.S., Smyth, W.F. (eds.) IWOCA 2010. LNCS, vol. 6460, pp.

201–211. Springer, Heidelberg (2010)

3. Buchin, K., van Kreveld, M., Meijer, H., Speckmann, B., Verbeek, K.: On planar supports for hypergraphs. In: Eppstein, D., Gansner, E.R. (eds.) GD 2009. LNCS, vol. 5849, pp. 345–356. Springer, Heidelberg (2010)

4. Bujt´as, C., Tuza, Z.: Color-bounded hypergraphs, II: Interval hypergraphs and hypertrees. Discrete Mathematics 309, 6391–6401 (2009)

5. Flower, J., Fish, A., Howse, J.: Euler diagram generation. Journal on Visual Lan- guages and Computing 19(6), 675–694 (2008)

6. Johnson, D.S., Krishnan, S., Chhugani, J., Kumar, S., Venkatasubramanian, S.:

Compressing large boolean matrices using reordering techniques. In: Nascimento, M.A., ¨Ozsu, M.T., Kossmann, D., Miller, R.J., Blakeley, J.A., Schiefer, K.B.

(eds.) Proceedings of the 13th International Conference on Very Large Data Bases (VLDB 2004), pp. 13–23. Morgan Kaufmann, San Francisco (2004)

7. Johnson, D.S., Pollak, H.O.: Hypergraph planarity and the complexity of drawing Venn diagrams. Journal of Graph Theory 11(3), 309–325 (1987)

8. Kaufmann, M., van Kreveld, M., Speckmann, B.: Subdivision drawings of hyper- graphs. In: Tollis, I.G., Patrignani, M. (eds.) GD 2008. LNCS, vol. 5417, pp. 396–407.

Springer, Heidelberg (2009)

9. Korach, E., Stern, M.: The clustering matroid and the optimal clustering tree.

Mathematical Programming, Series B 98, 385–414 (2003)

10. Kr´al’, D., Kratochv´ıl, J., Voss, H.-J.: Mixed hypercacti. Discrete Mathematics 286, 99–113 (2004)

11. N¨ollenburg, M.: An improved algorithm for the metro-line crossing minimization problem. In: Eppstein, D., Gansner, E.R. (eds.) GD 2009. LNCS, vol. 5849, pp.

381–392. Springer, Heidelberg (2010)

12. Simonetto, P., Auber, D., Archambault, D.: Fully automatic visualisation of over- lapping sets. Computer Graphics Forum 28(3), 967–974 (2009)

13. Tarjan, R.E., Yannakakis, M.: Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs.

SIAM Journal on Computing 13(3), 566–579 (1984)

14. Wolff, A.: Drawing subway maps: A survey. Informatik-Forschung und Entwick- lung 22, 23–44 (1970)

Referenzen

ÄHNLICHE DOKUMENTE

Even though the countries (in particular Czech Republic, Poland and Slovakia) participate actively in the formulation of EU democratisation policy and try to

A general problem of the Prim-based heuristic is the fact that the nodes in the close surrounding of the root node are connected rather cheaply, but at the same time delay is

We introduced a Kruskal-based construction heuristic for the rooted delay- constrained minimum spanning tree problem which produces faster and bet- ter results especially for

Which includes shorter development times, better design solutions by using established best-practice ones and comparison of different solution variants based on lots of ideas..

The observed distribution of small tree topologies, the evaluation of im- balance statistics and the splitting pattern comparison, indicates that the BDM generates too balanced

While it is N P -hard to decide whether a path-based support has a monotone drawing, to determine a path-based support with the minimum number of edges, or to decide whether there is

A hypergraph that is closed under intersections and differen ces h as an (outer-)planar support if and only if for each block the graph induced by the hyperedges

20 Not all models of democracy – participatory, radical or cosmopolitan – need be promoted by the EU but if it seeks to seriously build a niche for itself, it needs to think about