Journal of Graph Algorithms and Applications Dagmaps and Ε-visibility Representations for Dags: Algorithms and Characterizations

DAGmaps are space filling visualizations of DAGs that generalize treemaps. Deciding whether or not a DAG admits a DAGmap is NP-complete. Although any layered planar DAG admits a one-dimensional DAGmap there was no complete characterization of the class of DAGs that admit a one-dimensional DAGmap. In this paper we prove that a DAG admits a one-dimensional DAGmap if and only if it admits a directed ε-visibility representation. Then we characterize the class of DAGs that admit directed ε-visibility representations. This class consists of the DAGs that admit a downward planar straight-line drawing such that all source and sink vertices are assigned to the external face. Finally we show that a DAGmap defines a directed three-dimensional ε-visibility representation of a DAG.


Introduction
Among the many alternative ways to visualize a tree, space filling visualizations, such as treemaps, have become very popular due to their efficiency, their scalability, and their ease of navigation and user interaction [1].Space filling techniques make optimal use of the available space and have the capacity of showing thousands of items legibly.On the other hand, the node-link representations do not make optimal use of the available space since most of the pixels are used for background.Recently, we investigated space filling visualizations for hierarchies that are modeled by Directed Acyclic Graphs (DAG).We assumed that the available space is a rectangle and we defined the constraints for a visualization that extends the treemap techniques [1,6,13,17] to DAGs and where the vertices and edges of a DAG are drawn as rectangles [20].In [20] we use the term "DAGmap" to describe a space filling visualization according to the constraints and we show that there are DAGs that admit and DAGs that do not admit DAGmap drawings.Moreover deciding whether or not a DAG admits a DAGmap drawing is NP-complete.In the special cases of Two Terminal Series Parallel digraphs [21] and of layered planar DAGs [9], the admissibility question can be answered in linear time with respect to input size [20].Figure 1 shows two alternative DAGmaps of a DAG G.The second DAGmap, shown in Fig. 1(c), is called one dimensional because all rectangles have the same height.To illustrate the structure of the hierarchy, the rectangles are shrunk suitably in vertical, in horizontal or in both directions.This postprocessing operation is called nesting [13] and is independent from the assignment of rectangles to vertices.
In a visibility representation of a graph G, vertices of G are mapped to sets in Euclidean space and edges are expressed as visibility relations between them.In a (two-dimensional) visibility representation of a graph G, the vertices are drawn as horizontal segments in the plane and the edges are represented by pairs of vertically visible segments [8,7,14,10,16,18,22]. Recently, interest has developed in investigating visibility representations in three dimensions where vertices are represented by disjoint axis-aligned closed rectangles lying in planes parallel to the xy-plane and edges correspond to z-parallel visibility among these rectangles [5].If graph G is directed, then for every edge (u, v) the rectangle of v is below the rectangle of u.
In a DAGmap as well as in a visibility representation of a DAG the vertices are represented by closed rectangles and the edges are closed sets which have non-empty intersection with the source and destination vertex rectangles.In this paper we show that a DAGmap (resp.treemap) determines a directed threedimensional ε-visibility representation of a DAG (resp.tree).Additionally we show that there is a one-to-one correspondence between the class of DAGs that admit one-dimensional DAGmaps and the class of DAGs that admit directed ε-visibility representations.Using this correspondence we show that the class of DAGs that admit a one-dimensional DAGmap is the class of downward (or upward) planar digraphs that admit a drawing such that all source and sink vertices are on the external face f * and their incident edges on f * form geometric angles greater than π.Additionally we propose a testing and drawing algorithm that runs in linear time.

Preliminaries
There is always a zero-length path from u to u.If there is a path p from u to w, we say that w is reachable from u via p.A topological numbering of G is an assignment of numbers to the vertices of G, such that for every edge (u, v) of G, the number assigned to v is greater than the one assigned to u (i.e., number(v) > number(u)).A numbering is optimal if the range of numbers assigned to vertices is minimized.If e = (u, v) ∈ E is a directed edge, we say that e is incident from u (or outgoing from u) and incident to v (or incoming to v); vertex u is the origin of e and vertex v is the destination of e.The origin of e is denoted by orig(e) and the destination of e by dest(e).For every vertex u ∈ V , E + (u) = {e ∈ E | orig(e) = u} and E − (u) = {e ∈ E | dest(e) = u} are the sets of edges incident from and to vertex u, respectively.
A drawing Γ of a graph (digraph) G is a function which maps each vertex v to a distinct point of the plane and each edge (u, v) to a simple open Jordan curve, with endpoints u and v.A drawing is planar if no two edges intersect except, possibly, at common endpoints.A graph is planar if it admits a planar drawing.Two planar drawings of G are equivalent if they determine the same circular ordering of the edges around each vertex.An equivalence class of planar drawings is a (combinatorial) embedding of G.An embedded graph is a graph with a specified embedding.A planar drawing partitions the plane into topologically connected regions that are called faces.The unbounded face is the external face.Two drawings with the same embedding have the same faces but may still differ in the choice of the external face.A planar embedding consists of a combinatorial embedding and an external face.
An st-graph is an acyclic digraph with a single source s and a single sink t.A planar st-graph is an st-graph that is planar and embedded with vertices s and t on the boundary of the external face.
Lemma 1 [18] For every vertex v of a planar st-graph G, the incoming (outgoing) edges appear consecutively around v.
Let G be a planar st-graph and F be its set of faces.We conventionally assume that F contains two representatives for the external face: the left external face s * , which is incident to the edges on the left boundary of G, and the right external face t * , which is incident to the edges on the right boundary of G.For each element o of V ∪ E we define orig(o), dest(o), lef t(o), and right(o) as follows: Lemma 1 there exist a face lef t(v) and a face right(v) that separate the incoming from the outgoing edges of a vertex v = s, t in the clockwise direction and in counter-clockwise direction, respectively.For v = s or v = t, we conventionally define lef t(v) = s * and right(v) = t * .
2) If o = e ∈ E, we denote by lef t(e) (resp.right(e)) the face on the left (resp.right) side of e. Also, orig(e) (resp.dest(e)) denotes the origin (resp.destination) vertex of e.
We define a digraph G * , associated with the planar st-graph G, as follows: The vertex set of G * is the set of faces of G.For every edge e = (s, t) of G, G * has an edge e * = (f, g) where f = lef t(e) and g = right(e).
Lemma 2 [7] For any two objects o 1 , o 2 ∈ V ∪E of a planar st-graph G, exactly one of the following holds: • G has a directed path from dest(o 1 ) to orig(o 2 ) • G has a directed path from dest(o 2 ) to orig(o 1 ) • G * has a directed path from right(o 1 ) to lef t(o 2 ) • G * has a directed path from right(o 2 ) to lef t(o 1 ) Let S be a set of horizontal non-overlapping closed line segments in the plane.Two segments σ, σ of S are said to be visible if they can be joined by a vertical segment not intersecting any other segment of S. Furthermore, σ and σ are called ε-visible if they can be joined by a vertical band of width ε that does not intersect any other segment of S.
Definition 1 A directed (weak) w-visibility representation for a DAG G consists of mapping each vertex v of G into a horizontal segment σ(v) (called vertex-segment), and each edge (u, v) ∈ E into a vertical segment σ(u, v) (called edge-segment), so that, the vertex-segments do not overlap, and for each edge (u, v) ∈ E the corresponding edge-segment σ(u, v) has its top endpoint on σ(u), its bottom endpoint on σ(v), and it does not cross any other vertex-segment σ(q), q = u, v.  Definition 2 A directed ε-visibility representation for a DAG G is a directed wvisibility representation with the additional property that two vertex-segments are directed ε-visible if and only if the vertex that corresponds to the bottom vertexsegment is adjacent to the vertex that corresponds to the top vertex-segment.
Note that in order to be consistent with the downward representation of DAGs we draw a visibility representation downward whereas in the literature it is drawn upward [8]. Figure 2 shows the main difference between (weak) w-and ε-visibility representations.In w-visibility representation of a DAG G the visibility between two segments does not imply the existence of an edge in G whereas in ε-visibility representation of G two segments are ε-visible if and only if there is an edge between the corresponding vertices.Now consider an arrangement of closed, non-overlapping rectangles in R 3 such that the planes determined by the rectangles are perpendicular to the z-axis, and the sides of the rectangles are parallel to the x-or y-axes.Two rectangles R and R are ε-visible if and only if between the two rectangles there is a closed cylinder C of positive height and radius such that the ends of C are contained in R and R , the axis of C is parallel to the z-axis, and the intersection of C with any other rectangle in the arrangement is empty [5].
Definition 3 [15] A directed three-dimensional ε-visibility representation for a DAG G consists of mapping each vertex v of G into a rectangle R v (called vertex-rectangle), and each edge (u, v) ∈ E into a vertical closed cylinder C of positive length and radius (called edge-cylinder), so that the vertex-rectangles do not overlap, and for each edge (u, v) ∈ E the corresponding edge-cylinder C has its top base on R u , its bottom base on R v , and does not intersect any other vertex-rectangle R q , q = u, v. Additionally, two vertex-rectangles are ε-visible if and only if the vertex that corresponds to the bottom vertex-rectangle is adjacent to the vertex that corresponds to the top vertex-rectangle.In DAGmaps the rectangle of a vertex is included into the union of rectangles of its ancestors.Also the rectangle of an edge is contained in the intersection of the rectangles of its source and destination vertices.
In the following R u denotes the drawing region of a vertex u ∈ V and R e denotes the drawing region of an edge e ∈ E. Definition 4 (DAGmap drawing) A DAGmap drawing of a DAG G = (V, E) with a single source s is a space filling visualization of G that satisfies the following drawing constraints: B1.The vertices and the edges are drawn as rectangles that have positive area.
B2.The rectangle of every non-source vertex u ∈ V is equal to the union of the rectangles of edges incident to B3.The rectangles of edges incident from a non-sink vertex u ∈ V form a partition of the rectangle of Figure 3 shows the main properties of treemaps and of their generalizations which are called DAGmaps.In Definition 4 we require that the rectangles of edges incident from a vertex partition the rectangle associated to the vertex.However the partition property is not required for the edges incident to a vertex.Lemma 3 and Corollary 1 show that constraints B1-B3 imply this partition property.
Lemma 3 In a DAGmap drawing of DAG G = (V, E), if for some pair of edges e 1 , e 2 ∈ E with e 1 = e 2 , it holds that that orig(e 1 ) is not reachable from dest(e 2 ) and orig(e 2 ) is not reachable from dest(e 1 ), then the rectangles R e1 and R e2 do not overlap (i.e., area(R e1 ∩ R e2 ) = 0).
Proof: Assume for a contradiction that there are two edges e 1 , e 2 ∈ E, where e 1 = e 2 , such that orig(e 1 ) is not reachable from dest(e 2 ), orig(e 2 ) is not JGAA, 16(2) 359-380 (2012) 365 reachable from dest(e 1 ) and area(R e1 ∩ R e2 ) > 0. The proof is accomplished by the following recursive procedure which ends after a finite number of steps.
If orig(e 1 ) = orig(e 2 ) from constraint B3 we arrive at a contradiction.For this reason we assume that orig(e 1 ) = orig(e 2 ).Then from constraint B3 we have that ).Now we have three cases.Case 1: If neither orig(e 1 ) nor orig(e 2 ) is the source vertex, then from constraint B2 we have that there is an edge e 1 incident to vertex orig(e 1 ) and an edge e 2 incident to vertex orig(e 2 ) such that area(R e 1 ∩ R e 2 ) > 0. We repeat the above procedure for edges e 1 and e 2 .Case 2: orig(e 1 ) is the source vertex and orig(e 2 ) is a non-source vertex.Then from constraint B2 there exists an edge e 2 incident to vertex orig(e 2 ) such that area(R e1 ∩ R e 2 ) > 0. We repeat the procedure for edges e 1 and e 2 .The third case where orig(e 1 ) is a non-source vertex and orig(e 2 ) is the source vertex is similar to case 2 and we repeat the procedure for vertices e 1 and e 2 .
After a finite number of steps the above procedure ends and we get two edges e k and e l such that area(R e k ∩ R e l ) > 0 and orig(e k ) = orig(e l ) which is a contradiction.

Corollary 1
The rectangles of edges incident to a non-source vertex u ∈ V form a partition of the rectangle of u.
Corollary 2 In a DAGmap drawing of a DAG G the following holds: For every pair of vertices u, v ∈ V if there is no path from u to v or from v to u, then their rectangles R u , R v do not overlap (area(R u ∩ R v ) = 0).
To extend Definition 4 to a DAG G with more than one source, we require that constraints B1, B2 and B3 hold and additionally that the rectangles of the sources form a partition of the available display rectangle.Then we consider DAG G that is obtained by introducing an artificial source s and edges from s to all sources of G.A DAGmap of G can be obtained from a DAGmap of G by assigning the available display rectangle to s and the rectangle R s to each edge (s , s), where s is a source of G. Conversely, a DAGmap of G can be obtained by a DAGmap of G by omitting the rectangle of vertex s and the rectangles of edges incident from s .Therefore we have the following: Lemma 4 DAG G admits a DAGmap if and only if DAG G admits a DAGmap.

One-Dimensional DAGmaps and Directed ε-Visibility Representations
One-dimensional DAGmaps were introduced in [20].They are constructed by partitioning the space only along the vertical direction.We will show that one-dimensional DAGmaps are related to directed ε-visibility representations of DAGs. Figure 4 shows an example of a one-dimensional DAGmap.Since the height of all rectangles is constant, the admissibility and drawing problems are unaffected if instead of the vertex and edge rectangles R q we consider their projections on the horizontal axis.These projections are intervals I q .
From the vertex rectangles (resp.intervals) of a one-dimensional DAGmap we can construct a directed three-dimensional (resp.two-dimensional) ε-visibility representation by assigning to rectangles (resp.intervals) a z-coordinate.The construction is described in Theorem 1 and an example is shown in Fig. 5.In Fig. 5 Proof: Suppose that G admits a one-dimensional DAGmap.From the onedimensional DAGmap we construct a directed ε-visibility representation as follows: We compute an optimal topological numbering Y of G, such that only integer numbers are used and the sources are assigned the number 0. We also compute the length h of the longest path in the DAG.Each interval I u , with u ∈ V of the one-dimensional DAGmap is shifted along the vertical direction and is drawn on the horizontal line with equation y = y(u) = h − Y (u) + • j, where is a small positive number (e.g.0 < <  We will show that edge-segment σ(u, v) does not intersect any other vertexsegment apart from vertex-segments σ(u) and σ(v) at its end points.Suppose for a contradiction that σ(u, v) intersects with vertex-segment σ(q), where q = u, v.
then there is no directed path between q and u and from Corollary 2 it follows that I q does not intersect with I u ⇒ σ(q) does not intersect with σ(u, v) (a contradiction).Similarly if Y (q) = Y (v) then from Corollary 2 it follows that I q does not intersect with I v ⇒ σ(q) does not intersect with σ(u, v) (a contradiction).Therefore the only case that remains is Y (u) < Y (q) < Y (v).The intervals I e , where e = (u, v), and I q overlap since edge-segment σ(u, v) intersects with vertex-segment σ(q).Interval I q is equal to the union of the intervals of edges incident to q.Among those intervals there is one edge interval I e1 that overlaps with edge interval I e .However there is no path from dest(e) = v to orig(e 1 ) or from dest(e 1 ) = q to orig(e) = u since Y (orig(e 1 )) < Y (dest(e)) and Y (orig(e)) < Y (dest(e 1 )).This contradicts Lemma 3. Therefore for each edge (u, v) ∈ E the segment σ(v) is visible from σ(u), which is the condition for directed w-visibility.Moreover σ(v) is directed ε-visible from σ(u), since in the above arguments we can choose ε suitably small and replace the edge-segment σ(u, v) with the vertical visibility band b(u, v) = [µ uv − ε 2 , µ uv + ε 2 ] × [y(v), y(u)] = I ε × I y .Now, suppose that two vertex-segments σ(u) and σ(v), such that Y (u) < Y (v), are ε-visible while (u, v) / ∈ E. From the ε-visibility of σ(u) and σ(v) we have that vertex-segments σ(u) and σ(v) can be joined by a vertical band I ε × I y , where I y = [y(v), y(u)], of width ε that does not intersect any other segment.Let e 1 , e 2 , . . ., e k be the edges incident from u and e 1 , e 2 , . . ., e l be the edges incident to v. From constraint B3 we have: Similarly, from constraint B2 we have: Therefore there is an interval I e ∈ {I e1 , . . ., I e k } such that length(I e ∩ I ε ) = 0. Since I e ∩ I ε ⊂ I v it holds that there is at least one interval I e among {I e 1 , . . ., I e l } such that length(I e ∩I ε ∩I e ) = 0 ⇒ length(I e ∩I e ) = 0. Then from Lemma 3 we have that there is at least one path from dest(e) to orig(e ).Since (u, v) / ∈ E, it follows that any path from u to v has length at least two.Therefore dest(e) = v.If dest(e) = q then I e ⊂ I q ⇒ length(I ε ∩I q ) = 0 ⇒ the vertical band I ε × I y intersects with σ(q) which contradicts the hypothesis that I ε × I y does not intersect any other segment apart from σ(u) and σ(v).We proved that if two vertex segments σ(u) and σ(v), such that Y (u) < Y (v), are ε-visible then (u, v) ∈ E. Therefore vertex segment σ(v) is ε-visible from segment σ(u) if and only if (u, v) ∈ E, which is the condition of directed εvisibility representation.

Directed ε-Visibility Representations and One-Dimensional DAGmaps
Theorem 1 reveals an interesting relationship between one-dimensional DAGmaps and ε-visibility representations.Namely a one-dimensional DAGmap defines an ε-visibility representation of a DAG.The converse of this theorem is even more interesting because a) the problem of visibility representations of a DAG has been thoroughly studied and b) it allows us to characterize the class of DAGs that admit a one-dimensional DAGmap.Before we give the converse of Theorem 1 we will characterize the class of DAGs that admit a directed ε-visibility representation.An equivalent characterization of this class of DAGs was given by Kirkpatrick and Wismath [12].A characterization of the class of (undirected) graphs that admit an ε-visibility representation was given by Tamassia and Tollis [18] and independently by Wismath [22].A characterization of the class of digraphs that admit a (weak) w-visibility representation was given by Di Battista and Tamassia [8].
Theorem 2 [8] A digraph G admits a directed w-visibility representation if and only if G is a subgraph of a planar st-graph.

Directed ε-Visibility Representations and Planar st-Graphs
Let G = (V, E) be a DAG and G = (V , E ) be the DAG that is formed by augmenting DAG G with two vertices s and t and edges from s to all sources of G and edges from all sinks of G to t .Then the following lemma holds.
Lemma 5 If a DAG G admits a directed ε-visibility representation, then DAG G is a planar st-graph.
Proof: Let G be a directed ε-visibility representation for G. Let s 1 , . . ., s k be the sources of G and σ(s 1 ), . . ., σ(s k ) the corresponding segments of G. Similarly, let t 1 , . . ., t l be the sinks of G and σ(t 1 ), . . ., σ(t l ) the corresponding segments of G. From the directed ε-visibility representation G construct a new directed ε-visibility representation G 1 as follows: The segments σ(s 1 ), . . ., σ(s k ) are moved upwards so that all have the same height.Similarly, the segments σ(t 1 ), . . ., σ(t l ) are moved downwards so that all have the same height.In case that two segments intersect at their endpoints then move one of them in the vertical direction by a small amount .Then construct a planar drawing Γ of G by shrinking every vertex-segment of G 1 into a point, and bending the edgesegments in order to maintain the adjacencies.Then add a point s above all vertex points of Γ and join this point with the sources of Γ using straight lines.Similarly, add a point t below all vertex points of Γ and join the sinks of Γ with this point using straight lines (see Fig. 6).Then the new drawing Γ is planar and the vertices s and t are drawn on the boundary of the external face.Therefore st-graph G is planar.Let C w and C ε be the classes of DAGs that admit a directed w-visibility and a directed ε-visibility representation respectively.From the definition of directed ε-visibility representation we have that C ε ⊆ C w .From Theorem 2 and Lemma 5 it follows that C ε is properly included in C w .The converse of Lemma 5 can be proved by constructing a directed εvisibility representation of a planar st-graph.The construction is accomplished by Algorithm 1, which is based on the Algorithm Tessellation [7,19].The input to Algorithm 1 is a planar embedding of DAG G .Note that in order to test for st-planarity and find an appropriate planar embedding of G we add edge (s , t ) and obtain an embedding for the augmented G graph.This edge constrains the embedding such that vertices s and t appear on the boundary of the same face, say the external face.After a planar embedding has been obtained this edge is removed.
Theorem 3 Let G be a planar st-graph with n vertices.Algorithm 1 constructs a directed ε-visibility representation in O(n) time.
Proof: For any pair of vertices u, v ∈ V , the vertex segments σ(u) and σ(v) do not overlap since they have distinct y coordinates.
For each edge e = (u, v) ∈ E, the corresponding maximal visibility band b(e) has its top side on σ(u) since y T (e) = y(u) and x L (u) ≤ x L (e) < x R (e) ≤ x R (u), and its bottom side on σ(v) since y B (e) = y(v) and x L (v) ≤ x L (e) < x R (e) ≤ x R (v).We will show that we can choose a vertical band b (e) ⊂ b(e) of nonzero width that has its top side on σ(u), its bottom side on σ(v), and does not intersect with any other vertex-segment σ(q).For the coordinates of b (e) we choose y B = y B (e) = y(v), y T = y T (e) = y(u), and x L (e) < x L < x R < x R (e).If there is a directed path in G from vertex q to vertex orig(e) or a directed path from dest(e) to q then y(q) > y(u) or y(v) > y(q), respectively.Therefore 2. Compute an optimal topological numbering Y of G such that only integer numbers are used.
3. Compute an optimal topological numbering X of G * .
4. Let be a very small positive number and set j = 0 5.For each vertex u ∈ V , let the coordinates of segment σ(u) be:   vertex segment σ(q) and vertical band b (e) do not intersect.For this we assume that (see Lemma 2) G * either has a directed path from right(e) to lef t(q) or has a directed path from right(q) to lef t(e).Then either x R < x R (e) ≤ x L (q) or x R (q) ≤ x L (e) < x L .In both cases b (e) does not intersect with σ(q).Finally since the topological numbering X is optimal the vertex-segment of a non-sink vertex u is covered by the bottom sides of the maximal visibility bands of edges incident from u. Similarly the vertex-segment of a non-source vertex v is covered by the top sides of the maximal visibility bands of edges incident to v. Therefore vertex-segment σ(v) is ε-visible from vertex-segment σ(u) only if G has an edge (u, v).
The O(n) time bound follows easily since each step of the algorithm can be accomplished in O(n) time.

The construction of Algorithm 1 implies the following lemma:
Lemma 6 If DAG G is a planar st-graph then DAG G admits a directed εvisibility representation.
Proof: Suppose that G is a planar st-graph.Then using Algorithm 1, we construct a directed ε-visibility representation G for G .If we remove the vertexsegments σ(s ) and σ(t ) from G (along with their incident edge-segments) we obtain a directed ε-visibility representation for G.
From Lemmas 5 and 6 we have: Theorem 4 DAG G admits a directed ε-visibility representation if and only if DAG G is a planar st-graph.

Directed ε-Visibility Representations and Downward Planarity
An alternative characterization of directed ε-visibility representation is based on downward (or upward) planarity.Let f be a face of a planar drawing (or embedding) of a digraph G and suppose that the boundary of f is traversed counterclockwise.If e 1 and e 2 are two edges incident to or from a vertex v which are encountered in this order along the boundary of f , the triplet α = (e 1 , v, e 2 ) is called an angle of f .Note that, e 1 and e 2 may coincide if G is not biconnected.Angle α is called a switch of f if e 1 and e 2 are both incoming edges or both outgoing edges of v: in the first case α is also called a sink-switch of f , while in the second case it is a source-switch of f .Therefore, a source-switch (sink-switch) of f is a source (sink) of f .Note that a source-switch (sink-switch) is not necessarily a source (sink) of G.
A downward drawing of a digraph is such that all the edges are represented by directed curves decreasing monotonically in the vertical direction.A digraph has a downward drawing if and only if it is acyclic.A digraph is downward planar if it admits a planar downward drawing.A downward planar digraph also admits a planar downward straight-line drawing [8,11].

JGAA, 16(2) 359-380 (2012) 373
Let Γ be a planar straight-line downward drawing of an embedded downward planar digraph G.We say that a sink t (source s) of G is assigned to face f of Γ if the angle defined by the two edges of f incident on t (s) is greater than π.Clearly, each sink (source) can be assigned only to one face, while an internal vertex is not assigned to any face.For more information of how this intuitive idea of assignment of vertices to faces can be formally expressed as a perfect c-matching problem see [2,3,7].
Lemma 7 If a DAG G admits a directed ε-visibility representation, then there exists a downward planar drawing of G such that all source and sink vertices are assigned to the external face.
Proof: Let G be a directed ε-visibility representation for G. Construct a downward planar drawing of G by shrinking every vertex-segment of G into a point, and bending the edge-segments in order to maintain the adjacencies.Suppose, for a contradiction, that there is a source s that is not assigned to the external face.Since s is assigned to exactly one face, it follows that it is assigned to an internal face f .This means that the angle defined by the two edges of f incident on s is greater than π and therefore s is not the highest point of the boundary of f .Thus in G the vertex-segment σ(s) is ε-visible from at least one other vertex-segment.Therefore s is not a source (a contradiction).The proof for sink vertices is similar.
Lemma 8 If there exists a downward planar drawing of G such that all source and sink vertices are assigned to the external face then G admits a directed ε-visibility representation.
Proof: The downward planar drawing of G can be easily extended to a planar drawing of G .Then from Theorem 4 it follows that G admits a directed εvisibility representation.
From Lemmas 7 and 8 we have the following theorem: Theorem 5 A DAG G admits a directed ε-visibility representation if and only if there exists a downward planar drawing of G such that all source and sink vertices are assigned to the external face.

Characterization of One-Dimensional DAGmaps
We are now in a position to prove the converse of Theorem 1 Theorem 6 If a DAG G = (V, E) admits a directed ε-visibility representation then it admits a one-dimensional DAGmap.
Proof: Suppose that G admits a directed ε-visibility representation.Then we compute a directed ε-visibility representation G of G using Algorithm 1 and from G a directed ε-visibility representation G of G by deleting segments σ(s ) and σ(t ).From the arrangement of the vertex-segments of G we will construct a one-dimensional DAGmap drawing of G. To each vertex-segment σ(u), with u ∈ V we correspond an interval I u by taking its projection on the horizontal axis.For each edge e = (u, v) ∈ E there is exactly one vertical band b of maximal width that has its bottom side on σ(u) its top side on σ(v) and its internal points  8).We will show that these rectangles satisfy the DAGmap drawing constraints.Drawing constraint B1 is clearly satisfied.Constraints B2 and B3 are satisfied due to the optimality of the topological numbering X of G * .
Combining Theorems 1 and 6 we have the following theorem:

DAGmaps and Three-Dimensional ε-Visibility Representations
A treemap determines a three-dimensional ε-visibility representation of a tree T if the vertex rectangles are placed in three dimensional space such that their x and y coordinates are unaltered and their z coordinates are equal to the tree height minus the distance of the corresponding vertices from the root (plus tiny perturbations in order to keep the rectangles disjoint) (see Fig. 9).Similarly, we construct a directed three-dimensional ε-visibility representation of a DAG G by shifting the vertex rectangles of the DAGmap along the vertical direction in such a way that their z-coordinates are determined by an optimal topological numbering of G (plus a perturbation).This construction leads to Theorem 9.The proof of Theorem 9 is similar to the proof of Theorem 1 and therefore is omitted.
Theorem 9 If a DAG G admits a DAGmap, then it admits a directed threedimensional ε-visibility representation.
Notice that the converse of Theorem 9 does not hold as shown in Fig. 10.The DAG of Fig. 10 does not admit a DAGmap due to adjacency constraint violations.Since the edge rectangles form a partition of the rectangles of the origin and destination vertices, then the sink vertices e, f , g, h, i, j constrain the pairs of source vertices {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d} to be drawn in adjacent rectangles.However this configuration is impossible.On the other hand a directed three-dimensional ε-visibility representation is shown on the right side of Fig. 10.
From Theorem 9 and the counter-example of Fig. 10 it follows that the class of DAGs that admit DAGmaps is a proper subset of the class of DAGs that admit directed three-dimensional ε-visibility representations.It is interesting to investigate under what restrictions a directed three-dimensional ε-visibility representation implies a DAGmap.Without loss of generality we focus our analysis on st-graphs.From an st-graph G = (V, E) we construct the st-graph In the augmented graph G 1 each edge of G has the entity of a vertex and corresponds to a rectangle in any visibility representation of G 1 .Additionally we restrict the arrangement of rectangles of a visibility representation of G 1 such that the projections of the rectangles of the source and sink vertices onto the xy-plane are equal to a given rectangle R and that the projections of the Theorem 10 An st-graph G admits a DAGmap if and only if the augmented st-graph G 1 admits a directed three-dimensional ε-visibility representation such that the projections of the rectangles of the source and sink vertices onto the xyplane are equal to a given rectangle R and that the projections of the rectangles of all other vertices are restricted inside R.
Proof: From a DAGmap of an st-graph G it is easy to construct a directed three-dimensional ε-visibility representation of G 1 by setting appropriately the z-coordinates of the vertex and edge rectangles of the DAGmap of G.
Conversely, from the directed three-dimensional ε-visibility representation of G 1 = (V 1 , E 1 ) we will construct a DAGmap of G.For each vertex v ∈ V 1 let P v be the corresponding rectangle in the directed three-dimensional ε-visibility representation and let R v be the projection of P v onto the xy-plane.Now construct a DAGmap of G such that each vertex v ∈ V is assigned the rectangle R v and each edge e ∈ E is assigned the rectangle R e (recall that e is an edge of G but is also a vertex of G 1 and corresponds to a rectangle in the visibility representation).Then constraint B1 is satisfied.We will show that constraints B2 and B3 are also satisfied.First assume that constraint B2 is not satisfied.For this suppose that u is a non-source vertex and that R u is not equal to the union of the rectangles of edges incident to u.Then R u is not covered by the union of the rectangles of edges incident to u or the union of the rectangles of edges incident to u is not covered by R u .If R u is not covered by the union of the rectangles of edges incident to u, then P u is ε-visible from a rectangle P w but (w, u) / ∈ E 1 , which is a contradiction.Note that there is always at least one such rectangle P w since the projection onto the xy-plane of the rectangle of the source vertex of G 1 includes the projection of P u (i.e., R = R s ⊇ R u ).If the union of the rectangles of edges incident to u is not covered by R u then there exists a rectangle P w which is ε-visible from a rectangle P e , where e is a vertex of G 1 and also e is an edge incident to u in G. However (e, w) / ∈ E 1 , which is a contradiction.Note that there is always at least one such rectangle P w since the projection onto the xy-plane of the rectangle of the sink vertex of G 1 includes the projection of P e (i.e., R = R t ⊇ R e ).Therefore R u is equal to the union of the rectangles of edges incident to u and constraint B2 is satisfied.Now, let u be a non-sink vertex.Similarly to the proof of constraint B2 we can show that R u is equal to the union of the rectangles of edges incident from u. Also suppose that there are two edges e 1 , e 2 of G with common origin the vertex u such that area(R e1 ∩ R e2 ) = 0. Then rectangles P e1 and P e2 , where e 1 and e 2 are treated as vertices of G 1 , are either ε-visible or there are rectangles that block the visibility of P e1 and P e2 .The first case leads to contradiction because neither (e 1 , e 2 ) nor (e 2 , e 1 ) is an edge of G 1 .The second case also leads to contradiction because it implies that either P e1 or P e2 is ε-visible from a rectangle P w , w = u.However neither (w, e 1 ) nor (w, e 2 ) is an edge of G 1 .Therefore constraint B3 is also satisfied.
Following the proof of Theorem 10 we construct a directed three-dimensional εvisibility representation of G by removing the rectangles of vertices e ∈ E ⊂ V 1 of the directed three-dimensional ε-visibility representation of G 1 .This visibility representation of G implies a DAGmap of G.

Discussion
In this paper we show that a DAG admits a one-dimensional DAGmap if and only if it admits a directed ε-visibility representation.We also show that a DAGmap can be transformed into a directed three-dimensional ε-visibility representation of the corresponding DAG.The converse does not always hold, as shown in the counter-example of Fig. 10.Theorem 10 reveals two sufficient conditions on the arrangement of the rectangles of a directed three-dimensional ε-visibility representation under which the converse holds.The first condition is the inclusion of all (projected onto the xy-plane) rectangles in the rectangle of the source (resp.sink) of an st-graph.Note that the characterization of the classes of DAGs that admit a three-dimensional ε-visibility representation under the inclusion property is an open problem.The second condition restricts the visible part between any pair of visible rectangles to be a rectangle.When a DAG is proper layered, then this condition is satisfied in any ε-visibility representation with the inclusion property.However, it may not be satisfied when a DAG has edges that span more than two layers.Therefore, a second open problem is the characterization of the classes of DAGs that comply to both conditions and for whom the converse of Theorem 9 is true.

Figure 1 :
Figure 1: (a) A DAG G and two DAGmaps of G.

Figure 2 :
Figure 2: Visibility representations of a DAG G. (b) w-visibility representation of G. (c) ε-visibility representation of G. Segments 2 and 3 block the visibility between segments 1 and 4 without being ε-visible to each other.

Figure 3 :
Figure 3: Illustration of the main properties of DAGmaps.(a) In treemaps the rectangle of a child vertex is included into the rectangle of its parent vertex.(b)In DAGmaps the rectangle of a vertex is included into the union of rectangles of its ancestors.Also the rectangle of an edge is contained in the intersection of the rectangles of its source and destination vertices.

Figure 4 :
Figure 4: An example of a one-dimensional DAGmap drawing of a DAG G.The hierarchy structure is visualized via nesting along the vertical direction.

Theorem 1
Figure 4  shows an example of a one-dimensional DAGmap.Since the height of all rectangles is constant, the admissibility and drawing problems are unaffected if instead of the vertex and edge rectangles R q we consider their projections on the horizontal axis.These projections are intervals I q .From the vertex rectangles (resp.intervals) of a one-dimensional DAGmap we can construct a directed three-dimensional (resp.two-dimensional) ε-visibility representation by assigning to rectangles (resp.intervals) a z-coordinate.The construction is described in Theorem 1 and an example is shown in Fig.5.In Fig.5(b) the rectangles of a one-dimensional DAGmap of the DAG of Fig. 5(a) are shown.The directed three-dimensional ε-visibility representation that is constructed from these rectangles is shown in Fig. 5(c).The corresponding directed (two-dimensional) ε-visibility representation is shown in Fig. 5(d).The segments of Fig. 5(d) are the projections of the rectangles of Fig. 5(c) onto the xz-plane.Theorem 1 If a DAG G = (V, E) admits a one-dimensional DAGmap then it admits a directed ε-visibility representation.

Figure 5 :
Figure 5: An example of the construction of Theorem 1.(a) A DAG G. (b) The rectangles of a one-dimensional DAGmap of G. (c) The constructed threedimensional directed ε-visibility representation of G, and (d) the corresponding directed ε-visibility representation of G.

(Figure 6 :
Figure 6: An example of the construction of Lemma 5.

Algorithm 1 1 .
Directed ε-visibility representation Input: a planar st-graph G = (V, E) Output: a) a directed ε-visibility representation G of G b) visibility bands of maximal width between segments s(u) and s(v) for every (u, v) ∈ E Construct the planar st-graph G * .
ε-visibility representation of G and maximal visibility bands

Figure 7 :
Figure 7: Example of a run of Algorithm 1. Planar st-graphs G and G * are labeled by topological numberings Y and X, respectively.
do not intersect with any other segment.The coordinates of b are calculated by Algorithm 1.The edge rectangle I e is equal to the projection of b on the horizontal axis.Therefore we construct intervals {I u | u ∈ V } and {I e | e ∈ E}.With these intervals we can construct rectangles {R u = I u × I width | u ∈ V } and {R e = I e × I width | e ∈ E} with sides aligned to xy-axes and fixed vertical coordinates of their corners (see Fig.

Figure 9 :Figure 10 :
Figure 9: A tree T , a treemap of T and a three-dimensional ε-visibility representation of T that is constructed from the treemap of T