Optimistic and Pessimistic Shortest Paths on Uncertain Terrains by Yury Kholondyrev B.Sc, The University of British Columbia, 2005 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF T H E REQUIREMENTS FOR T H E DEGREE OF Master of Science in The Faculty of Graduate Studies (Computer Science) The University Of British Columbia October 12, 2007 © Yury Kholondyrev 2007 11 Abstract In the Uncer ta in Terra in Shortest P a t h problem we consider a tr iangulated terrain with vertices having uncertain Z-coordinates: each vertex is denned as a (xj y, z~, z+) tuple, where the z coordinate of a vertex is uncertain and can be anywhere in the range from z~~ to z+. W e are looking for a p a t h (defined by its project ion to the X y - p l a n e ) such that, over all possible terrains, the p a t h is as short as possible. W e look at bo th pessimistic (terrain arranges itself to maximize the length of the path that we choose) and optimist ic (terrain takes the state that minimizes the length of our path) scenarios. W e restrict ourselves to walk only along the edges of the terrain. T h e unrestricted problem (when we are allowed to walk on the faces of the terrain) has been proven to be N P - h a r d in both pessimistic and opt imist ic sce-narios. W e prove that the edge-restricted pessimistic problem is N P - h a r d by providing a reduction from the S U B S E T - S U M problem and give a po lynomia l time a lgori thm for the edge-restricted optimistic problem. i i i Contents A b s t r a c t ii Contents i i i List of Figures iv Acknowledgements v 1 Introduct ion 1 1.1 Problem Statement 1 1.2 Motivation , 2 1.3 Related Work 2 1.4 Thesis Layout 3 2 Pessimistic Edge-Res tr ic ted Shortest P a t h 4 2.1 Introduction and Basic Observations 4 2.2 Gadgets 5 2.3 NP-hardness of pessimistic path 7 2.4 Precision Issues 9 2.5 Exponential Algorithm 10 2.6 Approximation Algorithm . . 11 2.7 Dijkstra-based Approximation Algorithm 12 3 Opt imis t i c Edge-Res tr ic ted Shortest P a t h 14 3.1 Introduction and Basic Observations 14 3.2 Algorithm design attempt 15 3.3 Discarding sub-optimal pseudo-straight paths 17 3.4 Polynomial-time Algorithm Proofs 17 3.5 Polynomial-time algorithm 22 3.6 Handling Uncertain Source and Target 23 4 Conclus ions and Future W o r k 24 4.1 Edge-Restricted Problems 24 4.2 Unrestricted Problems 25 A P r o v i n g the constant factor of 10 for the gadget* 27 Bib l iography 29 iv List of Figures 1.1 Some uncertain terrain with 4 faces and 5 vertices 2 2.1 Terrain can be adjusted to make the path longer by moving v up. 4 2.2 A gadget incrementing both UP and DOWN by the same constant. 6 2.3 A gadget changing UP - DOWN by a given constant 7 2.4 Ci + C2 is greater than 2C 0 = 2V2H2 for any non-zero Q 8 2.5 Some reduction from SUBSET-SUM. On the bottom half of the Figure, the line segments that are shifted down correspond to v2's, while the line segments that are shifted along Y-axis (moved up on the picture) correspond to v\S. Note that the gatgets only look the same on the picture and actually have different parameters 6 9 2.6 Splitting some vertex's uncertainty range into 4 buckets 11 3.1 The traversal can be made shorter if the angles are different. . . 14 3.2 Any optimal path must be piecewise pseudo-straight 15 3.3 A possible reduction from SUBSET-SUM 16 3.4 Growing cones starting at the lower extreme of v 18 3.5 Al l cone two rays above the dotted ray are dominated. 19 3.6 The rays in C2 below the dotted line are dominated 20 3.7 Short-cutting the rays above BOTTOMi 21 3.8 Two cones that only differ in their distances to the end point. . . 21 4.1 Triangles A and B are both dependent on the vertex v 25 4.2 The slope of the line ab can be arbitrarily large as both a and b are getting close to t; 26 Acknowledgements First of all, I want to thank my supervisor, W i l l Evans, for introducing this problem to me and guiding me through all the aspects of writing this thesis and submitting it as a paper for a conference. Next, I'm very grateful to David Kirkpatrick for agreeing to read my thesis and making a number of useful suggestions, including pointing out that the NP-hardness proofs in this thesis would not be complete without bit-complexity analysis. I would also like to thank Jack Snoeyink, whom I met at the Canadian Con-ference on Computational Geometry 2007, and who pointed out the weakness of the worst-case scenario model used in this thesis (additional measurements result in longer and longer worst-case length). Finally, I want to thank my A C M ICPC teammates, in particular Matthew Chan, Bartholomew Furrow and Anton Likhtarov, who agreed to listen to my ideas for the NP-hardness proofs and the algorithms presented in this thesis and made very useful comments. 1 Chapter 1 Introduction 1.1 Problem Statement Consider the following situation: you have a 3-dimensional model representing a terrain and you need to go from point s to point t on the terrain as fast as possible. The problem seems quite natural for any area that has a lot of hills/mountains/valleys, making it impossible to walk from s to t in a straight line (in 3D). We will assume that the fastest route from s to t is equivalent to the shortest path that lies on the surface of the terrain. It can be argued that going uphill requires more time than going downhill but we will only consider the problem of minimizing the path's length. It is very common in real life that the model (or map) of an area is inexact. We will try to account for any errors that a map may contain by introducing uncertainty. A commonly used model for a fixed (certain) terrain is a 3-dimensional triangular mesh. We will stick to the triangular mesh representation and let the vertices of the mesh account for uncertainty. We will mostly look at the paths that follow the edges of terrains, so it will be convenient to us to think of an uncertain terrain as a graph. An uncertain terrain is an undirected graph G = (V, E) and an uncertainty interval for each vertex v G V that is specified by its two extreme points v~ and v+ in 3D. The X arid Y coordinates of v~ and v+ are identical but their Z-coordinates may differ (v~ has smaller z-coordinate). The graph G embedded in the XY-plane using the XY-coordinates of its vertices forms a triangulation, possibly with holes. It is worth noting that the ability to have holes in the triangulation is not important from the point of view of finding the shortest path. Any hole can be patched by introducing an a very high mountain on its place, ensuring that no shortest path can go through it. An uncertain terrain defines a set of feasible fixed(certain) terrains; those whose projections to the XY plane match the projection of the uncertain terrain and whose vertices lie within the corresponding Z ranges. We will use the terms lower terrain (upper terrain) to refer to the case when all the vertices are placed at the lower (upper bounds) of their Z ranges. Within the model described above, a number of shortest path problems can be formulated. The problem can be unrestricted, when you are allowed to traverse the faces of the terrain, or edge-restricted, when you are only allowed to travel along the edges. The problem can be solved with the optimistic assumption, Chapter 1. Introduction 2 Z Figure 1.1: Some uncertain terrain with 4 faces and 5 vertices. when we assume that the actual terrain is the one that minimizes the length of the path that we choose, or the pessimistic assumption, when we assume that the terrain will have the worst shape possible. We will mainly look at the edge-restricted versions of the optimistic and the pessimistic shortest path problems. 1.2 Motivation The model only considers uncertainty of Z coordinates (and not X, Y) be-cause it is natural to have a large altitude error and a much smaller latitude and longitude error when constructing a terrain based on satellite images of mountainous areas [4]. 1.3 Related Work The unrestricted version of the shortest path on an uncertain terrain was considered by Chris Gray [1] in 2004. He proved that finding either optimistic or pessimistic shortest paths on an uncertain terrain is NP-hard using the tech-niques similar to those Canny and Reif [2]' used to prove NP-hardness of Eu-clidian shortest path among polyhedral obstacles in 3D. Our NP-hardness proof in Chapter 2 can be modified slightly (by replacing all triangles with holes, as described earlier) to become an alternative to Gray's proof for the pessimistic case. The problem of finding the shortest path on fixed (certain) terrains is well studied and there are a number of algorithms that solve it in polynomial time. Mitchell et al [3] showed how to solve the more general problem of finding the shortest path on an arbitrary polyhedral surface, which does not even have to be a terrain, in 0(n2 log(n)) time; where n is the number of edges in the polyhedra. The edge-restricted problem of finding the shortest path on a fixed terrain can be solved with Dijkstra's algorithm in 0(E + V log V) time. Chapter 1. Introduction 3 1.4 Thesis Layout In Chapter 2, we prove that the pessimistic edge-restricted version of the problem is NP-hard and give an e-approximation algorithm. Chapter 3 looks into the optimistic edge-restricted version of the problem and provides a poly-nomial time algorithm that solves it exactly. Finally, Chapter 4 summarises the results and mentions some intuitive attempts (that did not succeed) to design approximation algorithms for the unrestricted versions of the problem. Chapter 2 4 Pessimistic Edge-Restricted Shortest Path 2.1 Introduction and Basic Observations In the pessimistic case, we are looking for the "guaranteed" shortest edge-restricted path (a sequence of edges) between two vertices on an uncertain ter-rain. In other words, among all possible paths, we are trying to find the one that will be the shortest in the worst case over all possible terrains (a pessimistic assumption). We assume that the distance from any vertex to itself is zero, no matter what the vertex's uncertainty range is. Note that the worst case terrain for any path has vertices that lie at one of the extreme points of every vertex's Z range that the path goes through. To see that, first note that no shortest path will use the same vertex twice. Now, look at the Figure 2.1. The length of the path pq as a function of x is pq(x) = \/x2 + a2 + \J(c — x)2 + b2. The second derivative of pq with respect to x is a2/(a2 + x2)3/2 + b2/(b2 + (c — or)2)3/2 > 0. Because the second derivative is always positive, pq{x) cannot have maximums other than at the extreme points of the range on which it is evaluated. Figure 2.1: Terrain can be adjusted to make the path longer by moving v up. Chapter 2. Pessimistic Edge-Restricted Shortest Path 5 It is the uncertainty of vertices that makes the problem more difficult than the standard shortest path problem in a graph. We cannot even tell what the distance from a fixed point to any given vertex is. Vertices are actually ranges and may contain an infinite number of points, so we would have to provide a distance to every one of those points to specify the distance to a vertex. Fortunately, as we noticed above, in the pessimistic case only the distances to the extremes of every vertex are interesting to us. Most shortest path algorithms work in polynomial time by computing a short-est path tree from the source vertex to all the vertices in the graph by gradually expanding the set of vertices to which the shortest paths are known. That works because, in most cases, the shortest paths are composed of smaller short-est paths. Our case is quite different, we cannot just store the shortest distance to a vertex as we grow our shortest path tree. We should take into account where in the Z range that path ends. Knowing that it must end at one of the extreme points, let us define a path measure that consists of two values, UP and DOWN, for a path from the source to a given vertex v that guarantees distance of at most UP to v+ and at most DOWN to v~. These measures, in contrast to the distances that are used when running Dijkstra's or Bellman-Ford's algorithms, are no longer totally ordered scalars. There is no way to say, for example, which measure is better, (1,3) or (3,1), even though (1,1) is obviously better than (3,3). As a result, we cannot solve the pessimistic edge-restricted shortest path problem directly by Bellman-Ford's or Dijkstra's algorithms because we cannot always compare two measures to decide which one is smaller. We say that (1,1) dominates (3,3) and, in general, (a,b) dominates (c, d) if a < c and b < d or o < c and b < d. We also say that the path with measure (a, b) dominates the path with measure (c, d) and that measure (a,b) is better than measure (c, d). 2.2 Gadgets Potentially, every path that does not visit the same vertex twice and goes from the source vertex to the target vertex may have a distinct measure. It seems natural that if we can prevent those paths from being dominated by one another and make sure that there are an exponential number of them, we will end up with a "hard" problem instance. Looking at every possible non-dominated path will be inefficient and we will not be able to use a standard shortest path algorithm for the reasons outlined in the previous paragraph. Consider the chain of three vertices in Figure 2.2, which are evenly spaced along the X-axis. All of them have the same Z uncertainty range. Note that we can rotate vertices u and w around the Z-axis at the vertex v as we wish without changing the distances C and D. Chapter 2. Pessimistic Edge-Restricted Shortest Path 6 Figure 2.2: A gadget incrementing both UP and DOWN by the same constant. Let's assume that there is a path with measure (UP, DOWN) to the vertex u. W h a t distance can we guarantee to the t o p / b o t t o m of vertices v and w? T a k i n g into account that we desire the worst case path length, the vertex v wil l get a path with measure (max( UP + D, DOWN + C), max( UP + C, DOWN + £>)). If the absolute value of the difference between UP and DOWN is negligible compared to the absolute value of the difference between C and D (i.e. | UP — DOWN\ < \C - D\), then vertex v can be reached in: (DOWN + C, UP + C) because C is clearly greater than D. Fol lowing the same idea, vertex w can be reached in (UP + 2C, DOWN + 2 C ) . In other words, we have just constructed a gadget (let's call it gadgetl) that allows us to transform a path measure (UP, DOWN) at u into a path measure (UP + a, DOWN + a) .at w, where a = 2 C , subject to the restrictions mentioned above. Note that this gadget preserves (UP — DOWN) and increments (UP + DOWN) by 2a as some path goes through it. A l s o note that the projections of the vertices u, v, and w on the X, F - p l a n e need not be colinear since it is only the lengths C and D that matter. Now, consider a slightly different chain shown in F igure 2.3. O n c e again, the three vertices may not be colinear in the X, y - p l a n e . Let's name the longer cross-link C\ and the shorter cross-link Ci- T h e n a path measure (UP, DOWN) at vertex u wil l get converted into (UP + 2C\,D0WN + 2C2) at vertex w (this time we assume that | UP — DOWN] <C IC2 — B\). In other words, this chain (gadget2) converts a path measure (UP, DOWN) at vertex u into (UP + a + b, DOWN + a - b) at vertex w if we set a = C\ + C2 and b = C i - C 2 . Note , that the transformation increments (UP + DOWN) by 2a (just as gadgetl) and increments (UP - DOWN) by 2b. Chapter 2. Pessimistic Edge-Restricted Shortest Path 7 Q ... B B c,/ '••A ... B w B H X Figure 2.3: A gadget changing UP — DOWN by a given constant. With four vertices, u, vi, v2 and w, we can build a gadget* that combines gadgetl and gadget2 in parallel; that is, u, vi and w form gadgetl while u v2 and w form gadget2. In this way a path to u with measure (UP', DOWN) creates two paths with measures (UP+a, DOWN+a) and (UP+a+b, DOWN+ a — b) at w. Let us define the gadget* with a parameter b more precisely. First, we create a gadget2 with u = (0,0, [0,H]), v2 = (H,0,[-Q,H - Q}) and w = (2H,0, [0,H]). In order to satisfy the condition C\ — C2 = b, Q should be set to bv/(8H2 - b2)/(4H2 - b2)/2. Once the gadget2 is fixed, we have to choose the location for the vertex v\ of gadgetl such that C\ + C2 = 2C (this will make the parameter a for both gadgets the same). We place v\ at (H, y\, [0, H]), where yi = \J((C\ + C2)/2)2 — 2H2. Note that y\ will always be a positive real number since C\ + C2 is greater than 2y/2H (by triangle inequality, see Figure 2.4). We must also set H to be large enough so that we force any pessimistic path to alternate top and bottom points of the vertices as it goes through both gadgets. It can be shown that, if both \UP — DOWN] and b are at most some constant 3, setting H = 108 will force any pessimistic path to alternate the top and bottom points (See Appendix). 2.3 NP-hardness of pessimistic path If we connect N gadget*'s into a chain and choose appropriate (for example, powers of 2) values of b for each gadget*, we will create an exponential number Chapter 2. Pessimistic Edge-Restricted Shortest Path 8 u. H H H Figure 2.4: C\ + C 2 is greater than 2C 0 = 2V2H2 for any non-zero Q. (2N, in the powers of 2 case) of non-dominated paths from the first gadget to the last gadget. Any of those paths can be forced to be the only possible prefix of the optimal pessimistic path to an appropriately (see step 3 of the following construction) placed target vertex t, connected to the last gadget. We can now use that property to reduce SUBSET-SUM to our problem. T h e o r e m 1. The pessimistic edge-constrained shortest path problem on uncer-tain terrain is NP-hard. Proof. Given a set 5, of N positive integers and a target sum, T, construct a shortest path problem instance, as shown in Figure 2.5, in the following way: 1. Set the parameter H of all gadget*'s to H = 20 Ylxes x-2. Construct a chain of N gadget*'s from a vertex s to a vertex w such that the parameter for the k-th gadget equals the k-th number in 5. Note that our construction guarantees that | UP — DOWN\ will never become greater than 2 ^ I g S a ; for any of the path measures along the chain. 3. Create a vertex t, and put it at distance H + T from w~ and at distance H — T from w+, set t+ = t~ and connect t and w with an edge. Let A = J2k=i a k b e t n e s u m °f t n e a ' s f ° r a u gadgets. Feed the shortest path problem into a black box to get the shortest path distance between s and t. If the answer equals A + H, there is a way to make up the target sum using the numbers in 5, otherwise (you can only get a bigger answer) it is impossible. A shortest path of length A + H implies that there is a way to get to the last vertex of the chain via a path with a measure (A + T, A — T) or better. By construction, we can only guarantee path measures of the form (A + x, A — x) at the last vertex, w, of the chain. Clearly, the only x that can give us the required Chapter 2. Pessimistic Edge-Restricted Shortest Path 9 Figure 2.5: Some reduction from SUBSET-SUM. O n the b o t t o m half of the Figure , the line segments that are shifted down correspond to V2's, while the line segments that are shifted along Y - a x i s (moved up on the picture) correspond to vi's. Note that the gatgets only look the same on the picture an d actually have different parameters b. distance is T. A l so , because we started with the measure (0,0) at t and only applied transformations of the form {UP,DOWN) -* {UP - fa, DOWN f a ) an d (UP, DOWN) -> (UP + a + b,DOWN + a-b), where 6's are the numbers from S and A is the sum of all a's, we must have formed T by adding some elements of 5. If T is a subset sum of S, one can traverse the chain from the source by following gadgetl if the corresponding number in S should not be used to make up T and gadget2 otherwise. Clearly, the resulting path wil l have length A + H. • 2.4 Precision Issues T h e NP-hardness proof, as presented, assumes that we can perform exact (infinite precision) arithmetic operations such as taking square root of a real number, in constant time. In real life that is not the case because we are restricted to use only a finite number of bits to represent each coordinate. W e have to spend some non-constant, but still po lynomia l on the number of bits, amount of t ime for every arithmetic operation. T o make the proof complete, we need to show how to choose the number of bits to use for every coordinate in our reduction such that it still takes only po lynomia l t ime to construct the shortest path problem instance that solves a given subset sum problem instance. If we round all the coordinates to have a finite number of bits of precision, we might not get the exact integer length for some paths going through the chain. Chapter 2. Pessimistic Edge-Restricted Shortest Path 10 However, as long as our use of approximate coordinates does not change the length of any path by 0.5 or more, we can round the length of the shortest path to the closest integer and still have the solution to the subset sum problem. Every path fr<om s to t through the chain that we construct during the re-duction will have exactly 2N + 1 edges. If each coordinate differs from its exact value by at most e then we introduce an error of at most 2e\/3 per edge or 2es/3{2N + 1) for the whole path. Solving 2ev/3(2iV + 1) < 0.5 for ep-silon, we get e < 0.25/(v/3(2Ar + 1)), which means that it is sufficient to store FS = 1 - log2(0.25/(v>3(2Ar + 1))) = 3 + log2(V3(2N + 1)) bits to represent the fractional part of each coordinate with sufficient precision. In addition, we need to store the integer part of each coordinate. The number of bits needed to store the integer part is IS = 1 + \og2(H(2N + 1)). The size of the original subset sum problem is at least PS = N + log2(iJ/20) because we set H = 2®J2xeSx- Note that \og2(H/20) in the expression for PS is never negative. FS is polynomial on PS because it is polynomial on N. IS = 1 + log2 H + \og2(2N + 1) is polynomial on PS because log2 H is polynomial on log2(fl"/20) and log2(2./V -f 1) is polynomial on TV. It follows that the whole reduction is polynomial in space and time because we only need to do a linear number of polynomial-time computations to get the linear number of coordinates, each approximated up to a polynomial number of bits. 2.5 Exponential Algorithm Using the idea of (UP, DOWN) measures, we can generalize the Bellman-Ford algorithm to solve our problem. We start by associating a set of non-dominated path measures with every vertex. We initialize the source's set to contain only one path measure, (0, 0), while the rest of the vertices are initialized to contain empty sets. An edge relaxation step using the edge (u, v) takes every measure (UP, DOWN) from the set at vertex u and adds (UP*, DOWN*), where UP* = m&x(UP+\\u+ -v+\\,DOWN+\\u~ -v+\\) DOWN* = m a x ( £ / P + \\u+ -v~\\,DOWN + \\u~ -v~\\) to the set of measures at v as long as (UP*, DOWN*) is not dominated by an existing measure at v. By doing so, we will record the all the measures that correspond to shortest paths going through k or fewer edges after k-th iteration. If we relax all the edges - 1 times (the number of edges in the pessimistic shortest path can be at most |V| — 1), the sets of non-dominated path measures at every vertex are guaranteed to stop changing. At that point, we can compute the pessimistic shortest path distance to a vertex by looking at all the path measures in its set and choosing the measure that guarantees the shortest distance in the worst case. Note that a measure (UP, DOWN) guarantees the distance of max( UP, DOWN) in the worst case. Chapter 2. Pessimistic Edge-Restricted Shortest Path 11 We say that the algorithm is a generalization of Bellman-Ford only because it, just as Bellman-Ford, does |V| — 1 relaxation steps. That guarantees that we will consider every possible path that goes through at most |V| — 1 edges (possibly eliminating some dominated paths early on). It provides no polynomial bound on running time or memory usage since the number of non-dominated path measures associated with a vertex can be exponential, as we demonstrated earlier by the subset sum reduction. 2.6 Approximation Algor ithm To construct an approximation algorithm, we limit the number of paths that can be stored at any vertex. Note that any path measure (UP, DOWN) at a vertex v will have the property: | UP — DOWN] < \\v+ — v~\\. We will allow every vertex to hold only Q measures. We introduce Q buckets of size 2| UP - DOWN\/Q covering all possible values of UP - DOWN and record only the "best" measure for every bucket. For example, if for some vertex v, \\v+ — v~\\ = z, then any measure's (UP — DOWN) will fall into the interval [—z, z]. For Q = 4, we would split that interval into buckets [—z,—z/2], (—z/2,0], (0,z/2] and (z/2,z\\ a measure (1,1) would fall into the second bucket, while (100,100 + z) would fall into the first. We decide which measure within the same bucket to keep by adding up its components and selecting the measure with the smallest sum. U-D = z U-D = -z Figure 2.6: Splitting some vertex's uncertainty range into 4 buckets. In Figure 2.6 there are four measures falling into the same bucket. Out of those, we retain only the measure ir and discard ip, 9 and p. Note that we can potentially discard a path measure whose path may be the prefix of a guaranteed shortest path. T h e o r e m 2. The approximation scheme that stores 1/e measures at every ver-tex (as described above) will find a path with guaranteed length at most (1 + 2e) Chapter 2. Pessimistic Edge-Restricted Shortest Path 12 times longer than the optimal path. Proof. Let's say that the optimal path goes through vertices v0 = s, v\, v2, • • •, vn — t with uncertainty ranges of ZQ, Z \ , Z 2 , • •••, zn. Cal l the measures of the prefixes of the optimal path {UP0, DOWN0), (UPu DOWN),... ,(UPn, DOWNn). We claim that after iteration i the approximation algorithm introduces a path mea-sure (UPi + e Y^l=i zk, DOWNi + e Ylk=i zk) o r better at vertex t>j. First, note that our claim is obviously true for i = 0. Assume that we introduced a measure ( W i - i +ey j f e= i zk, DOWN i-i+eY?k~2\ zk) ( o r better) at Vi-i at iteration i — At iteration i, we relax the edge (vi^iVi). The relaxation operator applied to (UPi-i, DOWNusing the edge ( u i _ i , U j ) results in the measure (UPi, DOWNi) at the vertex Vi, where: UPi = max( UP^ + \\vf_! - v+lDOWN^ + \\v~_, - v+||); DOWNi = max( + ||w,t1 - v7\\, DOWN i-i + IK^ - v~\\); Because max is a linear operator, if the same operation is applied to a measure (UPi.x+C, DOWNi-i+C), it will get transformed into (UPi+C, DOWNi+C), for any constant C. For that reason, a measure (UPi-i+e ]Cfc=i zk, DOWNi-i + e E I = \ -*fc) a t w i l 1 i t l d u c e (UPi + 6^1=1 zk,DOWNi + e'£X}1 zk) at u 4. It is quite possible that we had a better measure at but that can only make the induced measure at Vi better. The induced measure, however, might not get stored at a bucket and, if stored, might be over-written later during the same iteration. In both cases, the measure that stays in the bucket at the end of the iteration i cannot be more than ezt greater (in either component) than the originally induced measure because the value of UP + DOWN will be no greater than that of the originally induced measure. The worst case arises when two measures fall close to the opposite ends of a bucket and have exactly the same UP + DOWN. Note that the length of the optimal pessimistic path is at least z\/2 + z2/2 + • • • + zn/2 because, even if the vertices were infinitely close, the path can be forced to go through the further extreme point at each step (remember, we are looking at the worst case). Here is what we have: the length of the optimal path is at least (z\ + z2 + ... zn)/2. The extra length due to discretization is at most e(zi + z2 + ... zn). • Theorem 2.shows that we can utilize the Bellman-Ford-like algorithm de-scribed above to get a solution that is at most (1 + e) times worse than the optimal in 0(|jE||V|/e) time, assuming that each arithmetic operation takes a constant time. 2.7 Dijkstra-based Approximation Algor ithm We can relax edges around a single bucket (as opposed to relaxing all the edges at the same time) to get a Dijkstra-based algorithm. Let (d£(v), d^(v)) be the path measure in the 6-th bucket (6 = 1... Q) at vertex v. In the beginning, we initialize all the buckets to contain measure (oo, oo) (except one bucket within , Chapter 2. Pessimistic Edge-Restricted Shortest Path 13 the source vertex, which we initialize to (0, 0)) and put them into a set S. At each step we choose a bucket 6 at a vertex v such that d£(v) + d^(v) is minimum among all the measures that are still in S. We then relax all the edges around v using the measure (d£(v), d^(v)), possibly improving some measures that are still in S, and remove the measure (d£(v), d^(v)) from S. Once (djj"(u), d^(v)) is removed from 5, no pair with smaller sum for that bucket can be discarded because the relaxation operator can only increase the sum of the pair. The resulting algorithm is somewhat simular to Dijkstra's algorithm on a graph with \E\Q edges and \ V\Q vertices (buckets). The algorithm finds a solution that is at most (l + e) times worse than the optimal and runs in 0 ( | £ | Q + |V|Qlog(|V|Q)) time. Note that, similar to what we often do in the Dijkstra's algorithm, we can terminate early after removing all the path measures of the destination vertex from S. Chapter 3 14 Optimistic Edge-Restricted Shortest Pa th 3.1 Introduction and Basic Observations Having realized that the pessimistic version is NP-hard, we will look at the optimistic version of the problem. Now the problem is to find a path between two points such that, over all feasible terrains, its length is as short as possible. Within this formulation, the problem seems to become even more difficult — the best-case terrain no longer have to take a shape such that the optimal path traverses only the extreme points of a vertex's Z range. But, at the same time, if some optimistic shortest path traversal does not go through an extreme point, it should preserve its slope relative to the ground (XY-plane) as it passes through the vertex. Otherwise, it would be possible to find a consistent terrain on which the path is shorter, see Figure 3.1. AZ X —=»-Figure 3.1: The traversal can be made shorter if the angles are different. Note that even though the above example is really 3-dimensional and can, in general, be not planar, we can always flatten a path by rotating it around the Chapter 3. Optimistic Edge-Restricted Shortest Path 15 Z-axis at every vertex that the path goes through so that the edges of the path become co-planar with the XZ plane. 3.2 Algor ithm design attempt A pseudo-straight traversal of a path <j> = v\, v2, • •. ,«fc (a sequence of uncer-tain terrain vertices) is a sequence of points (in 3D) p\,P2, • • • ,Pk such that pi lies in Vi's uncertainty interval and the line segments Pi-iPi and Pipl+T obey the incoming—outgoing angle property for all i = 2,..., k — 1. We call a pseudo-straight traversal that starts at an extreme point of some vertex a pseudo-straight ray. If it also ends at an extreme point, we call it a pseudo-straight path. It follows from our earlier observation that any optimal path (assuming both source and destination points have a zero Z range) will be composed of one or more pseudo-straight paths connected at extremes of some vertices. The picture below shows some possible shortest path traversals from s to t. Note that the paths have been flattened. Figure 3.2: Any optimal path must be piecewise pseudo-straight. Keeping the properties of any shortest path in mind, the most intuitive at-tempt to solve the problem is to find all the pseudo-straight paths and treat them as the only edges that can be used to traverse the uncertain terrain. All that we need to do (provided we have pre-computed all the pseudo-straight paths) is to run any shortest path algorithm on the resulting graph (with 2n vertices). Unfortunately, not only can the number of pseudo-straight paths be exponential, but also the problem of deciding if there is a pseudo-straight path between any two given points is NP-hard. T h e o r e m 3. The problem of deciding if there is a pseudo-straight path between two certain (zero Z range) points on an uncertain terrain is NP-complete. Chapter 3. Optimistic Edge-Restricted Shortest Path 16 Proof. The idea is to use (again) a reduction from S U B S E T - S U M . If we construct an uncertain terrain in such a way that there is an exponential number of pseudo-straight paths from a (zero Z range) vertex s to a (zero Z range) vertex g, then the slopes of those paths will be determined by the paths' lengths only. We can then add a vertex t (also zero Z range) and connect it to the vertex g in such a way that only the pseudo-straight paths with a certain slope (length) can make it through while remaining pseudo-straight. If we use the idea of the earlier NP-hardness proof of creating a chain such that every pseudo-straight path from s to g corresponds to a subset sum of a given set of numbers, we can decide the S U B S E T - S U M problem by reducing it to the pseudo-straight path existence problem. The picture below illustrates what a reduction may look like. The horizontal distance difference between going through a triangle using its top two sides and using its bottom side corresponds to a number from the set. Figure 3.3: A possible reduction from S U B S E T - S U M . More strictly, given a set S of N numbers and a target number T, we set H = 10yj x e S a; and create a sequence of n triangles as in Figure 3.3. The base of each triangle will have length H. Vertices s and g are placed at s+ = s~ = (0,0,0) and g+ = g~ = (NH,0,1) (we use x,y,z order). All the vertices between s and g will have z = [0,1]. The greater-y vertex of the i-th triangle in the construction is placed in such a way that traversing the z-th triangle using it (the vertex) takes di units of horizontal length more than traversing the same triangle using its base, where di is the i-th number from S. For example, if the first element of S is d, we will set u = (H/2, \/2Hd + d2/2, [0,1]). The vertex t is placed in such a way that the slope of the line gt is exactly 1/(NH + T) (note that we have ruled out cycles with our choice of H). A pseudo-straight path between s and t will exist if and only if some subset of S adds up to T. Same as in the pessimistic edge-restricted shortest path NP-hardness proof, we cannot represent all of the coordinates exactly, but we can approximate them with only a polynomial (yet sufficient) number of bits and set the uncertainty range of t such that only paths whose slopes are close to 1/(NH + T) can make it through. • Chapter 3. Optimistic Edge-Restricted Shortest Path 17 An important thing to notice about the terrain produced in the above reduc-tion is that while deciding the existence of a pseudo-straight path from s to t is NP-hard, finding the optimistic shortest path from s to t is trivial. All you have to do is to follow the lower (smaller y) sides of the triangles to get to vertex g from vertex s in a straight line and then follow the edge (g,t). You don't really care if that path traversal is pseudo-straight, it will be an optimal optimistic edge-restricted shortest path even if it does not have a pseudo-straight traversal. 3.3 Discarding sub-optimal pseudo-straight paths In the previous example, we have an exponential number of pseudo-straight paths from s to g, but only one of them is potentially the prefix of an optimistic shortest path to t. All of the paths from s to g have the same starting and ending points and, out of those, only the shortest one can be optimal (or be a prefix of an optimal shortest path). The rest cannot be a part of any shortest path because they can be short-cut, i.e., replaced by a path with a shorter optimistic length. A pseudo-straight traversal pi, p2 ... pk of a path <f> = vi, v2 •. • is dominated if there exists a path <j>' from vi to Vk with a shorter optimistic length from p\ to pt. Note that the optimistic length from p\ to pk via <p' might not be realized by a single pseudo-straight traversal. We already know that we can find the optimistic shortest path distance by running Dijkstra's algorithm on a graph that connects two extreme points of two vertices with an edge of length D if there exists a pseudo-straight path of length D between them. We also know that some of the pseudo-straight paths (the dominated ones) cannot contribute to any optimistic shortest path; so we will try to build a graph that contains all the non-dominated pseudo-straight paths and (possibly) some dominated ones. If we manage to build a graph that has the properties described above in polynomial time (that also implies that the size will be polynomial), we will be able to solve the optimistic shortest path problem in polynomial time by running Dijkstra's algorithm on that graph. 3.4 Polynomial-time Algorithm Proofs We will build a graph of pseudo-straight paths with the desired properties by finding all non-dominated pseudo-straight paths from one extreme point at a time. For that one extreme point, we will compute all the pseudo-straight paths with non-negative slope independently from the ones with non-positive Chapter 3. Optimistic Edge-Restricted Shortest Path 18 slope. Note that if we can find all the non-dominated pseudo-straight paths with non-negative slope that start at a given extreme point in polynomial time, we can repeat this 4|V| times to compute all the non-dominated pseudo-straight paths. The cone C((j>) for a path cp = vi,v2, • • • ,Vk is the set of all pseudo-straight rays through <p starting at a specified extreme point e of v\. We will some-times restrict cones to only contain rays with non-positive (or non-negative) slope. Starting at an extreme point e of some vertex v, we will grow cones of potential non-dominated pseudo-straight rays with non-negative slope (the non-positive case is symmetric). Each such cone will have the point e at its origin and two bounding points that limit the maximum and minimum slopes of the cone. We will store the horizontal distances to both bounding points and the bounding points (those must be extremes of some vertices) for every cone. We will also store the ending vertex / and the horizontal distance to that vertex for every cone. In other words, with each cone we store a 7-tuple (e,u,l, f,d(u),d(l),d(f)), where e is the origin, u and / are upper and lower bounding vertices, and d(f) is the horizontal distance to vertex / from e. We call the first four entries of the 7-tuple the label of the cone. We call two cones identically labeled if e,u,l and / are the same for the two cones. There might be no lower-bounding point for some cones (because we restrict ourself to non-negative slopes). In that case we set the lower bounding label I = 0. Figure 3.4: Growing cones starting at the lower extreme of v. There are 4 different cones in Figure 3.4. The cones ending at the vertices n, m and p are very simple — they all have their bounding points belonging to their final vertex. The cone that ends at the vertex q has its bounding points as p+ and p~~. Chapter 3. Optimistic Edge-Restricted Shortest Path 19 We will call a cone dominated if every pseudo-straight ray belonging to the cone is dominated. The lemmas 1 through 4 are dealing with cones restricted to non-negative slopes. L e m m a 1. If two cones are identically labeled then either one of them is domi-nated or they are exactly equivalent (if we continue growing the cones, they will be indistinguishable). We will use the following lemmas to prove Lemma 1. L e m m a 2. If there are two identically labeled cones and they have different distances to the upper-bounding point, then the cone with the greater distance to the upper-bounding point is dominated. X Figure 3.5: All cone two rays above the dotted ray are dominated. Proof. Figure 3.5 shows two identically labeled cones, C\ = (e, u, I, /, d\(u), d\(l), di(f)) and C 2 = (e,u,l,f,d2(w),d2(/),^(f)), whic have been flattened. C\ is the cone that has shorter distance to u; it is bounded by the pseudo-straight rays TOPx and BOTTOMx (TOP2 and BOTTOM2 bound cone C 2 ) . The two thick lines indicate the subset of the Z-range at vertex u that lies within both cones. There are two lines since the the projection of the Z-range at vertex u occurs at two different X-coordinates, d\(u) and d2(u). Since d\(u) < d2(u), the thick lines indicate points in the Z range at u that can be reached via pseudo-straight lines from C\ before any pseudo-straight line from C 2 . Even though this might look like a very specific example, any two identically labeled cones will have an overlapping region at the upper bounding vertex. It should be clear that the cone whose distance to the upper bounding vertex Chapter 3. Optimistic Edge-Restricted Shortest Path 20 is greater will always have that region dominated. The only pseudo-straight rays in C 2 that are not dominated in this way lie below the dotted ray. Note that the dotted ray will never have slope greater than the ray BOTTOM\ (by construction). That implies that if any ray of C 2 is still not dominated, then the distance to the lower-bounding vertex is greater for C 2 . If there is no lower-bounding vertex for both cones, then we are done. z(Cl dfl) df) Figure 3.6: The rays in C2 below the dotted line are dominated. Figure 3.6 shows that any ray of C 2 that lies below the dotted line can be short-cut. Consider the ray eq2 within C 2 , where q2 is a point in Vs uncertainty interval. All we have to do is to go from e directly to the lower-bounding point l~ via Ci and, once we reach the vertex, w, that precedes I at the point p of IU'S uncertainty range, go to the destination qi in a straight line. Note that qi and q2 are the same point within I's uncertainty interval. Because (w, I) is an edge of the terrain, this creates a traversal composed of a pseudo-straight ray and a pseudo-straight traversal of edge (w, I) that dominates the corresponding ray in C 2 . • L e m m a 3. If there are two identically labeled cones whose distances to the upper-bounding point are the same, but the distances to the lower-bounding point are different, then the cone with greater lower-bounding distance is dominated. Proof. Note that in this case all the rays lying below or at BOTTOMi will be dominated by the same reason as was shown in the second part of the proof to Lemma 2. For the rays that have greater slope we can use a similar technique, see Figure 3.7, ||e — p\\ + \\p — q\\\ is always shorter than ||e — 92II- d L e m m a 4. If there are two identically labeled cones and they only differ in the distance to their final vertex, then the cone with the longer distance is dominated. Chapter 3. Optimistic Edge-Restricted Shortest Path 21 d(f} d(fA Figure 3.8: Two cones that only differ in their distances to the end point. Proof. On Figure 3.8 the final (identical) vertices are named f\ and f2 for the two cones. This case is almost identical to the previous two, \\e — p\\ + \\p — q\\\ is always shorter than 11 e — qr 21j. • It should be clear that two identically labeled cones that have exactly the same parameters are equivalent. Lemmas 2 through 4 together prove Lemma 1. Chapter 3. Optimistic Edge-Restricted Shortest Path 22 3.5 Polynomial-time algorithm Lemma 1 leads immediately to a polynomial time algorithm. We can compute a graph that contains all the pseudo-straight paths we need (there is only a polynomial number of them) by expanding cones of pseudo-straight rays from every extreme point (both non-negative and non-positive slopes). Algorithm 1 shows how we expand an extreme point e assuming that we are looking for non-negative slopes. The function dominant(C\, C2) returns C\ if C\ dominates C> and returns C2 otherwise. Algorithm 1 Single Extreme Positive Slope Extention Algorithm Let A be an associative array of cones indexed by cone label. Input: G = (V, E), extreme point e of some vertex v € V. Initialize A to contain C((v,r)) for all edges (v,r) € E. for i = l,i< \V\ do A' = A (iteration starts) for all C £ Ado Let / be the final vertex of C. for all edges (/, r) £ A do let C be C extended to r. if C" ^ 0 then let (e,u,l,r) be the label of C A'[(e, u, I, r)] — dominant(A'[(e, u, I, r)],C) end if end for end for A = A' (iteration ends) end for. For every extreme vertex e and for either non-positive or non-negative slope, we use Algorithm 1 to calculate a set of pseudo-straight paths that contains all non-dominated pseudo-straight paths starting at e. We add these paths as edges to a graph Gps. We then run the Dijkstra's algorithm on Gps to find the edge-restricted optimistic shortest path on the uncertain terrain. T h e o r e m 4. We can find the edge-restricted optimistic shortest path on an uncertain terrain G = (E, V) in 0(\V\4\E\) time. Proof. We run Algorithm 1 0(|V|) times. Algorithm 1 does 0(|V|) iterations, each of them taking 0 ( | V | 2 | £ | ) time, assuming |V| < \E\. Fetching the pseudo-straight paths after Algorithm 1 is done takes 0( |V| 3 ) , as we only look at all possible cone labels that originate at e. The final application of Dijkstra's algorithm takes 0( |V| 2 ) time because Gps contains 0(|V|) vertices (extreme points). That adds up to 0 ( | V | 4 | £ | ) total running time, dominated by the time required to construct Gps. • Chapter 3. Optimistic Edge-Restricted Shortest Path 23 3.6 Handling Uncertain Source and Target We can generalize our approach to handle uncertain source, s, and target, t, vertices. Note that any optimistic path to an uncertain vertex t whose traversal does not end at a vertex's extreme point should be co-planar to the XY-plane at the point where it reaches t. That means that the pseudo-straight ray that forms the last link of the traversal has zero slope. All such zero slope pseudo-straight rays will belong to a cone from the set A that we get after running Algorithm 1 from some extreme point. We can look at all of the pairs of extreme points (s1, t') and, assuming that the optimal path goes to s' from s and comes to t from t' along pseudo-straight rays with zero slope, find the optimistic edge-restricted shortest path between s and t. We allow s' = t'. Note that there will always be a solution that includes at least one extreme point. During the construction of Gps we computed all the pseudo-straight path distances as well as all the zero-slope pseudo-straight rays, so we can compute all-pair shortest paths between extreme points in 0(|V| 3 ) time. That means that the running time of our generalized algorithm will remain unchanged at 0 ( | 1 / | 4 | £ | ) since trying all possible (s',t') takes only 0(\V\2). 24 Chapter 4 Conclusions and Future Work 4.1 Edge-Restricted Problems We have shown that the pessimistic edge-constrained problem is NP-hard. The same proof can be used to confirm Chris Gray's result for the pessimistic unrestricted case. Any edge-restricted shortest path problem can be reduced to an unrestricted shortest path problem by replacing each triangle with 3 new triangles: we introduce a new vertex (with a large Z-coordinate) in the middle each triangle. That forces any shortest path to stay off the face, effectively making the problem edge-restricted. It also seems that many real terrains will be "hard" instances. The difficulty of the problem comes from the potentially exponential number of non-dominated path measures. If there are an exponential number of paths between two points of a terrain and they have roughly of the same length (measured in XY plane), the chance is, most of those paths' measures will be distinct (it would be naive to expect that two different paths will produce exactly the same measures) and most of those paths will be non-dominated (because they are roughly of the same length). An almost flat terrain with little noise will exhibit such properties. In fact, it is possible to do an NP-hardness construction similar to the one used in the Chapter 2 on a terrain that has a uniform grid as its XY projection, just by varying uncertainty ranges and Z-coordinates of the vertices. The pessimistic assumption is probably not a very good one. Imagine a uni-form sequence of vertices, with the same Z-coordinates and uncertainty ranges, aligned in a line, with edges between every pair of neighbouring vertices. The length of a pessimistic shortest path though such a chain will increase, indefi-nitely, as we increase the number of intermediate vertices. In other words, we will be getting a longer path length as we get more measurements of the terrain, unless we manage to decrease the uncertainty ranges at the same time. We presented a polynomial time algorithm for the optimistic edge-constrained problem. The algorithm was not designed for performance, but rather to show that the problem can be solved in polynomial time. There are almost certainly some faster algorithms to be found. Chapter 4. Conclusions and Future Work 25 4.2 Unrestricted Problems Both optimistic and pessimistic unrestricted shortest path problems are NP-hard, but what about approximating them? We cannot introduce too many new uncertain vertices to reduce the problem to an edge-restricted one because, as we mentioned before, it increases the length of the optimal path if we add more vertices without decreasing uncertainty. Another difficulty is that, for any approach to the unrestricted case, working locally is not sufficient. If you cross one triangle in the beginning of your path, you might restrict some of the triangles that you will be visiting later. Figure 4.1 shows that at the time when we traverse the triangle B, we would have to remember about restrictions we have put on the vertex v when we traversed the triangle A. That makes it very difficult to come up a reasonable measure for a path because that measure would have to capture not just the possible lengths of the path, but also how that path has restricted our choice of feasible terrains. Figure 4.1: Triangles A and B are both dependent on the vertex v. It might look that the optimistic unrestricted problem can be approximated by finding (approximately) a path from source to sink in 3D between the lower and the upper terrains and then choosing the positions for the vertices of the optimal terrain such that the path lies on it's surface. Unfortunately, that does not work - some of the paths (even some of the straight paths) that lie in between the lower and the upper terrains are not be feasible. Look at the Figure 4.2. It is quite possible that the shortest path between some two points, s and t, is a straight line that lies completely in between the lower and the upper terrains and goes through both point a and point b. The line segment ab can be arbitrarily steep, while the slope of the triangle vup is bounded. Chapter 4. Conclusions and Future Work 26 Figure 4.2: The slope of the line ab can be arbitrarily large as both a and b are getting close to v. That means we will not always be able to find a feasible terrain that contains our shortest path in 3D. It is unclear how to bound the resulting error to get an approximation algorithm for the optimistic unrestricted shortest path problem. Appendix A 27 Proving the constant factor of 10 for the gadget* We will prove that the pessimistic shortest path traversal through gadget* must alternate the top and bottom extremes of the vertices as it goes through, as long as the parameter b and | UP — DOWN] at the vertex v are both upper bounded by 8 and H is set to 10/3. Since | UP - DOWN] < 8, we need only show that the alternating traversal is always longer than any other traversal by at least 8. First, look at the gadget2 (Figure 2.3). We label the lengths of the traversals with (siS2S$)b = d(uSlvS2) + d(vS2wS3), where b is the parameter used for gadget*. We need to show that for any b € [0,8], By symmetry, (+ )b = ( +)6, (- )b = (+++)(,, and (++-) 6 = (-++)(,, and since C\ > C2, (H l-)& = 2Cj > 2C2 = (—H—)b- Thus, it suffices to prove (A.2). The maximum in (A.2) is achieved by (H ){, since (++-)& = B + C2<C]+B = (+—)b because Cx > C2 ( )b = 2B < Ci + B = (+—)b because Cx > B, which leaves us with a single inequality, (—I—);, > (H ){, + 8, to prove: (-+-)b ~ (+—)b = 2C2 - (Ci + B) = 2y/(H - QY + H2- (V{H + QY + H2 + ^JH2 + Q2) > 2y/(H-8)2 + H2 - (y/(H + 8)2 + H2 + ^JW + 82) = /3(2\/l81 - V22T - %/ioT) > 8, where we have used the fact that Q = b/2^{%H2 - b2)/{4H2 - b2) < /?,/800/1596 < 8 for b e [0,8]. Now look at gadgetl (Figure 2.2). By symmetry, we only need to show (+-+)& > max{(+++)b, (~++)b, ( +)b} + B and (-+-)b > max{(++-)h, (+ )b, ( )b} + P (A.l) (A.2) Appendix A. Proving the constant factor of 10 for the gadget* 28 that 2C - 2D > B: - D = V2H - \JC2 - H2 (see Figure 2.4) ••Cl>C = (C1+ C2)/2 since Cx > C2) C - D > C 0 - D > V2H - XJC\ - H2 (because ¥ = V2H - y/(H + Q)2 + H2-H2 = V2H -{H + Q)> (3(^200 - 11) > 3/2. 29 Bibliography [L] Chris Gray, "Shortest Paths on Uncertain Terrains," Master's thesis, (Vancouver, BC, Canada: University of British Columbia, August 2004). [2] John Canny and John Reif, "New lower bound techniques for robot motion plan-ning problems," Proceedings of the 28th Annual Symposium on Foundations of Computer Science, (Los Angeles, CA, USA: IEEE Computer Society Press, Oc-tober 1987): 49-60. [3] Joseph S. B. Mitchell, David M. Mount, and Christos H. Papadimitriou, "The Discrete Geodesic Problem," SI AM Journal on Computing, (Volume 16 Issue 4), (Society for Industrial and Applied Mathematics, 1987): 647-668. [4] Andreas Kaab, "Monitoring high-mountain terrain deformation from repeated air- and spaceborne optical data: examples using digital aerial imagery and ASTER data," ISPRS Journal of Photogrammetry & Remote Sensing, 57:39-52, 2002.
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Optimistic and pessimistic shortest paths on uncertain...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Optimistic and pessimistic shortest paths on uncertain terrains Kholondyrev, Yury 2007
pdf
Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.
Page Metadata
Item Metadata
Title | Optimistic and pessimistic shortest paths on uncertain terrains |
Creator |
Kholondyrev, Yury |
Publisher | University of British Columbia |
Date Issued | 2007 |
Description | In the Uncertain Terrain Shortest Path problem we consider a triangulated terrain with vertices having uncertain Z-coordinates: each vertex is denned as a (x,y,z―,z+) tuple, where the z coordinate of a vertex is uncertain and can be anywhere in the range from z― to z+. We are looking for a path (defined by its projection to the XY- plane) such that, over all possible terrains, the path is as short as possible. We look at both pessimistic (terrain arranges itself to maximize the length of the path that we choose) and optimistic (terrain takes the state that minimizes the length of our path) scenarios. We restrict ourselves to walk only along the edges of the terrain. The unrestricted problem (when we are allowed to walk on the faces of the terrain) has been proven to be NP-hard in both pessimistic and optimistic scenarios. We prove that the edge-restricted pessimistic problem is NP-hard by providing a reduction from the SUBSET-SUM problem and give a polynomial time algorithm for the edge-restricted optimistic problem. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2011-03-17 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0052001 |
URI | http://hdl.handle.net/2429/32577 |
Degree |
Master of Science - MSc |
Program |
Computer Science |
Affiliation |
Science, Faculty of Computer Science, Department of |
Degree Grantor | University of British Columbia |
Campus |
UBCV |
Scholarly Level | Graduate |
AggregatedSourceRepository | DSpace |
Download
- Media
- 831-ubc_2007-0454.pdf [ 1.45MB ]
- Metadata
- JSON: 831-1.0052001.json
- JSON-LD: 831-1.0052001-ld.json
- RDF/XML (Pretty): 831-1.0052001-rdf.xml
- RDF/JSON: 831-1.0052001-rdf.json
- Turtle: 831-1.0052001-turtle.txt
- N-Triples: 831-1.0052001-rdf-ntriples.txt
- Original Record: 831-1.0052001-source.json
- Full Text
- 831-1.0052001-fulltext.txt
- Citation
- 831-1.0052001.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
data-media="{[{embed.selectedMedia}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0052001/manifest