Abstract
In this paper, we study variants of the classical geometric shortest path problem inside a simple polygon, where we allow a part of the path to go outside the polygon. Let P be a simple polygon consisting of n vertices and let s, t be a pair of points in P. Let \(\text{ int }(P)\) represent the interior of P and let \(\overline{P}\) represent the exterior of P, i.e. \(\text{ int }(P)=P{\setminus }\partial (P)\) and \(\overline{P}=\mathbb {R}^2{\setminus }\text{ int }(P)\). For an integer \(k\ge 0\), we define a k-violation path from s to t to be a path connecting s and t such that its intersection with \(\overline{P}\) consists of at most k segments. There is no restriction in terms of the number of segments of the path within P. The objective is to compute a path of minimum Euclidean length among all possible \(({\le } k)\)-violation paths from s to t. In this paper, we study this problem for \(k=1\) and propose an algorithm that computes the shortest one-violation path in \(O(n^3)\) time. We show that for rectilinear polygons, the minimum length rectilinear one-violation path can be computed in \(O(n\log n)\) time. We extend the concept of one-violation path to a one-stretch violation path. In this case, the path between s and t is composed of (a) a path in P from s to a vertex u of P, (b) a path in \(\overline{P}\) between u and a vertex v of P, and (c) a path in P between v and t. We show that a minimum length one-stretch violation path can be computed in \(O(n\log n\log \log n)\) time. Next, we introduce one- and two-violation monotone rectilinear path problems among a set of n disjoint axis-parallel rectangular objects. Let s, t be two points in \(\mathbb {R}^2\) that are not in the interior of any of the objects. In the case of one-violation monotone path problem, the desired rectilinear path from s to t consists of horizontal edges that are directed towards the right and vertical edges that are directed upwards, except for at most one edge. Similarly, in the case of a two-violation monotone path problem, all horizontal edges are directed towards the right except at most one and all vertical edges are directed upwards except at most one. Our algorithms for both of these problems run in \(O(n\log n)\) time.










Similar content being viewed by others
Notes
Each element of the heap is a tuple (a, b, x), where a is the key and b is the priority field. Needless to say, each key \(a \in A=\{a_1,a_2,\ldots ,a_N\}\) has at most one representation in the heap. Each element in the heap may contain some other information x, which can be null also.
insert(a, b, x) inserts a tuple in the heap H.
decrease-key \((a,b')\) updates the b-value corresponding to the key a in the heap H if the existing b-value of the node having key a is greater than \(b'\); if the update is done, then it adjusts the heap H.
find-min(H) returns the entry with minimum priority (b) in the heap H.
delete-min(H) deletes the element with minimum priority from H, and then adjusts the heap H.
The \(\mu '\)-th entry of \(C_v\) indicates this position.
An L-path consists of a horizontal and a vertical segment incident at a common bend (turn) point.
see Definition 2.
If t is above s, then any one-violation path, if exists, will be of smaller length than any two violation path, and we can get an one-violation path of minimum length (if exists) as in Sect. 6.1.1.
References
Aggarwal, A., Klawe, M.: Applications of generalized matrix searching to geometric algorithms. Discrete Appl. Math. 27(12), 3–23 (1990)
Bint, G., Maheshwari, A., Smid, M.H.M.: xy-monotone path existence queries in a rectilinear environment. In: Proceedings of CCCG, pp. 35–40 (2012)
Chan, T.: Low-dimensional linear programming with violations. SIAM J. Comput. 34, 879–893 (2005)
Chazelle, B.: Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6, 485–524 (1991)
De Carufel, J.-L., Grimm, C., Maheshwari, A., Smid, M.: Minimizing the continuous diameter when augmenting paths and cycles with shortcuts. In: 15th Scandinavian Symposium and Workshop on Algorithmic Theory, Reykjavik, Iceland, June (2016)
de Rezende, P.J., Lee, D.T., Wu, Y.F.: Rectilinear shortest paths in the presence of rectangular barriers. Discrete Comput. Geom. 4, 41–53 (1989)
Farshi, M., Giannopoulos, P., Gudmundsson, J.: Improving the stretch factor of a geometric network by edge augmentation. SIAM J. Comput. 38(1), 226–240 (2008)
Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)
Ghosh, S.K.: Visibility Algorithms in the Plane. Cambridge University Press, Cambridge (2007)
Ghosh, S.K., Mount, D.M.: An output-sensitive algorithm for computing visibility graphs. SIAM J. Comput. 20(5), 888–910 (1991)
Große, U., Gudmundsson, J., Knauer, C., Smid, M., Stehn, F.: Fast algorithms for diameter-optimally augmenting paths. In: 42nd ICALP, LNCS, vol. 9134, pp. 678–688, Kyoto, Japan, July (2015)
Guibas, L.J., Hershberger, J., Leven, D., Sharir, M., Tarjan, R.E.: Linear-time algorithm for visibility and shortest path problems inside triangulated simple polygons. Algorithmica 2, 209–233 (1987)
Guibas, L.J., Hershberger, J.: Optimal shortest path queries in a simple polygons. J. Comput. Syst. Sci. 39, 126–152 (1989)
Hershberger, J., Snoeyink, J.: Computing the minimum length path in a given homotopy class. Comput. Geom. Theory Appl. 4, 63–97 (1994)
Hershberger, J., Suri, S.: Matrix searching with the shortest-path metric. SIAM J. Comput. 26(6), 1612–1634 (1997)
Kirkpatrick, D.G.: Optimal search in planar subdivisions. SIAM J. Comput. 12(1), 28–35 (1983)
Levcopoulos, C.: Fast heuristics for minimum length rectangular partitions of polygons. In: Symposium on Computational Geometry, pp. 100–108 (1986)
Li, F., Klette, R.: Euclidean Shortest Paths—Exact or Approximate Algorithms. Springer, Berlin (2011)
Matoušek, J.: On geometric optimization with few violated constraints. Discrete Comput. Geom. 14, 365–384 (1995)
Mitchell, J.S.B.: Geometric shortest paths and network optimization. Handbook of computational geometry. Elsevier Science Publishers B.V., North-Holland (1998)
Ross, T., Widemayer, P.: \(k\)-violation linear programming. Inf. Process. Lett. 52(2), 109–114 (1994)
Schuierer, S.: An optimal data structure for shortest rectilinear path queries in a simple rectilinear polygon. Int. J. Comput. Geom. Appl. 6(2), 205–226 (1996)
Acknowledgements
The authors acknowledge Professor Haim Kaplan for discussion on some of the problems presented in this paper. We thank both the referees for making numerous suggestions that led to the improvement of the presentation of the paper.
Author information
Authors and Affiliations
Corresponding author
Additional information
Research supported by NSERC and the Canadian Commonwealth Scholarship.
Rights and permissions
About this article
Cite this article
Maheshwari, A., Nandy, S.C., Pattanayak, D. et al. Geometric Path Problems with Violations. Algorithmica 80, 448–471 (2018). https://doi.org/10.1007/s00453-016-0263-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-016-0263-3