## Serviços Personalizados

## Journal

## Artigo

## Indicadores

- Citado por SciELO
- Acessos

## Links relacionados

- Citado por Google
- Similares em SciELO
- Similares em Google

## Compartilhar

## Pesquisa Operacional

##
*versão impressa* ISSN 0101-7438*versão On-line* ISSN 1678-5142

### Pesqui. Oper. v.25 n.3 Rio de Janeiro set./dez. 2005

#### http://dx.doi.org/10.1590/S0101-74382005000300005

**André Luiz Pires Guedes ^{I}; Lilian Markenzon^{II, *}**

^{I}Departamento de Informática; Universidade Federal do Paraná (UFPR); andre@inf.ufpr.br

^{II}Núcleo de Computação Eletrônica; Universidade Federal do Rio de Janeiro (UFRJ); markenzon@nce.ufrj.br

**ABSTRACT**

Directed hypergraphs are generalizations of digraphs and can be used to model binary relations among subsets of a given set. Planarity of hypergraphs was studied by Johnson and Pollak; in this paper we extend the planarity concept to directed hypergraphs. It is known that the planarity of a digraph relies on the planarity of its underlying graph. However, for directed hypergraphs, this property do not apply and we propose a new approach which generalizes the usual concept. We also show that the complexity of the recognition of a directed hypergraph as planar is linear on the size of the hypergraph.

**Keywords:** directed hypergraphs; planarity; algorithms.

**RESUMO**

Hipergrafos direcionados são generalizações de digrafos, e são utilizados na modelagem de relações binárias entre subconjuntos de um dado conjunto. O problema da planaridade em hipergrafos foi estudado por Johnson e Pollak; neste trabalho estendemos o conceito de planaridade para hipergrafos direcionados. É noção conhecida que a planaridade de hipergrafos depende da planaridade de seu grafo subjacente. Entretanto, para hipergrafos direcionados, esta propriedade não pode ser aplicada e propomos uma nova abordagem que generaliza o conceito tradicional. Mostramos também que a complexidade de testar a planaridade de um hipergrafo direcionado é linear no tamanho do hipergrafo.

**Palavras-chave:** hipergrafos direcionados; planaridade; algoritmos.

**1. Introduction**

Directed hypergraphs (Ausiello *et al*., 1985; Gallo *et al*., 1993) are a generalization of directed graphs (digraphs) and they can model binary relations among subsets of a given set. Such relationships appear in different areas of Computer Science such as database systems (Ausiello *et al*., 1985), expert systems (Ramaswamy *et al*., 1997), parallel programming (Nguyen *et al*., 1998), scheduling (Lin & Sarrafzadeh, 1995; Gallo & Scutellà, 2002), routing in dynamic networks (Pretolani, 2000) and, more recently, data mining (Chawla *et al*., 2004) and bioinformatics (Krishnamurthy *et al*., 2003).

It is interesting to note that even such distinct applications may share a common concern: the need for constructing geometric representations of the abstract graphs used in their models. The study of theoretical and algorithmic problems related to this field, known as *graph drawing*, is an area of growing interest with several important publications, as surveyed by Di Battista *et al*. (1999). One of the most important problems of graph drawing is the study of planarity and related problems, such as the determination of minimum number of crossings in a drawing and the hierarchical drawing of a digraph. Although graphs and digraphs are widely studied in graph drawing, the same cannot be said about directed hypergraphs. Planarity of hypergraphs was studied by Johnson & Pollak (1987) and their paper yields our theoretical approach. Mäkinen (1990) gives emphasis to the drawing of hypergraphs, where planarity plays an important role. He includes some remarks about directed hypergraph drawing, assuming a restricted definition.

In this paper we extend the planarity concept to directed hypergraphs. A possible theoretical approach would be to look for some sort of extension of a solution already existent for digraphs. It is known that the planarity of a digraph relies on the planarity of its underlying graph. We show that for directed hypergraphs the same reasoning do not apply, and we propose a new approach. In Section 2 some basic definitions about directed hypergraphs and hypergraph drawing are presented; in Section 3 the concept of hypergraph planarity is reviewed and the directed case is presented, showing that previous results are particular cases of a more general concept. Previous results were presented in Guedes & Markenzon (2001).

**2. Basic Notions **

This section introduces the hypergraph notation used throughout the paper. Basic graph concepts are assumed to be known and can be found in McHugh (1990).

A directed hypergraph (Gallo *et al*., 1993; Guedes, 2001) is defined as follows:

**Definition** 1. A *directed hypergraph H* = (*V*, *A*) is a pair, where *V* is a finite set of vertices and *A* is a set of hyperarcs. A *hyperarc a* Î *A* is an ordered pair (*X*, *Y*) where *X* and *Y* are disjoint not empty subsets of *V*. Set *X* (*Y*) is called the *origin* (*destination*) of *a* and denoted *Org*(*a*) (*Dest*(*a*)).

A directed hypergraph *H* = (*V*, *A*) with no isolated vertices has size |*H*| = S _{a}_{= (X, Y) Î A} |*X*| + |*Y*|.

Figure 1 shows an example of a directed hypergraph *H* = (*V*, *A*).

In the undirected version of hypergraphs each hyperarc is considered as a set instead of a pair of sets, and is named *hyperedge*.

**Definition 2.** Let *H* = (*V*, *A*) be a directed hypergraph. The *underlying hypergraph* of *H* is the hypergraph *H ^{u}* = (

*V*,

*A*) where for every hyperarc

^{u}*a*= (

*X*,

*Y*) Î

*A*there is a hyperedge

*e*=

*X*È

*Y*Î

*A*, and every hyperedge of

^{u}*H*has a corresponding hyperarc in

^{u}*H*.

Subfamilies of directed hypergraphs, as defined in Gallo *et al*. (1993), can be associated with some earlier definitions, as the one presented in Ausiello *et al*. (1985). Such subfamilies can be defined as follows:

**Definition 3.** Let *H* = (*V*, *A*) be a directed hypergraph.

1. | If every hyperarc a Î A is such that |Dest(a)| = 1 than H is called a B-graph; |

2. | If every hyperarc a Î A is such that |Org(a)| = 1 than H is called a F-graph; |

3. | If every hyperarc a Î A is such that |Dest(a)| = 1 or |Org(a)| = 1 than H is called a BF-graph. |

A digraph is a particular case of BF-graphs, with |*Org*(*a*)| = 1 and |*Dest*(*a*)| = 1 for all arcs.

The visual representation of a hypergraph is as important as the same problem for graphs and digraphs. Mäkinen (1990) introduced two notions of hypergraph drawing based on methods for describing a hypergraph: the *subset standard* and the *edge standard*. The first one uses the fact that a hypergraph is a collection of subsets, which can be viewed as a Venn diagram. Bertault & Eades (2001) presented a drawing system that focuses on the representation of hypergraphs with this standard. In the edge standard a hyperedge *e* is represented by connecting the points that represent the vertices that define *e* by curve lines which must intersect in a unique point, emphasizing the image of a unique edge.

The edge standard is the best choice for directed hypergraphs, as we can draw the hyperarcs as two sets connected by lines. In fact this pictorial representation has been used by almost all papers related to the subject. The drawing shown in Figure 1 is an example. In view of that, we can apply the usual concept of planarity to this structure, trying to avoid crossing lines.

**3. Directed Hypergraph Planarity**

Planarity of (undirected) hypergraphs was studied by Johnson & Pollak (1987), on a paper that presents three approaches of planarity. The first one, based on Zycov planarity, is very convenient for the edge standard. The other two, introduced in their paper, are based on Venn diagrams, and thus are related to the subset standard. Definitions of hyperedge-based and vertex-based Venn diagrams of an arbitrary hypergraph are presented. These new concepts support definitions of hyperedge-planar and vertex-planar hypergraphs. It is also shown that the two problems, Hyperedge-Based Venn Diagram ("given a hypergraph H, is it hyperedge-planar?") and Vertex-Based Venn Diagram ("given a hypergraph H, is it hypervertex-planar?") are both NP-complete. As so, these extensions of the planarity concept are predominantly of theoretical interest. Choosing the first approach, we are able to extend it, presenting a new concept of planarity of directed hypergraphs with an efficiently testable criterion.

Zykov planarity associates hyperedges with faces (regions) of a planar subdivision. Let *H* = (*V*, *E*) be a hypergraph. Each vertex of *V* is represented by a vertex and each hyperedge is represented by a face of the planar map. Johnson & Pollak (1987) define Zykov planarity using a bipartite graph associated with the hypergraph (see also Walsh, 1975).

**Definition 4**. A hypergraph *H* = (*V*, *E*) is *Zykov-planar* if the bipartite graph *H _{B}* = (

*U*,

*F*) is planar, where

*U*=

*V*È

*E*and

*F*= {{

*v*,

*e*} |

*e*Î

*E*and

*v*Î

*e*}.

The planar representation of the bipartite graph *H _{B}* can be seen as a refinement of the planar subdivision used on the original definition from Zykov. The vertices representing the hyperedges can be drawn inside the faces.

The recognition of a hypergraph *H* = (*V*, *E*) as a Zykov-planar hypergraph is equivalent to the recognition of the bipartite graph *H _{B}* = (

*U*,

*F*) as a planar graph and it can be done in linear time. It is important to observe that an ordinary graph is planar under Definition 4 (when viewed as a hypergraph) if and only if it is planar in the ordinary sense. So, Zykov planarity is a true generalization of the planarity concept to hypergraphs.

As it was mentioned earlier in this paper, testing the planarity of a digraph is the same as testing the planarity of the underlying graph. So, it would be nice if the solution presented above could also be extended to directed hypergraphs. Unfortunately this is not possible due to the imposed partition of the vertices that define a hyperarc (the origin and the destination). Figure 2 shows a counter-example: directed hypergraph *H* cannot be drawn without crossing edges, but its underlying hypergraph *H ^{u}* is planar (Figure 2(b) presents the bipartite planar graph constructed in order to apply Definition 4).

So, the vertices that define a hyperarc must be grouped when drawn in the plane. A solution that forces such grouping to happen is to use two new vertices instead of just one to represent the hyperarc. One of these vertices is used to group the origin and the other to group the destination of the hyperarc. Figure 3 shows this approach.

The directed hypergraph planarity can now be defined. First, we need to define a new transformation of the directed hypergraph.

**Definition 5.** Let *H* = (*V*, *A*) be a directed hypergraph. The *structure graph* associated with *H* is the digraph *H _{S}* = (

*V*È

*U*,

*B*), where

*U*=

*A*× {1,2}, and the elements of

*U*are denoted by

*a*, with

_{i}*a*Î

*A*and

*i*= 1, 2; and

*B*=

*B*È

_{O}*B*È {(

_{D}*a*

_{1},

*a*

_{2}) |

*a*Î

*A*}, where

*B*and

_{O}*B*are defined as

_{D}

B= {(_{O}v,a_{1}) |aÎAandvÎOrg(a)}, and

B= {(_{D}a_{2},v) |aÎAandvÎDest(a)}.

**Definition 6 (Planarity).** A directed hypergraph *H* is *planar* if its structure graph *H _{S}* is planar.

Figure 4(a) shows again the directed hypergraph *H*; Figure 4(b) presents (*H _{S}*)

*, the underlying graph of the structure graph*

^{u}*H*associated with

_{S}*H*, which is clearly not planar, since it is homeomorphic to

*K*

_{3,3}.

The relation between this concept of planarity and the Zykov planarity can now be established.

Given a graph *G* = (*V*, *E*), the *contraction* of an edge is defined as the operation of removing *e* = (*x*, *y*) Î * E* from *G* and identifying *x* and *y* (with a single new vertex *xy*) so that every edge (other than (*x*, *y*)) originally incident to either *x* or *y* becomes incident to *xy*. By the Contraction Form of Kuratowski Theorem (McHugh, 1990), we know that this operation preserves planarity, that is, if *G* is planar than the resulting contracted graph is also planar.

**Theorem 1.** Let *H* = (*V*, *A*) be a directed hypergraph. If *H* is planar then the underlying hypergraph of *H* is Zykov-planar.

**Proof.** If *H* is planar then *H _{S}*, the structure graph associated with

*H*, is planar and its underlying graph (

*H*)

_{S}*is also planar.*

^{u}Let *H _{B}* be the bipartite graph of Definition 4 applied to

*H*, the underlying hypergraph of

^{u}*H*.

Let *a* be a hyperarc of *H*; (*a*_{1}, *a*_{2}) is an edge of (*H _{S}*)

*. The contraction of each one of these edges generates a new graph, isomorphic to*

^{u}*H*. Since the contraction preserves planarity, if (

_{B}*H*)

_{S}*is planar, so is*

^{u}*H*. Finally, as

_{B}*H*is planar, by Definition 4, the underlying hypergraph of

_{B}*H*is Zykov-planar.

The converse of Theorem 1 is not true, as shows the counter-example in Figure 2.

It is important to observe that when Definition 6 is applied to particular cases as BF-graphs the result is equivalent to the usual concept of planarity for digraphs.

**Theorem 2.** Let *H* be BF-graph. Then *H* is planar if and only if its underlying hypergraph is Zykov-planar.

**Proof.** Every hyperarc *a* of *H* has |*Org*(*a*)| = 1 or |*Dest*(*a*)| = 1. Let us suppose, without loss of generality, that the hyperarc *a* has only one vertex at its destination.

When constructing *H _{S}* (by Definition 6), vertex

*a*

_{2}has degree 2 (as in Figure 5(b)). We must recognize if (

*H*)

_{S}*is planar. Vertex*

^{u}*a*

_{2}together with its incident edges can be replaced by a single edge. A similar operation can be performed on all vertices with degree 2 generated by the hyperarcs of

*H*. In other words, we construct a homeomorphic graph with a smaller number of vertices. After such operations, the resulting graph is isomorphic to

*H*. So, (

_{B}*H*)

_{S}*is homeomorphic to*

^{u}*H*. As homeomorphism does not interfere with planarity,

_{B}*H*is planar if and only if

_{S}*H*is planar. Consequently,

_{B}*H*is planar if and only if its underlying hypergraph is Zykov-planar.

**Corollary 1.** If *G* is a digraph then *G* is planar if and only if its underlying graph is Zykov-planar.

**Proof.** *G* is a BF-graph.

Finally, it is interesting to observe that the complexity of the recognition of planarity for directed hypergraphs is also linear on the size of the hypergraph.

**Theorem 3.** Let *H* = (*V*, *A*) be a directed hypergraph. Then the time needed to test the planarity of *H* is *O*(|*H*|).

**Proof.** Let *H* = (*V*, *A*) be a directed hypergraph. The number of vertices of *H _{S }* ,

*n*, is equal to |

_{S }*V*| + 2 |

*A*|. As |

*V*|

__<__|

*H*| and 2|

*A*|

__<__|

*H*|, then

*n*

_{S}__<__2|

*H*|.

As the construction of the structure graph *H _{S}* can be done in linear time in the size of the hypergraph (|

*H*|), and testing the planarity of a digraph can be done in linear time on the number of vertices (

*n*), the test whether a directed hypergraph is planar can be done in linear time on its size (

_{S}*O*(|

*H*|)).

**Acknowledgements**

Research partially supported by CNPq, grant 301068/2003-8.

**References**

(1) Ausiello, G.; D'Atri, A. & Saccà, D. (1985). Strongly equivalent directed hypergraphs. Analysis and Design of Algorithms for Combinatorial Problems. *Annals of Discrete Mathematics*, **25**, 1-25. [ Links ]

(2) Bertault, F. & Eades, P. (2001). Drawing hypergraphs in the subset standard. Proc. of Graph Drawing 2000. *Lecture Notes in Computer Science*, **1984,** 164-169. [ Links ]

(3) Di Battista, G.; Eades, P.; Tamassia, R. & Tollis, I. (1999). *Graph Drawing: Algorithms for the Visualization of Graphs*. Prentice Hall, Englewood Cliffs, N.J. [ Links ]

(4) Chawla, S.; Davis, J. & Pandy, G. (2004). On Local Pruning of Association Rules Using Directed Hypergraphs. ICDE'04 – Proc. of the 20th International Conference on Data Engeneering, IEEE, 832. [ Links ]

(5) Gallo, G.; Longo, G.; Nguyen, S. & Pallotino, S. (1993) Directed hypergraphs and applications. *Discrete Applied Mathematics*, **42**, 177-201. [ Links ]

(6) Gallo, G. & Scutellà, M.G. (2002). A note on minimum makespan assembly plans. *European Journal of Operational Research*, **142**, 309-320. [ Links ]

(7) Guedes, A.L.P. (2001). Hipergrafos Direcionados. D.Sc. thesis, Universidade Federal do Rio de Janeiro, Rio de Janeiro, RJ, Brasil. [ Links ]

(8) Guedes, A.L.P. & Markenzon, L. (2001). Directed Hypergraph Planarity. Technical Report RT-DINF 003/2001, Universidade Federal do Paraná. [ Links ]

(9) Johnson, D.S. & Pollak, H.O. (1987). Hypergraph planarity and the complexity of drawing Venn diagrams. *Journal of Graph Theory*, **11,** 309-325. [ Links ]

(10) Krishanmurty, L.; Nadeau, J.; Özsoyoglu, G.; Özsoyoglu, M.; Schaeffer, G.; Tasan, M. & Xu, W. (2003). Pathways database system: an integrated system for biological pathways. *Bioinformatics*, **19**, 930-937. [ Links ]

(11) Lin, W.-L. & Sarrafzadeh, M. (1995). A linear arrangement problem with applications. ISCAS'95 – International Symposium on Circuits and Systems, IEEE, **1**, 57-60. [ Links ]

(12) Mäkinen, E. (1990). How to draw a hypergraph. *International Journal of Computer Mathematics*, **34,** 177-185. [ Links ]

(13) McHugh, J.A. (1990). *Algorithmic Graph Theory*. Prentice Hall, Englewood Cliffs, N.J. [ Links ]

(14) Nguyen, S.; Pretolani, D. & Markenzon, L. (1998). On some path problems on oriented hypergraphs. *RAIRO – Informatique Theorique et Applications* (*Theoretical Informatics and Applications*), **32**, 1-20. [ Links ]

(15) Pretolani, D. (2000) A directed hypergraph model for random time dependent shortest paths. *European Journal of Operational Research*, **123**, 315-324. [ Links ]

(16) Ramaswamy, M.; Sarkar, S. & Chen, Y.-S. (1997). Using directed hypergraphs to verify rule-based expert systems. *IEEE Transactions on Knowledge and Data Engeneering*, **9**, 221-237. [ Links ]

(17) Walsh, T.R.S. (1975). Hypermaps versus bipartite maps. *Journal of Combinatorial Theory B*, **18,** 155-163. [ Links ]

Recebido em 06/2004; aceito em 02/2005 após 1 revisão

Received June 2004; accepted February 2005 after one revision

* *Corresponding author* / autor para quem as correspondências devem ser encaminhadas