# Optimal Art Gallery Localization is NP-hard

Art Gallery Localization (AGL) is the problem of placing a set T of broadcast towers in a simple polygon P in order for a point to locate itself in the interior. For any point p ∈ P: for each tower t ∈ T ∩ V(p) (where V(p) denotes the visibility polygon of p) the point p receives the coordinates of t and the Euclidean distance between t and p. From this information p can determine its coordinates. We study the computational complexity of AGL problem. We show that the problem of determining the minimum number of broadcast towers that can localize a point anywhere in a simple polygon P is NP-hard. We show a reduction from Boolean Three Satisfiability problem to our problem and give a proof that the reduction takes polynomial time.

## Authors

• 30 publications
• 12 publications
• 2 publications
• 19 publications
• ### Art Gallery Localization

We study the problem of placing a set T of broadcast towers in a simple ...
06/21/2017 ∙ by Prosenjit Bose, et al. ∙ 0

• ### Minimum Convex Partition of Point Sets is NP-Hard

Given a point set P, are k closed convex polygons sufficient to partitio...
11/18/2019 ∙ by Nicolas Grelier, et al. ∙ 0

• ### Minimum Constraint Removal Problem for Line Segments is NP-hard

In the minimum constraint removal (MCR), there is no feasible path to mo...
07/07/2021 ∙ by Bahram Sadeghi Bigham, et al. ∙ 0

• ### A new metaheuristic approach for the art gallery problem

In the problem "Localization and trilateration with the minimum number o...
07/07/2021 ∙ by Bahram Sadeghi Bigham, et al. ∙ 0

• ### A Note on the Flip Distance Problem for Edge-Labeled Triangulations

For both triangulations of point sets and simple polygons, it is known t...
08/09/2018 ∙ by Alexander Pilz, et al. ∙ 0

• ### On the computational complexity of blind detection of binary linear codes

In this work, we study the computational complexity of the Minimum Dista...
06/04/2018 ∙ by Alexios Balatsoukas-Stimming, et al. ∙ 0

• ### On the Computational Complexity of Finding a Sparse Wasserstein Barycenter

The discrete Wasserstein barycenter problem is a minimum-cost mass trans...
10/16/2019 ∙ by Steffen Borgwardt, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

[1]Introductionsec:introduction

The art gallery problem was introduced by Victor Klee in 1973. He asked how many guards are sufficient to guard the interior of a simple polygon having vertices. It has been shown by Chvátal that guards are always sufficient and sometimes necessary [2], and that such a set of guards can be computed easily [3]. However, such solutions are usually far from optimal in terms of minimizing the number of guards for a particular input polygon. Moreover, it was shown by Lee and Lin in [6] that determining an optimal set of guards is NP-hard, even for simple polygons. Refer also to the book “Art Gallery Theorems and Algorithms” by O’Rourke [7] that presents more detailed study of the topic. An overview of NP-hardness can be found in the book by Garey and Johnson [4].

In our research we combine the art gallery problem with trilateration. Trilateration is the process that determines absolute or relative locations of points by measurement of distances, using the geometry of the environment. Trilateration is not only interesting as a geometric problem, but it also has practical applications in surveying and navigation, including global positioning systems (GPS). GPS satellites carry very stable atomic clocks that are synchronized with one another and continuously transmit their current time and position. These signals are intercepted by a GPS receiver, which calculates how far away each satellite is based on how long it took for the messages to arrive. GPS receivers use trilateration to calculate the user’s location, based on the information received from different GPS satellites.

By combining the art gallery problem with trilateration we address the problem of placing stationary broadcast towers in a simple polygon in order for a receiving point (let us call it an agent) to locate itself. Towers can be viewed as GPS satellites, while agents can be compared to GPS receivers. Towers are defined as points in a polygon which can transmit their coordinates together with a time stamp to other points in their visibility polygon. In our context, trilateration is a process where the agent can determine its absolute coordinates from the messages the agent receives. The agent receives messages from all the towers that belong to its visibility polygon. Given a message from the tower the agent can determine its distance to .

In [1] we showed how to position at most towers inside and gave a localization algorithm that receives as input only the coordinates of the towers that can see an agent together with their distances to . We also showed that towers are sometimes necessary.

In this paper we show that the problem of determining the minimum number of broadcast towers that can localize a point anywhere in is NP-hard. Our solution is closely related to the NP-hardness of determining the minimum number of point guards for an -edge simple polygon presented by Lee and Lin in [6]. To prove the NP-hardness of their problem, Lee and Lin show a reduction from Boolean Three Satisfiability (3SAT). However, they do not show that a polynomial number of bits represents the gadgets in their reduction. We use a similar reduction from 3SAT to show that our problem is NP-hard. Moreover, we provide a proof that the reduction takes polynomial time. We demonstrate that the number of vertices of the constructed polygon is polynomial in the size of the given input instance of and that the number of bits in the binary representation of the coordinates of those vertices is bounded by a polynomial in the size of the input. Refer to Section 3.5.

In Section 2 we give basic definitions and present some properties and observations. In Section 3 we present our main results of NP-hardness. Section 4 contains conclusions and possible ideas for future research.

## 2 Preliminaries

[1]Preliminariessec:preliminaries

Let be a simple polygon having a total of vertices on its boundary (denoted by ). Two points are visible to each other if the segment is contained in ; we also say that sees . Note that and that may touch in one or more points. For the visibility polygon of (denoted ) is the set of all points that are visible to . Note that is a star-shaped polygon contained in and belongs to its kernel (the set of points from which all of is visible).

Let be a set of points in . Elements of are called towers. For any point : for each the point receives the coordinates of and can compute the Euclidean distance between and , denoted .

The set is said to trilaterate the polygon if for every point its absolute location can be identified given the information it receives from all towers in . By the map of we denote the complete information about including the coordinates of all the vertices of and the vertex adjacency list. We assume in this paper that our localization algorithm knows the map of and the coordinates of all the towers in .

Let an agent be a point in the interior of , whose location is unknown. By we denote the circle centered at with radius . If only one tower can see then can be anywhere on , which may not be sufficient to identify the location of (unless the agent and the tower are at the the same location). Refer to Fig. 1. Notice that one must know the map of to calculate . Let be the line through points and . If a pair of towers and can see then the location of can be narrowed down to at most two points (which are reflections of each other along ). Refer to Fig. 1. In this case we say that there is an ambiguity along the line, since we cannot choose one location over the other without any additional information. However, if the map of is given (and thus we know and ) and if we place both towers on the same edge of in then the intersection is a single point (highlighted in red on Fig. 1).

Notice, that in this case the kernel of must not degenerate into a single point, since we need at least two distinct points for tower placement. Alternatively, if the map of is not given, we can place a triple of non-collinear towers in the kernel of star-shaped (highlighted in cyan on Fig. 1) to localize any point interior to .

In [1] we provide a polynomial time algorithm for trilaterating a simple polygon in general position using at most towers. We do it by partitioning into at most star-shaped polygons such that: and , for every , does not degenerate into a single point; and then we assign a pair of towers to each partition.

The optimization problem we study is the following. Given a simple polygon , compute a set of towers of minimum size that trilaterates .

## 3 Optimal Art Gallery Localization is NP-hard

[1]Optimal Art Gallery Localization is NP-hardsec:NP-hard

We want to show that determining an optimal solution (a smallest set of towers) for trilaterating a polygon is NP-hard. To do this, we need to give a reduction from a known NP-hard problem. Similarly to the approach used by Lee and Lin presented in [6], we reduce to our problem.

Art Gallery Localization () Problem:

Instance: A simple polygon of size and a positive integer .

Question: Does there exist a set that trilaterates with ?

###### Theorem 3.1

The art gallery localization problem is -hard.

To show -hardness we reduce the following -complete problem to the problem.

Boolean Three Satisfiability () problem:

Instance: A set of Boolean variables and a collection of clauses over exist such that is a disjunction ( or ) of precisely three literals (where a literal is either a variable, or the negation of a variable).

Question: Does there exist a truth assignment to the variables in such that the conjunctive normal form (CNF) , evaluates to true?

We need to show that can be transformed into in polynomial time. In other words, the goal is to transform a given instance of into a simple polygon with vertices (for some constant ) that can be trilaterated with or fewer towers if and only if the instance is satisfiable. Let the bound for the problem be .

We show how to construct a simple polygon in a step-by-step manner by describing the basic components from which the desired polygon is built. We describe a construction for literals, clauses (that contain several literals) and variables (where the consistency of true/false settings of the literals will be enforced). We want to construct a simple polygon such that no two different constructions can be completely visible to the same pair of towers. We achieve this by gluing together star-shaped polygons whose kernels do not have more than a single point in common.

### 3.1 Literal Pattern

[2]Literal Patternsubsec:literal

The construction for a literal is the five-sided polygonal shape shown in Fig. 2, which has the property that the vertices , and are collinear (refer to Fig. 2). The construction is attached to the body of the main polygon via a line segment . This connection is shown as a blue dashed line in Fig. 2.

The polygonal region is a star-shaped pentagon whose kernel is not a single point. Moreover, contains two distinct points that belong to the same edge of . Thus can be trilaterated with as few as two towers since the map of the polygon is given. However, these towers must be in and positioned on the same edge of . Let be a point where the extension of the edge intersects . Refer to Fig. 2. It follows, that both towers must either be on the line segment or on the edge .

Notice that a point can see the complete interior of the triangle only if it is in the triangle. In other words, no tower from the outside of can see its complete interior.

Depending on the truth value assigned to the literal , the position of towers for trilateration will be enforced by elements of our construction, which will be described later in Sections 3.2 – 3.4. For now, just note that if the literal is assigned true (respectively false) then the towers and are positioned at (respectively ). In particular, is positioned at vertex (respectively, at point ) and is positioned very close to on the corresponding line segment. Refer to Fig. 2 for the true assignment and to Fig. 2 for the false assignment.

### 3.2 Clause Junction

[2]Clause Junctionsubsec:clause

A construction for each clause will contain four polygonal regions that represent literals. Three of them will correspond to the literals of the given clause. The role of the fourth polygonal region of a literal form will be explained later in this subsection. Note for now that it will always be assigned a value of true.

Consider the clause , where , and are literals, and , and are variables, . The basic construction for the clause is shown in Fig. 3. It contains one subpolygon for each literal: , and ; and an additional subpolygon of a literal form. The vertices , , , , , , , , and are collinear, i.e. they belong to .

###### Observation 1

Every optimal solution for trilaterating consists of distinct towers with at least two of them positioned at , , or .

###### Proof

We showed in Section 3.1 that each construction requires at least two towers in its kernel. Notice that no tower can see the complete interior of if it does not belong to . Since no two pentagons , , or intersect, each of them requires at least two distinct towers. It follows, that we cannot trilaterate with less than towers, meaning that every optimal solution for trilaterating will be of size at least .

Notice, that is a union of pentagons , , , and . Let be a point where the extension of the edge intersects . Let be an intersection point between the extension of the edge and . Notice, that is the kernel of . We can trilaterate with as few as two towers either on or . Observe, that , , and belong to . Thus, if any of the pentagons , , and have towers at , , or then those towers can be reused for trilaterating .

It is left to show that there are no ambiguities along . Assume that only a pair of towers and (positioned at , , or ) can see the agent with and being agent’s possible locations. Assume, without loss of generality, that . Recall, that we know the map of the polygon and thus we can see if is inside or outside of . If then the agent is at . Otherwise, if , then the agent is in one of the pentagons , , or . Recall, that we know the locations of all the towers and, together with the map of the polygon, we know visibility polygons of all the towers. We can deduce that does not belong to at lest one of or . Thus the agent is at .

It follows, that every optimal solution for trilaterating has size with towers positioned at at least two of the four vertices , , and . ∎

Notice, that by construction, any tower that is located outside of (but inside ) can only see a proper subset of (highlighted in green in Fig. 3).

Observation 1 allows us to prove the following lemma. But first note, that the true/false position of towers in , and is enforced from the outside of by other elements of our construction, which we describe later in Sections 3.33.4.

###### Lemma 1

A construction of a clause can be trilaterated with towers if and only if a truth value of evaluates to true.

###### Proof

() Let be a set of towers of size that trilaterates . By observation 1 there exists a tower at , or . It follows, that the corresponding construction has towers in a true position, implying that the literal is assigned true. Since is true, the truth value of is true.

() Assume that a truth value of evaluates to true. Therefore, at least one of the literals , or is true, and thus there exists a tower at , or . Let us trilaterate with a pair of towers in true position, meaning that we place tower at . Each of , , and has two distinct towers. It is towers total (including and ). This tower set trilaterates (refer to the proof of observation 1 for details).

### 3.3 Variable Pattern

[2]Variable Patternsubsec:variable

We need to create a construction that will force all truth assignments of literals of a particular variable to be consistent with one another. A variable pattern serves this purpose. An example of the variable pattern for variable is given in Fig. 5 and at the bottom half of Fig. 4. One such pattern will exist per variable in the final construction.

Every variable pattern contains two wells. The leftmost well (marked with in Fig. 4) will have one tower at the vertex and another in the close proximity to it (we will discuss later its specific location) if the given variable is assigned the truth value false. Let us call this an F-well. Similarly, if the variable is assigned the truth value true then the rightmost well (marked with in Fig. 4) will have one tower at the vertex and another close to it. Let us call this a T-well. For simplicity we depicted wells here as vertical rectangles. However, their boundaries are not parallel to each other and in the complete construction are aligned with a pair of vertices whose construction will be defined in Section 3.4.

The wells contain spikes. The number of spikes each well contains in the final construction is equal to the number of times the corresponding variable or its negation appears in the given formula. Suppose variable appears in clause . The spikes in the F-well (respectively the T-well) for are aligned with the vertex (respectively, ) (and partially with its immediate neighbourhood).

If , for example, contains the literal then the spike in the F-well (respectively, the T-well) that corresponds to in will also be aligned with (respectively, ) and its immediate neighbourhood on (respectively, ) of the literal pattern in clause junction . Those spikes are and and they are highlighted in yellow in Fig. 4.

If , for example, contains the literal then the spike in the F-well (respectively, the T-well) that corresponds to in will also be aligned with (respectively, ) and its immediate neighbourhood on (respectively, ) of the literal pattern in clause junction . Those spikes are and and they are highlighted in cyan in Fig. 4.

Let us discuss ways in which a variable pattern can be trilaterated. Notice, that is a union of two star-shaped polygons spikes of the F-well and spikes of the T-well. Refer to Fig. 5. The kernel of the star-shaped polygon formed by the union of strips defined by the spikes in the F-well (respectively, the T-well) is highlighted in gray (respectively, green) and denoted (respectively, ). It is always possible to construct a variable pattern in a way such that . This can be done by moving a T-well further away from an F-well, i.e. by enlarging the distance between and . This ensures that there does not exist a star-shaped polygon that contains a variable pattern as its subpolygon (connected via the blue dashed lines shown in Fig. 5). This means that the trilateration of a variable pattern cannot be done with less than 4 towers.

The vertices , , and are collinear and belong to . Let be the line parallel to such that . Let (respectively, ) be an intersection point of and (respectively, ). The polygons spikes of the F-well and spikes of the T-well are star-shaped by construction. Notice that and . To trilaterate we position a pair of towers and in . In particular, we position at and in close proximity to in . In a similar way, to trilaterate we position at and in close proximity to in . The locations of the four towers are highlighted in red in Fig. 5. Notice that both pairs of towers , and , can see .

It is important to notice that despite that , are positioned on the boundary of and , are positioned on the boundary of , the towers and do not belong to the boundary of the main polygon. In Section 3.4, when we present the complete construction of the main polygon, we show that the ambiguities along the lines and during the trilateration can be avoided, because the map of together with the coordinates of all the towers is available to the agent. For now assume that the primary localization region of , is to the left of and that the primary localization region of , is to the left of .

We showed how to position towers to trilaterate a variable pattern. However, only one of the two: or will require a pair of towers as described in the two previous paragraphs. No other tower will be needed to trilaterate the remainder of the variable pattern if all the literals for this variable are assigned truth values consistently. Consider an example of Fig. 4. Assume that is assigned the truth value true. Then we position towers in only. We need to show that is trilaterated as well. All the literal patterns of the literals that equal to get a pair of towers in the “true” position, namely at and close to -type vertices. Those towers can see inside the corresponding spikes in . All the literal patterns of the literals that equal to get a pair of towers in the “false” position, namely at and close to -type vertices. Those towers also can see inside the corresponding spikes in . Thus, all the spikes in the F-well of are trilaterated. In addition, the towers of trilaterate – the subpolygon of . The only subpolygon of that is not trilaterated is the quadrilateral . Assume now that is assigned the truth value false. We position towers in only and need to show that is trilaterated too. Similarly to the previous case it can be shown that all the spikes in the T-well of are trilaterated. The towers of trilaterate – the subpolygon of . The only subpolygon of that is not trilaterated is . In the following section we show a position of a pair of towers that trilaterate all the subpolygons and for all .

Our discussion can be summarized in the following lemma.

###### Lemma 2

Let , consider all the spikes of the variable pattern for . If is assigned the truth value true (respectively false) then all the spikes inside the T-well (respectively, the F-well) are trilaterated by a pair of towers assigned to the variable pattern of . All the spikes inside the F-well (respectively, the T-well) are trilaterated by pairs of towers assigned to literal patterns of or in each clause junction that uses .

Notice, that is trilaterated by a pair of towers assigned to the variable pattern.

### 3.4 Complete Construction

[2]Complete Constructionsubsec:complete

We put variable patterns and clause junctions together as shown in Fig. 6. This figure depicts an example of a complete polygon for a formula . This formula contains variables and clauses. Thus, the main polygon is comprised of variable patterns and clause junctions (each of which contains literal patterns).

In Section 3.3 we described how the consistency of the assigned truth values is enforced among all the literals of a specific variable via spike construction. We also proposed to position only a pair of towers per variable pattern. However, it remained unanswered how to trilaterate all the wells that weren’t assigned towers. Now we are able to address the issue. We align the boundaries of the wells for all variable patterns with a pair of vertices of . Refer to Fig. 6. In particular, the left boundaries of both wells and for each variable pattern are aligned with the vertex (i.e. and for ). Similarly, the right boundaries of both wells and for each variable pattern are aligned with the vertex . Notice that the pair of vertices , can see the interior of all the wells, and in particular, all the polygons and for all . Let be an intersection point of and . Notice that is the kernel of the polygon all the wells. In addition, . We position a pair of towers: one at and another at . Now all the wells and the polygon are trilaterated with a pair of towers.

Recall, that in Section 3.3 we positioned the towers and not on the boundary of . We show that the ambiguities along the lines and can be avoided because the map of together with the coordinates of all the towers are available to the agent. Assume for example that an agent received messages from only two towers and of variable pattern for (refer to Fig. 56). Thus, the agent can be in one of the two locations or that are reflections of each other along ). We use the map of to calculate the visibility polygon of the pair of towers . If one of the locations, say , does not belong to this visibility polygon, then the agent is at . So, assume that both and belong to this visibility polygon. Observe that the agent cannot be in any clause junction , otherwise it will be seen by at least a pair of towers positioned inside , which contradicts to the fact that the agent is seen by and only. Recall, that there is a pair of towers at and . The agent knows this information and, together with the map of , can calculate the visibility polygon all the clause junctions. This visibility polygon consists only of the spikes of the F-well of variable pattern for and . Moreover, belongs to one side of ). Thus, if the agent is seen by and only, then it has a unique location at . Similarly, if the agent is seen by and only then it has a unique location at all the clause junctions.

###### Lemma 3

At least towers are required to trilaterate .

###### Proof

We showed in Section 3.2 that any trilateration of a clause junction requires at least towers. In Section 3.3 we discussed that each variable pattern requires at least towers. In this section we showed that an additional towers are necessary to trilaterate all the wells. Since is the union of clause junctions, variable patterns and the polygon , then its trilateration requires at least towers. ∎

###### Lemma 4

The minimum number of towers required to trilaterate the main polygon is if and only if the given formula is satisfiable.

###### Proof

() Assume that the given formula is satisfiable. Then a truth assignment to the variables exists such that each of the clauses , has a truth value true. By Lemma 1 every clause junction can be trilaterated with 8 towers. Lemma 2 implies that towers per variable pattern is sufficient to trilaterate all the spikes (that where not trilaterated by the towers in clause junctions) and for . We showed in this section that an additional towers trilaterate the remaining uncovered subpolygons of and resolve ambiguities. Thus can be trilaterated with towers, which by Lemma 3 is the minimum number.

() Assume that the given formula is not satisfiable. It follows that there exists at least one clause that has a truth value false under any truth assignment. By Lemma 1 the clause junction needs at least towers. Similar to the proof of Lemma 3 requires at least towers for trilateration. ∎

### 3.5 Construction takes Polynomial Time.

[2]Construction takes Polynomial Time.subsec:polynomial

To complete the proof of our main result – Theorem 3.1, we need to show that the reduction takes polynomial time. We have to demonstrate that the number of vertices of is polynomial in and and that the number of bits in the binary representation of the coordinates of those vertices is bounded by a polynomial in and . During the reduction we create a simple polygon of size . Every clause junction consists of vertices. Every literal creates two spikes, thus the total number of vertices in occupied by spikes is . Every variable pattern (without spikes) consists of vertices. The final construction of includes more vertices for , and . Thus, the total number of vertices of is , which is polynomial in and . Notice that thus instead of saying “polynomial in and ” we can just use “polynomial in ”.

Consider a construction of a clause (refer to Fig. 3). Let be an orthogonal projection of onto . We would like to fix the part of to the right of and keep it identical among all the clauses of the given formula. Assume that is the origin of the coordinate system. We can change the positions of all the vertices of to the right of (keeping collinearities and main features intact) such that the binary representation of their coordinates is polynomial in . The relative position of the vertex to other vertices of will differ from clause to clause (refer to Fig. 7).

In the complete construction of we position at the origin of the coordinate system, i.e. the coordinates of are . When we add all the variable patterns , to we can position every following variable pattern slightly below (by -coordinate) , otherwise the towers in could see . Alternatively, we can rotate the line around to contain (refer to Fig. 5) and extend the boundaries of the wells such that and , . We will use the latter approach. Now we can set the -coordinate of the vertices , , , , , , to (note that ).

Let be an arbitrary sorted sequence of positive integers of polynomial size in , such that . We set the -coordinate of to be and its -coordinate to be . In other words, . The -coordinate of is set to , i.e. . We set the distance between the vertices and for to be and the distance between and for to be . Refer to Figures 5 and 7. Recall that the -coordinate of , for is . We just defined the vertices and for . Notice that all the coordinates defined so far are polynomial in .

The -coordinate of for is set to . To determine its -coordinate observe that , is an intersection point between and the horizontal line through . To proceed further recall the following.

The intersection point of two lines (defined by two distinct points and ) and (defined by two distinct points and ) can be written out as

 (x,y)=((x1y2−y1x2)(x3−x4)−(x1−x2)(x3y4−y3x4)(x1−x2)(y3−y4)−(y1−y2)(x3−x4),(x1y2−y1x2)(y3−y4)−(y1−y2)(x3y4−y3x4)(x1−x2)(y3−y4)−(y1−y2)(x3−x4)).

This computation yields a fraction whose numerator is a polynomial of degree three in the input coordinates and whose denominator is a polynomial of degree two in the input coordinates. That is, if the input coordinates are -bit numbers then the output coordinates need at most bits to be represented. The proof of this can be found in lecture notes in Computational Geometry by M. Hoffmann [5].

Thus, the -coordinate of , can be determined via the above computation. Moreover, the number of bits required for its -coordinate is at most times the number of bits used for (assuming had the most bits in its representation among , , and ), and it is still polynomial in .

In a similar way we find the coordinates of other vertices that define wells. The vertex for is an intersection of and ; and the vertex for is an intersection of and . We set the -coordinate of all the vertices at the bottom of every well to . Thus the -coordinate of (respectively , and ) for is equal to the -coordinate of the intersection point between the horizontal line through and (respectively , and ). Notice that the number of bits required to represent the coordinates of each of the discussed vertices is polynomial in and is at most times the number of bits required to represent or . The vertex , does not require precise construction; there is plenty of room to choose polynomial coordinates for it.

We proceed now with the construction of the clause junctions and after that we will return to discuss the spike formation inside the variable patterns.

Consider the first clause in the given formula. Let be its clause junction. Let be an intersection point of the two lines and (refer to Figures 3 and 7). We position in in such a way that the -coordinate of is not smaller than the -coordinate of . Otherwise, we cannot guarantee that the towers of every literal pattern can see the vertices , for . By construction the angle that creates with the positive direction of -axis is bigger than . Thus if we set the -coordinate of (where is the vertex of the first clause ) to be twice bigger than the -coordinate of , then is guaranteed to be to the right of . Hence, we set