Approximation Algorithms for Shortest Descending Paths in Terrains
A path from s to t on a polyhedral terrain is descending if the height of a point p never increases while we move p along the path from s to t. No efficient algorithm is known to find a shortest descending path (SDP) from s to t in a polyhedral terra…
Authors: Mustaq Ahmed, S, ip Das
Appro ximation Algorith ms for Shortes t Descen d ing P aths in T errains ⋆ Mustaq Ahmed a Sandip Das b Sac hin Lo dha c Anna Lubiw a Anil Mahesh w ari d Sasank a Ro y c a David R. Cheriton Scho o l of Comp uter Scienc e , University of Waterlo o, Waterlo o, ON, N2L 3G1 , Canada b Indian Statistic al Institute, Kolkata, India c T ata Consulta ncy Servic es Ltd., Pune, India d Scho ol of Computer Scienc e, Carleton University, Ottawa, ON, K1S 5B6, Canada Abstract A path from s to t on a p olyhedral terrain is desc ending if the heigh t of a p oin t p nev er increases while we mo v e p along th e path from s to t . No efficien t algorithm is kno w n to find a shortest descendin g p ath (S DP) from s to t in a p olyhedr al terrain. W e give t wo app ro ximation algorithms (more p recisely , FPT ASs) that solv e the S DP problem on general terrains. Both algo rithms are simple, robust and easy to implement. Key wor ds: Descending p ath, Shortest path, S teiner p oint, Approximat ion algorithm, T errain, Computational Geometry 1 In t ro duction Finding a shortest path b etw een tw o p oin ts in a geometric do ma in is one of the most fundamental problems in computational geometry . One extensiv ely- studied v ersion of the problem is to compute a shortest pa th on a polyhedral ⋆ Researc h partially s u pp orted by NSERC Email addr esses: m6a hmed@uwat erloo.ca (Mustaq Ahm ed), sandipda s@isical. ac.in (Sand ip Das), s achin.lod ha@tcs.co m (Sac hin Lo dha), alubiw@u waterloo. ca (Ann a Lubiw), a nil@scs. carleton. ca (Anil Mahesh wari), sa sanka.roy @tcs.com (Sasank a Roy). arXiv 9 Ma y 2008 terrain; this has many applications in rob otics, industrial automation, Geo- graphic Information Systems and wire routing. Our pap er is ab out a v ariant of this pro blem for whic h no efficien t algorithm is kno wn, t he Sho rtest De- sc ending Path (SDP) Pr oblem : g iven a p olyhedral terrain, and p o ints s and t on the surface, find a shortest path on the surface from s to t such that , as a p o in t trav els along the path, its elev ation, or z -co ordinate, nev er increases. W e need to compute a shortest descending path, for example, for la ying a canal of minim um length from the source of w a t er a t the to p of a mountain to fields for irrigation purp ose, and for sk iing dow n a moun tain a lo ng a shortest route [ 1 , 17 ]. The SDP problem w as in tro duced b y de Berg and v an K rev eld [ 9 ], who ga v e a p olynomial time a lgorithm to decide existence of a descending path betw een t wo p oints. Since then the problem has b een studied in differen t restricted settings [ 1 , 3 , 17 ] (See Section 2.2 for a brief surv ey), but the SDP problem on gener al terrains remained o p en in the sense that neither a p olynomial t ime algorithm nor a p olynomial time approximation sc heme ( PT AS) w as kno wn. In this pap er we presen t tw o approxim ation algorithms (more precisely , fully p olynomial time approximation sc hemes, FPT ASs ) to find SD Ps in general terrains. These algorithms hav e app eared in preliminary forms in Ahmed and Lubiw [ 2 ] and in Ro y et al. [ 18 ] resp ectiv ely . Bo th the algorithms discretize the terrain by adding Steiner p oin ts along the edges, thus transforming the geometric shortest path problem in t o a combinatorial shortest path problem in a gr aph. This approac h has b een used b efore f o r related shortest path problems such as the W e igh ted Region Problem and the Shortest Anisotropic P ath Problem (discus sed in Section 2.2 ). In those results, Steine r p o in ts are placed indep e ndently along eac h edge. Suc h independen t placemen t fails for SDPs, and our main new ingredien t is to place Steiner p oin t s b y slicing the terrain with hor izon tal planes. Both the algorithms presen ted here are simple, robust and easy to implemen t. In our first algorit hm, giv en a v ertex s in a triangula t ed terrain, a nd a constant ǫ ∈ (0 , 1], we discretize t he terrain with O n 2 X ǫ Steiner p oints so that af ter an O n 2 X ǫ log nX ǫ -time prepro cessing phase , w e can determine a (1 + ǫ )- appro ximate SDP from s to an y p oint v in O ( n ) time if v is either a v ertex of the terrain or a Steiner p oin t , and in O nX ǫ time otherwise, where n is the n um b er of v ertices of the t erra in, and X is a parameter of t he geometry of the terrain. More precisely , X = L h · 1 cos θ = L h sec θ , where L is the length of the longest edge, h is the smallest distance of a vertex fro m a non- adjacen t edge in the same face (i.e. the smalles t 2D heigh t of a triangular face), and θ is the largest acute angle b et ween a non-lev el edge and a v ertical line. Our second algorithm places Steine r p oints in a differen t manner, whic h mo difies the ab ov e prepro cessing time and the t w o query times to O n 2 X ′ ǫ log 2 nX ′ ǫ , O ( n ), a nd O nX ′ ǫ log nX ′ ǫ resp ectiv ely , where X ′ = L h . In comparison, the 2 first algorithm is faster in terms of n , ǫ and L h , but it dep ends heavily on the inclination of the no n- lev el edges. On the other hand, the second algorithm do es not dep end at all on edge inclinations, and hence is b etter for terrains with almost lev el edges. It is straightforw ard to follo w a “hybrid” approac h that first c hec ks the edge inclinations of the input terrain, and then runs whic hev er of these tw o a lgorithms ensures a b etter running time for that pa r ticular terrain. The pap er is org a nized a s follows . In Section 2 w e define a f ew terms, discuss the prop erties of SDPs, and men tion related results. Sections 3 and 4 giv e details of our appro ximation algorithms. W e conclude in Section 5 with a f ew op en problems. 2 Preliminaries 2.1 T erminolo gy A terrain is a 2D surface in 3D space with the prop erty tha t every v ertical line in tersects it in at most one p o int [ 10 ]. W e consider tr iangulated terrains. F or an y p oint p in the terrain, h ( p ) denotes the height of p , i.e., the z -co ordinat e of p . W e assume without loss of generality that all p oin ts of the terrain lie ab ov e the plane z = 0. An edge or face in 3D is leve l if all p oints on that edge or face hav e the same heigh t. W e add s as a v ertex of the t errain. Let n b e the n umber of v ertices in the terrain. By Euler’s formula [ 10 ], the terrain has at most 3 n edges, and at most 2 n faces. W e reserv e the terms “edge” and “v ertex” for features of the terrain. W e use the term “segmen t” to denote a line segmen t o f a path, and “no de” to denote an endp oin t o f a segmen t . W e use “no de” and “ link” to mean the corresp onding en tit ies in a graph or a tree. Figure 1 sho ws the con v en tion we will use in our figures to mar k v arious comp onents related to a descen ding path. In particular, an a r r o w with a solid, dark arrow head denotes a pa th segmen t, and the a r r o w ma y b e hea vy to mark a level segmen t. In the fig ur es where the direction of the edges are imp ortan t, w e again use arrows to mark the up w ard direction, but w e make the a r r o wheads V-shaped (“op en”) in this case to differen tiate the edges from the segmen ts. Dotted lines are used to sho w lev el lines in a face. A path P fro m s to t on the terrain is desc en ding if the z -co ordinate of a p oin t p nev er increase s while we mov e p a lo ng the pat h f r om s t o t . W e assume that all paths and segmen ts in our disc ussion are direc ted. O ur discussion relies on the follo wing kno wn [ 1 , 17 ] prop erties of an SDP: 3 F ree segm ent Constrained segment Edge with upw ard direction Level line s t Fig. 1. General legend f or the figures in this p ap er Lemma 1 Any subp ath of an SD P is an SDP. Lemma 2 An unfolde d SDP is no t always a str aigh t line se g ment. Lemma 3 The interse c tion o f an SDP P w ith a fac e of the terr ain is either empty or a line se gm e n t. 2.2 R e l a te d Work The SDP problem w as in tro duced b y de Berg and v an Krev eld [ 9 ], who gav e an algorit hm to prepro cess a terrain in O ( n log n ) time so that it can b e decided in O (log n ) time if there exists a desce nding path b et wee n any pair of v ertices. They did not consider the length of the path, and left op en the problem of finding the shortest suc h path. Ro y , Das a nd Nandy [ 17 ] solv ed the SDP problem f o r t wo sp ecial c lasses of terrains. F or con v ex (or conca ve) terrains, they use t he contin uous Dijkstra approac h t o prepro cess the terrain in O ( n 2 log n ) time and O ( n 2 ) space so that an SDP o f size k can b e determined in O ( k + log n ) time. F or a terrain consisting of edges parallel to one another, they find a n SDP in O ( n log n ) time by transforming selected faces of the terrain in a w a y that mak es the unfolded SDP a straight line segmen t. Roy [ 16 ] has recently improv ed t his running time to O ( n ), by replacing a sorting step in the previous algorithm with a divide-and-conquer tec hnique. Ahmed and Lubiw [ 1 ] examined the basic prop erties of SDPs that show the similarities and the diss imilarities betw een SDPs and s hortest paths, and indicated why a shortest path algorithm lik e the con tin uo us Dijkstra a ppro ac h cannot b e used directly to solv e the SDP problem on general terrains. They also g a v e a n O ( n 3 . 5 log( 1 ǫ )) time algorithm that finds a (1 + ǫ )-approxim ate SDP through a given sequence of faces. Their algorithm first formu lates the problem a s a con vex optimization problem, whic h is then solve d using a standard tec hnique 4 in conv ex prog ramming. In a more recen t work Ahmed a nd Lubiw [ 3 ] gav e a full c haracterization of the b end angles of an SDP , whic h sho ws that the b end angles alo ng an SDP follo ws a generalized form of Snell’s law of refraction of ligh t. This result implies tha t computing an exact SDP is not easy ev en when w e know the sequence of faces used by the SDP , due t o n umerical issues similar to t he ones faced b y Mitc hell and P apadimitriou while computing a shortest path in the W eigh ted Region Problem [ 13 , Section 8]. It was P apadimitrio u [ 14 ] who first in tro duced the idea of discretizing space b y adding Steiner p oints and appro ximating a shortest path through the space b y a shortest path in the graph of Steiner p oin ts. He did this to find a shortest obstacle-a v oiding path in 3D—a problem for whic h computing an exact solu- tion is NP-hard [ 7 ]. On p olyhedral surfaces, the Steiner p oin t approa c h has b een used in appro ximation algorit hms for man y v arian ts of the shortest path problem, particularly those in whic h the shortest pa th do es not unfold to a straigh t line segmen t. One suc h v a rian t is the W e igh ted Region Problem [ 13 ]. In this problem, a set of cons tan t w eights is used to mo del the difference in costs of trav el in different regions on the surface, and the goa l is t o minimize the w eighted length of a path. Mitc hell and P apadimitriou [ 13 ] used the con- tin uo us Dijkstra approac h to get an approximate solution in O n 8 log n ǫ time. F ollo wing their result, sev eral faster approx imation sche mes [ 4 , 5 , 6 , 8 , 22 ] ha ve b een devised, a ll using the Steiner p oint approac h. The Steiner p oints are placed along the edges of the terrain, except that Aleksandro v et al. [ 6 ] place them along t he bisectors of the face angles. A comparison b et w een these algorithms can b e found in Aleksandro v et al. [ 6 ]. One g eneralization o f the W eigh ted Region Problem is finding a shortest anisotropic path [ 15 ], where the w eigh t assigned to a region depends on the direction of tra vel. The we igh ts in this problem capture, for example, t he effect the gra vit y and fr iction on a v ehicle mo ving on a slop e. Lan thier et al. [ 12 ], Sun and Reif [ 21 ] and Sun and Bu [ 19 ] solv ed this problem b y placing Steiner p oin ts along the edges. Note tha t all the ab ov e- men tioned Steiner p oin t a pproac hes place the Steiner p oin ts in a face without considering t he Steiner p oin ts in the neighboring faces. This strategy w orks b ecause w e can tra vel b et we en any t w o p oin t s in a face. In the case of shortest anisotropic paths, the straigh t- line path ma y b e in a forbidden direction, but it is almost alw a ys assumed that the allow ed directions p ermit a zigzag path to an y destination (lik e tac king against the wind in a sailb oat ) . The one exception is that Sun and Reif [ 21 ] consider the Anisotropic P ath Problem where a se t of non-adjacen t faces ha v e directions that are unreachable ev en with zigzagging. Their solution in volv es propagat- ing extra Steiner p oin ts across each of these partially tr av ersable faces. F or the SDP problem, a scending directions are unreac hable in every face, w hic h necessitates our non-lo cal strategy of placing Steiner p oin ts. 5 2.3 The B ushwhack Algorithm T o compute a shortest path in the g r aph of Steiner p o ints in a terrain w e use a v ariant of Dijkstra’s algorithm dev elop ed b y Sun a nd Reif [ 20 ]. Their algorithm, called the Bush whac k a lgorithm, achie v es O ( | V | log | V | ) running time by utilizing certain geometric pro p erties of the paths in suc h a graph. The algorithm has b een used in shortest path algo rithms for the W eigh ted Region Problem [ 6 , 22 ] and the Shortest Anisotropic P ath Problem [ 21 ]. e e ′ s u 1 u 2 u 3 u 4 (a) e e ′ s u 1 u 2 u 3 u 4 (b) e e ′ s u 1 u 2 u 3 u 4 (c) Fig. 2. Mainta ining the list I e,e ′ in the Bu s h whac k algorithm The Bush whac k algorithm relies on a simple, y et imp ortant, prop erty of short- est paths on terra ins: t w o shortest paths t hrough differen t face sequences do not inte rsect eac h other at an in terior p oint of a face. As a result, for an y t w o consecutiv e Steiner po in ts u 1 and u 2 on edge e for whic h the distances fro m s are a lready know n, t he corresp onding sets of “p o ssible next no des on the path” are disjoin t, as shown using shading in F ig ure 2(a) . This pro p ert y makes it p o ssible to consider only a subset of links a t a Steiner p oin t v when expand- ing the shortest path tree on wards from v using Dijkstra’s algorithm. More precisely , Sun a nd Reif main tain a dynamic list of in terv als I e,e ′ for ev ery pair of edges e a nd e ′ of a common face. Each p oin t in an interv al is reachable from s using a shortes t path through a common sequenc e of in termediate p o in ts. F or ev ery Steiner p oin t v in e with kno wn distance from s , I e,e ′ con ta ins an in terv al of Steiner p oin ts on e ′ that are lik ely to b ecome the next node in the path from s through v . The interv als in I e,e ′ are ordered in accordance with the o r dering of the Steiner p o ints v on e , whic h enable s easy insertion of the 6 in terv al for a Steiner p oint o n e whos e distance from s is y et unkno wn. F or example, right after the distance of u 4 from s b ecomes kno wn (i.e., righ t after u 4 gets dequeued in Dijkstra’s algorithm) a s sho wn in Figure 2(b) , the inter- v al of the Steiner p o in ts on e ′ that are closer to u 4 than to a n y other Steiner p oin ts on e with known distances from s can b e computed in time log arithmic in the n um b er of Steiner p oints on e ′ , using bina r y searc hes (Figure 2(c) ). Let I denote this in terv al for ease of discuss ion. The Bush whack alg o rithm considers o nly the Steiner p oints lying in interv al I as the p ossible next no des on the path to u 4 , while Dijkstra’s a lg orithm tries all the Steiner p oints on e ′ . Another differenc e b et wee n these tw o algorithms is that af ter u 4 gets de- queued, Dijkstra’s algo rithm enqueues eac h Steiner p oin t (or s ifts it upw ard in the queue if it was already there) of I . But in the Bush whack algorithm, only the Stein er p oin t u ′ 4 ∈ I that is nearest from u 4 is enq ueued (or sifted up ward); other Steiner po in ts in I are considered lat er on if necessary , one by one a nd in order o f their distances from u ′ 4 . Since u ′ 4 can b e lo cated in in t erv al I in constant time, eac h iteration of the Bush whack algorithm takes O ( | V | ) time, resulting in a total running time of O ( | V | log | V | ). 2.4 Placing the Stein e r Po i n ts Our approximation algorithms work b y first discretizing the terrain with man y Steiner p oints along the edges, and then determining a shortest path in a di- rected graph in whic h each link connects a pair of v ertices or Steiner p oints in a face of the terrain in the descending ( mo r e accurately , in the non- ascending) direction. Althoug h t he idea is similar to o ther Steiner p oint approac hes dis- cussed in Section 2.2 , there are t w o asp ects of the SDP problem that mak e our approac h quite differen t from previous Steiner p oint approa ches . v q ′ 3 q 2 p 2 q ′ 1 s p 1 q 3 q ′′ 3 v ′ q ′ 2 q ′′ 2 q ′′ 1 q 1 p 3 Fig. 3. P r oblems with indep endentl y-placed S teiner p oints. First, b ecause of the nature of the SDP problem, we hav e to p osition t he Steiner p oints quite differen tly from the Steiner p o in t appro ac hes discussed in Section 2.2 . In particular, we cannot place Steiner p oin ts in an edge without considering the heights of the Steiner p oints in other edges. More elab orately , for eac h Steiner p oin t p in an edge, if there is no Steiner p oint with heigh t h ( p ) in other edges of the neigh b oring faces, it is p ossible that a descend ing path from s to v through Steiner p oin ts do es not exist, or is arbitr a rily longer 7 than the SDP . F or example, consider the SD P P = ( s, p 1 , p 2 , p 3 , v ) in Figure 3 , where for eac h i ∈ [1 , 3], q i , q ′ i and q ′′ i are three consecutiv e Steiner p oints with h ( q i ) > h ( q ′ i ) > h ( q ′′ i ) suc h that q i is the nearest Steiner p oin t ab ov e p i . Note that in this figure the faces ha v e b een unfolded on to a plane, and that p 1 and q ′ 1 are the same p oint. There is no descending path from s to v through the Steiner p oin ts: w e m ust cro ss the first edge a t q ′ 1 or low er, then cross t he second edge at q ′ 2 or lo w er, and cross the third edge at q ′′ 3 or lo w er, whic h puts us at a height b elo w h ( v ). Another imp ortant observ ation is that ev en if a descending path exists, it ma y not b e a go o d a ppro ximation of P . In Figure 3 , for example , if w e w an t to reac h instead a p oin t v ′ sligh tly b elow v , P ′ w ould b e a feasible path, but the last intermediate no des of P and P ′ are not v ery close. W e can easily extend this example to an SDP P go ing through man y edges suc h that the “nearest” descending path P ′ gets further a wa y from P at eac h step, and at one p oin t, P ′ starts f o llo wing a completely differen t sequence of edges . Clearly , we cannot ensure a go o d approximation by j ust making the Steiner p oints o n an edge close to eac h other. T o guarantee the existence of a descending path thro ugh Steiner p oin ts that appro ximates an SDP from s to any v ertex, w e ha v e to b e able to go through the Steiner p oin ts in a sequence of faces without “lo sing heigh t”, i.e., a long a lev el path. W e ac hiev e this by slicing the terra in with a set o f horizontal planes, and then putting Steiner p oints where the planes in tersect the edges. The set of horizon tal planes includes o ne plane through eac h v ertex of t he terrain, and other planes in b et w een them t ha t a r e close enough to guaran tee a go o d appro ximation ratio. Our t wo algorithms, discusse d in Sections 3 and 4 , differ f rom eac h other in the manner the p ositions of the horizontal planes a r e determined. The second issue is that the prev ious Steiner p oint approac hes relied on the prop ert y that shortest paths in the W eigh ted Region Problem or in the Shor t - est Anisotropic P ath Problem cannot b ecome ve ry close to a particular v ertex more than once. T his prop ert y do es not hold for shortest paths in the SDP problem. In fact, it is p ossible to construct a terrain where an SD P b ecomes v ery close to a v ertex v as man y as O ( n ) times, mo ving far aw ay from v after ev ery visit of the vicinit y of v . Consider the terrain in Figure 4 ( a ) which con- sists of the triangular faces of a p yramid with a star-shap ed base. The p oin ts s and t ha v e the same height, so the SDP P from s to t mus t consist o f lev el segmen ts. Moreo v er, P consists of O ( n ) segmen ts in the fig ur e. Figure 4(b) sho ws the faces used by P after unfo lding them onto a plane. By mo ving the con vex ve rtices at the base aw ay fro m the “cen ter” of the base while k eep- ing them on the same plane, we can make the p oints of P that are far aw ay from v mov e ev en f ur t her aw ay from v . Clearly it is p o ssible to mak e P en ter and lea ve a region c lose to v as man y as O ( n ) n um b er of times. Because of suc h a p ossibilit y with an SDP , the ana lysis of our Steiner p oin t approac h is completely differen t from previous approaches . 8 t v s (a) v t s (b) Fig. 4. An SDP that comes close to a v ertex O ( n ) num b er of times 3 Discretizing usi ng Uniform Steiner Poin ts In our first algorithm t he Steiner points on eac h edge a re ev enly spaced. T o determine their p ositions, w e fir st tak e a set of ho r izon tal pla nes suc h that an y tw o consecutiv e planes are within distance δ of eac h other, where δ is a small constan t that dep ends on t he appro ximation factor. W e then put a Steiner p oint at the in tersection p oint o f eac h o f these planes with each of the terrain edges. One important observ ation is that this sc heme mak es the distance b et we en consecutiv e Steiner p oin ts on an edge dep enden t on the slop e of that edge. F or instance, the distance b etw een consecutiv e Steiner p oin ts is more fo r a n almost-lev el edge tha n for an a lmost v ertical edge. Since θ is the largest acute angle b etw een a non-lev el edge a nd a vertical line, it can b e sho wn that the distance b etw een consecutiv e Steiner p oints on a no n- lev el edge is at most δ sec θ (Lemma 5 ). Because o f the situation depicted in F ig ure 3 , w e cannot place extra Steiner p oin ts only on the edges tha t are almost lev el. W e guarante e a g o o d approx imation rat io b y c ho osing δ appropriately . More precisely , w e mak e sure t ha t δ sec θ is small enough for the desired approximation ratio. Not e that we can put Steiner p oin ts on a lev el edge without considering heigh ts, since a lev el edge can nev er result in the situatio n depicted in Figure 3 (b ecause all the p oin ts in suc h an edge ha ve the same heigh t). 9 3.1 A lgorithm Our algorithm runs in tw o phases. In the preprocessing phase, w e place the Steiner points, and then construct a shortest path tree in the corresp onding graph. During the query phase, the shortest path tree gives an appro ximate SDP in a straigh t f orw ar d manner. 3.1.1 Pr epr o c essing Phase Let δ = ǫh cos θ 4 n . W e sub divide ev ery non-leve l edge e of the terrain b y putting Steiner p o ints at the p oin ts where e intersec ts eac h of the follo wing pla nes: z = j δ for all p ositiv e integers j , and z = h ( x ) for all v ertices x of the terrain. W e sub divide ev ery lev el edge e by putting enough Steiner p o in ts so that the length of each part of e is at most δ se c θ . Let V b e the set of all the v ertices and Steiner p oin ts in the terrain. W e then construct a w eigh ted directed graph G = ( V , E ) as follow s, starting with E = ∅ . F or ev ery pair ( x, y ) of p oin ts in V adjacen t to a face f of the terrain, w e add to E a directed link from x to y if a nd only if h ( x ) ≥ h ( y ) and xy is either an edge of the terrain or a segmen t through the in terior o f f . Note that w e do not add a link b etw een t wo po in ts on the same edge unless b o t h of them are v ertices. Eac h link in E is assigned a w eight equal to the length of the corresp onding line segmen t in the terra in. F inally we construct a shortest path tree T ro oted at s in G using the Bush whac k a lg orithm. Note tha t w e are men tioning set E only to mak e the discussion easy . In prac- tice, we do not construct E explicitly b ecause the neigh b ors of a no de x ∈ V in the graph are determined during t he execution of the Bush whac k a lgorithm. 3.1.2 Query Phase v U h ( v ) s (a) h ( v ) v U s (b) Fig. 5. Finding an S DP from s to an inte rior p oin t v of (a) a face and (b) an edge 10 When the query p oin t v is a no de of G , w e return the path from s to v in T as an approximate SDP . Otherwise, w e find the no de u among t ho se in V lying in the fa ce(s) con taining v suc h that h ( u ) ≥ h ( v ), and the sum of the length of the path from s to u in T and the length of the segmen t uv is minim um. W e return t he corresp o nding path from s to v as an appro ximate SDP in this case. T o elab ora t e more on the latter case, let U b e the set consisting of the no des u ∈ V with the following prop erties: (i) u and v lie in a common face, and (ii) h ( u ) ≥ h ( v ). It is easy to se e that if v is an in terior p oin t of a face, then all the no des in U lie on at most three edges of that face (Figure 5(a) ). Otherwise, v is an in terior p oin t o f an edge, and there are at most four edges o n which the no des in U can lie (Figure 5(b) ). Since w e already know the length of an SDP f r o m s to an y u ∈ U , we can find in | U | iteratio ns the no de u ∈ U that minimizes the length of the path constructed b y concatenating t he segmen t uv a t the end of the path from s to u in T . The corresp onding pa th is returned as an appro ximate SDP . 3.2 Corr e ctness a n d A nalysis F or the pro of of correctness, it is sufficien t to sho w that an SDP P from s to an y p oint v in the terrain is approx imated b y a descending path P ′ suc h that all the segmen t s of P ′ , except p ossibly the last one, exist in G . W e sho w this b y constructing a path P ′ from P in the follo wing w ay . Note that P ′ migh t not be the path returned b y our alg orithm, but it pro vides an upper b ound on the length of the returned path. Let P = ( s = p 0 , p 1 , p 2 , . . . , p k , v = p k +1 ) b e an SD P from s to v suc h that p i and p i +1 are tw o different b oundar y p oints of a common face fo r all i ∈ [0 , k − 1], and p k and p k +1 are tw o p oin ts of a common f ace. F or ease of discussion, let e i b e an edge of the terrain through p i for all i ∈ [1 , k ] ( e i can b e an y edge through p i if p i is a v ertex). In tuitiv ely , w e construct P ′ b y mo ving each in termediate no de of P up w ard to the nearest Steiner p oin t . More precisely , w e define a path P ′ = ( s = p ′ 0 , p ′ 1 , p ′ 2 , . . . , p ′ k , v = p ′ k +1 ) a s follows. F or eac h i ∈ [1 , k ], let p ′ i = p i if p i is a v ertex o f the terrain. Otherwise, let p ′ i b e the neares t p oin t from p i in V ∩ e i suc h that h ( p ′ i ) ≥ h ( p i ). Such a p oint alw ays exists in V b ecause p i is an in terior p oin t of e i in this c ase, and it has tw o neigh b ors x and y in V ∩ e i suc h that h ( x ) ≥ h ( p i ) ≥ h ( y ). Note that eac h no de of P ′ except p ossibly the last one is either a v ertex or a Steiner p oin t. Lemma 4 Path P ′ is d esc ending, and the p art of P ′ fr o m s to p ′ k exists in G . 11 PR OOF. W e prov e that P ′ is descending b y showin g that h ( p ′ i ) ≥ h ( p ′ i +1 ) for ev ery i ∈ [0 , k ]. W e ha v e: h ( p ′ i ) ≥ h ( p i +1 ), b ecause h ( p ′ i ) ≥ h ( p i ) b y the definition of p ′ i , and h ( p i ) ≥ h ( p i +1 ) as P is descending. No w consider the follo wing t w o cases: Case 1: p ′ i +1 = p i +1 or e i +1 is a lev el edge. In this case, h ( p ′ i +1 ) = h ( p i +1 ). It follo ws from the inequalit y h ( p ′ i ) ≥ h ( p i +1 ) that h ( p ′ i ) ≥ h ( p ′ i +1 ). Case 2: p ′ i +1 6 = p i +1 and e i +1 is a non-lev el edge. In this case, there is either one or no p oint in e i +1 at an y particular height. Let p ′′ i +1 b e the p oin t in e i +1 suc h tha t h ( p ′′ i +1 ) = h ( p ′ i ), o r if no suc h p oint exists, let p ′′ i +1 b e the upp er v ertex of e i +1 . In the latter case, we can infer from the inequalit y h ( p ′ i ) ≥ h ( p i +1 ) that h ( p ′ i ) > h ( p ′′ i +1 ). Therefore we hav e h ( p ′ i ) ≥ h ( p ′′ i +1 ) in b o t h cases. Since p ′′ i +1 ∈ V ∩ e i +1 , the definition o f p ′ i +1 implies that h ( p ′′ i +1 ) ≥ h ( p ′ i +1 ). So, h ( p ′ i ) ≥ h ( p ′ i +1 ). Therefore, P ′ is a desce nding path. T o sho w that the part of P ′ from s to p ′ k exists in G , it is sufficien t to prov e that p ′ i p ′ i +1 ∈ E fo r all i ∈ [0 , k − 1], b ecause b oth p ′ i and p ′ i +1 are in V b y definition. W e ha v e already pro v ed that h ( p ′ i ) ≥ h ( p ′ i +1 ). Since p ′ i and p ′ i +1 are b oundary p oints of a common face b y definition, p ′ i p ′ i +1 6∈ E only in the case that b oth of p ′ i and p ′ i +1 lie on a common edge, and at most one of them is a v ertex. W e sho w a s follo ws t ha t this is imp ossible. When both p i and p i +1 are v ertices of the terrain, b oth p ′ i and p ′ i +1 are v ertices. When at least one of p i and p i +1 is an in terior p oin t of an edge, they cannot lie on a common edge [ 1 , Lemma 3]; therefore, b o th of p ′ i and p ′ i +1 cannot lie on a common edge unless both of p ′ i and p ′ i +1 are vertice s. So, this is imp ossible that both p ′ i and p ′ i +1 lie on a common ed ge, and at most one of them is a v ertex. Therefore, p ′ i p ′ i +1 ∈ E . ✷ Lemma 5 F or a l l i ∈ [1 , k ] , | p i p ′ i | ≤ δ sec θ . PR OOF. p ′ i p i θ i q i e i h ( p ′ i ) Fig. 6. Boun ding | p i p ′ i | wh en p i 6 = p ′ i and e i is a non-lev el edge When p i = p ′ i , | p i p ′ i | = 0 < δ sec θ . When p i 6 = p ′ i , a nd e i is a lev el edge, 12 | p i p ′ i | ≤ δ sec θ b y construction. W e will no w f o cus on the case p i 6 = p ′ i and e i is a non-lev el edge. Consider the v ertical plane con taining the edge e i . Construct a line ve rtically up ward from p i to the p oin t q i where h ( q i ) = h ( p ′ i ) (Figure 6 ). Let θ i b e the angle ∠ q i p i p ′ i . Since h ( q i ) = h ( p ′ i ) > h ( p i ), θ i is an acute angle, and hence θ ≥ θ i , whic h implies: cos θ ≤ cos θ i = | q i p i | | p i p ′ i | ⇒ | p i p ′ i | ≤ | q i p i | sec θ . As q i p i is a v ertical line, | q i p i | = h ( q i ) − h ( p i ) = h ( p ′ i ) − h ( p i ) ≤ δ b y construction, and therefore, | p i p ′ i | ≤ | q i p i | sec θ ≤ δ sec θ . ✷ Lemma 6 Path P ′ is a (1 + ǫ ) -app r ox imation of P . PR OOF. When k = 0 implying that P do es not cross a n edge of the terrain, w e ha ve P = ( s , v ) = P ′ whic h pr ov es the lemma trivially . W e will no w fo cus on the case k > 0 . The length of P ′ is equal to: k X i =0 | p ′ i p ′ i +1 | ≤ k X i =0 | p ′ i p i | + | p i p i +1 | + | p i +1 p ′ i +1 | (from triangle inequalit y) = k X i =0 | p i p i +1 | + 2 k X i =1 | p i p ′ i | (since p 0 = p ′ 0 and p k +1 = p ′ k +1 ) ≤ k X i =0 | p i p i +1 | + 2 k X i =1 δ sec θ (Lemma 5 ) ≤ k X i =0 | p i p i +1 | + 2 k δ sec θ . Because the n um b er of faces in the t errain is a t most 2 n , and P has at most one segmen t in eac h face (Lemma 3 ), we hav e: k < 2 n . Therefore, k X i =0 | p ′ i p ′ i +1 | < k X i =0 | p i p i +1 | + 4 nδ sec θ = k X i =0 | p i p i +1 | + ǫh , 13 from the definition of δ . Because k > 0, p 1 lies on the edge opp osite to p 0 in the f a ce containing b oth p 0 and p 1 , and therefore, h ≤ | p 0 p 1 | ≤ P k i =0 | p i p i +1 | . So, k X i =0 | p ′ i p ′ i +1 | < ( 1 + ǫ ) k X i =0 | p i p i +1 | . Since P ′ is descendin g (L emma 4 ), it follo ws that P ′ is a (1 + ǫ )- appro ximation of P . ✷ Lemma 7 L et X = L h sec θ . Gr aph G has less than 15 n 2 X ǫ no des and O n 3 X 2 ǫ links. Mor e ov e r, it has less than 5 nX ǫ no des a l o ng any e dge of the terr ain. PR OOF. W e will first prov e the last pa r t o f the lemma. F or eac h edge e of the terra in, t he num b er of Steiner p oin ts corresp onding to the planes z = j δ is at most L δ − 1, and the n um b er of Steiner p oin ts corresp onding to the planes z = h ( x ) is at most n − 2. So, | V ∩ e | ≤ L δ − 1 + ( n − 2 ) + 2 < L δ + n = 4 n L h 1 ǫ sec θ + n, b ecause δ = ǫh cos θ 4 n . Since L h 1 ǫ sec θ ≥ 1 , w e hav e: | V ∩ e | < 5 n L h 1 ǫ sec θ = 5 nX ǫ . W e will no w compute | V | and | E | . Let c = 5 nX ǫ for ease of disc ussion. Usin g the fact that the n umber of edges is at most 3 n , we ha ve : | V | < 3 nc = 15 n 2 X ǫ . F or eac h face f of the terrain, there a re less than 3 c p oin ts in V ∩ f , and eac h suc h p oin t has less than 2 c neigh b ors in f (more precisely , in the induced subgraph G [ V ∩ f ]). So, the n um b er of directed links in E con tributed by f is less than 6 c 2 , and this b ound is tigh t for a lev el face. Because there are at most 2 n faces, | E | < 12 nc 2 = O n 3 X 2 ǫ ! . ✷ 14 Theorem 8 L et X = L h sec θ . Given a vertex s , and a c on stant ǫ ∈ (0 , 1] , w e c an discr etize the terr ain with 15 n 2 X ǫ Steiner p oi n ts so that after a pr ep r o c e s s ing phase that takes O n 2 X ǫ log nX ǫ time for a given vertex s , we c an determi n e a (1 + ǫ ) -appr oximate SD P fr om s to any p oint v in: (i) O ( n ) time i f v is a vertex of the terr ain o r a Steiner p oint, and (ii) O nX ǫ time otherwise. PR OOF. W e first sho w that the pa t h P ′′ returned b y our algorit hm is a (1 + ǫ )-appro ximation of P . P ath P ′′ is descending b ecause an y pa th in G is a des cending path in the terrain, and the last segmen t of P ′′ is des cending. It follo ws from the construction of P ′′ that the length of P ′′ is at most that of P ′ , and hence b y L emma 6 , P ′′ is a (1 + ǫ )-approx imation of P . As w e ha v e mentioned b efo r e, w e do not construct E explicitly b ecause the neigh b ors of a no de x ∈ V in the g raph are determined during the execution of the Bush whack algorithm. As a result, the (implicit) construction of G tak es O ( | V | ) t ime. It follows fro m the running time of the Bush whac k algorithm (discusse d in Section 2.3 ) that the prepro cessing time of our algorithm is: O ( | V | log | V | ) = O n 2 X ǫ log nX ǫ ! b y Lemma 7 . During t he query phase, if v is a v ertex of the terra in o r a Steiner p oin t, the appro ximate path is in the tree T . Because t he tree has heigh t O ( n ), it t ak es O ( n ) time to trace the path. Otherwise, v is an interior p o int of a face or an edge of t he terrain. The last in termediate no de u on the path to v is a vertex or a Steiner p oin t that lies on the b oundary of a face con taining v . If v is in terior to a f ace [an edge], there are 3 [resp ectiv ely 4] edges of the terrain on whic h u can lie. Thus there are O nX ǫ c hoices for u b y Lemma 7 , and we try all of them to find the b est approximate path, whic h tak es: O nX ǫ + O ( n ) = O nX ǫ time. ✷ Note that the space requiremen t of our algorithm is O ( | V | ) = O n 2 X ǫ since w e are not storing E explicitly . Also note that using Dijkstra’s algo rithm with a 15 Fib onacci heap [ 11 ] instead o f the Bush whac k algorithm yields an ev en simpler algorithm with a prepro cessing time of O ( | V | log | V | + | E | ) = O n 3 X ǫ 2 . 4 Discretizing usi ng Steiner Poin ts in Geometric Progression Unlik e our first algorithm where the Steiner p oints on eac h edge are ev enly spaced, our second algorit hm places t hem non-uniformly along the edges. The Steiner p oin ts w e use here are of tw o kinds. W e first place Steiner po in ts in “geometric progression” along the edges, as done by Aleksandrov et al. [ 4 ]. W e call these p o in ts primary Steiner p o i n ts . Then w e place mor e Steiner p oin ts, called isohypse Steiner p oints , to guaran tee that for ev ery descending path in the terrain there exists a desc ending path through the Steiner p oin t s. Although the n um b er of Steiner p oin ts us ed in this techniq ue is more than in o ur fir st algorithm, the running t ime of the resulting algorit hm no longer dep ends o n the slop e of the edges. 4.1 A lgorithm 4.1.1 Pr epr o c essing Phase The primar y Steine r p oin ts ar e placed in suc h a w a y that for eac h v ertex v of an edge e , there is a set of primar y Steiner p oints whose distances fro m v for m a geometric pro gression. Although the distance b et we en a pair of conse cutiv e Steiner p oin ts on e increases as w e mov e a w ay from v , we can still guarantee a go o d appro ximation ratio. This is b ecause in tuitive ly the length of a segmen t connecting tw o edges adjacen t to v increases as w e mo v e the segmen t aw ay from v —see Lemma 11 fo r a more precise statemen t. One observ ation is that if w e w an t to main tain the geometric pro gression of t he distances for the Steiner p oin ts v ery close to v , w e w ould need infinitely many Stein er po in ts near v . T o av oid this pro blem, w e do not put an y primary Steiner p oin ts in a small region near v . Before going into f urt her details, w e will define a few constan ts for ease of discussion. Let δ 1 = ǫh 6 n , and δ 2 = ǫh 6 L . The constan t δ 1 will define a region near v where w e do not put an y primary Steiner p oints, while δ 2 will determine the distances b et ween consecutiv e primary Steiner p oints outside that region. Definition 9 (V ic inity of a V ertex) In a fac e f incident to a vertex v , let p 1 and p 2 b e two p oints lying on two differ ent e dges of f at v s uch that | v p 1 | = | v p 2 | = δ 1 . C l e arly, △ v p 1 p 2 is a n is o sc eles triangle. The vicinit y o f v is define d to b e the union of al l such isos c e l e s triangles ar ound v (Figur e 7 ). 16 v Fig. 7. Vicinit y of a vertex Note tha t the vicinities of an y t wo v ertices v 1 and v 2 are mutually disjoin t b ecause δ 1 < h 2 < | v 1 v 2 | 2 . In the prepro cessing phase, w e determin e the p ositions of the Steine r p oin t s as follo ws. First, on ev ery edge e = v 1 v 2 w e place primary Steiner points a t p oin ts p ∈ e suc h that | pq | = δ 1 (1 + δ 2 ) i for q ∈ { v 1 , v 2 } and i ∈ { 0 , 1 , 2 , . . . } . Then w e add up to 3 n isoh ypse Steiner p oints fo r each primary Steiner p oin t and for eac h v ertex, as follows. F or ev ery non-lev el edge e , and ev ery p oin t p that is either a primary Steiner p oint or a v ertex, we place an isohy pse Steiner p oin t at the p oint where e in tersects the horizontal plane through p (i.e., the plane z = h ( p )). After placing the Steiner p oin ts, w e construct a w eigh ted directed graph G = ( V , E ) and then construct a shortest path t r ee T ro oted at s in G in the same w ay as in our first algorithm (Section 3.1.1 ). 4.1.2 Query Phase The queries are handled in exactly the same manner as in Section 3.1.2 . 4.2 Corr e ctness a n d A nalysis F or t he proo f of correctness, w e fo llo w the same approac h use d in Section 3.2 : giv en an SDP P , w e first construct a path P ′ b y mo ving eac h in termediate no de of P upw ar d to the nearest Steiner p oin t, a nd then sho w tha t P ′ is descending and that it appro ximates P . This prov es the correctness of our algorithm b ecause the path returned by our algorithm is not longer than P ′ . Let P = ( s = p 0 , p 1 , p 2 , . . . , p k , v = p k +1 ) b e an SD P from s to v suc h that p i and p i +1 are tw o different b oundar y p oints of a common face fo r all i ∈ [0 , k − 1], and p k and p k +1 are t wo p oin ts of a common face. Let e i b e an edge of the terrain through p i for all i ∈ [1 , k ]; e i can b e a ny edge through p i if p i is a 17 v ertex. No w define path P ′ = ( s = p ′ 0 , p ′ 1 , p ′ 2 , . . . , p ′ k , v = p ′ k +1 ) as follows: for eac h i ∈ [1 , k ], let p ′ i = p i if p i is a v ertex o f the terrain; o therwise, let p ′ i b e the nearest p oint from p i in V ∩ e i suc h t hat h ( p ′ i ) ≥ h ( p i ). Lemma 10 Path P ′ is d esc ending, and the p art of P ′ fr o m s to p ′ k exists in G . PR OOF. The pro o f is exactly the same as in Lemma 4 . ✷ Lemma 11 F or a l l i ∈ [1 , k ] such that p i is not inside a vertex vicinity, | p i p ′ i | < ǫ 6 | p i − 1 p i | . p i p ′′ i p ′ i e i v i w i p i − 1 w ′ i e i − 1 q i (a) p ′ i p i p i − 1 e i − 1 p ′′ i v i e i w i w ′ i q i (b) Fig. 8. Boun ding | p i p ′ i | wh en the f ace angle at v i is (a) acute and (b) obtuse PR OOF. If p i coincides with p ′ i , the lemma f ollo ws trivially a s | p i p ′ i | = 0 . W e will now fo cus on the case when these t wo p oin ts do not coincide. Since p i is not ins ide a v ertex vicinit y , there is another Steiner po in t p ′′ i in e i suc h that p ′ i and p ′′ i lie on the opp osite sides of p i . Let v i b e the common v ertex of e i − 1 and e i , w i b e the other v ertex of e i , and q i and w ′ i b e tw o p o in ts in e i − 1 suc h that p i q i ⊥ e i − 1 and w i w ′ i ⊥ e i − 1 . Figure 8 depicts these v ertices and p oin t s, for b oth the cases that the face angle at v i is (a) acute and (b) obtuse. W e will first sho w that | p ′ i p ′′ i | < δ 2 | v i p i | , and then prov e the lemma using a prop ert y of similar tria ngles. W e ha v e t w o cases as follo ws. If | v i p ′′ i | < | v i p ′ i | , then b y construction: | v i p ′ i | ≤ (1 + δ 2 ) | v i p ′′ i | ⇒ | v i p ′ i | − | v i p ′′ i | ≤ δ 2 | v i p ′′ i | ⇒ | p ′ i p ′′ i | ≤ δ 2 | v i p ′′ i | < δ 2 | v i p i | , since p i lies strictly in betw een p ′ i and p ′′ i . On the other ha nd, if | v i p ′′ i | > | v i p ′ i | , then b y construction: 18 | v i p ′′ i | ≤ (1 + δ 2 ) | v i p ′ i | ⇒ | v i p ′′ i | − | v i p ′ i | ≤ δ 2 | v i p ′ i | ⇒ | p ′ i p ′′ i | ≤ δ 2 | v i p ′ i | < δ 2 | v i p i | , since p i lies strictly in b et w een p ′ i and p ′′ i . In b oth cases, | p ′ i p ′′ i | < δ 2 | v i p i | . W e ha v e: | p i p ′ i | < | p ′ i p ′′ i | < δ 2 | v i p i | = δ 2 | q i p i | · | v i p i | | q i p i | = δ 2 | q i p i | · | v i w i | | w ′ i w i | (since △ v i p i q i and △ v i w i w ′ i are similar) ≤ δ 2 | q i p i | · L h = ǫh 6 L · | q i p i | · L h (from the definition of δ 2 ) ≤ ǫ 6 | p i − 1 p i | (since | p i − 1 p i | ≥ | q i p i | ) . ✷ Lemma 12 F or a l l i ∈ [1 , k ] such that p i is on or insi d e a vertex vicinity, | p i p ′ i | ≤ ǫh 6 n . PR OOF. If p i is a v ertex, the lemma follows trivially since p ′ i = p i in this case. If p i is not a v ertex, let e i b e the edge containing p i , and v i b e the vertex whose vicinit y contains p i . It is no t hard to see that v i is a v ertex of e i b ecause δ 1 is strictly less than h . Let q i b e the primary Steiner p oint on e i whic h lies at distance δ 1 from v i . Clearly p i lies in line segmen t v i q i . Now p ′ i cannot b e outside line segmen t v i q i b ecause otherwise w e w ould ha ve c hosen either v i or q i as p ′ i . As a result, p ′ i also lies in line segmen t v i q i . Therefore, | p i p ′ i | ≤ | v i q i | = δ 1 = ǫh 6 n . ✷ Lemma 13 Path P ′ is a (1 + ǫ ) -app r ox imation of P . PR OOF. The length of P ′ is equal to: k X i =0 | p ′ i p ′ i +1 | ≤ k X i =0 | p ′ i p i | + | p i p i +1 | + | p i +1 p ′ i +1 | (from triangle inequalit y) 19 = k X i =0 | p i p i +1 | + 2 k X i =1 | p i p ′ i | (since p 0 = p ′ 0 and p k +1 = p ′ k +1 ) < k X i =0 | p i p i +1 | + 2 k X i =1 ǫ 6 | p i − 1 p i | + ǫh 6 n ! (b y Lemmas 11 and 12 ) = k X i =0 | p i p i +1 | + ǫ 3 k X i =1 | p i − 1 p i | + ǫhk 3 n ≤ k X i =0 | p i p i +1 | 1 + ǫ 3 + ǫhk 3 n < k X i =0 | p i p i +1 | 1 + ǫ 3 + 2 ǫh 3 , since k < 2 n b ecause the num b er of faces in the terrain is at most 2 n , a nd P has at most one segmen t in each face (L emma 3 ). Assuming tha t P crosses at least one edge of the terrain (otherwise, P ′ = ( s, v ) = P ), P k i =0 | p i p i +1 | ≥ h , and therefore: k X i =0 | p ′ i p ′ i +1 | < k X i =0 | p i p i +1 | 1 + ǫ 3 + 2 ǫ 3 k X i =0 | p i p i +1 | = 1 + ǫ 3 + 2 ǫ 3 k X i =0 | p i p i +1 | = (1 + ǫ ) k X i =0 | p i p i +1 | . Because P ′ is descending (Lemma 10 ), it follo ws that P ′ is a (1+ ǫ )-appro ximation of P . ✷ Observ ation 14 F or any r e al numb er x ∈ (0 , 1] , log ( 1 + x ) > x log e 2 . PR OOF. log(1 + x ) = log e · lo g e (1 + x ) = lo g e x − x 2 2 + x 3 3 − x 4 4 + x 5 5 − x 6 6 + . . . ! = lo g e x 1 − x 2 + x 3 1 3 − x 4 + x 5 1 5 − x 6 + . . . . Since eac h t erm in the outer parenthes es of the last expression is strictly p ositiv e, w e ha v e: 20 log(1 + x ) > log e x 1 − x 2 ≥ lo g e x 1 − 1 2 = x log e 2 . ✷ Lemma 15 Gr a p h G has less than 153 n 2 L ǫh log 6 nL ǫh no des and O n 3 L 2 ǫ 2 h 2 log 2 nL ǫh links. Mor e over, it has less than 51 nL ǫh log 6 nL ǫh no des along any e dg e of the ter- r a i n . PR OOF. W e will first compute an upp er b o und on the n um b er of prima r y Steiner p oints, which will then be used to prov e the lemma. Let n e b e the num b er of primary Steiner p oin ts on edge e . It is straigh tforw a rd to see that n e is at most 2 j , where j is the lar gest in teger satisfying t he follo wing inequalit y: δ 1 (1 + δ 2 ) j < L ⇒ (1 + δ 2 ) j < L δ 1 ⇒ j < log L δ 1 log(1 + δ 2 ) . Therefore, n e ≤ 2 j < 2 log L δ 1 log(1 + δ 2 ) < 2 δ 2 log e 2 log L δ 1 (Lemma 14 ) = 4 log e 2 · 6 L ǫh log L · 6 n ǫh < 16 . 64 L ǫh log 6 nL ǫh . Since there are at most 3 n edges in the terrain, the total n umber o f primary Steiner p oints is at most 3 nn e , whic h is less than: 50 nL ǫh log 6 nL ǫh . W e will now pro v e the last part of the lemma. F or each po in t p that is either a primary Steiner p oin ts and a v ertex, there is at most one no de in V ∩ e for an y edge e . This is obv ious when p lies on e . On the other hand, if p do es not lie on e , there is at most one isoh ypse Steiner p oint on e that corresp onds to p . Using the ab ov e b o und on the n um b er of primary Steiner p oin ts, w e ha ve: 21 | V ∩ e | < 50 nL ǫh log 6 nL ǫh + n < 51 nL ǫh log 6 nL ǫh (since L h > 1). W e will no w compute | V | and | E | . Let c = 51 nL ǫh log 6 nL ǫh for ease of discussion. Using the fact that the n umber o f edges is at most 3 n , w e ha v e: | V | < 3 nc = 153 n 2 L ǫh log 6 nL ǫh . Using the same argumen t w e used in the pro of o f Lemma 7 , we can say that the n um b er of directed links in E contributed b y eac h f of the terra in is less than 6 c 2 . Because there are at most 2 n faces, | E | < 12 nc 2 = O n 3 L 2 ǫ 2 h 2 log 2 nL ǫh ! . ✷ Theorem 16 Given a vertex s , an d a c onstant ǫ ∈ (0 , 1] , we c an dis cr e tize the terr ai n with at most 150 n 2 L ǫh log 6 nL ǫh Steiner p oints so that after a p r ep r o- c essing phase that takes O n 2 L ǫh log 2 nL ǫh time for a given vertex s , we c an determine a ( 1 + ǫ ) -appr oximate SDP fr om s to any p oint v in: (i) O ( n ) time i f v is a vertex of the terr ain o r a Steiner p oint, and (ii) O nL ǫh log nL ǫh time otherwise. PR OOF. The pro of is the same as in Theorem 16 except that w e use Lem- mas 13 and 15 instead of Lemmas 6 and 7 respectiv ely . As in the case of our first algorithm, w e can use D ijkstra’s algorithm with a Fib onacci heap [ 11 ] instead o f the Bush whac k alg orithm to hav e an eve n simpler algorithm with a prepro cessing time of O n 3 L 2 ǫ 2 h 2 log 2 nL ǫh . 5 Conclusion It may app ear that the running time can b e impro ve d b y using the tec hnique b y Aleksandro v et al. [ 6 ] who place Steiner p oints along the bisectors of the face angles. Although the tec hnique impro v es all previous resu lts on the W e igh ted Region Problem, it cannot b e used for the SDP problem v ery easily . The main 22 problem is that it is not clear ho w to prov e the existence of a fe asible path that appro ximates an SDP . When query point v is neither a v ertex of the t errain nor a Steiner p oin t , the query phase can b e made faster b y using a p oint lo cation da t a structure on eac h face. Note t ha t the V oronoi diagram on each face consists of hy p erb olic arcs. References [1] Mustaq Ahmed and Anna Lu biw. Shortest descending paths through giv en faces. In Pr o c e e dings of the 18th Canadia n Confer enc e on Computational Ge ometry , pages 35–38, Augus t 2006. Accepted for pub lication in CCCG ’06 Sp ecial I ssue of Computational Ge ometry: The ory and A pplic ations . [2] Mustaq Ahmed and Anna Lubiw. An approximat ion algorithm for sh ortest descending paths. CoRR , 0705.1364 v1 [cs.CG], Ma y 2007. [3] Mustaq Ahmed an d An na Lub iw. Prop erties of shortest descending paths. The 17th F all W orkshop on Computational and C om b in atorial Geometry , Ha wthorn e, New Y ork, No vem b er 2007. Extended abstract. [4] Lyudmil Aleksandro v, Mark Lant hier, Anil Mahesh w ari, and J¨ org-R ¨ udiger Sac k. An ǫ -app ro ximation algorithm for weig h ted shortest paths on p olyhedr al surfaces. In Pr o c e e dings of the Sixth Sc andinavian Workshop on Algorith m The ory , v olume 1432 of L e ctur e Notes in Computer Sci enc e , pages 11–22, Berlin, German y , 1998. Spr inger-V erlag . [5] Lyudmil Ale ksandrov, Anil Maheshw ari, and J¨ org-R ¨ udiger Sac k. Appro ximation algorithms for geometric shortest path problems. In Pr o c e e dings of the 32nd Ann ual ACM Symp osium on The ory of Computing , pages 286–295, New Y ork, NY, USA, 2000. A CM Press. [6] Lyudmil Aleksandro v, Anil Mahesh w ari, and J¨ org-R¨ ud iger Sac k. Determining appro ximate shortest p aths on we igh ted p olyhedral surfaces. J. A CM , 52( 1):25– 53, 2005. [7] John F. C ann y and John H. Reif. New lo we r b ou n d tec h niques for rob ot motion plann ing p roblems. In Pr o c e e dings of th e 2 8th A nnual Symp osium on F oundations of Computer Scienc e , page s 49–60, 198 7. [8] Siu-Wing Chen g, Hy eon-Suk Na, Antoine Vigneron, and Y a jun W ang. Appro ximate shortest paths in anisotropic regions. In Pr o c e e dings of the 18th A nnual A CM -SIAM Symp osium on Discr ete Algorithms , pages 766–77 4, Philadelphia, P A, USA, 2007. So ciet y f or I ndustrial and Applied Mathematics. [9] Mark de Berg and Marc J. v an Kreveld. T rekking in the Alps without freezing or getting tired. Algorith mic a , 18(3) :306–32 3, 1997. 23 [10] Mark de Berg, Marc J . v an Kreveld, Mark Overmars, and Otfried Sc h w arzk opf. Computation al Ge ometry: Algorithms and Applic ations . Springer-V erlag, Berlin, Germany , 2nd editio n, 200 0. [11] Mic h ael L. F redman and Rob ert E. T arjan. Fib onacci heaps and their uses in impro v ed n et work optimization algo rithms. J. ACM , 34(3):596–6 15, 1987. [12] Mark Lanthier, An il Maheshw ari, and J¨ org-R ¨ u diger Sac k. Shortest anisotropic paths on terrains. In Pr o c e e dings of the 26th Internationa l Col lo quium on Autom ata, L anguages and Pr o gr amming , pages 524–53 3, London, UK, 1999. Springer-V erlag. [13] Joseph S . B. Mitc hell and Ch ristos H. P apadimitriou. The w eigh ted region problem: finding shortest paths through a w eigh ted planar sub division. J. ACM , 38(1): 18–73, 1991. [14] Chr istos H. Pa padimitriou. An algorithm for shortest-path motion in three dimensions. Inform. Pr o c ess. L ett. , 20:259–263 , 1985. [15] Neil C. Ro we and Ron S. Ross. Optimal grid -fr ee path planning across arbitrarily-con toured terrain with anisotropic friction and gra vit y effects. IEEE T r ans. R ob ot. Autom. , 6(5):540–5 53, 1990. [16] Sasank a Ro y . Algorithms for some ge ometric facility lo c ation and p ath pla nning pr oblems . Ph D thesis, I ndian Statistical Institute, Kolk ata, In dia, 2008. [17] Sasank a Roy , S andip Das, and Subh as C. Nandy . Shortest monotone descen t path problem in p olyhed r al terrain. Comput. Ge om. The ory Appl. , 37(2):1 15– 133, 2007. [18] Sasank a Roy , Sac h in Lo dh a, Sandip Das, and Anil Mahesh w ari. Approxi mate shortest descen t path on a terrain. In Pr o c e e dings of the 19th Canadian Confer enc e on Computationa l Ge ometry , pages 189–1 92, August 2007. [19] Zheng Sun and Tian-Ming Bu. On discretiz ation methods for appro ximating optimal paths in regions with direction-dep end en t costs. Inform. Pr o c e ss. L e tt. , 97(4): 146–15 2, 2006. [20] Zheng Sun and John H. Reif. Bushwhac k: An approximat ion algorithm for minimal paths through pseud o-euclidean spaces. In Pr o c e e dings of the 12th International Symp osium on Algorithm s and Computatio n , pages 160–1 71, London, UK, 2001 . Springer-V erlag. [21] Zheng Sun and John H. Reif. On find ing energy-minimizing p aths on terrains. IEEE T r ansactions on R ob otics , 21(1):10 2–114, 2005. [22] Zheng Sun and John H. Reif. On finding appr o ximate optimal paths in w eighte d regions. J. Algorithms , 58(1):1– 32, 2006. 24
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment