The Quest for Optimal Solutions for the Art Gallery Problem: a Practical Iterative Algorithm?
Total Page:16
File Type:pdf, Size:1020Kb
The Quest for Optimal Solutions for the Art Gallery Problem: a Practical Iterative Algorithm? Davi C. Tozoni, Pedro J. de Rezende, and Cid C. de Souza Institute of Computing, University of Campinas Campinas, Brazil [email protected], frezende j [email protected] www.ic.unicamp.br Abstract. The general Art Gallery Problem (AGP) consists in finding the minimum number of guards sufficient to ensure the visibility coverage of an art gallery represented by a polygon. The AGP is a well known NP-hard problem and, for this reason, all algorithms proposed so far to solve it are unable to guarantee optimality except in especial cases. In this paper, we present a new method for solving the Art Gallery Problem by iteratively generating upper and lower bounds while seeking to reach an exact solution. Notwithstanding that convergence remains an important open question, our algorithm has been successfully tested on a very large collection of instances from publicly available benchmarks. Tests were carried out for several classes of instances totalizing more than a thousand hole-free polygons with sizes ranging from 20 to 1000 vertices. The proposed algorithm showed a remarkable performance, obtaining provably optimal solutions for every instance in a matter of minutes on a standard desktop computer. To our knowledge, despite the AGP having been studied for four decades within the field of computational geometry, this is the first time that an exact algorithm is proposed and extensively tested for this problem. Future research directions to expand the present work are also discussed. 1 Introduction The Art Gallery Problem (AGP) is one of the most investigated problems in computational geometry. The problem’s input consists of a simple polygon, representing the outline of an art gallery, and one seeks to find a smallest set of points where guards should be placed so that the entire gallery is visually covered. Guards are assumed to have 360 degrees of unlimited vision, distance wise, and a polygon is said to be (visually) covered when every point of it is visible by at least one guard. We say that a point is visible by another whenever the line segment connecting them does not intersect the exterior of the polygon. Figure 1 illustrates a simplified floor plan of the Musée du Louvre and an optimal solution consisting of ten guards. Fig. 1. Louvre polygon representation (left); an optimal guard positioning (right). ? This research was supported by FAPESP – Fundação de Amparo à Pesquisa do Estado de São Paulo, CNPq – Conselho Nacional de Desenvolvimento Científico e Tecnológico and FAEPEX/Unicamp. 2 Tozoni, D. C., de Rezende, P. J., de Souza, C. C. In the version of the AGP considered in this work, often referred to as the AGP with point guards, there are no contraints on the positions of the guards. Moreover, we assume that the polygon is hole-free, meaning that its complement is connected. Many variations of this problem have been studied in the literature, including generalizations in which one allows for the presence of holes in the interior of the polygon or restrictions where guard placement is limited a priori to some finite set of points (e.g., the set of vertices), see [17,19]. Both of these cases are known to be NP-hard [17,16]. To this date, as no exact algorithm exists except for the latter case [7], a great deal of effort has been placed on the development of heuristics and approximation techniques [1,3,12]. Our Contribution. In this paper, we present a practical iterative algorithm for the Art Gallery Problem with point guards, which finds a sequence of decreasing upper bounds and increasing lower bounds for the optimal value. As evidence of the effectiveness of the proposed algorithm, we also present results showing that for every one of more than 1440 benchmark polygons of various classes gathered from the literature with up to a thousand vertices, optimal solutions are attained in just a few minutes of computing time. This work is unprecedented since, despite several decades of extensive investigation on the AGP, all previously published algorithms were unable to handle instances of that size and often failed to prove optimality for a significant fraction of the instances tested. As a matter of fact, as recently as last year, experts have claimed that “practical algorithms to find optimal solutions or almost-optimal bounds are not known” for this problem [14]. Organization of the text. In the next section, a few basic definitions and notations are presented. Section 3 is devoted to a short survey of the relevant related works. Section 4 describes the main steps of the proposed algorithm. The most relevant implementation details are given in Section 5, while Section 6 discusses the computational results obtained from the experiments. Finally, in Section 7, we draw some conclusions and identify future directions in this research. 2 Preliminaries We briefly review, in this section, concepts that are relevant for understanding the remaining of the paper. Recall that, in the Art Gallery Problem, the gallery is represented by a simple polygon P , which, in this work, is assumed to contain no holes. We say that two points in P are visible from each other if the line segment that joins them does not intersect the exterior of the polygon. The visibility polygon of a point p 2 P , denoted by Vis(p), is the set of all points in P that are visible from p. The edges of Vis(p) are called visibility edges and they are said to be proper for p if and only they are not contained in any edges of P . Given a finite set S of points in P , a maximal connected region in [p2SVis(p) (P n [p2SVis(p)) is called a covered (uncovered) region induced by S in P . Moreover, the geometric arrangement defined by the visibility edges of the points in S partitions P into a collection of convex polygonal faces called Atomic Visibility Polygons or simply AVPs. Clearly, the edges of an AVP are either portions of edges of P or portions of proper visibility edges for points of S. AVPs can be classified according to their visibility properties relative to the points of S. We say that an AVP F is a light (shadow) AVP if there exists a subset T of S such that F is (is not) visible from any point in T and the only proper visibility edges that spawn F emanate from points in T (see Figure 2). We now describe discretized versions of the AGP that are fundamental to our approach. Recollect that in the most general version of the problem, the set of points to be covered and the set of potential guards are both infinite (equal to P ). In contrast, the discretizations we consider here aim at reducing the set of points to be covered and/or the set of guard candidates to be finite. Firstly, in the Art Gallery Problem With Fixed Guard Candidates (AGPFC), one is given a finite set of points C ⊂ P , and the question consists of selecting the minimum number of guards in C that are sufficient to cover the entire polygon. A special case of the AGPFC is obtained when the elements of C are restricted to the vertices of P , in which case we call it the Art Gallery Problem With Vertex Guards (AGPVG). In another discrete version, named Art Gallery Problem With Witnesses (AGPW), one is given a finite set of points W ⊂ P , and the problem consists in finding the minimum number of guards in P that are sufficient to cover all points in W . Clearly, coverage of W does not ensure that of P . In [6] the authors define a polygon P to be witnessable if there exists a finite witness set W ⊂ P satisfying the property A Practical Iterative Algorithm for the Art Gallery Problem 3 Fig. 2. Basic definitions: Visibility polygon of a point (left); a finite subset of points S (center) and the arrangement induced by S with the light (gray) and shadow (dark gray) AVPs (right). that any set of guards that covers W also covers the entire polygon P . Later, in the implementation of our algorithm, we will explore a fundamental result on witnessable polygons. Finally, a third discretization is introduced when both the witness set and the guard candidate set are required to be finite. This discretization leads to a hybrid of the last two problems which we will denote by AGPWFC. It is worth noting that the latter problem can easily be cast as a Set Cover Problem (SCP) in which the elements of W have to be covered using the subsets comprised of the witness points that are covered by the candidate guards. Despite being NP-hard, large instances of the SCP can be solved quite efficiently using modern integer programming solvers. Our algorithm takes advantage of this fact. Although we tackle the discrete versions of AGP described above, the reader should bear in mind that, under the assumption of convergence, the algorithm presented in Section 4 leads to an optimal solution to the original problem. Later, we shall further elucidate this point. As we close this section, let us evoke that, to avoid ambiguities, unless stated otherwise, the term Art Gallery Problem and its acronym AGP are employed throughout this text to refer to the formulation with point guards. 3 Related Work The Art Gallery Problem was initially proposed by Klee in 1973 as the question of determining the minimum number of guards sufficient to watch over an entire art gallery, represented by a simple polygon of n edges [13].