A polynomial bound for untangling geometric planar graphs
Prosenjit Bose, Vida Dujmovic, Ferran Hurtado, Stefan Langerman, Pat Morin, David R. Wood
aa r X i v : . [ c s . C G ] N ov A POLYNOMIAL BOUND FOR UNTANGLING GEOMETRIC PLANAR GRAPHS
Prosenjit Bose ∗ Vida Dujmovi´c † Ferran Hurtado ‡ Stefan Langerman § Pat Morin ∗ David R. Wood ‡ A BSTRACT . To untangle a geometric graph means to move some of the vertices so that the resulting geometricgraph has no crossings. Pach and Tardos [
Discrete Comput. Geom. , 2002] asked if every n -vertex geometricplanar graph can be untangled while keeping at least n ǫ vertices fixed. We answer this question in theaffirmative with ǫ = 1 / . The previous best known bound was Ω( p log n/ log log n ) . We also consideruntangling geometric trees. It is known that every n -vertex geometric tree can be untangled while keepingat least p n/ vertices fixed, while the best upper bound was O (( n log n ) / ) . We answer a question ofSpillner and Wolff [ http://arxiv.org/abs/0709.0170 , 2007] by closing this gap for untangling trees. Inparticular, we show that for infinitely many values of n , there is an n -vertex geometric tree that cannot beuntangled while keeping more than √ n − vertices fixed. Moreover, we improve the lower bound to p n/ . ∗ School of Computer Science, Carleton University, Ottawa, Canada. Email: { jit,morin } @scs.carleton.ca . Research partially supported by NSERC. † Department of Mathematics and Statistics, McGill University, Montreal, Canada.Email: [email protected] . Research partially supported by CRM and NSERC. ‡ Departament de Matem`atica Aplicada II, Universitat Polit`ecnica de Catalunya, Barcelona,Spain. Email: { Ferran.Hurtado, david.wood } @upc.edu . Research supported by projects MECMTM2006-01267 and DURSI 2005SGR00692. The research of David Wood is supported by a MarieCurie Fellowship of the European Community under contract MEIF-CT-2006-023865. § Chercheur Qualifi´e du FNRS, D´epartement d’Informatique, Universit´e Libre de Bruxelles, Brus-sels, Belgium.
Email:[email protected] . Introduction
Geometric reconfigurations consider the following fundamental problem. Given a starting and a final con-figuration of an object R , determine if R can move from the starting to the final configuration, subject tosome set of movement rules. An object can be a set of disks in the plane, or a graph representing a protein,or a robot’s arm, for example. Typical movement rules include maintaining connectivity of the object andavoiding collisions or crossings.In this paper we study the problem where the object is a planar graph G . The starting configurationis a drawing of G in the plane with vertices as distinct points and edges as straight-line segments (andpossibly many crossings). Our goal is to relocate as few vertices of G as possible in order to remove allthe crossings, that is, to reconfigure G to some straight line crossing-free drawing of G . More formally, a geometric graph is a graph whose vertices are distinct points in the plane (not necessarily in general position)and whose edges are straight-line segments between pairs of points. If the underlying combinatorial graphof G belongs to a class of graphs K , then we say that G is a geometric K graph . For example, if K is the classof planar graphs, then G is a geometric planar graph. Where it causes no confusion, we do not distinguishbetween the geometric graph and its underlying combinatorial graph. Two edges in a geometric graph cross if they intersect at some point other than a common endpoint. A geometric graph with no pair of crossingedges is called crossing-free .Consider a geometric graph G with vertex set V ( G ) = { p , . . . , p n } . A crossing-free geometric graph H with vertex set V ( H ) = { q , . . . , q n } is called an untangling of G if for all i, j ∈ { , , . . . , n } , q i is adjacentto q j in H if and only if p i is adjacent to p j in G . Furthermore, if p i = q i then we say that p i is fixed , otherwisewe say that p i is free . If H is an untangling of G with k vertices fixed, then we say that G can be untangled while keeping k vertices fixed. Clearly only geometric planar graphs can be untangled. Moreover, since everyplanar graph is isomorphic to some crossing-free geometric graph [5, 13], trivially every geometric planargraph can be untangled while keeping at least vertices fixed. For a geometric graph G , let fix ( G ) denotethe maximum number of vertices that can be fixed in an untangling of G .At the th Czech-Slovak Symposium on Combinatorics in Prague in 1998, Mamoru Watanabe askedif every geometric cycle (that is, all polygons) can be untangled while keeping at least εn vertices fixed.Pach and Tardos [9] answered that question in the negative by providing an O (( n log n ) / ) upper bound onthe number of fixed vertices. Furthermore, they proved that every geometric cycle can be untangled whilekeeping at least √ n vertices fixed.Pach and Tardos [9] asked if every geometric planar graph can be untangled while keeping n ε vertices fixed, for some ε > . In recent work, Spillner and Wolff [11] showed that geometric planar graphscan be untangled while keeping Ω( p log n/ log log n ) vertices fixed. The best known bound before that was [6]. In Section 4, we answer the question of Pach and Tardos [9] in the affirmative and provide the firstpolynomial lower bound for untangling geometric planar graphs. Specifically, our main result is that every n -vertex geometric planar graph can be untangled while keeping ( n/ / vertices fixed.There has also been considerable interest in untangling specific classes of geometric planar graphs.Spillner and Wolff [11] studied the untangling of geometric outerplanar graphs and showed that they canbe untangled while keeping p n/ vertices fixed; and that for every sufficiently large n , there is an n -vertexouterplanar graph that cannot be untangled while keeping more than √ n − − vertices fixed. Thus Θ( √ n ) is the tight bound for outerplanar graphs. A p n/ lower bound for trees was shown by Goaoc et al. [6].The best known upper bound for trees was O (( n log n ) / ) , which was in fact proved for geometric paths, byPach and Tardos [9]. In fact, Pach and Tardos [9] prove this upper bound for geometric cycles. However,their method readily applies for geometric paths. We answer a question posed by Spillner and Wolff [11]and close the gap for trees, by showing that for infinitely many values of n , there is a forest of stars that We consider graphs that are simple, finite, and undirected. The vertex set of a graph G is denoted by V ( G ) , and its edge set by E ( G ) . The subgraph of G induced by a set of vertices S ⊆ V ( G ) is denoted by G [ S ] . G \ S denotes G [ V ( G ) \ S ] . √ n − vertices fixed. This result is proved in Section 5.In addition, in Section 3, we demonstrate that every geometric tree can be untangled while keeping p n/ vertices fixed, thus slightly improving the p n/ lower bound of Goaoc et al. [6]. We conclude the paperwith some open problems.Untangling graphs has also been studied in [8, 12]. Goaoc et al. [6] also studied the computationalcomplexity of the related optimization problems and showed various hardness results. When proving lower bounds, our goal will be to show that given any geometric planar graph G we can find alarge subset R of vertices of G such that G can be untangled while keeping R fixed. The following geometriclemma simplifies this task by allowing us to concentrate on the case in which all vertices of R are on the y -axis. This lemma will be useful both for untangling geometric trees in Section 3 and for untangling generalgeometric planar graphs in Section 4. Lemma 1.
Let G be an untangling of some geometric planar graph G . Let R be a set of vertices of G suchthat each vertex of R is on the y -axis in G and has the same y -coordinate in G as in G . Then there exists anuntangling G ′ of G in which the vertices in R are fixed.Proof. The proof uses the fact that it is possible to perturb the vertices of a crossing-free geometric graphwithout introducing crossings. More precisely, for any crossing-free geometric graph there exists a value ε > such that each vertex can be moved a distance of at most ε , and the resulting geometric graph is alsocrossing-free. The maximum value ε for which this property holds is called the tolerance of the arrangementof segments. This concept, both for the geometric realization and the combinatorial meaning of the graphswas systematically studied in [1, 10].Consider the untangling G of G and let ε > be the value obtained when the above perturbationfact is considered for to G . Let X denote the maximum absolute value of an x -coordinate in G of a vertex in R . Let G ′′ be the geometric graph obtained from G as follows. For each vertex v ∈ R positioned at ( x , y ) in G , move v from (0 , y ) in G to ( x ε/X, y ) in G ′′ . The vertices not in R are unmoved. So each vertex moves adistance of at most ε , and G ′′ is crossing-free. Scale G ′′ by multiplying the x -coordinates of all vertices in G ′′ by X/ε to obtain a crossing-free geometric graph G ′ . Then every vertex of R has the same location in G ′ asit does in G . Thus G ′ is an untangling of G that keeps the vertices of R fixed. Goaoc et al. [6] proved a lower bound of fix ( T ) ≥ p n/ for every n -vertex geometric tree T . We nowgive a different construction that yields a slightly better constant. In addition to an improved constant, ourmotivation for including this result is that it provides a warm up to our main result, the polynomial lowerbound for planar graphs. Theorem 1.
Every n -vertex geometric tree T can be untangled while keeping at least p n/ vertices fixed. Thatis, fix ( T ) ≥ p n/ . In a vertex -colouring of T , the largest of the two colour classes has at least n/ vertices. Therefore,the following lemma, coupled with Lemma 1, implies Theorem 1.3 emma 2. Let T be an n -vertex geometric tree T whose vertices are -coloured. Let S be one of the two colourclasses. Then there exists a set R of vertices in T such that | R | ≥ p | S | and there is an untangling T ′ of T inwhich each vertex in R is on the y -axis and has the same y -coordinate in T ′ as in T .Proof. Root T at any vertex and label its vertices ( v , . . . , v n ) based on a postorder traversal of T .While we make no general position assumption on the vertices of T , we may assume, by a suitablerotation, that no pair of vertices of T have the same y -coordinate. Let R be a largest ordered subset R ⊆ S such that the y -coordinates of the vertices of R are either monotonically increasing or monotonicallydecreasing when considered in the order ( v , . . . , v n ) . By the Erd˝os-Szekeres Theorem [4], | R | ≥ p | S | .Without loss of generality, assume R is monotonically increasing.Let T ′ be a geometric tree obtained from T as follows. For each vertex v ∈ R positioned at ( x, y ) in T , move v to (0 , y ) in T ′ . Move each vertex in S \ R from its position in T to the y -axis, such that allthe vertices of S in T ′ appear in the order σ on the y -axis. The vertices in V ( T ) \ S remain unmoved. Tocomplete the proof of the lemma, it remains to show how to untangle T ′ while keeping S fixed. We provethat by induction on i , with the following induction hypothesis.For a point p with coordinates ( x, y ) , a right ray at p is the open half-line containing all the points ( x ′ , y ) where x ′ > x . Let T i := T ′ [ { v , . . . , v i } ] . For each i ∈ { , . . . , n } , there is an untangling T i of T i suchthat S ∩ V ( T i ) is fixed, and (1) for all j ∈ { , . . . , i } , the y -coordinate of v j is greater than the y -coordinate of v j − , and (2) for each vertex v whose parent in T is not in { v , . . . , v i } , the right ray at v does not intersect T i .Figure 1 depicts such an untangling of the complete binary tree of depth .
12 345 6789 101112 1314 151245789111214
Figure 1: An untangling of the complete binary tree of depth . Vertices of S are depicted by squares.For i = 1 , the statement is true trivially. Assume now that i > , and that the statement is true for i − . There are two cases to consider: v i ∈ S and v i S .Consider first the case that v i S . Since S is a colour class in a -colouring of T , each child of v i ,if any, is in S and thus is on the y -axis. Assign an y -coordinate to v i that is greater than the y -coordinate ofeach vertex in T i − and less than the y -coordinate of each vertex in S \ V ( T i − ) . This ensures that condition (1) is maintained in T i . Assign a positive x -coordinate to v i such that T i is crossing-free. Condition (2) on4 i − guarantees that this is always possible. Condition (2) is clearly maintained for v i in T i . The only othervertices of T i which may violate condition (2) , are vertices whose y -coordinates in T i are between that of v i and its smallest indexed child. However, since the vertices are indexed by the postorder traversal of T , allsuch vertices are in the subtree of T rooted at v i , and thus each of their parents is in T i . Therefore condition (2) is maintained in T i .To complete the proof we consider the case that v i ∈ S . We start with an observation. Consider avertex v ∈ V ( T i − ) \ S whose parent is not in T i − . Let the coordinates of v in T i − be ( x, y ) . Each childof v is in S and thus lies on the y -axis. Denote their y -coordinates by y , . . . , y d . By condition (1) , for each i ∈ { , . . . , d } , the right ray at (0 , y i ) can only be intersected by an edge incident to v in T i − . Thus v can bemoved to any position ( x ′ , y ) , x ′ ≥ , and the resulting untangling of T i − still satisfies the two conditions.We are now ready to untangle T i . Vertex v i is fixed, and thus its position in T i is predetermined. None of itschildren are in S . Thus we are allowed to move any child of v i from its position in T i − to a new position.By the above observation it is possible to move each child w of v i (one by one, in the decreasing order oftheir y -coordinates), such that the resulting untangling T ′ i − of T i − satisfies conditions (1) and (2) , and suchthat the open segment ( wv i ) does not intersect T ′ i − . Connect v i by a segment to each of its children in T ′ i − .Then the resulting untangling T i is crossing-free. Condition (1) is maintained since all the vertices of T i − have smaller y -coordinate that v i in T i . Condition (2) is maintained in T i by the same arguments used when v i S . Let G be an n -vertex geometric planar graph. In this section we prove that G can be untangled while keeping ( n/ / vertices fixed (as stated in Theorem 2 below). It suffices to prove this theorem for edge-maximalgeometric planar graphs. Thus for the remainder of this section assume that G is edge-maximal. Let E be an embedded planar graph isomorphic to G . Each face of E is bounded by a -cycle. Canon-ical orderings of embedded edge-maximal planar graphs were introduced by de Fraysseix et al. [2], wherethey proved that E has a vertex ordering σ = ( v := x, v := y, v , . . . , v n := z ) , called a canonical ordering ,with the following properties. Define G i to be the embedded subgraph of E induced by { v , v , . . . , v i } . Let C i be the subgraph of E induced by the edges on the boundary of the outer face of G i . Then • x , y and z are the vertices on the outer face of E , and • For each i ∈ { , , . . . , n } , C i is a cycle containing xy . • For each i ∈ { , , . . . , n } , G i is biconnected and internally -connected ; that is, removing any twointerior vertices of G i does not disconnect it. • For each i ∈ { , , . . . , n } , v i is a vertex of C i with at least two neighbours in C i − , and these neighboursare consecutive on C i − .For example, the ordering in Figure 2(a) is a canonical ordering of the depicted embedded graph E .We now introduce a new combinatorial structure that is critical to the proof of Theorem 2. The frame F of E is the oriented subgraph of E with vertex set V ( F ) := V ( E ) , where: • xy is in E ( F ) and is oriented from x to y . A planar graph H is edge-maximal (also called, a triangulation ), if for all vw E ( H ) , the graph resulting from adding vw to H isnot planar.
234 5 67 89 10111213 (a) (b)
Figure 2: (a) Canonical ordering of E , (b) Frame F of E . Vertices forming a largest antichain in < F , that isthe vertices in S , are depicted by squares. • For each i ∈ { , , . . . , n } in the canonical ordering σ of E , edges pv i and v i p ′ are in E ( F ) , where p and p ′ are the first and the last neighbour, respectively, of v i along the path in C i − from x to y not containing edge xy . Edge pv i is oriented from p to v i , and edge v i p ′ is oriented from v i to p ′ , asillustrated in Figure 2(b). We call p the left predecessor of v and p ′ the right predecessor of v .We also say that F is a frame of G . By definition, F is a directed acyclic graph with one source x and one sink y . F defines a partial order < F on V ( F ) , where v < F w whenever there is a directed pathfrom v to w in F .The remainder of this section is dedicated to proving the following two lemmas, which readily implythe desired result, as shown in the proof of Theorem 2 below. Lemma 3.
Every n -vertex geometric planar graph G whose partial order < F associated with its frame F has achain of size ℓ can be untangled while keeping p ℓ/ vertices fixed. Lemma 4.
Every n -vertex geometric planar graph G whose partial order < F associated with its frame F hasan antichain of size t can be untangled while keeping √ t vertices fixed. Theorem 2.
Every n -vertex geometric planar graph G can be untangled while keeping at least ( n/ / verticesfixed. That is, fix ( G ) ≥ ( n/ / .Proof. Let F be a frame of G and let < F be its associated partial order. If < F has a chain of size at least √ n then we are done by Lemma 3. Otherwise, by Dilworth’s theorem [3], < F has a partition into √ n antichains. By the pigeon-hole principle there is an antichain in that partition that has at least n √ n vertices,which completes the proof, by Lemma 4.The remainder of this section is dedicated to proving Lemma 3 and Lemma 4.6 .1 Big chain - Proof of Lemma 3 A chord of a cycle C is an edge that has both endpoints in C , but itself is not an edge of C . Consider a cycle C in an embedded planar graph E . C is called externally chordless if each chord of C is embedded inside of C in E . The following theorem is by Spillner and Wolff [11]. Theorem 3. [11] Let G be a geometric planar graph and E an embedding planar graph isomorphic to G . If E has an externally chordless cycle on ℓ vertices, then G can be untangled while keeping at least p ℓ/ verticesfixed. Note that this result is expressed in slightly different form in [11] (see Theorem in [11]). Lemma 5.
Consider any directed path on at least three vertices from x to y in F . The cycle comprised of thatpath and edge xy is externally chordless in E .Proof. Denote the cycle in question by C , and denote the directed path between x and y in C not containingedge xy by P . Consider a chord v i v j of C . Without loss of generality, v i < σ v j in the canonical ordering σ .Thus v i is in G j − and v i v j is an edge of G j . The neighbours of v j in G j − appear consecutively along theboundary C j − of G j − . Let x , . . . , x d be the neighbours of v j in left-to-right order on C j − . Thus x v j and v j x d are arcs in F . Let uv j and v j w be the incoming and outgoing arcs in P at v j . Then the counterclockwiseorder of edges incident to v j in E is ( u, . . . , x , . . . , x d , . . . , w, . . . ) . In particular, each edge v j x ℓ is containedin the closure of the interior of C . Now v i = x ℓ for some ℓ ∈ [1 , d ] . Thus v i v j is an internal chord of C .This lemma, coupled with Theorem 3, implies Lemma 3, as demonstrated below. Proof of Lemma 3. If ℓ < , the claim follows trivially. Assume now that ℓ ≥ . Since < F has a chain of size ℓ , < F has a maximal chain of size ℓ ′ ≥ ℓ . Every maximal chain in < F , is a path from x to y in F . Therefore,Lemma 5 implies that E contains an externally chordless cycle on ℓ ′ vertices, and the result follows fromTheorem 3. For each vertex v ∈ V ( F ) , we define Lroof ( v ) and Rroof ( v ) , as the following directed paths in F . Lroof ( v ) := ∅ and Rroof ( v ) := ∅ , Lroof ( v ) := ∅ and Rroof ( v ) := ∅ .For each i ∈ { , . . . , n } , define Lroof ( v i ) and Rroof ( v i ) recursively, as follows. Lroof ( v i ) := Lroof ( p ) ∪ { pv i } , and Rroof ( v i ) := { v i p ′ } ∪ Rroof ( p ) ,where p is the left and p ′ the right predecessor of v i . Finally, define the roof of v i to be roof ( v i ) := Lroof ( v i ) ∪ Rroof ( v i ) .Note that for each i ∈ { , . . . , n } , roof ( v i ) is a directed path in F from x to y containing v i , wherethe sub-path ending at v i is Lroof ( v i ) , and the sub-path starting v i is Rroof ( v i ) .Let S be the set of vertices that comprise a largest antichain in < F , as illustrated in Figure 2(b) withsquares. Now consider the given geometric graph G . We may assume, by a suitable rotation, that no pair ofvertices of G have the same y -coordinate. Let R be a largest ordered subset R ⊆ S such that the y -coordinatesof the vertices of R are either monotonically increasing or monotonically decreasing when considered in theorder given by σ . By the Erd˝os-Szekeres Theorem [4], | R | ≥ p | S | . Without loss of generality, assume R ismonotonically increasing. In what follows, we untangle G while keeping R fixed.Let H be the graph induced in E by the following set of vertices: V ( H ) := ∪{ roof ( w ) : w ∈ R } ; thatis, H = E [ V ( H )] . Note that H is not necessarily a subgraph of F , as illustrated in Figure 3.7
24 5 67 9 10 38111213
Figure 3: The graph H . The vertices in R ⊆ S are depicted by squares. Edges { , } , { , } , { , } , { , } , { , } , { , } and { , } are in H but not in F .We say that a simple polygonal chain C is strictly x -monotone if, for every vertical line ℓ , | C ∩ ℓ | ≤ .For two distinct points p and q in the plane, let ( pq ) denote the open line-segment with endpoints p and q . Asimple polygon C is star-shaped (from p ) if there is a point p such that for every point q ∈ C , ( pq ) ∩ C = ∅ .The following lemma is the main ingredient in the proof of Lemma 4. Lemma 6.
The geometric planar graph G [ V ( H )] can be untangled such that each vertex of R is on the y -axis andit has the same y -coordinate in the untangling as in G [ V ( H )] . Moreover, all the internal faces of the untanglingare star-shaped and the path on its outer face from x to y not containing xy is strictly x -monotone. We delay the proof of Lemma 6 until the end of the section. We first show how it implies our desiredresult when coupled with the following theorem by Hong and Nagamochi [7].
Theorem 4. [7] Consider a -connected embedded planar graph E , with outer facial cycle C . Given any geomet-ric cycle C that is star-shaped, and given any isomorphic mapping from V ( C ) to V ( C ) , there is a crossing-freegeometric graph E isomorphic to E with C as its outer face and respecting the vertex mapping.Proof of Lemma 4. Since < F has an antichain of size t , < F has a maximal antichain S of size t ′ ≥ t . Thenthe subset R ⊆ S , on which H is defined, has size | R | ≥ √ t . Thus by Lemma 6, G [ V ( H )] can be untangledsuch that the vertices of R are all on the y -axis and their y -coordinates are preserved. If z R , then assign x - and y -coordinates to z , and connect z to its neighbours in H , such that the resulting geometric graph H iscrossing-free and all the internal faces of H are star-shaped. This is always possible since the path from x to y on the outer face of the above untangled graph is strictly x -monotone. H is an untangling of G [ V ( H ) ∪{ z } ] .It remains to determine a placement of the remaining free vertices of G , that is vertices in V ( G ) \ V ( H ) . Vertices of V ( G ) \ V ( H ) can be partitioned into sets I j , ≤ j ≤ | E ( H ) | − | V ( H ) | + 1 , where eachvertex in I j is inside the cycle in E determined by the internal face f j of H . For each internal face f j of H , let G j be the following subgraph of E . The vertex set V ( G j ) is the union of V ( f j ) and I j . The edge set E ( G j ) is comprised of the edges of the cycle f j , the edges in E [ I j ] , and the edges between V ( f j ) and I j . Each f j isstar-shaped in H , by Lemma 6. Therefore, to apply Theorem 4, it remains to show that G j is -connected.Assume, for the sake of contradiction, that G j is not -connected. All the faces of G j are trianglesexcept possibly the outer face C j . Therefore, G j is internally -connected, that is, removing any two interiorvertices of G j does not disconnect it. Thus each cut-set of size of G j has a vertex, say v , that is in C j .8emoving v from G j results in a graph that is not -connected. The outer face C j has no chords, since f j isa face of H . Therefore, removing v from G j results in graph whose outer face is a cycle and all internal facesare triangles. Thus that graph is a -connected graph, which provides the contradiction.Applying Theorem 4 to embed each subgraph G j yields an untangling of G in which the vertices of R are all on the y -axis and have their y -coordinates preserved. Applying Lemma 1 to this untangling completesthe proof of the theorem.All that remains is to prove Lemma 6. Proof of Lemma 6.
The proof is by induction on the number of vertices in R . We start by considering someuseful properties of the roofs of two vertices in R .Consider two incomparable vertices, u and v in R (that is, two incomparable vertices in < F ), where u < σ v . Let x ′ be a vertex of F such that x ′ ∈ Lroof ( u ) and x ′ ∈ Lroof ( v ) , and the vertex following x ′ in Lroof ( u ) is not the same as the vertex following x ′ in Lroof ( v ) , as illustrated in Figure 4. Similarly, let y ′ be a vertex of F such that y ′ ∈ Rroof ( u ) and y ′ ∈ Rroof ( v ) , and the vertex before y ′ in Rroof ( u ) is not thesame as the vertex before y ′ in Rroof ( v ) . Such vertices, x ′ and y ′ , exist since u and v are incomparable in F . Then roof ( v ) and roof ( u ) have the following properties. The paths between x and x ′ in roof ( u ) and in roof ( v ) coincide in F , that is, the two paths are both equal to Lroof ( x ′ ) . Similarly, the paths between y ′ and y in roof ( u ) and in roof ( v ) coincide in F , that is, they are both equal to Rroof ( y ′ ) . The path between x ′ and y ′ in roof ( u ) contains u , the path between x ′ and y ′ in roof ( v ) contains v , and the two paths have only x ′ and y ′ in common. Finally, u is inside the cycle determined by roof ( v ) and edge xy in F . To summarise, forall u, v ∈ R , if u < σ v then each vertex of roof ( u ) is either on or inside the cycle determined by roof ( v ) andedge xy in F . x x ′ yy ′ uvuv Figure 4: Roofs of two incomparable vertices u and v of < F .We proceed by induction on the number of vertices in R , but require a somewhat stronger inductivehypothesis than the statement of the lemma. Let C be a simple strictly x -monotone polygonal chain. We saythat C is ε -ray-monotone from a point p = ( x p , y p ) if for every point r = ( x p , y p + t ) with t ≥ ε , and everypoint q ∈ C , ( rq ) ∩ C = ∅ . Informally, C is ε -ray-monotone from p if every point sufficiently far above p sees all of C . Note that, under this definition, if C is ε -ray-monotone from p then C is ε -ray-monotone fromany point q = ( x p , y p + t ) , t > , above p . Furthermore, there exists a value δ = δ ( p, C, ε ) such that C is ε -ray-monotone from any point p ′ whose distance from p is at most δ . (This follows from the fact that theset of points p from which C is ε -ray-monotone is an open set.)Let ε ′ be the minimum difference between the y -coordinates of any two vertices in R . We willconstruct a crossing-free geometric graph H that is an untangling of G [ V ( H )] . In addition to the conditionsof the lemma, H will have the following property: If | R | > then the outer face of H is bounded by the edge9 y and a path C from x to y such that C ∩ R = { v } , for some vertex v ∈ R , and C is ε -ray-monotone from v for some ε < ε ′ .The base case occurs when | R | = 0 . Then H consists of the single edge xy , which can be untangledby placing x at ( − , t ) and y at (1 , t ) , where t is smaller than any y -coordinate in G . Clearly this crossing-freegeometric graph satisfies the conditions of the lemma as well as the inductive hypothesis. Next, suppose | R | ≥ and let v be the largest vertex of R in the total order σ . If | R | = 1 , let H ′ be the subgraphof H induced by { x, y } , otherwise, | R | > and let H ′ be the subgraph of H induced by the vertices in ∪{ roof ( u ) : u ∈ R \ v } . By induction, we can untangle G [ V ( H ′ )] to obtain a crossing-free geometric graph H ′ that satisfies the inductive hypothesis and the conditions of the lemma. It remains to place v and thevertices of roof ( v ) that are not yet placed. As described above, these vertices form a path P that goes fromsome vertex x ′ of H ′ to v to some vertex y ′ of H ′ .The conditions of the lemma specify the location of v . In particular, v is on the y -axis, with its y -coordinate equal to its y -coordinate in G . The inductive hypothesis guarantees that the vertex v and anypoint sufficiently close to v can see all vertices of the outer face of H ′ . Finally, we note that, if | R | > , thendirectly below v , on the y -axis, is a vertex u ∈ R . The fact that u is on the y -axis and that the outer face of H ′ is strictly x -monotone implies that the x -coordinate of x ′ is less than 0 and that the x -coordinate of y ′ isgreater than 0. (For the special case when x ′ = x and/or y ′ = y , the above statement is still true.)Next we place the interior vertices of P to obtain the crossing-free geometric graph H . To do this,we draw a unit circle c , containing v , whose center is on the y -axis and below v . We place all interior verticesof P on c and sufficiently close to v so that: (1) the path on the outer face of H from x to y not containing xy is strictly x -monotone, (2) all interior vertices of P see all other vertices of P in H , (3) all interior vertices of P see all vertices on the outer face of H ′ between x ′ and y ′ , and (4) the path on the outer face of H from x to y not containing xy is ε -ray-monotone from v for some ε < ε ′ .That the first condition can be achieved follows from the fact that x ′ and y ′ are to the left and right, respec-tively, of the y -axis. That the second condition can be achieved follows from the fact that we are placingthe interior vertices of P on a convex curve (a circle) as close to v as necessary. The third condition canbe achieved since the upper chain of H ′ is ε -ray-monotone from u and hence also from v . That the fourthcondition can be achieved follows from the definition of ε -ray-monotonicity and the first condition.Consider the path in H ′ from x to y not containing xy along the outer face of H ′ . This path iscomprised of the same vertices and edges as a directed path from x to y in F . Thus, by Lemma 5, the outerface of H ′ has no outer chords in H . Therefore, an edge of H that is not an edge of H ′ is either an edge on P , or it is an edge accounted for in Conditions (2) or (3) above. Thus H is crossing-free. The vertices in R are all on the y -axis and all have the same y -coordinates in G as in H . Conditions (1) (and (4) ) imply thatthe path between x and y on the outer face of H is strictly x -monotone. It remains to show that the internalfaces of H are star-shaped. The only new faces in H not present in H ′ are the faces having interior verticesof P on their boundary. However, Conditions (2) and (3) above imply that each such face is star-shaped fromsome interior vertex of P . This completes the proof of the lemma. In this section we prove the following theorem. Given a geometric graph, we say that a point p in the plane sees a point q , if ( pq ) does not intersect the graph. heorem 5. For every positive number n such that √ n is an integer, there exists a geometric forest (of stars) G on n vertices, such that fix ( G ) = 3( √ n − . That is, G cannot be untangled while keeping less than √ n − vertices fixed, and G can be untangled while keeping exactly that many vertices fixed.Proof. We first define G . A k -star is a rooted tree on k + 1 vertices one of which is the root and the rest ofthe vertices are leaves adjacent to that root. G is a forest on n vertices comprised of trees, T i , ≤ i ≤ √ n ,where each T i is a ( √ n − -star. All the vertices of G lie on the x -axis. For each i , the vertices of T i have thefollowing x -coordinates i, i + √ n, . . . , i + √ n ( √ n − where the vertex with the maximum x -coordinate isthe root of T i . This completes the description of G . Upper bound:
We first prove that fix ( G ) ≤ √ n − ; that is, we prove that G cannot be untangled while keepingmore than √ n − vertices fixed. Let H be an untangling of G with fix ( G ) vertices fixed. Let ℓ denote thenumber of fixed leaves and r the number of fixed roots. Let r ′ denote the number of fixed roots that areadjacent to a fixed leaf. Given the ordering of the vertices of G on the x -axis, it is clear that r ′ ≤ .Partition the set of free roots into two sets. Let A be the set containing the free roots that are on orabove the x -axis in H . Let B be the set containing the free roots that are strictly below the x -axis in H . Ourreason for this non-symmetric definition of A and B is to avoid double counting, and not because free rootson the x -axis have any special meaning. The total number of roots of G is | A | + | B | + r .Suppose that the number of fixed leaves with a neighbour (i.e., a parent) in A is at most √ n − | A | ,and similarly for the number of fixed leaves with a neighbour in B . As noted above, at most one fixedleaf can be adjacent to a fixed root, thus ℓ ≤ √ n − | A | + | B | + r ′ . Since fix ( G ) = ℓ + r , we get fix ( G ) ≤ √ n − | A | + | B | + r ′ + r . Having | A | + | B | + r = √ n further implies that fix ( G ) ≤ √ n − r ′ .Since r ′ ≤ , we get the desired upper bound.Thus to complete the proof of the upper bound it remains to prove that the number of fixed leaveswith a neighbour in A is at most √ n − | A | . The proof below has no special case for the free roots thatare on the x -axis, so the proof for the number of fixed leaves with a neighbour in B is analogous.Partition the leaves of G into a set of blocks { P j : 1 ≤ j ≤ √ n − } , such that P contains the first √ n leaves on the x -axis, P the next √ n leaves, and so on. More formally, P j contains all the leaves with x -coordinate in the range [1 + ( j − √ n, j √ n ] . Note that each block contains exactly one leaf from each starof G . There are √ n − blocks, each containing √ n vertices.Define an auxiliary graph Q with vertex set V ( Q ) = A ∪ { p j : 1 ≤ j ≤ √ n − } , where vp j ∈ E ( Q ) precisely if v is a vertex of A and v has a fixed neighbour in block P j . Thus Q is a bipartite graph, whereone bipartition is precisely the set A . Note that | V ( Q ) | = | A | + √ n − . Since each vertex of A hasexactly one neighbour in each block, the number of fixed leaves whose parents are in A is precisely | E ( Q ) | .We now show that Q has no cycles. That will complete the proof of the upper bound since in that case | E ( Q ) | ≤ | V ( Q ) | − | A | + √ n − .Assume for the sake of contradiction that Q has a cycle. Let C be a shortest cycle in Q . Every secondvertex of C is a vertex of A . The remaining vertices of C correspond to blocks of leaves. Let C H be the subsetof V ( H ) containing all the roots in V ( C ) ∩ A and for each of those roots, C H also contains all its fixed leavescontained in blocks P j for which p j is in C .Consider the geometric graph H [ C H ] . The fact that C is a (shortest) cycle and that each vertex in A has exactly one leaf in each block, implies that H [ C H ] is a geometric forest of -stars, where the vertices in V ( C ) ∩ A have degree in H [ C H ] and each block P j such that p j ∈ V ( C ) \ A has precisely two fixed leavesin H [ C H ] . 11ince H is crossing-free, so is H [ C H ] . Furthermore, since all the roots in C H are on or above the x -axis and all the leaves of C H are on the x -axis, H [ C H ] is fully contained in a closed half-plane determined bythe x -axis. We now show that H [ C H ] cannot be crossing-free, which will provide the desired contradiction. H [ C H ] is a crossing-free geometric forest of -stars. We first expand H [ C H ] into a crossing-free geometriccycle by adding some segments to it, as follows. Consider blocks that contain a leaf of H [ C H ] . Each suchblock P j contains exactly two leaves of H [ C H ] , denoted by j and j (see Figure 5). We claim that ( j j ) ∩ H [ C H ] = ∅ . There is no edge of H [ C H ] that properly crosses ( j j ) , since H [ C H ] is fully contained in a closedhalf-plane determined by the x -axis. Therefore, ( j j ) ∩ H [ C H ] can be non-empty only if there is an edgeof H [ C H ] fully contained in ( j j ) . That implies that there is a root of H [ C H ] that is located on the x -axisbetween j and j . That however is impossible, since one of the two edges of H [ C H ] incident to that rootwould contain j or j in its interior. This observation implies that H [ C H ] can be extend into a crossing-free geometric cycle R by adding the appropriate line segments into each block that contains a leaf of H [ C H ] . j j P j j j P j Figure 5: Two -stars (one depicted in green and the other in red) with leaves in a common block.Let v be, among all the roots in C H , the one with the smallest index; that is, there is no other root w ∈ C H where v ∈ T i and w ∈ T j and j < i . Vertex v has two neighbours (fixed leaves) in H [ C H ] , s ∈ P s and t ∈ P t (see Figure 6). Vertex s has two neighbours in R . One is v , and the other is a vertex (fixedleaf) s ∈ P s . Similarly, t is adjacent in R to v and to a vertex (fixed leaf) t ∈ P t . Therefore, R containstwo vertex disjoint paths: R , between s and t , and R , between s and t . Since v belongs to the smallestindexed tree, the ordering of their endpoints on the x -axis is s < s < t < t . With such ordering ofendpoints and since R is fully contained in the closed half-plane above the x -axis, it is impossible to draw R and R without crossings (since R separates the closed half-plane above the x -axis into two components,one containing s and one containing t ). That is the desired contradiction. R R s s t t P s P t Figure 6: Illustration for the proof of the upper bound of Theorem 5.
Lower bound:
We now prove that fix ( G ) ≥ √ n − , that is, we prove that G can be untangled while keeping √ n − vertices fixed. Keep the followings vertices of G fixed: (1) all the leaves of T and T , and (2) all the vertices in the block P √ n − , and (3) the root of T √ n .Move the root of T to the half-plane above the x -axis and move the root of T to the half-plane12elow the x -axis. For all ≤ i ≤ √ n − , move all the free vertices of T i to a very small disk centered at thefixed leaf of T i . Move all the free leaves of T √ n to a small disk centered at the root of T √ n . Clearly, this canbe done such that the resulting geometric forest H is crossing-free, as illustrated in Figure 7. The number offixed vertices of H is √ n −
1) + ( √ n −
2) + 1 = 3 √ n − , as claimed. b b b P P P k − P k bbb bbb T b b b T k − T T bbb T k Figure 7: Untangled forest G with √ n − vertices fixed ( k = √ n ). Polynomial bounds are now known for untangling all classes of planar graphs. Tight bounds (up to a con-stant) are known for untangling trees and outerplanar graphs. The gap remains open for untangling geomet-ric cycles where the best known lower and upper bounds are √ n and O (( n log n ) / ) , and geometric planargraphs where the best known lower and upper bounds are Ω( n / ) and O ( √ n ) . Acknowledgements
This research was initiated at the Bellairs Workshop on Computational Geometry for Geometric Reconfigura-tions, February 1st to 9th, 2007. The authors are grateful to Godfried Toussaint for organizing the workshopand to the other workshop participants for providing a stimulating working environment.
References [1] M. A
BELLANAS , F. H
URTADO , AND
P. R
AMOS , Tolerancia de arreglos de segmentos (in spanish). In
Proc.VI Encuentros de Geometr´ıa Computacional , pp. 77–84, 1995.[2] H. DE F RAYSSEIX , J. P
ACH , AND
R. P
OLLACK , How to draw a planar graph on a grid.
Combinatorica , :41–51, 1990.[3] R. P. D ILWORTH , A decomposition theorem for partially ordered sets.
Ann. of Math. (2) , :161–166,1950.[4] P. E RD ˝ OS AND
G. S
ZEKERES , A combinatorial problem in geometry.
Composito Math. , :464–470, 1935.[5] I. F´ ARY , On straight line representation of planar graphs.
Acta Univ. Szeged. Sect. Sci. Math. , :229–233, 1948.[6] X. G OAOC , J. K
RATOCHVIL , Y. O
KAMOTO , C.-S. S
HIN , AND
A. W
OLFF , Moving vertices to make draw-ings plane. In
Proc. 15th International Symp. on Graph Drawing (GD ’07) , 2008, to appear. Also in http://arxiv.org/abs/0706.1002 . 137] S.-H. H
ONG AND
H. N
AGAMOCHI , Convex drawings of graphs with non-convex boundary. In F. V.F
OMIN , ed.,
Proc. 32nd Workshop on Graph Theoretic Concepts in Computer Science (WG ’06) , vol. 4271of
Lecture Notes in Computer Science , pp. 113–124, Springer, 2006.[8] M. K
ANG , M. S
CHACHT , AND
O. V
ERBITSKY , How much work does it take to straighten a plane graphout?, 2007, http://arxiv.org/abs/0707.3373 .[9] J. P
ACH AND
G. T
ARDOS , Untangling a polygon.
Discrete Comput. Geom. , :585–592, 2002.[10] P. R AMOS , Tolerancia de estructuras geom´etricas y combinatorias ( in Spanish) . Ph.D. thesis, UniversidadPolit´ecnica de Madrid, Madrid, Spain, 1995.[11] A. S PILLNER AND
A. W
OLFF , Untangling a planar graph. In
Proc. 34th Internat. Conf. on Current Trendsin Theory and Practice of Computer Science (SOFSEM’08) , vol. 4910 of
LNCS , Springer-Verlag, 2008, toappear. Also in http://arxiv.org/abs/0709.0170 .[12] O. V
ERBITSKY , On the obfuscation complexity of planar graphs, 2007, http://arxiv.org/abs/0705.3748 .[13] K. W
AGNER , ¨Uber eine Eigenschaft der ebene Komplexe.
Math. Ann. ,114