Sequence of polygons containing the shortest path - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-25T14:46:23Z http://mathoverflow.net/feeds/question/71566 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/71566/sequence-of-polygons-containing-the-shortest-path Sequence of polygons containing the shortest path Mark Freeman 2011-07-29T11:08:29Z 2011-08-04T16:03:11Z <p>Hello all,</p> <p>I’m looking at the weighted region problem i.e. trying to find the shortest weighted path across a polygon subdivision, but at this point in my work, I only need to know the <strong>sequence of polygons through which the shortest path will pass</strong>.</p> <p>I have an idea but I’m having trouble finding the mathematical justification for it, so I wonder if someone can either confirm my thoughts (or point me in the right direction)?</p> <p>This is the idea:</p> <blockquote> <ol> <li>I use the edges of the polygons as a graph</li> <li>weight each edge based on the lower weight of its adjacent polygons</li> <li>use Dijkstra’s algorithm to find the shortest path along the edges between nodes s and t</li> <li>select the lower weight polygons from either side of this path.</li> </ol> </blockquote> <p>Would this algorithm work, including when the polygons are non-convex?</p> <p>I have read the paper by Mitchell and Papadimitriou, mentioned in the question: <a href="http://mathoverflow.net/questions/66990/shortest-path-in-plane" rel="nofollow">http://mathoverflow.net/questions/66990/shortest-path-in-plane</a>, along with several others, but the closest reference to my problem I can find is in ‘Fast Exact and Approximate Geodesics on Meshes’ by Vitaly Surazhsky et al which states in section 5:</p> <blockquote> <p>“Using Dijkstra search on edges only, compute an upper bound distance Ust(Dijkstra) by searching from vs until vt is reached.”</p> </blockquote> <p>The paper however is assuming that the division is a <strong>triangular mesh</strong> and I don’t know if this statement can be generalised to a set of non-convex polygons.</p> <p>My background is in geography and physics (very rusty now though) so I’m ok with maths to a point, but I’ve never developed a proof. Also, I am looking at this problem from a practical point of view, in that I would like to find a solution which will work with large quantities of data in a “reasonable”, time, even if the solution is approximate.</p> <p>Thank you for any help you can give,</p> <p>Mark</p> http://mathoverflow.net/questions/71566/sequence-of-polygons-containing-the-shortest-path/71617#71617 Answer by Joseph O'Rourke for Sequence of polygons containing the shortest path Joseph O'Rourke 2011-07-29T20:50:24Z 2011-08-04T16:03:11Z <p>[My first counterexample was based on a misinterpretation of the edge weights; now removed as irrelevant (but this explains the comments below). Counterexample to a correct interpretation follows.] <hr /> <b>Added.</b> (30Jul11). Sorry for misinterpreting. I now see that the weight of each edge in your graph is the Euclidean length of the edge times the lower weight of the region to either side. Here is an example where I believe the algorithm fails, where I use $w$ for weight and $l$ for length. <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://cs.smith.edu/~orourke/MathOverflow/ShortestWeighted2.jpg" alt="shortest 2"> <br /> Your algorithm would select the purple path, because its cost is $0+\frac{3}{2}+0$, whereas the red path has cost about $0+\frac{\pi}{2}+0 > \frac{3}{2}$, and so is rejected by the algorithm. (Of course I could make the red cost approach $\frac{\pi}{2}$ by increasing the number of edges in the regular polygon; the zero weights could be $\epsilon$-weights if you want them all to be positive). I am assuming surrounding regions that lead to the weights shown being the only relevant ones. So the algorithm thinks passing through the mauve rectangle is best. But the green path (not visible to your algorithm because it does not follow edges of regions) has cost $0+1+0$. The problem is that following the edges of a convex region overestimates the cost of traversing through the interior of that region, and this overestimate could lead to the algorithm choosing a nonoptimal route.</p>