Skip to main content
Log in

Geometric Path Problems with Violations

  • Published:
Algorithmica Aims and scope Submit manuscript

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 st 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 st 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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. Each element of the heap is a tuple (abx), 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.

  2. insert(abx) inserts a tuple in the heap H.

  3. 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.

  4. find-min(H) returns the entry with minimum priority (b) in the heap H.

  5. delete-min(H) deletes the element with minimum priority from H, and then adjusts the heap H.

  6. The \(\mu '\)-th entry of \(C_v\) indicates this position.

  7. An L-path consists of a horizontal and a vertical segment incident at a common bend (turn) point.

  8. see Definition 2.

  9. 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

  1. Aggarwal, A., Klawe, M.: Applications of generalized matrix searching to geometric algorithms. Discrete Appl. Math. 27(12), 3–23 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

  3. Chan, T.: Low-dimensional linear programming with violations. SIAM J. Comput. 34, 879–893 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  4. Chazelle, B.: Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6, 485–524 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  5. 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)

  6. 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)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

    Article  MathSciNet  MATH  Google Scholar 

  8. Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  9. Ghosh, S.K.: Visibility Algorithms in the Plane. Cambridge University Press, Cambridge (2007)

    Book  MATH  Google Scholar 

  10. Ghosh, S.K., Mount, D.M.: An output-sensitive algorithm for computing visibility graphs. SIAM J. Comput. 20(5), 888–910 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  11. 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)

  12. 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)

    Article  MathSciNet  MATH  Google Scholar 

  13. Guibas, L.J., Hershberger, J.: Optimal shortest path queries in a simple polygons. J. Comput. Syst. Sci. 39, 126–152 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  14. Hershberger, J., Snoeyink, J.: Computing the minimum length path in a given homotopy class. Comput. Geom. Theory Appl. 4, 63–97 (1994)

    Article  MATH  Google Scholar 

  15. Hershberger, J., Suri, S.: Matrix searching with the shortest-path metric. SIAM J. Comput. 26(6), 1612–1634 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  16. Kirkpatrick, D.G.: Optimal search in planar subdivisions. SIAM J. Comput. 12(1), 28–35 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  17. Levcopoulos, C.: Fast heuristics for minimum length rectangular partitions of polygons. In: Symposium on Computational Geometry, pp. 100–108 (1986)

  18. Li, F., Klette, R.: Euclidean Shortest Paths—Exact or Approximate Algorithms. Springer, Berlin (2011)

    Book  MATH  Google Scholar 

  19. Matoušek, J.: On geometric optimization with few violated constraints. Discrete Comput. Geom. 14, 365–384 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  20. Mitchell, J.S.B.: Geometric shortest paths and network optimization. Handbook of computational geometry. Elsevier Science Publishers B.V., North-Holland (1998)

    Google Scholar 

  21. Ross, T., Widemayer, P.: \(k\)-violation linear programming. Inf. Process. Lett. 52(2), 109–114 (1994)

    Article  MathSciNet  Google Scholar 

  22. 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)

    Article  MathSciNet  MATH  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Subhas C. Nandy.

Additional information

Research supported by NSERC and the Canadian Commonwealth Scholarship.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-016-0263-3

Keywords

Navigation