Abstract 1 Introduction 2 ETR-INV-REV 3 Arranging the art gallery 4 Construction of the copy nooks 5 The constraint gadgets 6 Conclusions References

The Point-Boundary Art Gallery Problem Is -Hard

Jack Stade ORCID University of Copenhagen, Denmark
Abstract

We resolve the complexity of the point-boundary variant of the art gallery problem, showing that it is -complete, meaning that it is equivalent under polynomial time reductions to deciding whether a system of polynomial equations has a real solution.

The art gallery problem asks whether there is a configuration of guards that together can see every point inside of an art gallery modeled by a simple polygon. The original version of this problem (which we call the point-point variant) was shown to be -hard [Abrahamsen, Adamaszek, and Miltzow, JACM 2021], but the complexity of the variant where guards only need to guard the walls of the art gallery was left as an open problem. We show that this variant is also -hard.

Our techniques can also be used to greatly simplify the proof of -hardness of the point-point art gallery problem. The gadgets in previous work could only be constructed by using a computer to find complicated rational coordinates with specific algebraic properties. All of our gadgets can be constructed by hand and can be verified with simple geometric arguments.

Keywords and phrases:
Art Gallery Problem, Complexity, ETR, Polygon
Copyright and License:
[Uncaptioned image] © Jack Stade; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
Related Version:
Full Version: https://arxiv.org/abs/2210.12817
Funding:
Supported by Independent Research Fund Denmark, grant 1054-00032B, and by the Carlsberg Foundation, grant CF24-1929.
Editors:
Oswin Aichholzer and Haitao Wang

1 Introduction

1.1 Art gallery problem

The original form of the art gallery problem (AGP) presented by Victor Klee (see O’Rourke [11]) asks whether a simple polygonal region P can be guarded by n guards. That is, whether there is a set of n points (called the guards) in P such that every point in P is visible to some guard, meaning that the the line segment between that point and that guard is contained in P. The polygon P is referred to as the art gallery.

The vertices of P are usually restricted to rational or integer coordinates, but even so an optimal configuration might require guards with irrational coordinates. Abrahamsen, Adamaszek and Miltzow give explicit examples that require irrational coordinates in [1]. For this reason, we don’t expect algorithms to actually output the guarding configurations, only to determine how many guards are necessary.

It is non-trivial to see that the problem is even decidable. The first exact algorithm for the most general variants of the AGP is attributed to Sharir (see Efrat and Har-Peled [7]).

1.2 The complexity class

The decision problem ETR (Existential Theory of the Reals) asks whether a sentence of form:

X1XnΦ(X1,,Xn)

is true, where the Xi are real variables and Φ is a formula in the Xi involving 0, 1, +, , , =, <, , ¬, , and . The complexity class consists of problems that can be reduced to ETR in polynomial time. A number of interesting problems have been shown to be complete for , including for example packing polygons in a square [3] and the problem of deciding whether there exists a point configuration with a given order type [10, 14].

By a result of Schaefer and Stefankovic [12], the exact inequalities used don’t matter; for example we obtain an equivalent definition of if we don’t allow =, , or ¬ in Φ. The same authors have more recently shown that similar results hold at every level of a real hierarchy, of which is the first level [13].

It is straightforward to show that NP. It is also known, though considerably more difficult to prove, that PSPACE (Canny [6]). It is unknown whether either inclusion is strict.

1.3 Art gallery variants

A natural class of variants of the art-gallery problem is given by restricting both the positions that can be occupied by the guards and the points that need to be guarded. We will adopt the notation used in [4]:

Definition 1.

(Agrawal, Knudsen, Lokshtanov, Saurabh, and Zehavi [4]) The X-Y Art Gallery problem, where X,Y{Vertex,Point,Boundary}, asks whether the polygon P can be guarded with n guards, where if X=Vertex the guards are restricted to lie on the vertices of the polygons, if X=Boundary the guards are restricted to lie on the boundary of the polygon, and if X=Point then the guards can be anywhere inside the polygon. The region that must be guarded is determined by Y analogously.

Table 1 lists these variants and the known bounds on complexity.

Table 1: Variants of the art gallery problem.

If X or Y is Vertex, then the problem is easily seen to be in NP. Lee and Lin [9] showed that all of these variants are NP-hard (the result is stated for all the X-Point variants, but their constructions also work for the other variants. See also [8]). More recently, Abrahamsen, Adamaszek, and Miltzow [2] showed that the point-point and boundary-point variants are complete. It is straightforward to extend their proof of membership in to any of these variants, but they list hardness of the point-boundary variant an open problem.

1.4 Our results

Our main result is that the point-boundary variant of the art gallery problem is, up to polynomial time reductions, as hard as deciding whether a system of polynomial equations has a real solution.

Theorem 2.

The point-boundary variant of the art gallery problem is -complete.

While the complexity of the boundary-boundary variant is still unsolved, this is is enough to show that the the X-Y art gallery problem is equivalent to the Y-X art gallery problem for X,Y{Vertex,Point,Boundary}.

Our ideas can also be used to considerably simplify the construction in [2]. Both the construction and verification of each of our gadgets is simpler than that of the corresponding gadget in [2]. Indeed, our gadgets can be drawn by hand with little more than compass-and-straightedge-style constructions. Each gadget is specified by a simple set of geometric properties rather than by exact coordinates. Our gadgets are quite flexible and the geometry could probably be adapted to other settings.

Our reduction is from a problem called ETR-INV-REV, which is a slight modification of a problem ETR-INV from [2]. In Section 2, we define this problem and show that it is -hard.

Given an instance Φ of ETR-INV-REV, we show how to construct a polygon whose boundary can be guarded by some number n guards if and only if Φ has a satisfying assignment. In Section 3, we describe the overall structure of the polygon that we construct and explain how to constrain the positions of guards. In Section 4, we describe copy gadgets that are required in order to use a single variable in multiple constraints. Finally, in Section 5 we describe the gadgets that create constraints and prove Theorem 2.

Throughout, statements marked with () have proofs omitted. The proofs can be found in the full version.

2 ETR-INV-REV

The proof of Theorem 2 is by reduction of the problem we call ETR-INV-REV to the point-boundary variant of the art gallery problem.

Definition 3.

(ETR-INV-REV) In the problem ETR-INV-REV, we are given a set of real variables {x1,,xn} and a set of inequalities of the form:

x=1,xy1,x(52y)1,x+yz,x+yz,

for x,y,z{x1,,xn}. The problem asks whether there is an assignment of the xi satisfying these inequalities with each xi[12,2].

Abrahamsen, Adamaszek and Miltzow [2] proved the -hardness of the point-point and boundary-point variants using a similar problem called ETR-INV.

Definition 4.

(Abrahamsen, Adamaszek and Miltzow [2]) (ETR-INV) In the problem ETR-INV, we are given a set of real variables {x1,,xn} and a set of equations of the form:

x=1,xy=1,x+y=z,

for x,y,z{x1,,xn}. The problem asks whether there is a solution to the system of equations with each xi[12,2].

Theorem 5.

(Abrahamsen, Adamaszek, Miltzow [2]) The problem ETR-INV is -complete.

Regardless of the specific art gallery variant, it seems to be difficult to make a construction that admits both xy1 and xy1 constraints. The xy1 inversion gadget in [2] is actually closer to a x(52y)1 gadget, and another gadget is used to compute a constraint like y=(52y). By reducing from ETR-INV-REV instead, our construction avoids the need for a reversing gadget.

Theorem 6.

() The problem ETR-INV-REV is -hard.

3 Arranging the art gallery

Throughout this section, and the rest of the paper, AB refers to a line segment with endpoints A and B, AB is the line containing that segment, and |AB| is the length of that segment.

3.1 Creating guard regions

We will designate some number n of disjoint guard regions inside the art gallery such that any guarding configuration with n guards must have exactly one guard in each region. Each guard region is determined by wedges on the polygon boundary. Each wedge is formed by two edges of the art gallery meeting at a convex corner. The visibility region of a wedge is the set of points that can see the tip of the wedge. A wedge and its visibility region is shown in Figure 1 (left).

Figure 1: Left: A wedge (W) and its visibility region (V). Right: The intersection of the visibility regions of the three wedges shown forms a guard segment. This method of using 3 wedges to form a guard segment is due to Bertschinger, El Maalouly, Miltzow, Schnider and Weber [5] and is a slight simplification of the method for forming guard segments from [2].

In a guarding configuration, the visibility region of each wedge must contain a guard. We designate a guard region by specifying some (non-zero) number of wedges, and the guard region is the intersection of the visibility regions of those wedges. These must be chosen that visibility regions of any two wedges corresponding to different guard regions do not intersect. A guard region shaped like a line segment is called a guard segment, as in Figure 1 (right).

Lemma 7.

If we designate n guard regions, then any guarding configuration has at least n guards, and a guarding configuration with exactly n guards has 1 guard in each guard region.

Proof.

Choose wedges w1,,wn, one from each of the guard regions. The guard regions are chosen so that the visibility regions of these wedges do not intersect. In a guarding configuration, each of these regions contains at least 1 guard. Since these region do not intersect, this requires at least n guards.

If a guarding configuration contains exactly n guards, then there will be exactly 1 guard in the visibility region of wi for each i. Consider the guard region containing wj and suppose v is another wedge forming that guard region. There is a guard in the visibility region of v, and this region doesn’t intersect the visibility region of wi for ij, so this guard must be the one in wj. Repeating this argument for the other wedges forming this guard region, we see that the guard in wj must be in each of them. So the guard is in the guard region.

So a guarding configuration with exactly n guards has 1 guard in each guard region.

The guard segments in our construction will all be vertical, and the position of a guard on a guard segment will encode a variable in the interval [12,2], with the bottom endpoint of the interval corresponding to 12 and the top endpoint corresponding to 2.

3.2 Constraint nooks

We use constraint nooks to enforce constraints involving multiple variables. Each nook consists of a line segment on the boundary of the art gallery, called the nook segment, and two polygon vertices called opening points. The region of partial visibility of a nook is the set of points which can see some part of the nook segment.

If the nook segment has endpoints A and B and the opening points are E and F where E,A,B,F occur in that order on the polygon boundary, then we say that E restricts A and F restricts B (see Figure 2).

These are slightly more general than the nooks from [2], in that it will sometimes be necessary to intersect a wedge with a nook, as in Figure 2 (left).

Figure 2: Left: A nook with nook segment AB, opening points E restricting A and F restricting B, and partial visibility region V. The outer parts of V (lighter) can only see part of the nook segment. Right: This art gallery can be guarded by two guards, but there is no such configuration where the nook segment on the left is guarded entirely by a single guard. This creates a continuous constraint between the positions of the two guards.

A guarding configuration will have some non-zero number of guards in the partial visibility region of a nook, that together must guard the nook segment, as in Figure 2 (right). Multiple guards can collaborate to guard a single nook segment, creating a continuous dependence between the positions of those guards.

3.3 Schematic of the art gallery

Figure 3: A schematic of the art gallery that we construct (not to scale). The variables are encoded by positions of guards on the variable segments (red, middle). The constraint gadgets on the bottom right enforce constraints like xy1 or x+yz on the variables encoded by the input segments (red, bottom right). The copy nooks copy the values of the appropriate variables onto the input segments. The wedges creating the segment-shaped guard regions can be seen along the top and bottom walls of the art gallery.

Figure 3 shows a schematic of the entire art gallery construction. We start with an instance Φ of ETR-INV-REV with variables x1,,xn and constraints of form:

x=1,xy1,x(52y)1,x+yz,x+yz,

Each variable is represented by a guard region called a variable segment. The variable segments are arranged in a row near the middle of the art gallery. The height of a guard on a variable segment corresponds linearly to the value of the variable encoded, with the bottom of the variable segment mapping to 12 and the top mapping to 2.

Figure 4: Four wedges create a point-shaped guard region.

The constraints of form x=1 in Φ are created by adding wedges to create a guard region consisting of only a single point, as shown in Figure 4. Each constraint involving more than one variable is created by a constraint gadget, which we place in a row on the bottom right of the art gallery. The constraint gadgets are modular in the sense that they (almost) do not depend on Φ. Each constraint gadget operates on either 2 or 3 guard segments called input segments. Nooks in the constraint gadget create constraints on the variables represented by the guards on the input segments.

Each input segment can only appear in one constraint gadget, so we need copy nooks to relate each input segment to the variable segment for the variable that it represents.

4 Construction of the copy nooks

If a guard on a variable segment encodes a value x and a guard on an input segment encodes a value y, then a copy nook creates a constraint like xy or xy. Figure 5 shows an example of a copy nook enforcing a constraint like xy. This type of copy nook is due to Stade and Tucker-Foltz [15].

4.1 Verifying a single copy nook

Figure 5: A copy nook, shown in the situation where the guard positions don’t fully guard the nook.
Lemma 8.

Suppose segments AB and CD are such that AB and CD are parallel, and suppose AC and BD intersect at a point P, as in Figure 6. If a line through P intersects AB at a point X and intersects CD at a point Y, then |AX||AB|=|CY||CD|.

Proof.

Triangles APB and CPD are similar, so |AP||AB|=|CP||CD|. Also, the triangles AXP and CYP are similar, so |AX||AP|=|CY||CP|. Multiplying, we obtain |AX||AB|=|CY||CD|.

Figure 6: Setup for Lemma 8.
Lemma 9.

Suppose that AB and CD are parallel guard segments and there is a nook with nook segment EF that is parallel to AB and CD. Suppose the nook has openings points P on the intersection point of AE and BF and Q on the intersection of BE and CF so that P restricts F and Q restricts G.

Suppose also that the nook is unobstructed, that is that every segment through P from a point on AB to a point on EF is contained in the art gallery and segments through Q are similarly unobstructed.

Then guards at positions X and Y on AB and CD respectively guard the nook if and only if:

|AX||AB||CY||CD|

The setup for Lemma 9 is shown in Figure 5. The proof is a straightforward application of Lemma 8.

Figure 7: A guard (g1) on a variable segment and a guard (g2) on an input segment are related by two copy nooks. The upper nook is guarded when the value encoded by g1 is at least the value encoded by g2, and the lower nook is guarded when the value encoded by g1 is at most the value encoded by g2.

By changing which intersection point restricts which endpoint of the nook segment, we can create a constraint either xy or xy. Figure 7 shows a pair of guard segments with both types of copy nook between them.

Enforcing a constraint x=y requires 2 nooks, but all of the constraints allowed by ETR-INV-REV are monotone with respect to any single variable, so we only need a single copy nook for each input segment. For example, xy1 is equivalent to xy1, xx and yy (when there are no other constraints on x and y).

In the full version, we show that it is possible to arrange all the copy nooks in such a way that none of them interfere with each other. This construction ensures that the partial visibility region of each copy nook is bounded by lines with slope between 12 and 1, a fact that will be useful in order to make sure that the constraint gadgets don’t interfere with the copy nooks.

5 The constraint gadgets

We start with some specifications that a constraint gadget should adhere to in order to be compatible with the copy nooks. There are several bad cases that we need to prevent:

  • The constraint gadget obstructs the visibility between an input segment and a copy nook.

  • A guard on a variable segment can see part of a nook segment in the constraint gadget.

  • An guard used by the gadget (called an auxiliary guard) can see part of the nook segment of a copy nook.

For each constraint gadget, we designate R1 and R2, shown in Figure 8. The region R1 is bounded by the convex hull of the input segments to that gadget and lines of slope 12 and 1 through the bottom of the leftmost input segment and the top of the rightmost input segment respectively. R2 is the set of points that can be connected to a point outside of the constraint gadget by a line segment that is contained in the polygon and has slope between 1 and 0.

Figure 8: Diagram of a constraint gadget. The region R1 is bounded by lines with slope 1 and 12. The region R2 is bounded by lines with slope 1 and the polygon wall. The yellow region is a an auxiliary guard region, which must not intersect R2.
Lemma 10.

The region R1 contains all possible sight lines between an input segment and the nook segment of one of the copy nooks, so if the constraint gadget does not have any walls that intersect this region then it will not obstruct the copy gadgets.

Proof.

The construction in Section 4 ensures that all sight lines between an input segment and a nook segment have slope between 1 and 12, and so are contained in the region R1.

Lemma 11.

The only points in a constraint gadget that can be seen by a variable segment are in R2. So any nook with a nook segment that doesn’t intersect R2 must be guarded by guards on input segments or auxiliary guards in that gadget.

Points in a constraint gadget outside of R2 cannot see any part of the nook segment of any copy nook. So if any auxiliary guard regions don’t overlap R2, then a guard in that region can’t help guard any of the copy nooks.

Proof.

The construction of the copy nooks ensures that any line between a variable segment and a point at the top of a constraint gadget has slope between 1 and 0. Any sight line between a point on a variable segment and a point in the constraint gadget must pass through the top, so any such line has slope between 1 and 0. So R2 contains all points in the constraint gadget that can be seen by a point on a variable segment.

The construction of the copy nooks also ensures that the partial visibility region of each copy nook is bounded by lines with slope between 1 and 12. So the only points in a constraint gadget that can see part of a nook segment of a copy nook are in R2.

5.1 Inversion gadgets

Each inversion gadget consists of a single constraint nook interacting with the two input variables. Figures 9 and 10 show the xy1 and x(52y)1 inversion gadgets respectively. Figures 11 and 12 show the geometry of these gadgets in more detail.

Figure 9: The xy1 inversion gadget. The two red segments are the input segments, with the left segment representing the variable x and the right segment representing y. Both guards see more of the nook segment the higher they are. The blue segment is a “phantom” segment that is used to help verify the gadget.
Figure 10: The x(52y)1 inversion gadget. Compared to the xy1 gadget, the guard on the left segment (representing x) now sees more of the nook segment when it is lower.

In either gadget, we suppose that there is a guard at X on the input segment GH. The nook has opening points P and Q, so the guard at X can see all the points to the left of point Y on the nook segment IJ. For the xy1 gadget, this means that a guard on AB see the rest of IJ if and only if it is above the point W. For the x(52y)1 gadget, a guard on AB should be below W instead.

Figure 11: Labeled diagram of the xy1 inversion gadget shown in Figure 10.
Figure 12: Labeled diagram of the x(52y)1 inversion gadget shown in Figure 9.

In both cases, the guard on AB represents the input x and the guard on GH represents the input y. The segments represent the intervals [12,2], with lower points on the segments corresponding to lower values. So we should show that:

(32|AW||AB|+12)(32|GX||GH|+12)=1

for any X on GH and W on AB as shown.

Figure 13: As long as the points P, Y, and Z are colinear, then the value of |EZ||FY| does not depend on the positions of Y and Z, so the positions of Z and Y are related by inversion. The curved relationship occurs because AB and CD are not parallel.
Lemma 12.

If line segments AB and CD are not parallel, as in Figure 13, let P be the intersection of AD and BC. Let E be the point on AB such that PE and CD are parallel, and let F be the point on CD such that PF and AB are parallel. Suppose that a point Y on CD and a point Z on AB are such that P, Y and Z are collinear. Then |EA||EB|=|FC||FD|, and letting α2=|EA||EB| and β2=|FC||FD| we have |EZ|α|FY|β=1.

Proof.

The triangles EPX and FYP are similar, so |EZ||EP|=|FP||FY|, so |EZ||FY|=|FP||EP|. In particular, when Z=A, we have |EA||FD|=|FP||EP|, and when Z=B, we have |EB||FC|=|FP||EP|, so |EA||FD|=|EB||FC| and |EA||EB|=|FC||FD|.

Now |EZ||FY|=|FP||EP|=|EA||FD|=|EB||FC|, so:

|EZ||FY|=|EA||FD||EB||FC|=α2β2=αβ

The formulas |EZ|α and |EY|β give mappings from points on the input segments to . We want the input segment to correspond to the intervals [12,2], so we choose |EB|=4|EA| (and therefore |FD|=4|FC|), so α=2|EA|=12|EB| and β=2|FC|=12|FD|. This means that |EZ|α and |FY|β will map the segments AB and CD respectively onto [12,2].

On its own, Lemma 12 could be used to construct a nook which enforces an inversion constraint on two input segments which aren’t parallel. The input segments to a constraint gadget should be parallel, so we will need the result of Lemma 13 to correct the orientation.

Figure 14: If X is on GH, then define Y by projecting X onto IJ through Q and then projecting that point onto CD through P. The relative position of X on GH is the same as the relative position of Y on CD.
Lemma 13.

Suppose line segments GH, CD, and IJ are such that GH, CD, and IJ all intersect at a point O, as in Figure 14. Also suppose that the ratios |OG||OH| and |OC||OD| are the same. Let P be the point where ID and JC intersect, and Q be the point where IH and JG intersect. Suppose that points X on GH, Y on CD and W on IJ are such that W, P, and Y are collinear and W, Q and X are collinear. Then |GX||GH|=|CY||CD|.

Proof.

Place the figure in the vector space 2 with the point O at (0,0). We will show that there is a linear map which sends points G,X and H to C,Y and D respectively.

The pairs of vectors {I,G} and {I,C} are each bases for 2. Let θ be the linear isomorphism 22 which sends a vector V to the coefficients (t,s) such V=tI+sG, and let ψ be a similar map which writes V as tI+sC. Now the linear map ψ1θ fixes points on the line containing I and J, and sends G to C. Since |OA||OB|=|OC||OD|, this map sends H to D, and so sends Q to P. The point W is fixed, so the line WQ is sent to WP, meaning that X is sent to Y. So points G,X and H are sent to C,Y and D respectively. Since linear maps preserve ratios of distances along a line, we see that:

|GX||GH|=|CY||CD|

Note that the mappings from GH to IJ and from IJ to CD are in general not linear, only the composition is.

Lemma 14.

In either the xy1 or x(52y)1 gadget, suppose there are points C on JP and D on IP such that GH, CD and IJ all intersect at a point O, with C and D satisfying:

|OG||OH|=|OC||OD|

Suppose also that there are points E on AB and F on CD so that A is between E and B, C is between F and D, PF and AB are parallel and PE and CD are parallel, with |FD|=4|FC| and |EB|=4|EA|. Then:

(32|AW||AB|+12)(32|GX||GH|+12)=1

so the two inversion gadgets enforce the appropriate constraints.

Proof.

Examples of points C, D, E and F with these properties are shown in Figures 11 and 12. Let Z be the intersection of YP with CD. By Lemma 13:

|GX||GH|=|CZ|CD

By Lemma 12, we have that:

|EW|2|EA||FZ|2|FC|=1

Since 4|EA|=|EB|=43|AB|, we have that:

(32|AW||AB|+12)=(|AW|2|EA|+|EA|2|EA|)=|EW|2|EA|

Similarly:

(32|GX||GH|+12)=(32|CZ||CD|+12)=|FZ|2|FC|

So:

(32|AW||AB|+12)(32|GX||GH|+12)=1

It remains to show that gadgets satisfying the conditions of Lemma 14 can actually be created. The most direct approach would require solving a quadratic equation, potentially introducing irrational coordinates. The authors of [2] solved a similar issue with their inversion gadgets by carefully choosing coordinates that yield quadratic equations with rational solutions. However, our gadgets can be constructed more geometrically.

Lemma 15.

() Geometry for the xy1 and x(52y)1 gadgets can be constructed in a way that satisfies the conditions of Lemmas 14, 10, and 11. This does not require irrational coordinates.

5.2 Addition gadgets

Each nook creates a constraint between the positions of only 2 guards, but the addition gadgets should create a constraint involving 3 variables. This can be accomplished by allowing both coordinates of one guard to vary, as illustrated in Figure 15.

Figure 15: Creating a constraint between 3 variables. The guard g1, g2 and g3 each see part of one of the nook segments. If the three shaded regions intersect, then a guard g4 can be placed in the intersection so that g4 guards the parts of the nook segments that aren’t guarded by g1, g2 and g3. If the three shaded regions do not intersect, then this isn’t possible.

The addition gadgets are shown in Figures 16 and 17. Each gadget has 3 input segments, an auxiliary guard region, and three constraint nooks. Each constraint nook creates a constraint between the auxiliary guard and one input segment.

Figure 16: The x+yz addition gadget. The partial visibility regions of the 3 nooks are marked, as is the visibility region of the wedge forming the auxiliary guard region. The auxiliary guard will need to be somewhere in the purple shaded region.
Figure 17: The x+yz addition gadget.

The gadget can be guarded when it is possible to place a guard in the auxiliary guard region so that it can see the parts of the nook segments that aren’t visible to the input guards. We can use Lemma 8 to control the relationship between the positions of the guards on the input segments and their “shadows” on the nook segments. Lemma 16 allows us to determine what parts of these nook segments can be seen by an auxiliary guard.

Lemma 16.

Suppose the line segments AB, CD, and EF have the same length and lie on the same vertical line, as in Figure 18, and suppose |CB|=|DE|. Let points P, Q, and R lie on a vertical line, with |QP|=|QR|. Note that AP, CQ, and ER intersect in a single point, and the same is true of BP, DQ, and FR.

Suppose points X and Y lie on AB and EF respectively. Now XP and YQ intersect at a point I. Let Z be the point on the intersection of CD and IQ.

If all is as above, then 12(|AX|+|EY|)=|CZ|.

Figure 18: By Lemma 16, 12(|AX|+|EY|)=|CZ|.

Proof.

The idea is to transform the geometry from Figure 18 to obtain something like Figure 19.

Figure 19: A projective transformation sends points P, Q, and R to points P, Q and R at infinity, so the family of lines through any one of these points is sent to a family of parallel lines.

This transformation should send straight lines to straight lines and should fix the line containing points A,B,C,D,E,F,X,Y and Z. Additionally, the points P, Q and R should be sent to “infinity”, lines through P should be sent to lines with slope 1, lines through Q should be sent to lines with slope 0, and lines through R should be sent to lines with slope +1. If such a transformation exists, then it is clear by straightforward linear algebra that 12(|AX|+|EY|)=|CZ|.

Isomorphisms of the projective space P2 send straight lines to straight lines. A degrees-of-freedom argument would be sufficient to find a transformation of projective space with the required properties. Instead we just give it explicitly. Assume that the line containing A and B is vertical, and let x0 be the x-coordinate of this line. Let x1 be the x-coordinate of P,Q and R, y0 the y-coordinate of Q, and let a=|QP|=|QR|, so P has y-coordinate y0+a and R has y-coordinate y0a. Then the transformation (x,y)(x,y) with the desired properties is defined by:

[x0+a0(x1+a)x0y0x0x1y0x010x1][xy1]=λ[xy1]

Writing the map in this form makes it easy to check what happens to lines through P, Q, and R. In particular, for a 3×3 matrix A, if:

A[pxpy1]=[ab0]

then the map (x,y)(x,y) given by:

λ[xy1]=A[xy1]

sends lines through (px,py) to lines parallel to [ab].

Note that the setup used here is very similar the addition gadgets in [2], although our verification is different.

We want to create gadgets enforcing x+y=z, not 12(x+y)=z, so we need to use Lemma 8 to change the scale and offset of z. A schematic of the nooks used by the addition gadgets are shown in Figures 20 and 21.

Figure 20: Schematic of the x+yz addition gadget. In the actual gadgets, the lines bounding all the visibility regions have positive slopes as shown in Figures 17 and 16, but it is not possible to draw this faithfully at a readable scale.
Figure 21: The nooks for the x+y1 gadget.
Lemma 17.

() It is possible to construct addition gadgets enforcing constraints x+yz or x+yz.

5.3 Final verification

Lemma 18.

Given an instance Φ of ETR-INV-REV, it is possible to construct in polynomial time an art gallery P and a number n so that P can be guarded by n guards if and only if Φ is satisfiable.

Proof.

First, create corresponding constraint gadgets for every constraint of form xy1, x(52y)1, x+yz, or x+yz that occurs in Φ. Arrange these in a horizontal row along the bottom of the art gallery so that all the input segments occur in a horizontal row and the distance between any pair of input segments is a multiple of d=5 times the length of a single input segment.

The construction in Section 4 can be used to place the copy nooks and variable segments. Now connect all the pieces of the art gallery and add the wedges forming all the guard segments. These wedges should be chosen to be sufficiently narrow so that visibility regions of wedges from different guard regions do not intersect.

It is straightforward to check that this construction can be done in polynomial time and that the coordinates needed are rational numbers with at most polynomially many bits.

There are n guard regions, consisting of the variable segments, input segments, and auxiliary guards. By Lemma 7, any guarding configuration with n guards must have one guard in each guard region. Conversely, any guarding configuration with one guard in each guard can clearly guard all of these wedges.

There are some walls of the art gallery that aren’t part of the wedges, copy nooks, or constraint gadgets. The top, bottom, and right walls of the art gallery can be guarded by any guard on a variable segment. For any two copy nooks, a segment connecting can always be guarded by either of the guards on the variable segments in the visibility regions of those nooks. So any guarding configuration with one guard in each guard region will guard everything expect for possibly the copy nook and constraint gadgets.

By Lemmas 14 and 17, each constraint gadget can be guarded if and only if the guards on its input segments represent variables satisfying the corresponding constraint. Whenever a variable in Φ appears in a constraint, there are copy nooks between that variable segment and an input segment to the gadget representing that constraint. By Lemma 9, these copy nooks are guarded if and only if the guard on the input segment and the guard on the variable segment represent the value in [12,2].

So P can be guarded by n guards if and only if Φ has a satisfying assignment.

The -hardness of the point-boundary art-gallery problem follows from the -hardness of ETR-INV-REV, proving Theorem 2.

6 Conclusions

Our result shows that the X-Y and Y-X variants of the art gallery problem are equivalent under polynomial time reductions when X,Y{Vertex,Point,Boundary}. Visibility is reflexive, so this result seems unsurprising. Maybe it could be proven more directly.

It is interesting to note that our construction, while intended for the point-boundary variant of the art gallery problem, is also sufficient to show the -hardness of the standard point-point variant. When it is possible to guard an art gallery produced by our construction in the point-boundary setting, the same guarding configuration is also a point-point guarding configuration. Something similar happens in [2], where the construction for the boundary-point variant is also a construction for the point-point variant. It doesn’t seem to be possible to adapt either construction to the boundary-boundary variant.

Unlike the construction from [2], the nook segments in our construction can be chosen to all be axis-parallel. Each other segment is always entirely guarded by a single guard. It may be possible to adapt our construction to show that guarding orthogonal polygons is -hard.

References

  • [1] Mikkel Abrahamsen, Anna Adamaszek, and Tillmann Miltzow. Irrational Guards are Sometimes Needed. In Boris Aronov and Matthew J. Katz, editors, 33rd International Symposium on Computational Geometry (SoCG 2017), volume 77 of Leibniz International Proceedings in Informatics (LIPIcs), pages 3:1–3:15, Dagstuhl, Germany, 2017. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2017.3.
  • [2] Mikkel Abrahamsen, Anna Adamaszek, and Tillmann Miltzow. The art gallery problem is -complete. Journal of the ACM, 69(1):1–70, 2021. doi:10.1145/3486220.
  • [3] Mikkel Abrahamsen, Tillmann Miltzow, and Nadja Seiferth. Framework for er-completeness of two-dimensional packing problems. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 1014–1021, 2020. doi:10.1109/FOCS46700.2020.00098.
  • [4] Akanksha Agrawal, Kristine V. K. Knudsen, Daniel Lokshtanov, Saket Saurabh, and Meirav Zehavi. The Parameterized Complexity of Guarding Almost Convex Polygons. In Sergio Cabello and Danny Z. Chen, editors, 36th International Symposium on Computational Geometry (SoCG 2020), volume 164 of Leibniz International Proceedings in Informatics (LIPIcs), pages 3:1–3:16, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2020.3.
  • [5] Daniel Bertschinger, Nicolas El Maalouly, Tillmann Miltzow, Patrick Schnider, and Simon Weber. Topological art in simple galleries. In Symposium on Simplicity in Algorithms (SOSA), pages 87–116. Society for Industrial and Applied Mathematics, January 2022. doi:10.1137/1.9781611977066.8.
  • [6] John Canny. Some algebraic and geometric computations in pspace. In Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, STOC ’88, pages 460–467, New York, NY, USA, 1988. Association for Computing Machinery. doi:10.1145/62212.62257.
  • [7] Alon Efrat and Sariel Har-Peled. Guarding galleries and terrains. Inf. Process. Lett., 100:238–245, January 2006. doi:10.1007/978-0-387-35608-2_16.
  • [8] Aldo Laurentini. Guarding the walls of an art gallery. The Visual Computer, 15:265–278, October 1999. doi:10.1007/s003710050177.
  • [9] D. T. Lee and Arthur K. Lin. Computational complexity of art gallery problems. IEEE Transactions on Information Theory, 32(2):276–282, 1986. doi:10.1109/TIT.1986.1057165.
  • [10] Nikolai E Mnëv. The universality theorems on the classification problem of configuration varieties and convex polytopes varieties. In Topology and geometry—Rohlin seminar, pages 527–543. Springer, 1988.
  • [11] Joseph O’Rourke. Art gallery theorems and algorithms, volume 57. Oxford New York, NY, USA, 1987.
  • [12] Marcus Schaefer and Daniel Stefankovic. Fixed points, nash equilibria, and the existential theory of the reals. Theory of Computing Systems, 60:172–193, 2017. doi:10.1007/S00224-015-9662-0.
  • [13] Marcus Schaefer and Daniel Štefankovič. Beyond the existential theory of the reals. Theor. Comp. Sys., 68(2):195–226, December 2023. doi:10.1007/s00224-023-10151-x.
  • [14] Peter W. Shor. Stretchability of pseudolines is np-hard. In Applied Geometry And Discrete Mathematics, 1990.
  • [15] Jack Stade and Jamie Tucker-Foltz. Topological Universality of the Art Gallery Problem. In Erin W. Chambers and Joachim Gudmundsson, editors, 39th International Symposium on Computational Geometry (SoCG 2023), volume 258 of Leibniz International Proceedings in Informatics (LIPIcs), pages 58:1–58:13, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2023.58.