Drawing graphs using a small number of obstacles

# Drawing graphs using a small number of obstacles

Martin Balko Josef Cibulka  and  Pavel Valtr Department of Applied Mathematics and Institute for Theoretical Computer Science, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic Alfréd Rényi Institute of Mathematics, Hungarian Academy of Sciences, Budapest, Hungary
###### Abstract.

An obstacle representation of a graph is a set of points in the plane representing the vertices of , together with a set of polygonal obstacles such that two vertices of  are connected by an edge in if and only if the line segment between the corresponding points avoids all the obstacles. The obstacle number of is the minimum number of obstacles in an obstacle representation of .

We provide the first non-trivial general upper bound on the obstacle number of graphs by showing that every -vertex graph satisfies . This refutes a conjecture of Mukkamala, Pach, and Pálvölgyi. For -vertex graphs with bounded chromatic number, we improve this bound to . Both bounds apply even when the obstacles are required to be convex.

We also prove a lower bound on the number of -vertex graphs with obstacle number at most for and a lower bound for the complexity of a collection of faces in an arrangement of line segments with endpoints. The latter bound is tight up to a multiplicative constant.

The first and the third author acknowledge the support of the project CE-ITI (GAČR P202/12/G061) of the Czech Science Foundation, ERC Advanced Research Grant no 267165 (DISCONV), and the grant GAUK 1262213 of the Grant Agency of Charles University. The first author was also supported by the grant SVV–2016–260332. Part of the research was conducted during the workshop Homonolo 2014 supported by the European Science Foundation as a part of the EuroGIGA collaborative research program (Graphs in Geometry and Algorithms). An extended abstract of this paper appeared in Proceedings of the 23rd Symposium on Graph Drawing, 2015.

## 1. Introduction

In a geometric drawing of a graph , the vertices of are represented by distinct points in the plane and each edge of is represented by the line segment between the pair of points that represent the vertices of . As usual, we identify the vertices and their images, as well as the edges and the line segments representing them.

Let be a finite set of points in the plane in general position, that is, there are no three collinear points in . The complete geometric graph is the geometric drawing of the complete graph with vertices represented by the points of .

An obstacle is a polygon in the plane. An obstacle representation of a graph is a geometric drawing of together with a set of obstacles such that two vertices of are connected by an edge if and only if the line segment representing in is disjoint from all obstacles in . The obstacle number of is the minimum number of obstacles in an obstacle representation of . The convex obstacle number of a graph is the minimum number of obstacles in an obstacle representation of in which all the obstacles are required to be convex. Clearly, we have for every graph . For a positive integer , let be the maximum obstacle number of a graph on vertices.

In this paper, we provide the first nontrivial upper bound on (Theorem 2). We also show a lower bound for the number of graphs with small obstacle number (Theorem 4) and a matching lower bound for the complexity of a collection of faces in an arrangement of line segments that share endpoints (Theorem 5). All proofs of our results are based on so-called -dilated bipartite drawings of , which we introduce in Section 2.

In the following, we make no serious effort to optimize the constants. All logarithms in this paper are base 2.

### 1.1. Bounding the obstacle number

The obstacle number of a graph was introduced by Alpert, Koch, and Laison [1] who showed, among several other results, that for every positive integer there is a graph with . Using extremal graph theoretic tools, Pach and Sarıöz [15] proved that the number of labeled -vertex graphs with obstacle number at most is at most for every fixed integer . This implies that there are bipartite graphs with arbitrarily large obstacle number.

Mukkamala, Pach, and Sarıöz [14] established more precise bounds by showing that the number of labeled -vertex graphs with obstacle number at most is at most for every fixed positive integer . It follows that . Later, Mukkamala, Pach, and Pálvölgyi [13] improved the lower bound to . Currently, the strongest lower bound on the obstacle number is due to Dujmović and Morin [7] who showed .

Surprisingly, not much has been done for the general upper bound on the obstacle number. We are only aware of the trivial bound for every graph on vertices. This follows easily, as we can consider the complete geometric graph for some point set of size and place a small obstacle on every non-edge of such that intersects only in . A non-edge of a graph is an element of .

Concerning special graph classes, Fulek, Saeedi, and Sarıöz [9] showed that the convex obstacle number satisfies for every outerplanar graph and for every bipartite permutation graph .

Chaplick et al. [6] showed that whenever and that . They also found an -vertex graph with such that in every representation of with a single obstacle, the obstacle lies in one of the bounded cells of the drawing of . Berman et al. [5] constructed a -vertex planar graph with .

Alpert, Koch, and Laison [1] asked whether the obstacle number of every graph on vertices can be bounded from above by a linear function of . We show that this is true for bipartite graphs and split graphs, even for the convex obstacle number. A split graph is a graph for which the vertex set can be partitioned into an independent subset and a clique.

###### Theorem 1.

If is a bipartite graph or a split graph, then we have

 obsc(G),obsc(¯¯¯¯G)≤|V|−1,

where denotes the complement of .

On the other hand, a modification of the proof of the lower bound by Mukkamala, Pach, and Pálvölgyi [13] implies that there are bipartite graphs on vertices with for every positive integer .

In contrast to the above question of Alpert, Koch, and Laison on the existence of a linear upper bound, Mukkamala, Pach, and Pálvölgyi [13] conjectured that the maximum obstacle number of -vertex graphs is around . We refute this conjecture by showing the first non-trivial general upper bound on the obstacle number of graphs. In fact, we prove a stronger result that provides a general upper bound for the convex obstacle number.

###### Theorem 2.

For every positive integer and every graph on vertices, the convex obstacle number of satisfies

 obsc(G)≤n⌈logn⌉−n+1.

The question whether the upper bound on can be improved to remains open. We can, however, prove provided that the chromatic number (or even the subchromatic number) of is bounded from above by a constant.

Let be a graph and let be a function that assigns a color to every vertex of . We call a subcoloring of if for every the color class induces a disjoint union of cliques in . The subchromatic number of , denoted by , is the least number of colors needed in any subcoloring of .

We prove the following result that asymptotically implies Theorems 1 and 2.

###### Theorem 3.

For every positive integer and every graph on vertices, the convex obstacle number of satisfies

 obsc(G)≤(n−1)(⌈logχs(G)⌉+1),

Note that we have , thus Theorem 3 gives the bound if the chromatic number of or the chromatic number of its complement is bounded from above by a constant. Theorem 3 immediately implies an analogous statement for cochromatic number of , which is the least number of colors that we need to color so that each color class induces either a clique or an independent set in . The cochromatic number of a graph was first defined by Lesniak and Straight [11] and it is at least for every graph .

### 1.2. Number of graphs with small obstacle number

For positive integers and , let be the number of labeled -vertex graphs with obstacle number at most . The lower bounds on the obstacle number by Mukkamala, Pach, and Pálvölgyi [13] and by Dujmović and Morin [7] are both based on the upper bound . In fact, any improvement on the upper bound for will translate into an improved lower bound on the obstacle number [7]. Dujmović and Morin [7] conjectured where . We show the following lower bound on .

###### Theorem 4.

For every pair of integers and satisfying , we have

 g(h,n)≥2Ω(hn).

This lower bound on is not tight in general. For example, it is not tight for , as we have and the following simple argument gives . For a given bijection , let be the graph on that is obtained from by removing the edges for every . We choose a geometric drawing of where each vertex is represented by a point such that all line segments with meet in a common point that is not contained in any other edge of the drawing of . Then we place a single one-point obstacle on this common point and obtain an obstacle representation of . Since the number of the graphs is , the super-exponential lower bound on follows.

### 1.3. Complexity of faces in arrangements of line segments

An arrangement of line segments is a finite collection of line segments in the plane. The line segments of partition the plane into vertices, edges, and cells. A vertex is a common point of two or more line segments. Removing the vertices from the line segments creates a collection of subsegments which are called edges. The cells are the connected components of the complement of the line segments. A face of is a closure of a cell.

Note that every geometric drawing of a graph is an arrangement of line segments and vice versa. The edges of the graph correspond to the line segments of the arrangement and the vertices of the graph correspond to the endpoints of the line segments.

A line segment of is incident to a face of if and share an edge of . The complexity of a face is the number of the line segments of that are incident to . If is a set of faces of , then the complexity of is the sum of the complexities of taken over all .

An arrangement of lines is a finite collection of lines in the plane with faces and their complexity defined analogously.

Edelsbrunner and Welzl [8] constructed an arrangement of lines having a set of faces with complexity for every and . Wiernik and Sharir [18] constructed an arrangement of line segments with a single face of complexity . These two constructions can be combined to provide the lower bound for the complexity of faces in an arrangement of line segments, where . The best upper bound for the complexity of faces in an arrangement of line segments is by Aronov et al. [3].

Arkin et al. [2] studied arrangements whose line segments share endpoints. That is, they considered the maximum complexity of a face when we bound the number of endpoints of the line segments instead of the number of the line segments. They showed that the complexity of a single face in an arrangement of line segments with endpoints is at most . An lower bound was then proved by Matoušek and Valtr [12].

Arkin et al. [2] asked what is the maximum complexity of a set of faces in an arrangement of line segments with endpoints.

Since every arrangement of line segments with endpoints contains at most line segments, the upper bound can be deduced from the bound by Aronov et al. [3]. Together with the upper bound , which follows from the bound by Arkin et al. [2] on the complexity of a single face, we obtain an upper bound on the complexity of faces in an arrangement of line segments with endpoints.

We give the following lower bound.

###### Theorem 5.

For every sufficiently large integer , there is an arrangement of line segments with endpoints such that for every satisfying there is a set of at most faces of with complexity .

Whenever , this lower bound matches the upper bound up to a multiplicative constant. For , the lower bound differs from the upper bound by at most an multiplicative factor; see also Table 1.

## 2. Dilated bipartite drawings

For a point , let and denote the - and the -coordinate of , respectively. An intersection point in a geometric drawing of a graph is a common point of two edges of that share no vertex.

Let and be positive integers. We say that a geometric drawing of is bipartite if the vertices of the same color class of lie on a common vertical line and not all vertices of lie on the same vertical line. For the rest of this section, we let be a bipartite drawing of and use and with and to denote the point sets representing the color classes of in . We let and be the vertical lines that contain the points of and , respectively. The width of is . In the following, we assume that is to the left of and that and . We set for and for . We call the left step of and the right step of . An example can be found in part (a) of Figure 1.

We say that is regular if we have and ; see part (b) of Figure 1 for an example. Note that every regular drawing of is uniquely determined by its width, left step, and right step. A regularization of a (possibly non-regular) bipartite drawing  is the regular bipartite drawing of with the vertices and for and .

For , the th level of is the set of edges with ; see Figure 2. Note that the levels of partition the edge set of and that the th level of contains edges. If is regular, then, for every , the edges of the th level of share a unique intersection point that lies on the vertical line .

For an integer , an ordered -tuple of edges of is uniformly crossing if we have and . In particular, a set of edges forming a level of , ordered by their decreasing slopes, is uniformly crossing. Note that if is uniformly crossing, then the edges of the regularization of share a common intersection point, which we call the meeting point of . Note that this point does not necessarily lie in ; see Figure 3. In the other direction, if is regular and is a maximal set of edges of that share a common intersection point and are ordered by their decreasing slopes, then is uniformly crossing.

Let be a real number. We say that is -dilated if we have and ; see part (a) of Figure 4.

In a geometric drawing of a (not necessarily bipartite) graph, let be an ordered -tuple of edges of with finite slopes and such that and share an intersection point for . We say that forms a cap, if and the slopes of are strictly decreasing. For every , the segment is the graph of a linear function , where is the projection of on the -axis. The lower envelope of is the graph of the function defined on the union of these intervals as the pointwise minimum of the functions and is undefined elsewhere. That is, the lower envelope is a union of finitely many piecewise linear curves, called components. The cap formed by is the component of the lower envelope that contains . The points are vertices of and are edges of ; see part (b) of Figure 4. A cap is good in , if the edges of are incident to the same bounded face of or if has only one edge. If is bipartite and the edges of one of its levels form a cap , then we call a level-cap of .

The following lemma is crucial in the proofs of all our main results.

###### Lemma 6.

Let be a bipartite drawing of .

1. If satisfies and , then, for every , every uniformly crossing -tuple of edges of forms a cap.

2. For all and , there is an such that for every positive the following statement holds. If is an -dilated bipartite drawing of with width , left step , and right step , then the intersection point between any two edges and of lies in distance less than from the intersection point .

3. For all and , there is an such that for every positive the following statement holds. If is an -dilated bipartite drawing of with width , left step , and right step , then for every every uniformly crossing -tuple of edges of forms a good cap in .

###### Proof.

For part 1, let be a uniformly crossing -tuple of edges of with for every . Consider edges , , and let and be the points and , respectively. The points and exist, as and .

Consider the midpoint of and the midpoint of . Since is uniformly crossing and and , we have and ; see part (a) of Figure 5. The edges , , and share a common point that lies above . Since and lie on , we obtain . The slopes of , , are strictly decreasing, thus forms a cap.

Part 2 follows from the fact that for fixed , , , all -dilated drawings of with width , left step , and right step converge to their common regularization as tends to zero.

We now show part 3. We let be the half of the minimum distance between two intersection points of the regular drawing of with width , left step , and right step . We take from part 2 and we let be an -dilated drawing of with width , left step , and right step . According to 1, every uniformly crossing -tuple of edges of forms a cap.

Let be the meeting point of in the regular drawing . Let be the open disc with the center and the radius . Let be the set of edges that intersect some other edge inside . By the choice of , is the set of edges that correspond to the edges of the regular drawing that contain . In particular, (note that might be, for example, a subset of a level of and thus we do not necessarily have ). By part 1, the edges of form a cap. All the vertices of this cap lie inside . Since no edge outside crosses any edge of inside , there is a face in incident to all edges of . Since , contains at least two edges and thus is bounded; see part (b) of Figure 5. ∎

## 3. Proof of Theorem 1

Let be a bipartite graph and be its complement. Using Lemma 6, we can easily show . Let be chosen as in part 3 of Lemma 6 for and . Consider an -dilated drawing of with , , and . Since edges of every level of are uniformly crossing, part 3 of Lemma 6 implies that the edges of the th level of form a good level-cap in for every . That is, there is a bounded face of such that each edge of is incident to or contains only one edge.

For every integer such that contains a non-edge of , we construct a single convex obstacle . If contains only one edge , the obstacle is an arbitrary inner point of . Otherwise every edge of the th level of shares a line segment of positive length with . The obstacle is defined as the convex hull of the midpoints of the line segments where is not an edge of ; see Figure 6.

The levels partition the edge set of , therefore we block every non-edge of . Since every bounded face of is convex, we have . Therefore no edge of is blocked and we obtain an obstacle representation of . In total, we produce at most obstacles.

To show , we proceed analogously as above, except the vertices of are suitably perturbed before obstacles are defined, which allows to add two (long and skinny) convex obstacles and blocking all the edges and , respectively. The addition of the obstacles and may be compensated by using a single convex obstacle to block non-edges in the first and the second level and in the nd and the st level.

If is a split graph, then we add only one of the obstacles and depending on whether or , respectively, represents an independent set in .

## 4. Proof of Theorem 2

###### Proof.

We show that the convex obstacle number of every graph on vertices is at most . The high-level overview of the proof is as follows. We partition the edges of  to edge sets of induced bipartite subgraphs of by iteratively partitioning the vertex set of into two (almost) equal parts and considering the corresponding induced bipartite subgraphs of . For every , the number of such bipartite subgraphs of size about is . Then we construct an obstacle representation of whose restriction to every such bipartite subgraph resembles the obstacle representation from the proof of Theorem 1. Since the obstacle representation of every bipartite subgraph of size about uses about obstacles, we have obstacles in total.

Let be a positive integer and let be a finite set of points on a vertical line. The bottom half of is the set of the first points of in the ordering of by increasing -coordinates. The set of remaining points of is called the top half of .

Let and let be a number smaller than from part 3 of Lemma 6 for and . We also assume that is smaller than from part 2 of Lemma 6 for , , and . Let be an -dilated bipartite drawing of with width, left step, and right step equal to 1 and with for every . We let and be the color classes of ordered by increasing -coordinates such that and . By part 3 of Lemma 6, edges of each level of form a good cap in . For the rest of the proof, the -coordinates of all points remain fixed.

Let be a level of with at least two edges. Since the edges of form a good cap, there is a face of such that all edges of are incident to . If contains an edge for some , we let be the horizontal line containing . Otherwise contains edges and for some and we let be the horizontal line . No vertex of the level-cap formed by the edges of lies strictly above and thus whenever two edges of intersect above , one of them has a positive slope and the other one negative. Thus there is such that every edge of with positive slope is incident to a part of that is in the vertical distance larger than below ; see Figure 7. We choose to be the minimum of over all levels of with at least two edges. We may assume . Note that depends only on .

As the first step in our construction, we let be the drawing obtained from by removing the top half of and the bottom half of . We forget about the part , as it will not be used in the obstacle representation of . We use and to denote the left and the right color class of , respectively. We map the vertices of to the vertices of arbitrarily. Let be the set of the level-caps of . Since every level-cap in is good in , every cap in is good in . Let be the vertical strip between and .

We now give a brief overview of the next steps. The drawing is the first step towards making an obstacle representation of . In fact, we can now block a large portion of non-edges of by placing obstacles in as in the proof of Theorem 1. Then we take care of the edges between vertices in the left color class of as follows (edges between vertices in the right color class of are dealt with analogously). We slightly shift the top half of horizontally to the right. Only some of the edges of a copy of between the top and the bottom half of belong to . In the same way as in the bipartite case, we place convex obstacles along the level-caps of this copy. To take care of the edges between vertices in the same color class of , and for each of the color classes we proceed similarly as above.

For an integer with , we now formally describe the th step of our construction. Having chosen the drawing , the set , and point sets , we define as follows. For , let be the bottom half of and let be the top half of . Let be a small real number to be specified later. If is odd and , we move the points from to the right by . If is even and , we move the points from to the left by ; see Figure 8 for an illustration. This modified drawing is and is transformed into .

For , we add all edges between points from and to create a bipartite drawing of for some integers satisfying and . Let be the vertical strip between and . That is, contains . We let be the union of with a set of level-caps of the drawings for . We also set .

We choose small enough so that each good cap is transformed to a good cap . Such exists, as every geometric drawing of a graph is compact and the distance of two points is a continuous function.

We also choose small enough so that the following holds for every edge of . Let be the smallest index such that . For every vertical strip intersecting and with and , the portion of in the vertical strip is contained in the horizontal strip for some endpoint of . This can be done, as depends only on and the endpoints of move by at most . We also use the facts that the vertical strips , for and , do not change during the translations by and that each vertical strip , for and , is contained in the vertical strip ; see Figure 9 for an illustration.

After steps, the drawings contain at most two vertices and the construction stops. We show that we can add at most convex obstacles to the drawing to obtain an obstacle representation of .

For and , let be the affine mapping where is chosen such that the left color class of lies on . Note that the drawing is contained in the drawing and thus edges of the levels of form good caps in ; see Figure 10. Since does not change the edge-face incidences in , edges of the levels of form good caps in .

Let be a level-cap of . Let be the level of whose edges form the level-cap of . Edges of are also edges of a level of and we let be the horizontal line . All edges of have positive slope in . Thus it follows from the definition of that there is a bounded face of such that all edges of are incident to the part of this face below in the vertical distance larger than . Since does not change the -coordinates, we get that for every level-cap of , there is a bounded face of such that all edges of are incident to the part of that lies below in the vertical distance larger than .

By induction on , , we show that every cap from is good in in the th step of the construction. We already observed that this is true for . Suppose for a contradiction that there is a cap that is not good in for . Using the inductive hypothesis and the choice of , we see that is not in . Therefore there is a drawing for such that is a level-cap of . Since is good in , all edges forming are incident to a single bounded face of . The drawings are contained in pairwise disjoint vertical strips, thus is good in .

It follows from our choice of and and from part 2 of Lemma 6 that all edges of  are incident to in a -neighborhood of . Moreover, all edges of  are incident to the part of that lies below in the vertical distance larger than . Therefore all edges of  are incident to the part of  that is in the horizontal strip between the horizontal lines and . Because is not good in , some edge of intersects in the vertical strip . By the choice of , the portion of inside is contained in the horizontal strip for an endpoint of . However, the horizontal line is by definition either at distance at least from every point of or it contains some edge with . In any case, since , the strip is disjoint with all the horizontal strips for all endpoints in and we obtain a contradiction.

Let be the part of the drawing transformed from in the steps . For every , we place the obstacles to its good level-caps as in the first part of the proof of Theorem 1. Using the fact that bounded faces of every geometric drawing of are convex, it follo