Spanner for the Weighted Region Problem
Abstract
We consider the problem of computing an approximate weighted shortest path in a weighted planar subdivision, with weights assigned from the set . The subdivision includes zero-cost regions (0-regions) with weight and obstacles with weight , all embedded in a plane with weight . In a polygonal domain, where the 0-regions and obstacles are non-overlapping polygons (not necessarily convex) with in total vertices, we present an algorithm that computes a -approximate spanner of the input vertices in expected time111 notation ignores poly-logarithmic dependencies on and ., for . Using our spanner, we can compute a -approximate weighted shortest path between any two points (not necessarily vertices) in time. Furthermore, we prove that our results more generally apply to non-polygonal convex regions. Using this generalisation, one can approximate the weak partial Fréchet similarity [7] between two polygonal curves in expected time, where is the total number of vertices of the input curves.
Keywords and phrases:
weighted region problem, approximate shortest path, spannerFunding:
Joachim Gudmundsson: This research was partially funded by the Australian Government through the Australian Research Council (project number DP240101353).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Computational geometryEditors:
Pat Morin and Eunjin OhSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The Weighted Region Problem (WRP) is a generalization of the shortest path problem, considering a planar subdivision where each face has a non-negative weight associated with it. A path in can be partitioned into a set of subpaths based on its intersection with faces in , where a subpath starts at the point and ends at the point . Both and must lie on the boundary of the same face . The weight of the subpath is the Euclidean length of times the weight assigned to . The total weight of a path is the sum of the weights of its subpaths. The goal of the WRP is to find the weighted shortest path from a source point to a target point . When the weights are in the set , this problem is referred to as the Weighted Region Problem [15].
Researchers have conjectured that the WRP is difficult to solve [15], and recent studies confirm this conjecture – the Weighted Region Problem is unsolvable in the algebraic computation model over the rational numbers. De Carufel et al. [14] demonstrated that the WRP cannot be solved exactly even with only three different weights. De Berg et al. [12] confirmed its unsolvability with just two different weights. Mitchell and Papadimitriou [17] illustrated that in two dimensions, a weighted shortest path can intersect at least boundaries even when the regions are convex.
Due to the difficulty of solving the WRP exactly, approximation algorithms have been considered. A common approach is to discretize the problem space, either by assuming the space is a tessellation of convex polygons with exactly one associated weight [5], or by placing Steiner (sample) points on the boundaries of the regions [1, 2, 9, 16, 18]. In these approaches, the number of sample points depends not only on the complexity of the regions but also on geometric parameters such as the maximum integer coordinate of any vertex and the ratio of the maximum weight over the minimum weight. As increases, so does the number of required sample points. As a result, the weights are required to be strictly positive.
1.1 Related work
Our work is closely related to the data structure and algorithm by Gewali et al. [15] to solve the weighted region problem. Their algorithm takes a polygonal domain with vertices as input and constructs a critical graph (a type of visibility graph) with edges. Dijkstra’s shortest path algorithm can be used on to compute a weighted shortest path between any pair of vertices in time.
In weighted regions, a weighted shortest path avoids obstacles and traverses the 0-regions freely, while minimizing its length in the plane (-region). Consider two (closed) regions and , each either a 0-region or an obstacle. The key observation in [15] is that an edge in connecting and must be locally optimal (see Fact 16). For example, an edge connecting two convex 0-regions and must be perpendicular to the tangent touching and the tangent touching . Gewali et al. [15] showed that contains all such locally optimal edges in , which implies that must contain the optimal path between any pair of vertices in .
1.2 Our Contribution
In this paper, we build on the work by Gewali et al. [15] with a focus on the -regions as they are not handled well by existing approximation schemes (using sample points or tessellation). In Section 2, we consider the weighted region problem where the 0-regions are convex but not necessarily polygonal.
Problem 1.
In the planar subdivision induced by the plane with weight and a set of non-overlapping convex zero-cost regions (0-regions) with weight , given an approximation error , find a -approximate weighted shortest path from an arbitrary point to an arbitrary point .
The high-level idea is that, in order to obtain -approximate shortest paths, we place sample points on the boundary of each -region; the number of sample points is independent of other parameters. Using these sample points, we construct a -graph and trapezoidal maps, which are part of our data structure . The trapezoidal maps ensure the existence of good paths between -regions that are close222A precise definition is provided in Lemma 8 and 10, Section 2. to each other, while the -graph ensures the same for -regions that are far from each other. To the best of our knowledge, our algorithm is the first near-linear time -approximation algorithm that finds an approximated weighted shortest path in a weighted region. Note that both Theorem 1 and 3 apply to polygonal domains with non-convex regions, since they can be triangulated into a linear number of triangles.
Theorem 1.
Consider a planar subdivision induced by a plane with weight 1, containing a set of non-overlapping convex 0-regions with weight 0. Let and denote the total number of vertices in . For any approximation factor , a data structure can be constructed over in expected time, with a total size of . When queried with points and , can return a weighted path from to in time, satisfying , where is the optimal weighted shortest path from to .
To use our algorithm on an application, we prove the above theorem in a more general setting, where the 0-regions are non-polygonal. In Section 3, we use our algorithm to approximate the partial weak Fréchet similarity of two polygonal curves. This problem was first studied by Buchin et al. [7], and they presented a cubic time algorithm. De Carufel et al. [13] later transformed the problem into a weighted shortest path problem amidst -regions. Using Theorem 1, our algorithm is the first near-quadratic time -approximation algorithm for computing the partial weak Fréchet similarity between a pair of polygonal curves.
Buchin et al. [8] showed that there is no strongly subquadratic time algorithm for approximating the weak Fréchet distance within a factor less than 3 unless the strong exponential-time hypothesis fails. Approximating the partial weak Fréchet similarity is at least as hard as approximating the weak Fréchet distance. As a result, it is unlikely that a subquadratic time algorithm exists.
Theorem 2.
One can approximate the partial weak Fréchet similarity of two curves within a factor of in expected time.
In Section 4, we generalise our data structure to also allow convex obstacles that cannot be traversed, i.e., obstacles of weight . Let denote the weight of the weighted shortest path from to amidst -weighted region. By introducing additional sample points, we show that if we need to take a detour from a sample point to a sample point , there exists a set (a detour) of edges in such that the total length of approximates the distance within a factor of .
In the special case that the 0-regions and obstacles are polygonal, is a -spanner of the input vertices. To the best of our knowledge, our algorithm is the first near-linear time -approximation algorithm for the weighted shortest path in a weighted region.
Theorem 3.
Consider a planar subdivision induced by a plane with a weight of , consisting of two sets of convex and non-overlapping regions: 0-regions with a weight of , and obstacles with a weight of . Let and let denote be the total number of vertices in . For any approximation factor , a data structure can be constructed over in expected time, with a total size of . When queried with arbitrary points and , returns a path from to in time, ensuring that , where is the optimal weighted shortest path from to .
2 Shortest path amidst 0-regions
The exact version of Problem 1 has a brute-force algorithm, by computing the distance between every pair of 0-regions. To compute an approximate solution, the goal is to construct an undirected weighted graph , with a near-linear number of edges, such that there exists a path between two 0-regions in with , for a fixed parameter , where is the weighted shortest path.
To this end, we will use two data structures: trapezoidal maps and -graphs. Both data structures are used to determine which pairs of 0-regions are connected. The trapezoidal maps will ensure that there exist good paths between 0-regions that are close to each other, while the -graph ensures the same for -regions that are far from each other.
2.1 Construction of the data structure
In order to define our data structure, we first define a set of directions. Let be a fixed positive real number. Let be the direction with a counter-clockwise angle of with the positive -axis. Let be the ray originating from the point with a counter-clockwise angle of with the positive -axis. To simplify the discussion, we will assume that to guarantee that if exists, then so does .
For a 0-region , we define a set of sample points on the boundary of . Let be a sample point on the boundary of such that is extreme in the direction (see Figure 1). When the geometric region is clear from context, we write instead of .
Let define the subset of traversed from point to point in counter-clockwise order, where . We say a line overlaps if and intersect at more than one point. We say two regions, and , are non-overlapping if their interiors do not intersect.
A point can be an extreme point for more than one direction, in which case we call a vertex of . There may be more than one extreme point on for a single direction. If is the extreme point on for consecutive directions , we say , , …, and simultaneously. If there is more than one extreme point for a single direction , these extreme points must lie on some segment , and we say both and are . The sample points on the boundary of a convex region can be computed by traversing the boundary.
Observation 4.
Given convex regions with vertices in total, there are sample points, and it takes time to compute them.
Using the sample points on a 0-region , we can generate a simplified -region (a convex polygon) by connecting adjacent sample points of every 0-region (see Figure 1). Using the set of simplified 0-regions, we will generate a set of trapezoidal maps, and we say and are adjacent if they are both adjacent to the same face in a trapezoidal map. We construct the query data structure using Algorithm 1. We analyse in the full version. Let denote the Euclidean distance between two geometric objects and .
This algorithm takes as input a set of non-overlapping and convex 0-regions, and constructs a data structure . The undirected graph is initially empty.
-
1.
Compute the sample points , and add to .
-
2.
Pick an arbitrary sample point as the anchor for every . For each , add to , and set .
-
3.
For each direction , generate a trapezoidal map using , and do the following for each (see [11, Theorem 6.3 and 6.8] for trapezoidal map construction).
-
For each face adjacent to and , , add to , and set .
-
-
4.
With as the input, generate a -graph .
-
For each edge , if and do not belong to the same 0-region, add to , and set .
-
-
5.
Return as the data structure.
Lemma 5.
Given an approximation factor , and non-overlapping convex 0-regions with total complexity , one can build the data structure in time, and the total size of is .
2.2 Trapezoidal map
Before arguing that there exists a good path using the edges constructed, we start with an observation about the pair of points realising the shortest distance between two 0-regions. For a convex region and a point , there exists at least one supporting line going through such that lies entirely in one of the two halfplanes determined by [19]. Let , and . We can observe that if realises , then must be perpendicular to a pair of supporting lines and .
Observation 6.
Let and be two convex regions. Let be the line segment realising , where and . The segment must be perpendicular to a pair of supporting lines and .
We will show that if realises the distance between two 0-regions, we can transform into another segment such that is parallel to some direction , and approximates . To do this, we first need a fact (see the full version for a proof).
Lemma 7.
Given a segment , let (resp. ) be the acute angle between and (resp. ), where . Let be the intersection of and . We have that , and .
Let realise . We consider the scenario when is relatively small compared to the horizontal span of (say) . Using the above lemma, we will show that we have constructed a set of edges in connecting two sample points and , such that the total weight of these edges approximates .
Lemma 8.
Let realise , where and . Let , and , where points and (resp. and ) are adjacent sample points on 0-region (resp. ). If or , then there exists a path from to such that .
Proof.
Without loss of generality, assume that . Lemma 7 implies that there exists a point such that is in some direction , and . Because
Observe that cannot overlap any 0-region; otherwise, does not realise . If does not overlap any 0-region (see Figure 2, left), we fix the orientation of , and move along and along , until touches a sample point.
If touches (resp. ), then (resp. ) hits (resp. ). If touches a sample point , must be extreme in the direction . As a result, hits , and hits . In either case, and are adjacent in some face of , and the edge is in by construction. As a result, . This is also trivially true when or is already a sample point.
Otherwise, the segment overlaps a set of 0-regions, and there exists a path from to through (see Figure 2, right). Since the 0-regions do not overlap, the boundaries of the 0-regions in partition into a set of intra-region and inter-region segments. Let be one among the set of inter-region segments, where is on a 0-region , and is on a 0-region . Using the same argument as above, one can slide until it touches a sample point, and edge exists by construction.
In total, traveling from to via the 0-regions must be less costly than , since , and the intra-region segments have weight 0. Summing up the cost of , we have that
2.3 -Graph
In Step 4 of Algorithm 1, we constructed a -graph using the defined sample points. The vertices are simply all sample points. The edges in are constructed using the standard -graph construction [11]. Recall that in Algorithm 1, for every edge , with , , and , we add an edge to , and set .
The -graph constructs a set of “good” edges in when the distances between (resp. ) and its adjacent sample points are small compared to . In this case, we argue that there exists a pair of sample points and , such that . Similar to Lemma 7, we prove the following geometric property in the full version.
Lemma 9.
Given a segment , let (resp. ) be the acute angle between and (resp. ), where . Let be the intersection of and , and let be the intersection of and . Let be the intersection of and . We have that , and .
In the case that both and are close to their adjacent sample points, we prove that there exists a pair of sample points such that approximates in the full version.
Lemma 10.
Let realise , where and . Let , and , where points and (resp. and ) are adjacent sample points on (resp. ). If and , then .
2.4 The quality of the path
For now, assume that and lie in some 0-region. An optimal - path consists of a set of segments, where the endpoints of each segment lie on the boundaries of the 0-regions. A segment either lies within a 0-region or connects two different 0-region. Since it costs nothing to follow an edge inside a 0-region, the weight of is the total weight of those edges connecting different 0-regions.
Let realise the distance between 0-regions and , where lies on between sample points and , and lies on between sample points and . In Lemma 8, we have shown that if or , there exists a path from a sample point on to a sample point on of length at most .
In Lemma 10, we have shown that if and , there exist sample points and , such that . To obtain a path between and in this case, we rely on the -graph. The tightest bounds on the length of this path are due to Bose et al. [4], who showed that the spanning ratio of a -graph is at most . Our final approximation ratio is . Given an input approximation factor , we can compute a desired angle . The undirected graph is therefore a -spanner of the sample points. See the full version for details.
Lemma 11.
The graph contains a path from sample point to sample point such that , where is the optimal path from to .
Given a pair of query points and , we add and to . We treat both and as 0-regions with no interior to enable previous lemmas, yielding the theorem below. See the full version for details.
Theorem 1. [Restated, see original statement.]
Consider a planar subdivision induced by a plane with weight 1, containing a set of non-overlapping convex 0-regions with weight 0. Let and denote the total number of vertices in . For any approximation factor , a data structure can be constructed over in expected time, with a total size of . When queried with points and , can return a weighted path from to in time, satisfying , where is the optimal weighted shortest path from to .
3 Partial weak Fréchet similarity
This section highlights one application of our data structure: approximating the partial weak Fréchet similarity. The Fréchet distance is a popular measure of the similarity between two polygonal curves. An orientation-preserving reparameterisation is a continuous and bijective function such that , and . The between two curves and with respect to the reparameterisations and , is defined as follows.
Consider the scenario where a person is walking his dog with a leash connecting them: the person needs to stay on while walking according to , and the dog needs to stay on while walking according to . The maximum leash length is the width between and with respect to the reparameterisations and . The standard Fréchet distance is the minimum leash length required over all possible walks (defined by reparameterisations and ).
Problems relating to the Fréchet distance are commonly solved in a configuration space called the freespace diagram. The free space with respect to the Fréchet distance is the union of all pairs of points and such that the distance between and is at most . As opposed to the free space, we will call the forbidden space.
The freespace diagram is a data structure that stores the free space in cells. Alt and Godau [3] showed that the intersection of the free space with each cell is the intersection of an ellipse and a rectangle. Therefore the free space in each cell is convex, and its boundary is of constant complexity. For two polygonal curves with complexity , Alt and Godau [3] proved the following fact.
Fact 12.
The freespace diagram contains at most cells, and it can be constructed in time. The free space inside each cell is the intersection of an ellipse and a rectangle.
It is well-known that if one can find an -monotone path in from the bottom-left corner to the top-right corner via the free space, then .
The notion of weak Fréchet distance relaxes the requirement of the reparameterisation : it still needs to be continuous but not bijective. This means that the person and the dog can walk backward. To determine if the weak Fréchet distance is at most , we need to find only a (potentially not -monotone) path through the free space from to in . Buchin et al. [8] showed that there is no strongly subquadratic time algorithm for approximating the weak Fréchet distance within a factor less than 3 unless the strong exponential-time hypothesis fails.
Buchin et al. [7] proposed the partial Fréchet similarity (partial similarity in short) to deal with the Fréchet distance’s sensitivity to outliers. Instead of determining whether a leash of length is enough to complete the walk, partial similarity determines how much can be completed given a leash of length . The partial similarity is the total length of the portion of two curves that are matched under the Fréchet distance .
Let be the distance between point and point under the norm. Let be the norm of the vector . Under the metric, given the desired Fréchet distance , the partial similarity of curves and with respect to the reparameterisations and is formally defined as follows [7].
Naturally, we want to compute a pair of reparameterisations and that maximise the partial similarity. To do this, Buchin et al. [7] proposed a cubic time algorithm under . They showed that it is sufficient to find an -monotone and rectilinear path from to such that intersects as much free space as possible, where (resp. ) is the bottom-left (resp. top-right) corner of the freespace diagram.
Under the weak Fréchet distance, the monotonicity requirement is removed. But since a path can traverse back and forth in the freespace diagram, it is no longer meaningful for to intersect as much free space as possible. We instead are interested in computing a path that intersects as little forbidden space as possible to minimise the portions of the two curves that are not matched within distance . Therefore, solving the partial weak Fréchet distance problem under the metric is equivalent to finding a weighted rectilinear shortest path amidst a set of non-overlapping and convex -regions embedded in the plane (the forbidden space) with weight . By Fact 12, a -region is the free space within a cell, which has constant complexity.
Amidst the -regions and measured in metric, let denote the weight of the weighted shortest path from to , and let denote the weight of the weighted path computed by Theorem 1. Since , we have
which leads to the following theorem.
Theorem 2. [Restated, see original statement.]
One can approximate the partial weak Fréchet similarity of two curves within a factor of in expected time.
4 Shortest path amidst 0-regions and obstacles
In this section, we generalise our data structure from Section 2 to allow convex obstacles that cannot be traversed, i.e., obstacles with weight . Our problem is finding an approximate shortest path amidst 0-regions and obstacles. More concretely, we consider the following problem.
Problem 2.
In the planar-subdivision induced by the plane with weight , and a set of non-overlapping convex regions consisting of obstacles with weight , and -regions with weight , given an approximation error , find a -approximate weighted shortest path from point to point .
In this section, let denote the minimum distance between two geometric regions and in a weighted setting. The -graph can be constructed in an environment with obstacles. Clarkson [10] described such construction over points and polygonal obstacles, and proved that a path that -approximates exists in the -graph, where and are vertices. We will use this -graph in the rest of the paper.
Like in the previous section, we will first describe the construction of the data structure and analyse the time and space complexity. We then show that contains a good path between every pair of sample points. We use this to argue the approximation ratio for arbitrary and .
4.1 Construction of the data structure
In order to deal with obstacles, we need to define two new types of sample points. For clarity, we refer to the sample points defined previously as the original sample points. In Section 2, a trapezoidal map was only used to determine if two 0-regions should be connected, and we did not explicitly compute the intersection of a vertical segment and the boundary of a region. With the introduction of obstacles, we do need such intersections. Consider a sample point . When constructing , we shoot two vertical rays from , one upwards and one downwards. Let be the first intersection of with the boundary of some region that is not . We call a propagated sample point.
The other type of sample points we need is the tangent sample points. Given two disjoint obstacles and , and a common tangent , if touches at point and at , we add and as tangent sample points. When we say a point is a sample point, can be any type of sample point.
Recall that is the simplified region by connecting every pair of adjacent sample points of . is the set of simplified 0-regions, and is the set of simplified obstacles. We formally define the construction of our data structure. Given a set of convex obstacles and a set of convex -regions, we build our data structure using Algorithm 2. See the full version for the analysis.
This algorithm takes as input a set of non-overlapping and convex regions, including 0-regions and obstacles , and constructs a data structure . The undirected graph is initially empty.
-
1)
Compute the original sample points , and add them to .
-
2)
For each direction , generate a trapezoidal map using .
-
3)
For every , do the following for every face adjacent to and , .
-
(a)
Compute the propagated sample points, and add them to .
-
(b)
If and are both 0-regions, add to , and set .
-
(c)
If at least one of and is an obstacle, let and be the vertical segments defining , where , and . Add edges and to . Set and .
-
(d)
If and are both obstacles, we compute their common tangents. For each common tangent that touches at and at , add and to .
-
(a)
-
4)
Redefine as the polygon generated by connecting adjacent sample points of , original, propagated, and tangent sample points included. With and as the input, generate a -graph .
-
For each edge , if and belongs to different regions and , add to and set .
-
-
5)
For every pair of adjacent sample points on an obstacle, add to edges, and set .
-
6)
Pick an arbitrary sample point as the anchor for every . For each sample point of a -region , add to , and set .
-
7)
Return as the data structure.
Lemma 13.
Given an approximation error , and non-overlapping convex regions including -regions and obstacles with total complexity , one can build the data structure in expected time, and the total size of is .
The structure of the rest of the section is as follows. By Lemma 14, the distance between two adjacent sample points on the boundary of an obstacle approximates the straight line segment. Therefore, we show that we can “snap” the vertices of an optimal path to our sample points. For every segment , we then argue that either the trapezoidal map or the -graph contains a path approximating to within a factor of .
4.2 Walking on the boundary is not expensive
We first argue that if and are adjacent sample points of , then approximates within a factor of . Therefore, if we find a path amidst the simplified obstacles, we only need to pay a small factor to transform into a path amidst the original obstacles. Then, we prove that if is part of the optimal path, we can replace with a path , such that approximates . See the full version for a formal proof.
Lemma 14.
Let and be adjacent sample points on , where appear after in a counter-clockwise walk. We have that .
The above lemma implies the following. Let be the distance between point and point amidst simplified obstacles and simplified 0-regions, and let be the path achieving this distance. If we partition using the sample points, in the worst case, each segment connects adjacent sample points on obstacles. This implies the following corollary.
Corollary 15.
Let and be two adjacent sample points. We have that .
4.3 Snapping a segment of the optimal path to the sample points
Gewali et al. [15] defined three types of locally optimal edges joining two simple polygonal regions, and they proved that the shortest path from to must be comprised of these locally optimal edges [15, Lemma 2.5] (ignoring edges in 0-regions). For convex obstacles and 0-regions, we need to consider only four types of segments.
Fact 16.
If segment is in the optimal weighted path amidst convex and non-overlapping 0-regions and obstacles, there must exists two supporting lines and such that belong to one of the following cases (ignoring segments in 0-regions).
-
1)
connects two 0-regions such that and .
-
2)
connects the point on a 0-region and the point on an obstacle such that , and .
-
3)
lies on one of the common tangent of two different obstacles.
-
4)
and are two points on the same obstacle, and or .
In Section 4.3.1, 4.3.2, and 4.3.3, we handle each type of edge in Case 1, 2, and 3, respectively. For an edge in each of these cases, we argue that there exists a good path in that approximates . Section 4.4 summarises the approximation ratio using the Case 4 edges. In the following lemmas, we assume without loss of generality that lies between the direction and , and (resp. ) is the measure of the acute angle between (resp. ) and . By Corollary 15, we consider only simplified obstacles. We delegate the full proofs to the appendix.
4.3.1 Case 1: connects two -regions
We observe that, unfortunately, Lemma 8 does not trivially apply. When we rotate to , if overlaps obstacles, a path generated using the skewed set of obstacles can be much longer than , since the path would have to take a detour around the obstacles. The following lemmas resolve this issue. See the full version for full proofs of the lemmas below.
Lemma 17.
Let and be two -regions. Let , where , and . If , where is a sample point adjacent to , then there exists a sample point such that .
Lemma 18.
Let and be two -regions. Let , where , and . If and , where (resp. ) is a sample point adjacent to (resp. ), then .
We combine Lemma 17 and Lemma 18 to obtain a bound on the path length where and both lie on -regions. Note that when two points and lie on the boundary of the same 0-region, .
Lemma 19.
Let and be two convex 0-regions. Let , where and . There exists a pair of sample points and , such that .
4.3.2 Case 2: connects two obstacles
Using Fact 16, we know that if connects two obstacles, then must lie on a common tangent of and . When two obstacles are close, (and ) may be very far from its adjacent original sample points. Hence, we need the tangent sample points when two obstacles are close (connected via a trapezoidal map). We now show that if and lie on obstacles, an approximate path in exists. See the full version for a full proof of the lemma below.
Lemma 20.
Let and be two convex obstacles. Let , where and . There exists a pair of sample points and , such that .
4.3.3 Case 3: connects a 0-region and an obstacle
In this section, we prove that if connects an obstacle and a -region , there is a path that approximate . See the full version for a full proof of the lemma below.
Lemma 21.
Let be a convex obstacle and let be a convex -region. Let , where and . There exists a pair of sample points and , such that .
4.4 The quality of the path
In Lemma 19, 20, and 21, we have shown that for every segment in Case 1-3 in Fact 16, either there exists a path such that approximates , or there exist two sample points and such that approximates . Taking the maximum ratio in the three lemmas, we have the following.
For a Case 4 segment , where both and lies on the obstacle , assume without loss of generality that occurs before in , and let .
If contains no sample point, then assume that the optimal path uses segment to reach , and to leave . We argue that there exists an approximate path that approximates . Let (resp. ) be the closest sample point to (resp. ), such that . In Lemma 19, 20, and 21, we have payed for a path from to though and a path from to through . Since there is no sample point on , instead of going from to and to , we take the path directly. The unused cost of and pays for .
Let (resp. ) be the orthogonal projection of (resp. ) on . Clearly, and . By Lemma 14, . Therefore, we connect and using to generate a path , and we have that
If contains at least one sample point , then by Lemma 14, we have that
Bose and van Renssen [6] showed that in an environment with polygonal obstacles, the -graph described by Clarkson [10] has a spanning ratio of at most . We also need to apply the factor to traverse the boundaries of convex obstacles to account for the difference compared to the boundaries of simplified obstacles, as in Lemma 14. For a desired approximation factor , we can compute a , and thus contains a -spanner of the sample points.
Lemma 22.
In , there exists a path between any pair of sample points such that .
Given a pair of query points and , we add and to . We treat both and as obstacles with no interior to enable previous lemmas, yielding the theorem below. See the full version for details.
Theorem 3. [Restated, see original statement.]
Consider a planar subdivision induced by a plane with a weight of , consisting of two sets of convex and non-overlapping regions: 0-regions with a weight of , and obstacles with a weight of . Let and let denote be the total number of vertices in . For any approximation factor , a data structure can be constructed over in expected time, with a total size of . When queried with arbitrary points and , returns a path from to in time, ensuring that , where is the optimal weighted shortest path from to .
References
- [1] Lyudmil Aleksandrov, Anil Maheshwari, and Jörg-Rüdiger Sack. Approximation algorithms for geometric shortest path problems. In Proceedings of the Thirty-second Annual ACM Symposium on Theory of Computing, pages 286–295, New York, NY, USA, May 2000. Association for Computing Machinery. doi:10.1145/335305.335339.
- [2] Lyudmil Aleksandrov, Anil Maheshwari, and Jörg-Rüdiger Sack. Determining approximate shortest paths on weighted polyhedral surfaces. Journal of the ACM, 52(1):25–53, January 2005. doi:10.1145/1044731.1044733.
- [3] Helmut Alt and Michael Godau. Computing the Fréchet distance between two polygonal curves. International Journal of Computational Geometry & Applications, 05:75–91, March 1995. doi:10.1142/S0218195995000064.
- [4] Prosenjit Bose, Jean-Lou de Carufel, Pat Morin, André van Renssen, and Sander Verdonschot. Towards tight bounds on theta-graphs: more is not always better. Theoretical Computer Science, 616:70–93, February 2016. doi:10.1016/j.tcs.2015.12.017.
- [5] Prosenjit Bose, Guillermo Esteban, David Orden, and Rodrigo I. Silveira. On approximating shortest paths in weighted triangular tessellations. Artificial Intelligence, 318:103898, May 2023. doi:10.1016/j.artint.2023.103898.
- [6] Prosenjit Bose and André van Renssen. Spanning properties of Yao and theta-graphs in the presence of constraints. International Journal of Computational Geometry & Applications, 29(02):95–120, June 2019. doi:10.1142/S021819591950002X.
- [7] Kevin Buchin, Maike Buchin, and Yusu Wang. Exact algorithms for partial curve matching via the Fréchet distance. In Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 645–654, USA, January 2009. Society for Industrial and Applied Mathematics. doi:10.1137/1.9781611973068.71.
- [8] Kevin Buchin, Tim Ophelders, and Bettina Speckmann. SETH says: weak Fréchet distance is faster, but only if it is continuous and in one dimension. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 2887–2901, USA, January 2019. Society for Industrial and Applied Mathematics. doi:10.1137/1.9781611975482.179.
- [9] Siu-Wing Cheng, Jiongxin Jin, and Antoine Vigneron. Triangulation Refinement and Approximate Shortest Paths in Weighted Regions. In Proceedings of the 2015 Annual ACM-SIAM Symposium on Discrete Algorithms, Proceedings, pages 1626–1640. Society for Industrial and Applied Mathematics, December 2014. doi:10.1137/1.9781611973730.108.
- [10] Kenneth L. Clarkson. Approximation algorithms for shortest path motion planning. In Proceedings of the nineteenth annual ACM Symposium on Theory of Computing, pages 56–65, New York, NY, USA, January 1987. Association for Computing Machinery. doi:10.1145/28395.28402.
- [11] Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer, Berlin, Heidelberg, 2008. doi:10.1007/978-3-540-77974-2.
- [12] Sarita de Berg, Guillermo Esteban, Rodrigo I. Silveira, and Frank Staals. Exact solutions to the Weighted Region Problem, February 2024. arXiv:2402.12028 [cs]. doi:10.48550/arXiv.2402.12028.
- [13] Jean-Lou de Carufel, Amin Gheibi, Anil Maheshwari, Jörg-Rüdiger Sack, and Christian Scheffer. Similarity of polygonal curves in the presence of outliers. Computational Geometry, 47(5):625–641, July 2014. doi:10.1016/j.comgeo.2014.01.002.
- [14] Jean-Lou de Carufel, Carsten Grimm, Anil Maheshwari, Megan Owen, and Michiel Smid. A note on the unsolvability of the weighted region shortest path problem. Computational Geometry, 47(7):724–727, August 2014. doi:10.1016/j.comgeo.2014.02.004.
- [15] Laxmi P. Gewali, Alex C. Meng, Joseph S. B. Mitchell, and Simeon Ntafos. Path planning in 0/1/ weighted regions with applications. In Proceedings of the Fourth Annual Symposium on Computational Geometry, pages 266–278, New York, NY, USA, January 1988. Association for Computing Machinery. doi:10.1145/73393.73421.
- [16] Mark Lanthier, Anil Maheshwari, and Jörg-Rüdiger Sack. Approximating weighted shortest paths on polyhedral surfaces. In Proceedings of the Thirteenth Annual Symposium on Computational Geometry, pages 274–283, New York, NY, USA, August 1997. Association for Computing Machinery. doi:10.1145/262839.262984.
- [17] Joseph S. B. Mitchell and Christos H. Papadimitriou. The weighted region problem: finding shortest paths through a weighted planar subdivision. Journal of the ACM, 38(1):18–73, January 1991. doi:10.1145/102782.102784.
- [18] Zheng Sun and John H. Reif. On finding approximate optimal paths in weighted regions. Journal of Algorithms, 58(1):1–32, January 2006. doi:10.1016/j.jalgor.2004.07.004.
- [19] Victor Andreevich Toponogov. Differential Geometry of Curves and Surfaces: A Concise Guide. Birkhauser, 2006.
