Journal of Global Optimization

, Volume 68, Issue 1, pp 23–45 | Cite as

Algorithms for art gallery illumination

  • Maximilian Ernestus
  • Stephan Friedrichs
  • Michael Hemmer
  • Jan Kokemüller
  • Alexander Kröller
  • Mahdi Moeini
  • Christiane Schmidt
Open Access
Article

Abstract

The art gallery problem (AGP) is one of the classical problems in computational geometry. It asks for the minimum number of guards required to achieve visibility coverage of a given polygon. The AGP is well-known to be NP-hard even in restricted cases. In this paper, we consider the AGP with fading (AGPF): A polygonal region is to be illuminated with light sources such that every point is illuminated with at least a global threshold, light intensity decreases over distance, and we seek to minimize the total energy consumption. Choosing fading exponents of zero, one, and two are equivalent to the AGP, laser scanner applications, and natural light, respectively. We present complexity results as well as a negative solvability result. Still, we propose two practical algorithms for AGPF with fixed light positions (e.g. vertex guards) independent of the fading exponent, which we demonstrate to work well in practice. One is based on a discrete approximation, the other on non-linear programming by means of simplex-partitioning strategies. The former approach yields a fully polynomial-time approximation scheme for the AGPF with fixed light positions. The latter approach obtains better results in our experimental evaluation.

Keywords

Art gallery problem Fading Computational geometry Linear program Non-linear program Lipschitz function Algorithm engineering 

Mathematics Subject Classification

65D18 68W25 68W40 68U05 90C05 90C30 90C90 

1 Introduction

The classical art gallery problem (AGP) asks for the minimum number of guards required to cover boundary and interior of a polygon. This is one of the best-known problems in computational geometry; see the excellent book by O’Rourke [23] for an introduction to the subject. In the classical AGP guards have an infinite range of visibility. We consider a problem variant where light fades over distance. The main applications are discussed below.

1.1 Laser scanning

Consider obtaining an exact, two-dimensional laser scan of some indoor environment. A typical \(360^\circ \) laser scanner can be placed at any point. It operates by taking a sample in one direction then turning by a configurable angle \(\theta \) and repeating the process. The time t to obtain a scan is roughly \(t\sim \theta ^{-1}\) and can range anywhere between seconds and several hours in real-world applications. The quality of the result depends on the sample-point density q on the walls. For an object at distance d this is about \(q\sim d^{-1}\). Together, we get \(q\sim td^{-1}\). The actual fading of the laser-light intensity is irrelevant in practice. The problem of minimizing the time spent scanning (with one scanner) while maintaining sufficient scanning quality is an AGP generalization with linear fading.

1.2 Realistic light

Light suffers from quadratic fading over distance. From a dimmable light bulb at brightness b an object at distance d receives light in an amount of \(q \sim bd^{-2}\). We assume a linear correspondence between energy consumption and brightness. The AGP generalization of illuminating a polygonal area with the minimum total energy was introduced by O’Rourke in 2005 [12]. Since then only a restricted case of this problem has been addressed by Eisenbrand et al. [14].

1.3 Our contribution

We study two versions of the art gallery problem with fading (AGPF). One is the discrete version where guards can only be placed on finitely many a-priori known locations (e.g. vertex guards). The other version allows guards that can be positioned anywhere in the input polygon (point guards). We address the question of computational complexity as well as solvability of AGPF (both the discrete and the general variant).

Two algorithms for the AGPF with fixed guard positions constitute the core of our contribution. That is, for the case that the selected guard locations have to be chosen from a given, finite candidate-location set. Our algorithms are based on infinite LP formulations of the problem. Both solve the problem of finding the darkest point in an intermediate solution, referred to as the primal separation problem (PSP), in different ways. Our algorithms work for arbitrary fading exponents; they can be applied to the laser scanning as well as to the natural light scenario.

The first algorithm approximates the PSP by replacing continuous fading with an appropriate step function. For a finite guard candidate set, such as vertex guards, we illustrate that it yields a fully polynomial-time approximation scheme (FPTAS).

Our second algorithm solves the PSP by means of a derivative-free approach based on triangulation of the polygon’s visibility coverage, followed by optimizing non-linear programs by using a simplex-partitioning procedure [24].

1.4 Overview

Related work is presented in Sect. 2. Sections 3 and 4 formally introduce the problem, and discuss fading functions and complexity results. In Sect. 5, we turn our attention to the case of fixed, finite sets of guard positions (e.g. vertex guards) and propose two algorithms, one of which yields an FPTAS. We evaluate our algorithms experimentally in Sect. 6. Section 7 gives a brief introduction to the general (point guard) case where guards can be placed anywhere in the polygon. We conclude this paper in Sect. 8.

2 Related work

Guarding problems have been studied for several decades. Chvátal [3] was the first to answer Victor Klee’s question on the number of guards that are always sufficient and sometimes necessary to monitor a polygon P with n vertices; \(\left\lfloor \frac{n}{3}\right\rfloor \) is the tight bound for general polygons which was soon afterwards shown by a beautiful proof of Fisk [16]. Many other polygon classes have been considered w.r.t. this kind of Art Gallery Theorems. For example, Kahn et al. [19] obtained a tight bound of \(\left\lfloor \frac{n}{4}\right\rfloor \) for orthogonal polygons. Generally, the guards are allowed to be located anywhere in the polygon (point guards). Sometimes, less powerful guards have been considered, such as guards that must be placed on vertices of P (vertex guards), or guards that only have a certain illumination angle \(\gamma \). For the latter problem, Tóth [25] showed an art gallery theorem with tight bound \(\left\lfloor \frac{n}{3}\right\rfloor \) for \(\gamma =180^\circ \). While the above results give bounds on the number of guards in certain classes of polygons, the AGP asks for the minimum number of guards that cover a given polygon P. Several versions of this problem were shown to be NP-hard, for example the problem restricted to guards placed on vertices of simple polygons, as shown by Lee and Lin [22]. See [11, 23] for surveys on the AGP.

The AGPF has only been considered for the case of fixed light-source positions in the plane and the illumination of a line (the stage). Eisenbrand et al. [14] aim at minimizing the total amount of power assigned to the given light sources such that the entire stage is lit. The authors give a convex programming formulation of the problem that leads to a polynomial-time solution. They present a constant-factor approximation and a PTAS.

Over the last few years, efficient implementations for the classical AGP emerged [6, 8, 15, 20, 21, 26]. Currently, the state of the art is that optimal solutions for polygons with several thousand of vertices can be found efficiently. See [11] for a survey on that matter.

3 Notation and preliminaries

We consider a given polygon P, possibly with holes. P has vertices V, with \(|V| = n\). The diameter of P is denoted \(D := {\text {diam}}P\). For a point \(p\in P\) the visibility region\({\mathcal {V}}(p)\) is the (star-shaped) set of all points of P visible from p. In the original AGP, we say a guard set\(G \subseteq P\)coversP if and only if \(\bigcup _{g\in G} {\mathcal {V}}(g) = P\). The goal is to find a covering G of minimum cardinality.

In this paper, we consider a variant of this problem: We assume the guards \(g\in G\) to be light sources whose intensity (and therefore energy consumption) can be controlled. We denote the intensity of \(g\in G\) by \(0 \le x_g \in \mathbb {R}\). Furthermore, light suffers from fading over distance, modeled by a fading function \(\varrho \): While a point \(w \not \in {\mathcal {V}}(g)\) does not receive any light from g, \(w \in {\mathcal {V}}(g)\) receives \(\varrho (g,w)x_g\), i.e., \(\varrho \) accounts for the possible fading exponents motivated in Sect. 1.

For a set \(W\subseteq P\) of witnesses (points that witness sufficient or insufficient illumination), we say a guard set \(G\subseteq P\) with intensities \(x \in \mathbb {R}^G_{\ge 0}\)illuminatesW if and only if every point in W is sufficiently lit. Without loss of generality, we normalize the meaning of \(w \in W\) being sufficiently lit to
$$\begin{aligned} \sum _{g \in G \cap {\mathcal {V}}(w)} \varrho (g,w)x_g \ge 1\;. \end{aligned}$$
(1)
Given a set of possible light sources G, a set W of witness points, and a fading function \(\varrho \), our objective is to illuminate W using minimum total energy \(\sum _{g\in G}x_g\). We call this problem art gallery problem with fading, \({{\text {AGPF}}\varrho }(G,W)\). When \(\varrho \) is clear from context, we occasionally write \({\text {AGPF}}(G,W)\) instead. In general, we are interested in illuminating all of P. Therefore, the relevant cases are \({\text {AGPF}}(G,P)\)—where possible guard positions are given, e.g. \({\text {AGPF}}(V,P)\) is the common discretization with vertex guards—and \({\text {AGPF}}(P,P)\), the continuous/point guard variant where guards can be placed anywhere in P. \({{\text {AGPF}}\varrho }(G,W)\) can be formulated as a linear program (LP):
$$\begin{aligned}&\hbox {min} \quad \sum _{g\in G } x_g \end{aligned}$$
(2)
$$\begin{aligned}&\text {s. t.}\qquad \sum _{g\in G\cap {\mathcal {V}}(w)} \varrho (g,w) x_g \ge 1 \quad \forall w\in W\end{aligned}$$
(3)
$$\begin{aligned}&\qquad \qquad x_g \ge 0 \qquad \qquad \qquad \qquad \qquad \forall g\in G \;. \end{aligned}$$
(4)
It should be noted that \({\text {AGPF}}(P,P)\) results in an LP with an infinite number of both variables and constraints. Kröller et al. [20] were the first to show how to solve this type of LP for the original AGP with fractional guards, i.e., for \(\varrho (\cdot , \cdot ) = 1\).
Fig. 1

Fading function \(\varrho \)

4 Fading function and complexity

4.1 Fading function

For a fading exponent \(\alpha \in \mathbb {R}_{\ge 0}\), we define the fading function \(\varrho (g,w)\) by
$$\begin{aligned} \varrho (g,w) := {\left\{ \begin{array}{ll} \Vert g-w\Vert ^{-\alpha } &{} \text {if } \Vert g-w\Vert \ge 1 \hbox { and} \\ 1 &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$
(5)
compare Fig. 1. Here \(\Vert \cdot \Vert \) denotes the Euclidean norm in \(\mathbb {R}^2\). As motivated above, the amount of light received by a point w from the light source g is \(\varrho (g,w) x_g\) with \(\alpha = 2\) for natural light, \(\alpha = 1\) for laser scanners, and \(\alpha = 0\) for the classical AGP.

Our motivation for capping \(\varrho \) at 1 is two-fold: (1) Without this restriction, any non-zero guard provides an infinite amount of light to itself. This results in the “optimal solution” of \({\text {AGPF}}(P,P)\) to consist of every point in P glowing with an infinitesimally small brightness. This problem is not well-defined, see Lemma 1. (2) In an application, guards correspond physical objects like light bulbs or scanners. These objects are not point-shaped; they have a physical size. We are interested in obtaining coverage for the environment of the light source rather than for the light source itself. Hence, we assume that the input is scaled such that the radius 1 around a guard falls completely into the object size. That motivates capping \(\varrho \) at 1, even in the discrete version.

Lemma 1

Let \(\tilde{\varrho }(g,w) := \Vert g-w\Vert ^{-\alpha }\), \(\alpha >0\), be an alternate fading function to \(\varrho (g,w)\) in Eq. (5). Then \({\text {AGPF}}\tilde{\varrho }(P,P)\) has no optimal solution.

Proof

We show that for any finite \(G \subset P\) any illumination \(x \in \mathbb {R}^G_{\ge 0}\) either is infeasible or not optimal because it can be improved by using more guards \(G' \supset G\). The dual of \({\text {AGPF}}\tilde{\varrho }(P,P)\) is
$$\begin{aligned}&\text {max} \quad \sum _{w\in P} y_w \end{aligned}$$
(6)
$$\begin{aligned}&\text {s. t.}\qquad \sum _{w\in {\mathcal {V}}(g)} \tilde{\varrho }(g,w) y_w \le 1 \quad \forall g\in P\end{aligned}$$
(7)
$$\begin{aligned}&\qquad \qquad y_w \ge 0 \qquad \qquad \qquad \qquad \quad \forall w\in P\;, \end{aligned}$$
(8)
the problem of fractionally packing bright witnesses in P such that no guard receives too much light.
Assume we are given a feasible, optimal solution \(x^*\) for \({\text {AGPF}}\tilde{\varrho }(P,P)\) that only uses a finite number of guards. By feasibility, there exists a guard \(g\in P\) with \(x^*_g>0\). Moreover, by optimality, there exists a witness \(w_p\in W\) with
$$\begin{aligned} \sum _{g\in G\cap {\mathcal {V}}(w_p)} \varrho (g,w_p) x^*_g = 1 \;, \end{aligned}$$
otherwise we could reduce the value of some \(x^*_g\) while preserving feasibility. Since Constraint (3) holds with equality for \(w_p\), we have \(y_{w_p} >0\) in the dual. Now consider a point \(g\in P\) converging towards \(w_p\). As \(y_{w_p}>0\) and \(\tilde{\varrho }(g,w_p)\rightarrow \infty \) as \(g\rightarrow w_p\), at some point
$$\begin{aligned} \sum _{w\in W\cap {\mathcal {V}}(g)} \tilde{\varrho }(g,w) y_w \ge \tilde{\varrho }(g,w_p) y_{w_p} > 1 \end{aligned}$$
must hold. A point g fulfilling this inequality indicates a violated Constraint (78). Hence, y is dually infeasible, so \(x^*\) is not optimal, contradicting our assumptions.\(\square \)

This shows that whenever G is finite, we can find an additional guard that improves the solution. Consequently, \({\text {AGPF}}\tilde{\varrho }(P,P)\) only possesses “optimal solutions” with infinitely many guards. In fact, it is easy to see that the “optimal” guard positions G are topologically dense in P, using the above \(\varepsilon \)-neighborhood argument. Then, the solution values can be scaled down arbitrarily since \(\tilde{\varrho }(g,w)\) approaches \(\infty \) as \(w\rightarrow g\). This way, we can construct a series of solutions of strictly decreasing values, where G is infinite and the values of all guards converge to 0. Obviously, the limit of this process is \(x\equiv 0\) which is not feasible.

Note that while we cap \(\varrho \) at 1, Eisenbrand et al. do not employ capping in [14]: Given a finite set of guard candidates S, they illuminate a stage L. The guard candidates usually are not located on the stage. Therefore, no point infinitesimally close to a guard needs to be covered. In addition, even if guard candidates were located on L, the set S is not dense in L. Hence, they never experience the situation described by Lemma 1.

4.2 Complexity results

We draw two conclusions regarding the complexity of the AGPF:

Lemma 2

For a finite set \(G\subset P\), finding integer solutions to \({\text {AGPF}}(G,P)\) is NP-hard. Finding integer solutions for \({\text {AGPF}}(P,P)\) is APX-hard.

Proof

For \(\alpha =0\), finding integer solutions corresponds to solving the original AGP. The corresponding hardness results [13, 22] apply.\(\square \)

It is tempting to solve the \({\text {AGPF}}\) by reducing it to the \({\text {AGP}}\). Unfortunately, this approach results in an approximation factor which is exponential in \(\alpha \):
Fig. 2

An optimal guard placement for the AGP (star symbol) is not optimal for the AGP with fading (star symbol and bullet symbol)

Lemma 3

The AGPF cannot be approximated by a better factor than \(2^\alpha \) by first solving AGP and computing intensities afterwards.

Proof

Consider the polygon shown in Fig. 2 with a spike of length s. The optimal covering guard set consists of one guard (\(\star \)). Illuminating the polygon with it requires an intensity of \(s^\alpha \). An optimal illumination uses two lights (\(\star \) and \(\bullet \)) with intensities 1 and about \(\left( \tfrac{1}{2}s\right) ^\alpha \). Therefore, the approximation factor of the first solution is at least
$$\begin{aligned} \frac{s^\alpha }{1+\left( \tfrac{1}{2}s\right) ^\alpha } \end{aligned}$$
which converges to \(2^\alpha \) for large s.\(\square \)

Note that this result holds for \({\text {AGPF}}(V,P)\), as we can simply integrate a small bend in the lower edge with a reflex vertex in the height of \(\bullet \). Again, the optimal solution to the AGP restricted to vertex guards would be \(\star \). Two lights at \(\star \) and the new reflex vertex at \(\bullet \) result in the same bound on the approximation factor from Lemma 3.

5 Algorithms for fixed (vertex) guards

In this section, we turn our attention to \({\text {AGPF}}(G,P)\), the AGPF with a fixed, finite set of guard candidates instead of its point guard sibling \({\text {AGPF}}(P,P)\). The reasoning behind that decision is two-fold:
  1. 1.

    Although both, the AGP with point guards and the AGP with vertex guards, are NP-hard [22], many papers identified the vertex guard variant of the AGP to be much easier solvable in terms of practical algorithms than the point guard variant [4, 7, 11, 20]. Since the AGPF is closely related to the AGP and our algorithms stem from our experience with the previous algorithms, see [11] for an overview, we start our investigation by tackling the discrete version.

     
  2. 2.

    The hardness in terms of tractability by practical algorithms of the AGPF lies in finding the darkest point in intermediate solutions (in this paper referred to as primal separation problem (PSP)). Generating good/optimal guard locations has emerged to be the hardest part of the AGP with point guards [11]. So we refrain from entwining the PSP and guard generation to obtain meaningful insights on the tractability of the (novel) PSP.

     
Staying in line with previous work and references therein, see [11] for an overview, it is safe to assume \(G = V\). Our algorithms, however, only require \(\bigcup _{g \in G}{\mathcal {V}}(g) = P\), i.e., that the instance is feasible at all.

This section proposes two algorithms for \({\text {AGPF}}(G,P)\). One of them, see Sect. 5.1, replaces the continuous fading function \(\varrho \) by an appropriately chosen step function and yields an FPTAS for \({\text {AGPF}}(G,P)\). The other one, in Sect. 5.2, works directly on the continuous fading function \(\varrho \) and uses simplex partitioning to identify the darkest point for a given illumination scheme.

5.1 Discrete approximation algorithm and FPTAS

In this section, we introduce Discrete, a discretized approximation algorithm for \({\text {AGPF}}(G,P)\) that yields an FPTAS. We achieve this by replacing the continuous fading function \(\varrho \) with a step function \(\tau \), compare Fig. 3. For a fixed \(\varepsilon > 0\), \(\tau \) is defined as follows:
$$\begin{aligned} \tau (g,w) := \lfloor \lfloor \varrho (g,w) \rfloor \rfloor _{1+\varepsilon }, \end{aligned}$$
(9)
where \(\lfloor \lfloor \cdot \rfloor \rfloor _b\) denotes the hyperfloor with base b, i.e., \(\lfloor \lfloor x\rfloor \rfloor _b := \max \{ b^z:\;b^z\le x,\; z\in \mathbb {Z}\}\). Therefore, \(\tau \) is piecewise constant and approximates \(\varrho \), i.e.,
$$\begin{aligned} 1/(1+\varepsilon )\;\varrho < \tau \le \varrho \;. \end{aligned}$$
(10)
We can use \({{\text {AGPF}}}\tau (G,W)\) to obtain a \((1+\varepsilon )\)-approximation for \({\text {AGPF}}(G,W)\):

Lemma 4

A feasible solution for \({{\text {AGPF}}}\tau (G,W)\) is also feasible for \({{\text {AGPF}}\varrho }(G,W)\). An optimal solution for \({{\text {AGPF}}}\tau (G,W)\) is a \((1+\varepsilon )\)-approximation for \({{\text {AGPF}}\varrho }(G,W)\).

Proof

The proof follows from Inequality (10):
  1. 1.

    Since \(\varrho \ge \tau \), a solution fulfilling inequalities of type (3) with \(\tau \), does so too using \(\varrho \). Hence every \({{\text {AGPF}}}\tau (G,W)\) solution also solves \({{\text {AGPF}}\varrho }(G,W)\).

     
  2. 2.

    Consider an optimal solution \(x^*\) of \({{\text {AGPF}}\varrho }(G,W)\) with objective value \({\text {OPT}}\). It follows from (10) that \(x_\tau :=(1+\varepsilon )x^*\), i.e., scaling every guard with a factor \(1+\varepsilon \), is a feasible solution to \({{\text {AGPF}}}\tau (G,W)\). \(x_\tau \) has objective value \((1+\varepsilon ){\text {OPT}}\), yielding the claimed approximation factor.

     
Note that our arguments also hold for \(G = W = P\).\(\square \)

5.1.1 An algorithm for \(\hbox {AGPF}_\tau \)

To solve \({\text {AGPF}}_\tau (G,P)\), we consider the illumination function
$$\begin{aligned} T_{G,x}(p) := \sum _{g\in G \cap {\mathcal {V}}(p)} \tau (g,p)x_g\,, \end{aligned}$$
(11)
which defines the amount of light received at any point \(p\in P\) w.r.t. to the fading function \(\tau \), given a solution \(x \in \mathbb {R}^{G}_{\ge 0}\). x is feasible if and only if \(T_{G,x} \ge 1\). It is easy to see that, for a single guard g, \(T_{\{g\},x}\) is a piecewise constant function over P, as shown in Fig. 4. It induces an arrangement \(\mathcal {A}(\{g\})\) within P with faces of constant value. P is split into two parts: One is \(P\setminus {\mathcal {V}}(g)\), where \(T_{\{g\},x}\) is constant 0. For the remaining part, note that \(\tau \) is a monotonically decreasing step function taking the values \((1+\varepsilon )^{-z}\) for \(z=0,1,2,\ldots \), each at distances \(((1+\varepsilon )^{z-1},(1+\varepsilon )^z]\) from g (exception: [0, 1] for \(z=0\)). This introduces \({\text {O}}(\log _{1+\varepsilon } D)\) concentric bands of equal coverage value around g. Therefore, this part of the arrangement is the intersection of concentric circles with \({\mathcal {V}}(g)\).
Fig. 3

Fading function \(\varrho \) and step function \(\tau \) for \(\varepsilon =1\)

Fig. 4

The visibility arrangement \(\mathcal {A}(\{g\})\) induced by \(T_{\{g\},x}\) for a point g with value \(x_g\), assuming \(\alpha =1\)

Now consider the arrangement \(\mathcal {A}(G)\) defined by overlaying the individual arrangements for all \(g\in G\). Then, \(T_{G,x}\) is constant over each face, edge, and vertex of this arrangement. This arrangement has a bounded complexity:

Lemma 5

The complexity of \(\mathcal {A}(G)\) is \({\text {O}}((n+\log _{1+\varepsilon }D)^2|G|^2)\).

Proof

The arrangement \(\mathcal {A}(G)\) is constructed from
  • n straight line segments defining P,

  • \({\text {O}}(n)\) straight line segments defining \({\mathcal {V}}(g)\) per \(g\in G\), and

  • \({\text {O}}(\log _{1+\varepsilon }D)\) circles per \(g\in G\),

therefore, \({\text {O}}((n+\log _{1+\varepsilon }D)|G|)\) straight line segments and circles in total. Squaring this figure accounts for intersections in \(\mathcal {A}(G)\). \(\square \)
We are ready to present the overall algorithm (referred to as Discrete):
  • Step 0 (Visibility Arrangement). First compute the overlay of all guards’ visibility step-functions, \(\mathcal {A}(G)\). It has polynomial complexity by Lemma 5.

  • Step 1 (Witness Points). Place one witness w in each feature (vertex, edge, and face interior of \(\mathcal {A}(G)\)). Let W denote the set of these witnesses, which is polynomial in cardinality.

  • Step 2 (Solve LP). Solve \({{\text {AGPF}}}\tau (G,W)\), which is possible in polynomial time. The solution x is feasible and optimal for \({{\text {AGPF}}}\tau (G,P)\).

\({{\text {AGPF}}}\tau (G,P)\), our original LP, has a finite number of variables, and an infinite number of constraints since every point in P has to be illuminated. But we can exploit that \(T_{G,x}\) is constant in each feature of the overlay in our LP formulation: An arbitrary witness point in an arrangement feature f is sufficiently lit if and only if all of f is sufficiently lit as well. Hence, we can solve the finite LP \({{\text {AGPF}}}\tau (G,W)\), where W contains one witness point in every feature of \(\mathcal {A}(G)\).

Putting everything together, we get

Theorem 1

\({\text {AGPF}}(G,P)\) admits a fully polynomial-time approximation scheme.

Proof

Given an \(\varepsilon >0\), the arrangement \(\mathcal {A}(G)\) has polynomial complexity due to Lemma 5 and the fact that \(\log _{1+\varepsilon }D\) is polynomially bounded in the encoding size of \(\varepsilon \) and P. Hence the LP \({{\text {AGPF}}}\tau (G,W)\) in the discrete algorithm can be solved in polynomial time. According to Lemma 4, the result is a \((1+\varepsilon )\)-approximation to \({\text {AGPF}}(G,P)\). \(\square \)

5.1.2 Implementation issues and approximation of circular arcs

Although \(\mathcal {A}(G)\) and W are polynomial in size, they become very large from a practical point of view. Therefore, it is more efficient to solve this with the technique of iterative primal separation (compare [9, 11, 20] for the classical AGP), i.e., to leave out some constraints of the LP and start with a small set W, then solve \({{\text {AGPF}}}\tau (G,W)\), and then check the \(\mathcal {A}(G)\) for insufficiently lit points. If no such points exist, the solution is feasible. Otherwise, we add representative witness points for insufficiently lit features to W and re-iterate the process until the solution is feasible. We know this approach terminates because in each iteration at least one new feature of \(\mathcal {A}(G)\) is covered.

It should be noted that by introducing circular arcs in the arrangement \(\mathcal {A}(G)\), we have to deal with irrational numbers—to be precise, with algebraic numbers of degree 2. This is known to result in computationally expensive operations. Hence, we can replace the circular arcs by regular octagons. They still have irrational coordinates: For example, consider a regular octagon centered at the origin with its vertices on a circle of radius r. It has a vertex at \(r (\cos \frac{\pi }{4}, \sin \frac{\pi }{4}) = r(1 / \sqrt{2}, 1 / \sqrt{2})\). However, intersection tests in the arrangement only use linear functions, which are expected to be less expensive. The octagon-based approach somewhat reduces the approximation guarantees—octagons only approximate circles—but still yields an FPTAS. However, our experimental evaluation shows that using the exact support for circular arcs of CGAL [2, 10] outperforms the octagon-based approach.

5.2 Continuous optimization approach

In this section, we introduce Continuous, an alternative algorithm for \({\text {AGPF}}(G,P)\). Continuous directly uses the continuous fading function \(\varrho \) instead of an approximate step function. It iteratively solves \({{\text {AGPF}}\varrho }(G,W)\), starting with \(W = \emptyset \) and checks if its solution is feasible for \({\text {AGPF}}(G,P)\). If a point \(w \in P \setminus W\) that currently does not receive sufficient light can be found, it is added to W; the process is repeated until P is sufficiently lit.

This requires a subroutine for finding insufficiently lit points and can obviously be answered by a routine that finds the darkest point. Hence, we seek an algorithm solving the primal separation problem (PSP), i.e., given a current solution x, for finding:
$$\begin{aligned} \underset{w \in P}{\arg \min }\; T_{G,x}(w) = \underset{w \in P}{\arg \min }\; \sum _{g \in G \cap {\mathcal {V}}(w)} \varrho (g,w) x_g\,. \end{aligned}$$
(12)
For the sake of presentation, we simplify \(T(w) := T_{G,x}(w)\).

We solve the PSP in two steps. First, we triangulate the overlay of all visibility polygons \({\mathcal {V}}(g)\) for all \(g\in G\) which yields a collection of triangles, each of which seen by a fixed subset of guards. In Sect. 5.2.1, we present an algorithm to solve (12) in such a triangle \(\mathcal {S}\subseteq P\). The algorithm requires a function \(\ell \) that provides a lower bound on the minimum brightness of \(T_{G,x}\) in \(\mathcal {S}\), i.e., \(\ell (\mathcal {S}) \le T(p)\;\forall p\in \mathcal {S}\). We discuss two such functions in Sects. 5.2.2 and 5.2.3.

5.2.1 Simplex partitioning algorithm

Continuous employs a global optimization approach based on simplex (here: triangle) partitioning [24] to solve the PSP. It iteratively keeps track of
  • \(\mathcal {S}_0\), the triangle to be searched for a darkest spot (the input),

  • \(k = 1, 2, 3, \ldots \), the iteration counter,

  • \(\mathcal {U}_{k}\), a set of triangles with \(\bigcup _{\mathcal {S} \in \mathcal {U}_{k}} \mathcal {S} \subseteq \mathcal {S}_0\) (the remaining search region),

  • \(\mathcal {S}_k\), the next triangle to be partitioned,

  • \(x_{k}^{*}\), the darkest point found so far (the incumbent solution), and

  • \(\beta _k\), the current lower bound on the minimum brightness in \(\mathcal {S}_0\).

  • Step 0 (Initialization). Set \(\mathcal {U}_0 = \{\mathcal {S}_0\}\) as the current set of triangles. Set the current best solution to \(x_{0}^{*} = \arg \min _{v\in V(\mathcal {S}_0)} T(v)\) (the darkest vertex of \(\mathcal {S}_0\)). Compute a lower bound \(\beta _{0} = \ell (\mathcal {S}_{0})\) for the minimum brightness in \(\mathcal {S}_0\).

In each iteration \(k \in \mathbb {N}\), we do the following steps:
  • Step 1 (Eliminating bright triangles). Let \(\mathcal {R}_{k}\) be the collection of triangle candidates remaining after discarding all triangles with \(\ell (\mathcal {S}) > T(x_{k-1}^{*})\) from \(\mathcal {U}_{k-1}\), i.e., after removing the triangles that cannot contain a darkest point due to their lower bound.

  • Step 2 (Selecting a triangle). Consider the current collection of triangles \(\mathcal {R}_{k}\) and select
    $$\begin{aligned} \mathcal {S}_k = \underset{\mathcal {S} \in \mathcal {R}_{k}}{\arg \min }\; \ell (\mathcal {S})\,, \end{aligned}$$
    (13)
    the triangle with the smallest lower bound, to be partitioned.
  • Step 3 (Refining the search region). Divide \(\mathcal {S}_{k}\) into two smaller triangles by applying a bisection on its longest edge such that
    $$\begin{aligned} \mathcal {S}_{k} = \mathcal {S}_{k_1} \cup \mathcal {S}_{k_2}. \end{aligned}$$
    (14)
  • Step 4 (Updating the incumbent). At this point, we obtain the search region
    $$\begin{aligned} \mathcal {U}_{k} = (\mathcal {R}_{k} \setminus \{\mathcal {S}_{k}\}) \cup \{\mathcal {S}_{k_1}, \mathcal {S}_{k_2}\}. \end{aligned}$$
    (15)
    Evaluate T at the common new vertex \(v_k\) of the triangles \(\mathcal {S}_{k_1}\) and \(\mathcal {S}_{k_2}\). Update
    $$\begin{aligned} x_{k}^{*}&= \underset{v \in \{v_k, x_{k-1}^{*}\}}{\arg \min }\; T(v)\,, \end{aligned}$$
    (16)
    $$\begin{aligned} \beta _k&= \min _{\mathcal {S} \in \mathcal {U}_{k}} \ell (\mathcal {S})\,. \end{aligned}$$
    (17)
    Then increase k and continue at Step 1.
  • Stopping criterion. Stop when there is no triangle to be partitioned. Alternatively, stop after a certain number of iterations or when a \(\delta \)-estimation of the optimal solution is found, i.e., when \(T(x_{k}^{*}) \le \beta _k + \delta \).

We propose two approaches for computing the lower bounds, i.e., \(\ell (\cdot )\), in Sects. 5.2.2 and 5.2.3. The first exploits geometric properties and the second the fact that T is Lipschitzian.

5.2.2 Geometric lower bound

Regarding a lower bound used to prune triangles in the simplex-partitioning algorithm in Sect. 5.2.1, observe that \(\varrho (g,w)\) monotonically decreases with increasing \(\Vert g-w\Vert \), i.e., light decreases with increasing distance. Fix a triangle \(\mathcal S\), a finite set of guards G scattered in P, and \(x \in \mathbb {R}^G_{\ge 0}\). According to the definition of \(\varrho (g,w)\), \(T_{\{g\},x}\) attains its minimum at a vertex of \(\mathcal S\). Therefore,
$$\begin{aligned} \ell (\mathcal {S}) := \sum _{g \in G} \;\min _{p \text { vertex of } \mathcal {S}} T_{\{g\},x}(p) \end{aligned}$$
(18)
is a lower bound for \(\min _{p \in \mathcal {S}} T_{G,x}(p)\).

5.2.3 Lipschitz lower bound

As an alternative approach to the geometric estimation of the lower bound, one may use the analytical properties of T. For example, if T is a Lipschitzian with a known Lipschitz constant L, then one can use the following result (see [24]):

Lemma 6

Let \(V(S)= \{v_0,v_1,\dots ,v_m\}\) be the vertex set of the simplex \(\mathcal {S}\). Let f be a Lipschitzian on \(\mathcal {S}\) with the Lipschitz constant L. Denote by \(z_j\) the function values \(T(v_m)\) (for \(j=0,\dots ,m\)), then we have:
$$\begin{aligned} z^{*} \ge \frac{1}{m+1}\left( \sum \limits _{j=0}^{m}z_j - L \max _{0 \le i \le m} \sum \limits _{j=0}^{m} \Vert v_i - v_j\Vert \right) \end{aligned}$$
(19)

Proof

The proof can be found in [24]; however, for the sake of completeness, we provide the complete proof. Let x be an arbitrary point of the simplex \(\mathcal {S}\). Since T is a Lipschitz function (see Lemma 7)
$$\begin{aligned} |T(x) - z_{j}|\le L\Vert x - v_j\Vert , \quad j=0,1,\dots ,m. \end{aligned}$$
(20)
We know that this inequality is true for any point in \(\mathcal {S}\), particularly for the optimal point \(x^{*}\); consequently, we have
$$\begin{aligned} z^{*}=T(x^{*}) \ge z_{j} - L\Vert x^{*} - v_j\Vert , \quad j=0,1,\dots ,m. \end{aligned}$$
By summing up these inequalities, we arrive at the following inequality
$$\begin{aligned} z^{*} \ge \frac{1}{m+1} \left( \sum \limits _{j=0}^{m} z_{j} - L \sum \limits _{j=0}^{m} \Vert x^{*} - v_j\Vert \right) . \end{aligned}$$
(21)
Due to the fact that \(x^{*}\) is unknown, we need to provide an estimation of the second sum in (21). Define the function Q as follows:
$$\begin{aligned} Q(x) := \sum \limits _{j=0}^{m} \Vert x - v_j\Vert :\quad x \in \mathcal {S}. \end{aligned}$$
Since \(\mathcal {S}\) is a convex set and Q is a convex function, the maximum of Q is attained at one of the vertices of \(\mathcal {S}\). Consequently,
$$\begin{aligned} \sum \limits _{j=0}^{m} \Vert x^{*} - v_j\Vert \le \max _{0 \le i \le m} \sum \limits _{j=0}^{m} \Vert v_i - v_j\Vert . \end{aligned}$$
Using this inequality in (21) completes the proof.\(\square \)

Fortunately, this bound can be used in the PSP:

Lemma 7

T is Lipschitzian.

Proof

We provide the proof for \(\alpha =2\). The other cases can be proved in a similar way. For the sake of simplicity in the notation, let us define for any i (such that \(i=1,\dots ,m\)):
  • \(\varrho _{i}(w):=\varrho (g_{i},w)\).

  • \((x_{0},y_{0}):=(x^{i},y^{i})\) as the coordinates of the point \(g_{i}\).

  • (xy) as the coordinates of the witness point w and \((x_{1},y_{1})\) as the coordinates of the witness point \(w_{x}\) and \((x_{2},y_{2})\) as the coordinates of the witness point \(w_{y}\) (where (through the primal-dual procedure) \(w_{x}\) and \(w_{y}\) are the potential points that will be chosen to be added into the set of the witness points).

Thus
$$\begin{aligned} \varrho _{i}(w) := {\left\{ \begin{array}{ll} \frac{1}{\sqrt{(x-x_{0})^2 + (y-y_{0})^2}} &{} \text {if } \Vert w-g_{i}\Vert \ge 1, \\ 1 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$
(22)
We want to show that \( \exists L > 0 \quad \text{ s.t. } \forall w_{x},w_{y}: |\varrho _{i}(w_{x}) - \varrho _{i}(w_{y})| \le L \Vert w_{x} - w_{y} \Vert .\) We need to consider three different cases:
  1. (i)

    \(\Vert w_{x} - g_{i} \Vert \ge 1\) and \(\Vert w_{y} - g_{i} \Vert \ge 1\),

     
  2. (ii)

    \(\Vert w_{x} - g_{i} \Vert < 1\) and \(\Vert w_{y} - g_{i} \Vert < 1\), and

     
  3. (iii)

    \(\Vert w_{x} - g_{i} \Vert \ge 1\) and \(\Vert w_{y} - g_{i} \Vert < 1\).

     
Case (i): In this case, the following definition of \(\varrho _{i}(\cdot )\) is applied:
$$\begin{aligned} \varrho _{i}(w) = \frac{1}{\sqrt{(x-x_{0})^2 + (y-y_{0})^2}} : w \in \{w_{x},w_{y}\}. \end{aligned}$$
It is sufficient to show that the partial derivatives of \(\varrho _{i}(w)\) are bounded by a positive number L. The partial derivatives of \(\varrho _{i}(w)\) are computed as follows
$$\begin{aligned} \frac{\partial }{\partial x}\varrho _{i}(w)= \frac{x_{0}-x}{[(x-x_{0})^2 + (y-y_{0})^2]^{3/2}}, \end{aligned}$$
and
$$\begin{aligned} \frac{\partial }{\partial y}\varrho _{i}(w)= \frac{y_{0}-y}{[(x-x_{0})^2 + (y-y_{0})^2]^{3/2}}. \end{aligned}$$
We will show that \(|\frac{\partial }{\partial x}\varrho _{i}(w)| \le L\) (where \(L > 0\) is a constant). The proof of the other case, i.e., \(|\frac{\partial }{\partial y}\varrho _{i}(w)| \le L\), is quite similar.
Since (xy) is located within a triangle of vertices with finite coordinates, we have \(\Vert x\Vert < \infty \) and \(\Vert y\Vert < \infty \). Furthermore, \(\sqrt{(x-x_{0})^2 + (y-y_{0})^2} \ge |x-x_{0}| \ge 0\), and, hence, \([\sqrt{(x-x_{0})^2 + (y-y_{0})^2}]^{3} \ge |x-x_{0}|^{3}\). This yields:
$$\begin{aligned} 0 \le \frac{1}{[\sqrt{(x-x_{0})^2 + (y-y_{0})^2}]^{3}} \le \frac{1}{|x-x_{0}|^{3}}. \end{aligned}$$
Consequently, we have:
$$\begin{aligned} 0 \le \frac{|x-x_{0}|}{[\sqrt{(x-x_{0})^2 + (y-y_{0})^2}]^{3}} \le \frac{1}{|x-x_{0}|^{2}}. \end{aligned}$$
The latter inequality reads as follows:
$$\begin{aligned} 0 \le | \frac{\partial }{\partial x}\varrho _{i}(w) | \le \frac{1}{|x-x_{0}|^{2}}. \end{aligned}$$
Because \(|x-x_{0}| \ge 1\) we have \(\frac{1}{|x-x_{0}|^{2}} \le 1\). Altogether, we showed that \(| \frac{\partial }{\partial x}\varrho _{i}(w) | \le 1\). In a similar way, one can show that \(| \frac{\partial }{\partial y}\varrho _{i}(w) | \le 1\). These inequalities prove that \(\varrho _{i}(w)\) is a Lipschitz function.

Case (ii): In this case, the function \(\varrho _{i}(w)\) is a constant function; consequently, it is a Lipschitzian.

Case (iii): This case corresponds to
$$\begin{aligned} \Vert w_{x} - g_{i} \Vert \ge 1 \text{ and } \Vert w_{y} - g_{i} \Vert < 1 \end{aligned}$$
and we want to show that
$$\begin{aligned} \exists L > 0 \quad \text{ s.t. } |\varrho _{i}(w_{x}) - \varrho _{i}(w_{y})| \le L \Vert w_{x} - w_{y} \Vert . \end{aligned}$$
As \(\Vert w_{y} - g_{i} \Vert < 1\), Eq. (22) yields \(\varrho _{i}(w_{y})=1\); in addition, we have:
$$\begin{aligned} \varrho _{i}(w_{x}) = \frac{1}{\sqrt{(x_{1}-x_{0})^2 + (y_{1}-y_{0})^2}}. \end{aligned}$$
The triangle inequality yields:
$$\begin{aligned} \Vert w_{x} - w_{y} \Vert = \Vert w_{x} - g_{i} + g_{i} - w_{y} \Vert \ge \Vert w_{x} - g_{i} \Vert - \Vert g_{i} - w_{y} \Vert . \end{aligned}$$
Using \(\Vert w_{y} - g_{i} \Vert < 1\) and \(\Vert w_{x} - g_{i} \Vert \ge 1\), we obtain:
$$\begin{aligned} \Vert w_{x} - w_{y} \Vert > \Vert w_{x} - g_{i} \Vert - 1 \ge 0. \end{aligned}$$
Because \(\Vert w_{x} - g_{i} \Vert \ge 1\) holds, we can conclude:
$$\begin{aligned} \frac{\Vert w_{x} - g_{i} \Vert - 1}{\Vert w_{x} - g_{i} \Vert } < \frac{\Vert w_{x} - w_{y} \Vert }{\Vert w_{x} - g_{i} \Vert } \le \Vert w_{x} - w_{y} \Vert . \end{aligned}$$
To sum up:
$$\begin{aligned} \frac{\Vert w_{x} - g_{i} \Vert - 1}{\Vert w_{x} - g_{i}\Vert } < \Vert w_{x} - w_{y} \Vert . \end{aligned}$$
(23)
In addition, we have:
$$\begin{aligned} |\varrho _{i}(w_{x}) - \varrho _{i}(w_{y})| = \left| \frac{1}{\Vert w_{x} - g_{i}\Vert } - 1\right| = \left| \frac{1 - \Vert w_{x} - g_{i}\Vert }{\Vert w_{x} - g_{i}\Vert }\right| . \end{aligned}$$
Using \(\Vert w_{x} - g_{i}\Vert \ge 1\), this yields:
$$\begin{aligned} |\varrho _{i}(w_{x}) - \varrho _{i}(w_{y})| = \frac{\Vert w_{x} - g_{i}\Vert - 1}{\Vert w_{x} - g_{i}\Vert }, \end{aligned}$$
and in combination with (23), we obtain:
$$\begin{aligned} \left| \varrho _{i}(w_{x}) - \varrho _{i}(w_{y})\right| < \Vert w_{x} - w_{y} \Vert . \end{aligned}$$
This shows that \(\varrho _{i}(\cdot )\) is a Lipschitz function. Since any finite sum of Lipschitz functions is a Lipschitz function too, we conclude that the objective function of the PSP is a Lipschitz function. \(\square \)

6 Experiments

We evaluate the Discrete and the Continuous algorithms from Sects. 5.1 and 5.2 experimentally. The Discrete algorithm comes in two variants: DiscreteCircle and DiscreteOctagon, the former uses circular arcs and the latter uses octagons to approximate the fading function, compare Sect. 5.1.2. Regarding the Continuous algorithm, we focus on the geometric bound from Sect. 5.2.2. The reason is that computing the geometric bound is simple and efficient, whereas for the Lipschitz bound (Sect. 5.2.3), we cannot achieve comparable guarantees since we do not know a tight value for the Lipschitz constant L in Eq. (20).

In order to evaluate the efficiency and solution quality of the two algorithms from Sects. 5.1 and 5.2, we conducted a series of experiments with implementations for both. The experimental setup is described in Sect. 6.1 and the results are analyzed in Sect. 6.2.
Fig. 5

Our test polygon classes. Some classes (NonSimpleOrtho, Spike, and NonSimple) have holes, others (VonKoch and Simple) do not. The number of vertices ranges from 50 to 700. aNonSimpleOrtho polygons are orthogonal polygons with holes. bSpike polygons comprise few positions that see much of the polygon. cVonKoch polygons are inspired by the von Koch curve. dSimple polygons are non-orthogonal polygons without holes. eNonSimple polygons comprise non-orthogonal polygons with holes

6.1 Experimental setup

6.1.1 Instances

Our test set is formed by 50 instances from the art gallery problem instance library [5], see Fig. 5. We test five instance classes (NonSimpleOrtho, Spike, VonKoch, Simple, and NonSimple) with polygons of 50–700 vertices. As an example for a solved instance, see the VonKoch-type instance in Fig. 6a.
Fig. 6

AGPF solutions obtained by the Continuous approach. The color scales show values of coverage: Dark blue points are lit with exactly the necessary threshold of 1, lighter points obtain more coverage. a A VonKoch polygon with 100 vertices. b A 94-vertex office environment. (Color figure online)

Fig. 7

An AGPF solution of a 1185-vertex cathedral polygon obtained by the DiscreteCircle algorithm. The color scale in the upper left indicates the value of coverage: A gray point is covered with exactly the necessary value of 1, blue indicates that a point obtains light with a value of more than 1 (largest value for light blue); yellow and green points are insufficiently lit (not present in this figure). (Color figure online)

Furthermore, we present a Continuous solution for a 94-vertex office environment (Fig. 6b), and a DiscreteCircle solution for a 1185-vertex cathedral (Fig. 7). These instances, however, are a demonstration and as such not included in the regular test set.

6.1.2 Polygon scaling

Solutions for the classical AGP are invariant under scaling of the input; as a result, the input complexity of algorithms solving the AGP is the number of vertices in the polygon. In the presence of fading, this is no longer the case. Especially the cutoff of \(\varrho \) at distance 1, see Eq. (5), becomes an issue: If every mutually visible pair of points in a polygon is at distance at most 1, the problem becomes equivalent to the AGP without fading. As an example, consider a convex polygon P: If P is small enough, one guard placed anywhere in P suffices, but if P is scaled up the structure of an optimal solution becomes non-obvious. The polygons in the art gallery problem instance library [5] have no natural or even consistent spatial size.

The impact of the input polygons’ number of vertices on the solution time in the classical AGP, in the form of visibility calculations and arrangement complexity, has been studied extensively [1, 4, 6, 7, 8, 9, 11, 15, 20, 26]. Given that fading introduces spatial size as a new source of complexity, we confine our experiments to polygons with up to 700 vertices and focus on the impact of spatial extent.

We scale the input polygons P as follows: First, we compute an estimate for the spatial complexity of P. Here, different measures could be used, for example the diameter of P, the area of P, or local feature size. Pre-experiments have shown that the average edge length of P, denoted by \(\mu (P)\), provides an intuitively consistent measure for our test set. Hence, we scale P by a factor \((\Lambda \mu (P))^{-1}\), for a parameter \(\Lambda \). Therefore, \(\Lambda = 2\) corresponds to having the cutoff in \(\varrho \) at twice the average edge length of P. We scaled our 50 input polygons using 0.2, 0.5, 1, and 2 as possible values for \(\Lambda \), yielding 200 scaled instances.

6.1.3 Parameterization

The algorithms are parameterized. Both algorithms account for the fading exponent \(\alpha \); we selected the two practically relevant values of 1 (laser scanner) and 2 (light).

The Discrete algorithm takes the desired approximation factor \(1 + \varepsilon \) as an input, we selected 1.2, 1.6, and 2. Furthermore, we test the Discrete algorithm using circles as well as octagons, DiscreteCircle and DiscreteOctagon, to approximate the fading function; this is discussed in Sect. 5.1.2.

The Continuous algorithm is parameterized in its stopping criterion: A triangle with a difference of \(\delta \) between lower and upper bound is no longer partitioned. We pick 0.01, 0.001, and 0.0001 as values for \(\delta \).

In total, this yields nine configurations, six Discrete and three Continuous, each with two choices for \(\alpha \). Together with the 200 scaled inputs, we run 3600 configuration-instance pairs.

6.1.4 Hardware and implementation

Our implementation of the algorithms from Sects. 5.1 and 5.2 is based on our implementation for solving the classical AGP [15, 20]. We used CPLEX-12.6 [18] to solve LPs and CGAL-4.4 [2, 10, 17] for geometric subroutines. All experiments were carried out on a Linux-3.18.27 server with two Intel Xeon E5-2680 CPUs, i.e., 16 cores and 32 threads, and 258 GiB of RAM. We ran 15 instances in parallel, each limited to 20 minutes of CPU time and 16 GB of RAM, aborting every run which did not finish within these limits. Our implementation is not parallelized.

6.2 Results

Tables 13 depict the results of our experiments. For each algorithm configuration, Table 1 addresses its success rate, Table 2 its objective values, and Table 3 the required CPU time. We discuss these aspects in Sects. 6.2.1, 6.2.2, and 6.2.3, respectively. Note that each table cell corresponds to 50 test runs, i.e., one per instance.
Table 1

Success rates in percent

Falloff \(\alpha \)

1

2

Scaling \(\Lambda \)

2

1

0.5

0.2

2

1

0.5

0.2

Continuous

0.01

98

98

94

92

98

98

90

88

Continuous

0.001

98

96

88

86

96

88

84

66

Continuous

0.0001

98

88

84

68

96

86

72

42

DiscreteCircle

2

100

100

98

94

100

98

88

80

DiscreteCircle

1.6

100

100

98

84

100

98

84

60

DiscreteCircle

1.2

100

98

88

60

98

92

58

40

DiscreteOctagon

2

100

100

96

82

100

98

90

72

DiscreteOctagon

1.6

100

100

96

76

100

98

84

60

DiscreteOctagon

1.2

98

96

78

48

84

32

10

4

6.2.1 Success rate

We report the success rate of each algorithm configuration in Table 1 w.r.t. the imposed CPU time and memory limits described in Sect. 6.1.4. Out of the 3600 test runs, 84.9 % succeeded, 12.3 % did not meet the CPU-time limit of 20 minutes, and only 2.9 % exceeded the 16 GB memory limit (compare Sect. 6.1.4).

In the following, we account for the times and objective values of failed runs with infinity and report median values.
Table 2

Median of relative objective values

Falloff \(\alpha \)

1

2

Scaling \(\Lambda \)

2

1

0.5

0.2

2

1

0.5

0.2

Lower bound

0.85

0.88

0.90

0.93

0.85

0.88

0.91

0.87

Continuous

0.01

1.00

1.00

1.00

1.00

1.00

1.00

1.00

1.00

Continuous

0.001

1.00

1.00

1.00

1.00

1.00

1.00

1.00

1.00

Continuous

0.0001

1.00

1.00

1.00

1.00

1.00

1.00

1.00

\(\infty \)

DiscreteCircle

2

1.10

1.22

1.37

1.52

1.10

1.31

1.52

1.59

DiscreteCircle

1.6

1.07

1.14

1.24

1.34

1.06

1.19

1.33

1.41

DiscreteCircle

1.2

1.02

1.05

1.09

1.13

1.02

1.06

1.14

\(\infty \)

DiscreteOctagon

2

1.11

1.23

1.38

1.53

1.09

1.30

1.49

1.60

DiscreteOctagon

1.6

1.07

1.15

1.25

1.35

1.07

1.17

1.32

1.40

DiscreteOctagon

1.2

1.02

1.06

1.09

\(\infty \)

1.02

\(\infty \)

\(\infty \)

\(\infty \)

6.2.2 Objective value

Table 2 compares the objective values determined by the different algorithm configurations. Per instance, we consider the objective value relative to the best known solution (w.r.t. the same choice for \(\alpha \) and \(\Lambda \)) and report, per cell, their median. For example, the 1.02 in the lower left corner encodes that, with \(\alpha = 1\) and \(\Lambda = 2\), the DiscreteOctagon algorithm with \(1 + \varepsilon = 1.2\) produced solutions at 1.02 times the objective value of the best algorithm (Continuous with \(\delta = 0.01\)).

Table 2 indicates that, where applicable, the median solution quality of the Continuous algorithm does not vary w.r.t. the choice of \(\delta \). Observe, however, that this does not mean that the solutions are optimal: The Continuous algorithm does not guarantee an approximation ratio.

For guaranteed bounds we include the row “Lower Bound.” Each Discrete algorithm, configured as \((1+\varepsilon )\)-approximation, terminating with an objective value of z yields a lower bound of \((1+\varepsilon )^{-1} z\). We present the median of the largest lower bound per instance (if applicable). Even with these conservative bounds, it is clear that the Continuous algorithm consistently produces good solutions.

The Discrete algorithm (DiscreteOctagon as well as DiscreteCircle) usually produces more expensive solutions than Continuous, but comes with the benefit of a proven approximation factor. Assuming the Continuous solutions to be near-optimal, it can be seen that the actual optimality gap (i.e., the gap between Discrete and Continuous) improves with larger values for \(\Lambda \), i.e., when scaling down polygons. This might be due to the fact that more space is covered with 1-disks around guards, where \(\varrho \) and \(\tau \) are equal.
Table 3

Median of relative CPU times

Falloff \(\alpha \)

1

2

Scaling \(\Lambda \)

2

1

0.5

0.2

2

1

0.5

0.2

Continuous

0.01

1.89

2.45

4.53

8.87

2.45

3.36

8.55

19.49

Continuous

0.001

1.98

3.20

7.91

19.16

2.37

5.17

18.10

173.97

Continuous

0.0001

1.94

4.63

14.02

110.47

2.68

7.90

74.81

\(\infty \)

DiscreteCircle

2

1.00

1.91

3.70

6.97

1.15

2.82

7.58

17.48

DiscreteCircle

1.6

1.05

2.07

4.62

9.88

1.23

3.44

11.23

36.96

DiscreteCircle

1.2

1.22

3.12

9.70

39.80

1.67

7.33

72.96

\(\infty \)

DiscreteOctagon

2

1.13

1.91

3.45

6.59

1.38

3.08

8.26

22.27

DiscreteOctagon

1.6

1.14

2.19

4.36

11.59

1.62

4.70

16.62

65.52

DiscreteOctagon

1.2

1.80

4.76

20.69

\(\infty \)

13.62

\(\infty \)

\(\infty \)

\(\infty \)

6.2.3 Efficiency

We compare the CPU time of the different algorithm configurations in Table 3. Per instance, we normalize the run time to that of DiscreteCircle with \(1+\varepsilon = 2\) for \(\alpha = 1\) and \(\Lambda = 2\), the fastest configuration. In each cell we report the median relative run time over all instances. For example, the 1.80 in the lower left corner encodes that, with \(\alpha = 1\) and \(\Lambda = 2\), the DiscreteOctagon algorithm with \(1 + \varepsilon = 1.2\) took 1.8 times as long as the DiscreteCircle configuration specified above.

For small \(\Lambda \), i.e., scaled-up polygons, it can be seen that the choice of \(\delta \) has a substantial impact on the CPU time of Continuous. It has, however, no measurable impact on the solution quality as discussed in Sect. 6.2.2.

Increasing \(\Lambda \) narrows the speed gap between Discrete and Continuous, as the former profits from a large \(\Lambda \) by using fewer steps in \(\tau \)—and hence fewer arcs in the arrangements—whereas it makes little difference to Continuous.

Furthermore, in most configurations, DiscreteCircle is faster than DiscreteOctagon, especially for \(\alpha = 2\). This means that the issue discussed in Sect. 5.1.2 is settled: Using octagons instead of circles in order to exclude circular arcs from the arrangements does not pay off, especially since it takes more octagons than circles to achieve the same approximation factor w.r.t. the continuous fading function \(\varrho \).

6.3 Choosing an algorithm

Clearly, DiscreteCircle should be preferred over DiscreteOctagon as it has higher success rates, smaller objective values, and, in most configurations, lower run times.

As for Continuous, observe that in our experiments the choice of \(\delta \) does not influence the objective value. Hence, we compare DiscreteCircle to Continuous with \(\delta = 0.01\). The only configuration of DiscreteCircle yielding comparable objective values uses \(1 + \varepsilon = 1.2\), but even in that case Continuous usually produces better solutions and has higher success rates.

However, Continuous does not guarantee any bounds on the approximation quality. Hence, if an approximation guarantee is required, DiscreteCircle must be preferred. Furthermore, DiscreteCircle is faster for large \(\Lambda \), i.e., on polygons with a small spatial extent.

7 Future work: AGPF with point guards

Sections 5 and 6 demonstrate that \({\text {AGPF}}(G,P)\) can be solved efficiently with the proposed algorithms. Hence, solving \({\text {AGPF}}(P,P)\) is a natural candidate for future work.

In previous work [20], we successfully used the doubly-infinite LP formulation for \({\text {AGP}}(P,P)\), together with separation routines for both the primal and the dual LP, in a practically efficient algorithm. The same could be applied here. As can be easily confirmed, the dual separation problem asks for a point \(g \in P\) with
$$\begin{aligned} \sum _{w\in {\mathcal {V}}(g)} \varrho (g,w)y_w > 1, \end{aligned}$$
(24)
given a dual solution y. Primal and dual separation problems are very similar: Given a solution x (y, respectively), they ask for the darkest (respectively brightest) point in the corresponding arrangement.

If those two problems can be solved efficiently, a possible strategy is to switch between primal and dual separation. This strategy is not guaranteed to converge, but if it does it converges to an optimal solution—and it has been shown to perform well in practice [20]. Thus, the interesting question is whether this holds true for \({\text {AGPF}}(P,P)\). Both approaches from this paper allow for such a strategy.

Another possibility is to use the approach by Tozoni et al. [26] for the AGP with point guards, which uses inclusion-maximal features of a witness visibility-arrangement for guard placement. This generalizes to \({\text {AGPF}}_\tau \): A feature of the witness overlay dominates another if it is seen by at least the same set of guards and their coefficients \(\varrho (g,w)\) are not smaller.

8 Conclusions

We introduce the art gallery problem with fading (AGPF), which is a generalization of both, the well-established art gallery problem [11, 23] and the Stage Illumination Problem by Eisenbrand et al. [14]. For the AGPF, we present two efficient algorithms for the case with fixed guard positions stemming from an infinite LP formulation. While one of them is faster in practice and generally provides a good solution quality, the other provides a fully polynomial-time approximation scheme, i.e., guaranteed bounds on the solution quality. We evaluate both approaches experimentally.

Notes

Acknowledgments

Open access funding provided by Max Planck Society. We would like to thank the anonymous reviewers for their suggestions that helped improve our presentation. This work was partially supported by the Deutsche Forschungsgemeinschaft (DFG) under contract number KR 3133/1-1 (Kunst!). Stephan Friedrichs, Mahdi Moeini (through Kunst!), and Christiane Schmidt were affiliated with the Technical University of Braunschweig during part of the research. Mahdi Moeini was supported by both CNRS and OSEO within the ISI project “Pajero” (France). Currently, Mahdi Moeini is affiliated to the Technical University of Kaiserslautern (Germany). Christiane Schmidt is supported by Grant 2014-03476 from Sweden’s innovation agency VINNOVA, and was supported by the Israeli Centers of Research Excellence (I-CORE) program (Center No. 4/11) during the development of the paper.

References

  1. 1.
    Bungiu, F., Hemmer, M., Hershberger, J., Huang, K., Kröller, A.: Efficient computation of visibility polygons. CoRR, arXiv:1403.3905 (2014)
  2. 2.
    CGAL (Computational Geometry Algorithms Library). http://www.cgal.org/
  3. 3.
    Chvátal, V.: A combinatorial theorem in plane geometry. J. Comb. Theory Ser. B 18(1), 39–41 (1975)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Couto, M.C., de Rezende, P.J., de Souza, C.C.: An exact algorithm for an art gallery problem. Technical Report IC-09-46, Institute of Computing, University of Campinas (2009)Google Scholar
  5. 5.
    Couto, M.C., de Rezende, P.J., de Souza, C.C.: Instances for the art gallery problem. http://www.ic.unicamp.br/~cid/Problem-instances/Art-Gallery (2009)
  6. 6.
    Couto, M.C., de Rezende, P.J., de Souza, C.C.: An IP solution to the art gallery problem. In: Proceedings of the 25th ACM Symposium on Computational Geometry (SoCG), pp. 88–89 (2009)Google Scholar
  7. 7.
    Couto, M.C., de Rezende, P.J., de Souza, C.C.: An exact algorithm for minimizing vertex guards on art galleries. Int. Trans. Oper. Res. 18, 425–448 (2011)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Couto, M.C., de Souza, C.C., de Rezende, P.J. (2007) An exact and efficient algorithm for the orthogonal art gallery problem. In: Proceedings of the XX Brazilian Symposium on Computer Graphics and Image Processing (SIBGRAPI), pp. 87–94Google Scholar
  9. 9.
    Couto, M.C., de Souza, C.C., de Rezende, P.J.: Experimental evaluation of an exact algorithm for the orthogonal art gallery problem. In: Proceedings of the 7th International Workshop on Experimental Algorithms (WEA), pp. 101–113 (2008)Google Scholar
  10. 10.
    de Castro, P.M.M., Pion, S., Teillaud, M.: 2D circular geometry kernel. In: CGAL User and Reference Manual. CGAL Editorial Board, 4.5.2 edition (2015)Google Scholar
  11. 11.
    de Rezende, P.J., de Souza, C.C., Friedrichs, S., Hemmer, M., Kröller, A., Tozoni, D.C.: Engineering art galleries. CoRR, abs/1410.8720, 2014. To appearGoogle Scholar
  12. 12.
    Demaine, E.D., O’Rourke, J.: Open problems: open problems from CCCG 2005. In: Proceedings of the Canadian Conference on Computational Geometry, (CCCG) (2006)Google Scholar
  13. 13.
    Eidenbenz, S., Stamm, C., Widmayer, P.: Inapproximability results for guarding polygons and terrains. Algorithmica 31(1), 79–113 (2001)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Eisenbrand, F., Funke, S., Karrenbauer, A., Matijevic, D.: Energy-aware stage illumination. Int. J. Comput. Geom. Appl. 18(1/2), 107–129 (2008)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Fekete, S.P., Friedrichs, S., Kröller, A., Schmidt, C.: Facets for art gallery problems. Algorithmica 73(2), 411–440 (2015)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Fisk, S.: A short proof of Chvátal’s watchman theorem. J. Comb. Theory Ser. B 24(3), 374 (1978)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Hemmer, M., Huang, K., Bungiu, F., Xu, N.: 2D visibility computation. In: CGAL User and Reference Manual. CGAL Editorial Board, 4.7 edition (2015)Google Scholar
  18. 18.
  19. 19.
    Kahn, J., Klawe, M., Kleitman, D.: Traditional art galleries require fewer watchmen. SIAM J. Algebr. Discrete Methods 4(2), 194–206 (1983)CrossRefMATHGoogle Scholar
  20. 20.
    Kröller, A., Baumgartner, T., Fekete, S.P., Schmidt, C.: Exact solutions and bounds for general art gallery problems. ACM J. Exp. Algorithmics 17(1), 2.3:2.1–2.3:2.23 (2012)Google Scholar
  21. 21.
    Kröller, A., Moeini, M., Schmidt, C.: A novel efficient approach for solving the art gallery problem. In: 7th International Workshop on Algorithms and Computation (WALCOM), pp. 5–16 (2013)Google Scholar
  22. 22.
    Lee, D., Lin, A.K.: Computational complexity of art gallery problems. IEEE Trans. Inf. Theory 32(2), 276–282 (1986)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    O’Rourke, J.: Art Gallery Theorems and Algorithms. International Series of Monographs on Computer Science. Oxford University Press, New York (1987)Google Scholar
  24. 24.
    Pinter, J.D.: Global Optimization in Action. Kluwer, Dordrecht (1996)CrossRefMATHGoogle Scholar
  25. 25.
    Tóth, C.D.: Art gallery problem with guards whose range of vision is 180\(^\circ \). Comput. Geom. 17(3–4), 121–134 (2000)MathSciNetCrossRefMATHGoogle Scholar
  26. 26.
    Tozoni, D.C., de Rezende, P.J., de Souza, C.C.: A practical iterative algorithm for the art gallery problem using integer linear programming. Optimization Online (2013). http://www.optimization-online.org/DB_HTML/2013/11/4106.html

Copyright information

© The Author(s) 2016

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  • Maximilian Ernestus
    • 1
  • Stephan Friedrichs
    • 2
    • 3
  • Michael Hemmer
    • 1
  • Jan Kokemüller
    • 1
  • Alexander Kröller
    • 1
  • Mahdi Moeini
    • 4
  • Christiane Schmidt
    • 5
  1. 1.TU Braunschweig, IBR, Algorithms GroupBraunschweigGermany
  2. 2.Max Planck Institute for InformaticsSaarbrückenGermany
  3. 3.Saarbrücken Graduate School of Computer ScienceSaarbrückenGermany
  4. 4.Chair of Business Information Systems and Operations Research (BISOR)Technical University of KaiserslauternKaiserslauternGermany
  5. 5.Communications and Transport Systems, ITNLinköping UniversityLinköpingSweden

Personalised recommendations