Obstacle Numbers of Planar Graphs††thanks: P. Ossona de Mendez was supported by grant ERCCZ LL-1201 and by the European Associated Laboratory “Structures in Combinatorics” (LEA STRUCO). P. Valtr was supported by project CE-ITI no. P202/12/G061 of the Czech Science Foundation (GAČR).
Given finitely many connected polygonal obstacles in the plane and a set of points in general position and not in any obstacle, the visibility graph of with obstacles is the (geometric) graph with vertex set , where two vertices are adjacent if the straight line segment joining them intersects no obstacle.
The obstacle number of a graph is the smallest integer such that is the visibility graph of a set of points with obstacles. If is planar, we define the planar obstacle number of by further requiring that the visibility graph has no crossing edges (hence that it is a planar geometric drawing of ).
In this paper, we prove that the maximum planar obstacle number of a planar graph of order is , the maximum being attained (in particular) by maximal bipartite planar graphs.
This displays a significant difference with the standard obstacle number, as we prove that the obstacle number of every bipartite planar graph (and more generally in the class PURE-2-DIR of intersection graphs of straight line segments in two directions) of order at least is .
Let be closed connected polygonal obstacles in the plane, and let be a finite set of points not in any obstacle. We assume that all the points in and all vertices of the polygons are in general position, that is that no three of them are on a line. Note that by considering some -neighborhood of the obstacles, we see that considering closed or open obstacles makes no difference (thanks to our general position assumption). Also, allowing or forbidding holes in obstacles makes no difference, as holes disappear if we drill a narrow passage from the outside boundary of an obstacle to each hole inside the obstacle.
The visibility graph of with obstacles is the geometric graph with vertex set , where two vertices are connected by an edge (geometrically represented by the segment ) if the segment does not meet any of the obstacles. Visibility graphs have been extensively studied, see [5, 13, 17, 18, 23].
Closely related to visibility representation, Alpert et al.  introduced the obstacle number of a graph , which is the minimum number of obstacles in a visibility representation of . For instance, it is known that bipartite graphs can have arbitrarily large obstacle number . Moreover it was shown in  that there are graphs on vertices with obstacle number at least . Although there is a trivial quadratic upper bound for the obstacle number, it is an open problem whether the obstacle number has a linear upper bound [1, 14]. An unexpected, almost linear upper bound () was recently obtained in . For related complexity issues we refer the reader to [4, 20].
However the situation changes when one restricts his attention to planar graphs. Finding a planar graph with obstacle number greater than one was an open problem [1, 14] until it was recently proved  that the icosahedron has obstacle number . It is still an interesting open problem to decide whether the obstacle number of planar graphs can be bounded from above by a constant. This has been verified for outerplanar graphs by Alpert et al. , who proved that every outerplanar graph has obstacle number at most (see also ). In this paper we complement this partial result by proving that planar bipartite graphs have obstacle number at most .
When considering a planar graph , the existence of a planar visibility representation of suggests another definition of the obstacle number. Here planar visibility representation means a geometric visibility graph in which no two edges cross (see Fig 1). We define a new graph invariant, the planar obstacle number of , as the minimum number of obstacles in a planar visibility representation of . (Note that in this context, it will be convenient to assume that obstacles are domains, that are open connected sets.)
2 Our results
For a planar graph , the planar obstacle number of , denoted by , is defined as the minimum number of obstacles needed to realize by a straight-line planar drawing of and a set of obstacles.
For we further define
The above definitions are correct due to Fáry’s theorem  which says that every planar graph has a straight-line planar drawing; we call any such drawing a Fáry drawing. Slightly perturbing the set of vertices if necessary, we get a Fáry drawing with vertices lying in general position. Then it is possible to realize the graph by putting a small obstacle in each face, and this bound can be reduced by one if is not a tree (in which case, for some embedding of , one can remove the obstacle of the outer face). Hence for a graph with vertices and edges this gives the bound .
Obviously, . In the following theorem we determine for all .
Also we can bound by means of the number of edges, vertices and triangular faces. For a planar graph , let be the maximum number of triangular faces in a planar drawing of . It is easily checked that one can drop an obstacle in any set of non-adjacent triangles, which improves the trivial upper bound to
For every connected planar graph with vertices and edges, the following inequalities hold:
More precisely, if we have
In the proof of this theorem, a key argument is that when two adjacent triangles have a non-convex union, the obstacles in these triangles may sometimes be dropped, but not always as witnessed by the following example:
Note that a linear time representation algorithm (starting from an embedding of ) is easily derived from our proofs. However, choosing an embedding in order to maximize is difficult in general, as a reduction from minimum dominating set problem in planar graphs with maximum degree shows that deciding (for input ) wether is an NP-hard problem.
Planar obstacle number displays a significant difference with the standard obstacle number, as witnessed by the conjecture that planar graphs have bounded obstacle number.
Using a combinatorial characterization of visibility graphs with a single unbounded obstacle and vertices in convex position (Lemma 6) we determine the obstacle number of PURE-2-DIR graphs, where PURE-2-DIR graphs are intersection graphs of straight line segments with directions such that any two segments belonging to a same direction are disjoint .
Let be a PURE-2-DIR graph (i.e. a graph representable by intersection of straight line segments with directions with no two segments in a same class intersecting). Then the obstacle number of is either (if is or ) or (otherwise).
As it is known that every bipartite planar graph is a PURE-2-DIR graph, and more precisely has is the contact graph of a family of horizontal and vertical straight line segments in the plane  we immediately deduce from Theorem 2.3 the value of the planar obstacle number of bipartite planar graphs:
The obstacle number of a bipartite planar graph is either (if is or ) or (otherwise).
In this paper, we consider graphs that are finite, simple, and loopless.
A drawing of a graph in the plane consists in assigning distinct points of the plane to the vertices of , and arcs connecting points to edges. A drawing is simple if any two arcs intersect at most once, and it is geometrical if the arcs are straight line segments.
A planar graph is a graph that has a drawing in the plane in which no two arcs cross. Such a drawing is called an embedding of the graph. A planar graph embedded in the plane is called a plane graph. A face of a plane graph is a connected component of the complement of the drawing in the plane. A face is bounded (or an inner face) if it has a bounded diameter, it is unbounded otherwise. Note that every plane graph has exactly one unbounded face, which is called the outer face. The traversal of the boundary of a face then produces a sequence of edges (precisely of arcs representing edges), whose length is the length of the face. Note that if the graph is -connected, the boundary of each face is a cycle, whose length is the length of the face (in general, bridges are counted twice). Each face of a (loopless simple) -connected graph has thus length at least . A topological embedding of a planar graph in the plane is the equivalence class of an embedding of in the plane under homeomorphisms of the plane. As they are invariant by every homomorphism of the plane, one can speak about the faces, inner faces, and outer face of a topological embedding of a planar graph in the plane. It is well known that a topological embedding in the plane is fully determined by the cyclic order of the incident edges around each vertex of the graph and the specification of the outer face. For more informations and background on topological graph embeddings we refer the reader to .
Every (simple) planar graph has a Fáry drawing, that is a crossing free geometric drawing  (see also ), and that such a drawing — with points in a linear size grid — can be computed in linear time [10, 11]. A planar drawing of a graph in which every face is a -cycle (i.e. has length ) is a triangulation. A maximal planar graph is a planar graph to which no edge can be added while preserving the planarity. It is easily checked that a planar graph is maximal if and only if some/every planar drawing of it is a triangulation.
By definition, every planar visibility representation of a graph defines a Fáry drawing of , each obstacle lying inside a single face of the drawing. It follows that any obstacle can be extended to any connected subset of the interior of the face. Thus, when minimizing the number of obstacles we may assume that every face contains at most one obstacle, and that if contains an obstacle, this obstacle is large enough to intersect every segment intersecting which connects two independent vertices of . Note that such a planar visibility representation is thus characterized by a Fáry drawing of and the set of its faces containing an obstacle.
Observe that if is a Fáry drawing of a connected planar graph and is an inner face of which is not bounded by a -cycle then some straight-line diagonal of lies entirely in and therefore any realization of using must contain an obstacle lying inside the face .
It follows from Tutte’s spring theorem  that if a cycle of a planar graph bounds some face of some planar drawing of , then has a Fáry drawing such that the boundary of the outer face is the cycle drawn as the boundary of a convex polygon.
We first prove a weaker statement than Theorem 2.2, which determines the planar obstacle number for connected planar graphs not admitting more than one triangular face in any planar drawing, as given by (3), as well as the lower bound of (2).
For every connected planar graph with vertices and edges, it holds
where equality with the upper bound holds if and only if or .
Thus if then
For the lower bound, remark that every planar visibility representation defines a Fáry drawing with inner faces. In this drawing, every inner face with length at least has to contain an obstacle. Thus if (so that ) it holds .
If a planar graph is acyclic, it obviously holds . Otherwise, there exists a planar embedding of with a face which is a cycle. Using Tutte’s spring embedding, there exists a Fáry drawing of whose outer face is a convex polygon. Putting an obstacle in each of the inner faces we get a planar visibility representation of . Thus for every planar graph on vertices it holds
and equality holds if and only if has no embedding with a triangular face or . Indeed, assume . Consider an embedding of with an inner triangular face . At most one more face can contain all of , for if three faces would contain all of , adding a vertex in each of these faces adjacent all of would lead to a planar embedding of the non-planar graph . As the embedding has at least three faces, including one face which does not contain all of . We may assume that is the outer face. As is not acyclic, includes (at least) one cycle . For each cut-vertex of , we flip the connected components of that do not contain into an inner face different from (such a face exists, as otherwise would contain all the three vertices of ). After this is done, the outer face is and is an inner face. Using Tutte’s spring embedding one obtains a Fáry drawing of , in which is the outer face (drawn as a convex polygon) and is an inner triangular face. Putting an obstacle in every inner face different from we get a planar visibility representation of with obstacles. ∎
4.1 Three lemmas
An edge of a Fáry drawing of a planar graph is said to be concave if it lies in two triangular faces and the union of these two faces is a non-convex quadrilateral. (If is a triangulation then such an edge is sometimes called a non-flippable edge in the literature.)
Suppose is a triangulation, are three vertices of , and is a subset of the edge set of . Then we say that a Fáry drawing of is -concave if are the vertices of the outer face and all the edges of are concave.
For a graph , an edge set is said to be sparse in if each cycle in contains at least two edges of .
For every triangulation there is a -coloring of the faces of such that the set of edges contained in a pair of faces of the same color is sparse in .
For a -coloring of the faces of , let be the set of edges contained in a pair of faces of the same color. Let be a -coloring of the faces of minimizing the size of , and let be any fixed (topological) planar drawing of . Any cycle of contains at most edges of , since otherwise the size of could be decreased by flipping the colors of all the faces lying inside the cycle in the drawing . Thus, is sparse and satisfies Lemma 2. ∎
Let be a triangulation having a face with vertices , , , and let be a sparse set of edges of . Then has an -concave drawing.∎
Let be a planar triangulation, let be a spanning subgraph of which includes all the edges of a face bounded by a triangle of , let be a -coloring of the faces of such that the set of edges of contained in a pair of faces of the same color is sparse, let be an -concave drawing of , and let be the Fáry drawing of obtained from by the removal of all the edges of .
Then by placing an obstacle in each face of that is not a triangular inner face with color we get a planar visibility representation of .
Let be a pair of non-adjacent vertices of , and let be the sequence of the faces of intersected in this order by the segment (faces may appear more than once in this sequence), and let be their closure. We have to show that at least one of the faces is not a triangular face colored . Suppose for contradiction this is not the case and that are triangular faces colored .
If then is not a triangular face, contradicting the assumption.
if , since lies in it is concave in (and also in ), and is a triangle. This contradicts the assumption that the segment is included in , which necessarily implies that is a convex quadrilateral.
If then all the edges lie in and therefore the boundary of contains two edges in , contradicting the assumption that is sparse.
4.2 The proof
Let . By Euler’s formula every Fáry drawing of has inner faces. Each of them is a quadrilateral and therefore has to contain an obstacle. Thus, . In order to prove Theorems 2.1 and 2.2 it remains to prove that for a graph on vertices and edges the following inequality holds: .
First we show that it suffices to prove the upper bound for all connected planar graphs on vertices. This will easily follows from the next lemma which relies on an invariant closely related to . The invariant is defined as the minimum number of obstacles lying in inner faces of a realization of , where the minimum is taken over all possible realizations of . It follows from the definition that if every realization of with obstacles uses only obstacles in the inner faces. Otherwise we have .
Let be a disconnected planar graph, and let be the components of .
For a realization of with the given number of obstacles, suppose first that for some . We realize the component with obstacles. Inside one of its obstacles we make small individual holes for the remaining components. Each component , , is realized in “its” hole using obstacles placed inside its inner faces. The boundary of the hole surrounds the drawing of so that the surrounding obstacle functions for as an obstacle in the outside face of . If there is no component with then we proceed similarly as above, realizing the components inside individual holes of one big obstacle.
It remains to show that cannot be realized with a smaller number of obstacles. Consider a realization of , and let be one of its components. If we consider only the edges of , one or more obstacles must appear in at least inner faces of the drawing of . Let be one of these faces. The interior of may contain other components of but (at least) one of the obstacles inside does not lie in any face of a component of lying inside , as otherwise a vertex of would see a vertex of a component lying inside . Assigning this obstacle to , we get at least obstacles assigned to and to no other component of . This gives the lower bound . Suppose now that there is no with . Then there must be a component incident to the outer face of the drawing of . We have or . It follows that either we need an additional obstacle in the outer face of which does not lie inside another component of , or at least faces of contain obstacles and we may assign at least obstacles to the component . ∎
Observe that and for any other connected graph on at most four vertices. Therefore, due to Lemma 5 and to the trivial inequality , it suffices to prove the upper bounds in Theorems 2.1 and 2.2 for connected planar graphs (on and vertices, respectively).
Let be a connected planar graph on vertices. We want to show that . Let be a Fáry drawing of . We distinguish the following two cases: either has a triangular face, or no face of is triangular.
In the latter case, thus . Hence by Lemma 1 .
In the rest of the proof we suppose that has at least a triangular face . By adding straight-line edges to we obtain a Fáry drawing of a triangulation further denoted .
Let be a -coloring of the faces of satisfying Lemma 2, and let be the set of edges of contained in a pair of faces of the same color. Due to Lemma 3, has an -concave drawing . Let be the Fáry drawing of obtained from by the removal of all the edges of .
We denote the colors of by and . We partition the set of the inner faces of into the following three subsets:
the set of the triangular inner faces of having color ,
the set of the triangular inner faces of having color ,
the set of the non-triangular inner faces of .
Since has inner faces and each face in is the union of at least two faces of , we have . It follows that . Also we have and . Hence , and
Without loss of generality we suppose that
To prove — from which Theorems 2.1 and 2.2 follow — it now suffices to prove that taking the Fáry drawing and placing an obstacle in each face of gives a representation of , what follows from Lemma 4. This finishes the proof of Theorem 2.1. The proof of Lemma 3, which will be included in the full version of the manuscript, is only sketched here.
4.3 Sketch of the proof of Lemma 3
We proceed by induction on . The case is trivial and the case is easy. Suppose now that . If is empty or contains only an edge of the triangle then any Fáry drawing of with the outer face is -concave. Suppose now that an edge is not an edge of the triangle . Let Tr be the set of all triangles of containing the edge . We fix a Fáry drawing of with the outer face . The set Tr can be partitioned into two sets and , such that contains the triangles of Tr lying on one side of and contains the triangles of Tr lying on the other side of . Since is a triangulation and is an inner edge in , the set contains a unique face of . Similarly, contains a unique face of . Let be the unique triangle in containing all the other triangles of in the drawing . The triangle is defined analogously. Note that if then . Analogously, if then .
Without loss of generality, we may assume that in clockwise order one finds for the triangle , for the triangle , for the triangle , and for the triangle .
We define a triangulation as the triangulation obtained from by the planar contraction of with respect to , i.e., it is the graph obtained from by the following two operations: (i) removal of all the vertices and edges lying inside the triangles and in , and (ii) contraction of . Thus, is contracted to a new vertex and the triangles and (including their interiors in ) are replaced by the new edges and , respectively. The drawing and the construction of immediately give a (topological) planar drawing of with each face being a triangle and with the outer face . Let denote the triangulation consisting of the vertices and edges lying in the triangle in the drawing . Analogously, let denote the triangulation consisting of the vertices and edges lying in the triangle in the drawing . Further, let and .
We can prove the following two observations: (1) is sparse in , and is sparse in ; (2) is sparse in .
Hence we can apply the inductive hypothesis (i) on and , (ii) on and , and (iii) on and . In the first case we get an -concave drawing of with the outer face . In the second case we get an -concave drawing of with the outer face . In the third case we get an -concave drawing of with the outer face . Our construction of an -concave drawing of is obtained by properly combining the drawings , and . Starting with , we replace the vertex by a short segment and the two edges and by skinny copies of and , respectively, in such a way that the edge is concave in the resulting drawing, thus proving Lemma 3 (details omitted here). ∎
5 Obstacle number of Intersection Graphs of Segments
Generally, it is an interesting question to characterize graphs with obstacle number , and specifically those graphs that can be represented using a single unbounded obstacle.
It is easily seen that a graph has such a representation if and only if it is an induced subgraph of the visibility graph of a simple polygon. However, no characterization is known for visibility graphs of simple polygons. However one can give some interesting characterization in a special case:
A graph has a representation as a visibility graph with a single unbounded obstacle and vertices in convex position if and only if there exist functions mapping the vertex set of to points (resp. to circular arcs) of , in such a way that
for every vertex of it holds ;
for every distinct vertices of , it holds that and are adjacent if and only if and .
The existence of a visibility representation from functions and is clear, and follows the same ideas as the representation for intersection graphs of horizontal and vertical segments.
Conversely, assume that is representable as a visibility graph using a single unbounded obstacle, and consider such a representation. Without loss of generality, we can assume that the obstacle is the exterior of a simple polygon, on which lie the vertices of . Let be the vertices of in the order in which they appear on the polygon (say clockwise), and let . Let us now prove that and are adjacent if and only if there exist and such that
in circular order, is between and and is between and ;
is adjacent to both and and is adjacent to both and .
If and are adjacent, one can let and . Conversely, if have the properties above, then let (resp. ) be the intersection of segments and (resp. of segments and ). Then the region delimited by the quadrangle does not meet the obstacle, thus is visible from , that is and are adjacent.
Let us now define functions and : for let and be the inclusion minimum circular arc containing all the neighbours of but not . It follows from the property above that the functions and satisfy the requirements of the Lemma. ∎
We now prove Theorem 2.3, which states that the obstacle number of a PURE-2-DIR graph can be computed as follows:
and then deduce Theorem 2.4.
Proof (Proof of Theorem 2.3)
Let be a PURE-2-DIR graph. Without loss of generality, we can assume that segments are either horizontal or vertical, and that they are numbered from top to bottom and left to right. Hence, denoting the vertices corresponding to the horizontal segments and by the vertices corresponding to the vertical segments, it is easily checked that is adjacent to if and only if there exist and such that and are adjacent to and and are adjacent to . The result then follows from Lemma 6 (see Fig. 3 for an example of a single obstacle representation of a PURE-2-DIR graph). ∎
Proof (Proof of Theorem 2.4)
Note that the linear time algorithm to compute a representation of a bipartite planar graph as a PURE-2-DIR graph given in  can be easily modified to provide a linear time algorithm providing a representation of a planar bipartite graph as the visibility graph of a family of points with a single polygonal obstacle.
We thank Vít Jelínek for ideas leading to a simplification of our proof. We also thank Daniel Kráľ and Roman Nedela for inspiring comments on our research.
-  H. Alpert, C. Koch, and J.D. Laison. Obstacle numbers of graphs. Discrete & Computational Geometry, 44(1):223–244, Jul 2010.
-  M. Balko, J. Cibulka, and P. Valtr. Drawing graphs using a small number of obstacles. In E. Di Giacomo and Anna Lubiw, editors, Graph Drawing and Network Visualization: 23rd International Symposium, GD 2015, Los Angeles, CA, USA, September 24-26, 2015, Revised Selected Papers, pages 360–372, Cham, 2015. Springer International Publishing.
-  L.W. Berman, G.G. Chappell, J.R. Faudree, J. Gimbel, C. Hartman, and G.I. Williams. Graphs with obstacle number greater than one. arXiv:1606.03782, 2016.
-  S. Chaplick, F. Lipp, J. Park, and A. Wolff. Obstructing visibilities with one obstacle. arXiv:1607.00278, 2016.
-  M. De Berg, M. Van Kreveld, M. Overmars, and O.C. Schwarzkopf. Computational geometry. In Computational geometry, pages 1–17. Springer Berlin Heidelberg, 2000.
-  V. Dujmović and P. Morin. On obstacle numbers. Electron. J. Combin, 22(3):P3, 2013.
-  I. Fáry. On straight line representation of planar graphs. Acta Scientiarum Mathematicarum (Szeged), II:229–233, 1948.
-  H. de Fraysseix, P. Ossona de Mendez, and J. Pach. Representation of planar graphs by segments. In Intuitive Geometry, volume 63 of Colloquia Mathematica Societatis János Bolyai, pages 109–117. North-Holland, 1991.
-  H. de Fraysseix, P. Ossona de Mendez, and J. Pach. A Left-First Search Algorithm for Planar Graphs. Discrete & Computational Geometry, 13:459–468, Jun 1995.
-  H. de Fraysseix, J. Pach, and R. Pollack. Small sets supporting Fary embeddings of planar graphs. In Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, STOC ’88, pages 426–433, New York, NY, USA, 1988. ACM.
-  H. de Fraysseix, J. Pach, and R. Pollack. How to draw a planar graph on a grid. Combinatorica, 10:41–51, Mar 1990.
-  R. Fulek, N. Saeedi, and D. Sarıöz. Convex Obstacle Numbers of Outerplanar Graphs and Bipartite Permutation Graphs, pages 249–261. Springer New York, New York, NY, 2013.
-  S.K. Ghosh. Visibility Algorithms in the Plane. Cambridge University Press, 2007.
-  S.K. Ghosh and P.P. Goswami. Unsolved problems in visibility graphs of points, segments, and polygons. ACM Computing Surveys (CSUR), 46(2):22, 2013.
-  J. Kratochvíl and J. Matoušek. Intersection graphs of segments. J. Combin. Theory Ser. B, 62(B)(2):289–315, 1994.
-  B. Mohar and C. Thomassen. Graphs on Surfaces. The Johns Hopkins University Press, 2001.
-  J. O’Rourke. Visibility. In Handbook of discrete and computational geometry, pages 467–479. CRC Press, 1997.
-  J. O’Rourke. Open problems in the combinatorics of visibility and. In Advances in Discrete and Computational Geometry: Proceedings of the 1996 AMS-IMS-SIAM Joint Summer Research Conference, Discrete and Computational Geometry–Ten Years Later, July 14-18, 1996, Mount Holyoke College, volume 223, page 237. American Univ in Cairo Press, 1999.
-  J. Pach and D. Sarıöz. On the structure of graphs with low obstacle number. Graphs and Combinatorics, 27(3):465–473, 2011.
-  D. Sarıöz. Approximating the obstacle number for a graph drawing efficiently. In Proc. 23rd Canadian Conference on Computational Geometry, pages 297–302, 2011.
-  E. Steinitz. Polyeder und Raumeinteilungen. Teubner, 1916.
-  W.T. Tutte. Toward a theory of crossing numbers. J. Combinatorial Theory, 8:45–53, 1970.
-  J. Urrutia. Art gallery and illumination problems. In Handbook of computational geometry, pages 973–1027. North-Holland, 2000.