1 Introduction and Related Works
Consider a simple polygon with vertices. The maximal subpolygon of visible to a point in is called the visibility polygon of , which is denoted by . There are lineartime algorithms to compute when the viewer is a point [24]. For the segment inside , the weak visibility polygon of , denoted as , is the maximal subpolygon of visible to at least one point (not the endpoints) of . A polygon inside is said to be completely visible from if for every point and for any point , and are visible (denoted as short from the completely visible polygon). Also, is said to be strongly visible from if there exists a point , such that for every point , and are visible (). These different visibility types can be computed in linear time ([20, 26]).
The visibility of a point can only be blocked by a part of the polygon. In a polygon, a vertex is called convex if the internal angle of the polygon (i.e., the angle formed by the two edges at the vertex with the polygon inside the angle) is less than radians (180°); otherwise, it is called reflex. Reflexvertices determine the start of the blocked visibility of a point inside .
The visibility of the point can be extended if some edges of reflect the visibility rays incident on them. While different types of reflections have been studied by researchers [14], we only consider the specular type. In the specular reflection, a view ray is reflected into a single outgoing direction, where the angle of the reflection and the incident angle are equal. Another wellknown type of reflection is called diffuse reflection. A ray reflected via diffuse reflection may assume all angles between and . This paper only deals with a single reflection per view ray when the reflection is specular.
First, we assume that all edges visible to , the viewer, are reflection edges. Then, we obtain the edges whose visibility can make additional visibility to the viewers. We will find the exact part of every edge whose visibility is beneficial for at least one viewer. To do this, we use the algorithm presented in [3]. The two points and inside can see each other through , if and only if they are visible via reflection rays on . We call these points reflectedvisible. Sometimes, to be more specific, we use reflectedvisible. In order to compute the reflectedvisibility area, only the visible part of should be taken into account.
Given a simple polygon , in the Art Gallery problem, the goal is to determine the minimum number of stationary points, called guards, that can be sufficient to see every point in the interior of a given polygon . This article intends to empower the guards with the single specular reflection edges. If guards are placed at the vertices of , they are called vertex guards. If guards are placed at any point of , they are called point guards. Here, we consider the point guards.
The Art Gallery problem for guarding simple polygons was proved to be NPhard for vertex guards by Lee et al. [21]. This proof was later generalized for point guards [23]. In 1987, Ghosh presented approximation algorithms for vertex guards, achieving a ratio of [19], which was improved up to by King and Kirkpatrick in 2011 [9]. It has been conjectured that constantfactor approximation algorithms exist for these problems. In 2018 Bhattacharya, S.Kumar Ghosh and S. Prasant Pal presented a constant approximation algorithm for guarding simple polygons by using vertex guards [5].
Assuming integer coordinates and a specific general position on the vertices of , Bonnet and Miltzow [7] presented the first approximation algorithm for the point guard problem. Their result was extended to be one of the most recent works on the point guarding problem in 2020 [1]. Assumption 1 (Integer Vertex Representation); vertices are given by integers, represented in the binary form. Assumption 2 (General Position Assumption); no three extensions meet in a point of which is not a vertex and no three vertices are collinear. In this paper, we proceed with these assumptions too.
Our Setting: Every guard can see a point if it is directly visible to it or if it is reflectedvisible. This is a natural and nontrivial extension of the classical Art Gallery setting. The problem of visibility via reflection has many applications in wireless networks and Computer Graphics, where the signal and the view ray can be reflected on walls. There is a considerable literature on geometric optics (such as [18] and [27]), and on the chaotic behavior of a reflecting ray of light or a bouncing billiard ball (see, e.g., [31], [22], and [17]). Particularly, regarding the Art Gallery problem, reflection helps in decreasing the number of guards. Special cases of this problem have been described by Chao Xu in 2011 [11] and by A. Vaezi et al. in 2020 [2].
Problem 1 (the Art+R Problem)
Given a simple polygon, , we intend to find the minimum number of point guards that cover , considering an extra capability that the single specular reflection is allowed for every edge of .
The main idea of solving the abovementioned problem is to find some areas inside in which all points have approximately the same visibility polygon. In other words, if we place a guard inside such an area, no matter where lies, it can see approximately the same subarea of . We will see what we mean by this approximation later. Such areas are called guardingregions. First, we define some terminologies; then we will see how to compute guardingregions. When we have the set of all guardingregions in , we use the greedy algorithm of the Set Cover problem to find the minimum number of guardingregions that represent the optimal places for guards that exist in a solution for the problem 1.
2 Definitions
This section covers a few terminologies we will use throughout the paper.
Consider a subregion of , a guard may be situated in one of the following positions: 1 the guard does not see any point of , either directly or via reflection. 2 The guard can see only partially, either directly or via reflection. 3 The guard covers entirely via direct visibility. 4 The guard covers entirely via reflection. 5 The guard covers entirely; however, considering both direct visibility and reflection, i.e. is partially directly visible and partially reflectedvisible to . In the first and second situations, we consider as invisible for . That is, for to be counted as areavisible to , all of its points must be visible to . However, this visibility can be a combination of direct visibility and reflection through reflectionedges. Note that more than one edge may have to be considered regarding reflection; we need to count on all edges that might add some area to the reflectedvisibility of a guard. Moreover, a subregion is areavisible to another subregion , if all points of are visible to (either directly or via reflection).
Definition 1
AreaVisibility: A region is called areavisible to a source (a point, a segment or a region) if all points of are visible to all points of .
Definition 2
SecondorderConvexRegions: Each minimal region formed from the following steps is called secondorderconvexregions; the set containing all of them is denoted by SCR.

Ignore the edges of . Connect every vertex of to each other, and compute all intersections of all lines crossing them.

Draw the lines between the previous intersection points with the reflex vertices of .

Compute all intersections of all of the abovementioned lines.

Now trace and compute the intersection of the boundary of and the abovementioned lines.
Figure 1 (a) to (g) illustrates an example of decomposing into secondorderconvexregions.
Later, we will see how this decomposition helps us to prove our approximation factor analysis.
As mentioned before, will be decomposed into other smaller special subregions called “guardingregions”. If we put two guards in different positions inside a guardingregion, they can get areavisible from the same subset of secondorderconvexregions. In order to compute guardingregions, we decompose every secondorderconvexregion into guardingregions. For a better definition of the guardingregions, see the following definition.
Definition 3
guardingregions: Consider a simple polygon ; decompose into secondorderconvexregions. Given a query point as a place for a guard in , can make a subset of secondorderconvexregions areavisible. Call this set the visible list of and denote this list by VL. A guardingregion is a region places inside ; if we move in any arbitrary position inside , VL will not change. In other words, the visible list of every point is the same.
We will estimate the visibility of a guard in an arbitrary position inside a guardingregion
, by a list of secondorderconvexregions areavisible to . Denote this list by . Based on this definition, for a more straightforward presentation, we may refer to guardingregion’s visibility instead of guard visibility. In order to compute guardingregions inside a secondorderconvexregion, we need to count on the areavisibility of each secondorderconvexregion individually. A subregion inside each secondorderconvexregion that sees another secondorderconvexregion completely is called a temporary subregion; for short, we call each of them a tempsubregion. See the following definition.Definition 4
Tempsubregion: Given the two secondorderconvexregions and (), suppose there is a subregion inside that can make areavisible; we call this subregion a tempsubregion and denote it by .
Define to be the set of all tempsubregions inside . These tempsubregions will be computed by checking the edges of each secondorderconvexregion individually. Suppose has edges. Denote the edge of by .
Each tempsubregion eventually will be used to divide secondorderconvexregions into guardingregions.
3 Algorithm
Here we present an algorithm that uses three steps to come up with a solution with a approximation factor.
Algorithm 1 illustrates a pseudocode for our approach. In Step 1, according to Definition 1, we decompose into secondorderconvexregions, with indicating the number of all secondorderconvexregions. Step 2 contains three main for loops that correspond to each secondorderconvexregion; we check their edges one by one to find tempsubregions. Consider with edges. Any guard inside may see other secondorderconvexregions ( ) only through ’s edges. Step 2 uses a procedure called to compute tempsubregions corresponding to an edge of a given secondorderconvexregion. All in all, Step 2 computes tempsubregions and puts them in a set denoted by . The procedure is the only part using reflection.
Step 3 receives all tempsubregions and decomposes them into guardingregions. This step uses another procedure called . This procedure is given a secondorderconvexregion as a parameter, splitting that secondorderconvexregion into guardingregions. The given secondorderconvexregion, denoted by , will be decomposed into a set of guardingregions called . Denote to be the final set that contains all guardingregions, and let denote the cardinality of . The algorithm computes every and adds it to (). As demonstrated by line ,
contains orderedpairs (
) of all guardingregions. Every guardingregion owns a visiblelist. Denote the cardinality of a visiblelist by . In Step 4, the set is the final solution of the algorithm, which is a subset of . Denote the cardinality of by . To cover , all secondorderconvexregions must get covered by the guardingregions chosen in the final set . The problem of selecting the minimum number of subsets (guardingregions) in can be seen as an instance of the wellknown Set Cover problem. The solution leads to the final set .Theorem 3.1
There is a approximation algorithm for the Art+R problem.
Proof
By running Algorithm 1, we can convert the Art+R problem to an instance of the Set Cover problem. Using a greedy approach to solve an instance of the Set Cover problem, we can obtain the factor for the approximation. Subsection 3.3.1 deals with the approximation analysis of the algorithm in details.
3.1 procedure Find (a segment, a secondorderconvexregion)
Consider with edges. Any guard inside may see other secondorderconvexregions ( ) only through ’s edges. Line 6 of the Algorithm 1, in turn, checks all such edges for . Consider an edge of . Suppose can see through . There must be an interval of from which the rays from to cross . The interval is the strongvisible part of , whereas is areavisible to . i.e., every point on can see . The reason this interval is important for us is because it determines an area inside in which every point can make areavisible. Using the endpoints of , we can find the rays that can make areavisible. By extending these rays backward inside , we can find a tempsubregion inside . Both and must be added to the visiblelist of (see Figure 1).
In this subsection, we intend to find intervals on a segment as a viewer that can completely see a secondorderconvexregion called . Then, we will compute the tempsubregions corresponding to inside the given secondorderconvexregion.
Suppose that is a given edge of a secondorderconvexregion called . There are three cases: 1 an interval (a point or segment) on can see the entire target directly. 2 An interval of can see the entire target via reflection. 3 Interval(s) of can see the entire target considering both direct and reflectedvisibility. (In this case, there might be more than one interval on that can make the given secondorderconvexregion areavisible.)
Lemma 1
Given a secondorderconvexregion denoted as and a segment , which is an edge of another secondorderconvexregion denoted by , we can find tempsubregions in that can make the target areavisible. This takes time complexity, where indicates the complexity of a secondorderconvexregion.
Proof
Subsection 4.1 in Appendix deals with the proof in details.
3.2 Procedure Decompose(secondorderconvexregion)
This procedure is intended to decompose a given secondorderconvexregion () into guardingregions. The complete version of this subsection is explained in Appendix subsection 4.2.
According to Algorithm 1
, when we reach this procedure, every secondorderconvexregion is divided into some tempsubregions that probably share common areas. Line 12 counts every secondorderconvexregion; line 13 calls Decompose to obtain guardingregions inside a given secondorderconvexregion. The Decompose procedure computes guardingregions from the tempsubregions, so that the union of the guardingregions inside a secondorderconvexregion equals the given secondorderconvexregion; also, guardingregions do not share any area (see Figure
6).A tempsubregion is obtained from the area between two halflines (backward rays). We aim to decompose every secondorderconvexregions, , using their intersection with the area between these halflines. Denote the number of tempsubregions inside , including , by , indicating the complexity of . For each tempsubregion in , except for itself, denote a starting halfline by , and an ending halfline by . So, inside , a tempsubregion is between two halflines and . We intend to sweep on , regardless of the direction we move on; for a simpler presentation, we refer to these halflines and . From the previous steps of Algorithm 1, for every two starting and ending halflines, it is already specified what secondorderconvexregions () are visible to the points between any two halflines and .
Lemma 2
A secondorderconvexregion can be decomposed into guardingregions in , where denotes the complexity of a secondorderconvexregion.
Proof
To decompose , we use a sweepline denoted by . We start sweeping parallel to an edge of . Various events may appear, checks every possibility and decide its action in each step. Appendix subsection 4.2 is concerned with the decomposition procedure. As the complexity of a secondorderconvexregion is , the sweeping approach may need time.
3.3 Analysis
Figure 3 is an example showing that single specular reflection lowers the number of guards from to guard. So, reflection can help to eliminate a large number of guards. Of course, mirrors are cheaper than cameras.
The rest of this section covers the analysis of Algorithm 1. First, note that due to line of the algorithm, we know that the guards chosen by the algorithm surely cover ; so, the algorithm provides a feasible solution. That is because when , every secondorderconvexregion will be added to . Although each secondorderconvexregion is decomposed to tempsubregions, each of the resulting tempsubregions has in its visiblelist. So, all secondorderconvexregions and consequently, will be covered.
Lemma 3
Algorithm 1 takes polynomial time complexity.
Proof
A simple analysis reveals that the algorithm works in the polynomial time: lines can have at most intersections. The polygon has vertices. First, we find the lines formed by joining vertices. We have lines, and intersectionpoints. We connect these intersectionpoints to reflexpoints, creating lines. So, there are intersection points, providing the final list of secondorderconvexregions. The list of secondorderconvexregions contains elements. In each secondorderconvexregion, there are at most tempsubregions. So, in the worst case, there could be guardingregions in .
A secondorderconvexregion has edges. That is, . A sweeping line on tempsubregions in a secondorderconvexregion takes at most time. As the algorithm presented in [3] needs time, the Find procedure takes time to find tempsubregions inside a secondorderconvexregion. A decomposition process is one time sweeping on a secondorderconvexregion, resulting in splitting the surface of that secondorderconvexregion into several guardingregions; so, this procedure does not take more time than .
All in all, considering Algorithm 1 lines of five to twelve takes time in a worstcase analysis. Moreover, lines thirteen to seventeen take time.
So, the algorithm works in the polynomial time, and this is what matters for us. This is an upper bound; however, whether the complexity can be improved remains open. Decreasing the complexity of the secondorderconvexregions has a great impact on the complexity of the algorithm. As we do not count on partial visibility; any change must be matched with the approximation proof to ensure it does not affect the analysis.
3.3.1 Approximation Analysis
This section proves that the approximation factor of Algorithm 1 is . As we already know that this approximation is the best known considering the standard point guarding problem in the worst case, we can conclude that it is a nice approximation ratio for the generalized problem.
Theorem 3.1 claims that Algorithm 1 provides a approximation for the AG+R problem. In the following, we prove this theorem.
Proof
All through the proof we only count on direct visibility; however, reflection may help the visibility of a guard, making the situation even better.
The set contains guardingregions every one of which, say , has a list of secondorderconvexregions (visiblelist) ; so, if we put a guard in an arbitrary position in , can see all secondorderconvexregions in entirely. However, the guard might see some other secondorderconvexregions partially. Since Algorithm 1 only counts on the secondorderconvexregions that are entirely visible (areavisible), it does not add the partially visible part of the secondorderconvexregion to a visible list of a guardingregion. These partially visible areas cause a difference between the solution we provide by Algorithm 1 and the optimal one. That is because one or more guards in the optimal solution might see some secondorderconvexregions s partially; the rest of s gets visible by other guards.
To prove Theorem 3.1, we have two steps; first, considering that we have a set , we need to select the minimum number of subsets (guardingregions) from that to cover all secondorderconvexregions. The first step is an instance of the Set Cover problem, which has a approximation algorithm. To organize our instance of the Set Cover problem, we consider SCR as the set of items. So, all secondorderconvexregions should be covered. The visiblelist of every guardingregion corresponds to a subset of our instance problem. The minimum number of guardingregions whose visiblelist covers all secondorderconvexregions is the solution of this instance of the Set Cover problem.
Secondly, we need to know how well is. To measure how good is, we need to compare the optimal solution of the Art+R problem, denoted by , and the optimal solution we have from , denoted by . Denote as the set of guards in the real optimal solution. Suppose there are guards in . Denote as the number of guardingregions in . In the following lemma, we prove that . So, Algorithm 1 is a approximation for the Art+R problem.
Since from Lemma LABEL:lem:polynomial, is polynomial, we can conclude that Algorithm 1 provides a approximation factor for the Art+R problem, where indicates the complexity of .
Lemma 4
Proof
Every guard in covers a subarea of denoted by , which is, in fact, the visibility polygon of . Pick an arbitrary point in a guardingregion . Set to be in the position specified by . The guard can see a subarea of denoted by . The proposed algorithm tries to estimate with a subset of secondorderconvexregions. This subset is determined by the visiblelist of a guardingregion (). Choosing a guardingregion in corresponds to selecting a position for a guard.
Clearly, the guards in also cover all secondorderconvexregions. Remember that for every guard, Algorithm 1 counts only on the complete visibility of secondorderconvexregions. If a subset of guards in sees a set of secondorderconvexregions via complete visibility, and a larger set in covers the same secondorderconvexregions, then we can choose the same guards form to be in . Otherwise, and would have the same number of guards.
So, we only have to care about situations where at least one secondorderconvexregion is covered by some previously chosen guards in , so that this secondorderconvexregion is covered by the union of the partial visibility of some guards in . In , we have to count on extra guards to cover partial visible secondorderconvexregions completely. We will see that since reflex vertices are connected to the intersection points from the crisscross of the lines of the polygon, situations in which a few guards in can see many secondorderconvexregions partially cannot happen. However, depending on the positions reflex vertices and guards may happen to choose, a few cases are investigated for the proof to be complete. See Appendix LABEL:sub;proof for the details of the proof.
4 Discussion
The paper generalizes the classical Art Gallery problem by allowing “specular reflections”, considering them only once. Similar to the classical version, this one also has a space approximation, by applying a transformation to the wellknown Set Cover problem.
Since some years ago, scientists have considered reflection in their problemsolving. In this article and some previous works, we have considered reflection as an extra capability to enhance other problems. The question of whether is the best possible approximation factor for the Art+R problem, however, remains open. However, we know that is the bestknown approximation factor for the normal point guarding problem in the worst case.
Even though multiple reflections may seem more interesting from a theoretical point of view, in practice, each mirror lowers the quality of the pictures, especially when dealing with a large gallery. From a more practical point of view, we might tend to consider placing only a few (small) mirrors somewhere (as mirrors are expensive and we use a building as an Art Gallery) to reduce the number of guards. This algorithm helps us to determine which edge and which part of that edge can provide a larger view. If a user has a fixed camera, they can use the algorithm proposed by [3]. Otherwise, the algorithm presented in this paper specifies the positions of guards and the mirrors together.
Although the main contribution of this paper is to consider reflection, this algorithm also works for the standard Art Gallery problem. This can be done by changing the Find function only to consider direct visibility. The modified algorithm converts the point guarding problem to a version of the Set Cover problem; however, the subsets (the guardingregions) are not independent, and this is not a general case of the Set Cover. We intend to find the relations between the guardingregions and provide a better approximation factor for the standard point guarding problem in the future work.
References
 [1] É. Bonnet, T. Miltzow. Parameterized Hardness of Art Gallery Problems. ACM Transactions on Algorithms, https://doi.org/10.1145/3398684, 16(4), 2020.
 [2] A. Vaezi, B. Roy, M. Ghodsi, Visibility via Reflection arXiv:2011.03107 , 2020.
 [3] A. Vaezi, M. Ghodsi, Visibility extension via reflectionedges to cover invisible segments. Theoretical Computer Science, https://doi.org/10.1016/j.tcs.2019.02.011, 2019.
 [4] S. Ashur, O. Filtser, M. J. Katz, R. Saban. TerrainLike Graphs: PTASs for Guarding WeaklyVisible Polygons and Terrains. WAOA 2019: Approximation and Online Algorithms, 1–17, 2019.
 [5] P. Bhattacharya, S. K. Ghosh, S. P. Pal, Constant Approximation Algorithms for Guarding Simple Polygons using Vertex Guards. arXiv:1712.05492, 2018.
 [6] A. Vaezi, M. Ghodsi. How to Extend Visibility Polygons by Mirrors to Cover Invisible Segments. WALCOM, 42–53, 2017.
 [7] É. Bonnet, T. Miltzow. An Approximation Algorithm for the Art Gallery Problem. Proceedings of the 33rd International Symposium on Computational Geometry (SoCG’17) Article 20, DOI:https://doi.org/10.4230/LIPIcs.SoCG.2017.20, 15 pages, 2017.
 [8] A. Vaezi, M. Ghodsi. Extending Visibility Polygons by Mirrors to Cover Specific Targets. EuroCG, 13–16, 2013.
 [9] J. King, D. Kirkpatrick. Improved Approximation for Guarding Simple Galleries from the Perimeter. Discrete Comput Geom, https://doi.org/10.1007/s004540119352x, 46, 252–269 2011.
 [10] S. K. Ghosh. Approximation algorithms for Art Gallery problems in polygons. Discrete Applied Mathematics, 158(6): 718–722, 2010.
 [11] Chao Xu. A generalization of the art gallery theorem with reflection and a cool problem. https://chaoxuprime.com/posts/20110606ageneralizationoftheartgallerytheoremwithreflectionandacoolproblem.html, 2011.
 [12] S. Eidenbenz, C. Stamm, P. Widmayer. Inapproximability results for guarding polygons and terrains. Algorithmica, 31(1), 79–113, 2001.
 [13] U. Feige. A threshold of ln n for approximating set cover. J. ACM, 45(4), 634–652, 1998.
 [14] B. Aronov, A. R. Davis, T. K. Day, S. P. Pal, D. Prasad. Visibility with one reflection. Discrete & computational Geometry, 19: 553–574, 1998.

[15]
R. Raz, S. Safra.
A subconstant errorprobability lowdegreetest and a subconstant errorprobability PCP characterization of NP.
Proc. 29th ACM Symp. Theory of Computing. El Paso,TX
, 475–484, 1997.  [16] G. T. Tokarsky. Polygonal rooms not illuminable from every point. American Mathematical Monthly, 102: 867–879, 1995.
 [17] V. V. Kozlov and D. V. Treshchev. Billiards: A Genetic Introduction to the Dynamics of Systems with Impacts. Translations of Mathematical Monographs, vol. 89. American Mathematical Society, Providence, RI, 1991.
 [18] R. Guenther. Modern Optics. Wiley, New York, 1990.
 [19] S. K. Gosh. Approximation algorithms for Art Gallery problems. Proc. Canadian Information Processing Society Congress, 429–436, 1987.
 [20] L. J. Guibas, J. Hershberger, D. Leven, M. Sharir, and R. E. Tarjan. Lineartime algorithms for visibility and shortest path problems inside triangulated simple polygons. Algorithmica, 2: 209–233, 1987.
 [21] D.T. Lee and A.K. Lin. Computational complexity of Art Gallery problems. IEEE Transactions on Information Theory, 32: 276–282, 1986.
 [22] E. Gutkin. Billiards in polygons. Phys. D, 19:311–333, 1986.
 [23] A. Aggarwal. The Art Gallery theorem: its variations, applications and algorithmic aspects. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 1984.
 [24] D. T. Lee. Visibility of a simple polygon. Computer Vision, Graphics, and Image Processing, 22: 207–221, 1983.
 [25] J. O’Rourke, K. Supowit. Some NPhard polygon decomposition problems. IEEE Trans. Inf. Theory, 29(2), 181–189, 1983.
 [26] D. Avis, G. T. Toussaint. An optional algorithm for determining the visibility of a polygon from an edge. IEEE Transactions on Computers, C30: 9101014, 1981.
 [27] M. Born and E. Wolf. Principles of Optics, 6th edn. Pergamon Press, Oxford, 1980.
 [28] V. Klee. Is every polygonal region illuminable from some point? Computational Geometry: Amer.Math. Monthly, 76: 180, 1969.
 [29] B. Aronov, A.R. Davis, T.K. Dey, S.P. Pal, D.C. Prasad. Visibility with one reflection. Discrete & Computational Geometry, 19.4, 553574, 1998.
 [30] B. Aronov, A.R. Davis, T.K. Dey, S.P. Pal, D.C. Prasad. Visibility with multiple reflections. Discrete & Computational Geometry, 20.1, 6178, 1998.
 [31] C. Boldrighini, M. Keane, and F. Marchetti. Billiards in polygons. Ann.Probab., 6:532–540, 1978.
Appendix
4.1 Procedure Find (a segment, a secondorderconvexregion)
This section deals with the various cases of the Find procedures in details.
1) An interval on can see the entire target directly:
We need to find the largest interval that can make the target areavisible. To do this, since we know that the target is a convexregion, we only need to make sure that all vertices of the target are visible for all points of . The intersection of the visibility of all target’s vertices points out an interval on that is denoted as . In other words, locate the two extreme points of visible from each vertex of . Then, find their common intersection.
We use to find a tempsubregion, , that can see the target. We add to the output list of the Find procedure. As may get larger by the help of reflection, we have to check other cases too. However, this case obviously only takes .
2) An interval of can see entirely via reflection:
We use the algorithm in subsection of [3]. This algorithm takes a segment as an input denoted by ; we need to choose two specific rays from four ones to make sure that a target gets completely visible to the viewer. The chosen rays specify two halflines denoted by and ; starting from the endpoints of , they will start from a reflector and point to the target. The chosen halflines are denoted by numbers or .
To use that algorithm, set to be as the viewer, and use and halflines to make sure that is completely reflectedvisible to . These halflines must be released from to reach after reflecting from a reflectionedge in the middle. The opposite direction from to makes two halflines to intersect on the endpoints of . There could be other such edges like that are used with to make reflectedvisible; however, we need to take all such edges into account and find the largest . This can be done by the mentioned algorithm, as presented by [3]. After finding the correct halflines that make the endpoints of , we extend these halflines inside the source. The intersection between these two halflines and the source creates a tempsubregion . By using the binary search, we can compute this intersection in time, where denotes the complexity of the source. Note that any point in can make both target and source areavisible.
The algorithm we used from [3] could be only useful if we were looking for a segment to get visible to a source segment; however, here our target is a convexregion, not a segment. Suppose that has edges; to be sure the whole is reflectedvisible to the given segment (the viewer), we have to take each edge of into account individually.
Consider all edges of the secondorderconvexregion. To compute the final result, we compute the intersection between every two tempsubregions corresponding to two edges of the region in a step by step manner to find the final tempsubregion.
Denote the complexity of the target by . For a specific edge , to compute a tempsubregion , it takes time to compute ; and it takes to compute the boundary of . Thus, it takes for each run of the Find procedure. Later, we will see that that the complexity of a secondorderconvexregion is polynomial in terms of ; so, the Find procedure takes time (considering this case).
Note that the algorithm presented in [3] considers all edges of as potential reflectionedges. So, if the gets covered by different reflectionedges, we surely consider all such reflectionedges.
3) Points on an interval on might see a part of directly, and the rest of the is done via reflection.
To compute these types of intervals on , we use the following approach. The mentioned approach, as represented below, only considers a source segment and a target segment denoted by . We need to run this approach on all edges of the secondorderconvexregion and consider the intersection of the computed intervals on . As a result, we know that every point of the final intervals on can see the entire region. Note that in this case, as various mirroredges can create different reflectedvisible parts on the target by considering direct visibility, there can be various intervals on the source that can make the target areavisible. So, there might be more than one interval on that can make the entire area visible.
This third case deals with some special situations where there are some points on the target, such that each one is a place where direct visibility meets the reflected visibility. For example, see Figure 4(c). This figure illustrates the target by . The point on sees the target completely. If we move a little bit on from and go to , the direct visibility gets disconnected from the mirrorvisible part. We need to compute points like or its image on , which is denoted by , to know what interval on can see the entire target. This is because and such points determine an endpoint for these intervals. Note that computing or is equivalent. That is because is the projection of on the endpoint of the mirroredge.
Using the algorithm presented in subsection 5.4 of the article [3], we can compute which interval of can see which part of in a weak visible way. To explain more, see Figure 4(e). We can find out that the points on form till can see at least one point on from to using . However, if we compute direct visibility in , we will see that direct visibility and mirrorvisibility share a part on . This part has been illustrated in Figure 4(e) in green. As we move on from to , the direct visible interval gets shorter directed to ; also, mirrorvisible part gets shorter directed to till the endpoints of these intervals meet each other in .
We have the endpoints of intervals such as form the algorithm previously mentioned in the article [3], but we do not have points such as ; so, we should compute these types of points. The reason we have to compute these points is because they determine the endpoints of visibility intervals on the source. To have a better presentation, let call the points on the source (); the image on the target is a point where direct visibility and mirrorvisibility are merged by . Note that for every mirroredge, there can be one . Also, a point might not see the target completely, but it may see the target by getting help from other mirrors. So, we have to compute the points no matter whether it can see the target entirely or not. We will check that later.
Definition 5
A point on the source is a point where the direct visibility of and its mirrorvisibility on an endpoint of a predetermined mirroredge are merged on a target which is a segment. In other words, there is a segment as a source and a segment as a target; if we stand on the point on the source, we can see a direct visible part and a mirrorvisible part for a mirroredge, say . The mirrorvisible part and the direct visible part share one of their endpoints. This endpoint is the projection of on the target.
Lemma 5
For a given segment as a source and a given segment as a target, we can compute all points with regard to all mirroredges in linear time, considering the complexity of .
Proof
Without the loss of generality, we only deal with one mirroredge and direct visibility. Now, see Figure 5. Without loss of generality, we deal with one case in Figure 5, and we can compute the point denoted as through algebraic equations. Since from subsection 5.4 of the article [3], we have , we can compute the intersection of the ray coming out of and reflecting on . This point is denoted by . Note that as direct visibility is blocked partially, there must be a dominant reflex vertex here; it is denoted by . The intersection of the line passing through and gives us the end of the directly visible part seen by on . This point is denoted by . The position at which the direct visibility meets mirrorvisibility on is denoted by . In fact, is the projection of on . By definition, is seen by both direct visibility and mirrorvisibility. The distance between and is called . The only thing we need to compute is . This is because by knowing , we can compute the coordinates of and . As mentioned, must be somewhere between and . So, set as a variable and compute the coordinates of from the coordinates of , and in terms of . The line crossing on must intersect . So, compute the coordinates of in terms of too. Also, checking mirrorvisibility and knowing the fact that a ray reflecting on must cross , we can come up with another equation. By solving these equations, we can compute . Thus, is obtained.
As we consider any case in which we have to merge direct visibility with a mirrorvisibility and we have the corresponding reflex vertices and the endpoints of the mirror that have impact on the visibility, we can compute how to move on source to aim a specific position. Then, through algebraic equations, we can find points. Note that the endpoints of mirroredges (denoted by and ) and the corresponding reflexvertices (denoted by rf) are computed from the algorithm presented in [3].
So, all in all, we have a few algebraic computational steps that cost a constant time; to compute all intervals on the source and on the target, as well as and vertices and the corresponding reflexvertices, we just have to run the algorithm presented by [3]. This algorithm has been proved to need linear time based on the complexity of . So, we are done.
Approach for case 3:

We compute every mirrorvisible point on via every edge of . To do this, we use the algorithm mentioned in subsection 5.4 of the article [3]; they use a segment denoted by as the viewer and a segment denoted by as the target. Based on the results of [3], every such mirrorvisible part can be computed in the linear time. Furthermore, we will obtain the intervals on that make those mirrorvisible parts on the target. So, there will be at most intervals on that can make at most mirrorvisible parts on the target. Put the intervals on in a set denoted by EdI. Put the mirrorvisible parts on in a set denoted by TI.

Check the points in TI to find new intervals visible via directvisibility and also, a mirror. These intervals determine the of points projection.

Compute all points. Add points and the endpoints of the intervals in EdI to a set denoted by EdP.

For every point in EdP, compute the direct visible parts on . We can add these direct visible parts to another set. Now, we can sweep on ; consider the points on EdP as the events; the sweeper checks if in every event the direct visible parts in combination with the mirrorvisible parts can make the whole visible. For every consequent event, if both points could see the entire target and also they are connected by at least on interval in EdI, then we add the part between these two event points to a one that can see the whole target.
The sweeper we use in case 3 needs time. Case 3 also runs for every edge of a target secondorderconvexregion; so, the time complexity we need for this case is: ; the complexity of the equals .
Note that from the previous cases, we already know the parts on that make the target completely visible. So, if we reach such an interval, we can immediately attach it to the current interval we are computing.
At the end, considering all situations, we can find the intervals on that can make completely visible.
4.2 Decomposing a secondorderconvexregion
In this subsection, we see how to decompose a given secondorderconvexregion into distinct and disjoint guardingregions. This subsection is the complete version of Subsection 3.2. Here, we also prove Lemma 2. From the previous steps of Algorithm 1, we know that a tempsubregion is created based on the collision of two halflines with the boundary of the given secondorderconvexregion. The approach sweeps on the given secondorderconvexregion. When the sweeper reaches a halfline that starts/ends a tempsubregion, we add/eliminate the visible secondorderconvexregion corresponding to that tempsubregion to the visiblelist of currently in progress guardingregions. If the sweeper reaches an intersection point of many halflines, there could be more than one secondorderconvexregion that we should add or eliminate from the currently in progress guardingregions. The approach is presented in details in the following:
DecompositionProcess: Consider a secondorderconvexregion . To decompose , we use a sweepline called . The sweeping process starts from an edge of . The sweepline first contains and moves on parallel to till it reaches the end of , where sees all points of .
The final decomposition of results in several newly created guardingregions. The Decompose procedure puts the final guardingregions in a set called . Note that we have to compute a visiblelist for every new guardingregion, . We already know that contains . The sweepline has a list of currently in progress guardingregions that should decide where to end them. Denote this list by inPL. Denote the number of guardingregions in the current list of the sweepline by . During the sweeping process, may encounter three cases: 1) It may reach a starting halfline , 2) it may reach an intersectionpoint of several or halflines, or 3) it may reach an ending halfline .
Consider an arbitrary and suppose that can make areavisible. There are three different cases. See Figure 6 as an example. In this figure, the numbers on power of are normal indicators to itemize different guardingregions. This figure illustrates three different cases a sweepline may encounter while tracing a secondorderconvexregion to decompose it into guardingregions. The three cases:
1,2) If reaches a starting halfline or an ending halfline ;
Do these steps:

End all guardingregions in inPL. That is because all previously submitted guardingregions in inPL are ended by the new line.

Add every newly ended guardingregion to (the output set).

Based on the number of crossing lines with the halfline , create new guardingregions in inPL. Each of such new guardingregions starts from and has its own boundary.

Create a visiblelist for each new () with the initiation value of .

For each , if has ; on the other side; (the already swept side) of , set
. Note that we only check one line at a moment, so only one tempsubregion and consequently, the visibility of one secondorderconvexregion are checked, and other visible secondorderconvexregions are still visible.

For each new ,
if reaches ;
Add to .
else reaches ;
Remove from .
3)
If reaches an intersectionpoint of halflines and halflines
, without loss of generality, suppose all of these halflines are on distinct lines, and assume that the sweepline is slightly tilted, so that the intersections are considered one by one.
We already know that (see Figure 6(c)). So, all halflines are already seen by . The most recently visited halfline is either a or a . Again, w. l. o. g. suppose it is , and is parallel to the direction of the sweepline .
Follow the following steps:

End every guardingregion in inPL. These guardingregions are above , where is moving before it reaches .

Add every newly ended guardingregion to .

Based on the lines crossing , create new guardingregions in inPL.

Create a visiblelist for each new guardingregion () in inPL ().

Add to every .

There are nv newly guardingregions created in . For each , check it with each halfline intersected in .
(a) If is a starting halfline and lies between and , then add to .
(b) If is an ending halfline and is not between and anymore, then remove from .
Set from the abovementioned approach as the output, which is the decomposed set of a given secondorderconvexregion.
4.3 Proof of Lemma 4
Proof
Every guard in covers a subarea of denoted by , which is in fact, the visibility polygon of . Pick an arbitrary point in a guardingregion . Set to be in the position specified by . The guard can see a subarea of denoted by . The proposed algorithm tries to estimate with a subset of secondorderconvexregions. This subset is determined by the visiblelist of a guardingregion (). Choosing a guardingregion in corresponds to selecting a position for a guard.
The guards in also cover all secondorderconvexregions. Remember that every guard Algorithm 1 counts only on the complete visibility of secondorderconvexregions. If some guards in can see more secondorderconvexregions completely, then we can choose the same guards to be in to cover the same secondorderconvexregions. Otherwise, and would have the same number of guards. So, we only have to focus on situations where at least one secondorderconvexregion is covered by more than one previously chosen guard in , so that this secondorderconvexregion is covered by the union of the partial visibility of those guards in . In , we have to count on extra guards to cover partially visible secondorderconvexregions completely. We will see that since reflex vertices are connected to the intersection points from the crisscross of the lines of the polygon, those situations where a few guards in can see many secondorderconvexregions partially cannot happen. However, depending on the positions reflex vertices and guards may choose, the following is needed to be investigated for the proof to be complete.
The problem happens when two or more guards in make some secondorderconvexregions completely visible by using the partial visibility of each guard. In , to cover those secondorderconvexregions, there must be some extra guards, so that each of the secondorderconvexregions gets areavisible by a specific guard (see Figure 7(a)).
Consider a guard in ; for , to see a secondorderconvexregion partially, ’s visibility must be blocked by a reflexvertex.
Suppose we have guards in that can see secondorderconvexregions together and via the partial visibility of each one. See Figure 7(b). Consider a guard that cannot see a secondorderconvexregion completely because of ’s blocking. The rest of should get visible by some other guards in . Denote the visible part of by . Consider another guard that is responsible for the visible part very close to . Since is a reflex vertex, from the first steps of Algorithm 1, we know that there must be a vertex or an intersection point, denoted by , which is connected to . Choose , so that the line containing contains an edge of . Note that w.l. o. g we suppose that the visible part is only completely visible to and no other guards in . Again, without the loss of generality, suppose and can see another secondorderconvexregion partially because of blocking other reflexvertices. Choose to block the visibility of not to see completely. Consider the point , so that the unique line that contains crosses an edge of . The guard is responsible to see both and areas and perhaps, more such areas. Also, the guard is responsible for and areas.
As mentioned above, we know that should see both and areas or more. However, consider the unique line that contains , and the unique line that contains . These lines must intersect in a point. That is because there is a point with the name of in the optimal solution that sees those areas. The lines cannot be parallel because there would be no point to see both and areas simultaneously. So, there is an intersection point . Algorithm 1 connects to every reflex vertex of . Note that the algorithm does this whether is inside or not. So, for every corresponding to every partially visible area , there is at least one secondorderconvexregion. This contradicts a of a guard to be a partial visible part of a secondorderconvexregion.
In the mentioned proof, we picked two arbitrary guards from , proving that they cannot see two or more secondorderconvexregions via simultaneous partial visibility. The fact that reflexvertices were connected to the intersection points of lines during the construction of secondorderconvexregions helped us in getting the proof. However, every two guards may see one secondorderconvexregion together. For every such two guards in , we may need an additional guard in to make the corresponding secondorderconvexregion areavisible. This extra guard is denoted by in Figure 7(a). So, in the worstcase corresponding to every two guards in , we might need three guards in . Thus, we are done with the proof.
∎
In fact, we proved that the way Algorithm 1 decomposed into secondorderconvexregions and guardingregions could make it so close to the real optimal solution.
5 List of Notations
To better present and convince of the reader, we list the frequent notations used throughout the paper.
= a secondorderconvexregion
= a guardingregion
rf = a reflexvertex
VP = visibility polygon of a point or a guard
Vp = visible part of a guard inside a secondorderconvexregion
VL = visiblelist of a guardingregion
= the set of all guardingregions after the decomposition of into guardingregions by beginning Step 4 of Algorithm 1
= the set of guards in the optimal solution of the point guarding problem
= the set of guards in the optimal solution that can be obtained from .
Comments
There are no comments yet.