Visibility Representations of Boxes in 2.5 Dimensions
Alessio Arleo, Carla Binucci, Emilio Di Giacomo, William S. Evans, Luca Grilli, Giuseppe Liotta, Henk Meijer, Fabrizio Montecchiani, Sue Whitesides, Stephen Wismath
VVisibility Representations of Boxes in 2.5Dimensions (cid:63)
Alessio Arleo , Carla Binucci , Emilio Di Giacomo , William S. Evans , LucaGrilli , Giuseppe Liotta , Henk Meijer , Fabrizio Montecchiani ,Sue Whitesides , and Stephen Wismath Universit`a degli Studi di Perugia, Italy, [email protected] { carla.binucci, emilio.digiacomo, luca.grilli, giuseppe.liotta,fabrizio.montecchiani } @unipg.it University of British Columbia, Canada, [email protected] University College Roosevelt, the Netherlands, [email protected] University of Victoria, Canada, [email protected] University of Lethbridge, Canada, [email protected]
Abstract.
We initiate the study of 2.5D box visibility representations(2.5D-BR) where vertices are mapped to 3D boxes having the bottomface in the plane z = 0 and edges are unobstructed lines of sight parallelto the x - or y -axis. We prove that: ( i ) Every complete bipartite graphadmits a 2.5D-BR; ( ii ) The complete graph K n admits a 2.5D-BR if andonly if n (cid:54)
19; ( iii ) Every graph with pathwidth at most 7 admits a 2.5D-BR, which can be computed in linear time. We then turn our attentionto 2.5D grid box representations (2.5D-GBR) which are 2.5D-BRs suchthat the bottom face of every box is a unit square at integer coordinates.We show that an n -vertex graph that admits a 2.5D-GBR has at most4 n − √ n edges and this bound is tight. Finally, we prove that decidingwhether a given graph G admits a 2.5D-GBR with a given footprint isNP-complete. The footprint of a 2.5D-BR Γ is the set of bottom facesof the boxes in Γ . A visibility representation (VR) of a graph G maps the vertices of G to non-overlapping geometric objects and the edges of G to visibilities , i.e., segmentsthat do not intersect any geometric object other than at their end-points. De-pending on the type of geometric objects representing the vertices and on therules used for the visibilities, different types of representations have been studiedin computational geometry and graph drawing.A bar visibility representation (BVR) maps the vertices to horizontal seg-ments, called bars , while visibilities are vertical segments. BVRs were introducedin the 80s as a modeling tool for VLSI problems [18, 29, 30, 36–38]. The graphs (cid:63) Research started at the 2016 Bertinoro workshop on Graph Drawing. Research sup-ported in part by NSERC, and by MIUR project AMANDA prot. 2012C4E3KT 001. a r X i v : . [ c s . C G ] A ug hat admit a BVR are planar and they have been characterized under variousmodels [18, 30, 36, 38].Extensions and generalizations of BVRs have been proposed in order to en-large the family of representable graphs. In a rectangle visibility representation(RVR) the vertices are axis-aligned rectangles, while visibilities are both hor-izontal or vertical segments [4, 7, 12, 14, 15, 25, 31, 33]. RVRs can exist only forgraphs with thickness at most two and with at most 6 n −
20 edges [25]. Recog-nizing these graphs is NP-hard in general [31] and can be done in polynomialtime in some restricted cases [4, 33]. Generalizations of RVRs where orthogo-nal shapes other than rectangles are used to represent the vertices have beenrecently proposed [17, 28]. Another generalization of BVRs are bar k -visibilityrepresentations ( k -BVRs) , where each visibility segment can “see” through atmost k bars. Dean et al. [13] proved that the graphs admitting a 1-BVR haveat most 6 n −
20 edges. Felsner and Massow [22] showed that there exist graphswith a 1-BVR whose thickness is three. The relationship between 1-BVRs and1-planar graphs has also been investigated [1, 9, 19, 34].RVRs are extended to 3D space by
Z-parallel Visibility Representations (ZPR) ,where vertices are axis-aligned rectangles belonging to planes parallel to the xy -plane, while visibilities are parallel to the z -axis. Bose et al. [8] proved that K admits a ZPR, while K does not. ˇStola [32] subsequently reduced the upperbound on the size of the largest representable complete graph by showing that K does not admits a ZPR. Fekete et al. [20] showed that K is the largest com-plete graph that admits a ZPR if unit squares are used to represent the vertices.A different extension of RVRs to 3D space are the box visibility representations(BR) where vertices are 3D boxes, while visibilities are parallel to the x -, y - and z - axis. This model was studied by Fekete and Meijer [21] who proved that K admits a BR, while K does not.In this paper we introduce where vertices are 3D boxes whose bottom faces lie in the plane z = 0 andvisibilities are parallel to the x - and y -axis. Like the other 3D models that usethe third dimension, 2.5D-BRs overcome some limitations of the 2D models. Forexample, graphs with arbitrary thickness can be realized. In addition 2.5D-BRsseem to be simpler than other 3D models from a visual complexity point of viewand have the advantage that they can be physically realized, for example by 3Dprinters or by using physical boxes. Furthermore, this type of representation canbe used to model visibility between buildings of a urban area [11]. The mainresults of this paper are as follows. – We show that every complete bipartite graph admits a 2.5D-BR (Section 3).This implies that there exist graphs that admit a 2.5D-BR and have arbitrarythickness. – We prove that the complete graph K n admits a 2.5D-BR if and only if n (cid:54) n (cid:54)
19 vertices admits a 2.5D-BR. – We describe a technique to construct a 2.5D-BR of every graph with path-width at most 7, which can be computed in linear time (Section 4).2
We then study ( ) which are 2.5D-BRs such that the bottom face of every box is a unit square with cornersat integer coordinates (Section 5). We show that an n -vertex graph thatadmits a 2.5D-GBR has at most 4 n − √ n edges and that this bound istight. It is worth remarking that VRs where vertices are represented witha limited number of shapes have been investigated in the various models ofvisibility representations. Examples of these shape-restricted VRs are unitbar VRs [16], unit square VRs [12], and unit box VRs [21]. – Finally, we prove that deciding whether a given graph G admits a 2.5D-GBR with a given footprint is NP-complete (Section 5). The footprint of a2.5D-BR Γ is the set of bottom faces of the boxes in Γ .For reasons of space, some proofs and details are omitted and can be found inthe appendix. A box is a six-sided polyhedron of non-zero volume with axis-aligned sides ina 3D Cartesian coordinate system. In a ( ) thevertices are mapped to boxes that lie in the non-negative half space z (cid:62) z = 0, while each edge is mapped to a visibility (i.e. a segment whose endpoints lie in faces of distinct boxes and whose interiordoes not intersect any box) parallel to the x - or to the y -axis. We remark thatvisibilities between non-adjacent objects may exist, i.e., we adopt the so called weak visibility model (in the strong visibility model each visibility between twogeometric objects corresponds to an edge of the graph). The weak model seemsto be the most effective when representing non-planar graphs and it has beenadopted in several works (see e.g. [4, 9, 19]). As in many papers on visibilityrepresentations [21, 26, 33, 35, 38], we assume the (cid:15) -visibility model , where eachsegment representing an edge is the axis of a positive-volume cylinder that inter-sects no box except at its ends; this implies that an intersection point between avisibility and a box belongs to the interior of a box face. In what follows, whenthis leads to no confusion, we shall use the term edge to indicate both an edgeand the corresponding visibility, and the term vertex for both a vertex and thecorresponding geometric object.Given a box b of a 2.5D-BR, the face that lies in the plane z = 0 is called the footprint of b . The intersection of the plane z = 0 with a 2.5D-BR Γ is called the footprint of Γ and is denoted by Γ . In other words, the footprint of a 2.5D-BR Γ consists of the footprint of all the boxes in Γ . If Γ is a 2.5D-BR of a completegraph then its footprint Γ satisfies a trivial necessary condition (throughout thepaper we will refer to this condition as NC ): for every pair of boxes b and b of Γ , there must exist a line (cid:96) (in the plane z = 0) such that ( i ) (cid:96) passes throughthe footprints of b and b , and ( ii ) (cid:96) is either parallel to the x -axis or to the y -axis. A ( ) is a 2.5D-BR such that everybox has a footprint that is a unit square with corners at integer coordinates.3wo boxes see each other if there exists a visibility between them; we saythat they see each other above another box b , if there exists a visibility betweenthem and the projection of this visibility on the plane z = 0 intersects theinterior of the footprint of b . Notice that this implies that the two boxes areboth taller than b . We say that two boxes have a ground visibility or are groundvisible if there exists a visibility between their footprints, i.e. if there exists anunobstructed axis-aligned line segment connecting their footprints. If two boxesare ground visible then they see each other regardless of their heights and theheights of the other boxes. Let G be a graph, let Λ be a collection of boxes eachlying in the non-negative half space z (cid:62) z = 0, suchthat the boxes of Λ are in bijection with the vertices of G . Note that Λ may notbe a 2.5D-BR of G . For a vertex v of G , Λ ( v ) denotes the corresponding box in Λ , while h ( Λ ( v )), or simply h ( v ), indicates the height of this box. For a subset S ⊂ V ( G ), Λ ( S ) denotes the subset of boxes associated with S , while Λ ( S )is the footprint of Λ ( S ). Let G [ S ] be the subgraph of G induced by S . We saythat Λ ( S ) is a 2.5D-BR of G [ S ] in Λ , if for any edge ( u, v ) of G [ S ] there exists avisibility in Λ between Λ ( u ) and Λ ( v ); that is, the visibility is not destroyed bythe presence of the other boxes in Λ . In this section we consider 2.5D-BRs of complete graphs and complete bipartitegraphs.
Theorem 1.
Every complete bipartite graph admits a 2.5D-BR.Proof.
Let K m,n be a complete bipartite graph. We represent the m vertices inthe first partite set with m boxes a , a , . . . , a m − such that box a i has a footprintwith corners at (2 i, , i + 1 , , i, n − ,
0) and (2 i + 1 , n − ,
0) andheight m − i . Then we represent the n vertices in the second partite set with n boxes b , b , . . . , b n − such that box b j has a footprint with corners at (2 m, j, m + 1 , j, m, j + 1 ,
0) and (2 m + 1 , j + 1 ,
0) and height m . Considernow a box a i and a box b j . By construction a i and b j see each other above allboxes a l with l > i . (cid:117)(cid:116) A consequence of Theorem 1 is that there exist graphs with unbounded thick-ness that admit a 2.5D-BR. This contrasts with other models of visibility rep-resentations (e.g., k -BVRs, and RVRs), which can only represent graphs withbounded thickness.We now prove that the largest complete graph that admits a 2.5D-BR is K .We first show that given a 2.5D-BR of a complete graph there is one line parallelto the x -axis and one line parallel to the y -axis whose union intersect all boxesand such that each of them intersects at most 10 boxes. This implies that therecan be at most 20 boxes in a 2.5D-BR of a complete graph. We then show thatthere must be a box that is intersected by both lines, thus lowering this bound to19. We finally exhibit a 2.5D-BR of K . We start with some technical lemmas.The proof of the next one can be found in Appendix A.4 emma 1. Let G be an n -vertex graph that admits a 2.5D-BR Γ (cid:48) . Then thereexists a 2.5D-BR Γ of G such that every box of Γ has a distinct integer heightin the range [1 , n ] and the footprint of Γ is the same as that of Γ (cid:48) . The following lemma is proved in [27, Obervation 1]; we give an alternativeproof in Appendix A. Given an axis-aligned rectangle r in the plane z = 0, wedenote by x ( r ) the x -extent of r and by y ( r ) the y -extent of r , so r = x ( r ) × y ( r ). Lemma 2. [27]
For every arrangement R of n axis-aligned rectangles in theplane such that for all a, b ∈ R , either x ( a ) ∩ x ( b ) (cid:54) = ∅ or y ( a ) ∩ y ( b ) (cid:54) = ∅ , thereexists a vertical and a horizontal line whose union intersects all rectangles in R . The following lemma is similar to the Erd˝os–Szekeres lemma and can beproved in a similar manner [20]. A sequence of distinct integers is unimaximal ifno element of the sequence is smaller than both its predecessor and successor.
Lemma 3. [20]
For all m > , in every sequence of (cid:0) m (cid:1) + 1 distinct integers,there exists at least one unimaximal sequence of length m . Given a 2.5D-BR Γ and a line (cid:96) parallel to the x -axis or to the y -axis, we saythat (cid:96) stabs a set of boxes B of Γ if it intersects the interior of the footprints ofeach box in B . Let b , b , . . . , b h be the boxes of B in the order they are stabbedby (cid:96) . We say that B has a staircase layout , if h ( b i ) > h ( b i − ) for i = 2 , , . . . , h . Lemma 4.
In a 2.5D-BR of a complete graph no line parallel to the x -axis orto the y -axis can stab five boxes whose heights, in the order in which the boxesare stabbed, form a unimaximal sequence.Proof. Assume, as a contradiction, that there exists a line (cid:96) parallel to the x -axisor to the y -axis that stabs 5 boxes b , . . . , b whose heights form a unimaximalsequence in the order in which the boxes are stabbed by (cid:96) . Let r i be the footprintof box b i (with 1 (cid:54) i (cid:54) b i and b j (with 1 (cid:54) i < j (cid:54) j = i + 1 this is clearly true.Suppose then that j (cid:54) = i + 1. If b i and b j do not have a ground visibility, thenthey must see each other above b l with i < l < j , i.e., the height of b i and of b j must be larger than the height of b l , which is impossible because the sequenceof heights is unimaximal. Thus, for every pair of boxes b i and b j there must bea ground visibility. Since b i and b j are both stabbed by (cid:96) , this visibility mustbe parallel to (cid:96) . This implies that the left sides (if (cid:96) is parallel to the x -axis) orthe bottom sides (if (cid:96) is parallel to the y -axis) of rectangles r , r , r , r , r forma bar visibility representation of K , which is impossible because bar visibilityrepresentations exist only for planar graphs [23]. (cid:117)(cid:116) Lemma 5.
In a 2.5D-BR of a complete graph no line parallel to the x -axis orto the y -axis can stab more than boxes.Proof. Let Γ be a 2.5D-BR of a complete graph K n . By Lemma 1 we can assumethat all boxes have distinct integer heights. Suppose, as a contradiction, that5here exists a line (cid:96) parallel to the x -axis or to the y -axis that stabs k > h , h , . . . , h k be the heights of the stabbed boxes in the order inwhich the boxes are stabbed by (cid:96) . By Lemma 3 this sequence of heights containsa unimaximal sequence of length 5, but this is impossible by Lemma 4. (cid:117)(cid:116) Lemma 6.
A complete graph admits a 2.5D-BR only if it has at most ver-tices.Proof. Let Γ be a 2.5D-BR of a complete graph K n (for some n > Γ have distinct heights. The footprint Γ of Γ is an arrangement of rectangles that satisfies Lemma 2. Thus there exista line (cid:96) h parallel to the x -axis and a line (cid:96) v parallel to the y -axis that togetherstab all boxes of Γ . By Lemma 5, both (cid:96) h and (cid:96) v can stab at most 10 boxes each.This means that the number of boxes (and therefore the number of vertices of K n ) is at most 20. We now prove that if (cid:96) h and (cid:96) v both stab ten boxes, theremust be one box that is stabbed by both (cid:96) h and (cid:96) v , which implies that thenumber of boxes in Γ is at most 19.Suppose, for a contradiction, that p = (cid:96) h ∩ (cid:96) v does not lie in a box. Referto Figure 1(a) for an illustration. Denote by T the set of boxes stabbed by (cid:96) v that are above p and by B be the set of boxes stabbed by (cid:96) v that are below p .Analogously, denote by L the set of boxes stabbed by (cid:96) h that are to the left of p and by R the set of boxes stabbed by (cid:96) h that are to the right of p . Each of thesesets can be empty but | T | + | B | = 10 and | L | + | R | = 10. Denote by l , l , . . . , l | L | the set of boxes in L from right to left, i.e., l is the box closest to p . Analogously,denote by r , r , . . . , r | R | the boxes of R from left to right ( r is the closest to p ), by t , t , . . . , t | T | the boxes of T from bottom to top ( t is the closest to p )and by b , b , . . . , b | B | the boxes of B from top to bottom ( b is the closest to p ).Let f T , f B , f L , and f R be the footprints of t , b , l , and r , respectively. Let (cid:96) X be the line containing the side of f X that is closest to p and let (cid:96) (cid:48) X be theline containing the opposite side of f X (for every X ∈ { T, B, L, R } ).We first claim that for each f X there exists a line (cid:96) Y (with X, Y ∈ {
T, B, L, R } and Y (cid:54) = X ) that intersects the interior of f X . Suppose, for a contradiction, thatthis is not true for at least one f X , say f L ; that is, the interior of f L is notintersected by (cid:96) T and (cid:96) B . If so, there must be a line (cid:96) parallel to the y -axis thatintersects all the rectangles in T ∪ B and f L ; otherwise the necessary conditionNC does not hold for T ∪ B ∪ { l } . But then (cid:96) would stab eleven boxes, whichis impossible by Lemma 5. Thus, our claim holds and the four rectangles f X areplaced so that (cid:96) T , (cid:96) R , (cid:96) B , and (cid:96) L stab f R , f B , f L , and f T (or, symmetrically, f L , f T , f R , and f B , which follows a symmetric argument), respectively, as inFigure 1(a).We consider now the sets T , B , L , and R . For each set there are two possibleconfigurations. Consider the set B and the line (cid:96) (cid:48) L . If the set B (cid:48) = B \ { b } contains a box b j whose footprint is completely to the right of (cid:96) (cid:48) L , we say that B has configuration A (see Figure 1(b)). In the case of configuration A, thefootprint of all boxes in L (cid:48) = L \ { l } must extend below the line (cid:96) (cid:48) B (otherwisethe necessary condition NC does not hold for L (cid:48) ∪ { b j } ). This implies that y ( f B )6 v ‘ h p‘ T ‘ B ‘ L ‘ R l b r ‘ B ‘ T t ‘ L ‘ R (a) ‘ v ‘ h p‘ B ‘ L ‘ B ‘ L pl b b j l l l (b) ‘ v ‘ h p‘ B ‘ L ‘ B ‘ L pl b b b (c) Fig. 1: (a) Placement of the four rectangles f T , f R , f B , and f L . (b) ConfigurationA for the boxes of set B . (c) Configuration B for the boxes of set B . The arrowintersects the boxes that must have a staircase layout.is contained in y ( l i ) for all i (cid:62)
2. The only possibility for b to see all these boxesis that L (cid:48) has a staircase layout (with l being the shortest box) and b is tallerthan the second tallest one. So, configuration A for the set B implies that L (cid:48) has a staircase layout. If all boxes of B (cid:48) have a footprint that extends to the leftof (cid:96) (cid:48) L , we say that B has configuration B (see Figure 1(c)). In this case, x ( f L ) iscontained in x ( b i ) for all i (cid:62)
2. Again, the only possibility for l to see all theseboxes is that B (cid:48) has a staircase layout and that l is taller than the second tallestone. So, configuration B for the set B implies that B (cid:48) has a staircase layout. Thedefinitions of configurations A and B for T , L , R are similar to those for B andarise by considering lines (cid:96) (cid:48) R , (cid:96) (cid:48) T , (cid:96) (cid:48) B , respectively.For any two sets X and Y that are consecutive in the cyclic order T , R , B , L , either X (cid:48) or Y (cid:48) has a staircase layout (depending on whether X hasconfiguration A or B). This implies that either B (cid:48) and T (cid:48) have both a staircaselayout or L (cid:48) and R (cid:48) have both a staircase layout. Suppose that B (cid:48) and T (cid:48) have astaircase layout (the case when L (cid:48) and R (cid:48) have a staircase layout is analogous).If either | B (cid:48) | (cid:62) | T (cid:48) | (cid:62) (cid:96) v stabs at least five boxes whose heights forma unimaximal sequence, which is impossible by Lemma 4. Thus | B (cid:48) | = 4 and | T (cid:48) | = 4 (recall that | B (cid:48) | + | T (cid:48) | = 8). Since all boxes of Γ have distinct heights,either h ( b ) < h ( t ) or h ( t ) < h ( b ). In the first case (cid:96) v stabs the five boxes t , t , t , t , b whose heights form a unimaximal sequence, which is impossible byLemma 4. In the other case (cid:96) v stabs the five boxes b , b , b , b , t whose heightsform a unimaximal sequence, which is impossible by Lemma 4. (cid:117)(cid:116) We conclude this section by exhibiting a 2.5D-BR of K , illustrated in Fig-ure 2. To prove the correctness of the drawing the idea is to partition the vertexset of K into five subsets (shown in Figure 2) and prove that all boxes in agiven set see all other boxes (details are in Appendix A). The following theoremholds. Theorem 2.
A complete graph K n admits a 2.5D-BR if and only if n (cid:54) . t t t t r r r r b b b l l l c c c c c b y xz Fig. 2: Illustration of a 2.5D-BR of K , the footprint is represented by a 2Ddrawing in the plane z = 0, while the heights of boxes are indicated by integerlabels. The five rectangles with thick sides represent the partitioning of V ( K )into five subsets. A graph G with pathwidth p is a subgraph of a graph that can be constructedas follows. Start with the complete graph K p +1 and classify all its vertices as active . At each step, a vertex is deactivated and a new active vertex is introducedand joined to all the remaining active vertices. The order in which vertices areintroduced is given by a normalized path decomposition , which can be computedin linear time for a fixed p [24]. For a definition of normalized path decompositionsee Appendix B. Theorem 3.
Every n -vertex graph with pathwidth at most admits a 2.5D-BR,which can be computed in O ( n ) time.Proof. We describe an algorithm to compute a 2.5D-BR of a graph G withpathwidth 7. The algorithm is based on the use of eight groups of rectangles, a8 , r , r , r ,n . . . r , r , r , r ,n . . .r , r , r , r ,n . . .r , r , r , r ,n . . . r , r , r , r , n ... r , r , r , r , n ... r , r , r , r , n ... r , n r , r , r , ... n n + 112 n n + n + n + n + α , α , α , α , α , α , z xy α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , α , Fig. 3: Construction of a 2.5D-BR for a graph with pathwidth 7.subset of which will form the footprint of the 2.5D-BR of G . For graphs withpathwidth p <
7, the same algorithm can be applied by considering only p + 1groups, arbitrarily chosen.The eight groups are defined in the plane z = 0 and have n rectangles eachdenoted as r h, , r h, , . . . , r h,n (1 (cid:54) h (cid:54) h = 5 , , , central groups . A vertex whosefootprint is r h,k will be called a vertex of group h (1 (cid:54) h (cid:54) v , v , . . . , v n be the vertices of G in the order given by a normalized pathdecomposition. We denote by G i the subgraph of G induced by { v , v , . . . , v i } .We create a collection of boxes by adding one box per step; at step i we adda box to represent the next vertex v i to be activated. We denote the collectionof the first i boxes as Λ i and we prove that Λ i satisfies the following invariant(I1): Λ i is a 2.5D-BR of G i such that for any pair of boxes of group j and9 (1 (cid:54) j, k (cid:54)
8) that represent vertices that are adjacent in G i , there existsa visibility whose projection in the plane z = 0 is inside the region α j,k . Theregions α j,k are highlighted in Figure 3 as dashed regions.The initial eight active vertices v , v , . . . , v are represented by boxes whosefootprints are r , , r , , . . . , r , , respectively. The heights are set as follows: h ( v h ) = ( h − · n + 1, for h = 1 , , ,
4, and h ( v h ) = 4 n + 1 for h = 5 , , ,
8. Theinitial eight vertices are shown in Figure 3 as white rectangles whose heights areshown inside them. Λ satisfies invariant I1 thanks to the visibilities shown inFigure 3.Assume now that Λ i − ( i >
8) satisfies invariant I1 and let v j be the vertex tobe deactivated (for some j < i ). Assume that v j belongs to group h (1 (cid:54) h (cid:54) v i is represented as a box with footprint r h,i and height h ( v i ) = h ( v j ) + 1,if h ∈ { , , , , , } , or h ( v i ) = h ( v j ) −
1, if h ∈ { , } . If the group of v i isa central group, we increase by one unit the height of all the active vertices ofthe other central groups. Notice that the heights of the vertices of group h , for h (cid:54)
4, are in the range [( h − · n + 1 , h · n ], while the heights of the remainingvertices are greater than 4 n .We now prove that Λ i satisfies invariant I1 by showing that the addition of v i does not destroy any existing visibility and that Λ i ( v i ) sees all the other activevertices inside the appropriate regions. We have different cases depending on thegroup h of v i .– h = 1 or h = 2 . The box Λ i ( v i ) only intersects the regions α h (cid:48) , , with h (cid:48) (cid:54) = 2.Thus, the only visibilities that could be destroyed are those inside these re-gions. The visibilities in the regions α , , α , , α , , α , , α , , and α , are notdestroyed by the addition of v i because the boxes representing the vertices ofgroup 2 are taller than the box representing v i and so are the boxes of any group h (cid:48) with h (cid:48) >
2. The existing visibilities in the region α , are not destroyedbecause r h,i is short enough (in the x -direction) so that the existing boxes ofgroups 1 and 2 can still see each other in region α , . So, no visibility is destroyedfor the vertices of group 2. The box Λ i ( v i ) sees the box of the active vertex ofgroup 1 or 2 via a ground visibility in region α , and it sees the boxes of allthe other active vertices inside the region α h (cid:48) , , with h (cid:48) >
2, above the boxes ofgroup 1 (which are all shorter than it).– h = 3 or h = 4 . The proof of this case can be found in Appendix B.– h = 5 or h = 6 . The box Λ i ( v i ) only intersect the regions α h,h (cid:48) , with h (cid:48) ∈{ , , , } and h (cid:48) (cid:54) = h . However, it does not intersect any existing visibility insidethese regions and therefore the addition of Λ i ( v i ) does not destroy any existingvisibility. The box Λ i ( v i ) sees the active vertices of groups 1 and 2 inside α h,k (with h = 5 or 6, and k = 1 ,
2) and above the boxes of group 1. The activevertices of groups 3 and 4 are seen inside α h,k (with h = 5 or 6, and k = 3 , α h,k (with h = 5 or 6, and k >
4) and above the boxes of group h . Recall that the active vertices of the central groups have been raised to havethe same height as Λ i ( v i ) (which is larger than the height of any other box inthe central groups). 10 h = 7 or h = 8 . The proof of this case can be found in Appendix B.The above construction can be done in O ( n ) time. Since the normalized pathdecomposition can be computed in O ( n ) time, the time complexity follows. (cid:117)(cid:116) Next we give a tight bound on the edge density of graphs admitting a 2.5D-GBR. The proof, which appears in Appendix C, is based on the fact that a setof aligned (unit square) boxes induces an outerplanar graph. A square grid ofboxes gives the bound.
Theorem 4.
Every n -vertex graph that admits a 2.5D-GBR has at most n − √ n edges, and this bound is tight. In the next theorem we prove that deciding whether a given graph ad-mits a 2.5D-GBR with a given footprint is NP-complete. We call this prob-lem 2.5D-GBR-WITH-GIVEN-FOOTPRINT (2.5GBR-WGF). The reductionis from HAMILTONIAN-PATH-FOR-CUBIC-GRAPHS (HPCG), which is theproblem of deciding whether a given cubic graph admits a Hamiltonian path [2].
Theorem 5.
Deciding whether a given graph G admits a 2.5D-GBR with agiven footprint is NP-complete, even if G is a path.Proof sketch: We first prove that 2.5GBR-WGF is in NP. A candidate solutionconsists of a mapping of the vertices of G to the squares of the given footprintand a choice of the heights of the boxes. By Lemma 1 we can assign to each boxan integer height in the set { , , . . . , n } . Thus the size of a candidate solutionis polynomial in the size of the input graph. Given a candidate solution, we cantest in polynomial time whether all edges of G are realized as visibilities. Thus,the problem is in NP.We now describe a reduction from the HPCG problem. Let G H be an instanceof the HPCG problem, i.e. a cubic graph, with n H vertices and m H edges. Wecompute an orthogonal grid drawing Γ H of G H such that every edge has exactlyone bend and no two vertices share the same x - or y -coordinate. Such a drawingalways exists and can be computed in polynomial time with the algorithm byBruckdorfer et al. [10]. We now use Γ H as a trace to construct an instance (cid:104) G, F (cid:105) of the 2.5GBR-WGF problem, where G is a path and F a footprint, i.e, a setof squares. G is a path with 4 n H + m H vertices and therefore F will contain4 n H + m H squares. The footprint F is constructed as follows. Γ H is scaled up by afactor of four. In this way, every two vertices/bends are separated by at least fourgrid units. Each vertex v of Γ H is replaced by a set S ( v ) of four unit squares. Inparticular if vertex v has coordinates (4 x, y ) in Γ H , then it is replaced by thefollowing four unit squares: S ( v ) whose bottom-right corner has coordinates(4 x, y ), S ( v ) whose bottom-right corner has coordinates (4 x + 2 , y ), S ( v )whose bottom-right corner has coordinates (4 x, y − S ( v ) whose bottom-right corner has coordinates (4 x + 2 , y − e a) (b) (c) Fig. 4: (a) An orthogonal drawing of a cubic graph. (b) Construction of thefootprint. Black (gray) squares are vertex (edge) squares. (c) The constructedfootprint.incident to a vertex v , one of the four squares in S ( v ). If e enters v from West,North, South, or East, the square associated with e is S ( v ), S ( v ), S ( v ), or S ( v ), respectively. Let ( u, v ) be an edge of Γ H and let S i ( u ) and S j ( v ) (1 (cid:54) i, j (cid:54)
4) be the squares associated with ( u, v ). The bend of e = ( u, v ) is replacedby a unit square S e horizontally/vertically aligned with S i ( u ) and S j ( v ). Theset of squares replacing the vertices of Γ H , which will be called vertex squares in the following, together with the set of squares replacing the bends, which willbe called edge squares in the following, form the footprint F . Figure 4 shows anorthogonal drawing of a cubic graph and the corresponding footprint F . Observethat the footprint F is such that any two squares are separated by at least oneunit and in each row/column there are at most three squares. Let F ∗ be a graphwith a vertex for each square in F and an edge between two squares if and onlyif the two squares are horizontally or vertically aligned. It can be proved that G H admits a Hamiltonian path if and only if F ∗ contains a Hamiltonian path,see Appendix C.Consider the instance (cid:104) G, F (cid:105) of the 2.5GBR-WGF problem, where G is apath. We prove that G admits a 2.5D-GBR with footprint F if and only if F ∗ admits a Hamiltonian path. Every graph that can be represented by a 2.5D-GBRwith footprint F is a spanning subgraph of F ∗ (because F ∗ has all possible edgesthat can be realized as visibilities in a 2.5D-GBR with footprint F ). Thus, if G admits a 2.5D-GBR with footprint F , then G is a Hamiltonian path of F ∗ (recallthat G is a path). Suppose now that F ∗ has a Hamiltonian path H ∗ . We showthat we can choose the heights of the squares in F so that the resulting boxesform a 2.5D-GBR of G . Recall that in each row/column of F there are at mostthree squares. If an edge connects two squares that are consecutive along a rowor column, then any choice of the heights is fine. If an edge connects the first andthe last square of a row/column, then the heights of these two squares must belarger than the height of the square in the middle. We assign the heights to onesquare per step, in the order in which they appear along H ∗ . We assign to thefirst square a height equal to the number of squares (i.e., 4 n H + m H ). Let h be12he height assigned to the current square S and let S (cid:48) be the next square along H ∗ . If S and S (cid:48) are consecutive along a row/column then the height assigned to S (cid:48) is h . If S and S (cid:48) are the first and the last square of a row/column then theheight assigned to S (cid:48) is h . If S is the first/last square of a row/column and S (cid:48) is the middle square of the same row/column, then the height assigned to S (cid:48) is h −
1. If S is the middle square of a row/column and S (cid:48) is the first/last squareof the same row/column, then the height assigned to S (cid:48) is h + 1. It is easy to seethat all heights are positive and that if an edge connects the first and the lastsquare of a row/column, then the heights of these two squares are greater thanthe height of the square in the middle. This concludes the proof that G admits a2.5D-GBR with footprint F if and only if F ∗ admits a Hamiltonian path. Since F ∗ has a Hamiltonian path if and only if G H has a Hamiltonian path, G admitsa 2.5D-GBR with footprint F if and only if G H has a Hamiltonian path, whichimplies that the 2.5GBR-WGF problem is NP-hard. (cid:117)(cid:116) There are several possible directions for further study of 2.5D-BRs. Among them:( i ) Study the complexity of deciding if a given graph admits a 2.5D-BR. Weremark that deciding if a graph admits an RVR is NP-hard. ( ii ) Investigateother classes of graphs that admit a 2.5D-BR. For example, do 1-planar graphsor partial 5-trees always admit a 2.5D-BR? We remark that there are both1-planar graphs and partial 5-trees not admitting an RVR. ( iii ) Study the 2.5D-BRs under the strong visibility model. For example, which bipartite graphs admita strong 2.5D-BR? References
1. M. E. Ahmed, A. B. Yusuf, and M. Z. H. Polin. Bar 1-visibility representation ofoptimal 1-planar graph. In
Electrical Inf. and Comm. Technology (EICT), 2013 ,pages 1–5, 2014.2. T. Akiyama, T. Nishizeki, and N. Saito. NP-completeness of the hamiltonian cycleproblem for bipartite graphs.
J. of Inf. Processing , 3(2):73–76, 1980.3. F. Bernhart and P. C. Kainen. The book thickness of a graph.
J. of CombinatorialTheory, Series B , 27:320–331, 1979.4. Therese Biedl, Giuseppe Liotta, and Fabrizio Montecchiani. On visibility represen-tations of non-planar graphs. In S´andor Fekete and Anna Lubiw, editors,
SoCG2016 , volume 51 of
LIPIcs , pages 19:1–19:16. Schloss Dagstuhl - Leibniz-Zentrumfuer Informatik, 2016.5. H. L. Bodlaender. A linear-time algorithm for finding tree-decompositions of smalltreewidth.
SIAM J. Computing , 25(6):1305–1317, 1996.6. H. L. Bodlaender and T. Kloks. Efficient and constructive algorithms for thepathwidth and treewidth of graphs.
J. of Algorithms , 21(2):358–402, 1996.7. P. Bose, A. M. Dean, J. P. Hutchinson, and T. C. Shermer. On rectangle visibilitygraphs. In S. North, editor,
Proc. Symp. on Graph Drawing, GD ’96 , volume 1190of
LNCS , pages 25–44, 1996. . P. Bose, H. Everett, S. P. Fekete, M. E. Houle, A. Lubiw, H. Meijer, K. Romanik,G. Rote, T. C. Shermer, S. Whitesides, and C. Zelle. A visibility representationfor graphs in three dimensions. J. Graph Algorithms and Applications , 2(3):1–16,1998.9. F. Brandenburg. 1-visibility representations of 1-planar graphs.
J. of Graph Algo-rithms and Applications , 18(3):421–438, 2014.10. T. Bruckdorfer, M. Kaufmann, and F. Montecchiani. 1-bend orthogonal partialedge drawing.
J. of Graph Algorithms and Applications , 18(1):111–131, 2014.11. Paz Carmi, Eran Friedman, and Matthew J. Katz. Spiderman graph: Visibility inurban regions.
Computational Geometry , 48(3):251 – 259, 2015.12. A. M. Dean, J. A. Ellis-Monaghan, S. Hamilton, and G. Pangborn. Unit rectanglevisibility graphs.
Electr. J. Comb. , 15(1), 2008.13. A. M. Dean, W. Evans, E. Gethner, J. D. Laison, Md. A. Safari, and W. T. Trotter.Bar k -visibility graphs. J. of Graph Algorithms and Applications , 11(1):45–59,2007.14. A. M. Dean and J. P. Hutchinson. Rectangle-visibility representations of bipartitegraphs.
Disc. App. Math. , 75(1):9–25, 1997.15. A. M. Dean and J. P. Hutchinson. Rectangle-visibility layouts of unions and prod-ucts of trees.
J. of Graph Algorithms and Applications , 2(8):1–21, 1998.16. A. M. Dean and N. Veytsel. Unit bar-visibility graphs.
Congressus Numerantium ,160:161–175, 2003.17. E. Di Giacomo, W. Didimo, W. S. Evans, G. Liotta, H. Meijer, F. Montecchiani,and S. K. Wismath. Ortho-polygon visibility representations of embedded graphs.
CoRR , abs/1604.08797, 2016.18. P. Duchet, Y. Hamidoune, M. Las Vergnas, and H. Meyniel. Representing a planargraph by vertical lines joining different levels.
Discrete Math. , 46(3):319–321, 1983.19. W. Evans, M. Kaufmann, W. Lenhart, T. Mchedlidze, and S. Wismath. Bar 1-visibility graphs and their relation to other nearly planar graphs.
J. of GraphAlgorithms and Applications , 18(5):721–739, 2014.20. S. P. Fekete, M. E. Houle, and S. Whitesides. New results on a visibility represen-tation of graphs in 3D. In F. Brandenburg, editor,
Graph Drawing , volume 1027of
LNCS , pages 234–241. Springer Berlin Heidelberg, 1995.21. S. P. Fekete and H. Meijer. Rectangle and box visibility graphs in 3D.
Int. J.Comput. Geometry Appl. , 9(1):1–28, 1999.22. S. Felsner and M. Massow. Parameters of bar k -visibility graphs. J. of GraphAlgorithms and Applications , 12(1):5–27, 2008.23. M. R. Garey, D. S. Johnson, and H. C. So. An application of graph coloring toprinted circuit testing.
IEEE Trans. on Circuits and Systems , CAS-23(10):591–599,1976.24. A. Gupta, N. Nishimura, A. Proskurowski, and P. Ragde. Embeddings of k -connected graphs of pathwidth k . Disc. Applied Mathematics , 145(2):242–265,2005.25. J. P. Hutchinson, T. Shermer, and A. Vince. On representations of some thickness-two graphs.
Comp. Geometry , 13(3):161–171, 1999.26. G. Kant, G. Liotta, R. Tamassia, and I. G. Tollis. Area requirement of visibilityrepresentations of trees.
Inf. Process. Lett. , 62(2):81–88, 1997.27. J. D. Kleitman, A. Gy´arf´as, and G. T´oth. Convex sets in the plane with three ofevery four meeting.
Combinatorica , 21(2):221–232, 2001.28. G. Liotta and F. Montecchiani. L-visibility drawings of IC-planar graphs.
Inf.Process. Lett. , 116(3):217–222, 2016.
9. R. H. J. M. Otten and J. G. Van Wijk. Graph representations in interactive layoutdesign. In
IEEE ISCSS , pages 91–918. IEEE, 1978.30. P. Rosenstiehl and R. E. Tarjan. Rectilinear planar layouts and bipolar orientationsof planar graphs.
Discr. & Comput. Geom. , 1:343–353, 1986.31. T. C. Shermer. On rectangle visibility graphs III. external visibility and complexity.In
Cdn. Conf. on Comp. Geometry , pages 234–239, 1996.32. J. ˇStola. Unimaximal sequences of pairs in rectangle visibility drawing. In I. G.Tollis and M. Patrignani, editors,
Graph Drawing 2008 , volume 5417 of
LNCS ,pages 61–66. Springer Berlin Heidelberg, 2009.33. I. Streinu and S. Whitesides. Rectangle visibility graphs: Characterization, con-struction, and compaction. In H. Alt and M. Habib, editors,
STACS 2003 , volume2607 of
LNCS , pages 26–37. Springer, 2003.34. S. Sultana, Md. S. Rahman, A. Roy, and S. Tairin. Bar 1-visibility drawings of1-planar graphs. In P. Gupta and C. Zaroliagis, editors,
Proc. Applied Algorithms:First Int. Conf. ICAA 2014 , pages 62–76. Springer Int. Publishing, 2014.35. R. Tamassia and I. G. Tollis. A unified approach to visibility representations ofplanar graphs.
Discr. & Comput. Geom. , 1(1):321–341, 1986.36. R. Tamassia and I. G. Tollis. Representations of graphs on a cylinder.
SIAM J.Disc. Mathematics , 4(1):139–149, 1991.37. C. Thomassen. Plane representations of graphs. In
Progress in Graph Theory ,pages 43–69. AP, 1984.38. S. K. Wismath. Characterizing bar line-of-sight graphs. In
Proc. 1st Symp. onComp. Geometry , pages 147–152, 1985. ppendixA Additional Material for Section 3 Proof of Lemma 1.
By hypothesis G admits a 2.5D-BR Γ (cid:48) . If every box of Γ (cid:48) hasa distinct integer height in the range [1 , n ], the statement is true. If not, we canchange the heights so to achieve this condition. Namely, denote by b , b , . . . , b n the boxes of Γ (cid:48) in non-decreasing order of height; we change the height of b i to be i (for i = 1 , , . . . , n ). Let Γ be the resulting representation and denoteby h (cid:48) ( b i ) the height of b i in Γ (cid:48) and by h ( b i ) the height of b i in Γ . For any twoboxes b i and b j , h ( b i ) < h ( b j ) if and only if h (cid:48) ( b i ) (cid:54) h (cid:48) ( b j ), which means thatno visibility has been destroyed by our change of the heights (while some newvisibility may have been created). (cid:117)(cid:116) Proof of Lemma 2.
For a given arrangement R , choose (cid:96) v and (cid:96) h to be a verticaland horizontal line whose union intersects the maximum number of rectanglesin R . Suppose, for the sake of contradiction, that some rectangle a ∈ R is notintersected by (cid:96) v ∪ (cid:96) h . Choose (cid:96) v and (cid:96) h so that they are closest to a withoutchanging the set of rectangles intersected by their union. Assume w.l.o.g. that a lies in the positive quadrant of (cid:96) v ∪ (cid:96) h . Let b be a rectangle that prevents (cid:96) h from moving closer to a , that is, b ∩ (cid:96) h (cid:54) = ∅ but b ∩ ( (cid:96) v ∪ (cid:96) (cid:48) h ) = ∅ , where (cid:96) (cid:48) h is (cid:96) h translated in the + y direction by any arbitrarily small positive amount. Let c be a rectangle that prevents (cid:96) v from moving closer to A , that is, c ∩ (cid:96) v (cid:54) = ∅ but c ∩ ( (cid:96) (cid:48) v ∪ (cid:96) h ) = ∅ , where (cid:96) (cid:48) v is (cid:96) v translated in the + x direction by any arbitrarilysmall positive amount. The line (cid:96) h separates a and b , so y ( a ) ∩ y ( b ) = ∅ , whichimplies x ( a ) ∩ x ( b ) (cid:54) = ∅ . Similarly, using line (cid:96) v , y ( a ) ∩ y ( c ) (cid:54) = ∅ .By the conditions of the lemma, either y ( b ) ∩ y ( c ) (cid:54) = ∅ or x ( b ) ∩ x ( c ) (cid:54) = ∅ .Suppose that y ( b ) ∩ y ( c ) (cid:54) = ∅ . Since y ( c ) has non-empty intersection with both y ( a ) and y ( b ), any horizontal line that separates a and b must intersect c . Thus (cid:96) h intersects c and c ∩ ( (cid:96) (cid:48) v ∪ (cid:96) h ) (cid:54) = ∅ for all vertical lines (cid:96) (cid:48) v ; a contradictionwith the fact that c prevents (cid:96) v from moving closer to a . We obtain a similarcontradiction if x ( b ) ∩ x ( c ) (cid:54) = ∅ . (cid:117)(cid:116) Lemma 7. K admits a 2.5D-BR.Proof. Let Λ be the box collection shown in Figure 2, where the footprint Λ isdepicted by a 2D drawing, while the heights of boxes are indicated by integerlabels. We prove the statement by showing that Λ is a 2.5D-BR of K . Wepreliminarily observe that Λ satisfies the necessary condition NC. The boxesof Λ are partitioned into five subsets T, R, L, B, C such that | T | = | R | = 4, | L | = | B | = 3 and | C | = 5; this partitioning is shown by the five rectangleswith thick sides. For S ∈ { T, R, L, B } , it is easy to see that (for any assignmentof heights to the boxes in Λ ) Λ ( S ) is a 2.5D-BR of K | S | in Λ , since any twoboxes of Λ ( S ) are ground visible in Λ . Hence, except for C , the intra-partitionvisibilities are ensured regardless of the heights of the boxes. We now show thateven the inter-partition visibilities and the intra-partition visibilities of Λ ( C )16xist if the heights of boxes are chosen as shown in Figure 2. We follow anincremental strategy in which, at each step, we add one of R, L, B, C , in order,to the current set of vertices, which is initialized to T . Step 1: addition of R . Box Λ ( t i ) (1 (cid:54) i < | T | ) may obstruct the visibilitybetween a box in Λ ( R ) and a box Λ ( t i (cid:48) ), with i (cid:48) > i , in Λ ( T ). This obstructioncan be avoided, however, if ( i ) Λ ( T ) has a staircase layout, i.e. the height of itsboxes increases as Λ ( R ) gets farther, and ( ii ) every box in Λ ( R ) is not lowerthan any box in Λ ( T ). Therefore, Λ ( T ∪ R ) is a 2.5D-BR of K if h ( t i ) = i (1 (cid:54) i (cid:54) | T | ) and, for each 1 (cid:54) j (cid:54) | R | , h ( r j ) (cid:62) h max ( T ), where h max ( T ) is themaximum box height in Λ ( T ). Step 2: addition of L . Consider the subset S (cid:48) = L ∪ { r } . As for the previouspartite sets, Λ ( S (cid:48) ) is a 2.5D-BR of K | S (cid:48) | in Λ for any assignment of heights.However, box Λ ( r i ) (1 (cid:54) i < | R | ) may prevent the (inter-partition) visibilitybetween a box in Λ ( L ) and a box Λ ( r i (cid:48) ), with i (cid:48) > i , in Λ ( R ). As before, thesevisibilities can be ensured if Λ ( R ) has a staircase layout and every box in Λ ( L ) isnot lower than any box in Λ ( R ). In particular, a possible assignment of heightsis the following: h ( r i ) = h max ( T ) + i − (cid:54) i (cid:54) | R | ) and, for each 1 (cid:54) j (cid:54) | L | , h ( l j ) (cid:62) h max ( R ). This assignment also implies the visibility between every boxin Λ ( L ) and every box in Λ ( T ). Step 3: addition of B . Consider now the subset S (cid:48)(cid:48) = B ∪ { l } . As before, Λ ( S (cid:48)(cid:48) ) is a 2.5D-BR of K | S (cid:48)(cid:48) | in Λ , independently from the choice of the heights ofboxes. Furthermore, the inter-partition visibilities between Λ ( B ) and Λ ( L ) canbe satisfied if h ( l i ) = h max ( R ) + i − (cid:54) i (cid:54) | L | ) and, for each 1 (cid:54) j (cid:54) | B | , h ( b j ) (cid:62) h max ( L ). With this assignment of heights, the inter-partition visibilitiesbetween Λ ( B ) and Λ ( T ) and between Λ ( B ) and Λ ( R ) are ensured. Step 4: addition of C . According to Fig. 2, every box Λ ( c i ) (1 (cid:54) i (cid:54)
5) cansee every other box Λ ( v ) with v ∈ T ∪ R ∪ L ∪ B , provided that h ( c i ) (cid:62) h ( v ).Indeed, Λ ( c i ) is ground visible to any box in { Λ ( t ) , Λ ( r ) , Λ ( b ) , Λ ( l ) } and Λ ( T ), Λ ( R ), Λ ( L ), Λ ( B ) have a staircase layout with increasing box height as Λ ( C ) gets farther. Therefore, if h ( c i ) (cid:62) h max ( B ) (1 (cid:54) i (cid:54) Λ are satisfied. It remains to consider the intra-partitionvisibilities in Λ ( C ). In this regard, the only visibility obstructions can be causedby Λ ( c ), which may prevent the visibility between Λ ( c ) and Λ ( c ) ( Λ ( c ) and Λ ( c ), respectively) if h ( c ) and h ( c ) ( h ( c ) and h ( c ), respectively) are notboth strictly greater than h ( c ). Therefore, by choosing h ( c ) = h max ( B ) and h ( c i ) = h ( c ) + 1 (1 (cid:54) i (cid:54) Λ ( C ) are satisfied,from which it follows that Λ is a 2.5D-BR of K . (cid:117)(cid:116) B Additional Material for Section 4 A path decomposition P of a graph G = ( V, E ) is a sequence P , . . . , P k of subsetsof V , called bags , such that the following three properties hold: – For every vertex u of G , there is a bag P i (with 1 (cid:54) i (cid:54) k ) such that u ∈ P i ; – For every edge ( u, v ) of G , there is a bag P i (with 1 (cid:54) i (cid:54) k ) such that u, v ∈ P i ; 17 For every vertex u , there exists two indices 1 (cid:54) j (cid:54) h (cid:54) k , such that u iscontained in all bags P i such that j (cid:54) i (cid:54) h and in no other bag.Let P i be the bag of P with maximum size. The width of the path decom-position P is | P i | −
1. The pathwidth of a graph G is the minimum width of anypath decomposition of G .A path decomposition P = P , . . . , P k of a graph G of pathwidth p is nor-malized if | P i | = p + 1 for i odd, | P i | = p for i even, and P i − ∩ P i +1 = P i for i even.For a fixed p , path decomposition of graphs with pathwidth p can be found inlinear time [6, 5]. Given a path decomposition, a normalized path decompositionof the same width can be found in linear time [24]. Missing cases of the proof of Theorem 3.
To complete the proof of Theorem 3,we need to prove the following cases. h = 3 or h = 4 . The box Λ i ( v i ) only intersects the regions α ,k (cid:48) , with k (cid:48) < α k (cid:48)(cid:48) , , with k (cid:48)(cid:48) >
4. Thus, the only visibilities that could be destroyedare those inside these regions. The visibilities inside α , and α , are notdestroyed because r h,i is placed so that the existing boxes of groups 4 canstill see (to the left of r h,i ) the boxes of group 1 and 2 inside α , and α , .The existing visibilities between boxes of group 4 and the boxes of group 3are not destroyed because r h,i is short enough (in the x -direction) so that theexisting boxes of groups 3 and 4 can still see each other (to the right of r h,i )inside α , . The visibilities between the vertices of group 4 and vertices ofgroup h (cid:48) , with h (cid:48) >
4, are not destroyed because the boxes representing thevertices of group 4 are taller than Λ i ( v i ) and so are the boxes of any group h (cid:48) with h (cid:48) >
4. So, no visibility is destroyed for the vertices of group 4. The box Λ i ( v i ) sees the active vertex of group 1 with a visibility that is inside α , or α , and above the boxes of group 1 corresponding to non-active vertices(these boxes are shorter than the box of the active vertex of group one).Similarly, Λ i ( v i ) sees the active vertex of group 2 with a visibility that isinside α , or α , and above the boxes of group 1 (including the active one).The box Λ i ( v i ) sees the active vertex of group 3 or 4 via a ground visibilityinside α , and it sees the boxes of all the other active vertices inside α h,k (with h = 3 or 4, and k >
4) above the boxes of group 3 (which are allshorter than it). h = 7 or h = 8 . The box Λ i ( v i ) only intersects the regions α , , α , , and α , .Thus, the only visibilities that could be destroyed are those inside theseregions. The visibilities between the vertices of groups 5 and 7 are not de-stroyed because r h,i is placed so that the existing boxes of groups 7 can stillsee the boxes of group 5 inside α , above r h,i (in the y -direction). Similarly,the visibilities between the vertices of group 5 and the vertices of group 8 arenot destroyed because the existing boxes of groups 8 can still see the boxesof group 5 inside α , and below r h,i (in the y -direction). The visibilitiesbetween the vertices of group 7 and the vertices of group 8 are not destroyed18
11 223 323 34 4 45 566 66345345
Fig. 5: A 2.5D-GBR with maximum edge density. The numbers in the squareindicate the height of each box. The edges of the subgraph induced by the firstrow and the first column are shown.because the existing boxes of groups 8 can still see the boxes of group 7inside α , and above r h,i (in the y -direction), if h = 8, or below r h,i (in the y -direction), if h = 7. The proof that v i sees all the other active vertices isequal to the one in the case h = 5 or h = 6. (cid:117)(cid:116) C Additional Material for Section 5
Proof of Theorem 4.
Consider a 2.5D-GBR Γ of an n -vertex graph G and let Γ be the footprint of Γ . Γ consists of a set of unit squares that are alignedalong the columns and the rows of an integer grid. Let B , B , . . . , B k be a setof boxes whose footprints share the same x -extent (i.e., are in the same column)or y -extent (i.e., are in the same row). Two boxes B i and B j , with i + 1 < j can have a visibility only if they are both higher than any other box B k with i < k < j . Thus, there cannot be four boxes B i , B j , B k , B h , with i < j < k < h and such that there is a visibility between B i and B k and a visibility between B j and B h . If these two visibilities existed then B j should be taller than B k (inorder to see B h ) and B k should be taller than B j (in order to see B i ). It followsthat the subgraph G (cid:48) of G that is represented by the boxes B , B , . . . , B k haspage number one and therefore is outerplanar . This implies that the maximumnumber of edges of G (cid:48) is 2 k −
3. Suppose that the unit squares in Γ occupy R rows and C columns, and that row r i (with 1 (cid:54) i (cid:54) R ) has n r i vertices whilecolumn c i (with 1 (cid:54) i (cid:54) C ) has n c i vertices. The maximum number of edges in G is (cid:80) Ri =1 (2 n r i −
3) + (cid:80) Ci =1 (2 n c i −
3) = 2 n − R + 2 n − C = 4 n − R + C ). Itis easy to see that this number is maximized when R = C = √ n , i.e., when thesquares of Γ form a √ n × √ n grid. In this case the maximum number of edgesis 4 n − √ n .For each n = k a 2.5D-GBR that achieves the maximum edge density can becreated by placing n boxes so that the footprint is a k × k grid and then choosing A graph G = ( V, E ) has page number one if there exists a total order (cid:54) of V suchthat there are no two edges ( u, v ) and ( w, z ) with u (cid:54) w (cid:54) v (cid:54) z . It is known thata graph has page number one if and only if it is outerplanar [3]. a) (b) (c) (d)(e) (f) (g) Fig. 6: Illustration for the proof of Theorem 5 . the heights of the boxes along each row and column to form a decending sequencebetween two maxima. Figure 5 shows a 5 × (cid:117)(cid:116) Missing part of the proof of Theorem 5.
To complete the proof of Theorem 5,we must prove that G H admits a Hamiltonian path if and only if F ∗ containsa Hamiltonian path. Recall that F ∗ denotes a graph with a vertex for eachsquare in F and an edge between two squares if and only if the two squares arehorizontally or vertically aligned. Suppose first that G H has a Hamiltonian path H . Each edge e = ( u, v ) of H corresponds to two edges in F ∗ : one connecting avertex square S i ( u ) (1 (cid:54) i (cid:54)
4) to the edge square S e , and one connecting S e toa vertex square S j ( v ) (1 (cid:54) j (cid:54) E H of such edgesdoes not form a Hamiltonian path of F ∗ because it does not contain all verticesof F ∗ . In particular, for each vertex v of G H there are two vertex squares S i ( v )and S j ( v ) (1 (cid:54) i, j (cid:54)
4) that have no incident edge in E H (for the end-verticesof H , the vertex squares without incident edges in E H are three); also, the edgesquares of all the edges that are not in H have no incident edges in E H . We saythat these edge squares are orphans . We now show that it is possible to selectadditional edges of F ∗ to create a Hamiltonian path. Each orphan edge square isassigned to one of the end-vertices of the edge corresponding to the square. Theassignment is arbitrary, we only take care that at most one orphan edge squareis assigned to each end-vertex of H . Let v be a vertex of G H and suppose firstthat v is an internal vertex of H . We have two cases: an orphan edge square isassociated with v or not. In both cases then we have two sub-cases: the vertexsquare of v with an incident edge of E H are horizontally/vertically aligned ornot. Figures 6(a)-6(d) shows for each sub-case how to select additional edges of F ∗ so that the four vertex squares of v and, possibly, the orphan edge squareassigned to v are traversed by a simple path. The case when v is an end-vertexof H can be treated similarly, Figures 6(e)-6(g) shows the possible cases. It iseasy to see that applying the transformations illustrated in Figure 6 to all thevertices v of G H , we obtain a Hamiltonian path of F ∗ . Figure 7 shows a completeexample. 20 a) (b) (c) Fig. 7: (a) A Hamiltonian path H of the cubic graph G H . (b) Constructing aHamiltonian path of F ∗ . The bold edges are the edges of F ∗ that correspond tothe edges of H . (c) A Hamiltonian path of F ∗ . (a) (b) (c) Fig. 8: (a) A Hamiltonian path H ∗ of F ∗ . (b) H ∗ simplified. (c) The candidateedges E H of G H . The dashed edge has to be removed to create a Hamiltonianpath H of G H .Suppose now that F ∗ has a Hamiltonian path H ∗ . We show how to constructa Hamiltonian path H of G H . We first make a simplification of H ∗ . Let S e be anedge square of F ∗ and suppose that it is adjacent in H ∗ to two vertex squares S i ( v ) and S j ( v ) of the same vertex v . In this case S e and its adjacent edgesare removed from H ∗ and the edge connecting S i ( v ) and S j ( v ) is added to H ∗ .Analogously, if S e is an end-vertex of H ∗ , we remove it (and its adjacent edge)from H ∗ . After this simplification, H ∗ is a simple path that traverses all vertexsquares and a subset of the edge squares. Each edge square S e that is still in H ∗ is adjacent to two vertex squares S i ( u ) and S j ( v ) of two different vertices u and v . Edge ( u, v ) of G H is selected as a candidate edge for H . We now showthat the set E H of candidate edges forms a Hamiltonian path H of G H , possiblyafter the removal of one or two edges. Let v be a vertex of G H such that noend-vertex of H ∗ is a vertex square of v . We claim that the four vertex squaresof v appear consecutively in H ∗ . Since G H is a cubic graph, there can be at most21hree edges of H ∗ with an end-vertex in S ( v ) and the other end-vertex outside S ( v ). However, since any other edge of H ∗ incident to a square of S ( v ) musthave the other end-vertex also in S ( v ), if one or three such edges existed, thena square of S ( v ) would be an end-vertex of H ∗ , but we are assuming that thisis not the case. Thus, the four squares of S ( v ) are connected to two squares notin S ( v ) and therefore they must be consecutive in H ∗ . This implies that eachvertex v of G H , except at most two, has at most two incident candidate edges.The exceptions are the (at most) two vertices whose vertex squares include theend-vertices of H ∗ . This gives rise to two edges of E H that can be removed toobtain a Hamiltonian path H . Figure 8 shows an example. (cid:117)(cid:116)(cid:117)(cid:116)