Recognizing Visibility Graphs of Triangulated Irregular Networks
FFundamenta Informaticae XXI (2001) 1001–1016
DOI 10.3233/FI-2016-0000IOS Press
Recognizing Visibility Graphs of Triangulated Irregular Networks
Hossein Boomari
Department of Mathematical ScienceSharif University of TechnologyTehran, [email protected]
Mojtaba Ostovari
Department of Mathematical ScienceSharif University of TechnologyTehran, [email protected]
Alireza Zarei
Department of Mathematical ScienceSharif University of TechnologyTehran, [email protected]
Abstract. A Triangulated Irregular Network ( TIN ) is a data structure that is usually used forrepresenting and storing monotone geographic surfaces, approximately. In this representation,the surface is approximated by a set of triangular faces whose projection on the XY -plane is atriangulation. The visibility graph of a TIN is a graph whose vertices correspond to the verticesof the
TIN and there is an edge between two vertices if their corresponding vertices on
TIN seeeach other, i.e. the segment that connects these vertices completely lies above the
TIN . Address for correspondence: Sharif University of Technology, Azadi Street, Tehran, Iran a r X i v : . [ c s . C G ] J a n H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Computing the visibility graph of a
TIN and its properties have been considered thoroughly in theliterature. In this paper, we consider this problem in reverse: Given a graph G , is there a TIN withthe same visibility graph as G ? We show that this problem is ∃ R - Complete . Keywords:
Visibility graph triangulated irregular network recognizing visibility graph existen-tial theory of the reals.
1. Introduction
A monotone surface is a surface with at most one intersection point with any vertical line. Such asurface can be represented as a function S : R → R . As a linear estimation, such surfaces arerepresented by Triangulated Irregular Network s (
TIN s) which are composed of a set of triangularfaces. Projection of a
TIN on the XY -plane is therefore a triangulation in the plane (See Fig. 1).The visibility relations between vertices of a TIN can be represented by a graph called its visibilitygraph . In this graph, each vertex corresponds to a
TIN ’s vertex and there is an edge between a pair ofvertices, if and only if the segment between their corresponding vertices on the
TIN lies completelyabove the
TIN . The visibility graphs have applications in many computational geometry problems suchas motion planning and ray tracing, computer graphics, robotics and other fields which consider thegeometry of surfaces like
GIS and geology [1]. Therefore, the problem of computing the visibilitygraph has been considered thoroughly and there are several polynomial time algorithms for computingthese graphs for TIN s [2, 3]. The visibility graph is also defined for some other classes of geometricshapes like polygons, monotone curves and points in the plane.
Figure 1. A Triangulated Irregular Network (
TIN ) and its planar projection.
Considering the problem of computing the visibility graph in reverse is another interesting theo-retical problem in computational geometry [4, 5]. In this problem we are asked to determine whetherthere is a realization in the form of a specific geometric object for a given visibility graph. Restricting Geographic information system . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs this problem for
TIN s, the goal is to determine whether there exists a
TIN whose visibility graph isisomorphic to a given graph. This problem is known as recognizing visibility graphs and mainly isfocused on defining necessary and sufficient conditions on a graph to be a visibility graph. There aredifferent variations of this recognition problem with different constraints on the requested
TIN , thedescription of the input of the problem, or the class of the given input graph. For example, in twovariations of this problem, the triangulation graph of the vertices of the
TIN may or may not be givenin the input. If the answer to the recognizing problem for a given graph with the specified constraints is”yes”, the next question is to build such a
TIN which is known as reconstructing visibility graph prob-lem. These problems have also been defined for other geometric shapes like simple polygons in whichthe target geometric object is a simple polygon in the plane. Beside the variety of visibility graphswith respect to the classes of geometric shapes, there is another problem based on pseudo-visibility.There are some results for the realization and characterization of pseudo-visibility graphs [6].Despite much progress in computing the visibility graphs, the computational complexity of therecognition and reconstruction problems are still open for almost all general shapes, including simplepolygons, terrains, and
TIN s [7, 8]. It is only known that these problems belong to
PSPACE , and moreprecisely, to the
Existential Theory of The Reals ( ∃ R ) complexity class.Existential theory of the reals ( ∃ R ) is the complexity class that was implicitly introduced in1989 [9] and explicitly defined by Shor in 1991 [10]. Schaefer shows that it is the complexity classof the problems which can be reduced, in polynomial time, to the problem of deciding, whetherthere is a solution for a Boolean formula φ : { T rue, F alse } n → { T rue, F alse } in propositionallogic, in the form φ ( F ( X , X , ..., X N ) , F ( X , X , ..., X N ) , ..., F n ( X , X , ..., X N )) , where each F i : R N → { T rue, F alse } consists of a polynomial function G i : R N → R on some real variables,compared to with one of the comparison operators in { <, ≤ , = , >, ≥} (for example G i ( X , X ) = X X − X X + 8 and F i ( X , X ) ≡ G i ( X , X ) < ) [11]. Equivalently, it is the complexityclass of the problems which are polynomial-time reducible to the problem of deciding the emptinessof a semi-algebraic set [12]. Clearly, satisfiability of a quantifier-free boolean formula belongs to ∃ R . Therefore, ∃ R includes all N P problems. In addition, ∃ R belongs to P SP ACE [12] and wehave
N P ⊆ ∃ R ⊆ P SP ACE . Although this class is inherently an Algebraic complexity class, ithas drawn the attention from geometers because some of the main arguments in its literature rely ongeometric properties. Another reason is that some geometric problems are complete (with respect topolynomial-time reductions) for this class. For example Recognizing
LineArrangement , Stretchabil-ity , Simple Order Type , Intersection Graph of Segments , and
Intersection Graph of Unit Disks in theplane are complete for ∃ R or simply ∃ R - Complete [13]. As the most related result to this paper, in2017 Cardinal et al. showed that recognizing visibility graph of a point set is ∃ R - Complete [4]. Thevisibility graph of a set of 3D-points is a graph with these points as its vertices and there is an edgebetween two vertices if their connecting segment does not pass through any other point.Because of their application in our proofs, we discuss Recognizing
LineArrangement and
Stretch-ability problems with more details in Section 2. In Section 3, we consider the recognition problemof
TIN s and prove that this problem is also ∃ R - Complete . In this problem, we are given a pair of agraph and a triangulation which are respectively the visibility graph and the triangulation of a target
TIN on the plane. Then, the question is whether there is a 3D
TIN realization for this triangulationwhose visibility graph is the same as the given graph. The formal description of this problem is:
H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Recognition of visibility graphs of polygonal terrains:INPUT: A pair (cid:104)
G, T (cid:105) , where G and T are two graphs on the same vertex set V , and T is aplanar subgraph of G with a planar embedding whose all faces, except possibly its external face f , aretriangular ( f is not mentioned in the input explicitly).QUESTION: Does there exist a TIN with vertex set V , whose projection on the plane is an em-bedding of T with outer face f , and whose visibility graph is G ?
2. Preliminaries and Definitions
Combinatorial description of a geometric shape in the plane is an interesting problem in both theoryand applications of computational geometry.
LineArrangement is an example of such descriptionsfor a set of lines in the plane.
LineArrangement describes the leftmost vertical order of the lines inthe plane (initial order) and the left to right order of intersections of each line by the other lines (thisordering, for a line L i , is denoted by Seq ( L i ) ). This arrangement is well defined for an arbitraryset of lines in the plane, including when the lines are in general position as we will assumed in thispaper. Recognizing LineArrangement for a given line arrangement instance, is the problem of decidingwhether there is a set of lines in the plane with the same arrangement as the input. This problem is ∃ R - Complete [13].Similar to the definition of the monotone surfaces in the Introduction section, we use the term monotone curve for a curve in the plane which intersects any vertical line exactly once. A set ofpseudo-lines in the plane is a set of monotone curves such that each pair intersect exactly once. Basedon this property,
PseudoLineArrangement (and its recognition problem), is defined analogously. Incontrast to
LineArragement , recognizing a
PseudoLineArrangement can be solved efficiently in poly-nomial time [14]. This difference introduces another problem called
Stretchability , which is stated as:“Is it possible to stretch a pseudo-line realization of a
PseudoLineArrangement and make them a set oflines without changing their arrangement?”.
PseudoLineArrangement belongs to P and recognizing LineArrangement is ∃ R - Complete ; proving that the stretchability problem is ∃ R - Complete . Similar to recognizing
PseudoLineArrangement , its reconstruction problem also belongs to P andcan be computed efficiently [14] (See Fig. 2-a and Fig. 2-b). According to the given implementationof the reconstruction algorithm depicted in Algorithm 1 in Appendix section, which is a variation ofthe algorithm presented in [14] with a few modifications, we can obtain a special reconstruction of thepseudo-lines in which each pseudo-line is composed of a sequence of segments and the joint pointsof these segments correspond to the intersection points of the arrangement, except the first and thelast point of each pseudo-line which are arbitrary points before leftmost and after the rightmost pointson that pseudo-line. We call these leftmost and rightmost points of each pseudo-line the first and the An arrangement which has no pair of parallel lines and no triple of lines intersecting at the same point Computing a set of planar pseudo-lines with the given arrangement . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs last end-point of that pseudo-line, respectively. More precisely, each segment connects an intersectionbetween pseudo-lines to the next one, except the first and the last end-points of each pseudo-line whichconnects the first (resp. the last) point on a pseudo-line to the first (resp. last) intersection point ofthat pseudo-line (See Fig. 2-c). This special reconstruction of a
PseudoLineArrangement partitionsthe plane into convex regions. The regions are convex because the algorithm draws any of the foursegments connected to a break-point p inside a different quadrant around p which forces all the anglesaround p to be convex. For such a subdivision, we associate a triangulation as follows: We put a newvertex (splitting vertices) on each segment of each pseudo-line, and split each edge into two edgeswith slightly different slopes (See Fig. 3-b). We replace the new segments which are made from theoriginal segments and these new segments belong to the same pseudo-line. In addition, we add a vertex(middle vertices) inside each convex region. Then, each middle vertex is connected to all vertices onthe boundary of its region (See Fig. 3-b). The resulting subdivision is a triangulation. l l l l l l l l l l l l l l l ( a )( b )( c ) Figure 2. The reconstruction algorithm for
PseodoLineArrangement . Algorithm 1 in Appendix section con-tains a pseudo code implementation of this algorithm.
For an instance A of PseudoLineArrangement , this special reconstruction is denoted by S A ; thecorresponding triangulation is denoted by T A ; S A ( P ) and T A ( P ) are respectively the sequences ofsegments of a pseudo-line P in S A and T A ; the first end-point of P in S A and T A are respectivelydenoted by S first A ( P ) and T first A ( P ) , and the last ones are respectively denoted by S last A ( P ) and T last A ( P ) . The corresponding graph of T A , whose vertices and edges respectively correspond to thevertices and edges of the triangulation, is called the triangulation graph of T A . Lemma 2.1.
For each pair of adjacent triangles t and t in T A with vertex sets { a, b, c } and { a, b, d } in T A , the edge ( c, d ) does not exist in T A ( T A has no K ). Proof:
The common edge of t and t is either a part of a pseudo-line, or a segment that connects a vertex H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs of a pseudo-line to a newly added vertex inside a region (the middle vertices) of the
PseudoLineAr-rangement realization S A . In the former case, the non-common vertices c and d are necessarily twonewly added vertices inside different regions and there is no edge between them. In the latter case,the vertices c and d are two non-adjacent vertices on pseudo-lines (may be on a single pseudo-line).According to the process of building T A , there is no triangle whose all vertices are on the pseudo-lines.Therefore, in both cases c and d are not adjacent in T A . (cid:117)(cid:116) On the other hand, we can obtain a realization for an instance A of PseudoLineArrangement froma realization of its corresponding T A . This is done by removing the added middle and splitting verticesand their adjacent edges from T A and adding segments to connect each pair of vertices separated by asplitting vertex. As the middle vertices do not belong to pseudo-lines and the splitting vertices are thevertices with odd indices in the sequence of the vertices of each pseudo-line (staring the indices from ) in T A , these vertices and edges can be distinguished efficiently.Therefore, Stretchability can be reduced in polynomial time to the problem of whether there is atriangulation T A in the plane in which each pseudo-line in T A lies along a single line (see Figure 3-c).We call this problem as StretchableTriangulation . Here is the definition of
StretchableTriangulation :Recognition of
StretchableTriangulation :INPUT: A triangulation graph T A without K and a set of paths on this graph which are calledpseudo-lines.QUESTION: Does there exist a realization for T A , in which each pseudo-line lies along a singleline?We can summarize the above discussion as the following theorem. Theorem 2.2.
Stretchability can be reduced to
StretchableTriangulation in polynomial time and there-fore,
StretchableTriangulation is ∃ R - Complete .Note that this theorem is true for triangulation graphs with K as well, but we concentrated onhaving no K to use this feature in our next theorems.
3. From StretchableTriangulation to Recognizing Visibility Graphs of
TIN s We prove that deciding whether a triangulation T A is stretchable, can be reduced to an instance of theproblem of recognizing visibility graphs of TIN s. For this purpose, for an instance T A of Stretchable-Triangulation , we build an instance (cid:104)
G, T (cid:105) of recognizing visibility graphs of
TIN s problem where T A is stretchable if and only if (cid:104) G, T (cid:105) is realizable. Remember that in (cid:104)
G, T (cid:105) instance, G is the vis-ibility graph of the vertices of the target TIN and T is the corresponding triangulation of the planarprojection of this TIN . To construct the (cid:104)
G, T (cid:105) instance, T is initially set to be the triangulation T A and G is initialized by exactly the vertex set and edges of this triangulation. Name this initial instanceas I T A . For a realizable instance of T A , the I T A instance of the recognition problem has at least onerealization which is exactly the realization of T A in the plane (which is a flat TIN ). The next theoremstates that all realizations of I T A are concave TIN s, i.e. the angle between each pair of adjacent facesis concave, seeing the
TIN from above. . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs l l l l l ( a ) l l l l l ( b ) l l l l l ( c ) Figure 3. (a) The
PseudoLineArrangement realization for an instance with initial order (cid:104) L , L , L , L , L (cid:105) , Seq ( L ) = (cid:104) L , L , L , L (cid:105) , Seq ( L ) = (cid:104) L , L , L , L (cid:105) , Seq ( L ) = (cid:104) L , L , L , L (cid:105) , Seq ( L ) = (cid:104) L , L , L , L (cid:105) and Seq ( L ) = (cid:104) L , L , L , L (cid:105) , (b) The corresponding triangulation for the PseudoLineAr-rangement realization as an instance of
StretchableTriangulation (c) A realization for the instance of
Stretch-ableTriangulation which is also a realization for the initial
LineArrangement instance.
H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Lemma 3.1.
Any realization of the above I T A instance of recognizing visibility graphs of TIN s isconcave.
Proof:
For the sake of a contradiction, assume that there is a non-concave realization R for an instance I T A of RecognzingVisibilityGraphsOfTINS . There must be at least two adjacent faces A and B in R whoseinterior angle is convex. Let { a, b, c } and { a, b, d } be respectively the vertices of faces A and B (seeFig. 4). For a vertex v on the realized TIN, denote v T as its corresponding vertex in T . Lemma 2.1states that c T and d T are not adjacent in T , and hence should not be visible in G . Therefore, thevisibility of the pair ( c, d ) must be blocked by some part of the TIN that lies above the plane throughvertices b , c and d . Because of the monotonicity of the TIN , there must be at least one vertex, like e , in this part of the TIN which is visible from a such that the edge e T a T does not exist in T . Thereason of non-adjacency of a T and e T in T is that otherwise either ae must break the monotonicityof the TIN or a T e T intersect c T b T or b T d T which is in contradiction with the existence of the faces A and B . Consequently, a and e must have a visibility edge in T which is impossible according toLemma 2.1. (cid:117)(cid:116) Figure 4. There can be no adjacent faces with a convex angle in any realization of I T A . To complete the reduction (build (cid:104)
G, T (cid:105) from I T A ), we need a mechanism to enforce that in all T A realizations, each pseudo-line P i lies along a single line. For this purpose, we attach gadgets,called alignment gadgets, to both corresponding vertices of T first A ( P i ) and T last A ( P i ) in G and T . Thestructures of this pair of gadgets for any pseudo-line P i , restrict P i , in any realization of (cid:104) G, T (cid:105) , tolie in an arbitrarily narrow convex volume. As shown in Fig. 5, the start and end gadgets of P i thatare connected to the first and last vertices a i and b i of a pseudo-line P i are respectively { s i , r i , o i } and { s (cid:48) i , r (cid:48) i , o (cid:48) i } vertices, where all three vertices in each gadget are connected to their correspondingend-point in triangulation T . Moreover, to be a valid triangulation, there are edges from o i (resp. o (cid:48) i ) to both vertices s i and r i (resp. s (cid:48) i and r (cid:48) i ) in T . As shown in Fig. 6.a, this triangulation stillneeds some extensions to be a polished complete triangulation. This is done by adding some extravertices and edges as shown in Fig. 6.b. This refinement is formally obtained by applying the follow-ing changes (assume that (cid:104){ s , r , o } , ..., { s n , r n , o n } , { s (cid:48) , r (cid:48) , o (cid:48) } , ... { s (cid:48) n , r (cid:48) n , o (cid:48) n }(cid:105) is the order of thegadgets around the outer boundary of T A ):T-1. Add edges ( r i , s i +1 ) and ( s (cid:48) i , r (cid:48) i +1 ) for ≤ i ≤ n − and the two edges ( r n , r (cid:48) ) and ( s , s (cid:48) n ) . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
T-2. Add a vertex in each region ( r i , s i +1 , a i +1 , a i ) and ( s (cid:48) i , r (cid:48) i +1 , b i +1 , b i ) for ≤ i ≤ n − and onevertex in each of the regions ( a n , r n , r (cid:48) , b ) and ( s (cid:48) n , s , a , b ) and connect each of these newvertices to the vertices on its region boundary. o i o i r i s i a i o (cid:48) i r (cid:48) i s (cid:48) i b i o i r i a i s i o (cid:48) i r (cid:48) i s (cid:48) i b i (a)(b) G i G (cid:48) i G (cid:48) i G i Figure 5. Layout of alignment gadgets from a) top view b) side view.
Note that T is always a subgraph of G which means that, untill now (before these modifications),all vertices and edges of this refined triangulation exists in G , and the next modifications implicitlyadd these new edges (edges which are added in steps T − and T − ) to G . In order to enforcethe stretchability of any pseudo-line P i in any realization of the (cid:104) G, T (cid:105) instance of the recognitionproblem, the following visibility edges are added to G to complete the (cid:104) G, T (cid:105) instance:G-1. For each pair of vertices p and q of G where none is o i or o (cid:48) i and p is a vertex of a gadget or avertex added in step T -2 , the visibility edge ( p, q ) is added to G.G-2. For each pseudo-line P i , the visibility edges from o i and o (cid:48) i to all vertices of G ( P i ) ∪{ r i , s i , r (cid:48) i , s (cid:48) i } as well as the edge ( o i , o (cid:48) i ) are added to G .In Theorem 3.2, we show that this structure forces the stretchability of P i in any realization of the (cid:104) G, T (cid:105) instance.
Theorem 3.2.
StretchableTriangulation is reducible to recognizing visibility graphs of
TIN s in poly-nomial time.
Proof:
Clearly, the above construction of the (cid:104)
G, T (cid:105) instance of recognizing visibility graphs of
TIN s (thevisibility graph and the triangulation) can be done in polynomial time. Therefore, we need to prove that
H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs G G G G G ( a ) L L L L L G (cid:48) G (cid:48) G (cid:48) G (cid:48) G (cid:48) s s s s s s (cid:48) s (cid:48) s (cid:48) s (cid:48) s (cid:48) r r r r r r (cid:48) r (cid:48) r (cid:48) r (cid:48) r (cid:48) o o o o o o (cid:48) o (cid:48) o (cid:48) o (cid:48) o (cid:48) G G G G G ( b ) L L L L G (cid:48) G (cid:48) G (cid:48) G (cid:48) G (cid:48) s s s s s s (cid:48) s (cid:48) s (cid:48) s (cid:48) s (cid:48) r r r r r r (cid:48) r (cid:48) r (cid:48) r (cid:48) r (cid:48) o o o o o o (cid:48) o (cid:48) o (cid:48) o (cid:48) o (cid:48) L Figure 6. Reducing T A to (cid:104) G, T (cid:105) (a) adding alignment gadgets (b) refining the triangulation. there is a realization for the instance (cid:104)
G, T (cid:105) if and only if there is a realization for the correspondinginstance of
StretchableTriangulation T A .Let S be the set of vertices n (cid:83) i =1 { r i , s i , r (cid:48) i , s (cid:48) i } and the vertices added in step T -2 and S (cid:48) be theset of all vertices except o j and o (cid:48) j (which are only visible to the vertices of their pseudo-line and itsattached allignment gadgets). The visibility graph forces each vertex of S to see all vertices of S (cid:48) .Intuitively, in any realization of (cid:104) G, T (cid:105) vertices in S must be located in a high location to be able tosee all vertices in S (cid:48) . Moreover, according to the construction the sequence of vertices o i , o (cid:48) i , s i , r i , s (cid:48) i and r (cid:48) i lies on a chord-less cycle in G . While in any realization, internal faces are triangular andcycles with more that three vertices have chords (triangulation chords), the sequence of vertices o i , o (cid:48) i , s i , r i , s (cid:48) i and r (cid:48) i must lie on the outer boundary of the triangulation of any realization of the TIN. Onthe other hand, the visibility edges added in step G -1 enforce the new vertices, except o i ’s and o (cid:48) i ’s, tobe located as ridge points on the boundary of the triangulation to see other vertices in any realizationof the TIN. However, the o i ’s and o (cid:48) i ’s must must be located as drain points of this boundary and havelower heights in such a way that their adjacent vertices s i , r i , s (cid:48) i and r (cid:48) i block their visibility. . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Now assume that there is a realization for the instance T A of the StretchableTriangulation . We canobtain a realization for the instance (cid:104)
G, T (cid:105) of the visibility graphs of
TIN s as follows:1. Scale and translate the planar realization of T A on the XY -plane to be surrounded by the circle C with formula x + y = 1 .2. Move the vertices r i , s i , r (cid:48) i and s (cid:48) i and the vertices in step T -2 , without interchanging their orderon the boundary of the triangulation, to new locations on the XY -plane inside the circle withformula x + y = 4 and outside the circle with formula x + y = 3 . This movement isdone in such a way that each pair ( s i , r i ) (resp. ( s (cid:48) i , r (cid:48) i ) ) of vertices lie on different sides ofthe stretched pseudo-line P i with ultimately small distances from each other. This can be doneby extending the stretched pseudo-lines in both sides to some points in the ring defined by thecircles x + y = 4 and x + y = 3 . Then, the points r i , s i , r (cid:48) i and s (cid:48) i and the vertices in step T -2 are translated appropriately. Note that all intersection points of the stretched pseudo-linesare inside the circle x + y = 1 and their extensions do not create new intersections.3. Move the vertices o i and o (cid:48) i on the XY -plane to be on the intersection points (in both sides) ofthe underlying line of the stretched pseudo-line P i and the circle x + y = l , for sufficientlylarge value of l . The value of l is large enough so that all vertices of the stretched pseudo-line P i are inside the wedges defined by ∠ r i o i s i and ∠ r (cid:48) i o (cid:48) i s (cid:48) i and all other vertices lie outside.4. Project the moved vertices in the second step on the truncated elliptic paraboloid (with down-ward convexity) which is truncated by the XY -plane with formula x + y = z + 1 and themoved vertices in the third step on the plane with formula z = 2 . The other vertices are lefton the XY -plane and all the vertices in the second step will be located above the plane withformula z = 2 .In this procedure, the first 3 steps locate the projection of the points corresponding to the verticesof (cid:104) G, T (cid:105) on the plane and the next step locates these points in the space. Therefore, this realizationsupports the triangulation faces in T as well as the visibility constraints in G . For the latter claim, thevisibility graph of the flat part of the TIN is the same as the triangulation which is not changed in ourconstruction. The added vertices are also located on the second ( z = 2 ) and the third ( x + y = z + 1 )layers of the TIN match the visibility constrains. Therefore, this realization is valid for the (cid:104) G, T (cid:105) instance.For the other side of the proof, assume that the instance of (cid:104)
G, T (cid:105) has a
TIN realization. Theprojection of this realization on the XY -plane is a triangulation. Let’s append a superscript star ( ∗ ) tothe name of each vertex in G , to denote its corresponding projected vertex on the plane. Let’s G A ( P i ) be the set of vertices of G A corresponding to the vertices of a pseudo-line P i (intersection points,splitting vertices, o i and o (cid:48) i ) in A . All vertices of G A ( P i ) are visible from both o i and o (cid:48) i . This impliesthat in this projected triangulation, the projection of these vertices must lie inside the intersection ofthe wedges defined by ∠ r ∗ i o ∗ i s ∗ i and ∠ r ∗(cid:48) i o ∗(cid:48) i s ∗(cid:48) i . To prove this implication formally, we need somenotations and then prove a claim which implies the correctness of this sentence. In a realization R of (cid:104) G, T (cid:105) , denote:• the projection of R on XY -plane as R ∗ H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs • the set of realized points corresponding to the vertices of G A ( P i ) as G R A ( P i ) and their projec-tions on the XY -plane as G R ∗ A ( P i ) • the convex hull of G R ∗ A ( P i ) as C R ∗ A ( P i ) (see the orange convex hull in Figure 7) and its projec-tion on R as C R A ( P i ) • the realized part of R corresponding to I T A as I T A ( R ) and its projection on XY -plane as I T A ( R ∗ ) Claim 3.3.
All vertices of G R ∗ A ( P i ) are inside C R ∗ A ( P i ) and all other projected points are outside it. Proof:
Clearly, all vertices of G R ∗ A ( P i ) are inside their convex hull C R ∗ A ( P i ) . In addition, all verticesof this convex hull, lie inside the wedges defined by ∠ r ∗ i o ∗ i s ∗ i and ∠ r ∗(cid:48) i o ∗(cid:48) i s ∗(cid:48) i , otherwise, they will beinvisible to o i or o (cid:48) i .We prove by contradiction that all other projected vertices are outside C R ∗ A ( P i ) . For the sake of acontradiction, assume that there is a projected point p ∗ ∈ R ∗ corresponding to a vertex p / ∈ G A ( P i ) that lies inside C R ∗ A ( P i ) . Denote the intersection of C R ∗ A ( P i ) and I T A ( R ∗ ) as M R ∗ A ( P i ) . Removing M R ∗ A ( P i ) from C R ∗ A ( P i ) split C R ∗ A ( P i ) into two parts. Let X R ∗ A ( P i ) be the part that includes o ∗ i ,and Y R ∗ A ( P i ) the part that contains o (cid:48)∗ i , and projections of M R ∗ A ( P i ) , X R ∗ A ( P i ) and Y R ∗ A ( P i ) on R as M R A ( P i ) , X R A ( P i ) and Y R A ( P i ) respectively. p ∗ lies inside one of M R ∗ A ( P i ) , X R ∗ A ( P i ) or Y R ∗ A ( P i ) .• Assume that p ∗ lies inside M R ∗ A ( P i ) (hence, it is also located inside I T A ( R ∗ ) ). C R A ( P i ) which isincluded in I T A ( R ) is a concave surface. In addition, all of the boundary points of C R A ( P i ) arevisible from o i and o (cid:48) i because each of them correspond to a vertex in G A ( P i ) . It forces all pointson the concave surface C R A ( P i ) (including p ) to be visible from o i and o (cid:48) i which contradicts withthe invisibility of o i and o (cid:48) i to p in G A . Therefore, p ∗ can not be located in M R ∗ A ( P i ) .• Assume that p ∗ lies inside X R ∗ A ( P i ) . Therefore, some surfaces of R ∗ blocks the visibility of o i and p . But, there is no vertex q ∗ inside X R ∗ A ( P i ) such that its projection on R sees o i . So, theremust be a TIN surface on R whose triangular boundary is partially visible to o i and none of itsboundary vertices is visible to o i . The projection of such a triangulation boundary in R ∗ willintersect the segment through o ∗ i and a ∗ i in a point which does not correspond to a vertex in R ∗ and violates the monotonicity of the TIN . Hence, p ∗ cannot be located inside X R ∗ A ( P i ) .• With a similar argument on the invisibility of p and o (cid:48) i , p ∗ can not be located inside Y R ∗ A ( P i ) .Therefore, p ∗ can not be located inside C R ∗ A ( P i ) and the claim is true. ♦ For each pseudo-line P i in an arbitrary realization R of (cid:104) G, T (cid:105) , name an imaginary line through o ∗ i and o ∗(cid:48) i as l i (See Fig. 7-b) and do the following actions:• For each vertex p ∈ G A ( P i ) which is the intersection vertex of pseudo lines P i and P j changethe position of p ∗ to the intersection of l i and l j . . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs • Each vertex p ∈ G A ( P i ) , which is not the intersection vertex of a pseudo-line P i with anyother pseudo-line, lies between two intersection points p (cid:48) and p (cid:48)(cid:48) of the first type. For suchan intersection point p , change the position of p ∗ to an arbitrary point on l i between the newpositions of points p (cid:48) and p (cid:48)(cid:48) .After these operations, all vertices of G R ∗ A ( P i ) are moved to new positions on l i . Because of themonotonicity of the pseudo-lines and R , the order of the vertices of G R ∗ A ( P i ) along l i is the same asthe order of their corresponding vertices on P i . On the other hand, according to the proved claim,there is no vertex except vertices of G R ∗ A ( P i ) inside the convex region C ∗A ( P i ) . Consequently, thesedisplacements will not change the faces that any vertex p belongs to. Hence, these actions are donewithout changing the combinatorial structure of the triangulation T . Hence, the triangulation on theseprojected vertices is a realization for the instance T A of the StretchableTriangulation problem. Thiscompletes the proof by stating that, if the instance (cid:104)
G, T (cid:105) of recognizing the visibility graphs of
TIN sis realizable, then there is a realization for the corresponding instance T A of StretchableTriangulation problem and vice versa. (cid:117)(cid:116)
Combining these results, we have the following theorem about the complexity of the recognizingproblem:
Theorem 3.4.
Recognizing visibility graphs of
TIN s is ∃ R - Complete . Proof:
It is easy to show that recognizing visibility graphs of
TIN s belongs to ∃ R which is done by simplymodeling an instance of this problem by an instance of satisfiability of a formula in ∃ R .On the other hand, Theorem 2.2 states that Stretchability is reducible to
StretchableTriangulation and Theorem 3.2 states that
StretchableTriangulation is reducible to recognizing visibility graphs of
TIN s, both in polynomial time. As
Stretchability is ∃ R - Complete , recognizing visibility graphs of
TIN s is ∃ R - Complete as well. (cid:117)(cid:116)
4. Conclusion
In this paper, we showed that recognizing the visibility graphs of
TIN s problem is ∃ R - Complete .We proved it by making a reduction from the stretchability problem. As a possible future work, thisresult and technique may be useful in determining the computational complexity of other visibilitygraph recognition problems, particularly, recognizing the visibility graphs of monotone curves in twodimensions, whose computational complexity is still open.
References [1] D. O’Sullivan, A. Turner, Visibility graphs and landscape visibility analysis, International Journal of Ge-ographical Information Science 15 (3) (2001) 221–237.[2] G. Nagy, Terrain visibility, Computers & graphics 18 (6) (1994) 763–773.
H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Figure 7. Stretching a pseudo-line P i in a realization of the (cid:104) G, T (cid:105) instance.[3] L. Floriani, P. Magillo, Algorithms for visibility computation on terrains: a survey, Environment andPlanning B: Planning and Design 30 (5) (2003) 709–728.[4] J. Cardinal, U. Hoffmann, Recognition and complexity of point visibility graphs, Discrete & Computa-tional Geometry 57 (1) (2017) 164–178.[5] S. K. Ghosh, On recognizing and characterizing visibility graphs of simple polygons, in: ScandinavianWorkshop on Algorithm Theory, Vol. LNCS 318, Springer, 1988, pp. 96–104.[6] M. Gibson, E. Krohn, Q. Wang, A characterization of visibility graphs for pseudo-polygons, in:Algorithms-ESA 2015, Springer, 2015, pp. 607–618.[7] W. Evans, N. Saeedi, On characterizing terrain visibility graphs, Journal of Computational Geometry 6 (1)(2015) 108–141.[8] J. Abello, K. Kumar, Visibility graphs and oriented matroids, in: International Symposium on GraphDrawing, Vol. LNCS 894, Springer, 1994, pp. 147–158. . Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs [9] L. Blum, M. Shub, S. Smale, On a theory of computation and complexity over the real numbers: Np-completeness, recursive functions and universal machines, Bulletin of the American Mathematical Society21 (1) (1989) 1–46.[10] P. Shor, Stretchability of pseudolines is np-hard, Applied Geometry and Discrete Mathematics-The VictorKlee Festschrift.[11] M. Schaefer, Complexity of some geometric and topological problems, in: International Symposium onGraph Drawing, Springer, 2009, pp. 334–344.[12] J. Richter-Gebert, Mn¨ev’s universality theorem revisited, S´eminaire Lotaringien de Combinatorie.[13] J. Canny, Some algebraic and geometric computations in pspace, in: Proceedings of the twentieth annualACM symposium on Theory of computing, ACM, 1988, pp. 460–467.[14] J. E. Goodman, R. Pollack, Allowable sequences and order types in discrete and computational geometry,in: New trends in discrete and computational geometry, Springer, 1993, pp. 103–134.
H. Boomari, Mojtaba. Ostovari, A. Zarei / Recognizing Visibility Graphs of TINs
Appendix
Algorithm 1:
Recognizing and Reconstruction algorithm for
PseudoLineArrangement function
FindPseudoLineArrangement (Initial vertical order L = h l , l , ..., l n i , A queue S i = h l a ( i, , l a ( i, , ..., l a ( i,n − i , foreach l i , that contains the left to right order of the other pseudo-lines intersections by l i ) if Any of S i ’s has duplicate members thenreturn Arrangement Rejected end if
Let L , L , ..., L n be n empty queues of points i ← while i < = n do Enqueue ( X = 0 , Y = i ) into L i i ← i + 1 end while j ← while j < ( n ∗ ( n − do Let ( p, q ) be a pair such that p < q and S p .F irst () = l q and S q .F irst () = l p and | L p .T op () .Y − L q .T op () .Y | == 1 if There is no such pair ( p, q ) thenreturn Arrangement Rejected end if
Dequeue S p Dequeue S q j ← j + 1Enqueue ( j, L p .T op () .Y ) into L p Enqueue ( j, L q .T op () .Y ) into L q Enqueue ( j + 0 . , L p .T op () .Y + 0 .
5) into L q Enqueue ( j + 0 . , L q .T op () .Y − .
5) into L p j ← j + 1Enqueue ( j, L p .T op () .Y − .
5) into L q Enqueue ( j, L q .T op () .Y + 0 .
5) into L p end whilereturn ( L , L , ..., L n ))