Bounding and computing obstacle numbers of graphs

An obstacle representation of a graph $G$ consists of a set of pairwise disjoint simply-connected closed regions and a one-to-one mapping of the vertices of $G$ to points such that two vertices are adjacent in $G$ if and only if the line segment connecting the two corresponding points does not intersect any obstacle. The obstacle number of a graph is the smallest number of obstacles in an obstacle representation of the graph in the plane such that all obstacles are simple polygons. It is known that the obstacle number of each $n$-vertex graph is $O(n \log n)$ [Balko, Cibulka, and Valtr, 2018] and that there are $n$-vertex graphs whose obstacle number is $\Omega(n/(\log\log n)^2)$ [Dujmovi\'c and Morin, 2015]. We improve this lower bound to $\Omega(n/\log\log n)$ for simple polygons and to $\Omega(n)$ for convex polygons. To obtain these stronger bounds, we improve known estimates on the number of $n$-vertex graphs with bounded obstacle number, solving a conjecture by Dujmovi\'c and Morin. We also show that if the drawing of some $n$-vertex graph is given as part of the input, then for some drawings $\Omega(n^2)$ obstacles are required to turn them into an obstacle representation of the graph. Our bounds are asymptotically tight in several instances. We complement these combinatorial bounds by two complexity results. First, we show that computing the obstacle number of a graph $G$ is fixed-parameter tractable in the vertex cover number of $G$. Second, we show that, given a graph $G$ and a simple polygon $P$, it is NP-hard to decide whether $G$ admits an obstacle representation using $P$ as the only obstacle.


Introduction
An obstacle is a simple polygon in the plane. For a set S of points in the plane and a set O of obstacles, the visibility graph of S with respect to O is the graph with vertex set S where two vertices s and t are adjacent if and only if the line segment st does not intersect any obstacle in O. For convenience, we identify vertices with the points representing them and edges with the corresponding line segments. An obstacle representation of a graph G consists of a set O of pairwise disjoint obstacles and a bijective mapping between the vertex set of G and a point set S ⊆ R 2 \ O such that the visibility graph of S with respect to O is isomorphic to G. We consider finite point sets and finite collections of obstacles. All obstacles are closed. For simplicity, we consider point sets to be in general position, that is, no three points lie on a common line. Given a straight-line drawing D of a graph G, we define the obstacle number of D, obs(D), to be the smallest number of obstacles that are needed in order to turn D into an obstacle representation of G. Since every non-edge of G (that is, every pair of non-adjacent vertices) must be blocked by an obstacle and no edge of G may intersect an obstacle, obs(D) is the cardinality of the smallest set of faces of D whose union is intersected by every non-edge of G. For a graph G, the obstacle number of G, obs(G), is the smallest value of obs(D), where D ranges over all straight-line drawings of G. For a positive integer n, let obs(n) be the maximum value of obs(G), where G is any n-vertex graph. The convex obstacle number obs c (·) is defined analogously, except that here all obstacles are convex polygons.
For positive integers h and n, let f (h, n) be the number of graphs on n vertices that have obstacle number at most h. Similarly, we denote the number of graphs on n vertices that have convex obstacle number at most h by f c (h, n).
Alpert, Koch, and Laison [2] introduced the obstacle number and the convex obstacle number. Using Ramsey theory, they proved that for every positive integer k, there is a (huge) complete k-partite graph with convex obstacle number k. They also showed that obs(n) ∈ Ω( log n/ log log n). This lower bound was subsequently improved to Ω(n/ log n) by Mukkamala, Pach, and Pálvölgyi [18] and to Ω(n/(log log n) 2 ) by Dujmović and Morin [8], who conjectured the following.
On the other hand, we trivially have obs(n) ≤ obs c (n) ≤ n 2 as one can block each non-edge of an n-vertex graph with a single obstacle. Balko, Cibulka, and Valtr [4] improved this upper bound to obs(n) ≤ obs c (n) ≤ n⌈log n⌉−n+1, refuting a conjecture by Mukkamala, Pach, and Pálvölgyi [18] stating that obs(n) is around n 2 . For every graph G with chromatic number χ, Balko, Cibulka, and Valtr [4] showed that obs c (G) ≤ (n − 1)(⌈log χ⌉ + 1), which is in O(n) if the chromatic number is bounded by a constant.
Alpert, Koch, and Laison [2] differentiated between an outside obstacle, which lies in (or simply is) the outer face of the visibility drawing, and inside obstacles, which lie in (or are) inner faces of the drawing. They proved that every outerplanar graph has an outside-obstacle representation, that is, a representation with a single outside obstacle. Later, Chaplick, Lipp, Park, and Wolff [6] showed that the class of graphs that admit a representation with a single inside obstacle is incomparable with the class of graphs that have an outside-obstacle representation. They found the smallest graph with obstacle number 2; it has eight vertices and is co-bipartite. They also showed that the following sandwich version of the outsideobstacle representation problem is NP-hard: Given two graphs G and H with V (G) = V (H) and E(G) ⊆ E(H), is there a graph K with V (K) = V (G) and E(G) ⊆ E(K) ⊆ E(H) that admits an outside-obstacle representation? Analogous hardness results hold with respect to inside and general obstacles. Every partial 2-tree has an outside-obstacle representation [10]. For (partial) outerpaths, cactus graphs, and grids, it is possible to construct outside-obstacle representations where the vertices are those of a regular polygon [10].
For planar graphs, Johnson and Sarıöz [16] investigated a variant of the problem where the visibility graph G is required to be plane and a plane drawing D of G is given. They showed that computing obs(D) is NP-hard (by reduction from planar vertex cover) and that there is a solution-value-preserving reduction to maximum-degree-3 planar vertex cover. For computing obs(D), this reduction yields a polynomial-time approximation scheme and a fixed-parameter algorithm with respect to obs(D). Gimbel, de Mendez, and Valtr [13] showed that, for some planar graphs, there is a large discrepancy between this planar setting and the usual obstacle number.
A related problem deals with point visibility graphs, where the points are not only the vertices of the graph but also the obstacles. Recognizing point visibility graphs is contained in ∃R [12] and is ∃R-hard [5], and thus ∃R-complete.
Our Contribution. Our results span three areas. First, we improve existing bounds on the (convex and general) obstacle number (see Section 2), on the functions f (n, h) and f c (n, h) (see Section 3), and on the obstacle number of drawings (see Section 4). Second, we provide an algorithmic result: computing the obstacle number of a given graph is fixed-parameter tractable with respect to the vertex cover number of the graph (see Section 5). Third, we show that, given a graph G and a simple polygon P , it is NP-hard to decide whether G admits an obstacle representation using P as the only obstacle (see Section 6). The omitted proofs are available in the full version of this paper [3]. We now describe our results in more detail.
First, we prove the currently strongest lower bound on the obstacle number of n-vertex graphs, improving the estimate of obs(n) ∈ Ω(n/(log log n) 2 ) by Dujmović and Morin [8].
▶ Theorem 2. There is a constant β > 0 such that, for every n ∈ N, there exists a graph on n vertices with obstacle number at least βn/ log log n, that is, obs(n) ∈ Ω(n/ log log n).
This lower bound is quite close to the currently best upper bound obs(n) ∈ O(n log n) by Balko, Cibulka, and Valtr [4]. In fact, Alpert, Koch, and Laison [2] asked whether the obstacle number of any graph with n vertices is bounded from above by a linear function of n. This is supported by a result of Balko, Cibulka, and Valtr [4] who proved obs(G) ≤ obs c (G) ∈ O(n) for every graph G with n vertices and with constant chromatic number. We remark that we are not aware of any argument that would give a strengthening of Theorem 2 to graphs with constant chromatic number.
Next, we show that a linear lower bound holds for convex obstacles.
▶ Theorem 3. There is a constant γ > 0 such that, for every n ∈ N, there exists a (bipartite) graph on n vertices with convex obstacle number at least γn, that is, obs c (n) ∈ Ω(n).
The previously best known bound on the convex obstacle number was obs c (G) ∈ Ω(n/(log log n) 2 ) [8]. Recall that the upper bound proved by Balko, Cibulka, and Valtr [4] actually holds for the convex obstacle number as well and gives obs c (n) ∈ O(n log n). Furthermore, the linear lower bound on obs c (n) from Theorem 3 works for n-vertex graphs with bounded chromatic number, asymptotically matching the linear upper bound on the obstacle number of such graphs proved by Balko, Cibulka, and Valtr [4]; see the remark in Section 2.
The proofs of Theorems 2 and 3 are both based on counting arguments that use the upper bounds on f (h, n) and f c (h, n). To obtain the stronger estimates on obs(n) and obs c (n), we improve the currently best bounds f (h, n) ∈ 2 O(hn log 2 n) and f c (h, n) ∈ 2 O(hn log n) by Mukkamala, Pach, and Pálvölgyi [18] as follows. The upper bound in Theorem 5 is asymptotically tight for h < n as Balko, Cibulka, and Valtr [4] proved that for every pair of integers n and h satisfying 0 < h < n we have f c (h, n) ∈ 2 Ω(hn) . Their result is stated for f (h, n), but it is proved using convex obstacles only. This matches our bound for h ∈ Ω(log n). Moreover, they showed that f c (1, n) ∈ 2 Ω(n log n) , which again matches the bound in Theorem 5.

▶ Corollary 6. For all positive integers h and n, we have
It is natural to ask about estimates on obstacle numbers of fixed drawings, that is, considering the problem of estimating obs(D). The parameter obs(D) has been considered in the literature; e.g., by Johnson and Sarıöz [16]. Here, we provide a quadratic lower bound on max D obs(D) where the maximum ranges over all drawings of graphs on n vertices. ▶ Theorem 7. There is a constant δ > 0 such that, for every n, there exists a graph G on n vertices and a drawing D of G such that obs(D) ≥ δ · n 2 .
The bound from Theorem 7 is asymptotically tight as we trivially have obs(D) ≤ obs c (D) ≤ n 2 for every drawing D of an n-vertex graph. This also asymptotically settles the problem of estimating the convex obstacle number of drawings.
Next, we turn our attention to algorithms for computing the obstacle number. We establish fixed-parameter tractability for the problem when parameterized by the size of a minimum vertex cover of the input graph G, called the vertex cover number of G.

▶ Theorem 8. Given a graph G and an integer h, the problem of recognizing whether G admits an obstacle representation with h obstacles is fixed-parameter tractable parameterized by the vertex cover number of G.
The proof of Theorem 8 is surprisingly non-trivial. On a high level, it uses Ramsey techniques to identify, in a sufficiently large graph G, a set of vertices outside a minimum vertex cover which not only have the same neighborhood, but also have certain geometric properties in a hypothetical solution S. We then use a combination of topological and combinatorial arguments to show that S can be adapted to an equivalent solution for a graph G ′ whose size is bounded by the vertex cover number of G -i.e., a kernel [7].
While the complexity of deciding whether a given graph has obstacle number 1 is still open, the sandwich version of the problem [6] and the version for planar visibility drawings [16] have been shown NP-hard. We conclude with a simple new NP-hardness result.
▶ Theorem 9. Given a graph G and a simple polygon P , it is NP-hard to decide whether G admits an obstacle representation using P as (outside-) obstacle.

Improved Lower Bounds on Obstacle Numbers
We start with the estimate obs(n) ∈ Ω(n/ log log n) from Theorem 2. The proof is based on Theorem 4 (cf. Section 3) and the following result by Dujmović and Morin [8], which shows that an upper bound for f (h, n) translates into a lower bound for obs(n).
Proof of Theorem 2. By Theorem 4, we have f (h, k) ∈ 2 O(hk log k) for every positive integer k and thus H(k) ∈ Ω(k/ log k). Plugging this estimate with k ∈ Ω(log n) into Theorem 10, we get the lower bound obs(n) ∈ Ω(n/ log log n). ◀ It remains to prove the lower bound obs c (n) ∈ Ω(n) from Theorem 3.
Proof of Theorem 3. By Theorem 5, we have f c (h, n) ≤ 2 βn(h+log n) for some constant β > 0. Since the number of graphs with n vertices is 2 ( n 2 ) , we see that if 2 ( n 2 ) > 2 βn(h+log n) , then there is an n-vertex graph with convex obstacle number larger than h. The inequality Observe that the proof of Theorem 3 also works if we restrict ourselves to bipartite graphs, as the number of bipartite graphs on n vertices is at least 2 n 2 /4 . Thus, the convex obstacle number of an n-vertex graph with constant chromatic number can be linear in n, which asymptotically matches the linear upper bound proved by Balko, Cibulka, and Valtr [4].

On the Number of Graphs with Bounded Obstacle Number
In this section we outline the proofs for Theorems 4 and 5, which provide improved upper bounds on the number of n-vertex graphs with (convex) obstacle number at most h.

Sketch of the Proof of Theorem 4
We prove that the number f (h, n) of n-vertex graphs with obstacle number at most h is bounded from above by 2 O(hn log n) . We follow the approach of Mukkamala, Pach, and Pálvölgyi [18] and encode the obstacle representations using point set order types for the vertices of the graph and the obstacles. They used a bound of O(n log n) for the number of vertices of a single obstacle. We show that this bound can be reduced to O(n). As a result, the upper bound on f (h, n) improves by a factor of Θ(log n) in the exponent. An obstacle representation (D, O) of a graph G is minimal if it uses the minimum number |O| of obstacles and there is no obstacle representation (D ′ , O ′ ) of G with |O| = |O ′ | such that the total number of vertices in O ′ is strictly smaller than in O. Consider a graph G that admits an obstacle representation using at most h obstacles and an obstacle O ∈ O.
If O is a triangle, it contributes three vertices to our linear bound, which is fine. So suppose that O has four or more vertices. We want to charge the "excess" vertices to some vertex of G such that every vertex of G pays for at most a constant number of obstacle vertices.
A vertex v of a simple polygon P is convex if the internal angle of P at v is less than π; otherwise v is a reflex vertex of P . Let v be a convex vertex of an obstacle O from O and let e 1 and e 2 be the two edges of O adjacent to v. If the interior of the triangle that is spanned by e 1 and e 2 does not contain any vertex of D or O, we call the vertex v blocking.

11:6
Bounding and Computing Obstacle Numbers of Graphs If v is blocking, then there is a non-edge e of G that crosses e 1 and e 2 , since otherwise we could reduce the number of obstacle vertices by removing the triangle spanned by e 1 and e 2 from O. If e has no other intersections with the obstacles, we say that e forces v. Then each convex vertex of O is forced by at least one non-edge of G. Let uu ′ be an edge that forces v and let z be a crossing of uu ′ with an edge of O incident to v. We say that u is responsible for v unless there are non-edges of G incident to u and forcing two other vertices t and w of O that span a polygonal chain γ u t,z,w formed by the part of the boundary of O between t and w such that γ u t,z,w intersects the ray − → uz at some point different from z; see Fig. 1. With this definition of responsibility, we can show that every blocking vertex v of O has at least one vertex of G that is responsible for v and that each vertex of G is responsible for at most two blocking vertices of O. It then follows from a simple double-counting argument that O has at most 2n blocking vertices. A similar argument based on a different notion of responsibility is used to show that O contains at most 2r O non-blocking convex vertices where r O is the number of reflex vertices of O. Accounting for the reflex vertices is more challenging, but we can show that each reflex vertex of an obstacle can be charged to a vertex of G, so that there are no more than 2n + 5 reflex vertices overall. Let s denote the total number of obstacle vertices, and let r = O∈O r O denote the total number of reflex vertices. Then s ≤ r + O∈O (2r O + 2n) ≤ 3r + |O| · 2n ≤ (2h + 6)n + 15.
First, it is not difficult to show that we can restrict ourselves without loss of generality to connected graphs. To bound the number g(h, n) of connected n-vertex graphs with obstacle number at most h, we use a combinatorial description of point sets using order types. The order type of a set P of points in the plane in general position is a mapping χ that assigns χ(a, b, c) ∈ {+1, −1} to each ordered triple (a, b, c) of points from P , indicating whether a, b, c make a left turn (+1) or a right turn (−1). The order type captures which pairs of line segments spanned by P cross. Hence, for the purposes of plane straight-line embeddings of graphs, two point sets with the same order type are equivalent. The following classical result by Goodman and Pollack [14,15] gives an estimate on the number of order types.

Sketch of the Proof of Theorem 5
We show that the number of graphs on n vertices that have convex obstacle number at most h is bounded from above by 2 O(n(h+log n)) . That is, we prove f c (h, n) ∈ 2 O(n(h+log n)) .
To this end, we give an efficient encoding for an obstacle representation (D, O) of an n-vertex graph G = (V, E) that uses at most h convex obstacles. The first part of the encoding is formed by the order type of V . Then, it remains to encode the obstacles and their interaction with the line segments between points from V . To do that, we use so-called radial systems. The clockwise radial system R of V assigns to each vertex v ∈ V the clockwise cyclic ordering R(v) of the n − 1 rays in D that start from v and pass through a vertex from V \ {v}. The order type of V uniquely determines the radial system R of V . Essentially, this also holds in the other direction: There are at most n − 1 order types that are compatible with a given radial system [1].
For Thus it suffices to encode all blocking intervals. In the following we describe how to obtain an encoding of size 2 O(hn) , which together with the order type of V yields the claimed bound on f c (h, n). In order to describe our approach it is more convenient to move to the dual setting, using the standard projective duality transformation that maps a point p = (p x , p y ) ∈ R 2 to the line p * = {(x, y) ∈ R 2 : y = p x x − p y }, and that maps a non-vertical line ℓ = {(x, y) ∈ R 2 : y = mx + b} to the point ℓ * = (m, −b). This map is an involution, that is, (p * ) * = p and (ℓ * ) * = ℓ. Moreover, it preserves incidences, that is, p ∈ ℓ ⇐⇒ ℓ * ∈ p * , and is order-preserving as a point p lies above ℓ ⇐⇒ ℓ * lies above p * .
Consider the arrangement A of the n lines dual to the points in V . The combinatorial structure of A, that is, the sequences of intersections with other lines along each line, can be obtained from the radial system of V ; see [20]. (To identify the vertical direction and the x-order of the vertices, we add a special point very high above all other points.) Let O ∈ O be an obstacle. Define a map τ that assigns to each x ∈ R the upper tangent of slope x to O, that is, the line τ (x) of slope x that is tangent to O and such that O lies below τ (x); see Fig. 2. Now, consider the dual τ * of τ , defined by τ * (x) = (τ (x)) * . Note that, by definition, every line τ (x) passes through a vertex of the upper envelope O + of the convex hull of O. Consequently, each point τ * (x) lies on a line that is dual to a vertex of O + . In other words, τ * is a piece-wise linear function that is composed of line segments along the lines dual to the vertices of O + . The order of these line segments from left to right corresponds to primal tangents of increasing slope and, therefore, to the order of the corresponding vertices of O + from right to left. As primal x-coordinates correspond to dual slopes, the slopes of the line segments along τ * monotonically decrease from left to right, and so τ * is concave.
The primal line of a point in v * ∩ τ * , for some v ∈ V , passes through v and is an upper tangent to O. So such an intersection corresponds to an endpoint of the blocking interval I O (v). In order to obtain all endpoints of the blocking intervals, we also consider the lower tangents to O in an analogous manner. The corresponding function β * is convex and consists of segments along lines dual to the vertices of the lower convex hull of O, from left to right.
It remains to compactly encode the intersections of τ * with A. To do so, we apply a result by Knuth [17]; see also the description by Felsner and Valtr [9]. A set A ′ of biinfinite curves in R 2 forms an arrangement of pseudolines if each pair of curves from A ′ intersects in a unique point, which corresponds to a proper, transversal crossing. A curve α is a pseudoline Splitting the n lines of A into two parts so that τ * is a pseudoline with respect to the resulting arrangement A ′ of at most 2n pseudolines.
with respect to A ′ if α intersects each curve in A ′ at most once. Let γ be a curve that intersects each curve from A ′ in a finite number of points. The cutpath of γ in A ′ is the sequence of intersections of γ with the pseudolines from A ′ along γ.
▶ Theorem 13 ([17]). If α is a pseudoline with respect to an arrangement A ′ of n pseudolines, then there are at most O(3 n ) cutpaths of α in A ′ .
Using Theorem 13, we can now estimate the number of cutpaths of τ * with respect to A. Proof. If τ * was a pseudoline with respect to A, then we were done by Theorem 13. However, τ * is not a pseudoline with respect to A in general because a vertex v ∈ V can have two tangents to O + , in which case τ * intersects v * twice. Therefore, we split the lines of A that correspond to vertices vertically above O into two parts, by removing the part of each line in a close neighborhood of its leftmost intersection with τ * . Then both parts have only one intersection with τ * . Each of the two stubs can be extended by following τ * and crossing whatever needs to be crossed so that both together with all other split curves, the remaining lines from A, and τ * form a pseudoline arrangement A ′ of at most 2n + 1 pseudolines; see

A Lower Bound on the Obstacle Number of Drawings
Here, we prove Theorem 7 by showing that there is a constant δ > 0 such that, for every n, there exists a graph G on n vertices and a drawing D of G such that obs(D) ≥ δ · n 2 . The proof is constructive. We first assume that n is even. A set of points in the plane is a cup if all its points lie on the graph of a convex function. Similarly, a set of points is a cap if all its points lie on the graph of a concave function. For an integer k ≥ 3, a convex polygon P is k-cap free if no k vertices of P form a cap of size k. Note that P is k-cap free if and only if it is bounded from above by at most k − 1 segments (edges of P ). We use e(P ) to denote the leftmost edge bounding P from above; see Fig. 4(a). For some (small) ε > 0 and every i ∈ {1, . . . , m}, where m = n/2, we let q i be the point (i, y i − ε). That is, q i is a point slightly below p i . We choose ε sufficiently small so that decreasing ε to any smaller positive real number does not change the combinatorial structure of the intersections of the line segments spanned by the n points p 1 , . . . , p m , q 1 , . . . , q m . We let D = D n be the drawing with n vertices p 1 , . . . , p m , q 1 , . . . , q m containing all the line segments between two vertices, except the line segments q i q j where i and j are both even.
We have to show that at least quadratically many obstacles are needed to block all nonedges of G in D. Let X be the set of line segments q i q j where both i and j are even. Note that each line segment from X corresponds to a non-edge of G and that |X| = ⌊n/4⌋ 2 ≥ n 2 /40 for a sufficiently large n. The proof of the following claim is based on Claim 15. Since |X| ≥ n 2 /40, we obtain |O| ≥ |X|/2 ≥ n 2 /80. Consequently, obs(D) ≥ n 2 /80, which finishes the proof for n even. If n is odd, we use the above construction for n − 1 and add an isolated vertex to it.

Obstacle Number is FPT Parameterized by Vertex Cover Number
As our first step towards a fixed-parameter algorithm, we need to establish a bound on the obstacle number of every graph with bounded vertex cover number.
▶ Lemma 17. Let G be a graph with vertex cover number k. Then G admits an obstacle representation with 1 + k 2 + k · 2 k obstacles.
Proof Sketch. We construct an obstacle representation for G as follows. We place the vertices in the vertex cover X somewhere in a central area, and dedicate at most k 2 obstacles to handle the visibilities between these. Next, we partition the vertices outside of X into at most 2 k equivalence classes called types based on the following equivalence: two vertices a, b ̸ ∈ X have the same type if and only if they have the same neighborhood. We place these vertices on a line ℓ sufficiently far from the other vertices, and group them by type. We then use a single obstacle to block the pairwise visibilities of vertices on ℓ, and at most k · 2 k obstacles to block visibilities between each type and each vertex in X where necessary. ◀ Our proof will also rely on a Ramsey-type argument based on the following formulation of Ramsey's theorem [19]: ▶ Theorem 18 ([19]). There exists a function Ram : N 2 → N with the following property. For each pair of integers q, s and each clique H of size at least Ram(q, s) such that each edge has a single label (color) out of a set of q possible labels, it holds that H must contain a subclique K of size at least s such that every edge in K has the same label.
We can now proceed towards a proof of Theorem 8, which establishes the fixed-parameter tractability of computing the obstacle number with respect to the vertex cover number.
Proof Sketch for Theorem 8. Let X be a computed vertex cover of size at most k in the input graph G. If h > 1 + k 2 + k · 2 k we immediately output "Yes" by Lemma 17, and so for the rest of the proof, we proceed assuming that h ≤ 1 + k 2 + k · 2 k . We also note that if G contains only types of size bounded by a fixed, sufficiently large function of k (which we will hereinafter denote typesize(k)), then the instance can be solved by brute force. Hence, we assume that G contains at least one type T with more than typesize(k) vertices.
Our proof strategy will be to show that under these conditions, G is a Yes-instance (i.e., admits a representation with at most h obstacles) if and only if the graph G ′′ obtained by deleting an arbitrary vertex from T is a Yes-instance; in other words, that we may prune a vertex from T . This claim would immediately yield fixed-parameter tractability of the problem: one could iterate the procedure of computing a vertex cover for the input graph, checking whether the types are sufficiently large, and based on that check one either brute-forces the problem or restarts on a graph that contains one fewer vertex (notice that the number of restarts is upper-bounded by n).
As a first step, let us consider a hypothetical "optimal" solution S for (G, h), i.e., S is an obstacle representation of G with the minimum number of obstacles. It is easy to observe that simply using the same placement of obstacles for the graph G ′′ obtained by removing a single vertex from T yields a desired solution S ′ for (G ′′ , h). It is the converse direction that is the difficult one: for that, it suffices to establish the equivalent claim that the graph G ′ obtained by adding a vertex to T admits an obstacle representation S ′ with the same number of obstacles as S.
Given S, we will now consider an auxiliary edge-labeled clique H whose vertices are precisely the vertices in T , which can be assumed to be ordered by ≺ in an arbitrary but fixed way. For each pair of vertices a, b ∈ T where a ≺ b, the a-b edge in H is labeled by the first obstacle encountered when traversing the line segment ab. Crucially, by Theorem 18 and the selection of typesize(k) ≥ Ram(h, 10k 3 · 2 k ), H must contain a subclique K of size at least cliquesize(k) = 10k 3 · 2 k such that each edge in K has the same label, say p.
Intuitively, our aim in the rest of the proof will be to show that the obstacle p can be "safely" extended towards some vertex z in K, where by safely we mean that it neither intersects another obstacle nor blocks the visibility of an edge; this extension will either happen directly from S, or from a slightly altered version of S. Once we create such an extension, it will be rather straightforward to show that p can be shaped into a tiny "comblike" slot for a new vertex z ′ next to z which will have the same visibilities (and hence neighborhood) as z, which means we have constructed a solution S ′ for G ′ as desired.
To this end, we show that almost all vertices in K must be placed in a system of crevices formed by p (these can be imagined as "openings" in p, each containing a specific crevice vertex from K; see Fig. 5). By a sequence of claims, we can then restrict our attention to a still sufficiently large subsystem of these crevices which are good, meaning that they contain no obstacle other than p, no vertex from the vertex cover, and where visibilities between pairs of vertices outside the crevice would not be obstructed by extending p towards the crevice vertex. However, other vertices may still be present in good crevices, and so such an extension could still obstruct the visibility of vertices inside the crevice. To deal with this final issue and extend p to a crevice vertex as required to conclude the proof, we will seek out a crevice which is not just good but also perfect, meaning that it contains no vertex other than the crevice vertex. While S itself need not contain a perfect crevice, in the last part of the proof we use a swapping argument on S to argue the existence of an equivalent solution which is guaranteed to contain one. ◀

NP-Hardness of Deciding Whether a Given Obstacle is Enough
In this section, we investigate the complexity of the obstacle representation problem for the case that a single (outside) obstacle is given.
▶ Theorem 9. Given a graph G and a simple polygon P , it is NP-hard to decide whether G admits an obstacle representation using P as (outside-) obstacle.
Proof Sketch. We reduce from 3-Partition, which is NP-hard [11]. An instance of 3-Partition is a multiset S of 3m positive integers a 1 , . . . , a 3m , and the question is whether S can be partitioned into m groups of cardinality 3 such that the numbers in each group sum up to the same value B, which is ( Given a multiset S, we construct a graph G and a simple polygon P with the property that the vertices of G can be placed in P such that their visibility graph with respect to P is isomorphic to G if and only if S is a yes-instance of 3-Partition. Let G be a clique with vertices v 1 , . . . , v 3m where, for i ∈ [3m], clique vertex v i is connected to a i leaves ℓ i,1 , . . . , ℓ i,ai . The polygon P (see Fig. 6) is an orthogonal polygon with m groups of B bays (red in Fig. 6) that are separated from each other by corridors (of height B/4 and width 4B; light blue in Fig. 6). Each bay is a unit square; any two consecutive bays are one unit apart. The height of P (including the bays) is B/2 + 1. Note that the sizes of G and P are polynomial in m.