• Aucun résultat trouvé

Path-Based Supports for Hypergraphs

N/A
N/A
Protected

Academic year: 2021

Partager "Path-Based Supports for Hypergraphs"

Copied!
21
0
0

Texte intégral

(1)

HAL Id: hal-00735894

https://hal.archives-ouvertes.fr/hal-00735894

Submitted on 27 Mar 2013

HAL

is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire

HAL, est

destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Path-Based Supports for Hypergraphs

Ulrik Brandes, Sabine Cornelsen, Barbara Pampel, Arnaud Sallaberry

To cite this version:

Ulrik Brandes, Sabine Cornelsen, Barbara Pampel, Arnaud Sallaberry. Path-Based Supports for

Hypergraphs. Journal of Discrete Algorithms, Elsevier, 2012, 14, pp.248-261. �hal-00735894�

(2)

Path-Based Supports for Hypergraphs

1

Ulrik Brandesa, Sabine Cornelsena, Barbara Pampela, Arnaud Sallaberryb

2

aDepartment of Computer and Information Science, University of Konstanz, Box 67, 78457 Konstanz,

3

Germany

4

bCNRS UMR 5800 LaBRI, INRIA Bordeaux - Sud Ouest, Pikko, 351, cours de la Libration, 33405

5

Talence Cedex, France

6

Abstract

7

A path-based support of a hypergraphH is a graph with the same vertex set asHin which each hyperedge induces a Hamiltonian subgraph. While it isN 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 planar path-based support, we show that a path-based tree support can be computed in polynomial time if it exists.

Keywords: graph algorithm, graph drawing, hypergraph, metro map layout

8

1. Introduction

9

A hypergraph is a pair H = (V, A) where V is a finite set and A is a (multi-)set of

10

non-empty subsets of V. The elements of V are called vertices and the elements of A

11

are calledhyperedges. Asupport (orhost graph) of a hypergraphH = (V, A) is a graph

12

G= (V, E) such that each hyperedge ofH induces a connected subgraph ofG, i.e., such

13

that the graphG[h] := (h,{e∈E, e⊆h}) is connected for everyh∈A. See Fig. 1(b) for

14

an example.

15

Applications for supports of hypergraphs are, e.g., in hypergraph coloring [2, 3],

16

databases [4], or hypergraph drawing [5, 6, 7, 8]. E.g., see Fig. 1 for an application

17

of a support for designing Euler diagrams. AnEuler diagramof a hypergraphH = (V, A)

18

is a drawing of H in the plane in which the vertices are drawn as points and each hy-

19

peredge h∈A is drawn as a simple closed region containing the points representing the

20

vertices in h and not the points representing the vertices in V \h. There are various

21

well-formedness conditions for Euler diagrams, see e.g. [9, 8].

22

Recently, many papers have been devoted to the problem of deciding which classes

23

of hypergraphs admit what kind of supports. It can be tested in linear time whether a

24

hypergraph has a support that is a tree [10], a path or a cycle [7]. It can be decided in

25

polynomial time whether a hypergraph has a tree support with bounded degrees [7] or a

26

cactus support [11]. A minimum weighted tree support can be computed in polynomial

27

time [12]. It isN P-complete to decide whether a hypergraph has a planar support [5],

28

a compact support [5, 6] or a 2-outerplanar support [7]. A support with the minimum

29

Email addresses: Ulrik.Brandes@uni-konstanz.de(Ulrik Brandes),

Sabine.Cornelsen@uni-konstanz.de(Sabine Cornelsen),Barbara.Pampel@uni-konstanz.de(Barbara Pampel),arnaud.sallaberry@labri.fr(Arnaud Sallaberry)

A preliminary version of this paper was presented at the 21st International Workshop on Combina- torial Algorithms (IWOCA 2010) and appears in the corresponding proceedings [1].

Corresponding author phone: +49 7531 88 4375, fax: +49 7531 88 3577.

(3)

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

h

h

h1 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) metro map like drawing

v1 v2 v3 v4 v5 v6

v7

(d) Euler diagram

Figure 1: Three representations of the hypergraph H = (V, A) with hyperedgesh1 ={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}, and V ={v1, . . . , v7}.

number of edges can be computed in polynomial time if the hypergraph is closed under

30

intersections [7]. If the set of hyperedges is closed under intersections and differences, it

31

can be decided in polynomial time whether the hypergraph has a planar or outerplanar

32

support [11].

33

In this paper we consider a restriction on the subgraphs of a support that are induced

34

by the hyperedges. A supportG of a hypergraphH = (V, A) is called path-based if the

35

subgraphG[h] contains aHamiltonian path for each hyperedgeh∈A, i.e.,G[h] contains a

36

path that contains each vertex ofh. This definition was motivated by by the aesthetics of

37

metro map layouts. I.e., the hyperedges could be visualized as lines along the Hamiltonian

38

path in the induced subgraph of the support like the metro lines in a metro map. See

39

Fig. 2 for examples of metro maps, Fig. 3 for an example of natural sciences drawn in the

40

metro map anthology, and Fig. 1(c) and 6(f) for a representation of some hyperedges in

41

such a metro map like drawing. For metro map layout algorithms see, e.g., [13, 14].

42

We briefly consider monotone, planar, and minimum path-based supports. Our main

43

result is a characterization of those hypergraphs that have a path-based tree support

44

and a polynomial time algorithm for constructing path-based tree supports if they exist.

45

E.g., Fig. 1 shows an example of a hypergraph H = (V, A) that has a tree support but

46

no path-based tree support. However, the tree support in Fig. 1(b) is a path-based tree

47

support for (V, A\ {V}).

48

The contribution of this paper is as follows. In Section 2 we give the necessary defi-

49

nitions. We then briefly discuss monotone path-based supports in Section 3 and mention

50

that finding a minimum path-based support or deciding whether there is a planar path-

51

based support, respectively, isN P-hard. We consider path-based tree supports in Sect. 4.

52

In Section 4.1 we review a method for computing tree supports using the Hasse diagram.

53

In Section 4.2 we show how to apply this method to test whether a hypergraph has a

54

path-based tree support and if so how to compute one in polynomial time. Finally, in

55

Section 4.3 we discuss the run time of our method.

56

(4)

(a) local trains of Zurich (b) metro of Amsterdam

Figure 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.

2. Preliminaries

57

In this section, we give the necessary definitions that were not already given in the

58

introduction. Throughout this paper let H = (V, A) be a hypergraph. We denote by

59

n=|V|the number of vertices, m=|A|the number of hyperedges, and N =P

h∈A|h|

60

the sum of the sizes of all hyperedges of a hypergraphH. Thesize of the hypergraph H is

61

thenN+n+m. A hypergraph is agraph if all hyperedges contain exactly two vertices.

62

A hypergraphH = (V, A) isclosed under intersections ifh1∩h2∈A∪ {∅}forh1, h2∈A.

63

We say that two hyperedges h1, h2 overlap if h1∩h2 6= ∅, h1 6⊆ h2, and h2 6⊆ h1. A

64

hypergraphH= (V, A) isconnected if for any pair of verticesv, w∈V there is a sequence

65

of hyperedgesh1, . . . , h∈Asuch thatv∈h1, w∈h, andhi∩hi+16=∅, i= 1, . . . ℓ−1.

66

The Hasse diagram of a hypergraph H = (V, A) is the directed acyclic graph with

67

vertex setA∪ {{v};v∈V}and there is an edge (h1, h2) if and only ifh2(h1 and there

68

is no seth∈A withh2(h(h1. Fig. 1(a) shows an example of a Hasse diagram. Let

69

(v, w) be an edge of a directed acyclic graph. Then we say that w is achild ofv andv

70

a parent ofw. For a descendant dofv there is a directed path fromv to dwhile for an

71

ancestor aofvthere is a directed path fromatov. Asource does not have any parents,

72

a sink no children and an inner vertex has at least one parent and one child.

73

3. Path-Based Supports

74

In a metro map like drawing of a hypergraph vertices are drawn as disjoint simple

75

closed regions in the plane and each hyperedge h is drawn as a curve Ch with the end

76

points within the regions of different vertices ofh, visiting the region of every vertex of

77

hexactly once, not visiting the vertices not in h, and such that the pieces ofCh within

78

the region of a vertex or between two such regions are simple. Apath-based support of a

79

hypergraph H = (V, A) is a graph Gsuch thatG[h] contains a spanning path for every

80

hyperedgeh∈A.

81

On one hand, a metro map like drawing of a hypergraphH = (V, A) induces a path-

82

based support G = (V, E) of H: For a hyperedge h ∈ A let ph : v1, . . . , v|h| be the

83

(5)

Figure 3: A map of modern science (www.crispian.net).

sequence of vertices ofhin the order in which they are visited by the curve representing

84

h. Starting with an empty setE add for every hyperedgeh∈Awithph:v1, . . . , v|h|the

85

edges{vi−1, vi}, i= 2, . . . ,|h|toE. On the other hand, if we have a path-based support

86

GofH and we fix for every hyperedgeh∈Aa spanning pathphofG[h] then this induces

87

a metro map like drawing ofH.

88

In order to have a readable metro map like drawing of a hypergraph it is typically

89

desirable to draw any curve representing a hyperedge without self intersection or even

90

monotone.

91

3.1. Monotone Path-Based Supports

92

Adrawing of a graph is a mapping of each vertex to a distinct point in the plane and

93

of each edge to a simple curve between the image of its adjacent vertices not containing

94

the image of any other vertex. In a straight-line drawing of a graph each edge is drawn

95

as a line segment. Given a drawing of G, a path pof Gis monotone with respect to a

96

straight lineℓ– called theaxis of monotonicity – if every line perpendicular toℓintersects

97

the drawing of pin at most one point. Note that a pathpin a straight-line drawing is

98

monotone with respect to the axisℓif and only if the orthogonal projections of the vertices

99

ofponℓ appear alongℓin the order induced byp.

100

Let G= (V, E) be a path-based support of a hypergraphH = (V, A). A drawing of

101

Gis monotone with respect to H if for each hyperedgeh∈A there is a spanning path

102

phofG[h] and a straight line ℓhsuch thatphis monotone with respect to the axisℓh. G

103

is amonotone path-based support ofH ifGhas a monotone drawing with respect toH.

104

Remark 1. If G has a monotone drawing with respect to a hypergraph H then G has

105

a straight-line drawing that is monotone with respect to H with the same axes of mono-

106

tonicity.

107

Proof. Let a drawing D of G that is monotone with respect to H = (V, A) be given

108

and let ph, h∈A be a spanning path ofG[h] that is monotone with respect to the axis

109

h. If for each edge{v, w} ofGthe line segment betweenv and wdoes not contain any

110

vertex ofG other than v or wthen the straight-line drawing of Gin which the vertices

111

are mapped to the same points as inDis monotone with respect toH.

112

(6)

Consider now for two verticesv, win a hyperedgehthe distances disth(v, w) between

113

the orthogonal projections of v and w to ℓh. Let ∆ be the minimum of all distances

114

disth(v, w) over allh∈Aandv, w∈hwithv6=w. Let 0< ε≤∆/3.

115

Consider now the vertices of V in an arbitrary order v1, . . . , vn, n = |V|. For k =

116

1, . . . , n, we can now placevk on the circle with radiusεaround the position ofvk in D

117

but not on the intersection with the line through the already fixed drawings ofvi andvj,

118

1 ≤i < j < k. The corresponding straight-line drawing is monotone with respect toH

119

with the axes of monotonicityℓh, h∈A.

120

Remark 2. Not every path based support of a hypergraph is monotone.

121

Proof. Consider the following hypergraph. LetI ={(i, j, k, ℓ); 1≤i < j ≤5,1≤k <

122

ℓ≤5, i < k,{i, j} ∩ {k, ℓ}=∅}be an index set representing unordered pairs of disjoint

123

edges of the complete graph K5. Let VI = {vi; i = 1, . . . ,5} ∪ {vi,j,k,ℓ,x; (i, j, k, ℓ) ∈

124

I, x = 1, . . . ,3}, let hijkℓ = {vi, vi,j,k,ℓ,1, vj, vi,j,k,ℓ,2, vk, vi,j,k,ℓ,3, v}, (i, j, k, ℓ) ∈ I, let

125

AI ={hijkℓ; (i, j, k, ℓ)∈I}, and letHI = (VI, AI). LetEcontain the edges{vi, vi,j,k,ℓ,1},

126

{vi,j,k,ℓ,1, vj}, {vj, vi,j,k,ℓ,2},{vi,j,k,ℓ,2, vk}, {vk, vi,j,k,ℓ,3}, {vi,j,k,ℓ,3, v} for (i, j, k, ℓ)∈I.

127

The resulting path-based support G = (V, E) of HI is shown in Fig. 4(a). Note that

128

G[hijkℓ] is a path for any hyperedge hijkℓ ∈ A visiting the vertices vi, vj, vk, v in this

129

order. Consider now any drawing of G. Since a K5 is not planar, there are two straight

130

line segmentsvivj, vk, v,(i, j, k.ℓ)∈I that intersect. Hence, the pathG[hijkℓ] cannot be

131

drawn monotonously.

132

Remark 3. Every hypergraph has a monotone path-based support.

133

Proof. Order the vertices of H = (V, A) with respect to an arbitrary ordering<. The

134

support G< = (V, E<) of H with respect to the ordering < is constructed as follows.

135

For each hyperedge {v1, . . . , vk} ∈ A with v1 < · · · < vk the edge set E< contains the

136

edges {vi−1, vi}, i = 1, . . . , k. Assume now that in a drawing of G< the x-value of a

137

vertex v is smaller than the x-value of the vertex w if v < w and that the edges are

138

drawn monotonously in x-direction. Then for each hyperedgeh={v1, . . . , vk} ∈Awith

139

v1 <· · ·< vk the pathph:v1, . . . , vk is drawn monotonously with respect to the x-axis.

140

See Fig 4(c) for an example.

141

Note that the problem of deciding whether a given support is a support with respect

142

to an ordering and if so, finding such an ordering, is closely related to the betweenness

143

problem [15].

144

Theorem 1. Given a supportG of a hypergraphH

145

1. it isN P-hard to decide whether Gis a monotone path-based support ofH, and

146

2. it is N P-complete to decide whether there exists an ordering < of the vertex set

147

such that Gis the support ofH with respect to<,

148

even ifGhas the minimum number of edges among all supports ofH.

149

(7)

v1 v2

v3

v4

v5

7

6 7 5 5

(a) maximum path-based support

v1 v2

v3

v4

v5

(b) minimum path-based support

v1 v2 v3 v4 v5

(c) minimum path-based support w.r.t. an ordering

Figure 4: Three different supports for the hypergraphHI introduced in Section 3.1. The small black vertices are the verticesvσ,x, σI, x= 1,2,3. The thick red path indicates the hyperedgeh1324.

Proof.

150

1. Consider an instance of thestrictly monotone trajectory drawing problem consisting

151

of a set of paths P on a set of vertices Vt. It is N P-hard to decide whether the

152

vertices can be mapped to points in the plane such that each path is monotone with

153

respect to some axis (one for each path) [16].

154

Consider the hypergraphH= (V, A) withV containingVtand for each pathp∈P

155

and each edgee∈pa vertexvep. The setAcontains for each pathp∈Pa hyperedge

156

hp=S

{v,w}∈p{v, v{v,w}p, w}as well as the hyperedges{v, v{v,w}p}and{v{v,w}p, w}

157

for each edge{v, w} ∈p. The graphG= (V, E) withE=S

p∈P

S

e∈p{{v, vep}; v∈

158

e} is a path-based support ofH and has the minimum number of edges among all

159

supports ofH. Gis monotone if and only ifP is drawable with each path monotone

160

with respect to some axis.

161

2. Consider an instance of the betweenness problem consisting of a set of verticesVb

162

and a set of constraints C. Each constraint c ∈C consists of a sequence of three

163

vertices. It is N P-complete to decide whether the vertices can be totally ordered

164

such that for each constraintc= (u, v, w) the vertexvis between the verticesuand

165

w [15].

166

Consider the hypergraphH = (V, A) withV containingVb and for each constraint

167

c ∈ C vertices vc2 and vc4. The set A contains for each c = (vc1, vc3, vc5) ∈ C a

168

hyperedge hc = {vc1, . . . , vc5} and hyperedges hci = {vci, vc(i+1)} for 1 ≤ i ≤ 4.

169

The graph G= (V, E) withE =S

c∈C{hci; 1≤i≤4} is a path-based support of

170

H and has the minimum number of edges among all supports ofH.

171

There is an ordering < of V such that G is the support of H with respect to <

172

if and only if for each constraint c = (vc1, vc3, vc5)∈C the five vertices in hv are

173

either ordered vc1 < vc2 < vc3 < vc4 < vc5 or vc5 < vc4 < vc3 < vc2 < vc1. Since

174

(8)

the vertices vc2 andvc4 do not appear in a hyperedgehc for any constraintc6=c

175

it follows that there is an ordering < of V such that Gis the support of H with

176

respect to<if and only ifVbcan be totally ordered while satisfying all betweenness

177

constraints inC.

178

3.2. Minimum Path-Based Supports

179

Assuming that each hyperedge contains at least one vertex, each hypergraph H =

180

(V, A) has a monotone path-based support G= (V, E) with at mostN−m edges. Just

181

take the support G< with respect to an arbitrary ordering <of the vertex set V. It is,

182

however, N P-hard to find an ordering that minimizes the number of edges among all

183

path-based supports ofH with respect to an ordering of the vertex set [17].

184

Further, note that a path-based support that minimizes the number of edges among

185

all path-based support of a hypergraph H with respect to some ordering of the vertex

186

set might not be a path-based support ofH with the minimum number of edges over all

187

path-based supports of H. E.g., consider the hypergraphHI from the previous section

188

(Fig. 4) or the hypergraph H with hyperedges {1,2,4}, {1,3,4}, and {2,3,4} for an

189

easier example: the unique minimum path-based support of H is a star centered at 4

190

which cannot be created from any ordering of the vertex set. The problem of finding a

191

minimum path-based support remains, however,N P-hard.

192

Theorem 2. It isN P-hard to minimize the number of edges among all path-based sup-

193

ports (or among all monotone path-based supports) of a hypergraph – even if the hyper-

194

graph is closed under intersections.

195

Proof. Reduction from Hamiltonian path. Let G = (V, E) be a graph. Let H =

196

(V, E∪ {V} ∪ {{v}; v∈V}) andK=|E|. Note that any support of H containsGas a

197

subgraph. Hence,H has a path-based support with at mostKedges if and only ifGis a

198

path-based support ofH which is true if and only ifGcontains a Hamiltonian path.

199

3.3. Planar Path-Based Supports

200

A graph isplanar if it has a drawing in which no pair of edges intersect but in common

201

end points. For the application of Euler diagram like drawings, planar supports are of

202

special interest. However, like for general planar supports, the problem of testing whether

203

there is a path-based planar support is hard.

204

Theorem 3. It is N P-complete to decide whether a hypergraph – even if it is closed

205

under intersections – has a path-based planar support.

206

Proof. The support that Johnson and Pollak [5] constructed to prove that it is N P-

207

complete to decide whether there is a planar support, was already path-based.

208

4. Path-Based Tree Supports

209

In this section we show how to decide in polynomial time whether a given hypergraph

210

has a path-based tree support. If such a support exists, it is at the same time a path-based

211

support of minimum size, a monotone path-based support [18], and a planar path-based

212

support. Moreover the intersection of any subset of hyperedges induces again a path in a

213

path-based tree support. So far it is known how to decide in linear time whether there is

214

a path-based tree support ifV ∈A[7].

215

(9)

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

h31

h22

h11 h12 h14 h15 h21

(a) Hasse diagramD

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

h31

h22

h11 h13 h14 h15 h21

h12

(b) ClosureD

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

h31

hs

h11 h12 h13 h14 h15

(c) AugmentedD

Figure 5: Illustration of the augmented Hasse Diagram for the hypergraphH= (V, A) indicated in 5(a).

A=A∪ {h13,{v2}, . . . ,{v5}}. The two hyperedgesh21 andh22are both implied but no summery edges.

They are not present in the augmented Hasse diagram. The summary hyperedgehs is added toA.

4.1. Constructing a Tree Support from the Hasse Diagram

216

A support with the minimum number of edges and, hence, a tree support if one exists

217

can easily be constructed from the Hasse diagram if the hypergraph is closed under inter-

218

sections [7]. Note, however, that the number of intersections of any subset of hyperedges

219

could be exponential in the size of the hypergraph.

220

To construct a tree support of an arbitrary hypergraph H = (V, A), it suffices to

221

consider theaugmented Hasse diagram – a representation of “necessary” intersections of

222

hyperedges. The definition is as follows. First consider the smallest setAof subsets ofV

223

that containsAand that is closed under intersections. Consider the Hasse diagramD of

224

H = (V, A). Note that any tree support ofH is also a tree support ofH: The intersection

225

of two subtrees is again a subtree.

226

Leth1, . . . , hk be the children of a hyperedgehin D. The hyperedgeh∈Aisimplied

227

if the hypergraph (h1∪· · ·∪hk,{h1, . . . , hk}) is connected andnon-implied otherwise. Let

228

{h1, . . . , hk} be a maximal subset of the children of a non-implied hyperedge inA such

229

that (h1∪ · · · ∪hk,{h1, . . . , hk}) is connected. Thenh1∪ · · · ∪hk is asummary hyperedge.

230

Note that a summary hyperedge might not be in A. Let A be the set of subsets of V

231

containing the summary hyperedges, the hyperedges inA that are not implied, and the

232

sources ofD. For an example consider Fig. 5(c). In this example, the hyperedgehsis a

233

summary hyperedge, h31 andh11, . . . , h15 are non-implied, andV is a source.

234

The augmented Hasse diagram of H is the Hasse diagram D of H = (V, A). If

235

H has a tree support, then the augmented Hasse diagram has O(n+m) vertices and

236

can be constructed inO(n3m) time [7] (without explicitly constructing the closure under

237

intersection A). Further note that ifH has a tree support and h∈ A is non-implied,

238

then all children ofhinD are disjoint: Otherwise there would be a summary hyperedge

239

betweenhand intersecting children.

240

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

241

with an empty graph G, we proceed from the sinks to the sources of D. If h ∈ A

242

is not implied, choose an arbitrary ordering h1, . . . , hk of the children of h in D. We

243

assume that at this stage,G[hi], i= 1, . . . , k are already connected subgraphs of G. For

244

j= 2, . . . , k, choose verticesvj∈Sj−1

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

245

If we want to construct a path-based tree support, then G[hj], j= 1, . . . , k are paths

246

and as verticesvj+1andwj for the edges connectingG[hj] to the other paths, we choose

247

(10)

the end vertices of G[hj]. The only choices that remain are the ordering of the children

248

ofhand the choice of which end vertex ofG[hj] iswj and which one isvj+1. The implied

249

hyperedges give restrictions on how these choices might be done.

250

4.2. Choosing the Connections: A Characterization

251

When we want to apply the general method introduced in Sect. 4.1 to construct a

252

path-based tree supportG, we need to make sure that we do not create vertices of degree

253

greater than 2 inG[h] when processing non-implied hyperedges contained in an implied

254

hyperedgeh.

255

Definiton 1 (Conflicting Hyperedges). Two overlapping hyperedgesh, h′′∈A have

256

a conflictif there is some hyperedge inA that contains bothh andh′′. Two overlapping

257

hyperedgesh, h′′∈A have a conflict with respect toh∈A ifh has a conflict with h′′,

258

h∩h′′⊆handhis a child ofh orh′′. In that case we say thath andh′′are conflicting

259

hyperedges of h. Let Ah be the set of conflicting hyperedges of h. Let Ach be the set of

260

children hi ofhsuch that h∈Ahi.

261

E.g., consider the hypergraph in Fig. 5(c). Thenh31andh11are both contained in the

262

hyperedge V and they both contain {v2}. Hence, they have a conflict. Further, is the

263

intersectionh31∩h11={v2}contained in the child hsofh31. Hence,h31 has a conflict with

264

h11 with respect tohs. Similarly doesh31 have a conflict with h15 with respect tohs and

265

we have on one handAhs ={h11, h12, h31}. On the other hand doeshshave a conflict with

266

h11with respect toh12 and withh15with respect toh14 and we haveAchs ={h12, h14}. Note

267

that there might be hyperedges that have a conflict but not with respect to any of their

268

children. As an example see the hyperedgesh41 andh42in Fig. 6(a). In the lemmas in this

269

section, we will prove that it suffices if the algorithm considers only conflicts with respect

270

to some child.

271

Assume now thatH has a path-based tree supportGand leth, h′′∈Abe such that

272

h andh′′ have a conflict with respect to a childhofh′′. Since h∪h′′ is contained in a

273

hyperedge it follows thatG[h∪h′′] is the subgraph of a path. Since in additionhandh′′

274

intersect and G[h] and G[h′′] are paths, it follows thatG[h∪h′′] is also a path. Hence,

275

we have the following situation.

276

h

z }| {

h

| {z }

h′′

277

Note especially that among the two end vertices of G[h′′] exactly one is contained inh

278

and that this end vertex is also an end vertex of G[h]. This yields the following three

279

types of restrictions on the connections of the paths.

280

1. G[h\h] andG[h′′\h] must be paths that are attached to different end vertices of

281

G[h].

282

2. Assume further that h′′′ does also have a conflict withh′′ with respect toh. Then

283

both, G[h\h] andG[h′′′\h], must be appended to the common end vertex ofG[h]

284

andG[h′′].

285

3. Assume further that h2, h1 ∈ Ach, h2 6= h1. Let hi ∈ Ah have a conflict with h

286

with respect to hi, i = 1,2, respectively. Then G[hi\h] has to be appended to

287

the common end vertex of G[h] and G[hi]. Hence,G[h1\h] andG[h2\h] must be

288

appended to different and vertices of G[h].

289

(11)

h1

z }| {

h2

z }| {

h1 h2

| {z }

h

290

E.g., consider the hypergraphH= (V, A) in Fig. 5(c). Then on one hand,h31has a conflict

291

withh11andh15with respect tohs. Hence, by the first type of restrictionsG[h11\hs] and

292

G[h15\hs] must be appended to the same end vertex ofG[hs], i.e. the end vertex ofG[hs]

293

to whichG[h31\hs] is not appended. On the other hand,h11 andhshave a conflict with

294

respect to h12, while h15 and hs have a conflict with respect toh14. Hence, by the third

295

type of restrictions it follows thatG[h11\hs] andG[h15\hs] must be appended to different

296

end vertices ofG[h]. Hence, there is no path-based tree support forH.

297

This motivates the following definition of conflict graphs.

298

Definiton 2 (Conflict Graph). The conflict graphCh, h∈A is a graph on the vertex

299

setAh∪Ach. The conflict graphCh contains the following three types of edges.

300

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

301

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

302

h1.

303

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

304

E.g., consider the hypergraph H= (V, A) in Fig. 5(c).

Then the conflict graph Chs contains the edges {h31, h15} and{h31, h11} of type one, the edges {h12, h11} and{h14, h15} of type 2 and the edge{h12, h14} of type 3. (See the figure on the right.) Hence,Chs contains a cycle of odd length, reflecting that there is no suitable assignment of the end vertices ofG[hs] toh11, h15 andh31.

h31 Ch

s: h11

h12 h14 h15 type 1 type 1

type 2 type 2

type 3

305

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

306

1. H has a tree support,

307

2. no hyperedge contains three pairwise overlapping hyperedges h1, h2, h3 ∈ A with

308

h1∩h2=h2∩h3=h1∩h3, and

309

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

310

From the observations before the definition of the conflict graph it is clear that the

311

conditions of Theorem 4 are necessary for a path-based tree support. In the remainder

312

of this section, we prove that the conditions are also sufficient.

313

In the following assume that the conditions of Theorem 4 are fulfilled. We show

314

in Algorithm 1 how to construct a path-based tree support G of H. We consider the

315

vertices of the augmented Hasse diagram D from the sinks to the sources in a reversed

316

topological order, i.e., we consider a hyperedge only if all its children in D have already

317

been considered. During the algorithm, a conflicting hyperedge h of a hyperedge h is

318

labeled with the end vertex v of G[h] if the path G[h\h] will be appended tov. We

319

will call this label sideh(h). Concerning the choice of the ordering of the children in

320

Line 8 of Algorithm 1: the sets Ach, h ∈A contain at most two hyperedges – otherwise

321

the subgraph ofCh induced by Achcontains a triangle and, hence, is not bipartite.

322

Algorithm 1 constructs a tree support GofH [7]. Before we show thatGis a path-

323

based tree support, we illustrate the algorithm with an example. Consider the hypergraph

324

H in Fig. 6. We show how the algorithm proceedsh51 and all its descendants inD. For

325

(12)

Algorithm 1: Path-based tree support

Input : augmented Hasse diagram D of a hypergraphH= (V, A)

fulfilling the conditions of Theorem 4;

conflict graphsCh on vertex setsAh∪Ach,hnon-source vertex ofD Output: path-based tree supportG= (V, E) ofH

Data : labels sideh(h)

indicating the end vertex ofG[h] to whichh\hshould be appended begin

E← ∅;

foreachvertex hof D in a reversed topological order ofD do if h={v} for somev∈V then

foreachvertex h ofCh do sideh(h)←v;

else

8 Leth1, . . . , hk be the children ofhsuch thath2, . . . , hk−1∈/ Ach; if his non-implied then

Letwi, vi+1, i= 1, . . . , k be the end vertices ofG[hi] such that

• sideh1(h) =v2 ifh∈Ah1 and

• sidehk(h) =wk ifh∈Ahk;

Add the edges{vi, wi}, i= 2, . . . , ktoE;

else

Letw16=vk+1be the end vertices of G[h] such that

• vk+1∈/ h1and

• w1∈/ hk;

if h1∈Ach thensideh(h1)←vk+1; if hk∈Achthensideh(hk)←w1;

Label the remaining vertices ofCh withvk+1 orw1

such that no two adjacent vertices have the same label;

end

(13)

h1

1 h12 h13 h14 h1

5 h16 h17 h18 h19 h110 h1

11 h112 h1

13

h2

1 h2

2 h2

3 h2

4 h2

5

h42 h41

v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 h2 h26 7

h51 h5

2 h5

3

h114 v14 h31 h32 h33 h34

(a) augmented Hasse diagramDof a hypergraphH

side=v5 side=v6

h31 h2

2

h1

5

(b) conflict graph of hyperedgeh23

side=v7 side=v9

h17 h1

9

h2

5 h41

(c) conflict graph of hyperedgeh24

h4

2

h2

3

side=v5 side=v7

h1

7

h2

2

(d) conflict graph of hyperedgeh31

v4 v5 v6 v7 v8 v9 v10

v11

v12 v13

v1

v2

v3 v14

(e) a path-based tree support ofH

v9

v3 v4 v5 v6 v7 v8 v10 v14 v13

v12 v11 v1

v2

(f) metro map like drawing of the sources ofD Figure 6: Illustration of Algorithm 1.

(14)

the hyperedgesh13, h14, h16, andh18 the conflict graphs are empty. For the other leaves we

326

have

327

sideh15(h22) = sideh15(h23) = sideh15(h31) = sideh15(h42) = v5, sideh17(h24) = sideh17(h31) = v7, and sideh19(h24) = sideh19(h41) = sideh19(h25) = sideh19(h26) = sideh19(h27) = v9.

When operating h22 and h23, respectively, we add edges {v4, v5} and {v5, v6}, respec-

328

tively, toG. While the conflict graph ofh22does only containh15with sideh22(h15) =v4, the

329

assignment of side inCh23 is illustrated in Fig. 6(b). h24 has a conflict with respect to the

330

childrenh17 andh19. Hence, we add edges{v7, v8}and {v8, v9} toG. The conflict graph

331

ofh24is shown in Fig. 6(c). When operatingh31we can chooseh1=h23andh2=h17, since

332

sideh23(h31) =v6 and sideh17(h31) =v7. We add the edge {v6, v7} toG. The conflict graph

333

Ch31 is shown in Fig. 6(d). The hyperedgeh41 is implied and we set sideh41(h24) =v4. We

334

can finally connect v3to v4 orv9 when operatingh51.

335

To prove the correctness of Algorithm 1, it remains to show that all hyperedges ofH

336

induce a path in G. Since we included all inclusion maximal hyperedges of H in A, it

337

suffices to show this property for all hyperedges inA. We start with a technical lemma.

338

Lemma 5. Let h andh′′ be two overlapping hyperedges and leth be not implied. Then

339

there is a hyperedgeh∈A withh∩h′′⊆h(h.

340

Proof. Lethc∈Abe maximal with h∩h′′⊆hc (h. The hyperedgehc is a child of

341

the non-implied hyperedgeh inD. Consider the summary hyperedgehwithhc ⊆h(h.

342

By definition ofA it follows that h∈A.

343

For an edge{v, w}ofGlethvwbe the intersection of all hyperedges ofA that contain

344

v and w. Note thathvw is not implied since v andw are contained in different children

345

ofhvw inD and{v, w}is an edge of the tree supportGofH. Hence,hvw∈A.

346

Lemma 6. Let Conditions 1-3 of Theorem 4 be fulfilled and letG= (V, E)be the graph

347

computed in Algorithm 1. Let h, h′′ ∈A have a conflict with respect to a child hof h

348

and letG[h]andG[h′′] be paths. Then

349

1. sideg(h′′) = sideh(h′′)for allg∈A with h∩h′′⊆g⊆h,

350

2. sideh(h′′)∈h′′,

351

3. sideh(h′′)is an end vertex of G[h],

352

4. G[h\h′′]is a path, and

353

5. sideh(h′′)is adjacent in Gto a vertex of h′′\h.

354

Proof. We prove the lemma by induction on the sum of the steps in which h and h′′

355

were considered in Algorithm 1. If h andh′′ had been considered in the first two steps,

356

then at least one of them is a leaf ofD and, hence,h andh′′ have no conflict. So there

357

is nothing to show. Let now h andh′′ be considered in later steps. Leth′′∈A have a

358

conflict withh with respect to a childhofh and letG[h] andG[h′′] be paths.

359

1. + 2. if h∩h′′∈A: There is nothing to show ifh=h∩h′′. So leth1be the child

360

of h with h1 ⊇ h∩h′′. Then h, h′′ have a conflict with respect to h1. Hence,

361

Ch contains the path h, h′′, h1. By the inductive hypothesis on Property 3, it

362

Références

Documents relatifs

Surveyed parameters during query evaluation in XPA Nodes Number of nodes in the result set after evaluation of one location step Useful Number of nodes which leads to at least one

The proposed learning-based path relinking (LPR) algorithm for solving the bandwidth coloring problem and the bandwidth multicoloring problem incor- porates a learning-based

We stress the fact that the implementation is not a prototype but a robust and reliable system, resulting from many years of programming work; it includes class, null

The inorganic portion represents 95% of the volume of nacre, but its highly specific properties (in particular its great toughness) are due to the interaction of this

We propose a new algorithm to decide whether a given finitely generated sub- group H is a free factor of the free group F , which is polynomial in the size of H and exponential in

Most of the time motion planners provide an optimized motion, which is not optimal at all, but is the output of a given optimization method.. When optimal motions exist,

The reason of this different behavior is that, in the case of problem A, all the layers do not need to be explored for finding the solution path, whereas solving problem B requires

We reworked the model based on the insights gained from the causes of the two counterexamples. The result, shown in Figure 11, is simpler than the original design. Model checking