An Improved Approximation Algorithm for Computing Geometric ...

1 downloads 0 Views 193KB Size Report
Abstract. Consider a polyhedral surface consisting of n triangular faces where each face has an associated positive weight. The cost of travel through each face ...
An Improved Approximation Algorithm for Computing Geometric Shortest Paths org-R¨ udiger Sack2 Lyudmil Aleksandrov1 , Anil Maheshwari2 , and J¨ 1

Bulgarian Academy of Sciences, CICT, Acad. G. Bonchev Str. Bl. 25-A, 1113 Sofia, Bulgaria 2 School of Computer Science, Carleton University, Ottawa, Ontario K1S5B6, Canada

Abstract. Consider a polyhedral surface consisting of n triangular faces where each face has an associated positive weight. The cost of travel through each face is the Euclidean distance traveled multiplied by the weight of the face. We present an approximation algorithm for computing a path such that the ratio of the cost of the computed path with respect to the cost of a shortest path is bounded by (1 + ε), for a given 0 < ε < 1. The algorithm is based on a novel way of discretizing the polyhedral surface. We employ a generic greedy approach for solving shortest path problems in geometric graphs produced by such discretization. We improve upon existing approximation algorithms for computing shortest paths on polyhedral surfaces [1,4,5,10,12,15].

1

Introduction

Shortest path problems are among the fundamental problems studied in computational geometry and graph algorithms. These problems arise naturally in application areas such as motion planning, navigation and geographical information systems. Aside from the importance of shortest paths problems in their own right, often they appear in the solutions of other problems. Existing algorithms for many shortest path problems, are quite complex in design and implementation or have very large time and space complexities. Hence they are unappealing to practitioners and pose a challenge to theoreticians. This coupled with the fact that geographic and spatial models are approximations of reality and high-quality paths are favored over optimal paths that are “hard” to compute, approximation algorithms are suitable and necessary. In this paper we present algorithms for computing approximate shortest paths on (weighted) polyhedral surfaces. Our solutions employ the paradigm of partitioning a continuous geometric search space into a discrete combinatorial search space. Discretization methods are natural, theoretically interesting, and enable implementation. They transform geometric shortest path problems into combinatorial shortest path problems in graphs. Shortest path problems in graphs are well studied and general solutions with implementations are readily 

Research supported in part by NSERC

A. Lingas and B.J. Nilsson (Eds.): FCT 2003, LNCS 2751, pp. 246–257, 2003. c Springer-Verlag Berlin Heidelberg 2003 

An Improved Approximation Algorithm

247

available. We consider surfaces that are polyhedral 2-manifolds, whereas most of the previous algorithms were designed to handle particular geometric instances, such as convex polyhedra, or possibly non-convex hole-free polyhedra, etc. Also, we allow arbitrary (positive) weights to be assigned to the faces of the domain thus generalizing from uniform and obstacle avoidance scenarios. While shortest paths graph algorithms are available and applicable to the graphs generated here, the geometric structure of shortest path problems can be exploited for the design of more efficient algorithms. Brief Literature Review: Shortest path problems can be categorized by various factors which include the dimensionality of the space, the type and the number of objects or obstacles, and the distance measure used. We discuss those contributions which relate directly to this paper. The following table summarizes the results for shortest path problems on polyhedral surfaces. We need a few preliminaries in order to comprehend the table. Let P be a polyhedral surface in 3-dimensional Euclidean space consisting of n triangular faces. A path π  is an 1+ approximation of a shortest path π between two vertices of P if ||π  || ≤ (1+ )||π||, where ||π|| denotes the length of π and  > 0. A natural generalization of the Euclidean shortest path problems are shortest path problems set in weighted surfaces. In this problem a triangulated polyhedral surface is given consisting of n faces, where each face has a positive weight representing the cost of traveling through that face. The cost of a path is defined to be the sum of Euclidean lengths multiplied by the face weights of the sub-paths within each face traversed. (Results on weighted shortest paths involve geometric parameters and they have been omitted for the sake of clarity.) Surface Cost Metric Approx. Ratio Time Complexity Reference Convex Euclidean Exact O(n3 log n) [14] Non-convex Euclidean Exact O(n2 log n) [11] Non-convex Euclidean Exact O(n2 ) [7] 2 Non-convex Euclidean Exact O(n log n) [9] Convex Euclidean 2 O(n) [8] Convex Euclidean 1 +  O(n log 1 + 1/3 ) [3] √ Convex Euclidean 1 +  O(n/  + 1/4 ) [2] 5/3 5/3 Non-convex Euclidean 7(1 + ) O(n log n) [1] Non-convex Euclidean 15(1 + ) O(n8/5 log8/5 n) [1] n 8 Non-convex Weighted (1 + ) O(n log  ) [12] Non-convex Weighted Additive O(n3 log n) [10] Non-convex Weighted (1 + ) O( n2 log n log 1 ) [4] Non-convex Weighted (1 + ) O( n log 1 ( √1 + log n)) [5] Non-convex Weighted (1 + ) O( n log n log 1 ) [15] Non-convex Weighted (1 + ) O( √nε log nε log 1ε ) This paper From practical point of view the “exact” algorithms are unappealing, since they are fairly complex, numerically unstable and may require exponential number

248

L. Aleksandrov, A. Maheshwari, and J.-R. Sack

of bits to perform the computation associated to “unfolding” of faces. These drawbacks have motivated researchers to look into practical approximation algorithms. Approximation algorithms of [8,2,10,15,5,4] have been implemented. New Results - Overview and Significance: Results of this paper are 1. We provide a new discretization of polyhedral surfaces. For a given approximation parameter ε ∈ (0, 1), the size of the discretization for a polyhedral surface consisting of n triangular faces is O( √nε log 1ε ). We precisely evaluate the constants hidden in the big-O notation. (Section 2) 2. We define approximation graphs with nodes corresponding to the Steiner points of the discretization. We show that the distance between any pair of nodes in the approximation graph is within a factor of (1 + ε) times the cost of a shortest path in the corresponding surface. (Section 3) 3. We describe a greedy approach for solving the single source shortest path (SSSP) problem in the approximation graph and obtain an O( √nε log nε log 1ε ) time (1 + ε)-approximation algorithm for SSSP problem on a polyhedral surface. (Section 4) Our scheme places Steiner points, for the first time, in the interior of the faces and not on the face boundaries. While this is somewhat counter-intuitive, we can show that the desired approximation properties can still be proven, but now using a much sparser mesh. (In addition this leads to algorithmic simplifications by avoiding the construction of “cones” used in [5].) The size of the discretization is smaller than those previously established and the improvement is by a factor √ of ε. A greedy approach for computing SSSP in the approximation graph has been proposed in [15]. Edges in our approximation graphs do not correspond to line segments as required in their algorithm, as well as their approach does not seem to generalize to 3-dimensions. We propose an alternative greedy algorithm, which is applicable here as well as generalizes to 3-dimensions. Geographical information systems are an immediate application domain for shortest path problems on polyhedral surfaces and terrains. In such applications, the number of faces, n, may be huge (several million). Storage and time complexities are functions on n and constants are critical. In terms of computational complexity our algorithm improves upon previous approximation algorithms for solving shortest path problems on polyhedral surfaces [1,4,5,10,12,15]. The running time of √ our algorithm improves upon the most recent algorithm of [15] by a factor of ε. Ignoring the geometric parameters, the original algorithm of [12] has been improved by about 1/n7 . The algorithm of [12] uses O(n4 ) space. This was improved substantially in [5,15]. The discretization presented here improves further on the storage requirement by reducing the number of Steiner points by √ ε over [5,15]. The practicality of discretization for solving geodesic shortest path problems has been demonstrated in [10,15,16]. From a theoretical viewpoint the discretization scheme proposed here is more complex and requires very careful analysis, its implementation would however be similar to our previous ε-schemes [4,5]. These have been implemented and experimentally verified in [16]. More precisely, the

An Improved Approximation Algorithm

249

algorithm presented here does not require any complex data structures (just linked lists, binary search trees, and priority queues). Existing software libraries for computing shortest paths in graphs (Dijkstra’s algorithm) can be used. We provide explicit calculation of key constants often hidden through the use of the big − O-notation. The constant in the estimate on the total number of Steiner points (Lemma 1) is 12Γ log L, where Γ is the average of the reciprocals of the sinuses of the angles of the faces of P . For example, if no face of P has angles smaller than 10◦ , then Γ ≤ 5. Moreover the simplicity of our algorithm, coupled with the fact that we obtain theoretically guaranteed approximation factors, should make it a very promising candidate for the application domain. It is important to note that the edges and Steiner points of the discretization can be produced on-the-fly. When Dijkstra’s algorithm requests edges incident to the current vertex all incident edges (connecting Steiner points) are generated.

2

Preliminaries and Discretization

Let P be a triangulated polyhedral surface in the 3-dimensional Euclidean space. P can be any polyhedral 2-manifold. We do not assume any additional geometrical or topological properties such as convexity, being a terrain, or absence of holes, etc. Assume that P consists of n triangular faces denoted by t1 , . . . , tn . Positive weights w1 , . . . , wn are associated with triangles t1 , . . . , tn representing the cost of traveling inside them. The cost of traveling along an edge is the minimum of the weights of the triangles incident to that edge. Edges are assumed to be part of the triangle, from which they inherit their weight. Any continuous (rectifiable) n curve lying in P is called a path. The cost of a path π is defined by π = i=1 wi |πi |, where |πi | denotes the Euclidean length of the intersection of π with triangle ti , i.e., πi = π ∩ ti . Given two distinct points u and v in P a minimum cost path π(u, v) joining u and v is called a geodesic path. Without loss of generality we may assume that u and v lie on a boundary of a face. In this setting, it is well known that geodesic paths are simple (non self-intersecting) and consist of a sequence of segments, whose endpoints are on the edges of P . The intersection of a geodesic path with the interior of faces or edges is a set of disjoint segments. More precisely, each segment on a geodesic path is of one of the following two types: 1) face-crossing – a segment which crosses a face joining two points on its boundary; 2) edge-using – a sub-segment of an edge. We define linear paths to be simple paths consisting of face-crossing and edge-using segments exclusively. Thus, any geodesic path is a linear path. A linear path π(u, v) is represented as a sequence of its segments {s1 , . . . , sl } or equivalently as a sequence of points a0 , . . . , al+1 lying on the edges, that are endpoints of these segments, i.e., si = (ai−1 , ai ), u = a0 , and v = al+1 . Points ai that are not vertices of P are called bending points of the path. Geodesic paths satisfy Snell’s law of refraction at each of their bending points (see [12] for details). In the following we introduce a function d(x) defined as the minimum Euclidean distance from a point x ∈ P to the edges around x. The distance d(x) is

250

L. Aleksandrov, A. Maheshwari, and J.-R. Sack

a lower bound on the length of a face-crossing segment incident to x and plays essential role in our constructions. Definition 1. Given a point x ∈ P let E(x) be the set of edges of triangles incident to x minus the edges incident to x. The distance d(x) is defined as the minimum Euclidean distance from x to the edges in E(x). Throughout the paper ε is a real number in (0, 1). Next, we define a set of points on P , called Steiner points, that together with vertices of P constitute an (1+ε)approximation mesh for the set of linear paths on P . That is, we define a graph Gε whose set of nodes consists of the vertices of P and the Steiner points. The edges of Gε correspond to local shortest paths between their endpoints and have cost equal to the cost of their corresponding path. Then we show how the graph Gε can be used to approximate geodesic paths between vertices of P . Using Definition 1 above, for each vertex v of P we define a weighted radius r(v) =

wmin (v) d(v), 7wmax (v)

(1)

where wmax (v) and wmin (v) are the maximum and the minimum weights of the faces incident to v. By using the weighted radius r(v) for each face incident to v we define a “small” isosceles triangle with two sides of length εr(v) incident to v. These triangles around v form a star shaped polygon S(v), which we call a vertex-vicinity of v. In all previous approximation schemes Steiner points have been placed on the edges of P . Here we place Steiner points inside faces of √ P . In this way we reduce the total number of Steiner points by a factor of ε. We will need to show that the (1 + ε)-approximation property of the resulting mesh is preserved. Let triangle t be a face of P . Steiner points inside t are placed along the three bisectors of t as follows. Let v be a vertex of t and  be the bisector of the angle α of t at v. We define a set of Steiner points p1 , . . . , pk on  by  |pi−1 pi | = sin(α/2) ε/2|vpi−1 |, i = 1, . . . , k, (2) where p0 is the point on  and on the boundary of the vertex vicinity S(v) (Figure 1). The next lemma establishes estimates on the number of Steiner points inserted on a particular bisector and on their total number. Lemma 1. (a) The number of Steiner points inserted in a bisector  of an angle α at a vertex v is bounded by C() √1ε log2 2ε , where the constant C() < 4 sin α

log2

|| r(v) cos(α/2) .

(b) The total number of Steiner points on P is less than n 2 C(P ) √ log2 , ε ε

(3)

where C(P ) < 12Γ log L and L is the maximum of the ratios |(v)|/r(v) cos(α/2) andΓ is the average of the reciprocals of the sinuses of angles on P , i.e. Γ = 3n 1 1 i=1 sin αi . 3n

An Improved Approximation Algorithm

251

Proof: We estimate the number of Steiner points on a bisector  of an angle α at  a vertex v. From (2) it follows, that |vpi | = λi εr(v) cos(α/2), where λ = (1 + ε/2 sin(α/2)). Therefore the number of the Steiner points on  is k ≤ logλ

|| || ln 2r(v) cos(α/2) + ln 2ε 4 log2 r(v) cos(α/2) || 2 √  = log2 . ≤ εr(v) cos(α/2) ε sin α ε ln(1 + ε/2 sin(α/2))

This proves (a). Estimate (b) is obtained by summing up (a) over all bisectors on P .  

Fig. 1. (Left) Steiner points inserted in a bisector  are shown.  (Right) Proof of Lemma 2 is illustrated: Sinuses of angles ∠pi x1 pi+1 and ∠pi x2 pi+1 ≤ ε/2, implying |x1 pi | + |pi x2 | ≤ (1 + ε/2)|x1 x2 |.

The set of Steiner points partitions bisectors into intervals, that we call Steiner intervals. The following lemma establishes two important properties of Steiner intervals (Figure 1). Lemma 2. (a) Let  be the bisector of the angle formed by edges e1 and e2 of P . If (pi , pi+1 ) is a Steiner interval on  and x is a point on e1 or e2 , then  sin(∠pi xpi+1 ) ≤ ε/2. (4) (b) Let x1 and x2 be points on e1 and e2 and outside the vertex vicinity of the vertex incident to e1 and e2 . If p is the Steiner point closest to the intersection between the segment (x1 , x2 ) and , then |x1 p| + |px2 | ≤ (1 + ε/2)|x1 x2 |.

(5)

Proof: The statement (a) follows easily from the definition of Steiner points. Here we prove (b). Let us denote by θ, θ1 , and θ2 the angles of the triangle px1 x2 at p, x1 and x2 respectively. From (a) and ε ≤ 1 it follows 1 /2) sin(θ2 /2) that θ ≥ π/2 and we have |x1 p| + |px2 | = (1 + 2 sin(θsin(θ/2) )|x1 x2 | = (1 +

sin(θ1 ) sin(θ2 ) 2 sin(θ/2) cos(θ1 /2) cos(θ2 /2) )|x1 x2 |

3

Discrete Paths

≤ (1 +

ε )|x1 x2 | 4 sin2 (θ/2)

≤ (1 + ε/2)|x1 x2 |. 

Next, we define a graph Gε = (V (Gε ), E(Gε )). The set of nodes V (Gε ) consists of the set of vertices of P and the set of Steiner points. The set of edges E(Gε ) is

252

L. Aleksandrov, A. Maheshwari, and J.-R. Sack

defined as follows. A node that is a vertex of P is connected to all Steiner points on bisectors in the faces incident to this vertex. The cost of these edges equals the cost of the shortest path between its endpoints restricted to lie inside the triangle containing them. These shortest paths consist either of a single segment joining the vertex and the corresponding Steiner point or of two segments the first of which follows one of the edges incident to the vertex. The rest of the edges of Gε join pairs of Steiner points lying on neighboring bisectors as follows. Let e be an edge of P . In general, there are four bisectors incident to e. We define graph edges between pairs of nodes (Steiner points) on these four bisectors. We refer to all these edges as edges of Gε crossing the edge e of P . Let (p, q) be an edge between Steiner points p and q crossing e. The cost of (p, q) is defined as the cost of the shortest path between p and q restricted to lie inside the quadrilateral formed by the two triangles around e, that is pq = minx,y∈e px+xy+yq. (Note that we do not need edges in Gε between pairs of Steiner points for which the local shortest paths do not intersect e.) Paths in Gε are called discrete paths. The cost of a discrete path π is the sum of the costs of its edges and is denoted by π. Note that if we replace each of the edges in a discrete path with the corresponding segments (at most three) forming the shortest path used to compute its cost we obtain a path on P of the same cost. Theorem 1. Let π ˜ (v0 , v) be a linear path joining two different vertices v0 and π . v on P . There exists a discrete path π(v0 , v), such that π ≤ (1 + ε)˜ Proof: First, we discuss the structure of linear paths. Following from the definition, a linear path π ˜ (v0 , v) consists of face-crossing and edge-using segments and is determined by the sequence of their endpoints, called bending points, which are located on the edges of P . Following the path from v0 and on, let a0 be the last bending point on π ˜ that is inside the vertex vicinity S(v0 ). Next, let b1 be the first bending point after a0 that is in a vertex vicinity, say S(v1 ), and let a1 be the last bending point in S(v1 ). Continuing in this way, we define a sequence of vertices of v0 , v1 , . . . , vl = v and a sequence of bending points a0 , b1 , a1 , . . . , al−1 , bl on π ˜ , such that for i = 0, . . . , l, points bi , ai are in S(vi ) (we assume b0 = v0 , al = v). Furthermore, portions of π ˜ between ai and bi do not intersect vertex vicinities. Thereby, the path π ˜ is partitioned into portions π ˜ (v0 , a0 ), π ˜ (a0 , b1 ), π ˜ (b1 , a1 ), . . . , π ˜ (bl , v).

(6)

Portions π ˜ (ai , bi+1 ) for i = 0, . . . , l−1 are called between vertex vicinities portions and portions π ˜ (bi , ai ) for i = 0, . . . , l (b0 = v0 ), are called vertex vicinities portions. Consider a between vertex vicinity portion π ˜ (ai , bi+1 ) for some 0 ≤ i < l. We define π ˜  (vi , vi+1 ) to be the linear path from vi to vi+1 along the sequence of inner bending points of π ˜ (ai , bi+1 ). Using triangle inequality and the definition of vertex vicinities (1) we obtain ˜ π  (vi , vi+1 ) ≤ ˜ π (ai , bi+1 ) + vi ai  + bi+1 vi+1  ≤ ε ˜ π (ai , bi+1 ) + (wmin (vi )d(vi ) + wmin (vi+1 )d(vi+1 )). (7) 7

An Improved Approximation Algorithm

253

Changing all between vertex vicinities portions in this way we obtain a linear path π ˜  (v0 , v) = {˜ π  (v0 , v1 ), π ˜  (v1 , v2 ), . . . , π ˜  (vl−1 , v)}, consisting of between vertex vicinities portions only. Next, we approximate each of these portions by a discrete path. Consider a portion π ˜i = π ˜  (vi , vi+1 ) for some 0 ≤ i < l and let sj = (xj−1 , xj ), j = 1, . . . , ν be the segments forming this portion (x0 = vi , xν = vi+1 ). Segments sj are facecrossing and edge-using segments. Indeed, there are no consecutive edge-using segments. Let sj be a face-crossing segment. Then sj intersects the bisector j of the angle formed by the edges of P containing the end-points of sj . We define pj to be the closest Steiner point to the intersection between sj and j . Now we replace each of the face-crossing segments sj of π ˜i by two segments  ˜i . From (5) it follows that path xj−1 , pj , xj and denote the obtained path by π ˜ πi  ≤ (1 + ε/2)˜ πi . The sequence of bending points of π ˜i contains as a subsequence the Steiner points pj1 , . . . , pjν1 , (ν1 ≤ ν) corresponding to the facecrossing segments of π ˜i . Note that pairs (vi , pi1 ) and (piν1 , vi+1 ) are adjacent in Gε . Furthermore, between any two consecutive Steiner points pjµ , pjµ+1 there is at most one edge-using segment and, according our definition of the graph Gε , they are connected in Gε . The cost of each edge (pjµ , pjµ+1 ) is at most the cost of the portions of π ˜i from pjµ to pjµ+1 . Therefore, the sequence of nodes {vi , pj1 , . . . , pjν1 , vi+1 } defines a discrete path π(vi , vi+1 ) such that πi  ≤ (1 + ε/2)˜ π  (vi , vi+1 ). π(vi , vi+1 ) ≤ ˜

(8)

We combine discrete paths π(v0 , v1 ), . . . , π(vl−1 , v) and obtain a discrete path π(v0 , v) from v0 to v. We complete the proof by estimating the cost of this path. We denote wmin (vi )d(vi ) + wmin (vi+1 )d(vi+1 ) by κi and use (8), (7) obtaining π(v0 , v) =

l−1  i=0

(1 + ε/2)

l−1 

π((vi , vi+1 ) ≤ (1 + ε/2)

l−1 

˜ π  (vi , vi+1 ) ≤

i=0

(˜ π (ai , bi+1 ) + εκi /7) ≤ (1 + ε/2)˜ π (v0 , v) + (3ε/14)

i=0

l−1 

κi . (9)

i=0

l−1 It remains to estimate the sum i=0 κi appearing above. From the definitions π (ai , bi+1 ) + vi ai  + bi+1 vi+1  ≤ of d(·), (6), and (1) it follows that κi ≤ 2˜ 2˜ π (ai , bi+1 ) + κi /7. Thus κi ≤ (7/3)˜ π (ai , bi+1 ) and substituting this in (9) we obtain the desired estimate π(v, v0 ) ≤ (1 + ε)˜ π (v0 , v).  

4

Algorithms

In this section we discuss algorithms for solving the Single Source Shortest Paths (SSSP) problem in approximation graphs Gε . Straightforwardly, one can apply Dijkstra’s algorithm. When implemented using Fibonacci heaps it would solve SSSP problem in O(|Eε | + |Vε | log |Vε |) time. By Lemma 1, |Vε | = O( √nε log 1ε ) and by the definition of edges |Eε | = O( nε log2 1ε ). Thus it follows that the SSSP

254

L. Aleksandrov, A. Maheshwari, and J.-R. Sack

problem can be solved by Dijkstra’s algorithm in O( nε log nε log 1ε ) time. Already this time matches the best previously known bound [15]. In the remainder of this section we show how geometric properties of our model can be used to obtain a more efficient algorithm for SSSP in the corresponding approximation graph. More precisely, we present an algorithm that runs in O(|Vε | log |Vε |) = O( √nε log nε log 1ε ) time. First, we discuss the general structure of our algorithm. Let G(V, E) be a directed graph with positive costs (lengths) assigned to its edges and s be a fixed vertex of G. The SSSP problem is to find shortest paths from s to any other vertex of G. The standard greedy approach for solving the SSSP problem works as follows: a subset of vertices S to which the shortest path has already been found and a set of edges E(S) connecting S with S a ⊂ V \ S is maintained. The set S a consists of vertices not in S but adjacent to S. In each iteration an optimal edge e(S) = (u, v) in E(S) is selected. Its target v is added to S and E(S) is updated correspondingly. An edge e = e(S) is optimal for S if it minimizes the value δ(u) + c(e), where δ(u) is the distance from s to u and c(e) is the cost of e. The correctness of this approach follows from the fact that when e = (u, v) is optimal the distance δ(v) is equal to δ(u) + c(e). Different strategies for maintaining information about E(S) and finding an optimal edge e(S) in each iteration result in different algorithms for computing SSSP. For example, Dijkstra’s algorithm maintains only a subset Q(S) of E(S), which however always contains an optimal edge. Namely, for each vertex v in S a Dijkstra’s algorithm keeps in Q(S) one edge only – the one that ends the shortest path to v using vertices in S only. Alternatively, one may maintain a subset Q(S) of E(S) containing one edge per vertex u ∈ S. The target vertex of this edge is called representative of u and is denoted by ρ(u). The vertex u itself is called predecessor of its representative. The representative ρ(u) is defined to be the target of the minimum cost edge in the propagation set I(u) of u, where I(u) ⊂ E(S) consists of all edges (u, v) such that δ(u) + c(u, v) ≤ δ(u ) + c(u , v) for any other vertex u ∈ S (ties are broken arbitrarily). The union of propagation sets forms a subset Q(S) of E(S), that always contains an optimal edge. Propagation sets I(u) for u form a partition of Q(S), which we call a Propagation Diagram and denote by I(S). Similar scheme has been used by [15]. A possible implementation of this alternative strategy is to maintain the set of representatives R ⊂ S a organized in a priority queue, where a key of a vertex ρ(u) in R is defined to be δ(u) + c(u, ρ(u)). Observe that the edge corresponding to the minimum in R is an optimal edge for S. In each iteration the minimum key node v in R is selected and the following three steps are implemented: Step 1. The vertex v is moved from R into S. Then the propagation set I(v) is computed and the propagation diagram I(S) is updated accordingly. Step 2. The representative ρ(v) of v and a new representative ρ(u) for the predecessor u of v are computed. Step 3. The new representatives ρ(u) and ρ(v) are either inserted into R together with their corresponding keys, or (if they are already in R) their keys are updated and the decrease key operation is executed in R if necessary.

An Improved Approximation Algorithm

255

Clearly, this leads to a correct algorithm for solving the SSSP problem in G. The total time for the priority queue operations if R is implemented with Fibonacci heaps is O(|V | log |V |). Therefore the efficiency of this strategy depends on the maintenance of the propagation diagrams, the complexity of the propagation sets and efficient updates of the new representatives. Our approach is as follows. We partition the set of edges E(S) into groups, so that the propagation sets and the corresponding propagation diagrams when restricted to a fixed group become simple and allow efficient updates. Then for each vertex u in S we will keep multiple representatives in R, one for each group, where edges incident to u participate. As a result a vertex in S a will eventually have multiple predecessors. As we describe below, the number of groups where u can participate will be O(1). We will be able to compute new representatives in O(1) time and update propagation diagrams in logarithmic time in our approximation graphs Gε . Next, we present some details and state the complexity of the resulting algorithm. The edges of the approximation graph Gε were defined to join pairs of nodes (Steiner points) lying on neighboring bisectors, where two bisectors are neighbors if the angles they split share an edge of P . Since the polyhedral surface P is triangulated a fixed bisector may have at most six neighbors. We can partition the set of edges of Gε into groups E(, 1 ) corresponding to pairs of neighboring bisectors  and 1 . For a node u on a bisector  we maintain one representative ρ(u, 1 ) per each bisector 1 neighboring . The representative ρ(u, 1 ) is defined to be the target of the minimum cost edge in the propagation set I(u; , 1 ), consisting of the edges (u, v) in E(, 1 ), such that δ(u)+c(u, v) ≤ δ(u )+c(u , v) for any node u ∈  ∩ S. A node on  with a non-empty propagation set on 1 will be called active for E(, 1 ). Consider now an iteration of our greedy algorithm. Let v be the node produced by Extract min operation in the priority queue R comprising of representatives. Denote the set of predecessors of v by R−1 (v). Our task is to compute new representatives for v and for each of the predecessors u ∈ R−1 (v). Consider first the case when v is a vertex of the polyhedral surface P . We assume that the edges incident to a vertex v have been sorted with respect to their cost and when a new representative for v is required we simply report the target of the smallest cost edge joining v with S a . Thereby the new representative for a node that is a vertex of P can be computed in constant time. The total number of edges incident to vertices of P is O( √nε log 1ε ) and their sorting in a preprocessing step takes O( √nε log2 1ε ) time. Consider now the case when v is a node on a bisector say . An efficient computation of representatives in this case is based on the following two lemmas.

Lemma 3. The propagation set I(v; , 1 ) for an active node v is characterized by an interval (x1 , x2 ) on 1 , i.e., it consists of all edges in E(, 1 ) whose targets belong to (x1 , x2 ). Furthermore, the function dist(v, x), measuring the cost of the shortest path from v to x restricted to lie in the union of the two triangles containing  and 1 , is convex in (x1 , x2 ).

256

L. Aleksandrov, A. Maheshwari, and J.-R. Sack

Lemma 4. Let v1 , . . . , vk be the active vertices for E(, 1 ). The propagation diagram I(, 1 ) = I(v1 , . . . , vk ) is characterized by k intervals. Updating the diagram I(v1 , . . . , vk ) to the propagation diagram I(v1 , . . . , vk , v), where v is a new active node in  takes O(log k) time. Thus to compute a new representative of v on a neighboring bisector 1 we update the propagation diagram I(, 1 ). Then we consider the interval characterizing the propagation set I(v; , 1 ) and select the minimum cost edge whose target is in that interval and in S a . Assume that nodes on 1 currently in S a are maintained in a doubly linked list with their positions on 1 . Using the convexity of the function dist(v, x) this selection can be done in time logarithmic on the number of these nodes, which is O(log 1ε ). There are at most six new representatives of v corresponding to bisectors around  to be computed. Thus the total time for updates related to v is O(log 1ε ). The update of the representative for a node u ∈ R−1 (v) on  takes constant time since no change in the propagation set I(u; ·, ) occurred and the new representative of u is a neighbor to the current one in the list of nodes in S a on . The set of predecessors R−1 (v) contains at most six vertices and thus their representatives are updated in constant time. So computing representatives in an iteration takes O(log 1ε ) time and in total O(|Vε | log 1ε ). The following theorem summarizes the result of this section. Theorem 2. The SSSP problem in the approximation graph Gε for a polyhedral surface P can be solved in O( √nε log nε log 1ε ) time. In the following theorem we summarize the main result of this paper. Starting from a vertex v0 our algorithm solves SSSP problem in the graph Gε and construct shortest paths tree rooted at v0 . According to Theorem 1 output distances from v0 to other vertices of P are within a factor of 1 + ε from the cost of the shortest paths. Using the definition of the edges of Gε an approximate shortest path between pair of vertices can be output in time proportional to the number of segments in this path. The approximate shortest paths tree rooted at v0 and containing all Steiner points and vertices of P can be output in O(|Vε |) time. Thus we have established the following theorem. Theorem 3. Let P be a weighted polyhedral surface with n triangular faces and ε ∈ (0, 1). Shortest paths from a vertex v0 to all other vertices of P can be approximated within a factor of (1 + ε) in O( √nε log nε log 1ε ) time. Extensions: We briefly comment on how our approach can be applied to approximate shortest paths in weighted polyhedral domains and formulate the corresponding result. In 3-dimensional space most shortest path problems are difficult. Given a set of pairwise disjoint polyhedra in 3D and two points s and t, the Euclidean 3-D Shortest Path Problem is to compute a shortest path between s and t that avoids the interiors of polyhedra seen as obstacles. Canny and Reif have shown that this problem is NP-hard [6] (even for the case of axis parallel triangles in 3D). Papadimitriou [13] gave the first fully polynomial (1 + )-approximation algorithm for the 3D problem. There are numerous other

An Improved Approximation Algorithm

257

results on this problem, but due to the space constraints we omit their discussion and refer the reader to the most recent work [5] for a literature review. Let P be a tetrahedralized polyhedral domain in the 3-dimensional Euclidean space, consisting of n tetrahedra. Assume that positive weights are assigned to the tetrahedra of P and that the cost of traveling inside a tetrahedron t is equal to the Euclidean distance traveled multiplied by the weight of t. Using the approach of this paper we are able to approximate shortest paths in P within (1+ε) factor as follows: Discretization in this case is done by inserting Steiner points in the bisectors of the dihedral angles of the tetrahedra of P . The total number of Steiner points in this case is O( εn2 log 1ε ). The construction of Steiner points and the proof of the approximation properties of the resulting graph Gε in this case involves more elaborate analysis because of the presence of edge vicinities – small spindle like regions around edges – in addition to vertex vicinities. Nevertheless, an analogue to Theorem 1 holds. SSSP in the graph Gε can be computed by following a greedy approach like that in Section 4.

References 1. K.R. Varadarajan and P.K. Agarwal, “Approximating Shortest Paths on Nonconvex Polyhedron”, SIAM Jl. Comput. 30(4): 1321–1340 (2000). 2. P.K. Agarwal, S. Har-Peled, and M.Karia, “Computing approximate shortest paths on convex polytopes”, Algorithmica 33:227–242, 2002. 3. P.K. Agarwal et al., “Approximating Shortest Paths on a Convex Polytope in Three Dimensions”, Jl. ACM 44:567–584, 1997. 4. L. Aleksandrov, M. Lanthier, A. Maheshwari, J.-R. Sack, “An ε-approximation algorithm for weighted shortest paths”, SWAT, LNCS 1432:11–22, 1998. 5. L. Aleksandrov, A. Maheshwari, and J.-R. Sack, ”Approximation Algorithms for Geometric Shortest Path Problems”, 32nd STOC, 2000, pp. 286–295. 6. J. Canny and J. H. Reif, “New Lower Bound Techniques for Robot Motion Planning Problems”, 28th FOCS, 1987, pp. 49–60. 7. J. Chen and Y. Han, “Shortest Paths on a Polyhedron”, 6th SoACM-CG, 1990, pp. 360–369. Appeared in ”Internat. J. Comput. Geom. Appl.”, 6: 127–144, 1996. 8. J. Hershberger and S. Suri, “Practical Methods for Approximating Shortest Paths on a Convex Polytope in 3 ”, 6SODA, 1995, pp. 447–456. 9. S. Kapoor, “Efficient Computation of Geodesic Shortest Paths”, 31st STOC, 1999. 10. M. Lanthier, A. Maheshwari and J.-R. Sack, “Approximating Weighted Shortest Paths on Polyhedral Surfaces”, Algorithmica 30(4): 527–562 (2001). 11. J.S.B. Mitchell, D.M. Mount and C.H. Papadimitriou, “The Discrete Geodesic Problem”, SIAM Jl. Computing, 16:647–668, August 1987. 12. J.S.B. Mitchell and C.H. Papadimitriou, “The Weighted Region Problem: Finding Shortest Paths Through a Weighted Planar Subdivision”, JACM, 38:18–73, 1991. 13. C.H. Papadimitriou, “An Algorithm for Shortest Path Motion in Three Dimensions”, IPL, 20, 1985, pp. 259–263. 14. M. Sharir and A. Schorr, “On Shortest Paths in Polyhedral Spaces”, SIAM J. of Comp., 15, 1986, pp. 193–215. 15. Z. Sun and J. Reif, “BUSHWACK: An approximation algorithm for minimal paths through pseudo-Euclidean spaces”, 12th ISAAC, LNCS 2223:160–171, 2001. 16. M. Ziegelmann, Constrained Shortest Paths and Related Problems Ph.D. thesis, Universit¨ at des Saarlandes (Max-Planck Institut f¨ ur Informatik), 2001.