Optimal Construction for Time-Convex Hull with Two Orthogonal Highways in the L1-metric

06/30/2021 ∙ by Jyun-Yu Chen, et al. ∙ 0

We consider the time-convex hull problem in the presence of two orthogonal highways H. In this problem, the travelling speed on the highway is faster than off the highway, and the time-convex hull of a point set P is the closure of P with respect to the inclusion of shortest time-paths. In this paper, we provide the algorithm for constructing the time-convex hull with two orthogonal highways. We reach the optimal result of O(n log n) time for arbitrary highway speed in the L1-metric. For the L2-metric with infinite highway speed, we hit the goal of O(n log n) time as well.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Path planing of a transition network has been an important problem in recent years. In a complex transition network, lots of models have been provided to solve traffic issues. Highway is one of a simple model in it. We assume that we can enter or exit the highway at any point, and the moving speed on the highway is , while the speed off the highway is . Due to the highway, the path of two points using highway may be faster than their straight-line path. Therefore, we care about the minimum travelling time of a path rather than its distance. To replace the definition of distance, we make use of the measure named time-distance. The time-distance of two points is defined to be the minimum travelling time from one point to the other one.

The convex hull in the presence of a highway was introduced by Hurtado et al [5]. A set is convex if it contains the shortest time-path between any two point in . We define the time-convex hull of a set , which is a closure of with respect to the inclusion of shortest time-paths.

In previous works, the convex hull in the presence of highway was first solved by Palop [6]. Palop has showed that, the convex hull in the presence of highway is composed of convex polygons(clusters) with segments of highway connecting all the components. According to the definition of clusters, the shortest time-path of any two points which belongs to different clusters must use the highway. Therefore, we can comprehend the degree of convenience in the transportation network from the point density of each clusters.

Palop [6] provided a time algorithm for constructing the convex hull in the presence of a highway by enumerating the shortest time-path between two points. Then, Yu and Lee [7] studied the problem and provided an approach based on incremental point insertions. However, the algorithm which they proposed does not return the correct answer in all circumstances. Some critical cases which make the problem more tough were overlooked. After that, Aloupis et al. [3] proposed the algorithm that takes time for -metric and takes time for -metric. They solved the cases which Yu and Lee [7] overlooked. Dai et al. [4] provide the algorithm for -metric, where 1 , and they reduce the cluster-merging step which was proposed by Aloupis et al. [3] to a geometric query.

Our focus and contribution

We provide the algorithm for computing time-convex hull with two orthogonal highways in two different distance metrics. First, we provide the algorithm for -metric with arbitrary highway speed and compute it in time. In the algorithm which is given by Aloupis et al. [3], they proposed the approach to constructing the time convex hull with one highway. Considering that there are two orthogonal highways in our model, we divide the input point set into two parts and use the approach in each part. However, after completing this work, the clusters may need to be merged between two parts. Therefore, we use the approach given by Aloupis et al. [3] as a subroutine in our algorithm and apply the data structure proposed by Mitchell [2] to merge the clusters between two parts. All together the above processes generate our -algorithm for -metric.

Second, we provide the -algorithm for the special case in -metric where the highway speed is infinite. Our -algorithm for -metric with infinite highway speed include the following steps: Like what we do in -metric, we divide the input point set into two parts and construct clusters with the algorithm proposed by Dai et al. [4] in each part. Dai et al. use the symmetric property of cluster-merging condition and reduce the time-convex hull problem to the geometric query. Thus, the data structure proposed by Mitchell [2] could be used to answer this particular geometric problem. Finally, after clusters are constructed, we use the ray-shooting method to check if any point should be merged with other cluster.

2 Notation and definition

In this section, we will present some definitions that are useful for the following sections.

Definition 1 (-metric).

for any two points a(,,…,), b(,,…,) under -metric, where p , their distance is defined as .

When the metric are different, the distance of two points will also be different. Therefore, when we are solving the problems about distance, it’s important to make sure that which metric it is.

Definition 2 (Highway).

The travelling speed on a highway H in is faster than 1, while the travelling speed without highways is 1. In this paper, there are two highways intersect perpendicularly.

Without loss of generality, we position highways as x-axis and y-axis, which are denoted and . Furthermore, because the properties of every quadrants are the same, we could concern only the first quadrant.

Definition 3 (Side).

Split the space into two pieces by the function. The one closer to is called , and the one closer to is called .

Figure 1: Sides

With highways, the traffic time between points may less than not using highways. To find the fastest path, we should check that how much time it takes instead of how far it is. In other word, the measure of a path is not length but time, which is called time distance.

Definition 4 (Time distance).

For any two points p and q, their time distance is the travelling time that from one point to the other one. The time distance of p, q is denoted d(p, q).

For any two points and , let STP(,) be the set of their shortest time-paths, which may either use highway or not. If STP(p,q) , then the shortest time-path of p,q use highway.

However, the shortest time-path of two points under -metric is not unique. Thus, we define the shortest time-path between any two points to be the path closest to the highway. In other word, the shortest time-path in -metric would be ”L shape”(See Fig. 2).

Figure 2: Shortest path under -metric is L shape
Definition 5 (Shortest time-path in -metric).

Any two points not using highway will choose the path which is the closest to the highway.

Convex hull and Time-convex hull : In general definition, the convex hull of a point set Q includes all the shortest paths of any pair in the point set Q. In our model, considering time distance, a point set Q is said to be time-convex if it contains all shortest time-paths of every pairs in Q.

Definition 6 (Time-convex hull).

The time-convex hull of a point set P, denoted TCH(P), is a minimum time-convex set of any pairs in P. In other word, for any two points , STP() would located in TCH(P).

The time-convex hull is composed of two parts : two orthogonal straight-line highways, and the set of convex connected components which is denoted by clusters. To be brief, the polyhedrons of the time-convex hull of the point set Q.

Definition 7 (Cluster).

For a point set P, clusters are defined to be the connected components of TCH(P) P.

Figure 3: Walking regions under -metric

3 Walking Region

For any two points p, q, if the shortest time-path of p, q not use highway, or we can say that, q lies in the walking region of p.

Definition 8 (Walking Region).

The walking region of a point p, denoted WR(p), is the set of points q such that STP(p, q) does not use highway .

In the research of Aloupis et al. [3], they proposed the boundary of walking region of points with one highway. According to definition 8, we know that the walking region boundary is yielded by comparing the shortest path using highway with the shortest path without highway. In our model, because there are two orthogonal highways, the point can enter from or then out of or . Thus, there are 4 kinds of the shortest paths using highway (denoted highway path). We focus on first quadrant, we consider only the points on since the walking regions of the points on are symmetric with respect to . For any point S, let be its orthogonal projection onto , be its orthogonal projection onto , and the intersection point of two highways . The shortest paths between two points and consists of either:

  1. The distance of and .

  2. The horizontal segment and the vertical segments and .

  3. The horizontal segments and and the vertical segments and .

  4. The horizontal segments and and the vertical segment .

  5. The horizontal segments and and the vertical segments and .

The walking region of is the set : distance of a and b every kinds of highway paths.

Property 1 (Walking Region in ).

(See [3], [6]) For any point q = (, ) with , , we have the following properties :

In the -metric, there are 3 kinds of shape (See figure 3) related to the x-coordinate and y-coordinate of . The walking region of the point is the intersection of four regions :

  1. two segments with slope and intersect at and connect the half-line at horizontal line through .

  2. two segments with slope and intersect at and connect the half-line at horizontal line through .

  3. two segments with slope and which meet at and join the half-line at vertical line through .

  4. two segments with slope and which meet at and join the half-line at vertical line through .

Proof.

For any point , the 4 kinds of regions are the boundary of the set 4 kinds of highway path . For example, the first region is the set . In other word, for any point in this region, the shortest path between and which does not use the highway is faster than using this highway path. Therefore, for the point which is in the intersection of this four regions, the shortest time-path between and do not use the highway.

Property 2 (Walking region in ).

(See [4], [6]) For any point q = (, ) with , , we have the following properties :

In the -metric with infinite highway speed, the boundary of WR() is the intersection of two regions :

  1. The first region is characterized by the following two parabolas :
    (a) right discriminating parabola, which is the curve satisfying

    (b) The left discriminating parabola which is symmetric to the right discriminating parabola with respect to the line .

  2. The second region is characterized by the following two parabolas :
    (a) right discriminating parabola, which is the curve satisfying

    (b) The left discriminating parabola which is symmetric to the right discriminating parabola with respect to the line .

Figure 4: Walking regions under -metric with infinite
Proof.

It is similar to the case in -metric. In -metric, the shortest path of the point in always enter the highway because of the infinite highway speed. So, there are just 2 kinds of highway paths and regions.

4 Optimal Construction in -metric

In our model, there exist two orthogonal highways and a point set. The two orthogonal highways could be regard as x-axis and y-axis.

Image that there is another line: in the model. By , the point set could be separated into two part, and , which is the same to definition of (definition 3). Thus, each point can be assigned to one side.

According to the definition 3, we can infer that if two points on the same side using highway, they must use the highway on their side. It’s easy to prove the correctness since the closet highway of the two points are both the one on their side. Therefore, at most one highway would be used by these two points.

Lemma 1.

Any two points on the same side use at most one highway.

Proof.

Assume there are two point p, q on side- (k can be x or y). Because p and q are on side-, the closet highway to them are both . So, if p to q using highway, it need to ”enter , leave ”, which use only one highway . ∎

By lemma 1, for points on the same side, at most one highway would be used, which is the same to the research of previous works [3, 4]. By previous works, the time-convex hull for a given set S of n points in -metric can be computed in time using space, where . Consequently, clusters could also be constructed in O().

Corollary 2.

[3, 4] For a point set on , clusters could be constructed in O().

For a point set S, we separate all points into two sides. Points on are sorted by their x-coordinates, and points on are sorted by their y-coordinates. By lemma 1 and corollary 2, we could construct clusters on each side.

However, the walking regions of clusters we constructed on one side may contain some points on the other side, which means that we may need to merge clusters on different sides.

To merge the clusters on different sides, we record the boundary of walking region of each cluster. Take the points on for example, if any point on lies inside the walking region of any cluster on , we would mark and the cluster that belongs to. The marked clusters would be merged into a new cluster in subsequent steps.

After all points on have been checked, we execute the same process to and mark the clusters we found. Finally, these marked clusters would be merged into a new cluster. The cluster merging of different sides is called side inclusion.

Figure 5: Every marked clusters are located at bottom left of
Lemma 3 (merge approach).

Let be the topmost cluster on and be the rightmost cluster on we marked. Merging and will also merge every clusters on the left of or below of .

Proof.

Let be a point of and be a point of . and lie in the walking region of each other. Denote to be the shortest time-path between and . Since and lie in the walking region of each other, doesn’t use highway. Suppose that intersects another cluster at some point . Because of the fact that a subpath of a shortest path is also a shortest path, neither the path nor the path use the highway. Thus, and one of or must be in the same cluster before merging, which is a contradiction to the assumption. ∎

By lemma 3, the only marked clusters which need to be merged are the topmost cluster and the rightmost cluster . Because merging and will also merge every clusters on the bottom-left of them, the new cluster after merging will contain all the other points before and . Thus, all marked clusters have been merged and no more clusters would be merged again. We could end the side inclusion and construct the time-convex hull.

Although the structure of our algorithm has been introduced, we haven’t explained how to find the clusters need to be marked.

Our algorithm is based on the research that was proposed by Aloupis et al [3]. In their research, construct a time-convex hull with one highway in the -metric takes only . Therefore, by corollary 2, we could construct clusters on each side by the method of Aloupis et al in .

Point inclusion is an approach to construct clusters with one highway, which was also proposed by Aloupis et al [3]. Take for example, we would sort the point set by their x-coordinates first, and check the walking region of each point one by one. The walking regions are saved as linked lists, which record the boundaries of the walking region for each point. If a new point lies in the walking region of , then all points between and would be merged into a new cluster. After solving , we will turns to do point inclusion to , until every points in are solved.

The algorithm saves the boundaries of walking regions when constructing clusters, so we can check if any points on the other side lie on the walking region at the same time.

Definition 9 (Segment-dragging query).

The segment-dragging query, denoted Q(L). Q(L) ask that, for any line segment L with finite slope and a point set P, if P is empty or not, where is the half plane to the right of L or above L.

We call the query searching the half plane to the right of L segment horizontal-dragging query, while searching the half plane above L is called segment vertical-dragging query

Lemma 4.

(Chazelle [1] and Mitchell [2]) Segment-dragging query takes O() constructed time, O() space, O() query time.

By property 1, for the incoming point on , its left boundaries of walking region consist of at most three segments on (See fig. 3), while the right boundary consist only one vertical segment on . Therefore, we extend the right boundary to a vertical line , and invoke the segment horizontal-dragging query for each left boundaries to . If the query return yes, it means that the cluster of must be merged with some clusters on the other side, so the cluster belongs to would be marked.

Lemma 5.

Each point evokes at most 3 segment-dragging queries.

However, checking points is not enough. As fig. 6, the cluster that contains and should also contain , but is neither in the walking region of or . The cause of the problem is that the walking region of a cluster includes not only the walking regions of its convex vertices, but also the walking regions of the line segments that connect the convex vertices.

Figure 6: Edge inclusion

To deal with the problem, we need to check whether the walking region of the line segments(gray area in fig. 6) causes side inclusion, which is called edge inclusion. The edge of a cluster would only be formed when clusters are merged. Whenever a new edge is formed, the segment-dragging query would be invoked to check if the walking region of the edge contains any points on the other side. If the query return yes, mark the cluster which the edge belongs to.

After solving all the points on , we perform the same process for the points on .

For clusters we marked above, we pick out the topmost cluster and the rightmost cluster . By lemma 3, merging and will also merge all the other clusters before them. Therefore, we can get the final clusters after merging and .

After we obtain the final clusters, the time-convex hull could be constructed by linear scan in O(). The linear scan start from the last point on to the fist point , then turn to from the first point to the last point .

For clusters using only one highway, details steps have been record in the work of Yu and Lee [7] and Aloupis et al [3]. By lemma 3, after side inclusion, there is no more than one cluster using two highways, and the cluster must be the first cluster on both and . Therefore, we can scan all points in the cluster linearly, and the details would be the same to the method of constructing clusters using only one highway.

Theorem 6.

The time-convex hull with two orthogonal highways under -metric can be computed in time.

Proof.

By corollary 2, clusters on each sides could be constructed in times.

For a point set contains n points, by lemma 5, each point would evoke at most 3 segment-dragging queries. Thus, the segment-dragging query would be evoked at most times for n points. Since there are at most n clusters, and each merging create only one newly-formed edge, the segment-dragging query would be evoked at most times for n edges. By lemma 4, segment-dragging query takes times. To sum up, the side inclusion tests totally take O() times.

In the last step, it takes times to construct the time-convex hull by linear scan.

Therefore, the time-convex hull with two orthogonal highways under -metric can be computed in time. ∎

5 Optimal Construction in -metric with infinite highway speed

In this section, we just care about the case of infinite highway speed. By lemma 3, our approach is to find the topmost marked cluster and the rightmost marked cluster as well. For this goal, we need to construct clusters first and check where and are. Like what we do under -metric, we process the point inclusion to every points. However, due to the different shape of walking regions between and metric, edge inclusions may also be happened during point inclusion. The method of constructing clusters with one highway under -metric was proposed by Dai [4], which takes time.

(a) edge inclusion on the same side
(b) new-formed edge e
(c) edge inclusion on the other side
Figure 7: edge inclusion

The edge inclusion will be happened when the clusters are merged. When the clusters are merged, a new hull edge will be created (See Fig. 7(b)), and we exploit segment vertical-dragging query for this test. The approach we used is referred to the work of Dai [4]. Let E be the set of newly-formed edges. We randomly pick one edge in E to check if there are any points that lie in this area , which means that the clusters need to be merged. Otherwise we check another edge in E until E is empty. This step just check the clusters on the same side.

On the other side, edge inclusion may also occur(See Fig. 7(c)). Thus the walking region of edge e on the other side also need to be checked. We invoke segment horizontal-dragging query again to check if on the other side contain any points. If the query return yes, this cluster will be marked.

After the edge inclusion test of incoming point , we need to maintain the outermost boundary of clusters on the other side, i.e. if is on , we would maintain the outermost boundaries of clusters on (See Fig.8) . This process will be done in both side. The boundary will be stored as linked-lists which consist of two points and a curve. Below we describe how to maintain the boundary.

When a new point arrives, we will check the intersection between and . Denoted these two points and , where ’s y-coordinate is less than ’s y-coordinate :
1. If ’s and ’s y-coordinate are both larger than the tail of linked-list , we can update the linked-list directly.
2. If ’s and ’s y-coordinate are both less than , the walking region will be covered and we can go next point .
3. After case 1 and 2, we check if the walking region of intersects with the boundary which is represented by .

If yes, update the linked list and go for next point .

If no, will be covered and never be used, we can delete it and keeping going to

to check these three cases.

Figure 8: The boundary of walking region of points in Side-

We construct the linked-list of points on first. After the boundary is constructed, ray shooting could be executed to compare each point on with the linked list which is made of walking regions from . The ray shooting would start from the last point of and the tail of linked list .

If is to the left of , it means that lies in the walking region of some clusters on . Therefore, we could mark the cluster that belongs to and stop the ray shooting on . Otherwise, when is not to the left of but to the right of it, we could make sure that doesn’t lie in any walking region of clusters on for the fact that the linked list is y-monotone. Thus we should search the next point .

When the y-coordinate of is less than , we traverse the next curve . Like the concept of the former, we would search next point if the y-coordinate of is less than . The ray shooting will be executed continuously until all points on have been searched or all curves in the linked list have been traversed.

After we have traversed every points, and could be found and we can complete the final clusters after merging them. If there are no marked cluster in either or , it means that the cluster-merging between different sides would not happen, which is the same to the case of one highway that has been solved efficiently by Dai [4].

In the point inclusion test, it can be done in by Dai [4]. Furthermore, in the edge inclusion test, every cluster-merging create one hull edge at most and take in each test. Therefore, it takes in edge inclusion test. In the process of maintain the outermost boundary, each point intersect at most two points and every nodes are just traversed at most one time, so it takes time in ray shooting test. Thus, the time-convex hull with two orthogonal highways of infinite speed under -metric can be computed in time.

Theorem 7.

The time-convex hull with two orthogonal highways of infinite speed under -metric can be computed in time.

6 Conclusion

In this paper, we give an O() time algorithm for the time-convex hull with two orthogonal highways under -metric. For -metric, we provide O() time algorithm in the special case where the highway speed is infinite. There are some extensions of this work, e.g., -metric with general highway speed, -metric where 1 , or, with multiple highways.

References

  • [1] Bernard Chazelle. An algorithm for segment-dragging and its implementation. Algorithmica volume 3, pages 205–221(1988)
  • [2] Joseph S. B. Mitchell. L 1 shortest paths among polygonal obstacles in the plane. Algorithmica volume 8, pages 55–88(1992)
  • [3] Greg Aloupis, Jean Cardinal, Sébastien Collette, Ferran Hurtado, Stefan Langerman, Joseph O’Rourke, Belén Palop. Highway hull revisited. Computational Geometry 43 (2010) 115–130.
  • [4] Bang-Sin Dai, Mong-Jen Kao, D.T.Lee. Optimal time-convex hull for a straight-line highway in -metrics. Computational Geometry 53 (2016) 1–20
  • [5] F. Hurtado, B. Palop, V. Sacristán. Diagramas de Voronoi con distancias temporales (Spanish). Actas de los VIII Encuentros de Geometra Computacional, 1999, pp.279–288
  • [6] B. Palop. Algorithmic problems on proximity and location under metric constraints. Ph.D thesis, Universitat Politécnica de Catalunya, 2003.
  • [7] Teng-Kai Yu, D. T. Lee Time convex hull with a highway 4th International Symposium on Voronoi Diagrams in Science and Engineering (ISVD 2007).

References