Drwing Digrms From Lbelled Grphs Jérôme Thièvre 1 INA, 4, venue de l Europe, 94366 BRY SUR MARNE FRANCE Anne Verroust-Blondet 2 INRIA Rocquencourt, B.P. 105, 78153 LE CHESNAY Cedex FRANCE Mrie-Luce Viud 1 INA, 4, venue de l Europe, 94366 BRY SUR MARNE FRANCE 1 Introduction The min ide of Euler Digrms is to propose visul representtion of the non empty set intersections of collection of sets which mintins the connectivity of ech set nd such tht ech zone corresponding to given sets intersection ppers only once. Additionl drwing conditions re usully introduced in the literture leding to the following list of conditions : -1- Contours should be simple curves, so tht contours tht cross themselves re not llowed -2- Disconnected zones my not be llowed, so tht zones cnnot pper more thn once in digrm -3- Triple points my not be llowed, so tht only two contours cn intersect t ny given point -4- Concurrent contours my not be llowed, so line segment cnnot represent the border of 2 or more contours. -5- The shpe of contours my be restricted to certin shpes such: s circulr, ovl, rectngulr or convex shpes. Extended Euler digrms introduced in [4] must stisfy only the two first conditions. The wellformedness conditions introduced in [2] include conditions 1 to 4. By dulity, Euler digrms cn be ssocited to the drwing of plnr lbelled grphs, where ech region corresponds to vertex nd the djcency of zones re represented by the edges. In [4], we hve shown by constructive method tht there exists n extended Euler digrm representtion for ny collection of n < 9 sets. In this pper, we present method building digrm from the drwing of plnr lbelled grph nd discuss our results. Most of the lbelled grphs used in this pper hve been built following the method of [4,5]. 1 Emil: jthievre@in.fr, mlviud@in.fr 2 Emil: Anne.Verroust@inri.fr 18
2 Definitions Let us introduce first the definitions of extended Euler digrms nd L connected lbelled grphs. Definition 1 Let L be finite set of lbels nd C set of simple closed (Jordn) curves in the plne. We sy tht C is lbelled by L when ech curve c of C is ssocited with couple (λ(c), sign(c)) where λ(c) L nd sign(c) {+, }. To ech lbelled curve c of C corresponds zone ζ(c) defined by: - if sign(c) = +, then ζ(c) = int(c) - if sign(c) =, then ζ(c) = ext(c) We note ζ(c) the complement region of ζ(c) in the plne. Definition 2 Let C be set of simple closed curves of the plne lbelled by L. Given ny subset R of L, let region(r) be: λ(c) R ζ(c), if R region(r) = ζ(c), if R = The regions of C re : c C regions(c) = {R R L nd region(r) is non empty } Definition 3 An extended Euler digrm for L P(L) is set C of plnr simple closed curves lbelled by L such tht: (i) L is finite set of lbels (ii) C is set of Jordn curves lbelled by L nd verifying: () l L, c C, λ(c) = l nd sign(c) = +. (b) if λ(c) = λ(c ), c c nd sign(c) = sign(c ) then c nd c do not intersect (c) if λ(c) = λ(c ), c c nd sign(c) = +, then sign(c ) = nd c int(c) (iii) when R, region(r) is connected. The set of extended Euler digrms is noted EED. Definition 4 A lbelled grph is triple G(L, V, E) where: (i) L is finite set of lbels (ii) V is set of lbelled vertices, i.e.: () ech vertex v is lbelled with set of lbels l(v) L (b) two distinct vertices v nd w of V hve distinct sets of lbels. (iii) E is set of edges such tht: () ech edge e = (v, w) of E is lbelled with set of lbels l(e) = l(v) l(w) (b) if e E then l(e) Definition 5 Let G(L, V, E) be lbelled grph. We sy tht G(L, V, E) is L connected if nd only if for ll l in L, the subgrph G of G(L, V, E) on the set V of vertices of V hving l in its set of lbels is connected. Definition 6 Let C be n extended Euler digrm on L, the dul G(L, V, E) of C is the L connected 19
lbelled grph defined by: - ech non empty subset R of L such tht region(r) is non empty is ssocited to vertex v of V with l(v) = R, - when two non empty subsets R nd R of L re such tht region(r) nd region(r ) re djcent, then E contins vertex e joining the two corresponding vertices nd l(e) = R R. 3 From plnr L connected lbelled grphs to Euler digrms Let D(G) be stright-line plnr drwing of L connected lbelled grph G(L, V, E). The following process builds n extended Euler digrm C on L such tht G(L, V, E) is its dul grph. -1- We temporry remove the dngling edges from ech internl fce of D(G). -2- Ech internl fce F of D(G) which is not tringulr is tringulted. We now hve tringultion F 1,..., F n representing G(L, V, E). -3- If n internl tringulr fce F i = (v 1, v 2, v 3 ) contins t lest dngling edge v v 1 connected to v 1, F i is subdivided in three tringles, by the introduction of two new edges connecting v to v 2 nd v 3. Then we obtin drwing of grph formed by tringulr fces connected by edges nd which cn contin tree-like groups of edges in the externl border of the grph. -4- Ech vertex v of G is ssocited to plnr region region(l(v)). Ech tringulr fce F i = (v i, v i, v i) is subdivided in three subregions s follows : The centroid w i of F i is computed nd three line segments joining w i to the middle of the three edges of F i re formed. These line segments will be prt of the boundries of the regions ssocited respectively to v i, v i nd v i. When n edge e = (v, v ) is on the boundry of D(G), two subregions ssocited to its two extremities re formed. Three points externl to D(G) re computed: - p m belongs to the perpendiculr bisector of e - p v nd p v belong to the bisectors of e nd the segments djcent to e in the externl fce of D(G). Then three line segments (p m, p v ), (p m, p v ) nd (p m, p e ), where p e is the middle of e (cf. Figure 1) re built. -5- Then, to drw the Euler digrm, we use prllel lines to drw the contours on the common prts of their boundries. The contour line ssocited to the lbel l will cut the edge e = (v, v ) iff l l(v) l(v ) nd l(v) l(v ) does not contin l. Let suppose tht L contins the lbels whose contour lines cut e. We order the lbels of L s follows: - L + contins the lbels belonging to l(v) nd not to l(v ) nd its lbels re ordered ccording to the order induced by L. L + = {l 1,..., l k } - L contins the lbels belonging to l(v ) nd not to l(v) nd its lbels re ordered ccording 20
bc d cb e h gf bc befg cfh dgh Fig. 1. Left: The regions corresponding to D(G) with V = {bc, bef g, dgh, cf h} nd E = {(bc, cfh), (bc, befg), (bc, dgh), (cfh, befg), (cfh, dgh)}. Right: The Euler digrm built from D(G). to the inverse order induced by L. L = {l k1+1,..., l k } befg cfh dgh 4 Results nd future works Let us comment on some of our results. We hve built extended Euler digrms on the sme collections of sets thn in [2,3] for Figure 2 nd by [1] for Figure 3. We see tht the resulting digrms re similr but in our cse, the contour curves re unnecessrily stuck together nd this ffects the redbility of the digrm. In Figure 2, the common portions of contour nd b my dispper, considering tht the region c O/ b c b A b B b Fig. 2. A: the Euler digrm computed by [2]. B: the extended Euler digrm obtined by our method. {, b} is either djcent to {} or djcent to {b}. Thus contour b cn be untied from contour long the region {, b}. In Figure 3, the order of the contours, b, c nd d hs to be reversed nd ll the contours cn be untied. In Figure 4 the wy the contours re drwn on the brnches of the tree-like L connected lbelled grph genertes common portions of contours which re just drwing rtifcts nd cn be removed. Considering the digrm of figure 1, we see tht when the number of sets ssocited to region increses, the digrm is difficult to understnd. In this cse, s most of the contours surround two regions, we cnnot deform the contour to render the digrm more redble. There is only one L lbelled grph ssocited to this collection of sets. Thus, in this cse, we should test on users lterntive drwings such s the one of Figure 5. Thus, we must improve the lyout of the contours of the digrm: 21
A B b bc bcd bcd b bc C b bc bcd Fig. 3. A: the Euler digrm computed by [1]. B: the extended Euler digrm obtined by our method. C: the extended Euler digrm obtined fter deformtion of contours. c c bc b bc b Fig. 4. An extended Euler digrms built from tree-like L connected lbelled grph d cb e h gf Fig. 5. Two lterntive drwings - by minimizing the number of common portions of curves in the drwing, modifying our drwing process, - by modifying the choice of the L connected lbelled grph so tht the drwing of the resulting digrm minimizes the number of common portions of curves. - nd finlly, by using smoothing method s in [3]. Nevertheless, when the digrms re compct s in Figure 1, we must either consider lterntive drwings or enhnce the redbility with pproprite interctive tools. References [1] S. Chow nd F. Ruskey. Towrds generl solution to drwing re-proportionl Euler digrms. In Euler Digrms 2004, ENTCS, 2005. 22
[2] J. Flower nd J. Howse. Generting Euler digrms. In Digrms 2002, pges 61-75, LNAI 2317, Springer Verlg, 2002. [3] J. Flower, P. Rodgers, nd P. Mutton. Lyout Metrics for Euler Digrms. In Seventh Interntionl Conference on Informtion Visuliztion (IV03), pges 272-280. IEEE, Jnury 2003. [4] A. Verroust nd M-L. Viud. Ensuring the drwbility of extended Euler digrms for up to 8 sets. In Digrms 2004, pges 128-141, Cmbridge, 2004. [5] A. Verroust-Blondet nd M-L. Viud. Results on hypergrph plnrity. unpublished mnuscript, September 2004. 23